chore(docs): Generated References (automated) (#14471)
Generated the following references: - `analytics` - `analytics_provider` - `api_key` - `api_key_models` - `auth` - `auth_models` - `cart` - `cart_models` - `core_flows` - `currency` - `currency_models` - `customer` - `customer_models` - `event` - `events` - `file_service` - `fulfillment` - `fulfillment_models` - `fulfillment_provider` - `inventory_next` - `inventory_next_models` - `js_sdk` - `medusa` - `module_events` - `modules` - `modules_sdk` - `order` - `order_models` - `payment` - `payment_models` - `pricing` - `pricing_models` - `product` - `product_models` - `promotion` - `promotion_models` - `region` - `region_models` - `sales_channel` - `sales_channel_models` - `stock_location_next` - `stock_location_next_models` - `store` - `store_models` - `tax` - `tax_models` - `tax_provider` - `translation` - `translation_models` - `types` - `user` - `user_models` - `utils` - `workflows` --- > [!NOTE] > No changes to summarize — the provided diff was empty. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit fe58b669976b04475e6d0f16eb185976cb527d3b. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
This commit is contained in:
1 parent
1af99f8d5c
commit
d6d7d14a6a
1359 files changed
+321910
-311836
No files matched your search
+1258
-1259
File diff suppressed because it is too large.
Load diff
@@ -2763,6 +2763,14 @@ export const filesMap = [
|
||||
"filePath": "/www/apps/resources/references/core_flows/Auth/Workflows_Auth/functions/core_flows.Auth.Workflows_Auth.generateResetPasswordTokenWorkflow/page.mdx",
|
||||
"pathname": "/references/core_flows/Auth/Workflows_Auth/functions/core_flows.Auth.Workflows_Auth.generateResetPasswordTokenWorkflow"
|
||||
},
|
||||
{
|
||||
"filePath": "/www/apps/resources/references/core_flows/Auth/Workflows_Auth/functions/core_flows.Auth.Workflows_Auth.setAuthAppMetadataWorkflow/page.mdx",
|
||||
"pathname": "/references/core_flows/Auth/Workflows_Auth/functions/core_flows.Auth.Workflows_Auth.setAuthAppMetadataWorkflow"
|
||||
},
|
||||
{
|
||||
"filePath": "/www/apps/resources/references/core_flows/Auth/Workflows_Auth/variables/core_flows.Auth.Workflows_Auth.setAuthAppMetadataWorkflowId/page.mdx",
|
||||
"pathname": "/references/core_flows/Auth/Workflows_Auth/variables/core_flows.Auth.Workflows_Auth.setAuthAppMetadataWorkflowId"
|
||||
},
|
||||
{
|
||||
"filePath": "/www/apps/resources/references/core_flows/Auth/core_flows.Auth.Steps_Auth/page.mdx",
|
||||
"pathname": "/references/core_flows/Auth/core_flows.Auth.Steps_Auth"
|
||||
@@ -3239,6 +3247,10 @@ export const filesMap = [
|
||||
"filePath": "/www/apps/resources/references/core_flows/Common/Steps_Common/functions/core_flows.Common.Steps_Common.getTranslatedLineItemsStep/page.mdx",
|
||||
"pathname": "/references/core_flows/Common/Steps_Common/functions/core_flows.Common.Steps_Common.getTranslatedLineItemsStep"
|
||||
},
|
||||
{
|
||||
"filePath": "/www/apps/resources/references/core_flows/Common/Steps_Common/functions/core_flows.Common.Steps_Common.getTranslatedShippingOptionsStep/page.mdx",
|
||||
"pathname": "/references/core_flows/Common/Steps_Common/functions/core_flows.Common.Steps_Common.getTranslatedShippingOptionsStep"
|
||||
},
|
||||
{
|
||||
"filePath": "/www/apps/resources/references/core_flows/Common/Steps_Common/functions/core_flows.Common.Steps_Common.removeRemoteLinkStep/page.mdx",
|
||||
"pathname": "/references/core_flows/Common/Steps_Common/functions/core_flows.Common.Steps_Common.removeRemoteLinkStep"
|
||||
@@ -3283,6 +3295,10 @@ export const filesMap = [
|
||||
"filePath": "/www/apps/resources/references/core_flows/Common/Steps_Common/variables/core_flows.Common.Steps_Common.getTranslatedLineItemsStepId/page.mdx",
|
||||
"pathname": "/references/core_flows/Common/Steps_Common/variables/core_flows.Common.Steps_Common.getTranslatedLineItemsStepId"
|
||||
},
|
||||
{
|
||||
"filePath": "/www/apps/resources/references/core_flows/Common/Steps_Common/variables/core_flows.Common.Steps_Common.getTranslatedShippingOptionsStepId/page.mdx",
|
||||
"pathname": "/references/core_flows/Common/Steps_Common/variables/core_flows.Common.Steps_Common.getTranslatedShippingOptionsStepId"
|
||||
},
|
||||
{
|
||||
"filePath": "/www/apps/resources/references/core_flows/Common/Steps_Common/variables/core_flows.Common.Steps_Common.removeRemoteLinkStepId/page.mdx",
|
||||
"pathname": "/references/core_flows/Common/Steps_Common/variables/core_flows.Common.Steps_Common.removeRemoteLinkStepId"
|
||||
@@ -4603,6 +4619,10 @@ export const filesMap = [
|
||||
"filePath": "/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.updateOrderShippingMethodsStep/page.mdx",
|
||||
"pathname": "/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.updateOrderShippingMethodsStep"
|
||||
},
|
||||
{
|
||||
"filePath": "/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.updateOrderShippingMethodsTranslationsStep/page.mdx",
|
||||
"pathname": "/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.updateOrderShippingMethodsTranslationsStep"
|
||||
},
|
||||
{
|
||||
"filePath": "/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.updateOrdersStep/page.mdx",
|
||||
"pathname": "/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.updateOrdersStep"
|
||||
@@ -4747,6 +4767,10 @@ export const filesMap = [
|
||||
"filePath": "/www/apps/resources/references/core_flows/Order/Steps_Order/variables/core_flows.Order.Steps_Order.updateOrderShippingMethodsStepId/page.mdx",
|
||||
"pathname": "/references/core_flows/Order/Steps_Order/variables/core_flows.Order.Steps_Order.updateOrderShippingMethodsStepId"
|
||||
},
|
||||
{
|
||||
"filePath": "/www/apps/resources/references/core_flows/Order/Steps_Order/variables/core_flows.Order.Steps_Order.updateOrderShippingMethodsTranslationsStepId/page.mdx",
|
||||
"pathname": "/references/core_flows/Order/Steps_Order/variables/core_flows.Order.Steps_Order.updateOrderShippingMethodsTranslationsStepId"
|
||||
},
|
||||
{
|
||||
"filePath": "/www/apps/resources/references/core_flows/Order/Steps_Order/variables/core_flows.Order.Steps_Order.updateOrdersStepId/page.mdx",
|
||||
"pathname": "/references/core_flows/Order/Steps_Order/variables/core_flows.Order.Steps_Order.updateOrdersStepId"
|
||||
@@ -6295,6 +6319,10 @@ export const filesMap = [
|
||||
"filePath": "/www/apps/resources/references/core_flows/Product/Steps_Product/functions/core_flows.Product.Steps_Product.deleteProductsStep/page.mdx",
|
||||
"pathname": "/references/core_flows/Product/Steps_Product/functions/core_flows.Product.Steps_Product.deleteProductsStep"
|
||||
},
|
||||
{
|
||||
"filePath": "/www/apps/resources/references/core_flows/Product/Steps_Product/functions/core_flows.Product.Steps_Product.dismissProductVariantsInventoryStep/page.mdx",
|
||||
"pathname": "/references/core_flows/Product/Steps_Product/functions/core_flows.Product.Steps_Product.dismissProductVariantsInventoryStep"
|
||||
},
|
||||
{
|
||||
"filePath": "/www/apps/resources/references/core_flows/Product/Steps_Product/functions/core_flows.Product.Steps_Product.generateProductCsvStep/page.mdx",
|
||||
"pathname": "/references/core_flows/Product/Steps_Product/functions/core_flows.Product.Steps_Product.generateProductCsvStep"
|
||||
@@ -6431,6 +6459,10 @@ export const filesMap = [
|
||||
"filePath": "/www/apps/resources/references/core_flows/Product/Steps_Product/variables/core_flows.Product.Steps_Product.deleteProductsStepId/page.mdx",
|
||||
"pathname": "/references/core_flows/Product/Steps_Product/variables/core_flows.Product.Steps_Product.deleteProductsStepId"
|
||||
},
|
||||
{
|
||||
"filePath": "/www/apps/resources/references/core_flows/Product/Steps_Product/variables/core_flows.Product.Steps_Product.dismissProductVariantsInventoryStepId/page.mdx",
|
||||
"pathname": "/references/core_flows/Product/Steps_Product/variables/core_flows.Product.Steps_Product.dismissProductVariantsInventoryStepId"
|
||||
},
|
||||
{
|
||||
"filePath": "/www/apps/resources/references/core_flows/Product/Steps_Product/variables/core_flows.Product.Steps_Product.generateProductCsvStepId/page.mdx",
|
||||
"pathname": "/references/core_flows/Product/Steps_Product/variables/core_flows.Product.Steps_Product.generateProductCsvStepId"
|
||||
@@ -8259,6 +8291,10 @@ export const filesMap = [
|
||||
"filePath": "/www/apps/resources/references/core_flows/interfaces/core_flows.GetTranslatedLineItemsStepInput/page.mdx",
|
||||
"pathname": "/references/core_flows/interfaces/core_flows.GetTranslatedLineItemsStepInput"
|
||||
},
|
||||
{
|
||||
"filePath": "/www/apps/resources/references/core_flows/interfaces/core_flows.GetTranslatedShippingOptionsStepInput/page.mdx",
|
||||
"pathname": "/references/core_flows/interfaces/core_flows.GetTranslatedShippingOptionsStepInput"
|
||||
},
|
||||
{
|
||||
"filePath": "/www/apps/resources/references/core_flows/interfaces/core_flows.GetVariantPriceSetsStepBulkInput/page.mdx",
|
||||
"pathname": "/references/core_flows/interfaces/core_flows.GetVariantPriceSetsStepBulkInput"
|
||||
@@ -8387,6 +8423,10 @@ export const filesMap = [
|
||||
"filePath": "/www/apps/resources/references/core_flows/interfaces/core_flows.UpdateOrderItemsTranslationsStepInput/page.mdx",
|
||||
"pathname": "/references/core_flows/interfaces/core_flows.UpdateOrderItemsTranslationsStepInput"
|
||||
},
|
||||
{
|
||||
"filePath": "/www/apps/resources/references/core_flows/interfaces/core_flows.UpdateOrderShippingMethodsTranslationsStepInput/page.mdx",
|
||||
"pathname": "/references/core_flows/interfaces/core_flows.UpdateOrderShippingMethodsTranslationsStepInput"
|
||||
},
|
||||
{
|
||||
"filePath": "/www/apps/resources/references/core_flows/interfaces/core_flows.UpdatePaymentCollectionStepInput/page.mdx",
|
||||
"pathname": "/references/core_flows/interfaces/core_flows.UpdatePaymentCollectionStepInput"
|
||||
@@ -9327,6 +9367,10 @@ export const filesMap = [
|
||||
"filePath": "/www/apps/resources/references/core_flows/types/core_flows.DismissItemReturnRequestWorkflowInput/page.mdx",
|
||||
"pathname": "/references/core_flows/types/core_flows.DismissItemReturnRequestWorkflowInput"
|
||||
},
|
||||
{
|
||||
"filePath": "/www/apps/resources/references/core_flows/types/core_flows.DismissProductVariantsInventoryStepInput/page.mdx",
|
||||
"pathname": "/references/core_flows/types/core_flows.DismissProductVariantsInventoryStepInput"
|
||||
},
|
||||
{
|
||||
"filePath": "/www/apps/resources/references/core_flows/types/core_flows.DismissRemoteLinksStepInput/page.mdx",
|
||||
"pathname": "/references/core_flows/types/core_flows.DismissRemoteLinksStepInput"
|
||||
@@ -10771,6 +10815,10 @@ export const filesMap = [
|
||||
"filePath": "/www/apps/resources/references/events/Fulfillment/variables/events.Fulfillment.ShippingOptionTypeWorkflowEvents/page.mdx",
|
||||
"pathname": "/references/events/Fulfillment/variables/events.Fulfillment.ShippingOptionTypeWorkflowEvents"
|
||||
},
|
||||
{
|
||||
"filePath": "/www/apps/resources/references/events/Fulfillment/variables/events.Fulfillment.ShippingOptionWorkflowEvents/page.mdx",
|
||||
"pathname": "/references/events/Fulfillment/variables/events.Fulfillment.ShippingOptionWorkflowEvents"
|
||||
},
|
||||
{
|
||||
"filePath": "/www/apps/resources/references/events/Order/variables/events.Order.OrderEditWorkflowEvents/page.mdx",
|
||||
"pathname": "/references/events/Order/variables/events.Order.OrderEditWorkflowEvents"
|
||||
@@ -11843,6 +11891,10 @@ export const filesMap = [
|
||||
"filePath": "/www/apps/resources/references/helper_steps/functions/helper_steps.getTranslatedLineItemsStep/page.mdx",
|
||||
"pathname": "/references/helper_steps/functions/helper_steps.getTranslatedLineItemsStep"
|
||||
},
|
||||
{
|
||||
"filePath": "/www/apps/resources/references/helper_steps/functions/helper_steps.getTranslatedShippingOptionsStep/page.mdx",
|
||||
"pathname": "/references/helper_steps/functions/helper_steps.getTranslatedShippingOptionsStep"
|
||||
},
|
||||
{
|
||||
"filePath": "/www/apps/resources/references/helper_steps/functions/helper_steps.removeRemoteLinkStep/page.mdx",
|
||||
"pathname": "/references/helper_steps/functions/helper_steps.removeRemoteLinkStep"
|
||||
@@ -11879,6 +11931,10 @@ export const filesMap = [
|
||||
"filePath": "/www/apps/resources/references/helper_steps/interfaces/helper_steps.GetTranslatedLineItemsStepInput/page.mdx",
|
||||
"pathname": "/references/helper_steps/interfaces/helper_steps.GetTranslatedLineItemsStepInput"
|
||||
},
|
||||
{
|
||||
"filePath": "/www/apps/resources/references/helper_steps/interfaces/helper_steps.GetTranslatedShippingOptionsStepInput/page.mdx",
|
||||
"pathname": "/references/helper_steps/interfaces/helper_steps.GetTranslatedShippingOptionsStepInput"
|
||||
},
|
||||
{
|
||||
"filePath": "/www/apps/resources/references/helper_steps/interfaces/helper_steps.RemoteStepInput/page.mdx",
|
||||
"pathname": "/references/helper_steps/interfaces/helper_steps.RemoteStepInput"
|
||||
@@ -11923,6 +11979,10 @@ export const filesMap = [
|
||||
"filePath": "/www/apps/resources/references/helper_steps/variables/helper_steps.getTranslatedLineItemsStepId/page.mdx",
|
||||
"pathname": "/references/helper_steps/variables/helper_steps.getTranslatedLineItemsStepId"
|
||||
},
|
||||
{
|
||||
"filePath": "/www/apps/resources/references/helper_steps/variables/helper_steps.getTranslatedShippingOptionsStepId/page.mdx",
|
||||
"pathname": "/references/helper_steps/variables/helper_steps.getTranslatedShippingOptionsStepId"
|
||||
},
|
||||
{
|
||||
"filePath": "/www/apps/resources/references/helper_steps/variables/helper_steps.removeRemoteLinkStepId/page.mdx",
|
||||
"pathname": "/references/helper_steps/variables/helper_steps.removeRemoteLinkStepId"
|
||||
@@ -14071,6 +14131,10 @@ export const filesMap = [
|
||||
"filePath": "/www/apps/resources/references/js_sdk/admin/Translation/methods/js_sdk.admin.Translation.batch/page.mdx",
|
||||
"pathname": "/references/js_sdk/admin/Translation/methods/js_sdk.admin.Translation.batch"
|
||||
},
|
||||
{
|
||||
"filePath": "/www/apps/resources/references/js_sdk/admin/Translation/methods/js_sdk.admin.Translation.entities/page.mdx",
|
||||
"pathname": "/references/js_sdk/admin/Translation/methods/js_sdk.admin.Translation.entities"
|
||||
},
|
||||
{
|
||||
"filePath": "/www/apps/resources/references/js_sdk/admin/Translation/methods/js_sdk.admin.Translation.list/page.mdx",
|
||||
"pathname": "/references/js_sdk/admin/Translation/methods/js_sdk.admin.Translation.list"
|
||||
@@ -20075,6 +20139,10 @@ export const filesMap = [
|
||||
"filePath": "/www/apps/resources/references/translation_models/variables/translation_models.Locale/page.mdx",
|
||||
"pathname": "/references/translation_models/variables/translation_models.Locale"
|
||||
},
|
||||
{
|
||||
"filePath": "/www/apps/resources/references/translation_models/variables/translation_models.Settings/page.mdx",
|
||||
"pathname": "/references/translation_models/variables/translation_models.Settings"
|
||||
},
|
||||
{
|
||||
"filePath": "/www/apps/resources/references/translation_models/variables/translation_models.Translation/page.mdx",
|
||||
"pathname": "/references/translation_models/variables/translation_models.Translation"
|
||||
@@ -20131,6 +20199,10 @@ export const filesMap = [
|
||||
"filePath": "/www/apps/resources/references/types/CommonTypes/interfaces/types.CommonTypes.ModuleImplementations/page.mdx",
|
||||
"pathname": "/references/types/CommonTypes/interfaces/types.CommonTypes.ModuleImplementations"
|
||||
},
|
||||
{
|
||||
"filePath": "/www/apps/resources/references/types/CommonTypes/interfaces/types.CommonTypes.ModuleOptions/page.mdx",
|
||||
"pathname": "/references/types/CommonTypes/interfaces/types.CommonTypes.ModuleOptions"
|
||||
},
|
||||
{
|
||||
"filePath": "/www/apps/resources/references/types/CommonTypes/interfaces/types.CommonTypes.NumericalComparisonOperator/page.mdx",
|
||||
"pathname": "/references/types/CommonTypes/interfaces/types.CommonTypes.NumericalComparisonOperator"
|
||||
@@ -22179,6 +22251,14 @@ export const filesMap = [
|
||||
"filePath": "/www/apps/resources/references/types/HttpTypes/interfaces/types.HttpTypes.AdminTranslation/page.mdx",
|
||||
"pathname": "/references/types/HttpTypes/interfaces/types.HttpTypes.AdminTranslation"
|
||||
},
|
||||
{
|
||||
"filePath": "/www/apps/resources/references/types/HttpTypes/interfaces/types.HttpTypes.AdminTranslationEntitiesParams/page.mdx",
|
||||
"pathname": "/references/types/HttpTypes/interfaces/types.HttpTypes.AdminTranslationEntitiesParams"
|
||||
},
|
||||
{
|
||||
"filePath": "/www/apps/resources/references/types/HttpTypes/interfaces/types.HttpTypes.AdminTranslationEntitiesResponse/page.mdx",
|
||||
"pathname": "/references/types/HttpTypes/interfaces/types.HttpTypes.AdminTranslationEntitiesResponse"
|
||||
},
|
||||
{
|
||||
"filePath": "/www/apps/resources/references/types/HttpTypes/interfaces/types.HttpTypes.AdminTranslationEntityStatistics/page.mdx",
|
||||
"pathname": "/references/types/HttpTypes/interfaces/types.HttpTypes.AdminTranslationEntityStatistics"
|
||||
@@ -25583,6 +25663,10 @@ export const filesMap = [
|
||||
"filePath": "/www/apps/resources/references/types/types/types.FulfillmentStatus/page.mdx",
|
||||
"pathname": "/references/types/types/types.FulfillmentStatus"
|
||||
},
|
||||
{
|
||||
"filePath": "/www/apps/resources/references/types/types/types.GenericModuleConfig/page.mdx",
|
||||
"pathname": "/references/types/types/types.GenericModuleConfig"
|
||||
},
|
||||
{
|
||||
"filePath": "/www/apps/resources/references/types/types/types.IdentifyAnalyticsEventDTO/page.mdx",
|
||||
"pathname": "/references/types/types/types.IdentifyAnalyticsEventDTO"
|
||||
@@ -25599,10 +25683,6 @@ export const filesMap = [
|
||||
"filePath": "/www/apps/resources/references/types/types/types.InternalJoinerServiceConfig/page.mdx",
|
||||
"pathname": "/references/types/types/types.InternalJoinerServiceConfig"
|
||||
},
|
||||
{
|
||||
"filePath": "/www/apps/resources/references/types/types/types.InternalModuleDeclarationOverride/page.mdx",
|
||||
"pathname": "/references/types/types/types.InternalModuleDeclarationOverride"
|
||||
},
|
||||
{
|
||||
"filePath": "/www/apps/resources/references/types/types/types.IsCamelCase/page.mdx",
|
||||
"pathname": "/references/types/types/types.IsCamelCase"
|
||||
@@ -25631,6 +25711,10 @@ export const filesMap = [
|
||||
"filePath": "/www/apps/resources/references/types/types/types.JoinerRelationship/page.mdx",
|
||||
"pathname": "/references/types/types/types.JoinerRelationship"
|
||||
},
|
||||
{
|
||||
"filePath": "/www/apps/resources/references/types/types/types.KnownModuleConfigs/page.mdx",
|
||||
"pathname": "/references/types/types/types.KnownModuleConfigs"
|
||||
},
|
||||
{
|
||||
"filePath": "/www/apps/resources/references/types/types/types.LinkCartPaymentCollection/page.mdx",
|
||||
"pathname": "/references/types/types/types.LinkCartPaymentCollection"
|
||||
@@ -26255,6 +26339,10 @@ export const filesMap = [
|
||||
"filePath": "/www/apps/resources/references/utils/Fulfillment/variables/utils.Fulfillment.ShippingOptionTypeWorkflowEvents/page.mdx",
|
||||
"pathname": "/references/utils/Fulfillment/variables/utils.Fulfillment.ShippingOptionTypeWorkflowEvents"
|
||||
},
|
||||
{
|
||||
"filePath": "/www/apps/resources/references/utils/Fulfillment/variables/utils.Fulfillment.ShippingOptionWorkflowEvents/page.mdx",
|
||||
"pathname": "/references/utils/Fulfillment/variables/utils.Fulfillment.ShippingOptionWorkflowEvents"
|
||||
},
|
||||
{
|
||||
"filePath": "/www/apps/resources/references/utils/FulfillmentUtils/enums/utils.FulfillmentUtils.GeoZoneType/page.mdx",
|
||||
"pathname": "/references/utils/FulfillmentUtils/enums/utils.FulfillmentUtils.GeoZoneType"
|
||||
|
||||
@@ -17630,6 +17630,15 @@ const generatedgeneratedCommerceModulesSidebarSidebar = {
|
||||
"description": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"path": "/references/translation/models/Settings",
|
||||
"title": "Settings",
|
||||
"description": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
|
||||
@@ -194,6 +194,15 @@ const generatedgeneratedReferencesSidebarSidebar = {
|
||||
"title": "generateResetPasswordTokenWorkflow",
|
||||
"description": "Generate a reset password token for a user or customer.",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"path": "/references/medusa-workflows/setAuthAppMetadataWorkflow",
|
||||
"title": "setAuthAppMetadataWorkflow",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -845,6 +854,15 @@ const generatedgeneratedReferencesSidebarSidebar = {
|
||||
"description": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"path": "/references/medusa-workflows/steps/getTranslatedShippingOptionsStep",
|
||||
"title": "getTranslatedShippingOptionsStep",
|
||||
"description": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
@@ -3520,6 +3538,15 @@ const generatedgeneratedReferencesSidebarSidebar = {
|
||||
"description": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"path": "/references/medusa-workflows/steps/updateOrderShippingMethodsTranslationsStep",
|
||||
"title": "updateOrderShippingMethodsTranslationsStep",
|
||||
"description": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
@@ -5179,6 +5206,15 @@ const generatedgeneratedReferencesSidebarSidebar = {
|
||||
"description": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"path": "/references/medusa-workflows/steps/dismissProductVariantsInventoryStep",
|
||||
"title": "dismissProductVariantsInventoryStep",
|
||||
"description": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
@@ -7332,6 +7368,15 @@ const generatedgeneratedReferencesSidebarSidebar = {
|
||||
"description": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"path": "/references/helper-steps/getTranslatedShippingOptionsStep",
|
||||
"title": "getTranslatedShippingOptionsStep",
|
||||
"description": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
|
||||
@@ -564,6 +564,11 @@ export const slugChanges = [
|
||||
"newSlug": "/references/medusa-workflows/generateResetPasswordTokenWorkflow",
|
||||
"filePath": "/www/apps/resources/references/core_flows/Auth/Workflows_Auth/functions/core_flows.Auth.Workflows_Auth.generateResetPasswordTokenWorkflow/page.mdx"
|
||||
},
|
||||
{
|
||||
"origSlug": "/references/core_flows/Auth/Workflows_Auth/functions/core_flows.Auth.Workflows_Auth.setAuthAppMetadataWorkflow",
|
||||
"newSlug": "/references/medusa-workflows/setAuthAppMetadataWorkflow",
|
||||
"filePath": "/www/apps/resources/references/core_flows/Auth/Workflows_Auth/functions/core_flows.Auth.Workflows_Auth.setAuthAppMetadataWorkflow/page.mdx"
|
||||
},
|
||||
{
|
||||
"origSlug": "/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.addShippingMethodToCartStep",
|
||||
"newSlug": "/references/medusa-workflows/steps/addShippingMethodToCartStep",
|
||||
@@ -869,6 +874,11 @@ export const slugChanges = [
|
||||
"newSlug": "/references/medusa-workflows/steps/getTranslatedLineItemsStep",
|
||||
"filePath": "/www/apps/resources/references/core_flows/Common/Steps_Common/functions/core_flows.Common.Steps_Common.getTranslatedLineItemsStep/page.mdx"
|
||||
},
|
||||
{
|
||||
"origSlug": "/references/core_flows/Common/Steps_Common/functions/core_flows.Common.Steps_Common.getTranslatedShippingOptionsStep",
|
||||
"newSlug": "/references/medusa-workflows/steps/getTranslatedShippingOptionsStep",
|
||||
"filePath": "/www/apps/resources/references/core_flows/Common/Steps_Common/functions/core_flows.Common.Steps_Common.getTranslatedShippingOptionsStep/page.mdx"
|
||||
},
|
||||
{
|
||||
"origSlug": "/references/core_flows/Common/Steps_Common/functions/core_flows.Common.Steps_Common.removeRemoteLinkStep",
|
||||
"newSlug": "/references/medusa-workflows/steps/removeRemoteLinkStep",
|
||||
@@ -1764,6 +1774,11 @@ export const slugChanges = [
|
||||
"newSlug": "/references/medusa-workflows/steps/updateOrderShippingMethodsStep",
|
||||
"filePath": "/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.updateOrderShippingMethodsStep/page.mdx"
|
||||
},
|
||||
{
|
||||
"origSlug": "/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.updateOrderShippingMethodsTranslationsStep",
|
||||
"newSlug": "/references/medusa-workflows/steps/updateOrderShippingMethodsTranslationsStep",
|
||||
"filePath": "/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.updateOrderShippingMethodsTranslationsStep/page.mdx"
|
||||
},
|
||||
{
|
||||
"origSlug": "/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.updateOrdersStep",
|
||||
"newSlug": "/references/medusa-workflows/steps/updateOrdersStep",
|
||||
@@ -2939,6 +2954,11 @@ export const slugChanges = [
|
||||
"newSlug": "/references/medusa-workflows/steps/deleteProductsStep",
|
||||
"filePath": "/www/apps/resources/references/core_flows/Product/Steps_Product/functions/core_flows.Product.Steps_Product.deleteProductsStep/page.mdx"
|
||||
},
|
||||
{
|
||||
"origSlug": "/references/core_flows/Product/Steps_Product/functions/core_flows.Product.Steps_Product.dismissProductVariantsInventoryStep",
|
||||
"newSlug": "/references/medusa-workflows/steps/dismissProductVariantsInventoryStep",
|
||||
"filePath": "/www/apps/resources/references/core_flows/Product/Steps_Product/functions/core_flows.Product.Steps_Product.dismissProductVariantsInventoryStep/page.mdx"
|
||||
},
|
||||
{
|
||||
"origSlug": "/references/core_flows/Product/Steps_Product/functions/core_flows.Product.Steps_Product.generateProductCsvStep",
|
||||
"newSlug": "/references/medusa-workflows/steps/generateProductCsvStep",
|
||||
@@ -4614,6 +4634,11 @@ export const slugChanges = [
|
||||
"newSlug": "/references/helper-steps/getTranslatedLineItemsStep",
|
||||
"filePath": "/www/apps/resources/references/helper_steps/functions/helper_steps.getTranslatedLineItemsStep/page.mdx"
|
||||
},
|
||||
{
|
||||
"origSlug": "/references/helper_steps/functions/helper_steps.getTranslatedShippingOptionsStep",
|
||||
"newSlug": "/references/helper-steps/getTranslatedShippingOptionsStep",
|
||||
"filePath": "/www/apps/resources/references/helper_steps/functions/helper_steps.getTranslatedShippingOptionsStep/page.mdx"
|
||||
},
|
||||
{
|
||||
"origSlug": "/references/helper_steps/functions/helper_steps.removeRemoteLinkStep",
|
||||
"newSlug": "/references/helper-steps/removeRemoteLinkStep",
|
||||
@@ -7794,6 +7819,11 @@ export const slugChanges = [
|
||||
"newSlug": "/references/translation/models/Locale",
|
||||
"filePath": "/www/apps/resources/references/translation_models/variables/translation_models.Locale/page.mdx"
|
||||
},
|
||||
{
|
||||
"origSlug": "/references/translation_models/variables/translation_models.Settings",
|
||||
"newSlug": "/references/translation/models/Settings",
|
||||
"filePath": "/www/apps/resources/references/translation_models/variables/translation_models.Settings/page.mdx"
|
||||
},
|
||||
{
|
||||
"origSlug": "/references/translation_models/variables/translation_models.Translation",
|
||||
"newSlug": "/references/translation/models/Translation",
|
||||
|
||||
+2
-2
@@ -112,7 +112,7 @@ await analyticsModuleService.identify({
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[IdentifyAnalyticsEventDTO](../../../types/types/types.IdentifyAnalyticsEventDTO/page.mdx)","description":"The details of the actor or group.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"actor_id","type":"`string`","description":"The actor of the event, if there is any.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"group","type":"`object`","description":"The group that the event is for, such as an organization or team.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"type","type":"`string`","description":"The name of the group.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The group's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"properties","type":"`Record<string, any>`","description":"The properties of the actor. The format and content is dynamic and depends on the integrated provider.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="identify"/>
|
||||
<TypeList types={[{"name":"data","type":"[IdentifyAnalyticsEventDTO](../../../types/types/types.IdentifyAnalyticsEventDTO/page.mdx)","description":"The details of the actor or group.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"actor_id","type":"`string`","description":"The actor of the event, if there is any.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"group","type":"`object`","description":"The group that the event is for, such as an organization or team.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"type","type":"`string`","description":"The name of the group.","optional":false,"defaultValue":"","example":"\"organization\"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The group's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"properties","type":"`Record<string, any>`","description":"The properties of the actor. The format and content is dynamic and depends on the integrated provider.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="identify"/>
|
||||
|
||||
### Returns
|
||||
|
||||
@@ -140,7 +140,7 @@ await analyticsModuleService.track({
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[TrackAnalyticsEventDTO](../../../types/interfaces/types.TrackAnalyticsEventDTO/page.mdx)","description":"The event's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"event","type":"`string`","description":"The event name","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"actor_id","type":"`string`","description":"The actor of the event, if there is any","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"group","type":"`object`","description":"The group that the event is for, such as an organization or team.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"type","type":"`string`","description":"The name of the group.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The group's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"properties","type":"`Record<string, any>`","description":"The properties of the event. The format and content is dynamic and depends on the integrated provider.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="track"/>
|
||||
<TypeList types={[{"name":"data","type":"[TrackAnalyticsEventDTO](../../../types/interfaces/types.TrackAnalyticsEventDTO/page.mdx)","description":"The event's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"event","type":"`string`","description":"The event name","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"actor_id","type":"`string`","description":"The actor of the event, if there is any","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"group","type":"`object`","description":"The group that the event is for, such as an organization or team.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"type","type":"`string`","description":"The name of the group.","optional":true,"defaultValue":"","example":"\"organization\"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The group's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"properties","type":"`Record<string, any>`","description":"The properties of the event. The format and content is dynamic and depends on the integrated provider.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="track"/>
|
||||
|
||||
### Returns
|
||||
|
||||
|
||||
+2
-2
@@ -135,7 +135,7 @@ class MyAnalyticsProviderService extends AbstractAnalyticsProviderService {
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[IdentifyAnalyticsEventDTO](../../../types/types/types.IdentifyAnalyticsEventDTO/page.mdx)","description":"The details of the actor or group.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"actor_id","type":"`string`","description":"The actor of the event, if there is any.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"group","type":"`object`","description":"The group that the event is for, such as an organization or team.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"type","type":"`string`","description":"The name of the group.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The group's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"properties","type":"`Record<string, any>`","description":"The properties of the actor. The format and content is dynamic and depends on the integrated provider.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="identify"/>
|
||||
<TypeList types={[{"name":"data","type":"[IdentifyAnalyticsEventDTO](../../../types/types/types.IdentifyAnalyticsEventDTO/page.mdx)","description":"The details of the actor or group.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"actor_id","type":"`string`","description":"The actor of the event, if there is any.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"group","type":"`object`","description":"The group that the event is for, such as an organization or team.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"type","type":"`string`","description":"The name of the group.","optional":false,"defaultValue":"","example":"\"organization\"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The group's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"properties","type":"`Record<string, any>`","description":"The properties of the actor. The format and content is dynamic and depends on the integrated provider.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="identify"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -197,7 +197,7 @@ class MyAnalyticsProviderService extends AbstractAnalyticsProviderService {
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[TrackAnalyticsEventDTO](../../../types/interfaces/types.TrackAnalyticsEventDTO/page.mdx)","description":"The event's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"event","type":"`string`","description":"The event name","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"actor_id","type":"`string`","description":"The actor of the event, if there is any","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"group","type":"`object`","description":"The group that the event is for, such as an organization or team.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"type","type":"`string`","description":"The name of the group.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The group's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"properties","type":"`Record<string, any>`","description":"The properties of the event. The format and content is dynamic and depends on the integrated provider.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="track"/>
|
||||
<TypeList types={[{"name":"data","type":"[TrackAnalyticsEventDTO](../../../types/interfaces/types.TrackAnalyticsEventDTO/page.mdx)","description":"The event's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"event","type":"`string`","description":"The event name","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"actor_id","type":"`string`","description":"The actor of the event, if there is any","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"group","type":"`object`","description":"The group that the event is for, such as an organization or team.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"type","type":"`string`","description":"The name of the group.","optional":true,"defaultValue":"","example":"\"organization\"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The group's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"properties","type":"`Record<string, any>`","description":"The properties of the event. The format and content is dynamic and depends on the integrated provider.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="track"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
|
||||
+1
-1
@@ -12,4 +12,4 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Record","type":"`Record<string, [Message](../../../types/api_key.Message/page.mdx)[]>`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]},{"name":"Message[]","type":"[Message](../../../types/api_key.Message/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The event's name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"TData","description":"The data payload that subscribers receive. For example, the ID or IDs of the created user. (e.g. { id: \"123\" } or { ids: [\"123\", \"456\"] })","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[EventMetadata](../../../types/api_key.EventMetadata/page.mdx)","description":"Additional meadata to pass with the event.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"eventGroupId","type":"`string`","description":"The ID of the event's group. Grouped events are useful when you have distributed transactions\nwhere you need to explicitly group, release and clear events upon lifecycle events of a transaction.\n\nWhen set, you must release the grouped events using the Event Module's `releaseGroupedEvents` method to emit the events.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"options","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="getMessages"/>
|
||||
<TypeList types={[{"name":"Record","type":"`Record<string, [Message](../../../types/api_key.Message/page.mdx)[]>`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]},{"name":"Message[]","type":"[Message](../../../types/api_key.Message/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The event's name.","optional":false,"defaultValue":"","example":"user.created","expandable":false,"children":[]},{"name":"data","type":"TData","description":"The data payload that subscribers receive. For example, the ID or IDs of the created user. (e.g. { id: \"123\" } or { ids: [\"123\", \"456\"] })","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[EventMetadata](../../../types/api_key.EventMetadata/page.mdx)","description":"Additional meadata to pass with the event.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"eventGroupId","type":"`string`","description":"The ID of the event's group. Grouped events are useful when you have distributed transactions\nwhere you need to explicitly group, release and clear events upon lifecycle events of a transaction.\n\nWhen set, you must release the grouped events using the Event Module's `releaseGroupedEvents` method to emit the events.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"options","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="getMessages"/>
|
||||
+1
-1
@@ -8,4 +8,4 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"msg","type":"[Message](../../../types/api_key.Message/page.mdx) \\| [Message](../../../types/api_key.Message/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The event's name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"TData","description":"The data payload that subscribers receive. For example, the ID or IDs of the created user. (e.g. { id: \"123\" } or { ids: [\"123\", \"456\"] })","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[EventMetadata](../../../types/api_key.EventMetadata/page.mdx)","description":"Additional meadata to pass with the event.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"eventGroupId","type":"`string`","description":"The ID of the event's group. Grouped events are useful when you have distributed transactions\nwhere you need to explicitly group, release and clear events upon lifecycle events of a transaction.\n\nWhen set, you must release the grouped events using the Event Module's `releaseGroupedEvents` method to emit the events.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"options","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="save"/>
|
||||
<TypeList types={[{"name":"msg","type":"[Message](../../../types/api_key.Message/page.mdx) \\| [Message](../../../types/api_key.Message/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The event's name.","optional":false,"defaultValue":"","example":"user.created","expandable":false,"children":[]},{"name":"data","type":"TData","description":"The data payload that subscribers receive. For example, the ID or IDs of the created user. (e.g. { id: \"123\" } or { ids: [\"123\", \"456\"] })","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[EventMetadata](../../../types/api_key.EventMetadata/page.mdx)","description":"Additional meadata to pass with the event.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"eventGroupId","type":"`string`","description":"The ID of the event's group. Grouped events are useful when you have distributed transactions\nwhere you need to explicitly group, release and clear events upon lifecycle events of a transaction.\n\nWhen set, you must release the grouped events using the Event Module's `releaseGroupedEvents` method to emit the events.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"options","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="save"/>
|
||||
@@ -8,4 +8,4 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
**Event**: `Object`
|
||||
|
||||
<TypeList types={[{"name":"name","type":"`string`","description":"The event's name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"TData","description":"The data payload that subscribers receive. For example, the ID or IDs of the created user. (e.g. { id: \"123\" } or { ids: [\"123\", \"456\"] })","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[EventMetadata](../api_key.EventMetadata/page.mdx)","description":"Additional meadata to pass with the event.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"eventGroupId","type":"`string`","description":"The ID of the event's group. Grouped events are useful when you have distributed transactions\nwhere you need to explicitly group, release and clear events upon lifecycle events of a transaction.\n\nWhen set, you must release the grouped events using the Event Module's `releaseGroupedEvents` method to emit the events.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="Event"/>
|
||||
<TypeList types={[{"name":"name","type":"`string`","description":"The event's name.","optional":false,"defaultValue":"","example":"user.created","expandable":false,"children":[]},{"name":"data","type":"TData","description":"The data payload that subscribers receive. For example, the ID or IDs of the created user. (e.g. { id: \"123\" } or { ids: [\"123\", \"456\"] })","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[EventMetadata](../api_key.EventMetadata/page.mdx)","description":"Additional meadata to pass with the event.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"eventGroupId","type":"`string`","description":"The ID of the event's group. Grouped events are useful when you have distributed transactions\nwhere you need to explicitly group, release and clear events upon lifecycle events of a transaction.\n\nWhen set, you must release the grouped events using the Event Module's `releaseGroupedEvents` method to emit the events.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="Event"/>
|
||||
+1
-1
@@ -10,6 +10,6 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
This documentation provides a reference to the ApiKey data model. It belongs to the API Key Module.
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/modules/api-key/src/models/api-key.ts#L3" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/modules/api-key/src/models/api-key.ts#L3" />
|
||||
|
||||
<TypeList types={[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the API key.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"token","type":"`TextProperty`","description":"The token of the API key","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"salt","type":"`TextProperty`","description":"Salt used to create the API key token.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"redacted","type":"`TextProperty`","description":"The redacted form of the api key's token. this is useful when showing portion of the token.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`TextProperty`","description":"The title of the API key","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"EnumProperty<[\"publishable\", \"secret\"]>","description":"The type of the API key. Can be `secret` or `publishable`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`TextProperty`","description":"The ID of the user that created the API key","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"last_used_at","type":"`DateTimeProperty`","description":"The date the API key was last used.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"revoked_by","type":"`TextProperty`","description":"The ID of the user that revoked the API key","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"revoked_at","type":"`DateTimeProperty`","description":"The date the API key was revoked.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="ApiKey"/>
|
||||
+1
-1
@@ -12,4 +12,4 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Record","type":"`Record<string, [Message](../../../types/auth.Message/page.mdx)[]>`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]},{"name":"Message[]","type":"[Message](../../../types/auth.Message/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The event's name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"TData","description":"The data payload that subscribers receive. For example, the ID or IDs of the created user. (e.g. { id: \"123\" } or { ids: [\"123\", \"456\"] })","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[EventMetadata](../../../types/auth.EventMetadata/page.mdx)","description":"Additional meadata to pass with the event.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"eventGroupId","type":"`string`","description":"The ID of the event's group. Grouped events are useful when you have distributed transactions\nwhere you need to explicitly group, release and clear events upon lifecycle events of a transaction.\n\nWhen set, you must release the grouped events using the Event Module's `releaseGroupedEvents` method to emit the events.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"options","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="getMessages"/>
|
||||
<TypeList types={[{"name":"Record","type":"`Record<string, [Message](../../../types/auth.Message/page.mdx)[]>`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]},{"name":"Message[]","type":"[Message](../../../types/auth.Message/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The event's name.","optional":false,"defaultValue":"","example":"user.created","expandable":false,"children":[]},{"name":"data","type":"TData","description":"The data payload that subscribers receive. For example, the ID or IDs of the created user. (e.g. { id: \"123\" } or { ids: [\"123\", \"456\"] })","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[EventMetadata](../../../types/auth.EventMetadata/page.mdx)","description":"Additional meadata to pass with the event.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"eventGroupId","type":"`string`","description":"The ID of the event's group. Grouped events are useful when you have distributed transactions\nwhere you need to explicitly group, release and clear events upon lifecycle events of a transaction.\n\nWhen set, you must release the grouped events using the Event Module's `releaseGroupedEvents` method to emit the events.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"options","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="getMessages"/>
|
||||
+1
-1
@@ -8,4 +8,4 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"msg","type":"[Message](../../../types/auth.Message/page.mdx) \\| [Message](../../../types/auth.Message/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The event's name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"TData","description":"The data payload that subscribers receive. For example, the ID or IDs of the created user. (e.g. { id: \"123\" } or { ids: [\"123\", \"456\"] })","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[EventMetadata](../../../types/auth.EventMetadata/page.mdx)","description":"Additional meadata to pass with the event.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"eventGroupId","type":"`string`","description":"The ID of the event's group. Grouped events are useful when you have distributed transactions\nwhere you need to explicitly group, release and clear events upon lifecycle events of a transaction.\n\nWhen set, you must release the grouped events using the Event Module's `releaseGroupedEvents` method to emit the events.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"options","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="save"/>
|
||||
<TypeList types={[{"name":"msg","type":"[Message](../../../types/auth.Message/page.mdx) \\| [Message](../../../types/auth.Message/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The event's name.","optional":false,"defaultValue":"","example":"user.created","expandable":false,"children":[]},{"name":"data","type":"TData","description":"The data payload that subscribers receive. For example, the ID or IDs of the created user. (e.g. { id: \"123\" } or { ids: [\"123\", \"456\"] })","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[EventMetadata](../../../types/auth.EventMetadata/page.mdx)","description":"Additional meadata to pass with the event.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"eventGroupId","type":"`string`","description":"The ID of the event's group. Grouped events are useful when you have distributed transactions\nwhere you need to explicitly group, release and clear events upon lifecycle events of a transaction.\n\nWhen set, you must release the grouped events using the Event Module's `releaseGroupedEvents` method to emit the events.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"options","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="save"/>
|
||||
@@ -8,4 +8,4 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
**Event**: `Object`
|
||||
|
||||
<TypeList types={[{"name":"name","type":"`string`","description":"The event's name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"TData","description":"The data payload that subscribers receive. For example, the ID or IDs of the created user. (e.g. { id: \"123\" } or { ids: [\"123\", \"456\"] })","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[EventMetadata](../auth.EventMetadata/page.mdx)","description":"Additional meadata to pass with the event.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"eventGroupId","type":"`string`","description":"The ID of the event's group. Grouped events are useful when you have distributed transactions\nwhere you need to explicitly group, release and clear events upon lifecycle events of a transaction.\n\nWhen set, you must release the grouped events using the Event Module's `releaseGroupedEvents` method to emit the events.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="Event"/>
|
||||
<TypeList types={[{"name":"name","type":"`string`","description":"The event's name.","optional":false,"defaultValue":"","example":"user.created","expandable":false,"children":[]},{"name":"data","type":"TData","description":"The data payload that subscribers receive. For example, the ID or IDs of the created user. (e.g. { id: \"123\" } or { ids: [\"123\", \"456\"] })","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[EventMetadata](../auth.EventMetadata/page.mdx)","description":"Additional meadata to pass with the event.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"eventGroupId","type":"`string`","description":"The ID of the event's group. Grouped events are useful when you have distributed transactions\nwhere you need to explicitly group, release and clear events upon lifecycle events of a transaction.\n\nWhen set, you must release the grouped events using the Event Module's `releaseGroupedEvents` method to emit the events.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="Event"/>
|
||||
+1
-1
@@ -10,6 +10,6 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
This documentation provides a reference to the AuthIdentity data model. It belongs to the Auth Module.
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/modules/auth/src/models/auth-identity.ts#L4" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/modules/auth/src/models/auth-identity.ts#L4" />
|
||||
|
||||
<TypeList types={[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the auth identity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_identities","type":"HasMany<[ProviderIdentity](../auth_models.ProviderIdentity/page.mdx)>","description":"The associated `ProviderIdentity` records.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the provider identity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity_id","type":"`TextProperty`","description":"The entity ID of the provider identity","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"`TextProperty`","description":"The ID of the provider that created this identity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"auth_identity","type":"BelongsTo<[AuthIdentity](./page.mdx)>","description":"The associated `AuthIdentity`.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the auth identity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_identities","type":"HasMany<[ProviderIdentity](../auth_models.ProviderIdentity/page.mdx)>","description":"The associated `ProviderIdentity` records.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"app_metadata","type":"`JSONProperty`","description":"The app metadata of the auth identity","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"user_metadata","type":"`JSONProperty`","description":"The user metadata of the provider identity.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_metadata","type":"`JSONProperty`","description":"The provider metadata of the provider identity.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"app_metadata","type":"`JSONProperty`","description":"The app metadata of the auth identity","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="AuthIdentity"/>
|
||||
+1
-1
@@ -10,6 +10,6 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
This documentation provides a reference to the ProviderIdentity data model. It belongs to the Auth Module.
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/modules/auth/src/models/provider-identity.ts#L4" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/modules/auth/src/models/provider-identity.ts#L4" />
|
||||
|
||||
<TypeList types={[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the provider identity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity_id","type":"`TextProperty`","description":"The entity ID of the provider identity","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"`TextProperty`","description":"The ID of the provider that created this identity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"auth_identity","type":"BelongsTo<[AuthIdentity](../auth_models.AuthIdentity/page.mdx)>","description":"The associated `AuthIdentity`.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the auth identity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_identities","type":"HasMany<[ProviderIdentity](./page.mdx)>","description":"The associated `ProviderIdentity` records.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the provider identity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity_id","type":"`TextProperty`","description":"The entity ID of the provider identity","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"`TextProperty`","description":"The ID of the provider that created this identity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"auth_identity","type":"BelongsTo<[AuthIdentity](../auth_models.AuthIdentity/page.mdx)>","description":"The associated `AuthIdentity`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"user_metadata","type":"`JSONProperty`","description":"The user metadata of the provider identity.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_metadata","type":"`JSONProperty`","description":"The provider metadata of the provider identity.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"app_metadata","type":"`JSONProperty`","description":"The app metadata of the auth identity","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"user_metadata","type":"`JSONProperty`","description":"The user metadata of the provider identity.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_metadata","type":"`JSONProperty`","description":"The provider metadata of the provider identity.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="ProviderIdentity"/>
|
||||
+1
-1
@@ -12,4 +12,4 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Record","type":"`Record<string, [Message](../../../types/cart.Message/page.mdx)[]>`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]},{"name":"Message[]","type":"[Message](../../../types/cart.Message/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The event's name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"TData","description":"The data payload that subscribers receive. For example, the ID or IDs of the created user. (e.g. { id: \"123\" } or { ids: [\"123\", \"456\"] })","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[EventMetadata](../../../types/cart.EventMetadata/page.mdx)","description":"Additional meadata to pass with the event.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"eventGroupId","type":"`string`","description":"The ID of the event's group. Grouped events are useful when you have distributed transactions\nwhere you need to explicitly group, release and clear events upon lifecycle events of a transaction.\n\nWhen set, you must release the grouped events using the Event Module's `releaseGroupedEvents` method to emit the events.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"options","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="getMessages"/>
|
||||
<TypeList types={[{"name":"Record","type":"`Record<string, [Message](../../../types/cart.Message/page.mdx)[]>`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]},{"name":"Message[]","type":"[Message](../../../types/cart.Message/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The event's name.","optional":false,"defaultValue":"","example":"user.created","expandable":false,"children":[]},{"name":"data","type":"TData","description":"The data payload that subscribers receive. For example, the ID or IDs of the created user. (e.g. { id: \"123\" } or { ids: [\"123\", \"456\"] })","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[EventMetadata](../../../types/cart.EventMetadata/page.mdx)","description":"Additional meadata to pass with the event.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"eventGroupId","type":"`string`","description":"The ID of the event's group. Grouped events are useful when you have distributed transactions\nwhere you need to explicitly group, release and clear events upon lifecycle events of a transaction.\n\nWhen set, you must release the grouped events using the Event Module's `releaseGroupedEvents` method to emit the events.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"options","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="getMessages"/>
|
||||
+1
-1
@@ -8,4 +8,4 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"msg","type":"[Message](../../../types/cart.Message/page.mdx) \\| [Message](../../../types/cart.Message/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The event's name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"TData","description":"The data payload that subscribers receive. For example, the ID or IDs of the created user. (e.g. { id: \"123\" } or { ids: [\"123\", \"456\"] })","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[EventMetadata](../../../types/cart.EventMetadata/page.mdx)","description":"Additional meadata to pass with the event.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"eventGroupId","type":"`string`","description":"The ID of the event's group. Grouped events are useful when you have distributed transactions\nwhere you need to explicitly group, release and clear events upon lifecycle events of a transaction.\n\nWhen set, you must release the grouped events using the Event Module's `releaseGroupedEvents` method to emit the events.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"options","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="save"/>
|
||||
<TypeList types={[{"name":"msg","type":"[Message](../../../types/cart.Message/page.mdx) \\| [Message](../../../types/cart.Message/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The event's name.","optional":false,"defaultValue":"","example":"user.created","expandable":false,"children":[]},{"name":"data","type":"TData","description":"The data payload that subscribers receive. For example, the ID or IDs of the created user. (e.g. { id: \"123\" } or { ids: [\"123\", \"456\"] })","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[EventMetadata](../../../types/cart.EventMetadata/page.mdx)","description":"Additional meadata to pass with the event.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"eventGroupId","type":"`string`","description":"The ID of the event's group. Grouped events are useful when you have distributed transactions\nwhere you need to explicitly group, release and clear events upon lifecycle events of a transaction.\n\nWhen set, you must release the grouped events using the Event Module's `releaseGroupedEvents` method to emit the events.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"options","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="save"/>
|
||||
@@ -8,4 +8,4 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
**Event**: `Object`
|
||||
|
||||
<TypeList types={[{"name":"name","type":"`string`","description":"The event's name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"TData","description":"The data payload that subscribers receive. For example, the ID or IDs of the created user. (e.g. { id: \"123\" } or { ids: [\"123\", \"456\"] })","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[EventMetadata](../cart.EventMetadata/page.mdx)","description":"Additional meadata to pass with the event.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"eventGroupId","type":"`string`","description":"The ID of the event's group. Grouped events are useful when you have distributed transactions\nwhere you need to explicitly group, release and clear events upon lifecycle events of a transaction.\n\nWhen set, you must release the grouped events using the Event Module's `releaseGroupedEvents` method to emit the events.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="Event"/>
|
||||
<TypeList types={[{"name":"name","type":"`string`","description":"The event's name.","optional":false,"defaultValue":"","example":"user.created","expandable":false,"children":[]},{"name":"data","type":"TData","description":"The data payload that subscribers receive. For example, the ID or IDs of the created user. (e.g. { id: \"123\" } or { ids: [\"123\", \"456\"] })","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[EventMetadata](../cart.EventMetadata/page.mdx)","description":"Additional meadata to pass with the event.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"eventGroupId","type":"`string`","description":"The ID of the event's group. Grouped events are useful when you have distributed transactions\nwhere you need to explicitly group, release and clear events upon lifecycle events of a transaction.\n\nWhen set, you must release the grouped events using the Event Module's `releaseGroupedEvents` method to emit the events.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="Event"/>
|
||||
@@ -10,6 +10,6 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
This documentation provides a reference to the Address data model. It belongs to the Cart Module.
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/modules/cart/src/models/address.ts#L3" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/modules/cart/src/models/address.ts#L3" />
|
||||
|
||||
<TypeList types={[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`TextProperty`","description":"The ID of the customer that the address belongs to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`TextProperty`","description":"The company of the address","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`TextProperty`","description":"The first name of the address","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`TextProperty`","description":"The last name of the address","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`TextProperty`","description":"The first line of the address","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`TextProperty`","description":"The second line of the address","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`TextProperty`","description":"The city of the address","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`TextProperty`","description":"The ISO 2 country code of the address. For example, `us`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`TextProperty`","description":"The province of the address","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`TextProperty`","description":"The postal code of the address","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`TextProperty`","description":"The phone of the address","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`JSONProperty`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="Address"/>
|
||||
@@ -10,6 +10,6 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
This documentation provides a reference to the Cart data model. It belongs to the Cart Module.
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/modules/cart/src/models/cart.ts#L7" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/modules/cart/src/models/cart.ts#L7" />
|
||||
|
||||
<TypeList types={[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`TextProperty`","description":"The ISO 3 currency code of the cart, such as `usd`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"HasMany<[LineItem](../cart_models.LineItem/page.mdx)>","description":"The associated items.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`TextProperty`","description":"The title of the line item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`NumberProperty`","description":"The quantity of the line item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"requires_shipping","type":"`BooleanProperty`","description":"Whether the line item requires shipping.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_discountable","type":"`BooleanProperty`","description":"Whether the line item is discountable.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_giftcard","type":"`BooleanProperty`","description":"Whether the line item is a giftcard.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`BooleanProperty`","description":"Whether the line item's price is tax inclusive.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_custom_price","type":"`BooleanProperty`","description":"Whether the line item's price is custom.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"unit_price","type":"`BigNumberProperty`","description":"The unit price of the line item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"adjustments","type":"HasMany<[LineItemAdjustment](../cart_models.LineItemAdjustment/page.mdx)>","description":"The associated adjustments.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the line item adjustment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`BigNumberProperty`","description":"The amount of the line item adjustment","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`BooleanProperty`","description":"Whether the line item adjustment is tax inclusive.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item","type":"BelongsTo<[LineItem](../cart_models.LineItem/page.mdx)>","description":"The associated line item.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"description","type":"`TextProperty`","description":"The description of the line item adjustment","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`TextProperty`","description":"The code of promotion that applied the adjustment","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`TextProperty`","description":"The ID of the external provider that the adjustment is related to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotion_id","type":"`TextProperty`","description":"The ID of the applied promotion.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`JSONProperty`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"tax_lines","type":"HasMany<[LineItemTaxLine](../cart_models.LineItemTaxLine/page.mdx)>","description":"The associated tax\\_lines.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the line item tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`TextProperty`","description":"The code of the applied tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`FloatProperty`","description":"The rate of the applied tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item","type":"BelongsTo<[LineItem](../cart_models.LineItem/page.mdx)>","description":"The associated line item.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"description","type":"`TextProperty`","description":"The description of the line item tax line","optional":true,"defaultValue":"","expandableLine truncated
|
||||
<TypeList types={[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`TextProperty`","description":"The ISO 3 currency code of the cart, such as `usd`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"HasMany<[LineItem](../cart_models.LineItem/page.mdx)>","description":"The associated items.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`TextProperty`","description":"The title of the line item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`NumberProperty`","description":"The quantity of the line item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"requires_shipping","type":"`BooleanProperty`","description":"Whether the line item requires shipping.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_discountable","type":"`BooleanProperty`","description":"Whether the line item is discountable.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_giftcard","type":"`BooleanProperty`","description":"Whether the line item is a giftcard.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`BooleanProperty`","description":"Whether the line item's price is tax inclusive.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_custom_price","type":"`BooleanProperty`","description":"Whether the line item's price is custom.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"unit_price","type":"`BigNumberProperty`","description":"The unit price of the line item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"adjustments","type":"HasMany<[LineItemAdjustment](../cart_models.LineItemAdjustment/page.mdx)>","description":"The associated adjustments.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the line item adjustment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`BigNumberProperty`","description":"The amount of the line item adjustment","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`BooleanProperty`","description":"Whether the line item adjustment is tax inclusive.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item","type":"BelongsTo<[LineItem](../cart_models.LineItem/page.mdx)>","description":"The associated line item.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"description","type":"`TextProperty`","description":"The description of the line item adjustment","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`TextProperty`","description":"The code of promotion that applied the adjustment","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`TextProperty`","description":"The ID of the external provider that the adjustment is related to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotion_id","type":"`TextProperty`","description":"The ID of the applied promotion.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`JSONProperty`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"tax_lines","type":"HasMany<[LineItemTaxLine](../cart_models.LineItemTaxLine/page.mdx)>","description":"The associated tax\\_lines.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the line item tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`TextProperty`","description":"The code of the applied tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`FloatProperty`","description":"The rate of the applied tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item","type":"BelongsTo<[LineItem](../cart_models.LineItem/page.mdx)>","description":"The associated line item.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"description","type":"`TextProperty`","description":"The description of the line item tax line","optional":true,"defaultValue":"","expandableLine truncated
|
||||
@@ -10,6 +10,6 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
This documentation provides a reference to the CreditLine data model. It belongs to the Cart Module.
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/modules/cart/src/models/credit-line.ts#L4" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/modules/cart/src/models/credit-line.ts#L4" />
|
||||
|
||||
<TypeList types={[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the credit line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart","type":"BelongsTo<[Cart](../cart_models.Cart/page.mdx)>","description":"The associated cart.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`TextProperty`","description":"The ISO 3 currency code of the cart, such as `usd`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"HasMany<[LineItem](../cart_models.LineItem/page.mdx)>","description":"The associated items.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`TextProperty`","description":"The title of the line item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`NumberProperty`","description":"The quantity of the line item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"requires_shipping","type":"`BooleanProperty`","description":"Whether the line item requires shipping.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_discountable","type":"`BooleanProperty`","description":"Whether the line item is discountable.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_giftcard","type":"`BooleanProperty`","description":"Whether the line item is a giftcard.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`BooleanProperty`","description":"Whether the line item's price is tax inclusive.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_custom_price","type":"`BooleanProperty`","description":"Whether the line item's price is custom.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"unit_price","type":"`BigNumberProperty`","description":"The unit price of the line item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"adjustments","type":"HasMany<[LineItemAdjustment](../cart_models.LineItemAdjustment/page.mdx)>","description":"The associated adjustments.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"tax_lines","type":"HasMany<[LineItemTaxLine](../cart_models.LineItemTaxLine/page.mdx)>","description":"The associated tax\\_lines.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"cart","type":"BelongsTo<[Cart](../cart_models.Cart/page.mdx)>","description":"The associated cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"subtitle","type":"`TextProperty`","description":"The subtitle of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`TextProperty`","description":"The thumbnail URL of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_id","type":"`TextProperty`","description":"The ID of the variant added to the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`TextProperty`","description":"The ID of the product added to the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_title","type":"`TextProperty`","description":"The title of the line item's product","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_description","type":"`TextProperty`","description":"The description of the line item's product","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_subtitle","type":"`TextProperty`","description":"The subtitle of the line item's product","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_type","type":"`TextProperty`","description":"The type of the line item's product","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_type_id","type":"`TextProperty`","description":"The ID of the type of the line item's product","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_collection","type":"`TextProperty`","description":"The collection of the line item's product","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_handle","type":"`TextProperty`","description":"The unique handle of the line item's product","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_sku","tLine truncated
|
||||
<TypeList types={[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the credit line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart","type":"BelongsTo<[Cart](../cart_models.Cart/page.mdx)>","description":"The associated cart.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`TextProperty`","description":"The ISO 3 currency code of the cart, such as `usd`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"HasMany<[LineItem](../cart_models.LineItem/page.mdx)>","description":"The associated items.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`TextProperty`","description":"The title of the line item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`NumberProperty`","description":"The quantity of the line item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"requires_shipping","type":"`BooleanProperty`","description":"Whether the line item requires shipping.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_discountable","type":"`BooleanProperty`","description":"Whether the line item is discountable.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_giftcard","type":"`BooleanProperty`","description":"Whether the line item is a giftcard.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`BooleanProperty`","description":"Whether the line item's price is tax inclusive.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_custom_price","type":"`BooleanProperty`","description":"Whether the line item's price is custom.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"unit_price","type":"`BigNumberProperty`","description":"The unit price of the line item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"adjustments","type":"HasMany<[LineItemAdjustment](../cart_models.LineItemAdjustment/page.mdx)>","description":"The associated adjustments.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"tax_lines","type":"HasMany<[LineItemTaxLine](../cart_models.LineItemTaxLine/page.mdx)>","description":"The associated tax\\_lines.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"cart","type":"BelongsTo<[Cart](../cart_models.Cart/page.mdx)>","description":"The associated cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"subtitle","type":"`TextProperty`","description":"The subtitle of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`TextProperty`","description":"The thumbnail URL of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_id","type":"`TextProperty`","description":"The ID of the variant added to the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`TextProperty`","description":"The ID of the product added to the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_title","type":"`TextProperty`","description":"The title of the line item's product","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_description","type":"`TextProperty`","description":"The description of the line item's product","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_subtitle","type":"`TextProperty`","description":"The subtitle of the line item's product","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_type","type":"`TextProperty`","description":"The type of the line item's product","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_type_id","type":"`TextProperty`","description":"The ID of the type of the line item's product","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_collection","type":"`TextProperty`","description":"The collection of the line item's product","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_handle","type":"`TextProperty`","description":"The unique handle of the line item's product","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_sku","tLine truncated
|
||||
@@ -10,6 +10,6 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
This documentation provides a reference to the LineItem data model. It belongs to the Cart Module.
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/modules/cart/src/models/line-item.ts#L6" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/modules/cart/src/models/line-item.ts#L6" />
|
||||
|
||||
<TypeList types={[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`TextProperty`","description":"The title of the line item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`NumberProperty`","description":"The quantity of the line item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"requires_shipping","type":"`BooleanProperty`","description":"Whether the line item requires shipping.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_discountable","type":"`BooleanProperty`","description":"Whether the line item is discountable.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_giftcard","type":"`BooleanProperty`","description":"Whether the line item is a giftcard.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`BooleanProperty`","description":"Whether the line item's price is tax inclusive.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_custom_price","type":"`BooleanProperty`","description":"Whether the line item's price is custom.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"unit_price","type":"`BigNumberProperty`","description":"The unit price of the line item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"adjustments","type":"HasMany<[LineItemAdjustment](../cart_models.LineItemAdjustment/page.mdx)>","description":"The associated adjustments.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the line item adjustment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`BigNumberProperty`","description":"The amount of the line item adjustment","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`BooleanProperty`","description":"Whether the line item adjustment is tax inclusive.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item","type":"BelongsTo<[LineItem](./page.mdx)>","description":"The associated line item.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`TextProperty`","description":"The title of the line item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`NumberProperty`","description":"The quantity of the line item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"requires_shipping","type":"`BooleanProperty`","description":"Whether the line item requires shipping.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_discountable","type":"`BooleanProperty`","description":"Whether the line item is discountable.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_giftcard","type":"`BooleanProperty`","description":"Whether the line item is a giftcard.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`BooleanProperty`","description":"Whether the line item's price is tax inclusive.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_custom_price","type":"`BooleanProperty`","description":"Whether the line item's price is custom.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"unit_price","type":"`BigNumberProperty`","description":"The unit price of the line item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"adjustments","type":"HasMany<[LineItemAdjustment](../cart_models.LineItemAdjustment/page.mdx)>","description":"The associated adjustments.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"tax_lines","type":"HasMany<[LineItemTaxLine](../cart_models.LineItemTaxLine/page.mdx)>","description":"The associated tax\\_lines.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"cart","type":"BelongsTo<[Cart](../cart_models.Cart/page.mdx)>","description":"The associated cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"subtitle","type":"`TextProperty`","description":"The subtitle of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`TextProperty`","description":"The thumbnail URL of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name"Line truncated
|
||||
<TypeList types={[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`TextProperty`","description":"The title of the line item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`NumberProperty`","description":"The quantity of the line item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"requires_shipping","type":"`BooleanProperty`","description":"Whether the line item requires shipping.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_discountable","type":"`BooleanProperty`","description":"Whether the line item is discountable.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_giftcard","type":"`BooleanProperty`","description":"Whether the line item is a giftcard.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`BooleanProperty`","description":"Whether the line item's price is tax inclusive.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_custom_price","type":"`BooleanProperty`","description":"Whether the line item's price is custom.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"unit_price","type":"`BigNumberProperty`","description":"The unit price of the line item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"adjustments","type":"HasMany<[LineItemAdjustment](../cart_models.LineItemAdjustment/page.mdx)>","description":"The associated adjustments.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the line item adjustment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`BigNumberProperty`","description":"The amount of the line item adjustment","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`BooleanProperty`","description":"Whether the line item adjustment is tax inclusive.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item","type":"BelongsTo<[LineItem](./page.mdx)>","description":"The associated line item.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`TextProperty`","description":"The title of the line item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`NumberProperty`","description":"The quantity of the line item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"requires_shipping","type":"`BooleanProperty`","description":"Whether the line item requires shipping.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_discountable","type":"`BooleanProperty`","description":"Whether the line item is discountable.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_giftcard","type":"`BooleanProperty`","description":"Whether the line item is a giftcard.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`BooleanProperty`","description":"Whether the line item's price is tax inclusive.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_custom_price","type":"`BooleanProperty`","description":"Whether the line item's price is custom.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"unit_price","type":"`BigNumberProperty`","description":"The unit price of the line item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"adjustments","type":"HasMany<[LineItemAdjustment](../cart_models.LineItemAdjustment/page.mdx)>","description":"The associated adjustments.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"tax_lines","type":"HasMany<[LineItemTaxLine](../cart_models.LineItemTaxLine/page.mdx)>","description":"The associated tax\\_lines.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"cart","type":"BelongsTo<[Cart](../cart_models.Cart/page.mdx)>","description":"The associated cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"subtitle","type":"`TextProperty`","description":"The subtitle of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`TextProperty`","description":"The thumbnail URL of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name"Line truncated
|
||||
+2
-2
@@ -10,6 +10,6 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
This documentation provides a reference to the LineItemAdjustment data model. It belongs to the Cart Module.
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/modules/cart/src/models/line-item-adjustment.ts#L4" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/modules/cart/src/models/line-item-adjustment.ts#L4" />
|
||||
|
||||
<TypeList types={[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the line item adjustment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`BigNumberProperty`","description":"The amount of the line item adjustment","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`BooleanProperty`","description":"Whether the line item adjustment is tax inclusive.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item","type":"BelongsTo<[LineItem](../cart_models.LineItem/page.mdx)>","description":"The associated line item.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`TextProperty`","description":"The title of the line item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`NumberProperty`","description":"The quantity of the line item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"requires_shipping","type":"`BooleanProperty`","description":"Whether the line item requires shipping.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_discountable","type":"`BooleanProperty`","description":"Whether the line item is discountable.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_giftcard","type":"`BooleanProperty`","description":"Whether the line item is a giftcard.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`BooleanProperty`","description":"Whether the line item's price is tax inclusive.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_custom_price","type":"`BooleanProperty`","description":"Whether the line item's price is custom.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"unit_price","type":"`BigNumberProperty`","description":"The unit price of the line item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"adjustments","type":"HasMany<[LineItemAdjustment](./page.mdx)>","description":"The associated adjustments.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the line item adjustment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`BigNumberProperty`","description":"The amount of the line item adjustment","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`BooleanProperty`","description":"Whether the line item adjustment is tax inclusive.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item","type":"BelongsTo<[LineItem](../cart_models.LineItem/page.mdx)>","description":"The associated line item.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"description","type":"`TextProperty`","description":"The description of the line item adjustment","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`TextProperty`","description":"The code of promotion that applied the adjustment","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`TextProperty`","description":"The ID of the external provider that the adjustment is related to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotion_id","type":"`TextProperty`","description":"The ID of the applied promotion.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`JSONProperty`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"tax_lines","type":"HasMany<[LineItemTaxLine](../cart_models.LineItemTaxLine/page.mdx)>","description":"The associated tax\\_lines.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the line item tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`TextProperty`","description":"The code of the applied tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`FloatProperty`","description":"The rate of the applied tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item","type":"BelongsTo<[LineItem](../cart_models.LineItem/page.mdx)>","description":"The associated line item.","optional":false,"defaultValue":"","expandable":true,Line truncated
|
||||
<TypeList types={[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the line item adjustment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`BigNumberProperty`","description":"The amount of the line item adjustment","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`BooleanProperty`","description":"Whether the line item adjustment is tax inclusive.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item","type":"BelongsTo<[LineItem](../cart_models.LineItem/page.mdx)>","description":"The associated line item.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`TextProperty`","description":"The title of the line item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`NumberProperty`","description":"The quantity of the line item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"requires_shipping","type":"`BooleanProperty`","description":"Whether the line item requires shipping.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_discountable","type":"`BooleanProperty`","description":"Whether the line item is discountable.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_giftcard","type":"`BooleanProperty`","description":"Whether the line item is a giftcard.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`BooleanProperty`","description":"Whether the line item's price is tax inclusive.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_custom_price","type":"`BooleanProperty`","description":"Whether the line item's price is custom.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"unit_price","type":"`BigNumberProperty`","description":"The unit price of the line item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"adjustments","type":"HasMany<[LineItemAdjustment](./page.mdx)>","description":"The associated adjustments.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the line item adjustment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`BigNumberProperty`","description":"The amount of the line item adjustment","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`BooleanProperty`","description":"Whether the line item adjustment is tax inclusive.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item","type":"BelongsTo<[LineItem](../cart_models.LineItem/page.mdx)>","description":"The associated line item.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"description","type":"`TextProperty`","description":"The description of the line item adjustment","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`TextProperty`","description":"The code of promotion that applied the adjustment","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`TextProperty`","description":"The ID of the external provider that the adjustment is related to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotion_id","type":"`TextProperty`","description":"The ID of the applied promotion.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`JSONProperty`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"tax_lines","type":"HasMany<[LineItemTaxLine](../cart_models.LineItemTaxLine/page.mdx)>","description":"The associated tax\\_lines.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the line item tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`TextProperty`","description":"The code of the applied tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`FloatProperty`","description":"The rate of the applied tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item","type":"BelongsTo<[LineItem](../cart_models.LineItem/page.mdx)>","description":"The associated line item.","optional":false,"defaultValue":"","expandable":true,Line truncated
|
||||
+2
-2
@@ -10,6 +10,6 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
This documentation provides a reference to the LineItemTaxLine data model. It belongs to the Cart Module.
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/modules/cart/src/models/line-item-tax-line.ts#L4" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/modules/cart/src/models/line-item-tax-line.ts#L4" />
|
||||
|
||||
<TypeList types={[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the line item tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`TextProperty`","description":"The code of the applied tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`FloatProperty`","description":"The rate of the applied tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item","type":"BelongsTo<[LineItem](../cart_models.LineItem/page.mdx)>","description":"The associated line item.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`TextProperty`","description":"The title of the line item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`NumberProperty`","description":"The quantity of the line item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"requires_shipping","type":"`BooleanProperty`","description":"Whether the line item requires shipping.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_discountable","type":"`BooleanProperty`","description":"Whether the line item is discountable.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_giftcard","type":"`BooleanProperty`","description":"Whether the line item is a giftcard.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`BooleanProperty`","description":"Whether the line item's price is tax inclusive.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_custom_price","type":"`BooleanProperty`","description":"Whether the line item's price is custom.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"unit_price","type":"`BigNumberProperty`","description":"The unit price of the line item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"adjustments","type":"HasMany<[LineItemAdjustment](../cart_models.LineItemAdjustment/page.mdx)>","description":"The associated adjustments.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the line item adjustment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`BigNumberProperty`","description":"The amount of the line item adjustment","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`BooleanProperty`","description":"Whether the line item adjustment is tax inclusive.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item","type":"BelongsTo<[LineItem](../cart_models.LineItem/page.mdx)>","description":"The associated line item.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"description","type":"`TextProperty`","description":"The description of the line item adjustment","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`TextProperty`","description":"The code of promotion that applied the adjustment","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`TextProperty`","description":"The ID of the external provider that the adjustment is related to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotion_id","type":"`TextProperty`","description":"The ID of the applied promotion.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`JSONProperty`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"tax_lines","type":"HasMany<[LineItemTaxLine](./page.mdx)>","description":"The associated tax\\_lines.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the line item tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`TextProperty`","description":"The code of the applied tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`FloatProperty`","description":"The rate of the applied tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item","type":"BelongsTo<[LineItem](../cart_models.LineItem/page.mdx)>","description":"The associated line item.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"description","typeLine truncated
|
||||
<TypeList types={[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the line item tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`TextProperty`","description":"The code of the applied tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`FloatProperty`","description":"The rate of the applied tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item","type":"BelongsTo<[LineItem](../cart_models.LineItem/page.mdx)>","description":"The associated line item.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`TextProperty`","description":"The title of the line item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`NumberProperty`","description":"The quantity of the line item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"requires_shipping","type":"`BooleanProperty`","description":"Whether the line item requires shipping.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_discountable","type":"`BooleanProperty`","description":"Whether the line item is discountable.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_giftcard","type":"`BooleanProperty`","description":"Whether the line item is a giftcard.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`BooleanProperty`","description":"Whether the line item's price is tax inclusive.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_custom_price","type":"`BooleanProperty`","description":"Whether the line item's price is custom.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"unit_price","type":"`BigNumberProperty`","description":"The unit price of the line item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"adjustments","type":"HasMany<[LineItemAdjustment](../cart_models.LineItemAdjustment/page.mdx)>","description":"The associated adjustments.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the line item adjustment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`BigNumberProperty`","description":"The amount of the line item adjustment","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`BooleanProperty`","description":"Whether the line item adjustment is tax inclusive.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item","type":"BelongsTo<[LineItem](../cart_models.LineItem/page.mdx)>","description":"The associated line item.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"description","type":"`TextProperty`","description":"The description of the line item adjustment","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`TextProperty`","description":"The code of promotion that applied the adjustment","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`TextProperty`","description":"The ID of the external provider that the adjustment is related to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotion_id","type":"`TextProperty`","description":"The ID of the applied promotion.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`JSONProperty`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"tax_lines","type":"HasMany<[LineItemTaxLine](./page.mdx)>","description":"The associated tax\\_lines.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the line item tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`TextProperty`","description":"The code of the applied tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`FloatProperty`","description":"The rate of the applied tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item","type":"BelongsTo<[LineItem](../cart_models.LineItem/page.mdx)>","description":"The associated line item.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"description","typeLine truncated
|
||||
+2
-2
@@ -10,6 +10,6 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
This documentation provides a reference to the ShippingMethod data model. It belongs to the Cart Module.
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/modules/cart/src/models/shipping-method.ts#L6" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/modules/cart/src/models/shipping-method.ts#L6" />
|
||||
|
||||
<TypeList types={[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`TextProperty`","description":"The name of the shipping method","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`BigNumberProperty`","description":"The amount of the shipping method","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`BooleanProperty`","description":"Whether the shipping method's amount is tax inclusive.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart","type":"BelongsTo<[Cart](../cart_models.Cart/page.mdx)>","description":"The associated cart.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`TextProperty`","description":"The ISO 3 currency code of the cart, such as `usd`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"HasMany<[LineItem](../cart_models.LineItem/page.mdx)>","description":"The associated items.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`TextProperty`","description":"The title of the line item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`NumberProperty`","description":"The quantity of the line item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"requires_shipping","type":"`BooleanProperty`","description":"Whether the line item requires shipping.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_discountable","type":"`BooleanProperty`","description":"Whether the line item is discountable.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_giftcard","type":"`BooleanProperty`","description":"Whether the line item is a giftcard.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`BooleanProperty`","description":"Whether the line item's price is tax inclusive.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_custom_price","type":"`BooleanProperty`","description":"Whether the line item's price is custom.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"unit_price","type":"`BigNumberProperty`","description":"The unit price of the line item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"adjustments","type":"HasMany<[LineItemAdjustment](../cart_models.LineItemAdjustment/page.mdx)>","description":"The associated adjustments.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"tax_lines","type":"HasMany<[LineItemTaxLine](../cart_models.LineItemTaxLine/page.mdx)>","description":"The associated tax\\_lines.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"cart","type":"BelongsTo<[Cart](../cart_models.Cart/page.mdx)>","description":"The associated cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"subtitle","type":"`TextProperty`","description":"The subtitle of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`TextProperty`","description":"The thumbnail URL of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_id","type":"`TextProperty`","description":"The ID of the variant added to the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`TextProperty`","description":"The ID of the product added to the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_title","type":"`TextProperty`","description":"The title of the line item's product","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_description","type":"`TextProperty`","description":"The description of the line item's product","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_subtitle","type":"`TextProperty`","description":"The subtitle of the line item's product","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_type","type":"`TextProperty`","description":"The type of the line item's product","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_type_id","type":"`TextProLine truncated
|
||||
<TypeList types={[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`TextProperty`","description":"The name of the shipping method","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`BigNumberProperty`","description":"The amount of the shipping method","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`BooleanProperty`","description":"Whether the shipping method's amount is tax inclusive.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart","type":"BelongsTo<[Cart](../cart_models.Cart/page.mdx)>","description":"The associated cart.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`TextProperty`","description":"The ISO 3 currency code of the cart, such as `usd`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"HasMany<[LineItem](../cart_models.LineItem/page.mdx)>","description":"The associated items.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`TextProperty`","description":"The title of the line item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`NumberProperty`","description":"The quantity of the line item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"requires_shipping","type":"`BooleanProperty`","description":"Whether the line item requires shipping.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_discountable","type":"`BooleanProperty`","description":"Whether the line item is discountable.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_giftcard","type":"`BooleanProperty`","description":"Whether the line item is a giftcard.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`BooleanProperty`","description":"Whether the line item's price is tax inclusive.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_custom_price","type":"`BooleanProperty`","description":"Whether the line item's price is custom.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"unit_price","type":"`BigNumberProperty`","description":"The unit price of the line item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"adjustments","type":"HasMany<[LineItemAdjustment](../cart_models.LineItemAdjustment/page.mdx)>","description":"The associated adjustments.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"tax_lines","type":"HasMany<[LineItemTaxLine](../cart_models.LineItemTaxLine/page.mdx)>","description":"The associated tax\\_lines.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"cart","type":"BelongsTo<[Cart](../cart_models.Cart/page.mdx)>","description":"The associated cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"subtitle","type":"`TextProperty`","description":"The subtitle of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`TextProperty`","description":"The thumbnail URL of the line item","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_id","type":"`TextProperty`","description":"The ID of the variant added to the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`TextProperty`","description":"The ID of the product added to the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_title","type":"`TextProperty`","description":"The title of the line item's product","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_description","type":"`TextProperty`","description":"The description of the line item's product","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_subtitle","type":"`TextProperty`","description":"The subtitle of the line item's product","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_type","type":"`TextProperty`","description":"The type of the line item's product","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_type_id","type":"`TextProLine truncated
|
||||
+2
-2
@@ -10,6 +10,6 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
This documentation provides a reference to the ShippingMethodAdjustment data model. It belongs to the Cart Module.
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/modules/cart/src/models/shipping-method-adjustment.ts#L4" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/modules/cart/src/models/shipping-method-adjustment.ts#L4" />
|
||||
|
||||
<TypeList types={[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the shipping method adjustment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`BigNumberProperty`","description":"The shipping method adjustment's amount","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_method","type":"BelongsTo<[ShippingMethod](../cart_models.ShippingMethod/page.mdx)>","description":"The associated shipping\\_method.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`TextProperty`","description":"The name of the shipping method","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`BigNumberProperty`","description":"The amount of the shipping method","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`BooleanProperty`","description":"Whether the shipping method's amount is tax inclusive.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart","type":"BelongsTo<[Cart](../cart_models.Cart/page.mdx)>","description":"The associated cart.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`TextProperty`","description":"The ISO 3 currency code of the cart, such as `usd`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"HasMany<[LineItem](../cart_models.LineItem/page.mdx)>","description":"The associated items.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"credit_lines","type":"HasMany<[CreditLine](../cart_models.CreditLine/page.mdx)>","description":"The associated credit lines.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_methods","type":"HasMany<[ShippingMethod](../cart_models.ShippingMethod/page.mdx)>","description":"The associated shipping\\_methods.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"region_id","type":"`TextProperty`","description":"The ID of the cart's region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`TextProperty`","description":"The ID of the cart's customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`TextProperty`","description":"The ID of the cart's sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`TextProperty`","description":"The email of the cart's customer","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"locale","type":"`TextProperty`","description":"The BCP 47 language tag code of the localeThe locale of the cart","optional":true,"defaultValue":"","expandable":false,"children":[],"since":"2.12.3"},{"name":"metadata","type":"`JSONProperty`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"completed_at","type":"`DateTimeProperty`","description":"The date the cart was completed.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"HasOneWithForeignKey<[Address](../cart_models.Address/page.mdx)>","description":"The associated shipping\\_address.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"billing_address","type":"HasOneWithForeignKey<[Address](../cart_models.Address/page.mdx)>","description":"The associated billing\\_address.","optional":true,"defaultValue":"","expandable":true,"children":[]}]},{"name":"tax_lines","type":"HasMany<[ShippingMethodTaxLine](../cart_models.ShippingMethodTaxLine/page.mdx)>","description":"The associated tax\\_lines.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the shipping method tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`TextProperty`","description":"The code of the applied tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`FloatProperty`","description":"The rate of the applied tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_method","type":"BelongsTo<[ShippingMethod](../cart_models.ShippingMethod/page.mdx)>","description":"The associated shipping\\_method.","optionaLine truncated
|
||||
<TypeList types={[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the shipping method adjustment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`BigNumberProperty`","description":"The shipping method adjustment's amount","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_method","type":"BelongsTo<[ShippingMethod](../cart_models.ShippingMethod/page.mdx)>","description":"The associated shipping\\_method.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`TextProperty`","description":"The name of the shipping method","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`BigNumberProperty`","description":"The amount of the shipping method","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`BooleanProperty`","description":"Whether the shipping method's amount is tax inclusive.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart","type":"BelongsTo<[Cart](../cart_models.Cart/page.mdx)>","description":"The associated cart.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`TextProperty`","description":"The ISO 3 currency code of the cart, such as `usd`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"HasMany<[LineItem](../cart_models.LineItem/page.mdx)>","description":"The associated items.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"credit_lines","type":"HasMany<[CreditLine](../cart_models.CreditLine/page.mdx)>","description":"The associated credit lines.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_methods","type":"HasMany<[ShippingMethod](../cart_models.ShippingMethod/page.mdx)>","description":"The associated shipping\\_methods.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"region_id","type":"`TextProperty`","description":"The ID of the cart's region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`TextProperty`","description":"The ID of the cart's customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`TextProperty`","description":"The ID of the cart's sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`TextProperty`","description":"The email of the cart's customer","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"locale","type":"`TextProperty`","description":"The BCP 47 language tag code of the localeThe locale of the cart","optional":true,"defaultValue":"","example":"\"en-US\"","expandable":false,"children":[],"since":"2.12.3"},{"name":"metadata","type":"`JSONProperty`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"completed_at","type":"`DateTimeProperty`","description":"The date the cart was completed.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"HasOneWithForeignKey<[Address](../cart_models.Address/page.mdx)>","description":"The associated shipping\\_address.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"billing_address","type":"HasOneWithForeignKey<[Address](../cart_models.Address/page.mdx)>","description":"The associated billing\\_address.","optional":true,"defaultValue":"","expandable":true,"children":[]}]},{"name":"tax_lines","type":"HasMany<[ShippingMethodTaxLine](../cart_models.ShippingMethodTaxLine/page.mdx)>","description":"The associated tax\\_lines.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the shipping method tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`TextProperty`","description":"The code of the applied tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`FloatProperty`","description":"The rate of the applied tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_method","type":"BelongsTo<[ShippingMethod](../cart_models.ShippingMethod/page.mdx)>","description":"The associated shippiLine truncated
|
||||
+2
-2
@@ -10,6 +10,6 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
This documentation provides a reference to the ShippingMethodTaxLine data model. It belongs to the Cart Module.
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/modules/cart/src/models/shipping-method-tax-line.ts#L4" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/modules/cart/src/models/shipping-method-tax-line.ts#L4" />
|
||||
|
||||
<TypeList types={[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the shipping method tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`TextProperty`","description":"The code of the applied tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`FloatProperty`","description":"The rate of the applied tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_method","type":"BelongsTo<[ShippingMethod](../cart_models.ShippingMethod/page.mdx)>","description":"The associated shipping\\_method.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`TextProperty`","description":"The name of the shipping method","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`BigNumberProperty`","description":"The amount of the shipping method","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`BooleanProperty`","description":"Whether the shipping method's amount is tax inclusive.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart","type":"BelongsTo<[Cart](../cart_models.Cart/page.mdx)>","description":"The associated cart.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`TextProperty`","description":"The ISO 3 currency code of the cart, such as `usd`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"HasMany<[LineItem](../cart_models.LineItem/page.mdx)>","description":"The associated items.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"credit_lines","type":"HasMany<[CreditLine](../cart_models.CreditLine/page.mdx)>","description":"The associated credit lines.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_methods","type":"HasMany<[ShippingMethod](../cart_models.ShippingMethod/page.mdx)>","description":"The associated shipping\\_methods.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"region_id","type":"`TextProperty`","description":"The ID of the cart's region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`TextProperty`","description":"The ID of the cart's customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`TextProperty`","description":"The ID of the cart's sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`TextProperty`","description":"The email of the cart's customer","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"locale","type":"`TextProperty`","description":"The BCP 47 language tag code of the localeThe locale of the cart","optional":true,"defaultValue":"","expandable":false,"children":[],"since":"2.12.3"},{"name":"metadata","type":"`JSONProperty`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"completed_at","type":"`DateTimeProperty`","description":"The date the cart was completed.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"HasOneWithForeignKey<[Address](../cart_models.Address/page.mdx)>","description":"The associated shipping\\_address.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"billing_address","type":"HasOneWithForeignKey<[Address](../cart_models.Address/page.mdx)>","description":"The associated billing\\_address.","optional":true,"defaultValue":"","expandable":true,"children":[]}]},{"name":"tax_lines","type":"HasMany<[ShippingMethodTaxLine](./page.mdx)>","description":"The associated tax\\_lines.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the shipping method tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`TextProperty`","description":"The code of the applied tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`FloatProperty`","description":"The rate of the applied tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_method","type":"BelongsTo<[ShippingMetLine truncated
|
||||
<TypeList types={[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the shipping method tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`TextProperty`","description":"The code of the applied tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`FloatProperty`","description":"The rate of the applied tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_method","type":"BelongsTo<[ShippingMethod](../cart_models.ShippingMethod/page.mdx)>","description":"The associated shipping\\_method.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`TextProperty`","description":"The name of the shipping method","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`BigNumberProperty`","description":"The amount of the shipping method","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`BooleanProperty`","description":"Whether the shipping method's amount is tax inclusive.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart","type":"BelongsTo<[Cart](../cart_models.Cart/page.mdx)>","description":"The associated cart.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`TextProperty`","description":"The ISO 3 currency code of the cart, such as `usd`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"HasMany<[LineItem](../cart_models.LineItem/page.mdx)>","description":"The associated items.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"credit_lines","type":"HasMany<[CreditLine](../cart_models.CreditLine/page.mdx)>","description":"The associated credit lines.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"shipping_methods","type":"HasMany<[ShippingMethod](../cart_models.ShippingMethod/page.mdx)>","description":"The associated shipping\\_methods.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"region_id","type":"`TextProperty`","description":"The ID of the cart's region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`TextProperty`","description":"The ID of the cart's customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`TextProperty`","description":"The ID of the cart's sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`TextProperty`","description":"The email of the cart's customer","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"locale","type":"`TextProperty`","description":"The BCP 47 language tag code of the localeThe locale of the cart","optional":true,"defaultValue":"","example":"\"en-US\"","expandable":false,"children":[],"since":"2.12.3"},{"name":"metadata","type":"`JSONProperty`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"completed_at","type":"`DateTimeProperty`","description":"The date the cart was completed.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"HasOneWithForeignKey<[Address](../cart_models.Address/page.mdx)>","description":"The associated shipping\\_address.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"billing_address","type":"HasOneWithForeignKey<[Address](../cart_models.Address/page.mdx)>","description":"The associated billing\\_address.","optional":true,"defaultValue":"","expandable":true,"children":[]}]},{"name":"tax_lines","type":"HasMany<[ShippingMethodTaxLine](./page.mdx)>","description":"The associated tax\\_lines.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the shipping method tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`TextProperty`","description":"The code of the applied tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`FloatProperty`","description":"The rate of the applied tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_method","type":"BeloLine truncated
|
||||
+1
-1
@@ -19,7 +19,7 @@ This workflow creates one or more API keys, which can be secret or publishable.
|
||||
You can use this workflow within your customizations or your own custom workflows, allowing you to
|
||||
create API keys within your custom flows.
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/api-key/workflows/create-api-keys.ts#L51" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/api-key/workflows/create-api-keys.ts#L51" />
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ This workflow deletes one or more secret or publishable API keys. It's used by t
|
||||
You can use this workflow within your customizations or your own custom workflows, allowing you to
|
||||
delete API keys within your custom flows.
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/api-key/workflows/delete-api-keys.ts#L36" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/api-key/workflows/delete-api-keys.ts#L36" />
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ This workflow manages the sales channels of a publishable API key. It's used by
|
||||
You can use this workflow within your customizations or your own custom workflows, allowing you to
|
||||
manage the sales channels of a publishable API key within your custom flows.
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/api-key/workflows/link-sales-channels-to-publishable-key.ts#L39" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/api-key/workflows/link-sales-channels-to-publishable-key.ts#L39" />
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ This workflow is used by the [Revoke API Key API Route](https://docs.medusajs.co
|
||||
You can use this workflow within your customizations or your own custom workflows, allowing you to
|
||||
revoke API keys within your custom flows.
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/api-key/workflows/revoke-api-keys.ts#L59" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/api-key/workflows/revoke-api-keys.ts#L59" />
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ This workflow updates one or more secret or publishable API keys. It's used by t
|
||||
You can use this workflow within your customizations or your own custom workflows, allowing you to
|
||||
update API keys within your custom flows.
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/api-key/workflows/update-api-keys.ts#L57" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/api-key/workflows/update-api-keys.ts#L57" />
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
+4
-2
@@ -27,7 +27,7 @@ how to handle this event.
|
||||
You can use this workflow within your customizations or your own custom workflows, allowing you to
|
||||
generate reset password tokens within your custom flows.
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/auth/workflows/generate-reset-password-token.ts#L43" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/auth/workflows/generate-reset-password-token.ts#L43" />
|
||||
|
||||
## Examples
|
||||
|
||||
@@ -152,7 +152,7 @@ const myWorkflow = createWorkflow(
|
||||
|
||||
## Input
|
||||
|
||||
<TypeList types={[{"name":"entityId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"actorType","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"secret","type":"`undefined` \\| `Secret`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"jwtOptions","type":"`SignOptions`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" openedLevel={1} sectionTitle="generateResetPasswordTokenWorkflow"/>
|
||||
<TypeList types={[{"name":"entityId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"actorType","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"secret","type":"`undefined` \\| `Secret`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"jwtOptions","type":"`SignOptions`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" openedLevel={1} sectionTitle="generateResetPasswordTokenWorkflow"/>
|
||||
|
||||
## Output
|
||||
|
||||
@@ -202,6 +202,7 @@ to send a reset password email to the user or customer, for example.
|
||||
entity_id, // The identifier of the user or customer. For example, an email address.
|
||||
actor_type, // The type of actor. For example, "customer", "user", or custom.
|
||||
token, // The generated token.
|
||||
metadata, // Optional custom metadata passed from the request.
|
||||
}
|
||||
```
|
||||
</Table.Cell>
|
||||
@@ -213,6 +214,7 @@ to send a reset password email to the user or customer, for example.
|
||||
entity_id, // The identifier of the user or customer. For example, an email address.
|
||||
actor_type, // The type of actor. For example, "customer", "user", or custom.
|
||||
token, // The generated token.
|
||||
metadata, // Optional custom metadata passed from the request.
|
||||
}
|
||||
\`\`\``
|
||||
}}/>
|
||||
|
||||
+258
@@ -0,0 +1,258 @@
|
||||
---
|
||||
slug: /references/medusa-workflows/setAuthAppMetadataWorkflow
|
||||
sidebar_label: setAuthAppMetadataWorkflow
|
||||
sidebar_description: ""
|
||||
tags:
|
||||
- auth
|
||||
- workflow
|
||||
---
|
||||
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# setAuthAppMetadataWorkflow - Medusa Core Workflows Reference
|
||||
|
||||
This documentation provides a reference to the `setAuthAppMetadataWorkflow`. It belongs to the `@medusajs/medusa/core-flows` package.
|
||||
|
||||
This workflow sets the `app_metadata` property of an auth identity. This is useful to
|
||||
associate a user (whether it's an admin user or customer) with an auth identity
|
||||
that allows them to authenticate into Medusa.
|
||||
|
||||
You can learn more about auth identites in
|
||||
[this documentation](https://docs.medusajs.com/resources/commerce-modules/auth/auth-identity-and-actor-types).
|
||||
|
||||
To use this for a custom actor type, check out [this guide](https://docs.medusajs.com/resources/commerce-modules/auth/create-actor-type)
|
||||
that explains how to create a custom `manager` actor type and manage its users.
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/auth/workflows/set-auth-app-metadata.ts#L47" />
|
||||
|
||||
## Examples
|
||||
|
||||
To associate an auth identity with an actor type (user, customer, or other actor types):
|
||||
|
||||
<CodeTabs group="workflow-exection">
|
||||
<CodeTab label="API Route" value="api-route">
|
||||
|
||||
```ts title="src/api/workflow/route.ts"
|
||||
import type {
|
||||
MedusaRequest,
|
||||
MedusaResponse,
|
||||
} from "@medusajs/framework/http"
|
||||
import { setAuthAppMetadataWorkflow } from "@medusajs/medusa/core-flows"
|
||||
|
||||
export async function POST(
|
||||
req: MedusaRequest,
|
||||
res: MedusaResponse
|
||||
) {
|
||||
const { result } = await setAuthAppMetadataWorkflow(req.scope).run({
|
||||
input: {
|
||||
authIdentityId: "au_1234",
|
||||
actorType: "user", // or `customer`, or custom type
|
||||
value: "user_123"
|
||||
}
|
||||
})
|
||||
|
||||
res.send(result)
|
||||
}
|
||||
```
|
||||
|
||||
</CodeTab>
|
||||
<CodeTab label="Subscriber" value="subscriber">
|
||||
|
||||
```ts title="src/subscribers/order-placed.ts"
|
||||
import {
|
||||
type SubscriberConfig,
|
||||
type SubscriberArgs,
|
||||
} from "@medusajs/framework"
|
||||
import { setAuthAppMetadataWorkflow } from "@medusajs/medusa/core-flows"
|
||||
|
||||
export default async function handleOrderPlaced({
|
||||
event: { data },
|
||||
container,
|
||||
}: SubscriberArgs < { id: string } > ) {
|
||||
const { result } = await setAuthAppMetadataWorkflow(container).run({
|
||||
input: {
|
||||
authIdentityId: "au_1234",
|
||||
actorType: "user", // or `customer`, or custom type
|
||||
value: "user_123"
|
||||
}
|
||||
})
|
||||
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
export const config: SubscriberConfig = {
|
||||
event: "order.placed",
|
||||
}
|
||||
```
|
||||
|
||||
</CodeTab>
|
||||
<CodeTab label="Scheduled Job" value="scheduled-job">
|
||||
|
||||
```ts title="src/jobs/message-daily.ts"
|
||||
import { MedusaContainer } from "@medusajs/framework/types"
|
||||
import { setAuthAppMetadataWorkflow } from "@medusajs/medusa/core-flows"
|
||||
|
||||
export default async function myCustomJob(
|
||||
container: MedusaContainer
|
||||
) {
|
||||
const { result } = await setAuthAppMetadataWorkflow(container).run({
|
||||
input: {
|
||||
authIdentityId: "au_1234",
|
||||
actorType: "user", // or `customer`, or custom type
|
||||
value: "user_123"
|
||||
}
|
||||
})
|
||||
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
export const config = {
|
||||
name: "run-once-a-day",
|
||||
schedule: "0 0 * * *",
|
||||
}
|
||||
```
|
||||
|
||||
</CodeTab>
|
||||
<CodeTab label="Another Workflow" value="another-workflow">
|
||||
|
||||
```ts title="src/workflows/my-workflow.ts"
|
||||
import { createWorkflow } from "@medusajs/framework/workflows-sdk"
|
||||
import { setAuthAppMetadataWorkflow } from "@medusajs/medusa/core-flows"
|
||||
|
||||
const myWorkflow = createWorkflow(
|
||||
"my-workflow",
|
||||
() => {
|
||||
const result = setAuthAppMetadataWorkflow.runAsStep({
|
||||
input: {
|
||||
authIdentityId: "au_1234",
|
||||
actorType: "user", // or `customer`, or custom type
|
||||
value: "user_123"
|
||||
}
|
||||
})
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
</CodeTab>
|
||||
</CodeTabs>
|
||||
|
||||
To remove the association with an actor type, such as when deleting the user:
|
||||
|
||||
<CodeTabs group="workflow-exection">
|
||||
<CodeTab label="API Route" value="api-route">
|
||||
|
||||
```ts title="src/api/workflow/route.ts"
|
||||
import type {
|
||||
MedusaRequest,
|
||||
MedusaResponse,
|
||||
} from "@medusajs/framework/http"
|
||||
import { setAuthAppMetadataWorkflow } from "@medusajs/medusa/core-flows"
|
||||
|
||||
export async function POST(
|
||||
req: MedusaRequest,
|
||||
res: MedusaResponse
|
||||
) {
|
||||
const { result } = await setAuthAppMetadataWorkflow(req.scope).run({
|
||||
input: {
|
||||
authIdentityId: "au_1234",
|
||||
actorType: "user", // or `customer`, or custom type
|
||||
value: null
|
||||
}
|
||||
})
|
||||
|
||||
res.send(result)
|
||||
}
|
||||
```
|
||||
|
||||
</CodeTab>
|
||||
<CodeTab label="Subscriber" value="subscriber">
|
||||
|
||||
```ts title="src/subscribers/order-placed.ts"
|
||||
import {
|
||||
type SubscriberConfig,
|
||||
type SubscriberArgs,
|
||||
} from "@medusajs/framework"
|
||||
import { setAuthAppMetadataWorkflow } from "@medusajs/medusa/core-flows"
|
||||
|
||||
export default async function handleOrderPlaced({
|
||||
event: { data },
|
||||
container,
|
||||
}: SubscriberArgs < { id: string } > ) {
|
||||
const { result } = await setAuthAppMetadataWorkflow(container).run({
|
||||
input: {
|
||||
authIdentityId: "au_1234",
|
||||
actorType: "user", // or `customer`, or custom type
|
||||
value: null
|
||||
}
|
||||
})
|
||||
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
export const config: SubscriberConfig = {
|
||||
event: "order.placed",
|
||||
}
|
||||
```
|
||||
|
||||
</CodeTab>
|
||||
<CodeTab label="Scheduled Job" value="scheduled-job">
|
||||
|
||||
```ts title="src/jobs/message-daily.ts"
|
||||
import { MedusaContainer } from "@medusajs/framework/types"
|
||||
import { setAuthAppMetadataWorkflow } from "@medusajs/medusa/core-flows"
|
||||
|
||||
export default async function myCustomJob(
|
||||
container: MedusaContainer
|
||||
) {
|
||||
const { result } = await setAuthAppMetadataWorkflow(container).run({
|
||||
input: {
|
||||
authIdentityId: "au_1234",
|
||||
actorType: "user", // or `customer`, or custom type
|
||||
value: null
|
||||
}
|
||||
})
|
||||
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
export const config = {
|
||||
name: "run-once-a-day",
|
||||
schedule: "0 0 * * *",
|
||||
}
|
||||
```
|
||||
|
||||
</CodeTab>
|
||||
<CodeTab label="Another Workflow" value="another-workflow">
|
||||
|
||||
```ts title="src/workflows/my-workflow.ts"
|
||||
import { createWorkflow } from "@medusajs/framework/workflows-sdk"
|
||||
import { setAuthAppMetadataWorkflow } from "@medusajs/medusa/core-flows"
|
||||
|
||||
const myWorkflow = createWorkflow(
|
||||
"my-workflow",
|
||||
() => {
|
||||
const result = setAuthAppMetadataWorkflow.runAsStep({
|
||||
input: {
|
||||
authIdentityId: "au_1234",
|
||||
actorType: "user", // or `customer`, or custom type
|
||||
value: null
|
||||
}
|
||||
})
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
</CodeTab>
|
||||
</CodeTabs>
|
||||
|
||||
## Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"setAuthAppMetadataWorkflow","steps":[{"type":"step","name":"setAuthAppMetadataStep","description":"This step sets the `app_metadata` property of an auth identity. This is useful to\nassociate a user (whether it's an admin user or customer) with an auth identity\nthat allows them to authenticate into Medusa.\n\nYou can learn more about auth identites in\n[this documentation](https://docs.medusajs.com/resources/commerce-modules/auth/auth-identity-and-actor-types).\n\nTo use this for a custom actor type, check out [this guide](https://docs.medusajs.com/resources/commerce-modules/auth/create-actor-type)\nthat explains how to create a custom `manager` actor type and manage its users.","link":"../../../Steps_Auth/functions/core_flows.Auth.Steps_Auth.setAuthAppMetadataStep/page.mdx","depth":1}]}} />
|
||||
|
||||
## Input
|
||||
|
||||
<TypeList types={[{"name":"SetAuthAppMetadataStepInput","type":"[SetAuthAppMetadataStepInput](../../../../types/core_flows.SetAuthAppMetadataStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"authIdentityId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"actorType","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string` \\| `null`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" openedLevel={1} sectionTitle="setAuthAppMetadataWorkflow"/>
|
||||
|
||||
## Output
|
||||
|
||||
<TypeList types={[{"name":"AuthIdentityDTO","type":"[AuthIdentityDTO](../../../../../auth/interfaces/auth.AuthIdentityDTO/page.mdx)","optional":false,"defaultValue":"","description":"The auth identity details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the auth identity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_identities","type":"[ProviderIdentityDTO](../../../../../auth/interfaces/auth.ProviderIdentityDTO/page.mdx)[]","description":"The list of provider identities linked to the auth identity.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the provider identity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity_id","type":"`string`","description":"The user's identifier. For example, when using the `emailpass`\nprovider, the `entity_id` would be the user's email.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"auth_identity_id","type":"`string`","description":"The ID of the auth identity linked to the provider identity.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"auth_identity","type":"[AuthIdentityDTO](../../../../../auth/interfaces/auth.AuthIdentityDTO/page.mdx)","description":"The auth identity linked to the provider identity.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the auth identity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_identities","type":"[ProviderIdentityDTO](../../../../../auth/interfaces/auth.ProviderIdentityDTO/page.mdx)[]","description":"The list of provider identities linked to the auth identity.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"app_metadata","type":"`Record<string, unknown>`","description":"Holds information related to the actor IDs tied to the auth identity.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"provider_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the provider in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"user_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the user in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"app_metadata","type":"`Record<string, unknown>`","description":"Holds information related to the actor IDs tied to the auth identity.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" openedLevel={1} sectionTitle="setAuthAppMetadataWorkflow"/>
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# setAuthAppMetadataWorkflowId
|
||||
|
||||
`Const` **setAuthAppMetadataWorkflowId**: `"set-auth-app-metadata-workflow"`
|
||||
@@ -3,3 +3,4 @@ import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
# Workflows\_Auth
|
||||
|
||||
- [generateResetPasswordTokenWorkflow](../Workflows_Auth/functions/core_flows.Auth.Workflows_Auth.generateResetPasswordTokenWorkflow/page.mdx)
|
||||
- [setAuthAppMetadataWorkflow](../Workflows_Auth/functions/core_flows.Auth.Workflows_Auth.setAuthAppMetadataWorkflow/page.mdx)
|
||||
+1
-1
@@ -22,7 +22,7 @@ const myWorkflow = createWorkflow(
|
||||
"my-workflow",
|
||||
() => {
|
||||
const data = createCartsStep({
|
||||
"currency_code": "bob"
|
||||
"currency_code": "fjd"
|
||||
})
|
||||
}
|
||||
)
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ const myWorkflow = createWorkflow(
|
||||
"my-workflow",
|
||||
() => {
|
||||
const data = retrieveCartStep({
|
||||
"id": "id_1Eny6qZwVeQB3HE"
|
||||
"id": "id_fYM3vZiKxXaZjGAhh20n"
|
||||
})
|
||||
}
|
||||
)
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ const myWorkflow = createWorkflow(
|
||||
"my-workflow",
|
||||
() => {
|
||||
const data = updateCartPromotionsStep({
|
||||
"id": "id_C1oel9wKL2C"
|
||||
"id": "id_FMD63x3XOc"
|
||||
})
|
||||
}
|
||||
)
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ const data = updateCartsStep([{
|
||||
|
||||
## Input
|
||||
|
||||
<TypeList types={[{"name":"UpdateCartsStepInput","type":"[UpdateCartsStepInput](../../../../types/core_flows.UpdateCartsStepInput/page.mdx)","optional":false,"defaultValue":"","description":"The details of the carts to update.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the cart to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"promo_codes","type":"`string`[]","description":"An array of promotional codes applied on the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`string`","description":"The ID of the cart's region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the cart's customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the cart's sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email address of the cart's customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency code for the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"locale","type":"`null` \\| `string`","description":"The locale code for the cart in BCP 47 format.","optional":true,"defaultValue":"","expandable":false,"children":[],"since":"2.12.3"},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Custom key-value pairs of data related to the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"`null` \\| [UpdateAddressDTO](../../../../../cart/interfaces/cart.UpdateAddressDTO/page.mdx) \\| [CreateAddressDTO](../../../../../cart/interfaces/cart.CreateAddressDTO/page.mdx)","description":"The cart's shipping address. You can either update the cart's existing shipping address, or create a new one.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"The associated customer's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`string`","description":"The first name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The first line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The second line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The ISO two country code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The lower-case [ISO 3166-2](https://en.wikipedia.org/wiki/ISO\\_3166-2) province/state of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"billing_address","type":"`null` \\| [UpdateAddressDTO](../../../../../cart/interfaces/cart.UpdateAddressDTO/page.mdx) \\| [CreateAddressDTO](../../../../../cart/interfaces/cart.CreateAddressDTO/page.mdx)","description":"The cart's billing address. You can either update the cart's existing billing address, or create a new one.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"The associated customer's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`Line truncated
|
||||
<TypeList types={[{"name":"UpdateCartsStepInput","type":"[UpdateCartsStepInput](../../../../types/core_flows.UpdateCartsStepInput/page.mdx)","optional":false,"defaultValue":"","description":"The details of the carts to update.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the cart to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"promo_codes","type":"`string`[]","description":"An array of promotional codes applied on the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`string`","description":"The ID of the cart's region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the cart's customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the cart's sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email address of the cart's customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency code for the cart.","optional":true,"defaultValue":"","example":"usd","expandable":false,"children":[]},{"name":"locale","type":"`null` \\| `string`","description":"The locale code for the cart in BCP 47 format.","optional":true,"defaultValue":"","example":"\"en-US\"","expandable":false,"children":[],"since":"2.12.3"},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Custom key-value pairs of data related to the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"`null` \\| [UpdateAddressDTO](../../../../../cart/interfaces/cart.UpdateAddressDTO/page.mdx) \\| [CreateAddressDTO](../../../../../cart/interfaces/cart.CreateAddressDTO/page.mdx)","description":"The cart's shipping address. You can either update the cart's existing shipping address, or create a new one.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"The associated customer's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`string`","description":"The first name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The first line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The second line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The ISO two country code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The lower-case [ISO 3166-2](https://en.wikipedia.org/wiki/ISO\\_3166-2) province/state of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"billing_address","type":"`null` \\| [UpdateAddressDTO](../../../../../cart/interfaces/cart.UpdateAddressDTO/page.mdx) \\| [CreateAddressDTO](../../../../../cart/interfaces/cart.CreateAddressDTO/page.mdx)","description":"The cart's billing address. You can either update the cart's existing billing address, or create a new one.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"The associated customer's ID.","optional":true,"defaultValue":"","expandable":false,"children":Line truncated
|
||||
|
||||
## Output
|
||||
|
||||
|
||||
+1
-1
@@ -53,4 +53,4 @@ validateShippingStep({
|
||||
|
||||
## Input
|
||||
|
||||
<TypeList types={[{"name":"ValidateShippingInput","type":"[ValidateShippingInput](../../../../types/core_flows.ValidateShippingInput/page.mdx)","optional":false,"defaultValue":"","description":"The data to validate shipping data when cart is completed.","expandable":false,"children":[{"name":"cart","type":"Omit<[CartWorkflowDTO](../../../../../types/interfaces/types.CartWorkflowDTO/page.mdx), \"items\"> & `object`","description":"The cart's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_collection","type":"[PaymentCollectionDTO](../../../../../payment/interfaces/payment.PaymentCollectionDTO/page.mdx)","description":"The payment collection details.","optional":false,"defaultValue":"","expandable":false,"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":"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":"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":"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":[]},{"name":"refunded_amount","type":"[BigNumberValue](../../../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The amount refunded within the associated payments.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"captured_amount","type":"[BigNumberValue](../../../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The amount captured within the associated payments.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"completed_at","type":"`string` \\| `Date`","description":"When the payment collection was completed.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the payment collection was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the payment collection was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_sessions","type":"[PaymentSessionDTO](../../../../../payment/interfaces/payment.PaymentSessionDTO/page.mdx)[]","description":"The associated payment sessions.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"payments","type":"[PaymentDTO](../../../../../payment/interfaces/payment.PaymentDTO/page.mdx)[]","description":"The associated payments.","optional":true,"defaultValue":"","expandable":true,"children":[]}]},{"name":"items","type":"[CartLineItemDTO](../../../../../cart/interfaces/cart.CartLineItemDTO/page.mdx) & `object`[]","description":"The cart's line items.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"original_total","type":"[BigNumberValue](../../../../../cart/types/cart.BigNumberValue/page.mdx)","description":"The original total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"[BigNumberValue](../../../../../cart/types/cart.BigNumberValue/page.mdx)","description":"The original subtotal of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_tax_total","type":"[BigNumberValue](../../../../../cart/types/cart.BigNumberValue/page.mdx)","description":"The original tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"[BigNumberValue](../../..Line truncated
|
||||
<TypeList types={[{"name":"ValidateShippingInput","type":"[ValidateShippingInput](../../../../types/core_flows.ValidateShippingInput/page.mdx)","optional":false,"defaultValue":"","description":"The data to validate shipping data when cart is completed.","expandable":false,"children":[{"name":"cart","type":"Omit<[CartWorkflowDTO](../../../../../types/interfaces/types.CartWorkflowDTO/page.mdx), \"items\"> & `object`","description":"The cart's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_collection","type":"[PaymentCollectionDTO](../../../../../payment/interfaces/payment.PaymentCollectionDTO/page.mdx)","description":"The payment collection details.","optional":false,"defaultValue":"","expandable":false,"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":"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":"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":"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":[]},{"name":"refunded_amount","type":"[BigNumberValue](../../../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The amount refunded within the associated payments.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"captured_amount","type":"[BigNumberValue](../../../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The amount captured within the associated payments.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"completed_at","type":"`string` \\| `Date`","description":"When the payment collection was completed.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the payment collection was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the payment collection was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_sessions","type":"[PaymentSessionDTO](../../../../../payment/interfaces/payment.PaymentSessionDTO/page.mdx)[]","description":"The associated payment sessions.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"payments","type":"[PaymentDTO](../../../../../payment/interfaces/payment.PaymentDTO/page.mdx)[]","description":"The associated payments.","optional":true,"defaultValue":"","expandable":true,"children":[]}]},{"name":"items","type":"[CartLineItemDTO](../../../../../cart/interfaces/cart.CartLineItemDTO/page.mdx) & `object`[]","description":"The cart's line items.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"original_total","type":"[BigNumberValue](../../../../../cart/types/cart.BigNumberValue/page.mdx)","description":"The original total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"[BigNumberValue](../../../../../cart/types/cart.BigNumberValue/page.mdx)","description":"The original subtotal of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_tax_total","type":"[BigNumberValue](../../../../../cart/types/cart.BigNumberValue/page.mdx)","description":"The original tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"[BigNumberValue](../../..Line truncated
|
||||
+1
-1
@@ -34,7 +34,7 @@ If you use this workflow in another, you must acquire a lock before running it a
|
||||
|
||||
:::
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/cart/workflows/add-shipping-method-to-cart.ts#L83" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/cart/workflows/add-shipping-method-to-cart.ts#L83" />
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ If you use this workflow in another, you must acquire a lock before running it a
|
||||
|
||||
:::
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/cart/workflows/add-to-cart.ts#L116" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/cart/workflows/add-to-cart.ts#L116" />
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
+1
-1
@@ -240,7 +240,7 @@ If you use this workflow in another, you must acquire a lock before running it a
|
||||
|
||||
:::
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/cart/workflows/complete-cart.ts#L301" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/cart/workflows/complete-cart.ts#L301" />
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ Learn more about the links between the product variant and sales channels and in
|
||||
|
||||
You can use this workflow within your own customizations or custom workflows, allowing you to check whether a product variant has enough inventory quantity before adding them to the cart.
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/cart/workflows/confirm-variant-inventory.ts#L147" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/cart/workflows/confirm-variant-inventory.ts#L147" />
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ This documentation provides a reference to the `createCartCreditLinesWorkflow`.
|
||||
|
||||
This workflow creates one or more credit lines for a cart.
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/cart/workflows/create-cart-credit-lines.ts#L31" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/cart/workflows/create-cart-credit-lines.ts#L31" />
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
+2
-2
@@ -31,7 +31,7 @@ This workflow has a hook that allows you to perform custom actions on the create
|
||||
|
||||
You can also use this workflow within your customizations or your own custom workflows, allowing you to wrap custom logic around cart creation.
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/cart/workflows/create-carts.ts#L113" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/cart/workflows/create-carts.ts#L113" />
|
||||
|
||||
## Examples
|
||||
|
||||
@@ -176,7 +176,7 @@ const myWorkflow = createWorkflow(
|
||||
|
||||
## Input
|
||||
|
||||
<TypeList types={[{"name":"CreateCartWorkflowInput","type":"[CreateCartWorkflowInput](../../../../types/core_flows.CreateCartWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"The data to create the cart, along with custom data that's passed to the workflow's hooks.","expandable":false,"children":[{"name":"region_id","type":"`string`","description":"The ID of the region that the cart belongs to.\nIf not provided, the default region of the store is used.\nIf the store doesn't have a default region, an error is thrown.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"The ID of the customer associated with the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`string`","description":"The ID of the sales channel through which the cart is created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The email address of the cart's customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency code of the cart. This defaults to the region's currency code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address_id","type":"`string`","description":"The ID of the associated shipping address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address_id","type":"`string`","description":"The ID of the associated billing address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"`string` \\| [CreateCartAddressDTO](../../../../../types/interfaces/types.CreateCartAddressDTO/page.mdx)","description":"The ID of an existing shipping address, or the details of a shipping address to create.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`string`","description":"The first name of the customer associated with the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the customer associated with the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The address's phone number","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The address's company name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The primary address line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The secondary address line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The lower-case [ISO 3166-2](https://en.wikipedia.org/wiki/ISO\\_3166-2) province or state of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Custom key-value pairs related to the address.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"billing_address","type":"`string` \\| [CreateCartAddressDTO](../../../../../types/interfaces/types.CreateCartAddressDTO/page.mdx)","description":"The ID of an existing billing address, or the details of a billing address to create.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`string`","description":"The first name of the customer associated with the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the customer associated with the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The address's phone number","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The address's company name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The primary address line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The secoLine truncated
|
||||
<TypeList types={[{"name":"CreateCartWorkflowInput","type":"[CreateCartWorkflowInput](../../../../types/core_flows.CreateCartWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"The data to create the cart, along with custom data that's passed to the workflow's hooks.","expandable":false,"children":[{"name":"region_id","type":"`string`","description":"The ID of the region that the cart belongs to.\nIf not provided, the default region of the store is used.\nIf the store doesn't have a default region, an error is thrown.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"The ID of the customer associated with the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`string`","description":"The ID of the sales channel through which the cart is created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The email address of the cart's customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency code of the cart. This defaults to the region's currency code.","optional":true,"defaultValue":"","example":"usd","expandable":false,"children":[]},{"name":"shipping_address_id","type":"`string`","description":"The ID of the associated shipping address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address_id","type":"`string`","description":"The ID of the associated billing address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"`string` \\| [CreateCartAddressDTO](../../../../../types/interfaces/types.CreateCartAddressDTO/page.mdx)","description":"The ID of an existing shipping address, or the details of a shipping address to create.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`string`","description":"The first name of the customer associated with the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the customer associated with the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The address's phone number","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The address's company name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The primary address line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The secondary address line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the address.","optional":true,"defaultValue":"","example":"us","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The lower-case [ISO 3166-2](https://en.wikipedia.org/wiki/ISO\\_3166-2) province or state of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Custom key-value pairs related to the address.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"billing_address","type":"`string` \\| [CreateCartAddressDTO](../../../../../types/interfaces/types.CreateCartAddressDTO/page.mdx)","description":"The ID of an existing billing address, or the details of a billing address to create.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`string`","description":"The first name of the customer associated with the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the customer associated with the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The address's phone number","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The address's company name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The primary address line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`sLine truncated
|
||||
|
||||
## Output
|
||||
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ If you use this workflow in another, you must acquire a lock before running it a
|
||||
|
||||
:::
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/cart/workflows/create-payment-collection-for-cart.ts#L84" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/cart/workflows/create-payment-collection-for-cart.ts#L84" />
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
+5
-5
@@ -14,7 +14,7 @@ This documentation provides a reference to the `deleteCartCreditLinesWorkflow`.
|
||||
|
||||
This workflow deletes one or more credit lines from a cart.
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/cart/workflows/delete-cart-credit-lines.ts#L13" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/cart/workflows/delete-cart-credit-lines.ts#L13" />
|
||||
|
||||
## Examples
|
||||
|
||||
@@ -36,7 +36,7 @@ export async function POST(
|
||||
.run({
|
||||
input: {
|
||||
"id": [
|
||||
"id_NAc2WgXcGubq"
|
||||
"id_SYrA5tN84jgRaq"
|
||||
]
|
||||
}
|
||||
})
|
||||
@@ -63,7 +63,7 @@ export default async function handleOrderPlaced({
|
||||
.run({
|
||||
input: {
|
||||
"id": [
|
||||
"id_NAc2WgXcGubq"
|
||||
"id_SYrA5tN84jgRaq"
|
||||
]
|
||||
}
|
||||
})
|
||||
@@ -90,7 +90,7 @@ export default async function myCustomJob(
|
||||
.run({
|
||||
input: {
|
||||
"id": [
|
||||
"id_NAc2WgXcGubq"
|
||||
"id_SYrA5tN84jgRaq"
|
||||
]
|
||||
}
|
||||
})
|
||||
@@ -118,7 +118,7 @@ const myWorkflow = createWorkflow(
|
||||
.runAsStep({
|
||||
input: {
|
||||
"id": [
|
||||
"id_NAc2WgXcGubq"
|
||||
"id_SYrA5tN84jgRaq"
|
||||
]
|
||||
}
|
||||
})
|
||||
|
||||
+2
-2
@@ -22,7 +22,7 @@ price of the shipping method being added to the cart.
|
||||
You can use this workflow within your own customizations or custom workflows, allowing you to retrieve the shipping options of a cart and their prices
|
||||
in your custom flows.
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/cart/workflows/list-shipping-options-for-cart-with-pricing.ts#L126" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/cart/workflows/list-shipping-options-for-cart-with-pricing.ts#L127" />
|
||||
|
||||
## Examples
|
||||
|
||||
@@ -158,7 +158,7 @@ const myWorkflow = createWorkflow(
|
||||
|
||||
## Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"listShippingOptionsForCartWithPricingWorkflow","steps":[{"type":"step","name":"validatePresenceOfStep","description":"This step validates the presence of attributes on an object","link":"../../../../Common/Steps_Common/functions/core_flows.Common.Steps_Common.validatePresenceOfStep/page.mdx","depth":1},{"type":"hook","name":"setShippingOptionsContext","description":"This hook is executed after the cart is retrieved and before the shipping options are queried. You can consume this hook to return any custom context useful for the shipping options retrieval.\n\nFor example, you can consume the hook to add the customer Id to the context:\n\n```ts\nimport { listShippingOptionsForCartWithPricingWorkflow } from \"@medusajs/medusa/core-flows\"\nimport { StepResponse } from \"@medusajs/workflows-sdk\"\n\nlistShippingOptionsForCartWithPricingWorkflow.hooks.setShippingOptionsContext(\n async ({ cart }, { container }) => {\n\n if (cart.customer_id) {\n return new StepResponse({\n customer_id: cart.customer_id,\n })\n }\n\n const query = container.resolve(\"query\")\n\n const { data: carts } = await query.graph({\n entity: \"cart\",\n filters: {\n id: cart.id,\n },\n fields: [\"customer_id\"],\n })\n\n return new StepResponse({\n customer_id: carts[0].customer_id,\n })\n }\n)\n```\n\nThe `customer_id` property will be added to the context along with other properties such as `is_return` and `enabled_in_store`.\n\n:::note\n\nYou should also consume the `setShippingOptionsContext` hook in the listShippingOptionsForCartWorkflow workflow to ensure that the context is consistent when listing shipping options across workflows.\n\n:::","link":"#setShippingOptionsContext","depth":2},{"type":"step","name":"calculateShippingOptionsPricesStep","description":"This step calculates the prices for one or more shipping options.","link":"../../../../Fulfillment/Steps_Fulfillment/functions/core_flows.Fulfillment.Steps_Fulfillment.calculateShippingOptionsPricesStep/page.mdx","depth":3}]}} />
|
||||
<WorkflowDiagram workflow={{"name":"listShippingOptionsForCartWithPricingWorkflow","steps":[{"type":"step","name":"validatePresenceOfStep","description":"This step validates the presence of attributes on an object","link":"../../../../Common/Steps_Common/functions/core_flows.Common.Steps_Common.validatePresenceOfStep/page.mdx","depth":1},{"type":"hook","name":"setShippingOptionsContext","description":"This hook is executed after the cart is retrieved and before the shipping options are queried. You can consume this hook to return any custom context useful for the shipping options retrieval.\n\nFor example, you can consume the hook to add the customer Id to the context:\n\n```ts\nimport { listShippingOptionsForCartWithPricingWorkflow } from \"@medusajs/medusa/core-flows\"\nimport { StepResponse } from \"@medusajs/workflows-sdk\"\n\nlistShippingOptionsForCartWithPricingWorkflow.hooks.setShippingOptionsContext(\n async ({ cart }, { container }) => {\n\n if (cart.customer_id) {\n return new StepResponse({\n customer_id: cart.customer_id,\n })\n }\n\n const query = container.resolve(\"query\")\n\n const { data: carts } = await query.graph({\n entity: \"cart\",\n filters: {\n id: cart.id,\n },\n fields: [\"customer_id\"],\n })\n\n return new StepResponse({\n customer_id: carts[0].customer_id,\n })\n }\n)\n```\n\nThe `customer_id` property will be added to the context along with other properties such as `is_return` and `enabled_in_store`.\n\n:::note\n\nYou should also consume the `setShippingOptionsContext` hook in the listShippingOptionsForCartWorkflow workflow to ensure that the context is consistent when listing shipping options across workflows.\n\n:::","link":"#setShippingOptionsContext","depth":2},{"type":"step","name":"calculateShippingOptionsPricesStep","description":"This step calculates the prices for one or more shipping options.","link":"../../../../Fulfillment/Steps_Fulfillment/functions/core_flows.Fulfillment.Steps_Fulfillment.calculateShippingOptionsPricesStep/page.mdx","depth":3},{"type":"step","name":"getTranslatedShippingOptionsStep","description":"This step applies translations to a list of shipping options based on the provided locale.\nIt modifies the shipping options in place and returns them.","link":"../../../../Common/Steps_Common/functions/core_flows.Common.Steps_Common.getTranslatedShippingOptionsStep/page.mdx","depth":4}]}} />
|
||||
|
||||
## Input
|
||||
|
||||
|
||||
+6
-2
@@ -25,7 +25,7 @@ use the [listShippingOptionsForCartWithPricingWorkflow](../core_flows.Cart.Workf
|
||||
You can use this workflow within your own customizations or custom workflows, allowing you to wrap custom logic around to retrieve the shipping options of a cart
|
||||
in your custom flows.
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/cart/workflows/list-shipping-options-for-cart.ts#L134" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/cart/workflows/list-shipping-options-for-cart.ts#L135" />
|
||||
|
||||
## Examples
|
||||
|
||||
@@ -138,12 +138,16 @@ const myWorkflow = createWorkflow(
|
||||
|
||||
## Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"listShippingOptionsForCartWorkflow","steps":[{"type":"step","name":"validatePresenceOfStep","description":"This step validates the presence of attributes on an object","link":"../../../../Common/Steps_Common/functions/core_flows.Common.Steps_Common.validatePresenceOfStep/page.mdx","depth":1},{"type":"hook","name":"setPricingContext","description":"This hook is executed after the order is retrieved and before the line items are created. You can consume this hook to return any custom context useful for the prices retrieval of the variants to be added to the order.\n\nFor example, assuming you have the following custom pricing rule:\n\n```json\n{\n \"attribute\": \"location_id\",\n \"operator\": \"eq\",\n \"value\": \"sloc_123\",\n}\n```\n\nYou can consume the `setPricingContext` hook to add the `location_id` context to the prices calculation:\n\n```ts\nimport { addOrderLineItemsWorkflow } from \"@medusajs/medusa/core-flows\";\nimport { StepResponse } from \"@medusajs/workflows-sdk\";\n\naddOrderLineItemsWorkflow.hooks.setPricingContext((\n { order, variantIds, region, customerData, additional_data }, { container }\n) => {\n return new StepResponse({\n location_id: \"sloc_123\", // Special price for in-store purchases\n });\n});\n```\n\nThe variants' prices will now be retrieved using the context you return.\n\n:::note\n\nLearn more about prices calculation context in the [Prices Calculation](https://docs.medusajs.com/resources/commerce-modules/pricing/price-calculation) documentation.\n\n:::","link":"#setPricingContext","depth":2},{"type":"hook","name":"setShippingOptionsContext","description":"This hook is executed after the cart is retrieved and before the shipping options are queried. You can consume this hook to return any custom context useful for the shipping options retrieval.\n\nFor example, you can consume the hook to add the customer Id to the context:\n\n```ts\nimport { listShippingOptionsForCartWithPricingWorkflow } from \"@medusajs/medusa/core-flows\"\nimport { StepResponse } from \"@medusajs/workflows-sdk\"\n\nlistShippingOptionsForCartWithPricingWorkflow.hooks.setShippingOptionsContext(\n async ({ cart }, { container }) => {\n\n if (cart.customer_id) {\n return new StepResponse({\n customer_id: cart.customer_id,\n })\n }\n\n const query = container.resolve(\"query\")\n\n const { data: carts } = await query.graph({\n entity: \"cart\",\n filters: {\n id: cart.id,\n },\n fields: [\"customer_id\"],\n })\n\n return new StepResponse({\n customer_id: carts[0].customer_id,\n })\n }\n)\n```\n\nThe `customer_id` property will be added to the context along with other properties such as `is_return` and `enabled_in_store`.\n\n:::note\n\nYou should also consume the `setShippingOptionsContext` hook in the listShippingOptionsForCartWorkflow workflow to ensure that the context is consistent when listing shipping options across workflows.\n\n:::","link":"#setShippingOptionsContext","depth":3}]}} />
|
||||
<WorkflowDiagram workflow={{"name":"listShippingOptionsForCartWorkflow","steps":[{"type":"step","name":"validatePresenceOfStep","description":"This step validates the presence of attributes on an object","link":"../../../../Common/Steps_Common/functions/core_flows.Common.Steps_Common.validatePresenceOfStep/page.mdx","depth":1},{"type":"hook","name":"setPricingContext","description":"This hook is executed after the order is retrieved and before the line items are created. You can consume this hook to return any custom context useful for the prices retrieval of the variants to be added to the order.\n\nFor example, assuming you have the following custom pricing rule:\n\n```json\n{\n \"attribute\": \"location_id\",\n \"operator\": \"eq\",\n \"value\": \"sloc_123\",\n}\n```\n\nYou can consume the `setPricingContext` hook to add the `location_id` context to the prices calculation:\n\n```ts\nimport { addOrderLineItemsWorkflow } from \"@medusajs/medusa/core-flows\";\nimport { StepResponse } from \"@medusajs/workflows-sdk\";\n\naddOrderLineItemsWorkflow.hooks.setPricingContext((\n { order, variantIds, region, customerData, additional_data }, { container }\n) => {\n return new StepResponse({\n location_id: \"sloc_123\", // Special price for in-store purchases\n });\n});\n```\n\nThe variants' prices will now be retrieved using the context you return.\n\n:::note\n\nLearn more about prices calculation context in the [Prices Calculation](https://docs.medusajs.com/resources/commerce-modules/pricing/price-calculation) documentation.\n\n:::","link":"#setPricingContext","depth":2},{"type":"hook","name":"setShippingOptionsContext","description":"This hook is executed after the cart is retrieved and before the shipping options are queried. You can consume this hook to return any custom context useful for the shipping options retrieval.\n\nFor example, you can consume the hook to add the customer Id to the context:\n\n```ts\nimport { listShippingOptionsForCartWithPricingWorkflow } from \"@medusajs/medusa/core-flows\"\nimport { StepResponse } from \"@medusajs/workflows-sdk\"\n\nlistShippingOptionsForCartWithPricingWorkflow.hooks.setShippingOptionsContext(\n async ({ cart }, { container }) => {\n\n if (cart.customer_id) {\n return new StepResponse({\n customer_id: cart.customer_id,\n })\n }\n\n const query = container.resolve(\"query\")\n\n const { data: carts } = await query.graph({\n entity: \"cart\",\n filters: {\n id: cart.id,\n },\n fields: [\"customer_id\"],\n })\n\n return new StepResponse({\n customer_id: carts[0].customer_id,\n })\n }\n)\n```\n\nThe `customer_id` property will be added to the context along with other properties such as `is_return` and `enabled_in_store`.\n\n:::note\n\nYou should also consume the `setShippingOptionsContext` hook in the listShippingOptionsForCartWorkflow workflow to ensure that the context is consistent when listing shipping options across workflows.\n\n:::","link":"#setShippingOptionsContext","depth":3},{"type":"step","name":"getTranslatedShippingOptionsStep","description":"This step applies translations to a list of shipping options based on the provided locale.\nIt modifies the shipping options in place and returns them.","link":"../../../../Common/Steps_Common/functions/core_flows.Common.Steps_Common.getTranslatedShippingOptionsStep/page.mdx","depth":4}]}} />
|
||||
|
||||
## Input
|
||||
|
||||
<TypeList types={[{"name":"ListShippingOptionsForCartWorkflowInput & AdditionalData","type":"[ListShippingOptionsForCartWorkflowInput](../../../../../types/types/types.ListShippingOptionsForCartWorkflowInput/page.mdx) & [AdditionalData](../../../../../types/HttpTypes/types/types.HttpTypes.AdditionalData/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ListShippingOptionsForCartWorkflowInput","type":"[ListShippingOptionsForCartWorkflowInput](../../../../../types/types/types.ListShippingOptionsForCartWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"The context for retrieving the shipping options.","expandable":false,"children":[{"name":"cart_id","type":"`string`","description":"The cart's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"option_ids","type":"`string`[]","description":"Specify the shipping options to retrieve their details.\nIf not specified, all applicable shipping options are retrieved.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fields","type":"`string`[]","description":"The fields and relations to retrieve in the shipping option. These fields\nare passed to [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query),\nso you can pass names of custom models linked to the shipping option.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_return","type":"`boolean`","description":"Whether to retrieve return shipping options.\nBy default, non-return shipping options are retrieved.","optional":true,"defaultValue":"false","expandable":false,"children":[]},{"name":"enabled_in_store","type":"`boolean`","description":"Whether to retrieve the shipping option's enabled in the store, which is the default.","optional":true,"defaultValue":"true","expandable":false,"children":[]}]},{"name":"AdditionalData","type":"[AdditionalData](../../../../../types/HttpTypes/types/types.HttpTypes.AdditionalData/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"additional_data","type":"`Record<string, unknown>`","description":"Additional data that can be passed through the `additional_data` property in HTTP requests.\n\nLearn more in [this documentation](https://docs.medusajs.com/learn/fundamentals/api-routes/additional-data).","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" openedLevel={1} sectionTitle="listShippingOptionsForCartWorkflow"/>
|
||||
|
||||
## Output
|
||||
|
||||
<TypeList types={[{"name":"any[]","type":"`any`[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"any","type":"`any`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" openedLevel={1} sectionTitle="listShippingOptionsForCartWorkflow"/>
|
||||
|
||||
## Hooks
|
||||
|
||||
Hooks allow you to inject custom functionalities into the workflow. You'll receive data from the workflow, as well as additional data sent through an HTTP request.
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ If you use this workflow in another, you must acquire a lock before running it a
|
||||
|
||||
:::
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/cart/workflows/refresh-cart-items.ts#L128" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/cart/workflows/refresh-cart-items.ts#L128" />
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ If you use this workflow in another, you must acquire a lock before running it a
|
||||
|
||||
:::
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/cart/workflows/refresh-cart-shipping-methods.ts#L54" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/cart/workflows/refresh-cart-shipping-methods.ts#L54" />
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ If you use this workflow in another, you must acquire a lock before running it a
|
||||
|
||||
:::
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/cart/workflows/refresh-payment-collection.ts#L58" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/cart/workflows/refresh-payment-collection.ts#L58" />
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
+5
-5
@@ -18,7 +18,7 @@ This documentation provides a reference to the `refundPaymentAndRecreatePaymentS
|
||||
|
||||
This workflow refunds a payment and creates a new payment session.
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/cart/workflows/refund-payment-recreate-payment-session.ts#L67" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/cart/workflows/refund-payment-recreate-payment-session.ts#L67" />
|
||||
|
||||
## Examples
|
||||
|
||||
@@ -43,7 +43,7 @@ export async function POST(
|
||||
"payment_collection_id": "{value}",
|
||||
"provider_id": "{value}",
|
||||
"payment_id": "{value}",
|
||||
"amount": 11
|
||||
"amount": 15
|
||||
}
|
||||
})
|
||||
|
||||
@@ -72,7 +72,7 @@ export default async function handleOrderPlaced({
|
||||
"payment_collection_id": "{value}",
|
||||
"provider_id": "{value}",
|
||||
"payment_id": "{value}",
|
||||
"amount": 11
|
||||
"amount": 15
|
||||
}
|
||||
})
|
||||
|
||||
@@ -101,7 +101,7 @@ export default async function myCustomJob(
|
||||
"payment_collection_id": "{value}",
|
||||
"provider_id": "{value}",
|
||||
"payment_id": "{value}",
|
||||
"amount": 11
|
||||
"amount": 15
|
||||
}
|
||||
})
|
||||
|
||||
@@ -130,7 +130,7 @@ const myWorkflow = createWorkflow(
|
||||
"payment_collection_id": "{value}",
|
||||
"provider_id": "{value}",
|
||||
"payment_id": "{value}",
|
||||
"amount": 11
|
||||
"amount": 15
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ If you use this workflow in another, you must acquire a lock before running it a
|
||||
|
||||
:::
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/cart/workflows/transfer-cart-customer.ts#L54" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/cart/workflows/transfer-cart-customer.ts#L54" />
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ If you use this workflow in another, you must acquire a lock before running it a
|
||||
|
||||
:::
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/cart/workflows/update-cart-promotions.ts#L83" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/cart/workflows/update-cart-promotions.ts#L83" />
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
+3
-3
@@ -44,7 +44,7 @@ If you use this workflow in another, you must acquire a lock before running it a
|
||||
|
||||
:::
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/cart/workflows/update-cart.ts#L82" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/cart/workflows/update-cart.ts#L82" />
|
||||
|
||||
## Examples
|
||||
|
||||
@@ -213,7 +213,7 @@ const myWorkflow = createWorkflow(
|
||||
|
||||
## Input
|
||||
|
||||
<TypeList types={[{"name":"UpdateCartWorkflowInput","type":"[UpdateCartWorkflowInput](../../../../types/core_flows.UpdateCartWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"The data to update the cart, along with custom data that's passed to the workflow's hooks.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the cart to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"promo_codes","type":"`string`[]","description":"An array of promotional codes applied on the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`string`","description":"The ID of the cart's region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the cart's customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the cart's sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email address of the cart's customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency code for the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"locale","type":"`null` \\| `string`","description":"The locale code for the cart in BCP 47 format.","optional":true,"defaultValue":"","expandable":false,"children":[],"since":"2.12.3"},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Custom key-value pairs of data related to the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"`null` \\| [UpdateAddressDTO](../../../../../cart/interfaces/cart.UpdateAddressDTO/page.mdx) \\| [CreateAddressDTO](../../../../../cart/interfaces/cart.CreateAddressDTO/page.mdx)","description":"The cart's shipping address. You can either update the cart's existing shipping address, or create a new one.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"The associated customer's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`string`","description":"The first name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The first line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The second line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The ISO two country code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The lower-case [ISO 3166-2](https://en.wikipedia.org/wiki/ISO\\_3166-2) province/state of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"billing_address","type":"`null` \\| [UpdateAddressDTO](../../../../../cart/interfaces/cart.UpdateAddressDTO/page.mdx) \\| [CreateAddressDTO](../../../../../cart/interfaces/cart.CreateAddressDTO/page.mdx)","description":"The cart's billing address. You can either update the cart's existing billing address, or create a new one.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"The associated customer's ID.","optional":true,"defaultValue":"","expLine truncated
|
||||
<TypeList types={[{"name":"UpdateCartWorkflowInput","type":"[UpdateCartWorkflowInput](../../../../types/core_flows.UpdateCartWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"The data to update the cart, along with custom data that's passed to the workflow's hooks.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the cart to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"promo_codes","type":"`string`[]","description":"An array of promotional codes applied on the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`string`","description":"The ID of the cart's region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the cart's customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the cart's sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email address of the cart's customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency code for the cart.","optional":true,"defaultValue":"","example":"usd","expandable":false,"children":[]},{"name":"locale","type":"`null` \\| `string`","description":"The locale code for the cart in BCP 47 format.","optional":true,"defaultValue":"","example":"\"en-US\"","expandable":false,"children":[],"since":"2.12.3"},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Custom key-value pairs of data related to the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"`null` \\| [UpdateAddressDTO](../../../../../cart/interfaces/cart.UpdateAddressDTO/page.mdx) \\| [CreateAddressDTO](../../../../../cart/interfaces/cart.CreateAddressDTO/page.mdx)","description":"The cart's shipping address. You can either update the cart's existing shipping address, or create a new one.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"The associated customer's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`string`","description":"The first name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The first line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The second line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The ISO two country code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The lower-case [ISO 3166-2](https://en.wikipedia.org/wiki/ISO\\_3166-2) province/state of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"billing_address","type":"`null` \\| [UpdateAddressDTO](../../../../../cart/interfaces/cart.UpdateAddressDTO/page.mdx) \\| [CreateAddressDTO](../../../../../cart/interfaces/cart.CreateAddressDTO/page.mdx)","description":"The cart's billing address. You can either update the cart's existing billing address, or create a new one.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"The associated customer's ID.",Line truncated
|
||||
|
||||
## Hooks
|
||||
|
||||
@@ -241,7 +241,7 @@ updateCartWorkflow.hooks.validate(
|
||||
|
||||
Handlers consuming this hook accept the following input.
|
||||
|
||||
<TypeList types={[{"name":"input","type":"[input](../../../core_flows.Cart.Workflows_Cart/page.mdx#__type-15)","description":"The input data for the hook.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"input","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"currency_code","type":"`any`","description":"","optional":false,"defaultValue":"data.region.currency_code","expandable":false,"children":[]},{"name":"region_id","type":"`any`","description":"","optional":false,"defaultValue":"data.region.id","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the cart to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the cart's customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the cart's sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email address of the cart's customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"locale","type":"`null` \\| `string`","description":"The locale code for the cart in BCP 47 format.","optional":true,"defaultValue":"","expandable":false,"children":[],"since":"2.12.3"},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Custom key-value pairs of data related to the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"`null` \\| [CreateAddressDTO](../../../../../cart/interfaces/cart.CreateAddressDTO/page.mdx) \\| [UpdateAddressDTO](../../../../../cart/interfaces/cart.UpdateAddressDTO/page.mdx)","description":"The cart's shipping address. You can either update the cart's existing shipping address, or create a new one.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address","type":"`null` \\| [CreateAddressDTO](../../../../../cart/interfaces/cart.CreateAddressDTO/page.mdx) \\| [UpdateAddressDTO](../../../../../cart/interfaces/cart.UpdateAddressDTO/page.mdx)","description":"The cart's billing address. You can either update the cart's existing billing address, or create a new one.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"cart","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" openedLevel={1} sectionTitle="validate"/>
|
||||
<TypeList types={[{"name":"input","type":"[input](../../../core_flows.Cart.Workflows_Cart/page.mdx#__type-15)","description":"The input data for the hook.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"input","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"currency_code","type":"`any`","description":"","optional":false,"defaultValue":"data.region.currency_code","expandable":false,"children":[]},{"name":"region_id","type":"`any`","description":"","optional":false,"defaultValue":"data.region.id","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the cart to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the cart's customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the cart's sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email address of the cart's customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"locale","type":"`null` \\| `string`","description":"The locale code for the cart in BCP 47 format.","optional":true,"defaultValue":"","example":"\"en-US\"","expandable":false,"children":[],"since":"2.12.3"},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Custom key-value pairs of data related to the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"`null` \\| [CreateAddressDTO](../../../../../cart/interfaces/cart.CreateAddressDTO/page.mdx) \\| [UpdateAddressDTO](../../../../../cart/interfaces/cart.UpdateAddressDTO/page.mdx)","description":"The cart's shipping address. You can either update the cart's existing shipping address, or create a new one.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address","type":"`null` \\| [CreateAddressDTO](../../../../../cart/interfaces/cart.CreateAddressDTO/page.mdx) \\| [UpdateAddressDTO](../../../../../cart/interfaces/cart.UpdateAddressDTO/page.mdx)","description":"The cart's billing address. You can either update the cart's existing billing address, or create a new one.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"cart","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" openedLevel={1} sectionTitle="validate"/>
|
||||
|
||||
### cartUpdated
|
||||
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ If you use this workflow in another, you must acquire a lock before running it a
|
||||
|
||||
:::
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/cart/workflows/update-line-item-in-cart.ts#L111" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/cart/workflows/update-line-item-in-cart.ts#L111" />
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ If you use this workflow in another, you must acquire a lock before running it a
|
||||
|
||||
:::
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/cart/workflows/update-tax-lines.ts#L124" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/cart/workflows/update-tax-lines.ts#L124" />
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
---
|
||||
slug: /references/medusa-workflows/steps/getTranslatedShippingOptionsStep
|
||||
sidebar_label: getTranslatedShippingOptionsStep
|
||||
tags:
|
||||
- step
|
||||
---
|
||||
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# getTranslatedShippingOptionsStep - Medusa Core Workflows Reference
|
||||
|
||||
This documentation provides a reference to the `getTranslatedShippingOptionsStep`. It belongs to the `@medusajs/medusa/core-flows` package.
|
||||
|
||||
This step applies translations to a list of shipping options based on the provided locale.
|
||||
It modifies the shipping options in place and returns them.
|
||||
|
||||
:::note
|
||||
|
||||
This is available starting from [Medusa v2.12.4](https://github.com/medusajs/medusa/releases/tag/v2.12.4).
|
||||
|
||||
:::
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
const translatedShippingOptions = getTranslatedShippingOptionsStep({
|
||||
shippingOptions: [
|
||||
{
|
||||
id: "so_123",
|
||||
name: "Standard Shipping",
|
||||
// ...
|
||||
}
|
||||
],
|
||||
locale: "fr-FR"
|
||||
})
|
||||
```
|
||||
|
||||
## Input
|
||||
|
||||
<TypeList types={[{"name":"GetTranslatedShippingOptionsStepInput","type":"[GetTranslatedShippingOptionsStepInput](../../../../interfaces/core_flows.GetTranslatedShippingOptionsStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"shippingOptions","type":"[ShippingOptionDTO](../../../../../fulfillment/interfaces/fulfillment.ShippingOptionDTO/page.mdx)[]","description":"The shipping options to be translated.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_type","type":"[ShippingOptionPriceType](../../../../../fulfillment/types/fulfillment.ShippingOptionPriceType/page.mdx)","description":"The type of the shipping option's price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone_id","type":"`string`","description":"The associated service zone's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_profile_id","type":"`string`","description":"The associated shipping profile's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated fulfillment provider's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_type_id","type":"`null` \\| `string`","description":"The associated shipping option type's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`null` \\| `Record<string, unknown>`","description":"The data necessary for the associated fulfillment provider to process the shipping option\nand, later, its associated fulfillments.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone","type":"[ServiceZoneDTO](../../../../../fulfillment/interfaces/fulfillment.ServiceZoneDTO/page.mdx)","description":"The associated service zone.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_set","type":"[FulfillmentSetDTO](../../../../../fulfillment/interfaces/fulfillment.FulfillmentSetDTO/page.mdx)","description":"The fulfillment set assoiated with the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_set_id","type":"`string`","description":"The fulfillment set id of the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"geo_zones","type":"[GeoZoneDTO](../../../../../fulfillment/interfaces/fulfillment.GeoZoneDTO/page.mdx)[]","description":"The geo zones assoiated with the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_options","type":"[ShippingOptionDTO](../../../../../fulfillment/interfaces/fulfillment.ShippingOptionDTO/page.mdx)[]","description":"The shipping options assoiated with the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The creation date of the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The update date of the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The deletion date of the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"shipping_profile","type":"[ShippingProfileDTO](../../../../../fulfillment/interfaces/fulfillment.ShippingProfileDTO/page.mdx)","description":"The associated shipping profile.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the shipping profile.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the shipping profile.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","tyLine truncated
|
||||
|
||||
## Output
|
||||
|
||||
<TypeList types={[{"name":"ShippingOptionDTO[]","type":"[ShippingOptionDTO](../../../../../fulfillment/interfaces/fulfillment.ShippingOptionDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_type","type":"[ShippingOptionPriceType](../../../../../fulfillment/types/fulfillment.ShippingOptionPriceType/page.mdx)","description":"The type of the shipping option's price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone_id","type":"`string`","description":"The associated service zone's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_profile_id","type":"`string`","description":"The associated shipping profile's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated fulfillment provider's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_type_id","type":"`null` \\| `string`","description":"The associated shipping option type's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`null` \\| `Record<string, unknown>`","description":"The data necessary for the associated fulfillment provider to process the shipping option\nand, later, its associated fulfillments.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone","type":"[ServiceZoneDTO](../../../../../fulfillment/interfaces/fulfillment.ServiceZoneDTO/page.mdx)","description":"The associated service zone.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_set","type":"[FulfillmentSetDTO](../../../../../fulfillment/interfaces/fulfillment.FulfillmentSetDTO/page.mdx)","description":"The fulfillment set assoiated with the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"`string`","description":"The type of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zones","type":"[ServiceZoneDTO](../../../../../fulfillment/interfaces/fulfillment.ServiceZoneDTO/page.mdx)[]","description":"The service zones associated with the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The creation date of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The update date of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The deletion date of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"fulfillment_set_id","type":"`string`","description":"The fulfillment set id of the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"geo_zones","type":"[GeoZoneDTO](../../../../../fulfillment/interfaces/fulfillment.GeoZoneDTO/page.mdx)[]","description":"The geo zones assoiated with the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the geo zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[GeoZoneType](../../../../../fulfillment/types/fulfillment.GeoZoneTypeLine truncated
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# getTranslatedShippingOptionsStepId
|
||||
|
||||
`Const` **getTranslatedShippingOptionsStepId**: `"get-translated-shipping-options"`
|
||||
+1
-1
@@ -20,7 +20,7 @@ manage links within your custom flows.
|
||||
|
||||
Learn more about links in [this documentation](https://docs.medusajs.com/learn/fundamentals/module-links/link).
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/common/workflows/batch-links.ts#L70" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/common/workflows/batch-links.ts#L70" />
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ create links within your custom flows.
|
||||
|
||||
Learn more about links in [this documentation](https://docs.medusajs.com/learn/fundamentals/module-links/link).
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/common/workflows/create-links.ts#L38" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/common/workflows/create-links.ts#L38" />
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ dismiss links within your custom flows.
|
||||
|
||||
Learn more about links in [this documentation](https://docs.medusajs.com/learn/fundamentals/module-links/link).
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/common/workflows/dismiss-links.ts#L38" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/common/workflows/dismiss-links.ts#L38" />
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ update links within your custom flows.
|
||||
|
||||
Learn more about links in [this documentation](https://docs.medusajs.com/learn/fundamentals/module-links/link).
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/common/workflows/update-links.ts#L43" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/common/workflows/update-links.ts#L43" />
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
+1
@@ -8,6 +8,7 @@ import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
- [dismissRemoteLinkStep](../Steps_Common/functions/core_flows.Common.Steps_Common.dismissRemoteLinkStep/page.mdx)
|
||||
- [emitEventStep](../Steps_Common/functions/core_flows.Common.Steps_Common.emitEventStep/page.mdx)
|
||||
- [getTranslatedLineItemsStep](../Steps_Common/functions/core_flows.Common.Steps_Common.getTranslatedLineItemsStep/page.mdx)
|
||||
- [getTranslatedShippingOptionsStep](../Steps_Common/functions/core_flows.Common.Steps_Common.getTranslatedShippingOptionsStep/page.mdx)
|
||||
- [removeRemoteLinkStep](../Steps_Common/functions/core_flows.Common.Steps_Common.removeRemoteLinkStep/page.mdx)
|
||||
- [updateRemoteLinksStep](../Steps_Common/functions/core_flows.Common.Steps_Common.updateRemoteLinksStep/page.mdx)
|
||||
- [useQueryGraphStep](../Steps_Common/functions/core_flows.Common.Steps_Common.useQueryGraphStep/page.mdx)
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ Learn more about basic authentication flows in [this documentation](https://docs
|
||||
You can use this workflow within your customizations or your own custom workflows, allowing you to
|
||||
register or create customer accounts within your custom flows.
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/customer/workflows/create-customer-account.ts#L54" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/customer/workflows/create-customer-account.ts#L54" />
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ allows you to create custom data models linked to the addresses.
|
||||
|
||||
You can also use this workflow within your customizations or your own custom workflows, allowing you to wrap custom logic around creating customer addresses.
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/customer/workflows/create-addresses.ts#L75" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/customer/workflows/create-addresses.ts#L75" />
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ This workflow has a hook that allows you to perform custom actions on the create
|
||||
|
||||
You can also use this workflow within your customizations or your own custom workflows, allowing you to wrap custom logic around creating customers.
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/customer/workflows/create-customers.ts#L57" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/customer/workflows/create-customers.ts#L57" />
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ relevant to that module.
|
||||
You can use this workflow within your customizations or your own custom workflows, allowing you to
|
||||
delete customer addresses in your custom flows.
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/customer/workflows/delete-addresses.ts#L52" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/customer/workflows/delete-addresses.ts#L52" />
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ This workflow deletes one or more customers. It's used by the
|
||||
You can use this workflow within your customizations or your own custom workflows, allowing you to
|
||||
delete customers in your custom flows.
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/customer/workflows/delete-customers.ts#L46" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/customer/workflows/delete-customers.ts#L46" />
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ custom actions after the customers are deleted.
|
||||
|
||||
:::
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/customer/workflows/remove-customer-account.ts#L43" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/customer/workflows/remove-customer-account.ts#L43" />
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ allows you to update custom data models linked to the addresses.
|
||||
|
||||
You can also use this workflow within your customizations or your own custom workflows, allowing you to wrap custom logic around updating customer addresses.
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/customer/workflows/update-addresses.ts#L66" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/customer/workflows/update-addresses.ts#L66" />
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ custom data models linked to the customers.
|
||||
|
||||
You can also use this workflow within your customizations or your own custom workflows, allowing you to wrap custom logic around updating customers.
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/customer/workflows/update-customers.ts#L60" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/customer/workflows/update-customers.ts#L60" />
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ const myWorkflow = createWorkflow(
|
||||
"my-workflow",
|
||||
() => {
|
||||
const data = createCustomerGroupsStep({
|
||||
"name": "Kailey"
|
||||
"name": "Carlo"
|
||||
})
|
||||
}
|
||||
)
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ You can use this workflow within your customizations or your own custom workflow
|
||||
create customer groups within your custom flows. For example, you can create customer groups to segregate
|
||||
customers by age group or purchase habits.
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/customer-group/workflows/create-customer-groups.ts#L52" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/customer-group/workflows/create-customer-groups.ts#L52" />
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ This workflow deletes one or more customer groups. It's used by the
|
||||
You can use this workflow within your customizations or your own custom workflows, allowing you to
|
||||
delete customer groups within your custom flows.
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/customer-group/workflows/delete-customer-groups.ts#L34" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/customer-group/workflows/delete-customer-groups.ts#L34" />
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ This workflow manages the customer groups a customer is in. It's used by the
|
||||
You can use this workflow within your customizations or your own custom workflows, allowing you to
|
||||
manage the customer groups of a customer in your custom flow.
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/customer-group/workflows/link-customer-groups-customer.ts#L37" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/customer-group/workflows/link-customer-groups-customer.ts#L37" />
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ This workflow manages the customers of a customer group. It's used by the
|
||||
You can use this workflow within your customizations or your own custom workflows, allowing you to
|
||||
manage the customers of a customer group within your custom flows.
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/customer-group/workflows/link-customers-customer-group.ts#L37" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/customer-group/workflows/link-customers-customer-group.ts#L37" />
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ This workflow updates one or more customer groups. It's used by the
|
||||
You can use this workflow within your customizations or your own custom workflows, allowing you to
|
||||
update customer groups within your custom flows.
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/customer-group/workflows/update-customer-groups.ts#L57" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/customer-group/workflows/update-customer-groups.ts#L57" />
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
+5
-2
@@ -5,7 +5,10 @@ sidebar_description: Create default data for a Medusa application.
|
||||
tags:
|
||||
- sales channel
|
||||
- store
|
||||
- query
|
||||
- api key
|
||||
- workflow
|
||||
- link
|
||||
---
|
||||
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
@@ -21,7 +24,7 @@ to create the default data, if not existing, when the application is first start
|
||||
You can use this workflow within your customizations or your own custom workflows, allowing you to
|
||||
create default data within your custom flows, such as seed scripts.
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/defaults/workflows/create-defaults.ts#L25" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/defaults/workflows/create-defaults.ts#L32" />
|
||||
|
||||
## Examples
|
||||
|
||||
@@ -114,7 +117,7 @@ const myWorkflow = createWorkflow(
|
||||
|
||||
## Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"createDefaultsWorkflow","steps":[{"type":"step","name":"createDefaultSalesChannelStep","description":"This step creates a default sales channel if none exist in the application. \nThis is useful when creating seed scripts.","link":"../../../../Sales_Channel/Steps_Sales_Channel/functions/core_flows.Sales_Channel.Steps_Sales_Channel.createDefaultSalesChannelStep/page.mdx","depth":1},{"type":"step","name":"createDefaultStoreStep","description":"This step creates a default store. Useful if creating a workflow\nthat seeds data into Medusa.","link":"../../../Steps_Defaults/functions/core_flows.Defaults.Steps_Defaults.createDefaultStoreStep/page.mdx","depth":2}]}} />
|
||||
<WorkflowDiagram workflow={{"name":"createDefaultsWorkflow","steps":[{"type":"step","name":"createDefaultSalesChannelStep","description":"This step creates a default sales channel if none exist in the application. \nThis is useful when creating seed scripts.","link":"../../../../Sales_Channel/Steps_Sales_Channel/functions/core_flows.Sales_Channel.Steps_Sales_Channel.createDefaultSalesChannelStep/page.mdx","depth":1},{"type":"step","name":"createDefaultStoreStep","description":"This step creates a default store. Useful if creating a workflow\nthat seeds data into Medusa.","link":"../../../Steps_Defaults/functions/core_flows.Defaults.Steps_Defaults.createDefaultStoreStep/page.mdx","depth":2},{"type":"step","name":"useQueryGraphStep","description":"This step fetches data across modules using the Query.\n\nLearn more in the [Query documentation](https://docs.medusajs.com/learn/fundamentals/module-links/query).","link":"../../../../Common/Steps_Common/functions/core_flows.Common.Steps_Common.useQueryGraphStep/page.mdx","depth":3},{"type":"when","condition":"!publishableApiKey?.data","depth":"4","steps":[{"type":"step","name":"createApiKeysStep","description":"This step creates one or more API keys.","link":"../../../../Api_Key/Steps_Api_Key/functions/core_flows.Api_Key.Steps_Api_Key.createApiKeysStep/page.mdx","depth":4},{"type":"workflow","name":"linkSalesChannelsToApiKeyWorkflow","description":"Manage the sales channels of a publishable API key.","link":"../../../../Api_Key/Workflows_Api_Key/functions/core_flows.Api_Key.Workflows_Api_Key.linkSalesChannelsToApiKeyWorkflow/page.mdx","depth":4}]}]}} />
|
||||
|
||||
## Output
|
||||
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ If you use this workflow in another, you must acquire a lock before running it a
|
||||
|
||||
:::
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/draft-order/workflows/add-draft-order-items.ts#L51" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/draft-order/workflows/add-draft-order-items.ts#L51" />
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ If you use this workflow in another, you must acquire a lock before running it a
|
||||
|
||||
:::
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/draft-order/workflows/add-draft-order-promotions.ts#L65" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/draft-order/workflows/add-draft-order-promotions.ts#L65" />
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
+2
-2
@@ -29,7 +29,7 @@ If you use this workflow in another, you must acquire a lock before running it a
|
||||
|
||||
:::
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/draft-order/workflows/add-draft-order-shipping-methods.ts#L99" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/draft-order/workflows/add-draft-order-shipping-methods.ts#L100" />
|
||||
|
||||
## Examples
|
||||
|
||||
@@ -150,7 +150,7 @@ const myWorkflow = createWorkflow(
|
||||
|
||||
## Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"addDraftOrderShippingMethodsWorkflow","steps":[{"type":"step","name":"acquireLockStep","description":"This step acquires a lock for a given key. Learn more about locks in the [Locking Module](https://docs.medusajs.com/resources/infrastructure-modules/locking)\nguide.","link":"../../../../Locking/Steps_Locking/functions/core_flows.Locking.Steps_Locking.acquireLockStep/page.mdx","depth":1},{"type":"workflow","name":"updateOrderTaxLinesWorkflow","description":"Update the tax lines of items and shipping methods in an order.","link":"../../../../Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateOrderTaxLinesWorkflow/page.mdx","depth":2},{"type":"when","condition":"appliedPromoCodes.length > 0","depth":"3","steps":[{"type":"workflow","name":"computeDraftOrderAdjustmentsWorkflow","description":"Refresh the promotions in a draft order.","link":"../core_flows.Draft_Order.Workflows_Draft_Order.computeDraftOrderAdjustmentsWorkflow/page.mdx","depth":3}]},{"type":"workflow","name":"createOrderChangeActionsWorkflow","description":"Create an order change action.","link":"../../../../Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createOrderChangeActionsWorkflow/page.mdx","depth":4},{"type":"step","name":"releaseLockStep","description":"This step releases a lock for a given key. Learn more about locks in the [Locking Module](https://docs.medusajs.com/resources/infrastructure-modules/locking)\nguide.","link":"../../../../Locking/Steps_Locking/functions/core_flows.Locking.Steps_Locking.releaseLockStep/page.mdx","depth":5},{"type":"step","name":"previewOrderChangeStep","description":"This step retrieves a preview of an order change.","link":"../../../../Order/Steps_Order/functions/core_flows.Order.Steps_Order.previewOrderChangeStep/page.mdx","depth":6}]}} />
|
||||
<WorkflowDiagram workflow={{"name":"addDraftOrderShippingMethodsWorkflow","steps":[{"type":"step","name":"acquireLockStep","description":"This step acquires a lock for a given key. Learn more about locks in the [Locking Module](https://docs.medusajs.com/resources/infrastructure-modules/locking)\nguide.","link":"../../../../Locking/Steps_Locking/functions/core_flows.Locking.Steps_Locking.acquireLockStep/page.mdx","depth":1},{"type":"step","name":"getTranslatedShippingOptionsStep","description":"This step applies translations to a list of shipping options based on the provided locale.\nIt modifies the shipping options in place and returns them.","link":"../../../../Common/Steps_Common/functions/core_flows.Common.Steps_Common.getTranslatedShippingOptionsStep/page.mdx","depth":2},{"type":"workflow","name":"updateOrderTaxLinesWorkflow","description":"Update the tax lines of items and shipping methods in an order.","link":"../../../../Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateOrderTaxLinesWorkflow/page.mdx","depth":3},{"type":"when","condition":"appliedPromoCodes.length > 0","depth":"4","steps":[{"type":"workflow","name":"computeDraftOrderAdjustmentsWorkflow","description":"Refresh the promotions in a draft order.","link":"../core_flows.Draft_Order.Workflows_Draft_Order.computeDraftOrderAdjustmentsWorkflow/page.mdx","depth":4}]},{"type":"workflow","name":"createOrderChangeActionsWorkflow","description":"Create an order change action.","link":"../../../../Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createOrderChangeActionsWorkflow/page.mdx","depth":5},{"type":"step","name":"releaseLockStep","description":"This step releases a lock for a given key. Learn more about locks in the [Locking Module](https://docs.medusajs.com/resources/infrastructure-modules/locking)\nguide.","link":"../../../../Locking/Steps_Locking/functions/core_flows.Locking.Steps_Locking.releaseLockStep/page.mdx","depth":6},{"type":"step","name":"previewOrderChangeStep","description":"This step retrieves a preview of an order change.","link":"../../../../Order/Steps_Order/functions/core_flows.Order.Steps_Order.previewOrderChangeStep/page.mdx","depth":7}]}} />
|
||||
|
||||
## Input
|
||||
|
||||
|
||||
+2
-2
@@ -28,7 +28,7 @@ If you use this workflow in another, you must acquire a lock before running it a
|
||||
|
||||
:::
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/draft-order/workflows/begin-draft-order-edit.ts#L36" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/draft-order/workflows/begin-draft-order-edit.ts#L36" />
|
||||
|
||||
## Examples
|
||||
|
||||
@@ -145,7 +145,7 @@ const myWorkflow = createWorkflow(
|
||||
|
||||
## Input
|
||||
|
||||
<TypeList types={[{"name":"BeginorderEditWorkflowInput","type":"[BeginorderEditWorkflowInput](../../../../../types/WorkflowTypes/OrderWorkflow/interfaces/types.WorkflowTypes.OrderWorkflow.BeginorderEditWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"order_id","type":"`string`","description":"The ID of the order to request an edit for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`string`","description":"The ID of the user requesting the order edit.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"internal_note","type":"`string`","description":"A note viewed by admins only related to the order edit.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"Describes the reason for the order edit.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Custom key-value pairs of data to store in the order edit.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" openedLevel={1} sectionTitle="beginDraftOrderEditWorkflow"/>
|
||||
<TypeList types={[{"name":"BeginorderEditWorkflowInput","type":"[BeginorderEditWorkflowInput](../../../../../types/WorkflowTypes/OrderWorkflow/interfaces/types.WorkflowTypes.OrderWorkflow.BeginorderEditWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"order_id","type":"`string`","description":"The ID of the order to request an edit for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`string`","description":"The ID of the user requesting the order edit.","optional":true,"defaultValue":"","example":"\"user_123\"","expandable":false,"children":[]},{"name":"internal_note","type":"`string`","description":"A note viewed by admins only related to the order edit.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"Describes the reason for the order edit.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Custom key-value pairs of data to store in the order edit.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" openedLevel={1} sectionTitle="beginDraftOrderEditWorkflow"/>
|
||||
|
||||
## Output
|
||||
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ If you use this workflow in another, you must acquire a lock before running it a
|
||||
|
||||
:::
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/draft-order/workflows/cancel-draft-order-edit.ts#L53" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/draft-order/workflows/cancel-draft-order-edit.ts#L53" />
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ If you use this workflow in another, you must acquire a lock before running it a
|
||||
|
||||
:::
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/draft-order/workflows/compute-draft-order-adjustments.ts#L61" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/draft-order/workflows/compute-draft-order-adjustments.ts#L61" />
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ If you use this workflow in another, you must acquire a lock before running it a
|
||||
|
||||
:::
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/draft-order/workflows/confirm-draft-order-edit.ts#L43" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/draft-order/workflows/confirm-draft-order-edit.ts#L43" />
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ const myWorkflow = createWorkflow(
|
||||
"my-workflow",
|
||||
() => {
|
||||
const data = convertDraftOrderStep({
|
||||
"id": "id_oHcJdnQdnaZa1EqNOm5"
|
||||
"id": "id_LGk1XpX6G1MIKubRr94e"
|
||||
})
|
||||
}
|
||||
)
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ If you use this workflow in another, you must acquire a lock before running it a
|
||||
|
||||
:::
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/draft-order/workflows/convert-draft-order.ts#L109" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/draft-order/workflows/convert-draft-order.ts#L109" />
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ This workflow deletes draft orders. It's used by the [Delete Draft Order API rou
|
||||
|
||||
You can also use this workflow within your customizations or your own custom workflows, allowing you to wrap custom logic around deleting a draft order.
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/draft-order/workflows/delete-draft-order.ts#L59" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/draft-order/workflows/delete-draft-order.ts#L59" />
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ If you use this workflow in another, you must acquire a lock before running it a
|
||||
|
||||
:::
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/draft-order/workflows/remove-draft-order-action-item.ts#L49" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/draft-order/workflows/remove-draft-order-action-item.ts#L49" />
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ If you use this workflow in another, you must acquire a lock before running it a
|
||||
|
||||
:::
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/draft-order/workflows/remove-draft-order-action-shipping-method.ts#L53" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/draft-order/workflows/remove-draft-order-action-shipping-method.ts#L53" />
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ If you use this workflow in another, you must acquire a lock before running it a
|
||||
|
||||
:::
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/draft-order/workflows/remove-draft-order-promotions.ts#L66" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/draft-order/workflows/remove-draft-order-promotions.ts#L66" />
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ If you use this workflow in another, you must acquire a lock before running it a
|
||||
|
||||
:::
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/draft-order/workflows/remove-draft-order-shipping-method.ts#L57" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/draft-order/workflows/remove-draft-order-shipping-method.ts#L57" />
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ If you use this workflow in another, you must acquire a lock before running it a
|
||||
|
||||
:::
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/draft-order/workflows/request-draft-order-edit.ts#L72" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/draft-order/workflows/request-draft-order-edit.ts#L72" />
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ If you use this workflow in another, you must acquire a lock before running it a
|
||||
|
||||
:::
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/draft-order/workflows/update-draft-order-action-item.ts#L52" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/draft-order/workflows/update-draft-order-action-item.ts#L52" />
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ If you use this workflow in another, you must acquire a lock before running it a
|
||||
|
||||
:::
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/774bbf68b2397e995bfbaf67198ab8d774373b2e/packages/core/core-flows/src/draft-order/workflows/update-draft-order-action-shipping-method.ts#L57" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/a960fb75c9f662372fd5cd623f883f9d6d8ad473/packages/core/core-flows/src/draft-order/workflows/update-draft-order-action-shipping-method.ts#L57" />
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
Loaded 100 of 1359 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user