From 98e77fad896f58589ee6560ee27d14b8d697a062 Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Tue, 14 Jan 2025 11:52:50 +0200 Subject: [PATCH] docs-util: reorder workflow execution examples (#10955) * docs-util: reorder workflow execution examples * reorder again * add examples header --- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../api_key.FilterableApiKeyProps/page.mdx | 2 +- .../api_key.JoinerServiceConfig/page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../auth.FilterableAuthIdentityProps/page.mdx | 2 +- .../page.mdx | 2 +- .../auth.JoinerServiceConfig/page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 6 +- .../page.mdx | 4 +- .../page.mdx | 4 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../cart.FilterableAddressProps/page.mdx | 2 +- .../cart.FilterableCartProps/page.mdx | 2 +- .../page.mdx | 2 +- .../cart.FilterableLineItemProps/page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../cart.JoinerServiceConfig/page.mdx | 2 +- .../interfaces/cart.UpdateCartDTO/page.mdx | 2 +- .../cart.UpdateCartDataDTO/page.mdx | 2 +- .../cart.UpdateLineItemDTO/page.mdx | 2 +- .../page.mdx | 2 +- .../cart.UpdateShippingMethodDTO/page.mdx | 2 +- .../page.mdx | 4 +- .../page.mdx | 2 +- .../page.mdx | 62 ++-- .../page.mdx | 52 +-- .../page.mdx | 48 +-- .../page.mdx | 48 +-- .../page.mdx | 44 +-- .../page.mdx | 48 +-- .../page.mdx | 4 +- .../page.mdx | 6 +- .../page.mdx | 2 +- .../page.mdx | 8 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 72 ++-- .../page.mdx | 8 +- .../page.mdx | 2 +- .../page.mdx | 4 +- .../page.mdx | 2 +- .../page.mdx | 18 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 12 +- .../page.mdx | 76 ++--- .../page.mdx | 2 +- .../page.mdx | 54 +-- .../page.mdx | 54 +-- .../page.mdx | 48 +-- .../page.mdx | 90 ++--- .../page.mdx | 58 ++-- .../page.mdx | 42 +-- .../page.mdx | 42 +-- .../page.mdx | 42 +-- .../page.mdx | 42 +-- .../page.mdx | 50 +-- .../page.mdx | 42 +-- .../page.mdx | 68 ++-- .../page.mdx | 46 +-- .../page.mdx | 42 +-- .../page.mdx | 106 +++--- .../page.mdx | 38 ++- .../page.mdx | 42 +-- .../page.mdx | 42 +-- .../page.mdx | 42 +-- .../page.mdx | 44 +-- .../page.mdx | 84 ++--- .../page.mdx | 56 ++-- .../page.mdx | 52 +-- .../page.mdx | 52 +-- .../page.mdx | 42 +-- .../page.mdx | 58 ++-- .../page.mdx | 52 +-- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 52 +-- .../page.mdx | 52 +-- .../page.mdx | 48 +-- .../page.mdx | 48 +-- .../page.mdx | 44 +-- .../page.mdx | 34 +- .../page.mdx | 52 +-- .../page.mdx | 52 +-- .../page.mdx | 14 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 4 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 38 ++- .../page.mdx | 54 +-- .../page.mdx | 48 +-- .../page.mdx | 70 ++-- .../page.mdx | 70 ++-- .../page.mdx | 54 +-- .../page.mdx | 58 ++-- .../page.mdx | 88 ++--- .../page.mdx | 54 +-- .../page.mdx | 52 +-- .../page.mdx | 52 +-- .../page.mdx | 52 +-- .../page.mdx | 48 +-- .../page.mdx | 48 +-- .../page.mdx | 44 +-- .../page.mdx | 48 +-- .../page.mdx | 44 +-- .../page.mdx | 144 ++++---- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 4 +- .../page.mdx | 38 ++- .../page.mdx | 56 ++-- .../page.mdx | 46 +-- .../page.mdx | 48 +-- .../page.mdx | 42 +-- .../page.mdx | 38 ++- .../page.mdx | 52 +-- .../page.mdx | 48 +-- .../page.mdx | 14 +- .../page.mdx | 2 +- .../page.mdx | 46 +-- .../page.mdx | 52 +-- .../page.mdx | 52 +-- .../page.mdx | 46 +-- .../page.mdx | 54 +-- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 4 +- .../page.mdx | 8 +- .../page.mdx | 8 +- .../page.mdx | 6 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 4 +- .../page.mdx | 142 ++++---- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 234 ++++++------- .../page.mdx | 44 +-- .../page.mdx | 56 ++-- .../page.mdx | 46 +-- .../page.mdx | 72 ++-- .../page.mdx | 50 +-- .../page.mdx | 42 +-- .../page.mdx | 42 +-- .../page.mdx | 100 +++--- .../page.mdx | 94 +++--- .../page.mdx | 66 ++-- .../page.mdx | 42 +-- .../page.mdx | 136 ++++---- .../page.mdx | 42 +-- .../page.mdx | 172 +++++----- .../page.mdx | 42 +-- .../page.mdx | 218 ++++++------ .../page.mdx | 42 +-- .../page.mdx | 202 ++++++------ .../page.mdx | 42 +-- .../page.mdx | 8 +- .../page.mdx | 6 +- .../page.mdx | 48 +-- .../page.mdx | 42 +-- .../page.mdx | 42 +-- .../page.mdx | 128 ++++---- .../page.mdx | 50 +-- .../page.mdx | 46 +-- .../page.mdx | 42 +-- .../page.mdx | 204 ++++++------ .../page.mdx | 240 +++++++------- .../page.mdx | 42 +-- .../page.mdx | 42 +-- .../page.mdx | 10 +- .../page.mdx | 42 +-- .../page.mdx | 186 +++++------ .../page.mdx | 96 +++--- .../page.mdx | 48 +-- .../page.mdx | 256 +++++++-------- .../page.mdx | 42 +-- .../page.mdx | 198 +++++------ .../page.mdx | 42 +-- .../page.mdx | 154 ++++----- .../page.mdx | 42 +-- .../page.mdx | 224 ++++++------- .../page.mdx | 42 +-- .../page.mdx | 244 +++++++------- .../page.mdx | 42 +-- .../page.mdx | 62 ++-- .../page.mdx | 210 ++++++------ .../page.mdx | 42 +-- .../page.mdx | 4 +- .../page.mdx | 214 ++++++------ .../page.mdx | 42 +-- .../page.mdx | 120 +++---- .../page.mdx | 48 +-- .../page.mdx | 42 +-- .../page.mdx | 200 +++++------ .../page.mdx | 44 +-- .../page.mdx | 56 ++-- .../page.mdx | 50 +-- .../page.mdx | 58 ++-- .../page.mdx | 80 ++--- .../page.mdx | 38 ++- .../page.mdx | 294 ++++++++--------- .../page.mdx | 44 +-- .../page.mdx | 102 +++--- .../page.mdx | 48 +-- .../page.mdx | 44 +-- .../page.mdx | 188 +++++------ .../page.mdx | 52 +-- .../page.mdx | 52 +-- .../page.mdx | 48 +-- .../page.mdx | 110 +++---- .../page.mdx | 62 ++-- .../page.mdx | 198 +++++------ .../page.mdx | 294 ++++++++--------- .../page.mdx | 48 +-- .../page.mdx | 46 +-- .../page.mdx | 44 +-- .../page.mdx | 44 +-- .../page.mdx | 242 +++++++------- .../page.mdx | 56 ++-- .../page.mdx | 192 +++++------ .../page.mdx | 62 ++-- .../page.mdx | 268 +++++++-------- .../page.mdx | 64 ++-- .../page.mdx | 198 +++++------ .../page.mdx | 56 ++-- .../page.mdx | 216 ++++++------ .../page.mdx | 62 ++-- .../page.mdx | 56 ++-- .../page.mdx | 64 ++-- .../page.mdx | 190 +++++------ .../page.mdx | 62 ++-- .../page.mdx | 4 +- .../page.mdx | 152 ++++----- .../page.mdx | 62 ++-- .../page.mdx | 44 +-- .../page.mdx | 248 +++++++------- .../page.mdx | 266 +++++++-------- .../page.mdx | 152 ++++----- .../page.mdx | 44 +-- .../page.mdx | 262 +++++++-------- .../page.mdx | 146 ++++----- .../page.mdx | 44 +-- .../page.mdx | 44 +-- .../page.mdx | 44 +-- .../page.mdx | 44 +-- .../page.mdx | 254 +++++++------- .../page.mdx | 44 +-- .../page.mdx | 44 +-- .../page.mdx | 224 ++++++------- .../page.mdx | 158 ++++----- .../page.mdx | 44 +-- .../page.mdx | 276 ++++++++-------- .../page.mdx | 184 +++++------ .../page.mdx | 44 +-- .../page.mdx | 188 +++++------ .../page.mdx | 62 ++-- .../page.mdx | 252 +++++++------- .../page.mdx | 42 +-- .../page.mdx | 76 ++--- .../page.mdx | 46 +-- .../page.mdx | 10 +- .../page.mdx | 8 +- .../page.mdx | 188 +++++------ .../page.mdx | 46 +-- .../page.mdx | 266 +++++++-------- .../page.mdx | 46 +-- .../page.mdx | 142 ++++---- .../page.mdx | 46 +-- .../page.mdx | 184 +++++------ .../page.mdx | 46 +-- .../page.mdx | 106 +++--- .../page.mdx | 46 +-- .../page.mdx | 48 +-- .../page.mdx | 48 +-- .../page.mdx | 184 +++++------ .../page.mdx | 46 +-- .../page.mdx | 154 ++++----- .../page.mdx | 46 +-- .../page.mdx | 100 +++--- .../page.mdx | 46 +-- .../page.mdx | 42 +-- .../page.mdx | 96 +++--- .../page.mdx | 50 +-- .../page.mdx | 276 ++++++++-------- .../page.mdx | 46 +-- .../page.mdx | 234 ++++++------- .../page.mdx | 46 +-- .../page.mdx | 148 ++++----- .../page.mdx | 46 +-- .../page.mdx | 172 +++++----- .../page.mdx | 42 +-- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 42 +-- .../page.mdx | 38 ++- .../page.mdx | 42 +-- .../page.mdx | 42 +-- .../page.mdx | 4 +- .../page.mdx | 94 +++--- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 44 +-- .../page.mdx | 46 +-- .../page.mdx | 52 +-- .../page.mdx | 48 +-- .../page.mdx | 2 +- .../page.mdx | 4 +- .../page.mdx | 2 +- .../page.mdx | 88 ++--- .../page.mdx | 68 ++-- .../page.mdx | 60 ++-- .../page.mdx | 52 +-- .../page.mdx | 52 +-- .../page.mdx | 66 ++-- .../page.mdx | 52 +-- .../page.mdx | 42 +-- .../page.mdx | 42 +-- .../page.mdx | 44 +-- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 10 +- .../page.mdx | 4 +- .../page.mdx | 48 +-- .../page.mdx | 48 +-- .../page.mdx | 38 ++- .../page.mdx | 38 ++- .../page.mdx | 52 +-- .../page.mdx | 64 ++-- .../page.mdx | 46 +-- .../page.mdx | 46 +-- .../page.mdx | 70 ++-- .../page.mdx | 84 ++--- .../page.mdx | 52 +-- .../page.mdx | 52 +-- .../page.mdx | 52 +-- .../page.mdx | 52 +-- .../page.mdx | 52 +-- .../page.mdx | 52 +-- .../page.mdx | 46 +-- .../page.mdx | 44 +-- .../page.mdx | 44 +-- .../page.mdx | 58 ++-- .../page.mdx | 44 +-- .../page.mdx | 38 ++- .../page.mdx | 310 +++++++++--------- .../page.mdx | 304 ++++++++--------- .../page.mdx | 54 +-- .../page.mdx | 2 +- .../page.mdx | 52 +-- .../page.mdx | 42 +-- .../page.mdx | 44 +-- .../page.mdx | 4 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 48 +-- .../page.mdx | 58 ++-- .../page.mdx | 66 ++-- .../page.mdx | 70 ++-- .../page.mdx | 68 ++-- .../page.mdx | 52 +-- .../page.mdx | 60 ++-- .../page.mdx | 52 +-- .../page.mdx | 56 ++-- .../page.mdx | 52 +-- .../page.mdx | 54 +-- .../page.mdx | 2 +- .../page.mdx | 54 +-- .../page.mdx | 52 +-- .../page.mdx | 44 +-- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 56 ++-- .../page.mdx | 52 +-- .../page.mdx | 38 ++- .../page.mdx | 52 +-- .../page.mdx | 48 +-- .../page.mdx | 52 +-- .../page.mdx | 44 +-- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 52 +-- .../page.mdx | 52 +-- .../page.mdx | 48 +-- .../page.mdx | 44 +-- .../page.mdx | 52 +-- .../page.mdx | 2 +- .../page.mdx | 56 ++-- .../page.mdx | 52 +-- .../page.mdx | 52 +-- .../page.mdx | 48 +-- .../page.mdx | 44 +-- .../page.mdx | 38 ++- .../page.mdx | 52 +-- .../page.mdx | 44 +-- .../page.mdx | 2 +- .../page.mdx | 132 ++++---- .../page.mdx | 2 +- .../page.mdx | 50 +-- .../page.mdx | 50 +-- .../page.mdx | 42 +-- .../page.mdx | 52 +-- .../page.mdx | 52 +-- .../page.mdx | 52 +-- .../page.mdx | 52 +-- .../page.mdx | 44 +-- .../page.mdx | 48 +-- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 54 +-- .../page.mdx | 52 +-- .../page.mdx | 52 +-- .../page.mdx | 42 +-- .../page.mdx | 52 +-- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../currency.FilterableCurrencyProps/page.mdx | 2 +- .../currency.JoinerServiceConfig/page.mdx | 2 +- .../resources/helpers/workflow-examples.ts | 42 +-- 473 files changed, 13139 insertions(+), 12637 deletions(-) diff --git a/www/apps/resources/references/api_key/IApiKeyModuleService/methods/api_key.IApiKeyModuleService.listAndCountApiKeys/page.mdx b/www/apps/resources/references/api_key/IApiKeyModuleService/methods/api_key.IApiKeyModuleService.listAndCountApiKeys/page.mdx index 2de06ef902..9762ebd40a 100644 --- a/www/apps/resources/references/api_key/IApiKeyModuleService/methods/api_key.IApiKeyModuleService.listAndCountApiKeys/page.mdx +++ b/www/apps/resources/references/api_key/IApiKeyModuleService/methods/api_key.IApiKeyModuleService.listAndCountApiKeys/page.mdx @@ -46,7 +46,7 @@ const [apiKeys, count] = ## Parameters -`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record`","description":"Enable ORM specific defined options","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/api_key.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/api_key.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listAndCountApiKeys"/> +`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record`","description":"Enable ORM specific defined options","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/api_key.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/api_key.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listAndCountApiKeys"/> ## Returns diff --git a/www/apps/resources/references/api_key/IApiKeyModuleService/methods/api_key.IApiKeyModuleService.listApiKeys/page.mdx b/www/apps/resources/references/api_key/IApiKeyModuleService/methods/api_key.IApiKeyModuleService.listApiKeys/page.mdx index 415233623b..6dff561ecf 100644 --- a/www/apps/resources/references/api_key/IApiKeyModuleService/methods/api_key.IApiKeyModuleService.listApiKeys/page.mdx +++ b/www/apps/resources/references/api_key/IApiKeyModuleService/methods/api_key.IApiKeyModuleService.listApiKeys/page.mdx @@ -44,7 +44,7 @@ const apiKeys = await apiKeyModuleService.listApiKeys( ## Parameters -`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record`","description":"Enable ORM specific defined options","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/api_key.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/api_key.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listApiKeys"/> +`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record`","description":"Enable ORM specific defined options","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/api_key.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/api_key.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listApiKeys"/> ## Returns diff --git a/www/apps/resources/references/api_key/IApiKeyModuleService/methods/api_key.IApiKeyModuleService.revoke/page.mdx b/www/apps/resources/references/api_key/IApiKeyModuleService/methods/api_key.IApiKeyModuleService.revoke/page.mdx index a498bd35ee..abbacab936 100644 --- a/www/apps/resources/references/api_key/IApiKeyModuleService/methods/api_key.IApiKeyModuleService.revoke/page.mdx +++ b/www/apps/resources/references/api_key/IApiKeyModuleService/methods/api_key.IApiKeyModuleService.revoke/page.mdx @@ -37,7 +37,7 @@ const apiKey = await apiKeyModuleService.revoke( ### Parameters - + ### Returns diff --git a/www/apps/resources/references/api_key/IApiKeyModuleService/methods/api_key.IApiKeyModuleService.updateApiKeys/page.mdx b/www/apps/resources/references/api_key/IApiKeyModuleService/methods/api_key.IApiKeyModuleService.updateApiKeys/page.mdx index 7a9d6b0e2f..121a864c89 100644 --- a/www/apps/resources/references/api_key/IApiKeyModuleService/methods/api_key.IApiKeyModuleService.updateApiKeys/page.mdx +++ b/www/apps/resources/references/api_key/IApiKeyModuleService/methods/api_key.IApiKeyModuleService.updateApiKeys/page.mdx @@ -55,7 +55,7 @@ const apiKey = await apiKeyModuleService.updateApiKeys( ### Parameters - + ### Returns diff --git a/www/apps/resources/references/api_key/IMessageAggregator/methods/api_key.IMessageAggregator.saveRawMessageData/page.mdx b/www/apps/resources/references/api_key/IMessageAggregator/methods/api_key.IMessageAggregator.saveRawMessageData/page.mdx index 5b0fe9d457..e556300c1d 100644 --- a/www/apps/resources/references/api_key/IMessageAggregator/methods/api_key.IMessageAggregator.saveRawMessageData/page.mdx +++ b/www/apps/resources/references/api_key/IMessageAggregator/methods/api_key.IMessageAggregator.saveRawMessageData/page.mdx @@ -8,7 +8,7 @@ import { TypeList } from "docs-ui" ## Parameters -`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"action","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"Pick<[Context](../../../interfaces/api_key.Context/page.mdx), \"eventGroupId\">","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"options","type":"`Record`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"options","type":"`Record`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="saveRawMessageData"/> +`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"options","type":"`Record`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="saveRawMessageData"/> ## Returns diff --git a/www/apps/resources/references/api_key/IModuleService/methods/api_key.IModuleService.__joinerConfig/page.mdx b/www/apps/resources/references/api_key/IModuleService/methods/api_key.IModuleService.__joinerConfig/page.mdx index debd56b0c4..8b0043fd0c 100644 --- a/www/apps/resources/references/api_key/IModuleService/methods/api_key.IModuleService.__joinerConfig/page.mdx +++ b/www/apps/resources/references/api_key/IModuleService/methods/api_key.IModuleService.__joinerConfig/page.mdx @@ -8,4 +8,4 @@ import { TypeList } from "docs-ui" ## Returns -`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"fieldAlias","type":"`Record`","description":"alias for deeper nested relationships (e.g. { 'price': 'prices.calculated\\_price\\_set.amount' })","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"path","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"forwardArgumentsOnPath","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"schema","type":"`string`","description":"GraphQL schema for the all module's available entities and fields","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relationships","type":"[ModuleJoinerRelationship](../../../types/api_key.ModuleJoinerRelationship/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleteCascade","type":"`boolean`","description":"If true, the link joiner will cascade deleting the relationship","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"extends","type":"`object`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"relationship","type":"[ModuleJoinerRelationship](../../../types/api_key.ModuleJoinerRelationship/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleteCascade","type":"`boolean`","description":"If true, the link joiner will cascade deleting the relationship","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fieldAlias","type":"`Record`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"path","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"forwardArgumentsOnPath","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"serviceName","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKeys","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isLink","type":"`boolean`","description":"If the module is a link module","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"linkableKeys","type":"`Record`","description":"Keys that can be used to link to other modules. e.g { product\\_id: \"Product\" } \"Product\" being the entity it refers to","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isReadOnlyLink","type":"`boolean`","description":"If true it expands a RemoteQuery property but doesn't create a pivot table","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"extraDataFields","type":"`string`[]","description":"Fields that will be part of the link record aside from the primary keys that can be updated\nIf not explicitly defined, this array will be populated by databaseConfig.extraFields","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"databaseConfig","type":"`object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tableName","type":"`string`","description":"Name of the pivot table. If not provided it is auto generated","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idPrefix","type":"`string`","description":"Prefix for the id column. If not provided it is \"link\"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"extraFields","type":"[LinkModulesExtraFields](../../../types/api_key.LinkModulesExtraFields/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"type","type":"`\"date\"` \\| `\"time\"` \\| `\"datetime\"` \\| `bigint` \\| `\"blob\"` \\| `\"uint8array\"` \\| `\"array\"` \\| `\"enumArray\"` \\| `\"enum\"` \\| `\"json\"` \\| `\"integer\"` \\| `\"smallint\"` \\| `\"tinyint\"` \\| `\"mediumint\"` \\| `\"float\"` \\| `\"double\"` \\| `\"boolean\"` \\| `\"decimal\"` \\| `\"string\"` \\| `\"uuid\"` \\| `\"text\"`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"defaultValue","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"nullable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record`","description":"Mikro-orm options for the column","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__joinerConfig"/> +`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"fieldAlias","type":"`Record`","description":"alias for deeper nested relationships (e.g. { 'price': 'prices.calculated\\_price\\_set.amount' })","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"path","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"forwardArgumentsOnPath","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"schema","type":"`string`","description":"GraphQL schema for the all module's available entities and fields","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relationships","type":"[ModuleJoinerRelationship](../../../types/api_key.ModuleJoinerRelationship/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleteCascade","type":"`boolean`","description":"If true, the link joiner will cascade deleting the relationship","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"extends","type":"`object`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"relationship","type":"[ModuleJoinerRelationship](../../../types/api_key.ModuleJoinerRelationship/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleteCascade","type":"`boolean`","description":"If true, the link joiner will cascade deleting the relationship","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fieldAlias","type":"`Record`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"path","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"forwardArgumentsOnPath","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"serviceName","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKeys","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isLink","type":"`boolean`","description":"If the module is a link module","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"linkableKeys","type":"`Record`","description":"Keys that can be used to link to other modules. e.g { product\\_id: \"Product\" } \"Product\" being the entity it refers to","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isReadOnlyLink","type":"`boolean`","description":"If true it expands a RemoteQuery property but doesn't create a pivot table","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"extraDataFields","type":"`string`[]","description":"Fields that will be part of the link record aside from the primary keys that can be updated\nIf not explicitly defined, this array will be populated by databaseConfig.extraFields","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"databaseConfig","type":"`object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tableName","type":"`string`","description":"Name of the pivot table. If not provided it is auto generated","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idPrefix","type":"`string`","description":"Prefix for the id column. If not provided it is \"link\"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"extraFields","type":"[LinkModulesExtraFields](../../../types/api_key.LinkModulesExtraFields/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"type","type":"`\"date\"` \\| `\"time\"` \\| `\"datetime\"` \\| `bigint` \\| `\"blob\"` \\| `\"uint8array\"` \\| `\"array\"` \\| `\"enumArray\"` \\| `\"enum\"` \\| `\"json\"` \\| `\"integer\"` \\| `\"smallint\"` \\| `\"tinyint\"` \\| `\"mediumint\"` \\| `\"float\"` \\| `\"double\"` \\| `\"boolean\"` \\| `\"decimal\"` \\| `\"string\"` \\| `\"uuid\"` \\| `\"text\"`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"defaultValue","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"nullable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record`","description":"Mikro-orm options for the column","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__joinerConfig"/> diff --git a/www/apps/resources/references/api_key/interfaces/api_key.FilterableApiKeyProps/page.mdx b/www/apps/resources/references/api_key/interfaces/api_key.FilterableApiKeyProps/page.mdx index 84b1ca0ae2..fa6b4dc2a2 100644 --- a/www/apps/resources/references/api_key/interfaces/api_key.FilterableApiKeyProps/page.mdx +++ b/www/apps/resources/references/api_key/interfaces/api_key.FilterableApiKeyProps/page.mdx @@ -8,4 +8,4 @@ import { TypeList } from "docs-ui" The filters to apply on the retrieved API keys. - + diff --git a/www/apps/resources/references/api_key/interfaces/api_key.JoinerServiceConfig/page.mdx b/www/apps/resources/references/api_key/interfaces/api_key.JoinerServiceConfig/page.mdx index a06337d56f..c0664bdff1 100644 --- a/www/apps/resources/references/api_key/interfaces/api_key.JoinerServiceConfig/page.mdx +++ b/www/apps/resources/references/api_key/interfaces/api_key.JoinerServiceConfig/page.mdx @@ -6,4 +6,4 @@ import { TypeList } from "docs-ui" # JoinerServiceConfig -`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"fieldAlias","type":"`Record`","description":"alias for deeper nested relationships (e.g. { 'price': 'prices.calculated\\_price\\_set.amount' })","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"path","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"forwardArgumentsOnPath","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"relationships","type":"[JoinerRelationship](../../types/api_key.JoinerRelationship/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"extends","type":"`object`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"relationship","type":"[JoinerRelationship](../../types/api_key.JoinerRelationship/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="JoinerServiceConfig"/> +`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"fieldAlias","type":"`Record`","description":"alias for deeper nested relationships (e.g. { 'price': 'prices.calculated\\_price\\_set.amount' })","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"path","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"forwardArgumentsOnPath","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"relationships","type":"[JoinerRelationship](../../types/api_key.JoinerRelationship/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"extends","type":"`object`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"relationship","type":"[JoinerRelationship](../../types/api_key.JoinerRelationship/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="JoinerServiceConfig"/> diff --git a/www/apps/resources/references/auth/IAuthModuleService/methods/auth.IAuthModuleService.listAndCountAuthIdentities/page.mdx b/www/apps/resources/references/auth/IAuthModuleService/methods/auth.IAuthModuleService.listAndCountAuthIdentities/page.mdx index dbc846f59d..8b861cb4ba 100644 --- a/www/apps/resources/references/auth/IAuthModuleService/methods/auth.IAuthModuleService.listAndCountAuthIdentities/page.mdx +++ b/www/apps/resources/references/auth/IAuthModuleService/methods/auth.IAuthModuleService.listAndCountAuthIdentities/page.mdx @@ -46,7 +46,7 @@ const [authIdentities, count] = ## Parameters -`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx) \\| [BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`[]","description":"The IDs to filter the auth identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_identities","type":"`object`","description":"The provider identities to filter the auth identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"app_metadata","type":"`Record`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx) \\| [BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx) \\| [BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx) \\| [BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`[]","description":"The IDs to filter the auth identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_identities","type":"`object`","description":"The provider identities to filter the auth identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"app_metadata","type":"`Record`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx) \\| [BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx) \\| [BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"config","type":"[FindConfig](../../../interfaces/auth.FindConfig/page.mdx)<[AuthIdentityDTO](../../../interfaces/auth.AuthIdentityDTO/page.mdx)>","description":"The configurations determining how the auth identity is retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a auth identity.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"select","type":"(`string` \\| keyof Entity)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"[FindConfigOrder](../../../types/auth.FindConfigOrder/page.mdx)","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"filters","type":"`Record`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record`","description":"Enable ORM specific defined options","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/auth.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/auth.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listAndCountAuthIdentities"/> +`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx) \\| [BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`[]","description":"The IDs to filter the auth identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_identities","type":"`object`","description":"The provider identities to filter the auth identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"app_metadata","type":"`Record`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx) \\| [BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx) \\| [BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx) \\| [BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`[]","description":"The IDs to filter the auth identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_identities","type":"`object`","description":"The provider identities to filter the auth identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"app_metadata","type":"`Record`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx) \\| [BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx) \\| [BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"config","type":"[FindConfig](../../../interfaces/auth.FindConfig/page.mdx)<[AuthIdentityDTO](../../../interfaces/auth.AuthIdentityDTO/page.mdx)>","description":"The configurations determining how the auth identity is retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a auth identity.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"select","type":"(`string` \\| keyof Entity)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"[FindConfigOrder](../../../types/auth.FindConfigOrder/page.mdx)","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"filters","type":"`Record`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record`","description":"Enable ORM specific defined options","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/auth.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/auth.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listAndCountAuthIdentities"/> ## Returns diff --git a/www/apps/resources/references/auth/IAuthModuleService/methods/auth.IAuthModuleService.listAuthIdentities/page.mdx b/www/apps/resources/references/auth/IAuthModuleService/methods/auth.IAuthModuleService.listAuthIdentities/page.mdx index ed083bc73c..ffa0f750f3 100644 --- a/www/apps/resources/references/auth/IAuthModuleService/methods/auth.IAuthModuleService.listAuthIdentities/page.mdx +++ b/www/apps/resources/references/auth/IAuthModuleService/methods/auth.IAuthModuleService.listAuthIdentities/page.mdx @@ -44,7 +44,7 @@ const authIdentities = await authModuleService.listAuthIdentities( ## Parameters -`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx) \\| [BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`[]","description":"The IDs to filter the auth identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_identities","type":"`object`","description":"The provider identities to filter the auth identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"app_metadata","type":"`Record`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx) \\| [BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx) \\| [BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx) \\| [BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`[]","description":"The IDs to filter the auth identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_identities","type":"`object`","description":"The provider identities to filter the auth identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"app_metadata","type":"`Record`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx) \\| [BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx) \\| [BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"config","type":"[FindConfig](../../../interfaces/auth.FindConfig/page.mdx)<[AuthIdentityDTO](../../../interfaces/auth.AuthIdentityDTO/page.mdx)>","description":"The configurations determining how the auth identity is retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a auth identity.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"select","type":"(`string` \\| keyof Entity)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"[FindConfigOrder](../../../types/auth.FindConfigOrder/page.mdx)","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"filters","type":"`Record`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record`","description":"Enable ORM specific defined options","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/auth.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/auth.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listAuthIdentities"/> +`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx) \\| [BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`[]","description":"The IDs to filter the auth identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_identities","type":"`object`","description":"The provider identities to filter the auth identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"app_metadata","type":"`Record`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx) \\| [BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx) \\| [BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx) \\| [BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`[]","description":"The IDs to filter the auth identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_identities","type":"`object`","description":"The provider identities to filter the auth identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"app_metadata","type":"`Record`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx) \\| [BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx) \\| [BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"config","type":"[FindConfig](../../../interfaces/auth.FindConfig/page.mdx)<[AuthIdentityDTO](../../../interfaces/auth.AuthIdentityDTO/page.mdx)>","description":"The configurations determining how the auth identity is retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a auth identity.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"select","type":"(`string` \\| keyof Entity)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"[FindConfigOrder](../../../types/auth.FindConfigOrder/page.mdx)","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"filters","type":"`Record`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record`","description":"Enable ORM specific defined options","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/auth.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/auth.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listAuthIdentities"/> ## Returns diff --git a/www/apps/resources/references/auth/IAuthModuleService/methods/auth.IAuthModuleService.listProviderIdentities/page.mdx b/www/apps/resources/references/auth/IAuthModuleService/methods/auth.IAuthModuleService.listProviderIdentities/page.mdx index 1839c6d619..9e200e343b 100644 --- a/www/apps/resources/references/auth/IAuthModuleService/methods/auth.IAuthModuleService.listProviderIdentities/page.mdx +++ b/www/apps/resources/references/auth/IAuthModuleService/methods/auth.IAuthModuleService.listProviderIdentities/page.mdx @@ -44,7 +44,7 @@ const providerIdentities = await authModuleService.listProviderIdentities( ## Parameters -`","description":"Holds custom data related to the provider in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"user_metadata","type":"`Record`","description":"Holds custom data related to the user in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableProviderIdentityProps](../../../interfaces/auth.FilterableProviderIdentityProps/page.mdx) \\| [BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<[FilterableProviderIdentityProps](../../../interfaces/auth.FilterableProviderIdentityProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`[]","description":"The IDs to filter the provider identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"entity_id","type":"`string`","description":"Filter the provider identities by the ID of the provider identity they are linked to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"auth_identity_id","type":"`string`","description":"Filter the provider identities by the ID of the auth identity they are linked to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"`string`","description":"The provider handle to filter the provider identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_metadata","type":"`Record`","description":"Holds custom data related to the provider in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"user_metadata","type":"`Record`","description":"Holds custom data related to the user in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableProviderIdentityProps](../../../interfaces/auth.FilterableProviderIdentityProps/page.mdx) \\| [BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<[FilterableProviderIdentityProps](../../../interfaces/auth.FilterableProviderIdentityProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableProviderIdentityProps](../../../interfaces/auth.FilterableProviderIdentityProps/page.mdx) \\| [BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<[FilterableProviderIdentityProps](../../../interfaces/auth.FilterableProviderIdentityProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([FilterableProviderIdentityProps](../../../interfaces/auth.FilterableProviderIdentityProps/page.mdx) \\| [BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<[FilterableProviderIdentityProps](../../../interfaces/auth.FilterableProviderIdentityProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`[]","description":"The IDs to filter the provider identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"entity_id","type":"`string`","description":"Filter the provider identities by the ID of the provider identity they are linked to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"auth_identity_id","type":"`string`","description":"Filter the provider identities by the ID of the auth identity they are linked to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"`string`","description":"The provider handle to filter the provider identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_metadata","type":"`Record`","description":"Holds custom data related to the provider in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"user_metadata","type":"`Record`","description":"Holds custom data related to the user in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableProviderIdentityProps](../../../interfaces/auth.FilterableProviderIdentityProps/page.mdx) \\| [BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<[FilterableProviderIdentityProps](../../../interfaces/auth.FilterableProviderIdentityProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableProviderIdentityProps](../../../interfaces/auth.FilterableProviderIdentityProps/page.mdx) \\| [BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<[FilterableProviderIdentityProps](../../../interfaces/auth.FilterableProviderIdentityProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"config","type":"[FindConfig](../../../interfaces/auth.FindConfig/page.mdx)<[ProviderIdentityDTO](../../../interfaces/auth.ProviderIdentityDTO/page.mdx)>","description":"The configurations determining how the provider identity is retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a provider identity.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"select","type":"(`string` \\| keyof Entity)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"[FindConfigOrder](../../../types/auth.FindConfigOrder/page.mdx)","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"filters","type":"`Record`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record`","description":"Enable ORM specific defined options","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/auth.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/auth.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listProviderIdentities"/> +`","description":"Holds custom data related to the provider in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"user_metadata","type":"`Record`","description":"Holds custom data related to the user in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableProviderIdentityProps](../../../interfaces/auth.FilterableProviderIdentityProps/page.mdx) \\| [BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<[FilterableProviderIdentityProps](../../../interfaces/auth.FilterableProviderIdentityProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`[]","description":"The IDs to filter the provider identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"entity_id","type":"`string`","description":"Filter the provider identities by the ID of the provider identity they are linked to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"auth_identity_id","type":"`string`","description":"Filter the provider identities by the ID of the auth identity they are linked to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"`string`","description":"The provider handle to filter the provider identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_metadata","type":"`Record`","description":"Holds custom data related to the provider in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"user_metadata","type":"`Record`","description":"Holds custom data related to the user in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableProviderIdentityProps](../../../interfaces/auth.FilterableProviderIdentityProps/page.mdx) \\| [BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<[FilterableProviderIdentityProps](../../../interfaces/auth.FilterableProviderIdentityProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableProviderIdentityProps](../../../interfaces/auth.FilterableProviderIdentityProps/page.mdx) \\| [BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<[FilterableProviderIdentityProps](../../../interfaces/auth.FilterableProviderIdentityProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([FilterableProviderIdentityProps](../../../interfaces/auth.FilterableProviderIdentityProps/page.mdx) \\| [BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<[FilterableProviderIdentityProps](../../../interfaces/auth.FilterableProviderIdentityProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`[]","description":"The IDs to filter the provider identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"entity_id","type":"`string`","description":"Filter the provider identities by the ID of the provider identity they are linked to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"auth_identity_id","type":"`string`","description":"Filter the provider identities by the ID of the auth identity they are linked to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"`string`","description":"The provider handle to filter the provider identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_metadata","type":"`Record`","description":"Holds custom data related to the provider in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"user_metadata","type":"`Record`","description":"Holds custom data related to the user in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableProviderIdentityProps](../../../interfaces/auth.FilterableProviderIdentityProps/page.mdx) \\| [BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<[FilterableProviderIdentityProps](../../../interfaces/auth.FilterableProviderIdentityProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableProviderIdentityProps](../../../interfaces/auth.FilterableProviderIdentityProps/page.mdx) \\| [BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<[FilterableProviderIdentityProps](../../../interfaces/auth.FilterableProviderIdentityProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"config","type":"[FindConfig](../../../interfaces/auth.FindConfig/page.mdx)<[ProviderIdentityDTO](../../../interfaces/auth.ProviderIdentityDTO/page.mdx)>","description":"The configurations determining how the provider identity is retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a provider identity.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"select","type":"(`string` \\| keyof Entity)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"[FindConfigOrder](../../../types/auth.FindConfigOrder/page.mdx)","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"filters","type":"`Record`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record`","description":"Enable ORM specific defined options","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/auth.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/auth.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listProviderIdentities"/> ## Returns diff --git a/www/apps/resources/references/auth/IMessageAggregator/methods/auth.IMessageAggregator.saveRawMessageData/page.mdx b/www/apps/resources/references/auth/IMessageAggregator/methods/auth.IMessageAggregator.saveRawMessageData/page.mdx index c7f192c2f4..1482374ce0 100644 --- a/www/apps/resources/references/auth/IMessageAggregator/methods/auth.IMessageAggregator.saveRawMessageData/page.mdx +++ b/www/apps/resources/references/auth/IMessageAggregator/methods/auth.IMessageAggregator.saveRawMessageData/page.mdx @@ -8,7 +8,7 @@ import { TypeList } from "docs-ui" ## Parameters -`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"action","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"Pick<[Context](../../../interfaces/auth.Context/page.mdx), \"eventGroupId\">","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"options","type":"`Record`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"options","type":"`Record`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="saveRawMessageData"/> +`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"options","type":"`Record`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="saveRawMessageData"/> ## Returns diff --git a/www/apps/resources/references/auth/IModuleService/methods/auth.IModuleService.__joinerConfig/page.mdx b/www/apps/resources/references/auth/IModuleService/methods/auth.IModuleService.__joinerConfig/page.mdx index 870abc643e..ed26c72fff 100644 --- a/www/apps/resources/references/auth/IModuleService/methods/auth.IModuleService.__joinerConfig/page.mdx +++ b/www/apps/resources/references/auth/IModuleService/methods/auth.IModuleService.__joinerConfig/page.mdx @@ -8,4 +8,4 @@ import { TypeList } from "docs-ui" ## Returns -`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"fieldAlias","type":"`Record`","description":"alias for deeper nested relationships (e.g. { 'price': 'prices.calculated\\_price\\_set.amount' })","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"path","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"forwardArgumentsOnPath","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"schema","type":"`string`","description":"GraphQL schema for the all module's available entities and fields","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relationships","type":"[ModuleJoinerRelationship](../../../types/auth.ModuleJoinerRelationship/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleteCascade","type":"`boolean`","description":"If true, the link joiner will cascade deleting the relationship","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"extends","type":"`object`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"relationship","type":"[ModuleJoinerRelationship](../../../types/auth.ModuleJoinerRelationship/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleteCascade","type":"`boolean`","description":"If true, the link joiner will cascade deleting the relationship","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fieldAlias","type":"`Record`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"path","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"forwardArgumentsOnPath","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"serviceName","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKeys","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isLink","type":"`boolean`","description":"If the module is a link module","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"linkableKeys","type":"`Record`","description":"Keys that can be used to link to other modules. e.g { product\\_id: \"Product\" } \"Product\" being the entity it refers to","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isReadOnlyLink","type":"`boolean`","description":"If true it expands a RemoteQuery property but doesn't create a pivot table","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"extraDataFields","type":"`string`[]","description":"Fields that will be part of the link record aside from the primary keys that can be updated\nIf not explicitly defined, this array will be populated by databaseConfig.extraFields","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"databaseConfig","type":"`object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tableName","type":"`string`","description":"Name of the pivot table. If not provided it is auto generated","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idPrefix","type":"`string`","description":"Prefix for the id column. If not provided it is \"link\"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"extraFields","type":"[LinkModulesExtraFields](../../../types/auth.LinkModulesExtraFields/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"type","type":"`\"date\"` \\| `\"time\"` \\| `\"datetime\"` \\| `bigint` \\| `\"blob\"` \\| `\"uint8array\"` \\| `\"array\"` \\| `\"enumArray\"` \\| `\"enum\"` \\| `\"json\"` \\| `\"integer\"` \\| `\"smallint\"` \\| `\"tinyint\"` \\| `\"mediumint\"` \\| `\"float\"` \\| `\"double\"` \\| `\"boolean\"` \\| `\"decimal\"` \\| `\"string\"` \\| `\"uuid\"` \\| `\"text\"`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"defaultValue","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"nullable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record`","description":"Mikro-orm options for the column","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__joinerConfig"/> +`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"fieldAlias","type":"`Record`","description":"alias for deeper nested relationships (e.g. { 'price': 'prices.calculated\\_price\\_set.amount' })","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"path","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"forwardArgumentsOnPath","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"schema","type":"`string`","description":"GraphQL schema for the all module's available entities and fields","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relationships","type":"[ModuleJoinerRelationship](../../../types/auth.ModuleJoinerRelationship/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleteCascade","type":"`boolean`","description":"If true, the link joiner will cascade deleting the relationship","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"extends","type":"`object`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"relationship","type":"[ModuleJoinerRelationship](../../../types/auth.ModuleJoinerRelationship/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleteCascade","type":"`boolean`","description":"If true, the link joiner will cascade deleting the relationship","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fieldAlias","type":"`Record`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"path","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"forwardArgumentsOnPath","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"serviceName","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKeys","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isLink","type":"`boolean`","description":"If the module is a link module","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"linkableKeys","type":"`Record`","description":"Keys that can be used to link to other modules. e.g { product\\_id: \"Product\" } \"Product\" being the entity it refers to","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isReadOnlyLink","type":"`boolean`","description":"If true it expands a RemoteQuery property but doesn't create a pivot table","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"extraDataFields","type":"`string`[]","description":"Fields that will be part of the link record aside from the primary keys that can be updated\nIf not explicitly defined, this array will be populated by databaseConfig.extraFields","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"databaseConfig","type":"`object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tableName","type":"`string`","description":"Name of the pivot table. If not provided it is auto generated","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idPrefix","type":"`string`","description":"Prefix for the id column. If not provided it is \"link\"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"extraFields","type":"[LinkModulesExtraFields](../../../types/auth.LinkModulesExtraFields/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"type","type":"`\"date\"` \\| `\"time\"` \\| `\"datetime\"` \\| `bigint` \\| `\"blob\"` \\| `\"uint8array\"` \\| `\"array\"` \\| `\"enumArray\"` \\| `\"enum\"` \\| `\"json\"` \\| `\"integer\"` \\| `\"smallint\"` \\| `\"tinyint\"` \\| `\"mediumint\"` \\| `\"float\"` \\| `\"double\"` \\| `\"boolean\"` \\| `\"decimal\"` \\| `\"string\"` \\| `\"uuid\"` \\| `\"text\"`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"defaultValue","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"nullable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record`","description":"Mikro-orm options for the column","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__joinerConfig"/> diff --git a/www/apps/resources/references/auth/interfaces/auth.FilterableAuthIdentityProps/page.mdx b/www/apps/resources/references/auth/interfaces/auth.FilterableAuthIdentityProps/page.mdx index 545d5c2c84..f715f371a9 100644 --- a/www/apps/resources/references/auth/interfaces/auth.FilterableAuthIdentityProps/page.mdx +++ b/www/apps/resources/references/auth/interfaces/auth.FilterableAuthIdentityProps/page.mdx @@ -8,4 +8,4 @@ import { TypeList } from "docs-ui" The filters to apply on the retrieved auth identity. -`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableAuthIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`[]","description":"The IDs to filter the auth identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_identities","type":"`object`","description":"The provider identities to filter the auth identity by.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"entity_id","type":"`string`","description":"Filter the provider identities by the ID of the provider identity ID they are linked to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"`string`","description":"Filter the provider identities by the provider handle.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"app_metadata","type":"`Record`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableAuthIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`[]","description":"The IDs to filter the auth identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_identities","type":"`object`","description":"The provider identities to filter the auth identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"app_metadata","type":"`Record`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableAuthIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableAuthIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([FilterableAuthIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`[]","description":"The IDs to filter the auth identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_identities","type":"`object`","description":"The provider identities to filter the auth identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"app_metadata","type":"`Record`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableAuthIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableAuthIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$and","type":"([BaseFilterable](../auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([BaseFilterable](../auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([BaseFilterable](../auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([BaseFilterable](../auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"$or","type":"([FilterableAuthIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`[]","description":"The IDs to filter the auth identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_identities","type":"`object`","description":"The provider identities to filter the auth identity by.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"entity_id","type":"`string`","description":"Filter the provider identities by the ID of the provider identity ID they are linked to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"`string`","description":"Filter the provider identities by the provider handle.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"app_metadata","type":"`Record`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableAuthIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`[]","description":"The IDs to filter the auth identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_identities","type":"`object`","description":"The provider identities to filter the auth identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"app_metadata","type":"`Record`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableAuthIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableAuthIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([FilterableAuthIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`[]","description":"The IDs to filter the auth identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_identities","type":"`object`","description":"The provider identities to filter the auth identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"app_metadata","type":"`Record`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableAuthIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableAuthIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$and","type":"([BaseFilterable](../auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([BaseFilterable](../auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([BaseFilterable](../auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([BaseFilterable](../auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="FilterableAuthIdentityProps"/> +`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableAuthIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`[]","description":"The IDs to filter the auth identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_identities","type":"`object`","description":"The provider identities to filter the auth identity by.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"entity_id","type":"`string`","description":"Filter the provider identities by the ID of the provider identity ID they are linked to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"`string`","description":"Filter the provider identities by the provider handle.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"app_metadata","type":"`Record`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableAuthIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`[]","description":"The IDs to filter the auth identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_identities","type":"`object`","description":"The provider identities to filter the auth identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"app_metadata","type":"`Record`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableAuthIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableAuthIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([FilterableAuthIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`[]","description":"The IDs to filter the auth identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_identities","type":"`object`","description":"The provider identities to filter the auth identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"app_metadata","type":"`Record`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableAuthIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableAuthIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"$or","type":"([FilterableAuthIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`[]","description":"The IDs to filter the auth identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_identities","type":"`object`","description":"The provider identities to filter the auth identity by.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"entity_id","type":"`string`","description":"Filter the provider identities by the ID of the provider identity ID they are linked to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"`string`","description":"Filter the provider identities by the provider handle.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"app_metadata","type":"`Record`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableAuthIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`[]","description":"The IDs to filter the auth identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_identities","type":"`object`","description":"The provider identities to filter the auth identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"app_metadata","type":"`Record`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableAuthIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableAuthIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([FilterableAuthIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`[]","description":"The IDs to filter the auth identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_identities","type":"`object`","description":"The provider identities to filter the auth identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"app_metadata","type":"`Record`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableAuthIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableAuthIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="FilterableAuthIdentityProps"/> diff --git a/www/apps/resources/references/auth/interfaces/auth.FilterableProviderIdentityProps/page.mdx b/www/apps/resources/references/auth/interfaces/auth.FilterableProviderIdentityProps/page.mdx index a426a23f93..02fcbc7aac 100644 --- a/www/apps/resources/references/auth/interfaces/auth.FilterableProviderIdentityProps/page.mdx +++ b/www/apps/resources/references/auth/interfaces/auth.FilterableProviderIdentityProps/page.mdx @@ -8,4 +8,4 @@ import { TypeList } from "docs-ui" An object used to allow specifying flexible queries with and/or conditions. -`","description":"Holds custom data related to the provider in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"user_metadata","type":"`Record`","description":"Holds custom data related to the user in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableProviderIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableProviderIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`[]","description":"The IDs to filter the provider identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"entity_id","type":"`string`","description":"Filter the provider identities by the ID of the provider identity they are linked to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"auth_identity_id","type":"`string`","description":"Filter the provider identities by the ID of the auth identity they are linked to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"`string`","description":"The provider handle to filter the provider identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_metadata","type":"`Record`","description":"Holds custom data related to the provider in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"user_metadata","type":"`Record`","description":"Holds custom data related to the user in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableProviderIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableProviderIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`[]","description":"The IDs to filter the provider identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"entity_id","type":"`string`","description":"Filter the provider identities by the ID of the provider identity they are linked to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"auth_identity_id","type":"`string`","description":"Filter the provider identities by the ID of the auth identity they are linked to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"`string`","description":"The provider handle to filter the provider identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_metadata","type":"`Record`","description":"Holds custom data related to the provider in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"user_metadata","type":"`Record`","description":"Holds custom data related to the user in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableProviderIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableProviderIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableProviderIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableProviderIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([FilterableProviderIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableProviderIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`[]","description":"The IDs to filter the provider identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"entity_id","type":"`string`","description":"Filter the provider identities by the ID of the provider identity they are linked to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"auth_identity_id","type":"`string`","description":"Filter the provider identities by the ID of the auth identity they are linked to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"`string`","description":"The provider handle to filter the provider identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_metadata","type":"`Record`","description":"Holds custom data related to the provider in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"user_metadata","type":"`Record`","description":"Holds custom data related to the user in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableProviderIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableProviderIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableProviderIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableProviderIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$and","type":"([BaseFilterable](../auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([BaseFilterable](../auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([BaseFilterable](../auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([BaseFilterable](../auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"$or","type":"([FilterableProviderIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableProviderIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`[]","description":"The IDs to filter the provider identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"entity_id","type":"`string`","description":"Filter the provider identities by the ID of the provider identity they are linked to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"auth_identity_id","type":"`string`","description":"Filter the provider identities by the ID of the auth identity they are linked to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"`string`","description":"The provider handle to filter the provider identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_metadata","type":"`Record`","description":"Holds custom data related to the provider in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"user_metadata","type":"`Record`","description":"Holds custom data related to the user in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableProviderIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableProviderIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`[]","description":"The IDs to filter the provider identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"entity_id","type":"`string`","description":"Filter the provider identities by the ID of the provider identity they are linked to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"auth_identity_id","type":"`string`","description":"Filter the provider identities by the ID of the auth identity they are linked to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"`string`","description":"The provider handle to filter the provider identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_metadata","type":"`Record`","description":"Holds custom data related to the provider in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"user_metadata","type":"`Record`","description":"Holds custom data related to the user in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableProviderIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableProviderIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableProviderIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableProviderIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([FilterableProviderIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableProviderIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`[]","description":"The IDs to filter the provider identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"entity_id","type":"`string`","description":"Filter the provider identities by the ID of the provider identity they are linked to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"auth_identity_id","type":"`string`","description":"Filter the provider identities by the ID of the auth identity they are linked to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"`string`","description":"The provider handle to filter the provider identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_metadata","type":"`Record`","description":"Holds custom data related to the provider in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"user_metadata","type":"`Record`","description":"Holds custom data related to the user in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableProviderIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableProviderIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableProviderIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableProviderIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$and","type":"([BaseFilterable](../auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([BaseFilterable](../auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([BaseFilterable](../auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([BaseFilterable](../auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../auth.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="FilterableProviderIdentityProps"/> +`","description":"Holds custom data related to the provider in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"user_metadata","type":"`Record`","description":"Holds custom data related to the user in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableProviderIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableProviderIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`[]","description":"The IDs to filter the provider identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"entity_id","type":"`string`","description":"Filter the provider identities by the ID of the provider identity they are linked to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"auth_identity_id","type":"`string`","description":"Filter the provider identities by the ID of the auth identity they are linked to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"`string`","description":"The provider handle to filter the provider identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_metadata","type":"`Record`","description":"Holds custom data related to the provider in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"user_metadata","type":"`Record`","description":"Holds custom data related to the user in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableProviderIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableProviderIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`[]","description":"The IDs to filter the provider identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"entity_id","type":"`string`","description":"Filter the provider identities by the ID of the provider identity they are linked to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"auth_identity_id","type":"`string`","description":"Filter the provider identities by the ID of the auth identity they are linked to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"`string`","description":"The provider handle to filter the provider identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_metadata","type":"`Record`","description":"Holds custom data related to the provider in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"user_metadata","type":"`Record`","description":"Holds custom data related to the user in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableProviderIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableProviderIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableProviderIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableProviderIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([FilterableProviderIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableProviderIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`[]","description":"The IDs to filter the provider identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"entity_id","type":"`string`","description":"Filter the provider identities by the ID of the provider identity they are linked to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"auth_identity_id","type":"`string`","description":"Filter the provider identities by the ID of the auth identity they are linked to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"`string`","description":"The provider handle to filter the provider identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_metadata","type":"`Record`","description":"Holds custom data related to the provider in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"user_metadata","type":"`Record`","description":"Holds custom data related to the user in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableProviderIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableProviderIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableProviderIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableProviderIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"$or","type":"([FilterableProviderIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableProviderIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`[]","description":"The IDs to filter the provider identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"entity_id","type":"`string`","description":"Filter the provider identities by the ID of the provider identity they are linked to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"auth_identity_id","type":"`string`","description":"Filter the provider identities by the ID of the auth identity they are linked to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"`string`","description":"The provider handle to filter the provider identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_metadata","type":"`Record`","description":"Holds custom data related to the provider in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"user_metadata","type":"`Record`","description":"Holds custom data related to the user in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableProviderIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableProviderIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`[]","description":"The IDs to filter the provider identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"entity_id","type":"`string`","description":"Filter the provider identities by the ID of the provider identity they are linked to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"auth_identity_id","type":"`string`","description":"Filter the provider identities by the ID of the auth identity they are linked to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"`string`","description":"The provider handle to filter the provider identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_metadata","type":"`Record`","description":"Holds custom data related to the provider in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"user_metadata","type":"`Record`","description":"Holds custom data related to the user in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableProviderIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableProviderIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableProviderIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableProviderIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([FilterableProviderIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableProviderIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`[]","description":"The IDs to filter the provider identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"entity_id","type":"`string`","description":"Filter the provider identities by the ID of the provider identity they are linked to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"auth_identity_id","type":"`string`","description":"Filter the provider identities by the ID of the auth identity they are linked to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"`string`","description":"The provider handle to filter the provider identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_metadata","type":"`Record`","description":"Holds custom data related to the provider in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"user_metadata","type":"`Record`","description":"Holds custom data related to the user in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableProviderIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableProviderIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableProviderIdentityProps](./page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableProviderIdentityProps](./page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="FilterableProviderIdentityProps"/> diff --git a/www/apps/resources/references/auth/interfaces/auth.JoinerServiceConfig/page.mdx b/www/apps/resources/references/auth/interfaces/auth.JoinerServiceConfig/page.mdx index 1e793d784a..fdb9c27ed6 100644 --- a/www/apps/resources/references/auth/interfaces/auth.JoinerServiceConfig/page.mdx +++ b/www/apps/resources/references/auth/interfaces/auth.JoinerServiceConfig/page.mdx @@ -6,4 +6,4 @@ import { TypeList } from "docs-ui" # JoinerServiceConfig -`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"fieldAlias","type":"`Record`","description":"alias for deeper nested relationships (e.g. { 'price': 'prices.calculated\\_price\\_set.amount' })","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"path","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"forwardArgumentsOnPath","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"relationships","type":"[JoinerRelationship](../../types/auth.JoinerRelationship/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"extends","type":"`object`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"relationship","type":"[JoinerRelationship](../../types/auth.JoinerRelationship/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="JoinerServiceConfig"/> +`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"fieldAlias","type":"`Record`","description":"alias for deeper nested relationships (e.g. { 'price': 'prices.calculated\\_price\\_set.amount' })","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"path","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"forwardArgumentsOnPath","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"relationships","type":"[JoinerRelationship](../../types/auth.JoinerRelationship/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"extends","type":"`object`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"relationship","type":"[JoinerRelationship](../../types/auth.JoinerRelationship/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="JoinerServiceConfig"/> diff --git a/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.addLineItemTaxLines/page.mdx b/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.addLineItemTaxLines/page.mdx index e5751d70ea..953348c579 100644 --- a/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.addLineItemTaxLines/page.mdx +++ b/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.addLineItemTaxLines/page.mdx @@ -82,7 +82,7 @@ const lineItemTaxLines = ### Parameters - + ### Returns diff --git a/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.addShippingMethodTaxLines/page.mdx b/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.addShippingMethodTaxLines/page.mdx index a1433425d2..eefaee0014 100644 --- a/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.addShippingMethodTaxLines/page.mdx +++ b/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.addShippingMethodTaxLines/page.mdx @@ -91,7 +91,7 @@ const shippingMethodTaxLines = ### Parameters - + ### Returns diff --git a/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.listAddresses/page.mdx b/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.listAddresses/page.mdx index aa82d86b77..3e001e8cce 100644 --- a/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.listAddresses/page.mdx +++ b/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.listAddresses/page.mdx @@ -44,7 +44,7 @@ const addresses = await cartModuleService.listAddresses( ## Parameters -`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record`","description":"Enable ORM specific defined options","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listAddresses"/> +`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record`","description":"Enable ORM specific defined options","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listAddresses"/> ## Returns diff --git a/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.listAndCountCarts/page.mdx b/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.listAndCountCarts/page.mdx index bb95ed3fb6..f6c3a06872 100644 --- a/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.listAndCountCarts/page.mdx +++ b/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.listAndCountCarts/page.mdx @@ -58,7 +58,7 @@ const [carts, count] = await cartModuleService.listAndCountCarts( ## Parameters -`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record`","description":"Enable ORM specific defined options","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listAndCountCarts"/> +`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record`","description":"Enable ORM specific defined options","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listAndCountCarts"/> ## Returns diff --git a/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.listCarts/page.mdx b/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.listCarts/page.mdx index 72c5160350..cf28688906 100644 --- a/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.listCarts/page.mdx +++ b/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.listCarts/page.mdx @@ -58,7 +58,7 @@ const carts = await cartModuleService.listCarts( ## Parameters -`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record`","description":"Enable ORM specific defined options","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listCarts"/> +`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record`","description":"Enable ORM specific defined options","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listCarts"/> ## Returns diff --git a/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.listLineItemAdjustments/page.mdx b/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.listLineItemAdjustments/page.mdx index 8e7ce703e3..7317496e71 100644 --- a/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.listLineItemAdjustments/page.mdx +++ b/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.listLineItemAdjustments/page.mdx @@ -61,7 +61,7 @@ const lineItemAdjustments = ## Parameters -`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record`","description":"Enable ORM specific defined options","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listLineItemAdjustments"/> +`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record`","description":"Enable ORM specific defined options","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listLineItemAdjustments"/> ## Returns diff --git a/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.listLineItemTaxLines/page.mdx b/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.listLineItemTaxLines/page.mdx index 3dadf0a827..6301596eb4 100644 --- a/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.listLineItemTaxLines/page.mdx +++ b/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.listLineItemTaxLines/page.mdx @@ -61,7 +61,7 @@ const lineItemTaxLines = ## Parameters -`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record`","description":"Enable ORM specific defined options","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listLineItemTaxLines"/> +`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record`","description":"Enable ORM specific defined options","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listLineItemTaxLines"/> ## Returns diff --git a/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.listLineItems/page.mdx b/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.listLineItems/page.mdx index 59504300a6..e619692670 100644 --- a/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.listLineItems/page.mdx +++ b/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.listLineItems/page.mdx @@ -58,7 +58,7 @@ const lineItems = await cartModuleService.listLineItems( ## Parameters -`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record`","description":"Enable ORM specific defined options","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listLineItems"/> +`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record`","description":"Enable ORM specific defined options","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listLineItems"/> ## Returns diff --git a/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.listShippingMethodAdjustments/page.mdx b/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.listShippingMethodAdjustments/page.mdx index a200547b18..1e5d347124 100644 --- a/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.listShippingMethodAdjustments/page.mdx +++ b/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.listShippingMethodAdjustments/page.mdx @@ -61,7 +61,7 @@ const shippingMethodAdjustments = ## Parameters -`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record`","description":"Enable ORM specific defined options","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listShippingMethodAdjustments"/> +`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record`","description":"Enable ORM specific defined options","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listShippingMethodAdjustments"/> ## Returns diff --git a/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.listShippingMethodTaxLines/page.mdx b/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.listShippingMethodTaxLines/page.mdx index c8f37ed8b2..8df1c1b2f1 100644 --- a/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.listShippingMethodTaxLines/page.mdx +++ b/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.listShippingMethodTaxLines/page.mdx @@ -61,7 +61,7 @@ const shippingMethodTaxLines = ## Parameters -`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record`","description":"Enable ORM specific defined options","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listShippingMethodTaxLines"/> +`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record`","description":"Enable ORM specific defined options","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listShippingMethodTaxLines"/> ## Returns diff --git a/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.listShippingMethods/page.mdx b/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.listShippingMethods/page.mdx index 71b6438662..ebd880eeb8 100644 --- a/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.listShippingMethods/page.mdx +++ b/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.listShippingMethods/page.mdx @@ -64,7 +64,7 @@ const shippingMethods = ## Parameters -`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record`","description":"Enable ORM specific defined options","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listShippingMethods"/> +`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record`","description":"Enable ORM specific defined options","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listShippingMethods"/> ## Returns diff --git a/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.setLineItemTaxLines/page.mdx b/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.setLineItemTaxLines/page.mdx index 07aa1bd524..130f6c6dca 100644 --- a/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.setLineItemTaxLines/page.mdx +++ b/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.setLineItemTaxLines/page.mdx @@ -37,7 +37,7 @@ const lineItemTaxLines = ## Parameters - + ## Returns diff --git a/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.setShippingMethodAdjustments/page.mdx b/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.setShippingMethodAdjustments/page.mdx index 15b82328f3..5e558fd634 100644 --- a/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.setShippingMethodAdjustments/page.mdx +++ b/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.setShippingMethodAdjustments/page.mdx @@ -42,7 +42,7 @@ const shippingMethodAdjustments = ## Parameters - + ## Returns diff --git a/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.setShippingMethodTaxLines/page.mdx b/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.setShippingMethodTaxLines/page.mdx index 0b5d2c26ee..5cd162beb3 100644 --- a/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.setShippingMethodTaxLines/page.mdx +++ b/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.setShippingMethodTaxLines/page.mdx @@ -40,7 +40,7 @@ const shippingMethodTaxLines = ## Parameters - + ## Returns diff --git a/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.updateCarts/page.mdx b/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.updateCarts/page.mdx index fb3e5a6774..9a3245949a 100644 --- a/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.updateCarts/page.mdx +++ b/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.updateCarts/page.mdx @@ -37,7 +37,7 @@ const carts = await cartModuleService.updateCarts([ ### Parameters -`","description":"Holds custom data in key-value pairs.","optional":true,"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 province 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`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"shipping_address","type":"`null` \\| [UpdateAddressDTO](../../../interfaces/cart.UpdateAddressDTO/page.mdx) \\| [CreateAddressDTO](../../../interfaces/cart.CreateAddressDTO/page.mdx)","description":"The shipping address of the cart.","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 province 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`","description":"Holds custom data in key-value pairs.","optional":true,"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 province 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`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`null` \\| `Record`","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="updateCarts"/> +`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"shipping_address","type":"`null` \\| [UpdateAddressDTO](../../../interfaces/cart.UpdateAddressDTO/page.mdx) \\| [CreateAddressDTO](../../../interfaces/cart.CreateAddressDTO/page.mdx)","description":"The shipping address of the cart.","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 province 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`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`null` \\| `Record`","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="updateCarts"/> ### Returns @@ -57,7 +57,7 @@ const cart = await cartModuleService.updateCarts("cart_123", { ### Parameters -`","description":"Holds custom data in key-value pairs.","optional":true,"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 province 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`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"shipping_address","type":"`null` \\| [UpdateAddressDTO](../../../interfaces/cart.UpdateAddressDTO/page.mdx) \\| [CreateAddressDTO](../../../interfaces/cart.CreateAddressDTO/page.mdx)","description":"The shipping address of the cart.","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 province 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`","description":"Holds custom data in key-value pairs.","optional":true,"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 province 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`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`null` \\| `Record`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateCarts"/> +`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"shipping_address","type":"`null` \\| [UpdateAddressDTO](../../../interfaces/cart.UpdateAddressDTO/page.mdx) \\| [CreateAddressDTO](../../../interfaces/cart.CreateAddressDTO/page.mdx)","description":"The shipping address of the cart.","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 province 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`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`null` \\| `Record`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateCarts"/> ### Returns @@ -82,7 +82,7 @@ const carts = await cartModuleService.updateCarts( ### Parameters -`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"billing_address","type":"[CartAddressDTO](../../../interfaces/cart.CartAddressDTO/page.mdx)","description":"The associated billing address.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the address was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the address was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"The customer ID 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":"phone","type":"`string`","description":"The phone number of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The first address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The second address 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 country code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The 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":"metadata","type":"`null` \\| `Record`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"items","type":"[CartLineItemDTO](../../../interfaces/cart.CartLineItemDTO/page.mdx)[]","description":"The associated line items.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"original_total","type":"[BigNumberValue](../../../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](../../../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](../../../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](../../../types/cart.BigNumberValue/page.mdx)","description":"The item total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The item subtotal of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The item tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The subtotal of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The discount total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The discount tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_original_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw original total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_original_subtotal","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw original subtotal of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_original_tax_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw original tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_item_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw item total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_item_subtotal","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw item subtotal of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_item_tax_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw item tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_subtotal","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw subtotal of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_tax_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_discount_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw discount total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_discount_tax_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw discount tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The title of the line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The line item's quantity in the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"requires_shipping","type":"`boolean`","description":"Whether the line item requires shipping.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_discountable","type":"`boolean`","description":"Whether the line item is discountable.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`boolean`","description":"Whether the line item price is tax inclusive.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_custom_price","type":"`boolean`","description":"Whether the line item price is a custom price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"unit_price","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The unit price of the item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart","type":"[CartDTO](../../../interfaces/cart.CartDTO/page.mdx)","description":"The associated cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"cart_id","type":"`string`","description":"The ID of the associated cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtitle","type":"`string`","description":"The subtitle of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`string`","description":"The line item's thumbnail.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string`","description":"The ID of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_title","type":"`string`","description":"The title of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_description","type":"`string`","description":"The description of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_subtitle","type":"`string`","description":"The subtitle of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_type","type":"`string`","description":"The type of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_type_id","type":"`string`","description":"The type of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_collection","type":"`string`","description":"The collection of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_handle","type":"`string`","description":"The handle of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_id","type":"`string`","description":"The associated variant's ID of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_sku","type":"`string`","description":"The sku of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_barcode","type":"`string`","description":"The barcode of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_title","type":"`string`","description":"The title of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_option_values","type":"`Record`","description":"The option values of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"compare_at_unit_price","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The calculated price of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_lines","type":"[LineItemTaxLineDTO](../../../interfaces/cart.LineItemTaxLineDTO/page.mdx)[]","description":"The associated tax lines.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"adjustments","type":"[LineItemAdjustmentDTO](../../../interfaces/cart.LineItemAdjustmentDTO/page.mdx)[]","description":"The associated adjustments.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"metadata","type":"`null` \\| `Record`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"When the line item was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"When the line item was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`Date`","description":"When the line item was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"shipping_methods","type":"[CartShippingMethodDTO](../../../interfaces/cart.CartShippingMethodDTO/page.mdx)[]","description":"The associated shipping methods","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart_id","type":"`string`","description":"The ID of the associated cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The price of the shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`boolean`","description":"Whether the shipping method price is tax inclusive.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the shipping method was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the shipping method was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original total of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original subtotal of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original tax total of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The total of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The subtotal of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The tax total of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The discount total of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The discount tax total of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_original_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw original total of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_original_subtotal","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw original subtotal of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_original_tax_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw original tax total of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw total of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_subtotal","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw subtotal of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_tax_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw tax total of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_discount_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw discount total of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_discount_tax_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw discount tax total of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_id","type":"`string`","description":"The ID of the shipping option the method was created from.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record`","description":"Additional data needed for fulfillment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_lines","type":"[ShippingMethodTaxLineDTO](../../../interfaces/cart.ShippingMethodTaxLineDTO/page.mdx)[]","description":"The associated tax lines.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"adjustments","type":"[ShippingMethodAdjustmentDTO](../../../interfaces/cart.ShippingMethodAdjustmentDTO/page.mdx)[]","description":"The associated adjustments.","optional":true,"defaultValue":"","expandable":true,"children":[]}]},{"name":"metadata","type":"`null` \\| `Record`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"completed_at","type":"`string` \\| `Date`","description":"When the cart was completed.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the cart was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the cart was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"data","type":"[UpdateCartDataDTO](../../../interfaces/cart.UpdateCartDataDTO/page.mdx)","description":"The attributes to update in the carts.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"region_id","type":"`string`","description":"The associated region's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The associated customer's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The associated sales channel's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that owns the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency code of the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address_id","type":"`null` \\| `string`","description":"The associated shipping address's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address_id","type":"`null` \\| `string`","description":"The associated billing address's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address","type":"`null` \\| [UpdateAddressDTO](../../../interfaces/cart.UpdateAddressDTO/page.mdx) \\| [CreateAddressDTO](../../../interfaces/cart.CreateAddressDTO/page.mdx)","description":"The billing address of the cart.","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 province 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`","description":"Holds custom data in key-value pairs.","optional":true,"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 province 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`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"shipping_address","type":"`null` \\| [UpdateAddressDTO](../../../interfaces/cart.UpdateAddressDTO/page.mdx) \\| [CreateAddressDTO](../../../interfaces/cart.CreateAddressDTO/page.mdx)","description":"The shipping address of the cart.","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 province 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`","description":"Holds custom data in key-value pairs.","optional":true,"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 province 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`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`null` \\| `Record`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateCarts"/> +`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"billing_address","type":"[CartAddressDTO](../../../interfaces/cart.CartAddressDTO/page.mdx)","description":"The associated billing address.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the address was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the address was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"The customer ID 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":"phone","type":"`string`","description":"The phone number of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The first address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The second address 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 country code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The 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":"metadata","type":"`null` \\| `Record`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"items","type":"[CartLineItemDTO](../../../interfaces/cart.CartLineItemDTO/page.mdx)[]","description":"The associated line items.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"original_total","type":"[BigNumberValue](../../../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](../../../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](../../../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](../../../types/cart.BigNumberValue/page.mdx)","description":"The item total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The item subtotal of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The item tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The subtotal of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The discount total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The discount tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_original_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw original total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_original_subtotal","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw original subtotal of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_original_tax_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw original tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_item_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw item total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_item_subtotal","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw item subtotal of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_item_tax_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw item tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_subtotal","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw subtotal of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_tax_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_discount_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw discount total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_discount_tax_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw discount tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The title of the line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The line item's quantity in the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"requires_shipping","type":"`boolean`","description":"Whether the line item requires shipping.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_discountable","type":"`boolean`","description":"Whether the line item is discountable.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`boolean`","description":"Whether the line item price is tax inclusive.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_custom_price","type":"`boolean`","description":"Whether the line item price is a custom price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"unit_price","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The unit price of the item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart","type":"[CartDTO](../../../interfaces/cart.CartDTO/page.mdx)","description":"The associated cart.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"cart_id","type":"`string`","description":"The ID of the associated cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtitle","type":"`string`","description":"The subtitle of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`string`","description":"The line item's thumbnail.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string`","description":"The ID of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_title","type":"`string`","description":"The title of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_description","type":"`string`","description":"The description of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_subtitle","type":"`string`","description":"The subtitle of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_type","type":"`string`","description":"The type of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_type_id","type":"`string`","description":"The type of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_collection","type":"`string`","description":"The collection of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_handle","type":"`string`","description":"The handle of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_id","type":"`string`","description":"The associated variant's ID of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_sku","type":"`string`","description":"The sku of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_barcode","type":"`string`","description":"The barcode of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_title","type":"`string`","description":"The title of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_option_values","type":"`Record`","description":"The option values of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"compare_at_unit_price","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The calculated price of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_lines","type":"[LineItemTaxLineDTO](../../../interfaces/cart.LineItemTaxLineDTO/page.mdx)[]","description":"The associated tax lines.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"adjustments","type":"[LineItemAdjustmentDTO](../../../interfaces/cart.LineItemAdjustmentDTO/page.mdx)[]","description":"The associated adjustments.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"metadata","type":"`null` \\| `Record`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"When the line item was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"When the line item was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`Date`","description":"When the line item was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"shipping_methods","type":"[CartShippingMethodDTO](../../../interfaces/cart.CartShippingMethodDTO/page.mdx)[]","description":"The associated shipping methods","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart_id","type":"`string`","description":"The ID of the associated cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The price of the shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`boolean`","description":"Whether the shipping method price is tax inclusive.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the shipping method was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the shipping method was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original total of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original subtotal of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original tax total of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The total of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The subtotal of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The tax total of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The discount total of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The discount tax total of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_original_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw original total of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_original_subtotal","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw original subtotal of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_original_tax_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw original tax total of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw total of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_subtotal","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw subtotal of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_tax_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw tax total of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_discount_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw discount total of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_discount_tax_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw discount tax total of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_id","type":"`string`","description":"The ID of the shipping option the method was created from.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record`","description":"Additional data needed for fulfillment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_lines","type":"[ShippingMethodTaxLineDTO](../../../interfaces/cart.ShippingMethodTaxLineDTO/page.mdx)[]","description":"The associated tax lines.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"adjustments","type":"[ShippingMethodAdjustmentDTO](../../../interfaces/cart.ShippingMethodAdjustmentDTO/page.mdx)[]","description":"The associated adjustments.","optional":true,"defaultValue":"","expandable":true,"children":[]}]},{"name":"metadata","type":"`null` \\| `Record`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"completed_at","type":"`string` \\| `Date`","description":"When the cart was completed.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the cart was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the cart was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"data","type":"[UpdateCartDataDTO](../../../interfaces/cart.UpdateCartDataDTO/page.mdx)","description":"The attributes to update in the carts.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"region_id","type":"`string`","description":"The associated region's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The associated customer's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The associated sales channel's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that owns the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency code of the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address_id","type":"`null` \\| `string`","description":"The associated shipping address's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address_id","type":"`null` \\| `string`","description":"The associated billing address's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address","type":"`null` \\| [UpdateAddressDTO](../../../interfaces/cart.UpdateAddressDTO/page.mdx) \\| [CreateAddressDTO](../../../interfaces/cart.CreateAddressDTO/page.mdx)","description":"The billing address of the cart.","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 province 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`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"shipping_address","type":"`null` \\| [UpdateAddressDTO](../../../interfaces/cart.UpdateAddressDTO/page.mdx) \\| [CreateAddressDTO](../../../interfaces/cart.CreateAddressDTO/page.mdx)","description":"The shipping address of the cart.","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 province 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`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`null` \\| `Record`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateCarts"/> ### Returns diff --git a/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.updateLineItems/page.mdx b/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.updateLineItems/page.mdx index 9dcbfd177a..bae8e48bd1 100644 --- a/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.updateLineItems/page.mdx +++ b/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.updateLineItems/page.mdx @@ -70,7 +70,7 @@ const lineItems = await cartModuleService.updateLineItems( ### Parameters -`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"completed_at","type":"`string` \\| `Date`","description":"When the cart was completed.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the cart was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the cart was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"cart_id","type":"`string`","description":"The ID of the associated cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtitle","type":"`string`","description":"The subtitle of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`string`","description":"The line item's thumbnail.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string`","description":"The ID of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_title","type":"`string`","description":"The title of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_description","type":"`string`","description":"The description of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_subtitle","type":"`string`","description":"The subtitle of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_type","type":"`string`","description":"The type of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_type_id","type":"`string`","description":"The type of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_collection","type":"`string`","description":"The collection of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_handle","type":"`string`","description":"The handle of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_id","type":"`string`","description":"The associated variant's ID of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_sku","type":"`string`","description":"The sku of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_barcode","type":"`string`","description":"The barcode of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_title","type":"`string`","description":"The title of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_option_values","type":"`Record`","description":"The option values of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"compare_at_unit_price","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The calculated price of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"tax_lines","type":"[LineItemTaxLineDTO](../../../interfaces/cart.LineItemTaxLineDTO/page.mdx)[]","description":"The associated tax lines.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the tax line","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The code of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`number`","description":"The rate of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the tax line was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the tax line was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item","type":"[CartLineItemDTO](../../../interfaces/cart.CartLineItemDTO/page.mdx)","description":"The associated line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_id","type":"`string`","description":"The ID of the associated line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The total tax relative to the item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The subtotal tax relative to the item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw total tax relative to the item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_subtotal","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw subtotal tax relative to the item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the tax line","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rate_id","type":"`string`","description":"The ID of the associated tax rate.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the associated provider.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"adjustments","type":"[LineItemAdjustmentDTO](../../../interfaces/cart.LineItemAdjustmentDTO/page.mdx)[]","description":"The associated adjustments.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the adjustment line","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The amount to adjust the original amount with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_amount","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw amount to adjust the original amount with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart_id","type":"`string`","description":"The ID of the associated cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the adjustment line was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the adjustment line was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item","type":"[CartLineItemDTO](../../../interfaces/cart.CartLineItemDTO/page.mdx)","description":"The associated line item.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"item_id","type":"`string`","description":"The ID of the associated line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The code of the promotion that lead to\nthis adjustment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the adjustment line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotion_id","type":"`string`","description":"The ID of the associated promotion.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the associated provider.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`null` \\| `Record`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"When the line item was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"When the line item was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`Date`","description":"When the line item was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"data","type":"Partial<[UpdateLineItemDTO](../../../interfaces/cart.UpdateLineItemDTO/page.mdx)>","description":"The attributes to update in the line items.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtitle","type":"`string`","description":"The subtitle of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`string`","description":"The thumbnail of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cart_id","type":"`string`","description":"The associated cart's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string`","description":"The associated product's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_title","type":"`string`","description":"The title of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_description","type":"`string`","description":"The description of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_subtitle","type":"`string`","description":"The subtitle of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_type","type":"`string`","description":"The type of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_type_id","type":"`string`","description":"The ID of type of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_collection","type":"`string`","description":"The collection of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_handle","type":"`string`","description":"The handle of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_id","type":"`string`","description":"The associated variant's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_sku","type":"`string`","description":"The SKU of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_barcode","type":"`string`","description":"The barcode of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_title","type":"`string`","description":"The title of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_option_values","type":"`Record`","description":"The option values of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requires_shipping","type":"`boolean`","description":"Whether the line item requires shipping.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_discountable","type":"`boolean`","description":"Whether the line item is discountable.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`boolean`","description":"Whether the line item's amount is tax inclusive.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_custom_price","type":"`boolean`","description":"Whether the line item's amount is a custom price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"compare_at_unit_price","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The calculated price of the line item after applying promotions.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"title","type":"`string`","description":"The title of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The quantity of the line item in the cart.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"unit_price","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The unit price of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`null` \\| `Record`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_lines","type":"[CreateTaxLineDTO](../../../interfaces/cart.CreateTaxLineDTO/page.mdx)[] \\| [UpdateTaxLineDTO](../../../interfaces/cart.UpdateTaxLineDTO/page.mdx)[]","description":"The tax lines of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The code of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`number`","description":"The rate of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the tax line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rate_id","type":"`string`","description":"The associated tax rate's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"item_id","type":"`string`","description":"The associated item's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the tax line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rate_id","type":"`string`","description":"The associated tax rate's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The code of the tax line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`number`","description":"The rate of the tax line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"item_id","type":"`string`","description":"The associated item's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"adjustments","type":"[CreateAdjustmentDTO](../../../interfaces/cart.CreateAdjustmentDTO/page.mdx)[] \\| [UpdateAdjustmentDTO](../../../interfaces/cart.UpdateAdjustmentDTO/page.mdx)[]","description":"The adjustments of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The code of the promotion that lead to\nthis adjustment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The amount to adjust the original amount with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the adjustment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The amount to adjust the original amount with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the adjustment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotion_id","type":"`string`","description":"The associated promotion's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The code of the promotion that lead to\nthis adjustment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the adjustment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotion_id","type":"`string`","description":"The associated promotion's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateLineItems"/> +`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"completed_at","type":"`string` \\| `Date`","description":"When the cart was completed.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the cart was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the cart was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"cart_id","type":"`string`","description":"The ID of the associated cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtitle","type":"`string`","description":"The subtitle of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`string`","description":"The line item's thumbnail.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string`","description":"The ID of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_title","type":"`string`","description":"The title of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_description","type":"`string`","description":"The description of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_subtitle","type":"`string`","description":"The subtitle of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_type","type":"`string`","description":"The type of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_type_id","type":"`string`","description":"The type of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_collection","type":"`string`","description":"The collection of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_handle","type":"`string`","description":"The handle of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_id","type":"`string`","description":"The associated variant's ID of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_sku","type":"`string`","description":"The sku of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_barcode","type":"`string`","description":"The barcode of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_title","type":"`string`","description":"The title of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_option_values","type":"`Record`","description":"The option values of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"compare_at_unit_price","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The calculated price of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"tax_lines","type":"[LineItemTaxLineDTO](../../../interfaces/cart.LineItemTaxLineDTO/page.mdx)[]","description":"The associated tax lines.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the tax line","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The code of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`number`","description":"The rate of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the tax line was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the tax line was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item","type":"[CartLineItemDTO](../../../interfaces/cart.CartLineItemDTO/page.mdx)","description":"The associated line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_id","type":"`string`","description":"The ID of the associated line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The total tax relative to the item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The subtotal tax relative to the item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw total tax relative to the item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_subtotal","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw subtotal tax relative to the item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the tax line","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rate_id","type":"`string`","description":"The ID of the associated tax rate.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the associated provider.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"adjustments","type":"[LineItemAdjustmentDTO](../../../interfaces/cart.LineItemAdjustmentDTO/page.mdx)[]","description":"The associated adjustments.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the adjustment line","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The amount to adjust the original amount with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_amount","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw amount to adjust the original amount with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart_id","type":"`string`","description":"The ID of the associated cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the adjustment line was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the adjustment line was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item","type":"[CartLineItemDTO](../../../interfaces/cart.CartLineItemDTO/page.mdx)","description":"The associated line item.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"item_id","type":"`string`","description":"The ID of the associated line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The code of the promotion that lead to\nthis adjustment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the adjustment line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotion_id","type":"`string`","description":"The ID of the associated promotion.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the associated provider.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`null` \\| `Record`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"When the line item was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"When the line item was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`Date`","description":"When the line item was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"data","type":"Partial<[UpdateLineItemDTO](../../../interfaces/cart.UpdateLineItemDTO/page.mdx)>","description":"The attributes to update in the line items.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtitle","type":"`string`","description":"The subtitle of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`string`","description":"The thumbnail of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cart_id","type":"`string`","description":"The associated cart's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string`","description":"The associated product's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_title","type":"`string`","description":"The title of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_description","type":"`string`","description":"The description of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_subtitle","type":"`string`","description":"The subtitle of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_type","type":"`string`","description":"The type of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_type_id","type":"`string`","description":"The ID of type of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_collection","type":"`string`","description":"The collection of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_handle","type":"`string`","description":"The handle of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_id","type":"`string`","description":"The associated variant's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_sku","type":"`string`","description":"The SKU of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_barcode","type":"`string`","description":"The barcode of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_title","type":"`string`","description":"The title of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_option_values","type":"`Record`","description":"The option values of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requires_shipping","type":"`boolean`","description":"Whether the line item requires shipping.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_discountable","type":"`boolean`","description":"Whether the line item is discountable.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`boolean`","description":"Whether the line item's amount is tax inclusive.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_custom_price","type":"`boolean`","description":"Whether the line item's amount is a custom price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"compare_at_unit_price","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The calculated price of the line item after applying promotions.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"title","type":"`string`","description":"The title of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The quantity of the line item in the cart.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"unit_price","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The unit price of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`null` \\| `Record`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_lines","type":"[CreateTaxLineDTO](../../../interfaces/cart.CreateTaxLineDTO/page.mdx)[] \\| [UpdateTaxLineDTO](../../../interfaces/cart.UpdateTaxLineDTO/page.mdx)[]","description":"The tax lines of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The code of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`number`","description":"The rate of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the tax line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rate_id","type":"`string`","description":"The associated tax rate's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"item_id","type":"`string`","description":"The associated item's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"adjustments","type":"[CreateAdjustmentDTO](../../../interfaces/cart.CreateAdjustmentDTO/page.mdx)[] \\| [UpdateAdjustmentDTO](../../../interfaces/cart.UpdateAdjustmentDTO/page.mdx)[]","description":"The adjustments of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The code of the promotion that lead to\nthis adjustment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The amount to adjust the original amount with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the adjustment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the adjustment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotion_id","type":"`string`","description":"The associated promotion's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateLineItems"/> ### Returns @@ -93,7 +93,7 @@ const lineItem = await cartModuleService.updateLineItems( ### Parameters -`","description":"The option values of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requires_shipping","type":"`boolean`","description":"Whether the line item requires shipping.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_discountable","type":"`boolean`","description":"Whether the line item is discountable.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`boolean`","description":"Whether the line item's amount is tax inclusive.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_custom_price","type":"`boolean`","description":"Whether the line item's amount is a custom price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"compare_at_unit_price","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The calculated price of the line item after applying promotions.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"title","type":"`string`","description":"The title of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The quantity of the line item in the cart.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"unit_price","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The unit price of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`null` \\| `Record`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_lines","type":"[CreateTaxLineDTO](../../../interfaces/cart.CreateTaxLineDTO/page.mdx)[] \\| [UpdateTaxLineDTO](../../../interfaces/cart.UpdateTaxLineDTO/page.mdx)[]","description":"The tax lines of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The code of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`number`","description":"The rate of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the tax line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rate_id","type":"`string`","description":"The associated tax rate's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"item_id","type":"`string`","description":"The associated item's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the tax line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rate_id","type":"`string`","description":"The associated tax rate's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The code of the tax line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`number`","description":"The rate of the tax line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"item_id","type":"`string`","description":"The associated item's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"adjustments","type":"[CreateAdjustmentDTO](../../../interfaces/cart.CreateAdjustmentDTO/page.mdx)[] \\| [UpdateAdjustmentDTO](../../../interfaces/cart.UpdateAdjustmentDTO/page.mdx)[]","description":"The adjustments of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The code of the promotion that lead to\nthis adjustment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The amount to adjust the original amount with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the adjustment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The amount to adjust the original amount with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the adjustment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotion_id","type":"`string`","description":"The associated promotion's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The code of the promotion that lead to\nthis adjustment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the adjustment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotion_id","type":"`string`","description":"The associated promotion's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateLineItems"/> +`","description":"The option values of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requires_shipping","type":"`boolean`","description":"Whether the line item requires shipping.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_discountable","type":"`boolean`","description":"Whether the line item is discountable.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`boolean`","description":"Whether the line item's amount is tax inclusive.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_custom_price","type":"`boolean`","description":"Whether the line item's amount is a custom price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"compare_at_unit_price","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The calculated price of the line item after applying promotions.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"title","type":"`string`","description":"The title of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The quantity of the line item in the cart.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"unit_price","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The unit price of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`null` \\| `Record`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_lines","type":"[CreateTaxLineDTO](../../../interfaces/cart.CreateTaxLineDTO/page.mdx)[] \\| [UpdateTaxLineDTO](../../../interfaces/cart.UpdateTaxLineDTO/page.mdx)[]","description":"The tax lines of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The code of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`number`","description":"The rate of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the tax line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rate_id","type":"`string`","description":"The associated tax rate's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"item_id","type":"`string`","description":"The associated item's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"adjustments","type":"[CreateAdjustmentDTO](../../../interfaces/cart.CreateAdjustmentDTO/page.mdx)[] \\| [UpdateAdjustmentDTO](../../../interfaces/cart.UpdateAdjustmentDTO/page.mdx)[]","description":"The adjustments of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The code of the promotion that lead to\nthis adjustment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The amount to adjust the original amount with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the adjustment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the adjustment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotion_id","type":"`string`","description":"The associated promotion's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateLineItems"/> ### Returns diff --git a/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.updateShippingMethods/page.mdx b/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.updateShippingMethods/page.mdx index 67f09093b5..d1ec13b3e1 100644 --- a/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.updateShippingMethods/page.mdx +++ b/www/apps/resources/references/cart/ICartModuleService/methods/cart.ICartModuleService.updateShippingMethods/page.mdx @@ -33,7 +33,7 @@ const shippingMethods = await cartModuleService.updateShippingMethods([ ### Parameters -`","description":"The data of the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_lines","type":"[CreateTaxLineDTO](../../../interfaces/cart.CreateTaxLineDTO/page.mdx)[] \\| [UpdateTaxLineDTO](../../../interfaces/cart.UpdateTaxLineDTO/page.mdx)[]","description":"The tax lines of the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The code of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`number`","description":"The rate of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the tax line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rate_id","type":"`string`","description":"The associated tax rate's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"item_id","type":"`string`","description":"The associated item's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the tax line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rate_id","type":"`string`","description":"The associated tax rate's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The code of the tax line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`number`","description":"The rate of the tax line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"item_id","type":"`string`","description":"The associated item's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"adjustments","type":"[CreateAdjustmentDTO](../../../interfaces/cart.CreateAdjustmentDTO/page.mdx)[] \\| [UpdateAdjustmentDTO](../../../interfaces/cart.UpdateAdjustmentDTO/page.mdx)[]","description":"The adjustments of the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The code of the promotion that lead to\nthis adjustment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The amount to adjust the original amount with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the adjustment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The amount to adjust the original amount with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the adjustment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotion_id","type":"`string`","description":"The associated promotion's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The code of the promotion that lead to\nthis adjustment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the adjustment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotion_id","type":"`string`","description":"The associated promotion's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateShippingMethods"/> +`","description":"The data of the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_lines","type":"[CreateTaxLineDTO](../../../interfaces/cart.CreateTaxLineDTO/page.mdx)[] \\| [UpdateTaxLineDTO](../../../interfaces/cart.UpdateTaxLineDTO/page.mdx)[]","description":"The tax lines of the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The code of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`number`","description":"The rate of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the tax line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rate_id","type":"`string`","description":"The associated tax rate's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"item_id","type":"`string`","description":"The associated item's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"adjustments","type":"[CreateAdjustmentDTO](../../../interfaces/cart.CreateAdjustmentDTO/page.mdx)[] \\| [UpdateAdjustmentDTO](../../../interfaces/cart.UpdateAdjustmentDTO/page.mdx)[]","description":"The adjustments of the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The code of the promotion that lead to\nthis adjustment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The amount to adjust the original amount with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the adjustment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the adjustment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotion_id","type":"`string`","description":"The associated promotion's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateShippingMethods"/> ### Returns @@ -56,7 +56,7 @@ const lineItem = await cartModuleService.updateShippingMethods( ### Parameters -`","description":"The data of the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_lines","type":"[CreateTaxLineDTO](../../../interfaces/cart.CreateTaxLineDTO/page.mdx)[] \\| [UpdateTaxLineDTO](../../../interfaces/cart.UpdateTaxLineDTO/page.mdx)[]","description":"The tax lines of the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The code of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`number`","description":"The rate of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the tax line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rate_id","type":"`string`","description":"The associated tax rate's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"item_id","type":"`string`","description":"The associated item's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the tax line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rate_id","type":"`string`","description":"The associated tax rate's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The code of the tax line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`number`","description":"The rate of the tax line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"item_id","type":"`string`","description":"The associated item's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"adjustments","type":"[CreateAdjustmentDTO](../../../interfaces/cart.CreateAdjustmentDTO/page.mdx)[] \\| [UpdateAdjustmentDTO](../../../interfaces/cart.UpdateAdjustmentDTO/page.mdx)[]","description":"The adjustments of the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The code of the promotion that lead to\nthis adjustment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The amount to adjust the original amount with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the adjustment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The amount to adjust the original amount with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the adjustment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotion_id","type":"`string`","description":"The associated promotion's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The code of the promotion that lead to\nthis adjustment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the adjustment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotion_id","type":"`string`","description":"The associated promotion's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateShippingMethods"/> +`","description":"The data of the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_lines","type":"[CreateTaxLineDTO](../../../interfaces/cart.CreateTaxLineDTO/page.mdx)[] \\| [UpdateTaxLineDTO](../../../interfaces/cart.UpdateTaxLineDTO/page.mdx)[]","description":"The tax lines of the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The code of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`number`","description":"The rate of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the tax line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rate_id","type":"`string`","description":"The associated tax rate's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"item_id","type":"`string`","description":"The associated item's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"adjustments","type":"[CreateAdjustmentDTO](../../../interfaces/cart.CreateAdjustmentDTO/page.mdx)[] \\| [UpdateAdjustmentDTO](../../../interfaces/cart.UpdateAdjustmentDTO/page.mdx)[]","description":"The adjustments of the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The code of the promotion that lead to\nthis adjustment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The amount to adjust the original amount with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the adjustment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the adjustment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotion_id","type":"`string`","description":"The associated promotion's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateShippingMethods"/> ### Returns diff --git a/www/apps/resources/references/cart/IMessageAggregator/methods/cart.IMessageAggregator.saveRawMessageData/page.mdx b/www/apps/resources/references/cart/IMessageAggregator/methods/cart.IMessageAggregator.saveRawMessageData/page.mdx index f06440a599..42062df020 100644 --- a/www/apps/resources/references/cart/IMessageAggregator/methods/cart.IMessageAggregator.saveRawMessageData/page.mdx +++ b/www/apps/resources/references/cart/IMessageAggregator/methods/cart.IMessageAggregator.saveRawMessageData/page.mdx @@ -8,7 +8,7 @@ import { TypeList } from "docs-ui" ## Parameters -`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"action","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"Pick<[Context](../../../interfaces/cart.Context/page.mdx), \"eventGroupId\">","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"options","type":"`Record`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"options","type":"`Record`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="saveRawMessageData"/> +`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"options","type":"`Record`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="saveRawMessageData"/> ## Returns diff --git a/www/apps/resources/references/cart/IModuleService/methods/cart.IModuleService.__joinerConfig/page.mdx b/www/apps/resources/references/cart/IModuleService/methods/cart.IModuleService.__joinerConfig/page.mdx index c228a8ca4b..23d411a763 100644 --- a/www/apps/resources/references/cart/IModuleService/methods/cart.IModuleService.__joinerConfig/page.mdx +++ b/www/apps/resources/references/cart/IModuleService/methods/cart.IModuleService.__joinerConfig/page.mdx @@ -8,4 +8,4 @@ import { TypeList } from "docs-ui" ## Returns -`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"fieldAlias","type":"`Record`","description":"alias for deeper nested relationships (e.g. { 'price': 'prices.calculated\\_price\\_set.amount' })","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"path","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"forwardArgumentsOnPath","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"schema","type":"`string`","description":"GraphQL schema for the all module's available entities and fields","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relationships","type":"[ModuleJoinerRelationship](../../../types/cart.ModuleJoinerRelationship/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleteCascade","type":"`boolean`","description":"If true, the link joiner will cascade deleting the relationship","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"extends","type":"`object`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"relationship","type":"[ModuleJoinerRelationship](../../../types/cart.ModuleJoinerRelationship/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleteCascade","type":"`boolean`","description":"If true, the link joiner will cascade deleting the relationship","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fieldAlias","type":"`Record`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"path","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"forwardArgumentsOnPath","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"serviceName","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKeys","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isLink","type":"`boolean`","description":"If the module is a link module","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"linkableKeys","type":"`Record`","description":"Keys that can be used to link to other modules. e.g { product\\_id: \"Product\" } \"Product\" being the entity it refers to","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isReadOnlyLink","type":"`boolean`","description":"If true it expands a RemoteQuery property but doesn't create a pivot table","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"extraDataFields","type":"`string`[]","description":"Fields that will be part of the link record aside from the primary keys that can be updated\nIf not explicitly defined, this array will be populated by databaseConfig.extraFields","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"databaseConfig","type":"`object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tableName","type":"`string`","description":"Name of the pivot table. If not provided it is auto generated","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idPrefix","type":"`string`","description":"Prefix for the id column. If not provided it is \"link\"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"extraFields","type":"[LinkModulesExtraFields](../../../types/cart.LinkModulesExtraFields/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"type","type":"`\"date\"` \\| `\"time\"` \\| `\"datetime\"` \\| `bigint` \\| `\"blob\"` \\| `\"uint8array\"` \\| `\"array\"` \\| `\"enumArray\"` \\| `\"enum\"` \\| `\"json\"` \\| `\"integer\"` \\| `\"smallint\"` \\| `\"tinyint\"` \\| `\"mediumint\"` \\| `\"float\"` \\| `\"double\"` \\| `\"boolean\"` \\| `\"decimal\"` \\| `\"string\"` \\| `\"uuid\"` \\| `\"text\"`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"defaultValue","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"nullable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record`","description":"Mikro-orm options for the column","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__joinerConfig"/> +`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"fieldAlias","type":"`Record`","description":"alias for deeper nested relationships (e.g. { 'price': 'prices.calculated\\_price\\_set.amount' })","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"path","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"forwardArgumentsOnPath","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"schema","type":"`string`","description":"GraphQL schema for the all module's available entities and fields","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relationships","type":"[ModuleJoinerRelationship](../../../types/cart.ModuleJoinerRelationship/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleteCascade","type":"`boolean`","description":"If true, the link joiner will cascade deleting the relationship","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"extends","type":"`object`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"relationship","type":"[ModuleJoinerRelationship](../../../types/cart.ModuleJoinerRelationship/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleteCascade","type":"`boolean`","description":"If true, the link joiner will cascade deleting the relationship","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fieldAlias","type":"`Record`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"path","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"forwardArgumentsOnPath","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"serviceName","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKeys","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isLink","type":"`boolean`","description":"If the module is a link module","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"linkableKeys","type":"`Record`","description":"Keys that can be used to link to other modules. e.g { product\\_id: \"Product\" } \"Product\" being the entity it refers to","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isReadOnlyLink","type":"`boolean`","description":"If true it expands a RemoteQuery property but doesn't create a pivot table","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"extraDataFields","type":"`string`[]","description":"Fields that will be part of the link record aside from the primary keys that can be updated\nIf not explicitly defined, this array will be populated by databaseConfig.extraFields","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"databaseConfig","type":"`object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tableName","type":"`string`","description":"Name of the pivot table. If not provided it is auto generated","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idPrefix","type":"`string`","description":"Prefix for the id column. If not provided it is \"link\"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"extraFields","type":"[LinkModulesExtraFields](../../../types/cart.LinkModulesExtraFields/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"type","type":"`\"date\"` \\| `\"time\"` \\| `\"datetime\"` \\| `bigint` \\| `\"blob\"` \\| `\"uint8array\"` \\| `\"array\"` \\| `\"enumArray\"` \\| `\"enum\"` \\| `\"json\"` \\| `\"integer\"` \\| `\"smallint\"` \\| `\"tinyint\"` \\| `\"mediumint\"` \\| `\"float\"` \\| `\"double\"` \\| `\"boolean\"` \\| `\"decimal\"` \\| `\"string\"` \\| `\"uuid\"` \\| `\"text\"`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"defaultValue","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"nullable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record`","description":"Mikro-orm options for the column","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__joinerConfig"/> diff --git a/www/apps/resources/references/cart/interfaces/cart.FilterableAddressProps/page.mdx b/www/apps/resources/references/cart/interfaces/cart.FilterableAddressProps/page.mdx index ac05dd87ec..ff97f3222b 100644 --- a/www/apps/resources/references/cart/interfaces/cart.FilterableAddressProps/page.mdx +++ b/www/apps/resources/references/cart/interfaces/cart.FilterableAddressProps/page.mdx @@ -8,4 +8,4 @@ import { TypeList } from "docs-ui" The filters to apply on the retrieved addresss. - + diff --git a/www/apps/resources/references/cart/interfaces/cart.FilterableCartProps/page.mdx b/www/apps/resources/references/cart/interfaces/cart.FilterableCartProps/page.mdx index 5b77b51cde..49d9a3821e 100644 --- a/www/apps/resources/references/cart/interfaces/cart.FilterableCartProps/page.mdx +++ b/www/apps/resources/references/cart/interfaces/cart.FilterableCartProps/page.mdx @@ -8,4 +8,4 @@ import { TypeList } from "docs-ui" The filters to apply on the retrieved carts. - + diff --git a/www/apps/resources/references/cart/interfaces/cart.FilterableLineItemAdjustmentProps/page.mdx b/www/apps/resources/references/cart/interfaces/cart.FilterableLineItemAdjustmentProps/page.mdx index 1756c59d71..730796c608 100644 --- a/www/apps/resources/references/cart/interfaces/cart.FilterableLineItemAdjustmentProps/page.mdx +++ b/www/apps/resources/references/cart/interfaces/cart.FilterableLineItemAdjustmentProps/page.mdx @@ -8,4 +8,4 @@ import { TypeList } from "docs-ui" The filters to apply on the retrieved line item adjustments. - + diff --git a/www/apps/resources/references/cart/interfaces/cart.FilterableLineItemProps/page.mdx b/www/apps/resources/references/cart/interfaces/cart.FilterableLineItemProps/page.mdx index 5f91c8a487..bf4c23fccc 100644 --- a/www/apps/resources/references/cart/interfaces/cart.FilterableLineItemProps/page.mdx +++ b/www/apps/resources/references/cart/interfaces/cart.FilterableLineItemProps/page.mdx @@ -8,4 +8,4 @@ import { TypeList } from "docs-ui" The filters to apply on the retrieved line items. - + diff --git a/www/apps/resources/references/cart/interfaces/cart.FilterableLineItemTaxLineProps/page.mdx b/www/apps/resources/references/cart/interfaces/cart.FilterableLineItemTaxLineProps/page.mdx index 9f97efea2a..3c14e0ea06 100644 --- a/www/apps/resources/references/cart/interfaces/cart.FilterableLineItemTaxLineProps/page.mdx +++ b/www/apps/resources/references/cart/interfaces/cart.FilterableLineItemTaxLineProps/page.mdx @@ -8,4 +8,4 @@ import { TypeList } from "docs-ui" The filters to apply on the retrieved line item tax lines. - + diff --git a/www/apps/resources/references/cart/interfaces/cart.FilterableShippingMethodAdjustmentProps/page.mdx b/www/apps/resources/references/cart/interfaces/cart.FilterableShippingMethodAdjustmentProps/page.mdx index 35d8c497c6..cd32a933b9 100644 --- a/www/apps/resources/references/cart/interfaces/cart.FilterableShippingMethodAdjustmentProps/page.mdx +++ b/www/apps/resources/references/cart/interfaces/cart.FilterableShippingMethodAdjustmentProps/page.mdx @@ -8,4 +8,4 @@ import { TypeList } from "docs-ui" The filters to apply on the retrieved shipping method adjustments. - + diff --git a/www/apps/resources/references/cart/interfaces/cart.FilterableShippingMethodProps/page.mdx b/www/apps/resources/references/cart/interfaces/cart.FilterableShippingMethodProps/page.mdx index ba242c90f7..3e6ae91967 100644 --- a/www/apps/resources/references/cart/interfaces/cart.FilterableShippingMethodProps/page.mdx +++ b/www/apps/resources/references/cart/interfaces/cart.FilterableShippingMethodProps/page.mdx @@ -8,4 +8,4 @@ import { TypeList } from "docs-ui" The filters to apply on the retrieved shipping methods. - + diff --git a/www/apps/resources/references/cart/interfaces/cart.FilterableShippingMethodTaxLineProps/page.mdx b/www/apps/resources/references/cart/interfaces/cart.FilterableShippingMethodTaxLineProps/page.mdx index 8007d17fcc..f00a2925c6 100644 --- a/www/apps/resources/references/cart/interfaces/cart.FilterableShippingMethodTaxLineProps/page.mdx +++ b/www/apps/resources/references/cart/interfaces/cart.FilterableShippingMethodTaxLineProps/page.mdx @@ -8,4 +8,4 @@ import { TypeList } from "docs-ui" The filters to apply on the retrieved shipping method tax lines. - + diff --git a/www/apps/resources/references/cart/interfaces/cart.JoinerServiceConfig/page.mdx b/www/apps/resources/references/cart/interfaces/cart.JoinerServiceConfig/page.mdx index 4b7dd3533e..c07a632df3 100644 --- a/www/apps/resources/references/cart/interfaces/cart.JoinerServiceConfig/page.mdx +++ b/www/apps/resources/references/cart/interfaces/cart.JoinerServiceConfig/page.mdx @@ -6,4 +6,4 @@ import { TypeList } from "docs-ui" # JoinerServiceConfig -`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"fieldAlias","type":"`Record`","description":"alias for deeper nested relationships (e.g. { 'price': 'prices.calculated\\_price\\_set.amount' })","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"path","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"forwardArgumentsOnPath","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"relationships","type":"[JoinerRelationship](../../types/cart.JoinerRelationship/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"extends","type":"`object`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"relationship","type":"[JoinerRelationship](../../types/cart.JoinerRelationship/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="JoinerServiceConfig"/> +`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"fieldAlias","type":"`Record`","description":"alias for deeper nested relationships (e.g. { 'price': 'prices.calculated\\_price\\_set.amount' })","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"path","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"forwardArgumentsOnPath","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"relationships","type":"[JoinerRelationship](../../types/cart.JoinerRelationship/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"extends","type":"`object`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"relationship","type":"[JoinerRelationship](../../types/cart.JoinerRelationship/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="JoinerServiceConfig"/> diff --git a/www/apps/resources/references/cart/interfaces/cart.UpdateCartDTO/page.mdx b/www/apps/resources/references/cart/interfaces/cart.UpdateCartDTO/page.mdx index 29bb7963a3..d868c95afd 100644 --- a/www/apps/resources/references/cart/interfaces/cart.UpdateCartDTO/page.mdx +++ b/www/apps/resources/references/cart/interfaces/cart.UpdateCartDTO/page.mdx @@ -8,4 +8,4 @@ import { TypeList } from "docs-ui" The attributes to update in the cart. -`","description":"Holds custom data in key-value pairs.","optional":true,"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 province 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`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"shipping_address","type":"`null` \\| [UpdateAddressDTO](../cart.UpdateAddressDTO/page.mdx) \\| [CreateAddressDTO](../cart.CreateAddressDTO/page.mdx)","description":"The shipping address of the cart.","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 province 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`","description":"Holds custom data in key-value pairs.","optional":true,"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 province 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`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`null` \\| `Record`","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="UpdateCartDTO"/> +`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"shipping_address","type":"`null` \\| [UpdateAddressDTO](../cart.UpdateAddressDTO/page.mdx) \\| [CreateAddressDTO](../cart.CreateAddressDTO/page.mdx)","description":"The shipping address of the cart.","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 province 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`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`null` \\| `Record`","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="UpdateCartDTO"/> diff --git a/www/apps/resources/references/cart/interfaces/cart.UpdateCartDataDTO/page.mdx b/www/apps/resources/references/cart/interfaces/cart.UpdateCartDataDTO/page.mdx index 6a7a9e1a75..227cb2572b 100644 --- a/www/apps/resources/references/cart/interfaces/cart.UpdateCartDataDTO/page.mdx +++ b/www/apps/resources/references/cart/interfaces/cart.UpdateCartDataDTO/page.mdx @@ -8,4 +8,4 @@ import { TypeList } from "docs-ui" The attributes to update in the cart data. -`","description":"Holds custom data in key-value pairs.","optional":true,"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 province 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`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"shipping_address","type":"`null` \\| [UpdateAddressDTO](../cart.UpdateAddressDTO/page.mdx) \\| [CreateAddressDTO](../cart.CreateAddressDTO/page.mdx)","description":"The shipping address of the cart.","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 province 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`","description":"Holds custom data in key-value pairs.","optional":true,"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 province 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`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`null` \\| `Record`","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="UpdateCartDataDTO"/> +`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"shipping_address","type":"`null` \\| [UpdateAddressDTO](../cart.UpdateAddressDTO/page.mdx) \\| [CreateAddressDTO](../cart.CreateAddressDTO/page.mdx)","description":"The shipping address of the cart.","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 province 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`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`null` \\| `Record`","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="UpdateCartDataDTO"/> diff --git a/www/apps/resources/references/cart/interfaces/cart.UpdateLineItemDTO/page.mdx b/www/apps/resources/references/cart/interfaces/cart.UpdateLineItemDTO/page.mdx index 44094989a4..bc19e1a760 100644 --- a/www/apps/resources/references/cart/interfaces/cart.UpdateLineItemDTO/page.mdx +++ b/www/apps/resources/references/cart/interfaces/cart.UpdateLineItemDTO/page.mdx @@ -8,4 +8,4 @@ import { TypeList } from "docs-ui" The attributes to update in a line item. -`","description":"The option values of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requires_shipping","type":"`boolean`","description":"Whether the line item requires shipping.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_discountable","type":"`boolean`","description":"Whether the line item is discountable.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`boolean`","description":"Whether the line item's amount is tax inclusive.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_custom_price","type":"`boolean`","description":"Whether the line item's amount is a custom price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"compare_at_unit_price","type":"[BigNumberInput](../../types/cart.BigNumberInput/page.mdx)","description":"The calculated price of the line item after applying promotions.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"title","type":"`string`","description":"The title of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"[BigNumberInput](../../types/cart.BigNumberInput/page.mdx)","description":"The quantity of the line item in the cart.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"unit_price","type":"[BigNumberInput](../../types/cart.BigNumberInput/page.mdx)","description":"The unit price of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`null` \\| `Record`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_lines","type":"[CreateTaxLineDTO](../cart.CreateTaxLineDTO/page.mdx)[] \\| [UpdateTaxLineDTO](../cart.UpdateTaxLineDTO/page.mdx)[]","description":"The tax lines of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The code of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`number`","description":"The rate of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the tax line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rate_id","type":"`string`","description":"The associated tax rate's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"item_id","type":"`string`","description":"The associated item's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the tax line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rate_id","type":"`string`","description":"The associated tax rate's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The code of the tax line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`number`","description":"The rate of the tax line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"item_id","type":"`string`","description":"The associated item's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"adjustments","type":"[CreateAdjustmentDTO](../cart.CreateAdjustmentDTO/page.mdx)[] \\| [UpdateAdjustmentDTO](../cart.UpdateAdjustmentDTO/page.mdx)[]","description":"The adjustments of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The code of the promotion that lead to\nthis adjustment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../types/cart.BigNumberInput/page.mdx)","description":"The amount to adjust the original amount with.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"id","type":"`string`","description":"The ID of the adjustment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../types/cart.BigNumberInput/page.mdx)","description":"The amount to adjust the original amount with.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"description","type":"`string`","description":"The description of the adjustment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotion_id","type":"`string`","description":"The associated promotion's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The code of the promotion that lead to\nthis adjustment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the adjustment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotion_id","type":"`string`","description":"The associated promotion's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="UpdateLineItemDTO"/> +`","description":"The option values of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requires_shipping","type":"`boolean`","description":"Whether the line item requires shipping.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_discountable","type":"`boolean`","description":"Whether the line item is discountable.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`boolean`","description":"Whether the line item's amount is tax inclusive.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_custom_price","type":"`boolean`","description":"Whether the line item's amount is a custom price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"compare_at_unit_price","type":"[BigNumberInput](../../types/cart.BigNumberInput/page.mdx)","description":"The calculated price of the line item after applying promotions.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"title","type":"`string`","description":"The title of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"[BigNumberInput](../../types/cart.BigNumberInput/page.mdx)","description":"The quantity of the line item in the cart.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"unit_price","type":"[BigNumberInput](../../types/cart.BigNumberInput/page.mdx)","description":"The unit price of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`null` \\| `Record`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_lines","type":"[CreateTaxLineDTO](../cart.CreateTaxLineDTO/page.mdx)[] \\| [UpdateTaxLineDTO](../cart.UpdateTaxLineDTO/page.mdx)[]","description":"The tax lines of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The code of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`number`","description":"The rate of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the tax line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rate_id","type":"`string`","description":"The associated tax rate's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"item_id","type":"`string`","description":"The associated item's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"adjustments","type":"[CreateAdjustmentDTO](../cart.CreateAdjustmentDTO/page.mdx)[] \\| [UpdateAdjustmentDTO](../cart.UpdateAdjustmentDTO/page.mdx)[]","description":"The adjustments of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The code of the promotion that lead to\nthis adjustment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../types/cart.BigNumberInput/page.mdx)","description":"The amount to adjust the original amount with.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"id","type":"`string`","description":"The ID of the adjustment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the adjustment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotion_id","type":"`string`","description":"The associated promotion's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="UpdateLineItemDTO"/> diff --git a/www/apps/resources/references/cart/interfaces/cart.UpdateLineItemWithSelectorDTO/page.mdx b/www/apps/resources/references/cart/interfaces/cart.UpdateLineItemWithSelectorDTO/page.mdx index 04afc40b73..801f1a4f8e 100644 --- a/www/apps/resources/references/cart/interfaces/cart.UpdateLineItemWithSelectorDTO/page.mdx +++ b/www/apps/resources/references/cart/interfaces/cart.UpdateLineItemWithSelectorDTO/page.mdx @@ -10,4 +10,4 @@ A pair of selectors and data, where the selectors determine which line items to update, and the data determines what to update in the line items. -`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"completed_at","type":"`string` \\| `Date`","description":"When the cart was completed.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the cart was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the cart was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"cart_id","type":"`string`","description":"The ID of the associated cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtitle","type":"`string`","description":"The subtitle of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`string`","description":"The line item's thumbnail.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string`","description":"The ID of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_title","type":"`string`","description":"The title of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_description","type":"`string`","description":"The description of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_subtitle","type":"`string`","description":"The subtitle of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_type","type":"`string`","description":"The type of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_type_id","type":"`string`","description":"The type of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_collection","type":"`string`","description":"The collection of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_handle","type":"`string`","description":"The handle of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_id","type":"`string`","description":"The associated variant's ID of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_sku","type":"`string`","description":"The sku of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_barcode","type":"`string`","description":"The barcode of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_title","type":"`string`","description":"The title of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_option_values","type":"`Record`","description":"The option values of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"compare_at_unit_price","type":"[BigNumberValue](../../types/cart.BigNumberValue/page.mdx)","description":"The calculated price of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"tax_lines","type":"[LineItemTaxLineDTO](../cart.LineItemTaxLineDTO/page.mdx)[]","description":"The associated tax lines.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the tax line","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The code of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`number`","description":"The rate of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the tax line was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the tax line was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item","type":"[CartLineItemDTO](../cart.CartLineItemDTO/page.mdx)","description":"The associated line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_id","type":"`string`","description":"The ID of the associated line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"[BigNumberValue](../../types/cart.BigNumberValue/page.mdx)","description":"The total tax relative to the item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"[BigNumberValue](../../types/cart.BigNumberValue/page.mdx)","description":"The subtotal tax relative to the item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_total","type":"[BigNumberRawValue](../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw total tax relative to the item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_subtotal","type":"[BigNumberRawValue](../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw subtotal tax relative to the item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the tax line","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rate_id","type":"`string`","description":"The ID of the associated tax rate.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the associated provider.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"adjustments","type":"[LineItemAdjustmentDTO](../cart.LineItemAdjustmentDTO/page.mdx)[]","description":"The associated adjustments.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the adjustment line","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../types/cart.BigNumberValue/page.mdx)","description":"The amount to adjust the original amount with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_amount","type":"[BigNumberRawValue](../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw amount to adjust the original amount with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart_id","type":"`string`","description":"The ID of the associated cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the adjustment line was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the adjustment line was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item","type":"[CartLineItemDTO](../cart.CartLineItemDTO/page.mdx)","description":"The associated line item.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"item_id","type":"`string`","description":"The ID of the associated line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The code of the promotion that lead to\nthis adjustment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the adjustment line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotion_id","type":"`string`","description":"The ID of the associated promotion.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the associated provider.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`null` \\| `Record`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"When the line item was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"When the line item was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`Date`","description":"When the line item was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"data","type":"Partial<[UpdateLineItemDTO](../cart.UpdateLineItemDTO/page.mdx)>","description":"The attributes to update in the line items.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtitle","type":"`string`","description":"The subtitle of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`string`","description":"The thumbnail of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cart_id","type":"`string`","description":"The associated cart's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string`","description":"The associated product's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_title","type":"`string`","description":"The title of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_description","type":"`string`","description":"The description of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_subtitle","type":"`string`","description":"The subtitle of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_type","type":"`string`","description":"The type of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_type_id","type":"`string`","description":"The ID of type of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_collection","type":"`string`","description":"The collection of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_handle","type":"`string`","description":"The handle of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_id","type":"`string`","description":"The associated variant's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_sku","type":"`string`","description":"The SKU of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_barcode","type":"`string`","description":"The barcode of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_title","type":"`string`","description":"The title of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_option_values","type":"`Record`","description":"The option values of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requires_shipping","type":"`boolean`","description":"Whether the line item requires shipping.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_discountable","type":"`boolean`","description":"Whether the line item is discountable.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`boolean`","description":"Whether the line item's amount is tax inclusive.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_custom_price","type":"`boolean`","description":"Whether the line item's amount is a custom price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"compare_at_unit_price","type":"[BigNumberInput](../../types/cart.BigNumberInput/page.mdx)","description":"The calculated price of the line item after applying promotions.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"title","type":"`string`","description":"The title of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"[BigNumberInput](../../types/cart.BigNumberInput/page.mdx)","description":"The quantity of the line item in the cart.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"unit_price","type":"[BigNumberInput](../../types/cart.BigNumberInput/page.mdx)","description":"The unit price of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`null` \\| `Record`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_lines","type":"[CreateTaxLineDTO](../cart.CreateTaxLineDTO/page.mdx)[] \\| [UpdateTaxLineDTO](../cart.UpdateTaxLineDTO/page.mdx)[]","description":"The tax lines of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The code of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`number`","description":"The rate of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the tax line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rate_id","type":"`string`","description":"The associated tax rate's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"item_id","type":"`string`","description":"The associated item's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the tax line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rate_id","type":"`string`","description":"The associated tax rate's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The code of the tax line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`number`","description":"The rate of the tax line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"item_id","type":"`string`","description":"The associated item's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"adjustments","type":"[CreateAdjustmentDTO](../cart.CreateAdjustmentDTO/page.mdx)[] \\| [UpdateAdjustmentDTO](../cart.UpdateAdjustmentDTO/page.mdx)[]","description":"The adjustments of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The code of the promotion that lead to\nthis adjustment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../types/cart.BigNumberInput/page.mdx)","description":"The amount to adjust the original amount with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the adjustment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../types/cart.BigNumberInput/page.mdx)","description":"The amount to adjust the original amount with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the adjustment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotion_id","type":"`string`","description":"The associated promotion's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The code of the promotion that lead to\nthis adjustment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the adjustment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotion_id","type":"`string`","description":"The associated promotion's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="UpdateLineItemWithSelectorDTO"/> +`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"completed_at","type":"`string` \\| `Date`","description":"When the cart was completed.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the cart was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the cart was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"cart_id","type":"`string`","description":"The ID of the associated cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtitle","type":"`string`","description":"The subtitle of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`string`","description":"The line item's thumbnail.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string`","description":"The ID of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_title","type":"`string`","description":"The title of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_description","type":"`string`","description":"The description of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_subtitle","type":"`string`","description":"The subtitle of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_type","type":"`string`","description":"The type of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_type_id","type":"`string`","description":"The type of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_collection","type":"`string`","description":"The collection of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_handle","type":"`string`","description":"The handle of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_id","type":"`string`","description":"The associated variant's ID of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_sku","type":"`string`","description":"The sku of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_barcode","type":"`string`","description":"The barcode of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_title","type":"`string`","description":"The title of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_option_values","type":"`Record`","description":"The option values of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"compare_at_unit_price","type":"[BigNumberValue](../../types/cart.BigNumberValue/page.mdx)","description":"The calculated price of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"tax_lines","type":"[LineItemTaxLineDTO](../cart.LineItemTaxLineDTO/page.mdx)[]","description":"The associated tax lines.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the tax line","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The code of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`number`","description":"The rate of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the tax line was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the tax line was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item","type":"[CartLineItemDTO](../cart.CartLineItemDTO/page.mdx)","description":"The associated line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_id","type":"`string`","description":"The ID of the associated line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"[BigNumberValue](../../types/cart.BigNumberValue/page.mdx)","description":"The total tax relative to the item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"[BigNumberValue](../../types/cart.BigNumberValue/page.mdx)","description":"The subtotal tax relative to the item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_total","type":"[BigNumberRawValue](../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw total tax relative to the item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_subtotal","type":"[BigNumberRawValue](../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw subtotal tax relative to the item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the tax line","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rate_id","type":"`string`","description":"The ID of the associated tax rate.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the associated provider.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"adjustments","type":"[LineItemAdjustmentDTO](../cart.LineItemAdjustmentDTO/page.mdx)[]","description":"The associated adjustments.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the adjustment line","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../types/cart.BigNumberValue/page.mdx)","description":"The amount to adjust the original amount with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_amount","type":"[BigNumberRawValue](../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw amount to adjust the original amount with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart_id","type":"`string`","description":"The ID of the associated cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the adjustment line was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the adjustment line was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item","type":"[CartLineItemDTO](../cart.CartLineItemDTO/page.mdx)","description":"The associated line item.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"item_id","type":"`string`","description":"The ID of the associated line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The code of the promotion that lead to\nthis adjustment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the adjustment line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotion_id","type":"`string`","description":"The ID of the associated promotion.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the associated provider.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`null` \\| `Record`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"When the line item was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"When the line item was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`Date`","description":"When the line item was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"data","type":"Partial<[UpdateLineItemDTO](../cart.UpdateLineItemDTO/page.mdx)>","description":"The attributes to update in the line items.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtitle","type":"`string`","description":"The subtitle of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`string`","description":"The thumbnail of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cart_id","type":"`string`","description":"The associated cart's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string`","description":"The associated product's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_title","type":"`string`","description":"The title of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_description","type":"`string`","description":"The description of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_subtitle","type":"`string`","description":"The subtitle of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_type","type":"`string`","description":"The type of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_type_id","type":"`string`","description":"The ID of type of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_collection","type":"`string`","description":"The collection of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_handle","type":"`string`","description":"The handle of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_id","type":"`string`","description":"The associated variant's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_sku","type":"`string`","description":"The SKU of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_barcode","type":"`string`","description":"The barcode of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_title","type":"`string`","description":"The title of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_option_values","type":"`Record`","description":"The option values of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requires_shipping","type":"`boolean`","description":"Whether the line item requires shipping.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_discountable","type":"`boolean`","description":"Whether the line item is discountable.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`boolean`","description":"Whether the line item's amount is tax inclusive.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_custom_price","type":"`boolean`","description":"Whether the line item's amount is a custom price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"compare_at_unit_price","type":"[BigNumberInput](../../types/cart.BigNumberInput/page.mdx)","description":"The calculated price of the line item after applying promotions.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"title","type":"`string`","description":"The title of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"[BigNumberInput](../../types/cart.BigNumberInput/page.mdx)","description":"The quantity of the line item in the cart.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"unit_price","type":"[BigNumberInput](../../types/cart.BigNumberInput/page.mdx)","description":"The unit price of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`null` \\| `Record`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_lines","type":"[CreateTaxLineDTO](../cart.CreateTaxLineDTO/page.mdx)[] \\| [UpdateTaxLineDTO](../cart.UpdateTaxLineDTO/page.mdx)[]","description":"The tax lines of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The code of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`number`","description":"The rate of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the tax line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rate_id","type":"`string`","description":"The associated tax rate's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"item_id","type":"`string`","description":"The associated item's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"adjustments","type":"[CreateAdjustmentDTO](../cart.CreateAdjustmentDTO/page.mdx)[] \\| [UpdateAdjustmentDTO](../cart.UpdateAdjustmentDTO/page.mdx)[]","description":"The adjustments of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The code of the promotion that lead to\nthis adjustment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../types/cart.BigNumberInput/page.mdx)","description":"The amount to adjust the original amount with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the adjustment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the adjustment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotion_id","type":"`string`","description":"The associated promotion's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="UpdateLineItemWithSelectorDTO"/> diff --git a/www/apps/resources/references/cart/interfaces/cart.UpdateShippingMethodDTO/page.mdx b/www/apps/resources/references/cart/interfaces/cart.UpdateShippingMethodDTO/page.mdx index 1ec358a791..82518204d5 100644 --- a/www/apps/resources/references/cart/interfaces/cart.UpdateShippingMethodDTO/page.mdx +++ b/www/apps/resources/references/cart/interfaces/cart.UpdateShippingMethodDTO/page.mdx @@ -8,4 +8,4 @@ import { TypeList } from "docs-ui" The attributes to update in the shipping method. -`","description":"The data of the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_lines","type":"[CreateTaxLineDTO](../cart.CreateTaxLineDTO/page.mdx)[] \\| [UpdateTaxLineDTO](../cart.UpdateTaxLineDTO/page.mdx)[]","description":"The tax lines of the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The code of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`number`","description":"The rate of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the tax line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rate_id","type":"`string`","description":"The associated tax rate's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"item_id","type":"`string`","description":"The associated item's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the tax line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rate_id","type":"`string`","description":"The associated tax rate's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The code of the tax line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`number`","description":"The rate of the tax line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"item_id","type":"`string`","description":"The associated item's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"adjustments","type":"[CreateAdjustmentDTO](../cart.CreateAdjustmentDTO/page.mdx)[] \\| [UpdateAdjustmentDTO](../cart.UpdateAdjustmentDTO/page.mdx)[]","description":"The adjustments of the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The code of the promotion that lead to\nthis adjustment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../types/cart.BigNumberInput/page.mdx)","description":"The amount to adjust the original amount with.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"id","type":"`string`","description":"The ID of the adjustment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../types/cart.BigNumberInput/page.mdx)","description":"The amount to adjust the original amount with.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"description","type":"`string`","description":"The description of the adjustment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotion_id","type":"`string`","description":"The associated promotion's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The code of the promotion that lead to\nthis adjustment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the adjustment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotion_id","type":"`string`","description":"The associated promotion's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="UpdateShippingMethodDTO"/> +`","description":"The data of the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_lines","type":"[CreateTaxLineDTO](../cart.CreateTaxLineDTO/page.mdx)[] \\| [UpdateTaxLineDTO](../cart.UpdateTaxLineDTO/page.mdx)[]","description":"The tax lines of the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The code of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`number`","description":"The rate of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the tax line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rate_id","type":"`string`","description":"The associated tax rate's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"item_id","type":"`string`","description":"The associated item's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"adjustments","type":"[CreateAdjustmentDTO](../cart.CreateAdjustmentDTO/page.mdx)[] \\| [UpdateAdjustmentDTO](../cart.UpdateAdjustmentDTO/page.mdx)[]","description":"The adjustments of the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The code of the promotion that lead to\nthis adjustment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../types/cart.BigNumberInput/page.mdx)","description":"The amount to adjust the original amount with.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"id","type":"`string`","description":"The ID of the adjustment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the adjustment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotion_id","type":"`string`","description":"The associated promotion's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="UpdateShippingMethodDTO"/> diff --git a/www/apps/resources/references/core_flows/Api_Key/Steps_Api_Key/functions/core_flows.Api_Key.Steps_Api_Key.createApiKeysStep/page.mdx b/www/apps/resources/references/core_flows/Api_Key/Steps_Api_Key/functions/core_flows.Api_Key.Steps_Api_Key.createApiKeysStep/page.mdx index eb5f277b45..e446063774 100644 --- a/www/apps/resources/references/core_flows/Api_Key/Steps_Api_Key/functions/core_flows.Api_Key.Steps_Api_Key.createApiKeysStep/page.mdx +++ b/www/apps/resources/references/core_flows/Api_Key/Steps_Api_Key/functions/core_flows.Api_Key.Steps_Api_Key.createApiKeysStep/page.mdx @@ -23,9 +23,9 @@ const myWorkflow = createWorkflow( () => { const data = createApiKeysStep({ "api_keys": [{ - "title": "acervus", + "title": "derideo", "type": "secret", - "created_by": "user_VvjemccZRm1P9fT0" + "created_by": "user_NaVGVsHtBHlMwdJ" }] }) } diff --git a/www/apps/resources/references/core_flows/Api_Key/Steps_Api_Key/functions/core_flows.Api_Key.Steps_Api_Key.linkSalesChannelsToApiKeyStep/page.mdx b/www/apps/resources/references/core_flows/Api_Key/Steps_Api_Key/functions/core_flows.Api_Key.Steps_Api_Key.linkSalesChannelsToApiKeyStep/page.mdx index ccfd0ca0b8..1504e9a45f 100644 --- a/www/apps/resources/references/core_flows/Api_Key/Steps_Api_Key/functions/core_flows.Api_Key.Steps_Api_Key.linkSalesChannelsToApiKeyStep/page.mdx +++ b/www/apps/resources/references/core_flows/Api_Key/Steps_Api_Key/functions/core_flows.Api_Key.Steps_Api_Key.linkSalesChannelsToApiKeyStep/page.mdx @@ -22,7 +22,7 @@ const myWorkflow = createWorkflow( "my-workflow", () => { const data = linkSalesChannelsToApiKeyStep({ - "id": "id_lIAGOo3vxm" + "id": "id_vb6fZX5fJAEOWY" }) } ) diff --git a/www/apps/resources/references/core_flows/Api_Key/Workflows_Api_Key/functions/core_flows.Api_Key.Workflows_Api_Key.createApiKeysWorkflow/page.mdx b/www/apps/resources/references/core_flows/Api_Key/Workflows_Api_Key/functions/core_flows.Api_Key.Workflows_Api_Key.createApiKeysWorkflow/page.mdx index cde8c684d7..e7592cc35d 100644 --- a/www/apps/resources/references/core_flows/Api_Key/Workflows_Api_Key/functions/core_flows.Api_Key.Workflows_Api_Key.createApiKeysWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Api_Key/Workflows_Api_Key/functions/core_flows.Api_Key.Workflows_Api_Key.createApiKeysWorkflow/page.mdx @@ -16,31 +16,9 @@ This workflow creates one or more API keys. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createApiKeysWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createApiKeysWorkflow - .runAsStep({ - input: { - "api_keys": [{ - "title": "subvenio", - "type": "publishable", - "created_by": "user_lFoawrDa6j3BQZPV" - }] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -58,9 +36,9 @@ export async function POST( .run({ input: { "api_keys": [{ - "title": "subvenio", + "title": "suscipio", "type": "publishable", - "created_by": "user_lFoawrDa6j3BQZPV" + "created_by": "user_svZrl7Ubex" }] } }) @@ -87,9 +65,9 @@ export default async function handleOrderPlaced({ .run({ input: { "api_keys": [{ - "title": "subvenio", + "title": "suscipio", "type": "publishable", - "created_by": "user_lFoawrDa6j3BQZPV" + "created_by": "user_svZrl7Ubex" }] } }) @@ -116,9 +94,9 @@ export default async function myCustomJob( .run({ input: { "api_keys": [{ - "title": "subvenio", + "title": "suscipio", "type": "publishable", - "created_by": "user_lFoawrDa6j3BQZPV" + "created_by": "user_svZrl7Ubex" }] } }) @@ -130,6 +108,30 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createApiKeysWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createApiKeysWorkflow + .runAsStep({ + input: { + "api_keys": [{ + "title": "suscipio", + "type": "publishable", + "created_by": "user_svZrl7Ubex" + }] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Api_Key/Workflows_Api_Key/functions/core_flows.Api_Key.Workflows_Api_Key.deleteApiKeysWorkflow/page.mdx b/www/apps/resources/references/core_flows/Api_Key/Workflows_Api_Key/functions/core_flows.Api_Key.Workflows_Api_Key.deleteApiKeysWorkflow/page.mdx index 280efd36c4..b8ee042689 100644 --- a/www/apps/resources/references/core_flows/Api_Key/Workflows_Api_Key/functions/core_flows.Api_Key.Workflows_Api_Key.deleteApiKeysWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Api_Key/Workflows_Api_Key/functions/core_flows.Api_Key.Workflows_Api_Key.deleteApiKeysWorkflow/page.mdx @@ -17,29 +17,9 @@ This workflow deletes one or more API keys. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { deleteApiKeysWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = deleteApiKeysWorkflow - .runAsStep({ - input: { - "ids": [ - "id_oAdfP14QUoqh" - ] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -57,7 +37,7 @@ export async function POST( .run({ input: { "ids": [ - "id_oAdfP14QUoqh" + "id_iMZLYsRAs2bbPci" ] } }) @@ -84,7 +64,7 @@ export default async function handleOrderPlaced({ .run({ input: { "ids": [ - "id_oAdfP14QUoqh" + "id_iMZLYsRAs2bbPci" ] } }) @@ -111,7 +91,7 @@ export default async function myCustomJob( .run({ input: { "ids": [ - "id_oAdfP14QUoqh" + "id_iMZLYsRAs2bbPci" ] } }) @@ -123,6 +103,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { deleteApiKeysWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = deleteApiKeysWorkflow + .runAsStep({ + input: { + "ids": [ + "id_iMZLYsRAs2bbPci" + ] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Api_Key/Workflows_Api_Key/functions/core_flows.Api_Key.Workflows_Api_Key.linkSalesChannelsToApiKeyWorkflow/page.mdx b/www/apps/resources/references/core_flows/Api_Key/Workflows_Api_Key/functions/core_flows.Api_Key.Workflows_Api_Key.linkSalesChannelsToApiKeyWorkflow/page.mdx index 95f442a434..f2881fc899 100644 --- a/www/apps/resources/references/core_flows/Api_Key/Workflows_Api_Key/functions/core_flows.Api_Key.Workflows_Api_Key.linkSalesChannelsToApiKeyWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Api_Key/Workflows_Api_Key/functions/core_flows.Api_Key.Workflows_Api_Key.linkSalesChannelsToApiKeyWorkflow/page.mdx @@ -17,27 +17,9 @@ This workflow links sales channels to API keys. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { linkSalesChannelsToApiKeyWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = linkSalesChannelsToApiKeyWorkflow - .runAsStep({ - input: { - "id": "id_fzIS54SNGIfmYj8Ad" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -54,7 +36,7 @@ export async function POST( const { result } = await linkSalesChannelsToApiKeyWorkflow(req.scope) .run({ input: { - "id": "id_fzIS54SNGIfmYj8Ad" + "id": "id_ho4tqCcF0SooZ" } }) @@ -79,7 +61,7 @@ export default async function handleOrderPlaced({ const { result } = await linkSalesChannelsToApiKeyWorkflow(container) .run({ input: { - "id": "id_fzIS54SNGIfmYj8Ad" + "id": "id_ho4tqCcF0SooZ" } }) @@ -104,7 +86,7 @@ export default async function myCustomJob( const { result } = await linkSalesChannelsToApiKeyWorkflow(container) .run({ input: { - "id": "id_fzIS54SNGIfmYj8Ad" + "id": "id_ho4tqCcF0SooZ" } }) @@ -115,6 +97,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { linkSalesChannelsToApiKeyWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = linkSalesChannelsToApiKeyWorkflow + .runAsStep({ + input: { + "id": "id_ho4tqCcF0SooZ" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Api_Key/Workflows_Api_Key/functions/core_flows.Api_Key.Workflows_Api_Key.revokeApiKeysWorkflow/page.mdx b/www/apps/resources/references/core_flows/Api_Key/Workflows_Api_Key/functions/core_flows.Api_Key.Workflows_Api_Key.revokeApiKeysWorkflow/page.mdx index 52c32e6195..4d90135a94 100644 --- a/www/apps/resources/references/core_flows/Api_Key/Workflows_Api_Key/functions/core_flows.Api_Key.Workflows_Api_Key.revokeApiKeysWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Api_Key/Workflows_Api_Key/functions/core_flows.Api_Key.Workflows_Api_Key.revokeApiKeysWorkflow/page.mdx @@ -16,30 +16,9 @@ This workflow revokes one or more API keys. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { revokeApiKeysWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = revokeApiKeysWorkflow - .runAsStep({ - input: { - "selector": {}, - "revoke": { - "revoked_by": "{value}" - } - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -126,6 +105,29 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { revokeApiKeysWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = revokeApiKeysWorkflow + .runAsStep({ + input: { + "selector": {}, + "revoke": { + "revoked_by": "{value}" + } + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Api_Key/Workflows_Api_Key/functions/core_flows.Api_Key.Workflows_Api_Key.updateApiKeysWorkflow/page.mdx b/www/apps/resources/references/core_flows/Api_Key/Workflows_Api_Key/functions/core_flows.Api_Key.Workflows_Api_Key.updateApiKeysWorkflow/page.mdx index da52c6639a..3a7318df6b 100644 --- a/www/apps/resources/references/core_flows/Api_Key/Workflows_Api_Key/functions/core_flows.Api_Key.Workflows_Api_Key.updateApiKeysWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Api_Key/Workflows_Api_Key/functions/core_flows.Api_Key.Workflows_Api_Key.updateApiKeysWorkflow/page.mdx @@ -16,28 +16,9 @@ This workflow creates one or more API keys. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updateApiKeysWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updateApiKeysWorkflow - .runAsStep({ - input: { - "selector": {}, - "update": {} - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -118,6 +99,27 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updateApiKeysWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updateApiKeysWorkflow + .runAsStep({ + input: { + "selector": {}, + "update": {} + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Auth/Workflows_Auth/functions/core_flows.Auth.Workflows_Auth.generateResetPasswordTokenWorkflow/page.mdx b/www/apps/resources/references/core_flows/Auth/Workflows_Auth/functions/core_flows.Auth.Workflows_Auth.generateResetPasswordTokenWorkflow/page.mdx index 04703f3aeb..ec2da8a4c7 100644 --- a/www/apps/resources/references/core_flows/Auth/Workflows_Auth/functions/core_flows.Auth.Workflows_Auth.generateResetPasswordTokenWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Auth/Workflows_Auth/functions/core_flows.Auth.Workflows_Auth.generateResetPasswordTokenWorkflow/page.mdx @@ -15,30 +15,9 @@ This documentation provides a reference to the `generateResetPasswordTokenWorkfl +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { generateResetPasswordTokenWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = generateResetPasswordTokenWorkflow - .runAsStep({ - input: { - "entityId": "{value}", - "actorType": "{value}", - "provider": "{value}", - "secret": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -125,6 +104,29 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { generateResetPasswordTokenWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = generateResetPasswordTokenWorkflow + .runAsStep({ + input: { + "entityId": "{value}", + "actorType": "{value}", + "provider": "{value}", + "secret": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.addShippingMethodToCartStep/page.mdx b/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.addShippingMethodToCartStep/page.mdx index 9b00a456c1..ab2e567773 100644 --- a/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.addShippingMethodToCartStep/page.mdx +++ b/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.addShippingMethodToCartStep/page.mdx @@ -23,9 +23,9 @@ const myWorkflow = createWorkflow( () => { const data = addShippingMethodToCartStep({ "shipping_methods": [{ - "name": "Emory", + "name": "Kareem", "cart_id": "{value}", - "amount": 46 + "amount": 38 }] }) } diff --git a/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.confirmInventoryStep/page.mdx b/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.confirmInventoryStep/page.mdx index 4ee2850879..874167f549 100644 --- a/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.confirmInventoryStep/page.mdx +++ b/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.confirmInventoryStep/page.mdx @@ -24,9 +24,9 @@ const myWorkflow = createWorkflow( const data = confirmInventoryStep({ "items": [{ "inventory_item_id": "{value}", - "required_quantity": 48, - "allow_backorder": true, - "quantity": 33, + "required_quantity": 11, + "allow_backorder": false, + "quantity": 23, "location_ids": [ "{value}" ] diff --git a/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.createLineItemAdjustmentsStep/page.mdx b/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.createLineItemAdjustmentsStep/page.mdx index a13ce353b2..1f6c4538bf 100644 --- a/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.createLineItemAdjustmentsStep/page.mdx +++ b/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.createLineItemAdjustmentsStep/page.mdx @@ -24,7 +24,7 @@ const myWorkflow = createWorkflow( const data = createLineItemAdjustmentsStep({ "lineItemAdjustmentsToCreate": [{ "code": "{value}", - "amount": 27, + "amount": 38, "item_id": "{value}" }] }) diff --git a/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.createLineItemsStep/page.mdx b/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.createLineItemsStep/page.mdx index afcb73242a..230aefa982 100644 --- a/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.createLineItemsStep/page.mdx +++ b/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.createLineItemsStep/page.mdx @@ -22,11 +22,11 @@ const myWorkflow = createWorkflow( "my-workflow", () => { const data = createLineItemsStep({ - "id": "id_Qz07MRX126D4QhT", + "id": "id_6rFekk11aJQdOk", "items": [{ - "title": "bardus", - "quantity": 11, - "unit_price": 8, + "title": "terebro", + "quantity": 15, + "unit_price": 47, "cart_id": "{value}" }] }) diff --git a/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.createPaymentCollectionsStep/page.mdx b/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.createPaymentCollectionsStep/page.mdx index d5ceb0235f..ce452f41c7 100644 --- a/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.createPaymentCollectionsStep/page.mdx +++ b/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.createPaymentCollectionsStep/page.mdx @@ -24,7 +24,7 @@ const myWorkflow = createWorkflow( const data = createPaymentCollectionsStep([{ "region_id": "{value}", "currency_code": "{value}", - "amount": 44 + "amount": 39 }]) } ) diff --git a/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.createShippingMethodAdjustmentsStep/page.mdx b/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.createShippingMethodAdjustmentsStep/page.mdx index 0e100a676f..1736d462c2 100644 --- a/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.createShippingMethodAdjustmentsStep/page.mdx +++ b/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.createShippingMethodAdjustmentsStep/page.mdx @@ -25,7 +25,7 @@ const myWorkflow = createWorkflow( "shippingMethodAdjustmentsToCreate": [{ "shipping_method_id": "{value}", "code": "{value}", - "amount": 34 + "amount": 42 }] }) } diff --git a/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.getActionsToComputeFromPromotionsStep/page.mdx b/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.getActionsToComputeFromPromotionsStep/page.mdx index fac687dafc..9f3129b92b 100644 --- a/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.getActionsToComputeFromPromotionsStep/page.mdx +++ b/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.getActionsToComputeFromPromotionsStep/page.mdx @@ -24,74 +24,74 @@ const myWorkflow = createWorkflow( () => { const data = getActionsToComputeFromPromotionsStep({ "cart": { - "id": "id_QqBWCiL5Mq0aqsfLRiM", + "id": "id_zo2WfWgPkxMjG", "currency_code": "{value}", "original_item_total": { - "numeric": 41 + "numeric": 0 }, "original_item_subtotal": { - "numeric": 3 + "numeric": 16 }, "original_item_tax_total": { - "numeric": 45 + "numeric": 50 }, "item_total": { - "numeric": 37 + "numeric": 5 }, "item_subtotal": { - "numeric": 41 + "numeric": 31 }, "item_tax_total": { - "numeric": 19 + "numeric": 16 }, "original_total": { - "numeric": 30 + "numeric": 7 }, "original_subtotal": { - "numeric": 15 + "numeric": 4 }, "original_tax_total": { - "numeric": 35 + "numeric": 2 }, "total": { - "numeric": 1 + "numeric": 8 }, "subtotal": { - "numeric": 27 + "numeric": 50 }, "tax_total": { - "numeric": 29 + "numeric": 42 }, "discount_total": { - "numeric": 27 + "numeric": 48 }, "discount_tax_total": { - "numeric": 21 - }, - "gift_card_total": { - "numeric": 23 - }, - "gift_card_tax_total": { - "numeric": 25 - }, - "shipping_total": { - "numeric": 19 - }, - "shipping_subtotal": { - "numeric": 34 - }, - "shipping_tax_total": { - "numeric": 1 - }, - "original_shipping_total": { - "numeric": 41 - }, - "original_shipping_subtotal": { "numeric": 43 }, - "original_shipping_tax_total": { + "gift_card_total": { + "numeric": 40 + }, + "gift_card_tax_total": { "numeric": 21 }, + "shipping_total": { + "numeric": 41 + }, + "shipping_subtotal": { + "numeric": 4 + }, + "shipping_tax_total": { + "numeric": 47 + }, + "original_shipping_total": { + "numeric": 13 + }, + "original_shipping_subtotal": { + "numeric": 21 + }, + "original_shipping_tax_total": { + "numeric": 32 + }, "raw_original_item_total": { "value": "{value}" }, diff --git a/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.getLineItemActionsStep/page.mdx b/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.getLineItemActionsStep/page.mdx index 8168a4b8b3..d3b67aec01 100644 --- a/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.getLineItemActionsStep/page.mdx +++ b/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.getLineItemActionsStep/page.mdx @@ -23,11 +23,11 @@ const myWorkflow = createWorkflow( "my-workflow", () => { const data = getLineItemActionsStep({ - "id": "id_DVg8cS9mkh8GBzj", + "id": "id_XFQdKL3gqtUVNd", "items": [{ - "title": "quidem", - "quantity": 33, - "unit_price": 36, + "title": "tener", + "quantity": 50, + "unit_price": 46, "cart_id": "{value}" }] }) diff --git a/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.prepareAdjustmentsFromPromotionActionsStep/page.mdx b/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.prepareAdjustmentsFromPromotionActionsStep/page.mdx index 6167d0ec60..e83295177f 100644 --- a/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.prepareAdjustmentsFromPromotionActionsStep/page.mdx +++ b/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.prepareAdjustmentsFromPromotionActionsStep/page.mdx @@ -26,7 +26,7 @@ const myWorkflow = createWorkflow( "actions": [{ "action": "{value}", "item_id": "{value}", - "amount": 41, + "amount": 26, "code": "{value}", "adjustment_id": "{value}", "shipping_method_id": "{value}" diff --git a/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.reserveInventoryStep/page.mdx b/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.reserveInventoryStep/page.mdx index 7a06c069e5..1e8252c3df 100644 --- a/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.reserveInventoryStep/page.mdx +++ b/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.reserveInventoryStep/page.mdx @@ -26,9 +26,9 @@ const myWorkflow = createWorkflow( const data = reserveInventoryStep({ "items": [{ "inventory_item_id": "{value}", - "required_quantity": 29, + "required_quantity": 40, "allow_backorder": false, - "quantity": 37, + "quantity": 44, "location_ids": [ "{value}" ] diff --git a/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.retrieveCartStep/page.mdx b/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.retrieveCartStep/page.mdx index ebf5a03526..5a204e1cd0 100644 --- a/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.retrieveCartStep/page.mdx +++ b/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.retrieveCartStep/page.mdx @@ -19,7 +19,7 @@ const myWorkflow = createWorkflow( "my-workflow", () => { const data = retrieveCartStep({ - "id": "id_Al0pN6inqwdqSOMfCYdp" + "id": "id_8DpKO8h0vK4" }) } ) diff --git a/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.setTaxLinesForItemsStep/page.mdx b/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.setTaxLinesForItemsStep/page.mdx index e73fc4e8ff..d8ee0c7122 100644 --- a/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.setTaxLinesForItemsStep/page.mdx +++ b/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.setTaxLinesForItemsStep/page.mdx @@ -23,32 +23,32 @@ const myWorkflow = createWorkflow( () => { const data = setTaxLinesForItemsStep({ "cart": { - "id": "id_QGs7DVFYtBnAC01YYLu", + "id": "id_SE0IrhFUnQnFNLiQqe", "payment_collection": { - "id": "id_uzQSnUuzKkPJ0cZEXPD", + "id": "id_YhuROrBan2lyBmDB1M", "currency_code": "{value}", "region_id": "{value}", "amount": { - "numeric": 42 + "numeric": 9 }, - "status": "partially_authorized", + "status": "not_paid", "payment_providers": [{ - "id": "id_dod8tvJed0DpEL", + "id": "id_NpxxM0ouevvB1c", "is_enabled": true }] } }, "item_tax_lines": [{ - "rate": 34, + "rate": 48, "code": {}, - "name": "Cameron", + "name": "Vernon", "provider_id": "{value}", "line_item_id": "{value}" }], "shipping_tax_lines": [{ - "rate": 23, + "rate": 49, "code": {}, - "name": "Lauryn", + "name": "Jasen", "provider_id": "{value}", "shipping_line_id": "{value}" }] diff --git a/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.updateCartPromotionsStep/page.mdx b/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.updateCartPromotionsStep/page.mdx index b09a9a4f67..a6b1767de7 100644 --- a/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.updateCartPromotionsStep/page.mdx +++ b/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.updateCartPromotionsStep/page.mdx @@ -24,7 +24,7 @@ const myWorkflow = createWorkflow( "my-workflow", () => { const data = updateCartPromotionsStep({ - "id": "id_XKHrtCG62Q" + "id": "id_FMMyyyKUjF2KjYp" }) } ) diff --git a/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.updateCartsStep/page.mdx b/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.updateCartsStep/page.mdx index 08c12f2061..74e6f3e385 100644 --- a/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.updateCartsStep/page.mdx +++ b/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.updateCartsStep/page.mdx @@ -22,7 +22,7 @@ const myWorkflow = createWorkflow( "my-workflow", () => { const data = updateCartsStep([{ - "id": "id_VkY7iHaYRI" + "id": "id_6MzWGTzXtywkrtb" }]) } ) diff --git a/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.updateLineItemsStep/page.mdx b/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.updateLineItemsStep/page.mdx index 9c73a14a0c..146fb6846e 100644 --- a/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.updateLineItemsStep/page.mdx +++ b/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.updateLineItemsStep/page.mdx @@ -22,7 +22,7 @@ const myWorkflow = createWorkflow( "my-workflow", () => { const data = updateLineItemsStep({ - "id": "id_CvqQujmairnOWwNpb", + "id": "id_Luh6C6I3Rle6E4j", "items": [{ "selector": "{value}", "data": "{value}" diff --git a/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.validateCartPaymentsStep/page.mdx b/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.validateCartPaymentsStep/page.mdx index 095a95b49e..fd2b8886e0 100644 --- a/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.validateCartPaymentsStep/page.mdx +++ b/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.validateCartPaymentsStep/page.mdx @@ -23,18 +23,18 @@ const myWorkflow = createWorkflow( () => { const data = validateCartPaymentsStep({ "cart": { - "id": "id_hJ8eQupUnBXPwu3XmA", + "id": "id_48kB6S6mQoqDPvLilUfK", "payment_collection": { - "id": "id_Stg7R7qDiLOdVGxT", + "id": "id_vj9fGZtJOqtMGdubl", "currency_code": "{value}", "region_id": "{value}", "amount": { - "numeric": 14 + "numeric": 40 }, - "status": "partially_authorized", + "status": "not_paid", "payment_providers": [{ - "id": "id_cFquXPwY4GOVkBmc", - "is_enabled": true + "id": "id_QBTxhwnkN4f0ULXVv", + "is_enabled": false }] } } diff --git a/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.validateCartShippingOptionsStep/page.mdx b/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.validateCartShippingOptionsStep/page.mdx index ea75021ad3..ee6a968496 100644 --- a/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.validateCartShippingOptionsStep/page.mdx +++ b/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.validateCartShippingOptionsStep/page.mdx @@ -23,73 +23,73 @@ const myWorkflow = createWorkflow( () => { const data = validateCartShippingOptionsStep({ "cart": { - "id": "id_7nHH3S5HORwltFT5", + "id": "id_1WDBYIkJWevCocwcdK", "currency_code": "{value}", "original_item_total": { - "numeric": 49 + "numeric": 26 }, "original_item_subtotal": { - "numeric": 36 + "numeric": 8 }, "original_item_tax_total": { - "numeric": 33 + "numeric": 3 }, "item_total": { - "numeric": 0 + "numeric": 34 }, "item_subtotal": { - "numeric": 27 + "numeric": 19 }, "item_tax_total": { "numeric": 50 }, "original_total": { - "numeric": 16 - }, - "original_subtotal": { - "numeric": 18 - }, - "original_tax_total": { - "numeric": 36 - }, - "total": { "numeric": 21 }, + "original_subtotal": { + "numeric": 38 + }, + "original_tax_total": { + "numeric": 50 + }, + "total": { + "numeric": 17 + }, "subtotal": { - "numeric": 4 + "numeric": 29 }, "tax_total": { - "numeric": 18 + "numeric": 22 }, "discount_total": { - "numeric": 30 + "numeric": 42 }, "discount_tax_total": { - "numeric": 27 - }, - "gift_card_total": { - "numeric": 47 - }, - "gift_card_tax_total": { - "numeric": 16 - }, - "shipping_total": { - "numeric": 16 - }, - "shipping_subtotal": { - "numeric": 33 - }, - "shipping_tax_total": { - "numeric": 18 - }, - "original_shipping_total": { "numeric": 1 }, + "gift_card_total": { + "numeric": 4 + }, + "gift_card_tax_total": { + "numeric": 41 + }, + "shipping_total": { + "numeric": 19 + }, + "shipping_subtotal": { + "numeric": 43 + }, + "shipping_tax_total": { + "numeric": 34 + }, + "original_shipping_total": { + "numeric": 4 + }, "original_shipping_subtotal": { - "numeric": 16 + "numeric": 47 }, "original_shipping_tax_total": { - "numeric": 20 + "numeric": 42 }, "raw_original_item_total": { "value": "{value}" diff --git a/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.validateVariantPricesStep/page.mdx b/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.validateVariantPricesStep/page.mdx index 5265a86828..f1849f9873 100644 --- a/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.validateVariantPricesStep/page.mdx +++ b/www/apps/resources/references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.validateVariantPricesStep/page.mdx @@ -22,7 +22,7 @@ const myWorkflow = createWorkflow( () => { const data = validateVariantPricesStep({ "variants": [{ - "id": "id_Z5G91ooGu6tQYK" + "id": "id_c7o56DosdFnI" }] }) } diff --git a/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.addShippingMethodToCartWorkflow/page.mdx b/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.addShippingMethodToCartWorkflow/page.mdx index d1ccee6747..d06d8377a2 100644 --- a/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.addShippingMethodToCartWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.addShippingMethodToCartWorkflow/page.mdx @@ -20,30 +20,9 @@ This workflow adds shipping methods to a cart. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { addShippingMethodToCartWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = addShippingMethodToCartWorkflow - .runAsStep({ - input: { - "cart_id": "{value}", - "options": [{ - "id": "id_KDqNxUUvYbyo" - }] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -62,7 +41,7 @@ export async function POST( input: { "cart_id": "{value}", "options": [{ - "id": "id_KDqNxUUvYbyo" + "id": "id_qChCECxNY9vE" }] } }) @@ -90,7 +69,7 @@ export default async function handleOrderPlaced({ input: { "cart_id": "{value}", "options": [{ - "id": "id_KDqNxUUvYbyo" + "id": "id_qChCECxNY9vE" }] } }) @@ -118,7 +97,7 @@ export default async function myCustomJob( input: { "cart_id": "{value}", "options": [{ - "id": "id_KDqNxUUvYbyo" + "id": "id_qChCECxNY9vE" }] } }) @@ -130,6 +109,29 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { addShippingMethodToCartWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = addShippingMethodToCartWorkflow + .runAsStep({ + input: { + "cart_id": "{value}", + "options": [{ + "id": "id_qChCECxNY9vE" + }] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.addToCartWorkflow/page.mdx b/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.addToCartWorkflow/page.mdx index bbd9a1559d..1196414b40 100644 --- a/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.addToCartWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.addToCartWorkflow/page.mdx @@ -20,30 +20,9 @@ This workflow adds items to a cart. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { addToCartWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = addToCartWorkflow - .runAsStep({ - input: { - "cart_id": "{value}", - "items": [{ - "quantity": 39 - }] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -62,7 +41,7 @@ export async function POST( input: { "cart_id": "{value}", "items": [{ - "quantity": 39 + "quantity": 25 }] } }) @@ -90,7 +69,7 @@ export default async function handleOrderPlaced({ input: { "cart_id": "{value}", "items": [{ - "quantity": 39 + "quantity": 25 }] } }) @@ -118,7 +97,7 @@ export default async function myCustomJob( input: { "cart_id": "{value}", "items": [{ - "quantity": 39 + "quantity": 25 }] } }) @@ -130,6 +109,29 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { addToCartWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = addToCartWorkflow + .runAsStep({ + input: { + "cart_id": "{value}", + "items": [{ + "quantity": 25 + }] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.completeCartWorkflow/page.mdx b/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.completeCartWorkflow/page.mdx index 31b0c97ba2..8726e5ccc2 100644 --- a/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.completeCartWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.completeCartWorkflow/page.mdx @@ -25,27 +25,9 @@ This workflow completes a cart. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { completeCartWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = completeCartWorkflow - .runAsStep({ - input: { - "id": "id_9q9ZC6uMIpc99zWSXD" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -62,7 +44,7 @@ export async function POST( const { result } = await completeCartWorkflow(req.scope) .run({ input: { - "id": "id_9q9ZC6uMIpc99zWSXD" + "id": "id_aqIwIQaawJI96nsq" } }) @@ -87,7 +69,7 @@ export default async function handleOrderPlaced({ const { result } = await completeCartWorkflow(container) .run({ input: { - "id": "id_9q9ZC6uMIpc99zWSXD" + "id": "id_aqIwIQaawJI96nsq" } }) @@ -112,7 +94,7 @@ export default async function myCustomJob( const { result } = await completeCartWorkflow(container) .run({ input: { - "id": "id_9q9ZC6uMIpc99zWSXD" + "id": "id_aqIwIQaawJI96nsq" } }) @@ -123,6 +105,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { completeCartWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = completeCartWorkflow + .runAsStep({ + input: { + "id": "id_aqIwIQaawJI96nsq" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.confirmVariantInventoryWorkflow/page.mdx b/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.confirmVariantInventoryWorkflow/page.mdx index 907453664d..b32854262c 100644 --- a/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.confirmVariantInventoryWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.confirmVariantInventoryWorkflow/page.mdx @@ -16,42 +16,9 @@ This workflow confirms for one or more variants that their inventory has a requi +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { confirmVariantInventoryWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = confirmVariantInventoryWorkflow - .runAsStep({ - input: { - "sales_channel_id": "{value}", - "variants": [{ - "id": "id_VLKE0Uxl925CCyfZYn0", - "manage_inventory": true, - "inventory_items": [{ - "inventory_item_id": "{value}", - "variant_id": "{value}", - "required_quantity": 21, - "inventory": [{ - "location_levels": {} - }] - }] - }], - "items": [{ - "quantity": 30 - }] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -70,19 +37,19 @@ export async function POST( input: { "sales_channel_id": "{value}", "variants": [{ - "id": "id_VLKE0Uxl925CCyfZYn0", + "id": "id_KTOvaT83mYSDyTJ7qdw", "manage_inventory": true, "inventory_items": [{ "inventory_item_id": "{value}", "variant_id": "{value}", - "required_quantity": 21, + "required_quantity": 16, "inventory": [{ "location_levels": {} }] }] }], "items": [{ - "quantity": 30 + "quantity": 47 }] } }) @@ -110,19 +77,19 @@ export default async function handleOrderPlaced({ input: { "sales_channel_id": "{value}", "variants": [{ - "id": "id_VLKE0Uxl925CCyfZYn0", + "id": "id_KTOvaT83mYSDyTJ7qdw", "manage_inventory": true, "inventory_items": [{ "inventory_item_id": "{value}", "variant_id": "{value}", - "required_quantity": 21, + "required_quantity": 16, "inventory": [{ "location_levels": {} }] }] }], "items": [{ - "quantity": 30 + "quantity": 47 }] } }) @@ -150,19 +117,19 @@ export default async function myCustomJob( input: { "sales_channel_id": "{value}", "variants": [{ - "id": "id_VLKE0Uxl925CCyfZYn0", + "id": "id_KTOvaT83mYSDyTJ7qdw", "manage_inventory": true, "inventory_items": [{ "inventory_item_id": "{value}", "variant_id": "{value}", - "required_quantity": 21, + "required_quantity": 16, "inventory": [{ "location_levels": {} }] }] }], "items": [{ - "quantity": 30 + "quantity": 47 }] } }) @@ -174,6 +141,41 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { confirmVariantInventoryWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = confirmVariantInventoryWorkflow + .runAsStep({ + input: { + "sales_channel_id": "{value}", + "variants": [{ + "id": "id_KTOvaT83mYSDyTJ7qdw", + "manage_inventory": true, + "inventory_items": [{ + "inventory_item_id": "{value}", + "variant_id": "{value}", + "required_quantity": 16, + "inventory": [{ + "location_levels": {} + }] + }] + }], + "items": [{ + "quantity": 47 + }] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.createCartWorkflow/page.mdx b/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.createCartWorkflow/page.mdx index fc26a27612..59ef3edaf4 100644 --- a/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.createCartWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.createCartWorkflow/page.mdx @@ -33,35 +33,9 @@ You can also use this workflow within your own custom workflows, allowing you to +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createCartWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createCartWorkflow - .runAsStep({ - input: { - region_id: "reg_123", - items: [{ - variant_id: "var_123", - quantity: 1, - }], - customer_id: "cus_123", - additional_data: { - external_id: "123" - } - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -163,6 +137,34 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createCartWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createCartWorkflow + .runAsStep({ + input: { + region_id: "reg_123", + items: [{ + variant_id: "var_123", + quantity: 1, + }], + customer_id: "cus_123", + additional_data: { + external_id: "123" + } + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.createPaymentCollectionForCartWorkflow/page.mdx b/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.createPaymentCollectionForCartWorkflow/page.mdx index f7966c1465..182f3722b3 100644 --- a/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.createPaymentCollectionForCartWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.createPaymentCollectionForCartWorkflow/page.mdx @@ -18,27 +18,9 @@ This workflow creates a payment collection for a cart. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createPaymentCollectionForCartWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createPaymentCollectionForCartWorkflow - .runAsStep({ - input: { - "cart_id": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -116,6 +98,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createPaymentCollectionForCartWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createPaymentCollectionForCartWorkflow + .runAsStep({ + input: { + "cart_id": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.listShippingOptionsForCartWithPricingWorkflow/page.mdx b/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.listShippingOptionsForCartWithPricingWorkflow/page.mdx index fcc0dc400f..6e5b9afb8a 100644 --- a/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.listShippingOptionsForCartWithPricingWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.listShippingOptionsForCartWithPricingWorkflow/page.mdx @@ -18,27 +18,9 @@ This workflow lists the shipping options of a cart. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { listShippingOptionsForCartWithPricingWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = listShippingOptionsForCartWithPricingWorkflow - .runAsStep({ - input: { - "cart_id": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -119,6 +101,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { listShippingOptionsForCartWithPricingWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = listShippingOptionsForCartWithPricingWorkflow + .runAsStep({ + input: { + "cart_id": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.listShippingOptionsForCartWorkflow/page.mdx b/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.listShippingOptionsForCartWorkflow/page.mdx index 356d55bb1c..01bb86cae2 100644 --- a/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.listShippingOptionsForCartWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.listShippingOptionsForCartWorkflow/page.mdx @@ -17,27 +17,9 @@ This workflow lists the shipping options of a cart. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { listShippingOptionsForCartWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = listShippingOptionsForCartWorkflow - .runAsStep({ - input: { - "cart_id": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -115,6 +97,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { listShippingOptionsForCartWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = listShippingOptionsForCartWorkflow + .runAsStep({ + input: { + "cart_id": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.refreshPaymentCollectionForCartWorkflow/page.mdx b/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.refreshPaymentCollectionForCartWorkflow/page.mdx index 833aa8cbaf..a210bfdeaa 100644 --- a/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.refreshPaymentCollectionForCartWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.refreshPaymentCollectionForCartWorkflow/page.mdx @@ -18,27 +18,9 @@ This workflow refreshes the payment collections of a cart. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { refreshPaymentCollectionForCartWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = refreshPaymentCollectionForCartWorkflow - .runAsStep({ - input: { - "cart_id": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -116,6 +98,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { refreshPaymentCollectionForCartWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = refreshPaymentCollectionForCartWorkflow + .runAsStep({ + input: { + "cart_id": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.transferCartCustomerWorkflow/page.mdx b/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.transferCartCustomerWorkflow/page.mdx index c3f4355332..fa4e457659 100644 --- a/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.transferCartCustomerWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.transferCartCustomerWorkflow/page.mdx @@ -17,28 +17,9 @@ This workflow transfers cart's customer. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { transferCartCustomerWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = transferCartCustomerWorkflow - .runAsStep({ - input: { - "id": "id_bBYMRZAzM816", - "customer_id": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -55,7 +36,7 @@ export async function POST( const { result } = await transferCartCustomerWorkflow(req.scope) .run({ input: { - "id": "id_bBYMRZAzM816", + "id": "id_2QsAtdSaG9b4ARfkN", "customer_id": "{value}" } }) @@ -81,7 +62,7 @@ export default async function handleOrderPlaced({ const { result } = await transferCartCustomerWorkflow(container) .run({ input: { - "id": "id_bBYMRZAzM816", + "id": "id_2QsAtdSaG9b4ARfkN", "customer_id": "{value}" } }) @@ -107,7 +88,7 @@ export default async function myCustomJob( const { result } = await transferCartCustomerWorkflow(container) .run({ input: { - "id": "id_bBYMRZAzM816", + "id": "id_2QsAtdSaG9b4ARfkN", "customer_id": "{value}" } }) @@ -119,6 +100,27 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { transferCartCustomerWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = transferCartCustomerWorkflow + .runAsStep({ + input: { + "id": "id_2QsAtdSaG9b4ARfkN", + "customer_id": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.updateCartPromotionsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.updateCartPromotionsWorkflow/page.mdx index 8c410a068c..caedad42e0 100644 --- a/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.updateCartPromotionsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.updateCartPromotionsWorkflow/page.mdx @@ -19,27 +19,9 @@ This workflow updates a cart's promotions. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updateCartPromotionsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updateCartPromotionsWorkflow - .runAsStep({ - input: { - "cart_id": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -117,6 +99,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updateCartPromotionsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updateCartPromotionsWorkflow + .runAsStep({ + input: { + "cart_id": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.updateCartWorkflow/page.mdx b/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.updateCartWorkflow/page.mdx index 757c8d65ab..a83f0785b2 100644 --- a/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.updateCartWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.updateCartWorkflow/page.mdx @@ -34,40 +34,9 @@ You can also use this workflow within your own custom workflows, allowing you to +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updateCartWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updateCartWorkflow - .runAsStep({ - input: { - id: "cart_123", - region_id: "region_123", - shipping_address: { - first_name: "John", - last_name: "Doe", - address_1: "1234 Main St", - city: "San Francisco", - country_code: "US", - postal_code: "94111", - phone: "1234567890", - }, - additional_data: { - external_id: "123" - } - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -184,6 +153,39 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updateCartWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updateCartWorkflow + .runAsStep({ + input: { + id: "cart_123", + region_id: "region_123", + shipping_address: { + first_name: "John", + last_name: "Doe", + address_1: "1234 Main St", + city: "San Francisco", + country_code: "US", + postal_code: "94111", + phone: "1234567890", + }, + additional_data: { + external_id: "123" + } + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.updateLineItemInCartWorkflow/page.mdx b/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.updateLineItemInCartWorkflow/page.mdx index 016a165c4e..9f65996ca3 100644 --- a/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.updateLineItemInCartWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.updateLineItemInCartWorkflow/page.mdx @@ -19,29 +19,9 @@ This workflow updates a cart's line item. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updateLineItemInCartWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updateLineItemInCartWorkflow - .runAsStep({ - input: { - "cart_id": "{value}", - "item_id": "{value}", - "update": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -125,6 +105,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updateLineItemInCartWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updateLineItemInCartWorkflow + .runAsStep({ + input: { + "cart_id": "{value}", + "item_id": "{value}", + "update": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.updateTaxLinesWorkflow/page.mdx b/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.updateTaxLinesWorkflow/page.mdx index c293e41b53..e2eb41afb6 100644 --- a/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.updateTaxLinesWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.updateTaxLinesWorkflow/page.mdx @@ -18,27 +18,9 @@ This workflow updates a cart's tax lines. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updateTaxLinesWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updateTaxLinesWorkflow - .runAsStep({ - input: { - "cart_id": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -116,6 +98,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updateTaxLinesWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updateTaxLinesWorkflow + .runAsStep({ + input: { + "cart_id": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.validateExistingPaymentCollectionStep/page.mdx b/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.validateExistingPaymentCollectionStep/page.mdx index d4b870d339..9a4ac2139d 100644 --- a/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.validateExistingPaymentCollectionStep/page.mdx +++ b/www/apps/resources/references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.validateExistingPaymentCollectionStep/page.mdx @@ -22,73 +22,73 @@ const myWorkflow = createWorkflow( () => { const data = validateExistingPaymentCollectionStep({ "cart": { - "id": "id_sol4HzZNPK", + "id": "id_6KeDjKcLAixlmaV", "currency_code": "{value}", "original_item_total": { - "numeric": 42 + "numeric": 29 }, "original_item_subtotal": { - "numeric": 30 - }, - "original_item_tax_total": { - "numeric": 24 - }, - "item_total": { - "numeric": 41 - }, - "item_subtotal": { - "numeric": 38 - }, - "item_tax_total": { - "numeric": 44 - }, - "original_total": { - "numeric": 36 - }, - "original_subtotal": { - "numeric": 18 - }, - "original_tax_total": { - "numeric": 44 - }, - "total": { - "numeric": 42 - }, - "subtotal": { "numeric": 3 }, - "tax_total": { - "numeric": 14 + "original_item_tax_total": { + "numeric": 5 }, - "discount_total": { - "numeric": 37 - }, - "discount_tax_total": { - "numeric": 23 - }, - "gift_card_total": { - "numeric": 8 - }, - "gift_card_tax_total": { - "numeric": 23 - }, - "shipping_total": { - "numeric": 6 - }, - "shipping_subtotal": { - "numeric": 49 - }, - "shipping_tax_total": { + "item_total": { "numeric": 28 }, - "original_shipping_total": { + "item_subtotal": { + "numeric": 3 + }, + "item_tax_total": { + "numeric": 8 + }, + "original_total": { "numeric": 12 }, + "original_subtotal": { + "numeric": 31 + }, + "original_tax_total": { + "numeric": 36 + }, + "total": { + "numeric": 32 + }, + "subtotal": { + "numeric": 11 + }, + "tax_total": { + "numeric": 13 + }, + "discount_total": { + "numeric": 45 + }, + "discount_tax_total": { + "numeric": 37 + }, + "gift_card_total": { + "numeric": 17 + }, + "gift_card_tax_total": { + "numeric": 12 + }, + "shipping_total": { + "numeric": 39 + }, + "shipping_subtotal": { + "numeric": 21 + }, + "shipping_tax_total": { + "numeric": 24 + }, + "original_shipping_total": { + "numeric": 41 + }, "original_shipping_subtotal": { - "numeric": 14 + "numeric": 17 }, "original_shipping_tax_total": { - "numeric": 10 + "numeric": 1 }, "raw_original_item_total": { "value": "{value}" diff --git a/www/apps/resources/references/core_flows/Common/Workflows_Common/functions/core_flows.Common.Workflows_Common.batchLinksWorkflow/page.mdx b/www/apps/resources/references/core_flows/Common/Workflows_Common/functions/core_flows.Common.Workflows_Common.batchLinksWorkflow/page.mdx index 0c1e52b3de..302f1fbd28 100644 --- a/www/apps/resources/references/core_flows/Common/Workflows_Common/functions/core_flows.Common.Workflows_Common.batchLinksWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Common/Workflows_Common/functions/core_flows.Common.Workflows_Common.batchLinksWorkflow/page.mdx @@ -16,25 +16,9 @@ This workflow manages one or more links to create, update, or dismiss them. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { batchLinksWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = batchLinksWorkflow - .runAsStep({ - input: {} - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -106,6 +90,24 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { batchLinksWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = batchLinksWorkflow + .runAsStep({ + input: {} + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Common/Workflows_Common/functions/core_flows.Common.Workflows_Common.createLinksWorkflow/page.mdx b/www/apps/resources/references/core_flows/Common/Workflows_Common/functions/core_flows.Common.Workflows_Common.createLinksWorkflow/page.mdx index 0b57b3f98c..9981c15960 100644 --- a/www/apps/resources/references/core_flows/Common/Workflows_Common/functions/core_flows.Common.Workflows_Common.createLinksWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Common/Workflows_Common/functions/core_flows.Common.Workflows_Common.createLinksWorkflow/page.mdx @@ -16,27 +16,9 @@ This workflow creates one or more links between records. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createLinksWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createLinksWorkflow - .runAsStep({ - input: [ - {} - ] - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -114,6 +96,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createLinksWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createLinksWorkflow + .runAsStep({ + input: [ + {} + ] + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Common/Workflows_Common/functions/core_flows.Common.Workflows_Common.dismissLinksWorkflow/page.mdx b/www/apps/resources/references/core_flows/Common/Workflows_Common/functions/core_flows.Common.Workflows_Common.dismissLinksWorkflow/page.mdx index 17981b9ec0..f2b86a1133 100644 --- a/www/apps/resources/references/core_flows/Common/Workflows_Common/functions/core_flows.Common.Workflows_Common.dismissLinksWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Common/Workflows_Common/functions/core_flows.Common.Workflows_Common.dismissLinksWorkflow/page.mdx @@ -16,27 +16,9 @@ This workflow dismisses one or more links between records. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { dismissLinksWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = dismissLinksWorkflow - .runAsStep({ - input: [ - {} - ] - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -114,6 +96,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { dismissLinksWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = dismissLinksWorkflow + .runAsStep({ + input: [ + {} + ] + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Common/Workflows_Common/functions/core_flows.Common.Workflows_Common.updateLinksWorkflow/page.mdx b/www/apps/resources/references/core_flows/Common/Workflows_Common/functions/core_flows.Common.Workflows_Common.updateLinksWorkflow/page.mdx index 4d9a4e36a5..49982d88e7 100644 --- a/www/apps/resources/references/core_flows/Common/Workflows_Common/functions/core_flows.Common.Workflows_Common.updateLinksWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Common/Workflows_Common/functions/core_flows.Common.Workflows_Common.updateLinksWorkflow/page.mdx @@ -16,27 +16,9 @@ This workflow updates one or more links between records. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updateLinksWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updateLinksWorkflow - .runAsStep({ - input: [ - {} - ] - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -114,6 +96,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updateLinksWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updateLinksWorkflow + .runAsStep({ + input: [ + {} + ] + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Customer/Workflows_Customer/functions/core_flows.Customer.Workflows_Customer.createCustomerAccountWorkflow/page.mdx b/www/apps/resources/references/core_flows/Customer/Workflows_Customer/functions/core_flows.Customer.Workflows_Customer.createCustomerAccountWorkflow/page.mdx index 7226345d65..805eaba765 100644 --- a/www/apps/resources/references/core_flows/Customer/Workflows_Customer/functions/core_flows.Customer.Workflows_Customer.createCustomerAccountWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Customer/Workflows_Customer/functions/core_flows.Customer.Workflows_Customer.createCustomerAccountWorkflow/page.mdx @@ -18,28 +18,9 @@ This workflow creates an authentication account for a customer. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createCustomerAccountWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createCustomerAccountWorkflow - .runAsStep({ - input: { - "authIdentityId": "{value}", - "customerData": {} - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -120,6 +101,27 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createCustomerAccountWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createCustomerAccountWorkflow + .runAsStep({ + input: { + "authIdentityId": "{value}", + "customerData": {} + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Customer/Workflows_Customer/functions/core_flows.Customer.Workflows_Customer.createCustomerAddressesWorkflow/page.mdx b/www/apps/resources/references/core_flows/Customer/Workflows_Customer/functions/core_flows.Customer.Workflows_Customer.createCustomerAddressesWorkflow/page.mdx index 0d13570702..ccf6978ec2 100644 --- a/www/apps/resources/references/core_flows/Customer/Workflows_Customer/functions/core_flows.Customer.Workflows_Customer.createCustomerAddressesWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Customer/Workflows_Customer/functions/core_flows.Customer.Workflows_Customer.createCustomerAddressesWorkflow/page.mdx @@ -22,48 +22,9 @@ You can also use this workflow within your own custom workflows, allowing you to +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createCustomerAddressesWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createCustomerAddressesWorkflow - .runAsStep({ - input: { - addresses: [{ - customer_id: "cus_123", - address_1: "456 Elm St", - city: "Los Angeles", - country_code: "us", - postal_code: "90001", - first_name: "Jane", - last_name: "Smith", - }, - { - customer_id: "cus_321", - address_1: "789 Oak St", - city: "New York", - country_code: "us", - postal_code: "10001", - first_name: "Alice", - last_name: "Johnson", - } - ], - additional_data: { - crm_id: "123" - } - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -204,6 +165,47 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createCustomerAddressesWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createCustomerAddressesWorkflow + .runAsStep({ + input: { + addresses: [{ + customer_id: "cus_123", + address_1: "456 Elm St", + city: "Los Angeles", + country_code: "us", + postal_code: "90001", + first_name: "Jane", + last_name: "Smith", + }, + { + customer_id: "cus_321", + address_1: "789 Oak St", + city: "New York", + country_code: "us", + postal_code: "10001", + first_name: "Alice", + last_name: "Johnson", + } + ], + additional_data: { + crm_id: "123" + } + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Customer/Workflows_Customer/functions/core_flows.Customer.Workflows_Customer.createCustomersWorkflow/page.mdx b/www/apps/resources/references/core_flows/Customer/Workflows_Customer/functions/core_flows.Customer.Workflows_Customer.createCustomersWorkflow/page.mdx index 40011402be..b8eab2e826 100644 --- a/www/apps/resources/references/core_flows/Customer/Workflows_Customer/functions/core_flows.Customer.Workflows_Customer.createCustomersWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Customer/Workflows_Customer/functions/core_flows.Customer.Workflows_Customer.createCustomersWorkflow/page.mdx @@ -21,34 +21,9 @@ You can also use this workflow within your own custom workflows, allowing you to +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createCustomersWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createCustomersWorkflow - .runAsStep({ - input: { - customersData: [{ - first_name: "John", - last_name: "Doe", - email: "john.doe@example.com", - }, ], - additional_data: { - position_name: "Editor", - } - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -147,6 +122,33 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createCustomersWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createCustomersWorkflow + .runAsStep({ + input: { + customersData: [{ + first_name: "John", + last_name: "Doe", + email: "john.doe@example.com", + }, ], + additional_data: { + position_name: "Editor", + } + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Customer/Workflows_Customer/functions/core_flows.Customer.Workflows_Customer.deleteCustomerAddressesWorkflow/page.mdx b/www/apps/resources/references/core_flows/Customer/Workflows_Customer/functions/core_flows.Customer.Workflows_Customer.deleteCustomerAddressesWorkflow/page.mdx index 3ccfba0aed..b70f65d854 100644 --- a/www/apps/resources/references/core_flows/Customer/Workflows_Customer/functions/core_flows.Customer.Workflows_Customer.deleteCustomerAddressesWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Customer/Workflows_Customer/functions/core_flows.Customer.Workflows_Customer.deleteCustomerAddressesWorkflow/page.mdx @@ -16,29 +16,9 @@ This workflow deletes one or more customer addresses. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { deleteCustomerAddressesWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = deleteCustomerAddressesWorkflow - .runAsStep({ - input: { - "ids": [ - "id_aMbyMBeBAP3a7KPCIXCa" - ] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -56,7 +36,7 @@ export async function POST( .run({ input: { "ids": [ - "id_aMbyMBeBAP3a7KPCIXCa" + "id_IRZjwuK6l3RnpPQQ" ] } }) @@ -83,7 +63,7 @@ export default async function handleOrderPlaced({ .run({ input: { "ids": [ - "id_aMbyMBeBAP3a7KPCIXCa" + "id_IRZjwuK6l3RnpPQQ" ] } }) @@ -110,7 +90,7 @@ export default async function myCustomJob( .run({ input: { "ids": [ - "id_aMbyMBeBAP3a7KPCIXCa" + "id_IRZjwuK6l3RnpPQQ" ] } }) @@ -122,6 +102,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { deleteCustomerAddressesWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = deleteCustomerAddressesWorkflow + .runAsStep({ + input: { + "ids": [ + "id_IRZjwuK6l3RnpPQQ" + ] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Customer/Workflows_Customer/functions/core_flows.Customer.Workflows_Customer.deleteCustomersWorkflow/page.mdx b/www/apps/resources/references/core_flows/Customer/Workflows_Customer/functions/core_flows.Customer.Workflows_Customer.deleteCustomersWorkflow/page.mdx index d302ba6c64..c33b7218fd 100644 --- a/www/apps/resources/references/core_flows/Customer/Workflows_Customer/functions/core_flows.Customer.Workflows_Customer.deleteCustomersWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Customer/Workflows_Customer/functions/core_flows.Customer.Workflows_Customer.deleteCustomersWorkflow/page.mdx @@ -17,29 +17,9 @@ This workflow deletes one or more customers. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { deleteCustomersWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = deleteCustomersWorkflow - .runAsStep({ - input: { - "ids": [ - "id_CAKCZqXNMHsyXYxqkzd" - ] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -57,7 +37,7 @@ export async function POST( .run({ input: { "ids": [ - "id_CAKCZqXNMHsyXYxqkzd" + "id_u8jbRquADYmhFumllb" ] } }) @@ -84,7 +64,7 @@ export default async function handleOrderPlaced({ .run({ input: { "ids": [ - "id_CAKCZqXNMHsyXYxqkzd" + "id_u8jbRquADYmhFumllb" ] } }) @@ -111,7 +91,7 @@ export default async function myCustomJob( .run({ input: { "ids": [ - "id_CAKCZqXNMHsyXYxqkzd" + "id_u8jbRquADYmhFumllb" ] } }) @@ -123,6 +103,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { deleteCustomersWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = deleteCustomersWorkflow + .runAsStep({ + input: { + "ids": [ + "id_u8jbRquADYmhFumllb" + ] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Customer/Workflows_Customer/functions/core_flows.Customer.Workflows_Customer.removeCustomerAccountWorkflow/page.mdx b/www/apps/resources/references/core_flows/Customer/Workflows_Customer/functions/core_flows.Customer.Workflows_Customer.removeCustomerAccountWorkflow/page.mdx index 6942cae39c..41abacf230 100644 --- a/www/apps/resources/references/core_flows/Customer/Workflows_Customer/functions/core_flows.Customer.Workflows_Customer.removeCustomerAccountWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Customer/Workflows_Customer/functions/core_flows.Customer.Workflows_Customer.removeCustomerAccountWorkflow/page.mdx @@ -19,27 +19,9 @@ This workflow deletes a user and remove the association in the auth identity. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { removeCustomerAccountWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = removeCustomerAccountWorkflow - .runAsStep({ - input: { - "customerId": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -117,6 +99,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { removeCustomerAccountWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = removeCustomerAccountWorkflow + .runAsStep({ + input: { + "customerId": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Customer/Workflows_Customer/functions/core_flows.Customer.Workflows_Customer.updateCustomerAddressesWorkflow/page.mdx b/www/apps/resources/references/core_flows/Customer/Workflows_Customer/functions/core_flows.Customer.Workflows_Customer.updateCustomerAddressesWorkflow/page.mdx index 27083b6e62..4fdd09c9ae 100644 --- a/www/apps/resources/references/core_flows/Customer/Workflows_Customer/functions/core_flows.Customer.Workflows_Customer.updateCustomerAddressesWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Customer/Workflows_Customer/functions/core_flows.Customer.Workflows_Customer.updateCustomerAddressesWorkflow/page.mdx @@ -22,35 +22,9 @@ You can also use this workflow within your own custom workflows, allowing you to +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updateCustomerAddressesWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updateCustomerAddressesWorkflow - .runAsStep({ - input: { - selector: { - customer_id: "123" - }, - update: { - first_name: "John" - }, - additional_data: { - crm_id: "123" - } - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -152,6 +126,34 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updateCustomerAddressesWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updateCustomerAddressesWorkflow + .runAsStep({ + input: { + selector: { + customer_id: "123" + }, + update: { + first_name: "John" + }, + additional_data: { + crm_id: "123" + } + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Customer/Workflows_Customer/functions/core_flows.Customer.Workflows_Customer.updateCustomersWorkflow/page.mdx b/www/apps/resources/references/core_flows/Customer/Workflows_Customer/functions/core_flows.Customer.Workflows_Customer.updateCustomersWorkflow/page.mdx index 53316ccd65..829381c29f 100644 --- a/www/apps/resources/references/core_flows/Customer/Workflows_Customer/functions/core_flows.Customer.Workflows_Customer.updateCustomersWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Customer/Workflows_Customer/functions/core_flows.Customer.Workflows_Customer.updateCustomersWorkflow/page.mdx @@ -23,32 +23,9 @@ You can also use this workflow within your own custom workflows, allowing you to +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updateCustomersWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updateCustomersWorkflow - .runAsStep({ - input: { - selector: { - id: ["cus_123"] - }, - update: { - first_name: "John" - } - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -141,6 +118,31 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updateCustomersWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updateCustomersWorkflow + .runAsStep({ + input: { + selector: { + id: ["cus_123"] + }, + update: { + first_name: "John" + } + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Customer_Group/Steps_Customer_Group/functions/core_flows.Customer_Group.Steps_Customer_Group.createCustomerGroupsStep/page.mdx b/www/apps/resources/references/core_flows/Customer_Group/Steps_Customer_Group/functions/core_flows.Customer_Group.Steps_Customer_Group.createCustomerGroupsStep/page.mdx index f3800e01f7..3979a4f480 100644 --- a/www/apps/resources/references/core_flows/Customer_Group/Steps_Customer_Group/functions/core_flows.Customer_Group.Steps_Customer_Group.createCustomerGroupsStep/page.mdx +++ b/www/apps/resources/references/core_flows/Customer_Group/Steps_Customer_Group/functions/core_flows.Customer_Group.Steps_Customer_Group.createCustomerGroupsStep/page.mdx @@ -22,7 +22,7 @@ const myWorkflow = createWorkflow( "my-workflow", () => { const data = createCustomerGroupsStep([{ - "name": "Greg" + "name": "Esteban" }]) } ) diff --git a/www/apps/resources/references/core_flows/Customer_Group/Steps_Customer_Group/functions/core_flows.Customer_Group.Steps_Customer_Group.linkCustomerGroupsToCustomerStep/page.mdx b/www/apps/resources/references/core_flows/Customer_Group/Steps_Customer_Group/functions/core_flows.Customer_Group.Steps_Customer_Group.linkCustomerGroupsToCustomerStep/page.mdx index d62446e93c..30b342558f 100644 --- a/www/apps/resources/references/core_flows/Customer_Group/Steps_Customer_Group/functions/core_flows.Customer_Group.Steps_Customer_Group.linkCustomerGroupsToCustomerStep/page.mdx +++ b/www/apps/resources/references/core_flows/Customer_Group/Steps_Customer_Group/functions/core_flows.Customer_Group.Steps_Customer_Group.linkCustomerGroupsToCustomerStep/page.mdx @@ -22,7 +22,7 @@ const myWorkflow = createWorkflow( "my-workflow", () => { const data = linkCustomerGroupsToCustomerStep({ - "id": "id_uARhHtuQ8u71" + "id": "id_YtomfBhkDoNsFeOFspi" }) } ) diff --git a/www/apps/resources/references/core_flows/Customer_Group/Steps_Customer_Group/functions/core_flows.Customer_Group.Steps_Customer_Group.linkCustomersToCustomerGroupStep/page.mdx b/www/apps/resources/references/core_flows/Customer_Group/Steps_Customer_Group/functions/core_flows.Customer_Group.Steps_Customer_Group.linkCustomersToCustomerGroupStep/page.mdx index 0d87464799..c77dfc5b19 100644 --- a/www/apps/resources/references/core_flows/Customer_Group/Steps_Customer_Group/functions/core_flows.Customer_Group.Steps_Customer_Group.linkCustomersToCustomerGroupStep/page.mdx +++ b/www/apps/resources/references/core_flows/Customer_Group/Steps_Customer_Group/functions/core_flows.Customer_Group.Steps_Customer_Group.linkCustomersToCustomerGroupStep/page.mdx @@ -22,7 +22,7 @@ const myWorkflow = createWorkflow( "my-workflow", () => { const data = linkCustomersToCustomerGroupStep({ - "id": "id_1mH3cde2SqVRrrCbY4" + "id": "id_6Ccf4ryjrRvVPF1" }) } ) diff --git a/www/apps/resources/references/core_flows/Customer_Group/Workflows_Customer_Group/functions/core_flows.Customer_Group.Workflows_Customer_Group.createCustomerGroupsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Customer_Group/Workflows_Customer_Group/functions/core_flows.Customer_Group.Workflows_Customer_Group.createCustomerGroupsWorkflow/page.mdx index 0f3e40f5fc..6ecbb43685 100644 --- a/www/apps/resources/references/core_flows/Customer_Group/Workflows_Customer_Group/functions/core_flows.Customer_Group.Workflows_Customer_Group.createCustomerGroupsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Customer_Group/Workflows_Customer_Group/functions/core_flows.Customer_Group.Workflows_Customer_Group.createCustomerGroupsWorkflow/page.mdx @@ -16,29 +16,9 @@ This workflow creates one or more customer groups. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createCustomerGroupsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createCustomerGroupsWorkflow - .runAsStep({ - input: { - "customersData": [{ - "name": "Itzel" - }] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -56,7 +36,7 @@ export async function POST( .run({ input: { "customersData": [{ - "name": "Itzel" + "name": "Cordia" }] } }) @@ -83,7 +63,7 @@ export default async function handleOrderPlaced({ .run({ input: { "customersData": [{ - "name": "Itzel" + "name": "Cordia" }] } }) @@ -110,7 +90,7 @@ export default async function myCustomJob( .run({ input: { "customersData": [{ - "name": "Itzel" + "name": "Cordia" }] } }) @@ -122,6 +102,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createCustomerGroupsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createCustomerGroupsWorkflow + .runAsStep({ + input: { + "customersData": [{ + "name": "Cordia" + }] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Customer_Group/Workflows_Customer_Group/functions/core_flows.Customer_Group.Workflows_Customer_Group.deleteCustomerGroupsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Customer_Group/Workflows_Customer_Group/functions/core_flows.Customer_Group.Workflows_Customer_Group.deleteCustomerGroupsWorkflow/page.mdx index 1f5ad1a9e9..1e237c1363 100644 --- a/www/apps/resources/references/core_flows/Customer_Group/Workflows_Customer_Group/functions/core_flows.Customer_Group.Workflows_Customer_Group.deleteCustomerGroupsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Customer_Group/Workflows_Customer_Group/functions/core_flows.Customer_Group.Workflows_Customer_Group.deleteCustomerGroupsWorkflow/page.mdx @@ -16,29 +16,9 @@ This workflow deletes one or more customer groups. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { deleteCustomerGroupsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = deleteCustomerGroupsWorkflow - .runAsStep({ - input: { - "ids": [ - "id_SmWv0Ai6rssYpbojx9" - ] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -56,7 +36,7 @@ export async function POST( .run({ input: { "ids": [ - "id_SmWv0Ai6rssYpbojx9" + "id_mmGV9QFDuVW2jQ3fg1E" ] } }) @@ -83,7 +63,7 @@ export default async function handleOrderPlaced({ .run({ input: { "ids": [ - "id_SmWv0Ai6rssYpbojx9" + "id_mmGV9QFDuVW2jQ3fg1E" ] } }) @@ -110,7 +90,7 @@ export default async function myCustomJob( .run({ input: { "ids": [ - "id_SmWv0Ai6rssYpbojx9" + "id_mmGV9QFDuVW2jQ3fg1E" ] } }) @@ -122,6 +102,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { deleteCustomerGroupsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = deleteCustomerGroupsWorkflow + .runAsStep({ + input: { + "ids": [ + "id_mmGV9QFDuVW2jQ3fg1E" + ] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Customer_Group/Workflows_Customer_Group/functions/core_flows.Customer_Group.Workflows_Customer_Group.linkCustomerGroupsToCustomerWorkflow/page.mdx b/www/apps/resources/references/core_flows/Customer_Group/Workflows_Customer_Group/functions/core_flows.Customer_Group.Workflows_Customer_Group.linkCustomerGroupsToCustomerWorkflow/page.mdx index 713245d594..7e7c8bcf19 100644 --- a/www/apps/resources/references/core_flows/Customer_Group/Workflows_Customer_Group/functions/core_flows.Customer_Group.Workflows_Customer_Group.linkCustomerGroupsToCustomerWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Customer_Group/Workflows_Customer_Group/functions/core_flows.Customer_Group.Workflows_Customer_Group.linkCustomerGroupsToCustomerWorkflow/page.mdx @@ -16,27 +16,9 @@ This workflow creates one or more links between a customer and customer groups. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { linkCustomerGroupsToCustomerWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = linkCustomerGroupsToCustomerWorkflow - .runAsStep({ - input: { - "id": "id_CiSUSZ2SgEgmeo3" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -53,7 +35,7 @@ export async function POST( const { result } = await linkCustomerGroupsToCustomerWorkflow(req.scope) .run({ input: { - "id": "id_CiSUSZ2SgEgmeo3" + "id": "id_4GuWCxncUqcYVaJ" } }) @@ -78,7 +60,7 @@ export default async function handleOrderPlaced({ const { result } = await linkCustomerGroupsToCustomerWorkflow(container) .run({ input: { - "id": "id_CiSUSZ2SgEgmeo3" + "id": "id_4GuWCxncUqcYVaJ" } }) @@ -103,7 +85,7 @@ export default async function myCustomJob( const { result } = await linkCustomerGroupsToCustomerWorkflow(container) .run({ input: { - "id": "id_CiSUSZ2SgEgmeo3" + "id": "id_4GuWCxncUqcYVaJ" } }) @@ -114,6 +96,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { linkCustomerGroupsToCustomerWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = linkCustomerGroupsToCustomerWorkflow + .runAsStep({ + input: { + "id": "id_4GuWCxncUqcYVaJ" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Customer_Group/Workflows_Customer_Group/functions/core_flows.Customer_Group.Workflows_Customer_Group.linkCustomersToCustomerGroupWorkflow/page.mdx b/www/apps/resources/references/core_flows/Customer_Group/Workflows_Customer_Group/functions/core_flows.Customer_Group.Workflows_Customer_Group.linkCustomersToCustomerGroupWorkflow/page.mdx index b5dd0f3c5b..787cfc8ac4 100644 --- a/www/apps/resources/references/core_flows/Customer_Group/Workflows_Customer_Group/functions/core_flows.Customer_Group.Workflows_Customer_Group.linkCustomersToCustomerGroupWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Customer_Group/Workflows_Customer_Group/functions/core_flows.Customer_Group.Workflows_Customer_Group.linkCustomersToCustomerGroupWorkflow/page.mdx @@ -16,27 +16,9 @@ This workflow creates one or more links between customer and customer group reco +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { linkCustomersToCustomerGroupWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = linkCustomersToCustomerGroupWorkflow - .runAsStep({ - input: { - "id": "id_NCyoXlgAgeLdZEbQqojs" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -53,7 +35,7 @@ export async function POST( const { result } = await linkCustomersToCustomerGroupWorkflow(req.scope) .run({ input: { - "id": "id_NCyoXlgAgeLdZEbQqojs" + "id": "id_xAgNjOlh1Vs" } }) @@ -78,7 +60,7 @@ export default async function handleOrderPlaced({ const { result } = await linkCustomersToCustomerGroupWorkflow(container) .run({ input: { - "id": "id_NCyoXlgAgeLdZEbQqojs" + "id": "id_xAgNjOlh1Vs" } }) @@ -103,7 +85,7 @@ export default async function myCustomJob( const { result } = await linkCustomersToCustomerGroupWorkflow(container) .run({ input: { - "id": "id_NCyoXlgAgeLdZEbQqojs" + "id": "id_xAgNjOlh1Vs" } }) @@ -114,6 +96,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { linkCustomersToCustomerGroupWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = linkCustomersToCustomerGroupWorkflow + .runAsStep({ + input: { + "id": "id_xAgNjOlh1Vs" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Customer_Group/Workflows_Customer_Group/functions/core_flows.Customer_Group.Workflows_Customer_Group.updateCustomerGroupsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Customer_Group/Workflows_Customer_Group/functions/core_flows.Customer_Group.Workflows_Customer_Group.updateCustomerGroupsWorkflow/page.mdx index 8b06991f36..d69e35d761 100644 --- a/www/apps/resources/references/core_flows/Customer_Group/Workflows_Customer_Group/functions/core_flows.Customer_Group.Workflows_Customer_Group.updateCustomerGroupsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Customer_Group/Workflows_Customer_Group/functions/core_flows.Customer_Group.Workflows_Customer_Group.updateCustomerGroupsWorkflow/page.mdx @@ -16,28 +16,9 @@ This workflow updates one or more customer groups. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updateCustomerGroupsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updateCustomerGroupsWorkflow - .runAsStep({ - input: { - "selector": {}, - "update": {} - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -118,6 +99,27 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updateCustomerGroupsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updateCustomerGroupsWorkflow + .runAsStep({ + input: { + "selector": {}, + "update": {} + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Defaults/Workflows_Defaults/functions/core_flows.Defaults.Workflows_Defaults.createDefaultsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Defaults/Workflows_Defaults/functions/core_flows.Defaults.Workflows_Defaults.createDefaultsWorkflow/page.mdx index d47e4688b1..79f6da93de 100644 --- a/www/apps/resources/references/core_flows/Defaults/Workflows_Defaults/functions/core_flows.Defaults.Workflows_Defaults.createDefaultsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Defaults/Workflows_Defaults/functions/core_flows.Defaults.Workflows_Defaults.createDefaultsWorkflow/page.mdx @@ -17,23 +17,9 @@ This workflow creates default data for a Medusa application. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createDefaultsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createDefaultsWorkflow - .runAsStep() - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -99,6 +85,22 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createDefaultsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createDefaultsWorkflow + .runAsStep() + } +) ``` diff --git a/www/apps/resources/references/core_flows/File/Workflows_File/functions/core_flows.File.Workflows_File.deleteFilesWorkflow/page.mdx b/www/apps/resources/references/core_flows/File/Workflows_File/functions/core_flows.File.Workflows_File.deleteFilesWorkflow/page.mdx index bb5cf075d7..d97a23c118 100644 --- a/www/apps/resources/references/core_flows/File/Workflows_File/functions/core_flows.File.Workflows_File.deleteFilesWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/File/Workflows_File/functions/core_flows.File.Workflows_File.deleteFilesWorkflow/page.mdx @@ -16,29 +16,9 @@ This workflow deletes one or more files. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { deleteFilesWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = deleteFilesWorkflow - .runAsStep({ - input: { - "ids": [ - "id_AuJEFglaDgHjQ1WY" - ] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -56,7 +36,7 @@ export async function POST( .run({ input: { "ids": [ - "id_AuJEFglaDgHjQ1WY" + "id_G5v5A8CZFl6WB2Q" ] } }) @@ -83,7 +63,7 @@ export default async function handleOrderPlaced({ .run({ input: { "ids": [ - "id_AuJEFglaDgHjQ1WY" + "id_G5v5A8CZFl6WB2Q" ] } }) @@ -110,7 +90,7 @@ export default async function myCustomJob( .run({ input: { "ids": [ - "id_AuJEFglaDgHjQ1WY" + "id_G5v5A8CZFl6WB2Q" ] } }) @@ -122,6 +102,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { deleteFilesWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = deleteFilesWorkflow + .runAsStep({ + input: { + "ids": [ + "id_G5v5A8CZFl6WB2Q" + ] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/File/Workflows_File/functions/core_flows.File.Workflows_File.uploadFilesWorkflow/page.mdx b/www/apps/resources/references/core_flows/File/Workflows_File/functions/core_flows.File.Workflows_File.uploadFilesWorkflow/page.mdx index c9d040da13..89604cd6c9 100644 --- a/www/apps/resources/references/core_flows/File/Workflows_File/functions/core_flows.File.Workflows_File.uploadFilesWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/File/Workflows_File/functions/core_flows.File.Workflows_File.uploadFilesWorkflow/page.mdx @@ -16,32 +16,9 @@ This workflow uploads one or more files. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { uploadFilesWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = uploadFilesWorkflow - .runAsStep({ - input: { - "files": [{ - "filename": "{value}", - "mimeType": "{value}", - "content": "{value}", - "access": "{value}" - }] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -134,6 +111,31 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { uploadFilesWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = uploadFilesWorkflow + .runAsStep({ + input: { + "files": [{ + "filename": "{value}", + "mimeType": "{value}", + "content": "{value}", + "access": "{value}" + }] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Fulfillment/Steps_Fulfillment/functions/core_flows.Fulfillment.Steps_Fulfillment.calculateShippingOptionsPricesStep/page.mdx b/www/apps/resources/references/core_flows/Fulfillment/Steps_Fulfillment/functions/core_flows.Fulfillment.Steps_Fulfillment.calculateShippingOptionsPricesStep/page.mdx index d72f04e111..65010c69fc 100644 --- a/www/apps/resources/references/core_flows/Fulfillment/Steps_Fulfillment/functions/core_flows.Fulfillment.Steps_Fulfillment.calculateShippingOptionsPricesStep/page.mdx +++ b/www/apps/resources/references/core_flows/Fulfillment/Steps_Fulfillment/functions/core_flows.Fulfillment.Steps_Fulfillment.calculateShippingOptionsPricesStep/page.mdx @@ -22,7 +22,7 @@ const myWorkflow = createWorkflow( "my-workflow", () => { const data = calculateShippingOptionsPricesStep([{ - "id": "id_jzRxRelD9jL8ee", + "id": "id_5LJ1g09wXLr6fnMt9Y", "provider_id": "{value}", "optionData": "{value}", "data": "{value}", @@ -32,16 +32,16 @@ const myWorkflow = createWorkflow( "items": { "items": "{value}", "variant": { - "id": "id_dt4EbECnUc", - "weight": 21, - "length": 44, - "height": 45, - "width": 49, + "id": "id_TzevCLnWtAO", + "weight": 47, + "length": 11, + "height": 8, + "width": 30, "material": "{value}", "product": {} }, "product": { - "id": "id_zEUUgykUbVbj", + "id": "id_g0bzGbW60G6pSHOia4T", "collection_id": "{value}", "categories": [], "tags": [] diff --git a/www/apps/resources/references/core_flows/Fulfillment/Steps_Fulfillment/functions/core_flows.Fulfillment.Steps_Fulfillment.createFulfillmentSets/page.mdx b/www/apps/resources/references/core_flows/Fulfillment/Steps_Fulfillment/functions/core_flows.Fulfillment.Steps_Fulfillment.createFulfillmentSets/page.mdx index 8ce8fe0a4e..e21b273556 100644 --- a/www/apps/resources/references/core_flows/Fulfillment/Steps_Fulfillment/functions/core_flows.Fulfillment.Steps_Fulfillment.createFulfillmentSets/page.mdx +++ b/www/apps/resources/references/core_flows/Fulfillment/Steps_Fulfillment/functions/core_flows.Fulfillment.Steps_Fulfillment.createFulfillmentSets/page.mdx @@ -22,7 +22,7 @@ const myWorkflow = createWorkflow( "my-workflow", () => { const data = createFulfillmentSets([{ - "name": "Brendon", + "name": "Luella", "type": "{value}" }]) } diff --git a/www/apps/resources/references/core_flows/Fulfillment/Steps_Fulfillment/functions/core_flows.Fulfillment.Steps_Fulfillment.createServiceZonesStep/page.mdx b/www/apps/resources/references/core_flows/Fulfillment/Steps_Fulfillment/functions/core_flows.Fulfillment.Steps_Fulfillment.createServiceZonesStep/page.mdx index f80e6b27b9..915d40c92c 100644 --- a/www/apps/resources/references/core_flows/Fulfillment/Steps_Fulfillment/functions/core_flows.Fulfillment.Steps_Fulfillment.createServiceZonesStep/page.mdx +++ b/www/apps/resources/references/core_flows/Fulfillment/Steps_Fulfillment/functions/core_flows.Fulfillment.Steps_Fulfillment.createServiceZonesStep/page.mdx @@ -22,7 +22,7 @@ const myWorkflow = createWorkflow( "my-workflow", () => { const data = createServiceZonesStep([{ - "name": "Javier", + "name": "Adah", "fulfillment_set_id": "{value}" }]) } diff --git a/www/apps/resources/references/core_flows/Fulfillment/Steps_Fulfillment/functions/core_flows.Fulfillment.Steps_Fulfillment.createShippingOptionRulesStep/page.mdx b/www/apps/resources/references/core_flows/Fulfillment/Steps_Fulfillment/functions/core_flows.Fulfillment.Steps_Fulfillment.createShippingOptionRulesStep/page.mdx index 1aacc6f3ce..2948330c35 100644 --- a/www/apps/resources/references/core_flows/Fulfillment/Steps_Fulfillment/functions/core_flows.Fulfillment.Steps_Fulfillment.createShippingOptionRulesStep/page.mdx +++ b/www/apps/resources/references/core_flows/Fulfillment/Steps_Fulfillment/functions/core_flows.Fulfillment.Steps_Fulfillment.createShippingOptionRulesStep/page.mdx @@ -24,7 +24,7 @@ const myWorkflow = createWorkflow( const data = createShippingOptionRulesStep({ "data": [{ "attribute": "{value}", - "operator": "gt", + "operator": "in", "value": "{value}", "shipping_option_id": "{value}" }] diff --git a/www/apps/resources/references/core_flows/Fulfillment/Steps_Fulfillment/functions/core_flows.Fulfillment.Steps_Fulfillment.createShippingOptionsPriceSetsStep/page.mdx b/www/apps/resources/references/core_flows/Fulfillment/Steps_Fulfillment/functions/core_flows.Fulfillment.Steps_Fulfillment.createShippingOptionsPriceSetsStep/page.mdx index 7606150ded..fc0e52211a 100644 --- a/www/apps/resources/references/core_flows/Fulfillment/Steps_Fulfillment/functions/core_flows.Fulfillment.Steps_Fulfillment.createShippingOptionsPriceSetsStep/page.mdx +++ b/www/apps/resources/references/core_flows/Fulfillment/Steps_Fulfillment/functions/core_flows.Fulfillment.Steps_Fulfillment.createShippingOptionsPriceSetsStep/page.mdx @@ -22,10 +22,10 @@ const myWorkflow = createWorkflow( "my-workflow", () => { const data = createShippingOptionsPriceSetsStep({ - "id": "id_7tCg3xlcKlEDuvTWJ", + "id": "id_BOyKYy61trQeHjl", "prices": [{ "currency_code": "{value}", - "amount": 47 + "amount": 41 }] }) } diff --git a/www/apps/resources/references/core_flows/Fulfillment/Steps_Fulfillment/functions/core_flows.Fulfillment.Steps_Fulfillment.createShippingProfilesStep/page.mdx b/www/apps/resources/references/core_flows/Fulfillment/Steps_Fulfillment/functions/core_flows.Fulfillment.Steps_Fulfillment.createShippingProfilesStep/page.mdx index 103d9184c8..4cabced2ec 100644 --- a/www/apps/resources/references/core_flows/Fulfillment/Steps_Fulfillment/functions/core_flows.Fulfillment.Steps_Fulfillment.createShippingProfilesStep/page.mdx +++ b/www/apps/resources/references/core_flows/Fulfillment/Steps_Fulfillment/functions/core_flows.Fulfillment.Steps_Fulfillment.createShippingProfilesStep/page.mdx @@ -22,7 +22,7 @@ const myWorkflow = createWorkflow( "my-workflow", () => { const data = createShippingProfilesStep([{ - "name": "Glennie" + "name": "Hadley" }]) } ) diff --git a/www/apps/resources/references/core_flows/Fulfillment/Steps_Fulfillment/functions/core_flows.Fulfillment.Steps_Fulfillment.deleteShippingOptionRulesStep/page.mdx b/www/apps/resources/references/core_flows/Fulfillment/Steps_Fulfillment/functions/core_flows.Fulfillment.Steps_Fulfillment.deleteShippingOptionRulesStep/page.mdx index 1d86c58b33..c4201ca609 100644 --- a/www/apps/resources/references/core_flows/Fulfillment/Steps_Fulfillment/functions/core_flows.Fulfillment.Steps_Fulfillment.deleteShippingOptionRulesStep/page.mdx +++ b/www/apps/resources/references/core_flows/Fulfillment/Steps_Fulfillment/functions/core_flows.Fulfillment.Steps_Fulfillment.deleteShippingOptionRulesStep/page.mdx @@ -23,7 +23,7 @@ const myWorkflow = createWorkflow( () => { const data = deleteShippingOptionRulesStep({ "ids": [ - "id_HtoP0MXFVhX77x7sX" + "id_GqgBVjhk1YcGaM6Ei" ] }) } diff --git a/www/apps/resources/references/core_flows/Fulfillment/Steps_Fulfillment/functions/core_flows.Fulfillment.Steps_Fulfillment.setShippingOptionsPricesStep/page.mdx b/www/apps/resources/references/core_flows/Fulfillment/Steps_Fulfillment/functions/core_flows.Fulfillment.Steps_Fulfillment.setShippingOptionsPricesStep/page.mdx index 34ce9f4dbc..1b2ae418f4 100644 --- a/www/apps/resources/references/core_flows/Fulfillment/Steps_Fulfillment/functions/core_flows.Fulfillment.Steps_Fulfillment.setShippingOptionsPricesStep/page.mdx +++ b/www/apps/resources/references/core_flows/Fulfillment/Steps_Fulfillment/functions/core_flows.Fulfillment.Steps_Fulfillment.setShippingOptionsPricesStep/page.mdx @@ -23,7 +23,7 @@ const myWorkflow = createWorkflow( "my-workflow", () => { const data = setShippingOptionsPricesStep({ - "id": "id_9gKIqs4eBuMxZg" + "id": "id_1goE1Y7FAJ5" }) } ) diff --git a/www/apps/resources/references/core_flows/Fulfillment/Steps_Fulfillment/functions/core_flows.Fulfillment.Steps_Fulfillment.updateFulfillmentStep/page.mdx b/www/apps/resources/references/core_flows/Fulfillment/Steps_Fulfillment/functions/core_flows.Fulfillment.Steps_Fulfillment.updateFulfillmentStep/page.mdx index 88e17808c2..32da83511d 100644 --- a/www/apps/resources/references/core_flows/Fulfillment/Steps_Fulfillment/functions/core_flows.Fulfillment.Steps_Fulfillment.updateFulfillmentStep/page.mdx +++ b/www/apps/resources/references/core_flows/Fulfillment/Steps_Fulfillment/functions/core_flows.Fulfillment.Steps_Fulfillment.updateFulfillmentStep/page.mdx @@ -22,7 +22,7 @@ const myWorkflow = createWorkflow( "my-workflow", () => { const data = updateFulfillmentStep({ - "id": "id_bJFtqFK4URmUv8tSaK" + "id": "id_xAPf9V54mmocvHiLKCdO" }) } ) diff --git a/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.batchShippingOptionRulesWorkflow/page.mdx b/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.batchShippingOptionRulesWorkflow/page.mdx index f732f499bb..1b32f5a0f0 100644 --- a/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.batchShippingOptionRulesWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.batchShippingOptionRulesWorkflow/page.mdx @@ -16,25 +16,9 @@ This workflow manages shipping option rules by creating, updating, or deleting t +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { batchShippingOptionRulesWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = batchShippingOptionRulesWorkflow - .runAsStep({ - input: {} - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -106,6 +90,24 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { batchShippingOptionRulesWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = batchShippingOptionRulesWorkflow + .runAsStep({ + input: {} + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.calculateShippingOptionsPricesWorkflow/page.mdx b/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.calculateShippingOptionsPricesWorkflow/page.mdx index 9b2c064787..76540d2399 100644 --- a/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.calculateShippingOptionsPricesWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.calculateShippingOptionsPricesWorkflow/page.mdx @@ -17,30 +17,9 @@ This workflow calculates the prices for one or more shipping options. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { calculateShippingOptionsPricesWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = calculateShippingOptionsPricesWorkflow - .runAsStep({ - input: { - "cart_id": "{value}", - "shipping_options": [{ - "id": "id_x1hNs3lIOdL2bRrtlC" - }] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -59,7 +38,7 @@ export async function POST( input: { "cart_id": "{value}", "shipping_options": [{ - "id": "id_x1hNs3lIOdL2bRrtlC" + "id": "id_8GxyUDoXJE" }] } }) @@ -87,7 +66,7 @@ export default async function handleOrderPlaced({ input: { "cart_id": "{value}", "shipping_options": [{ - "id": "id_x1hNs3lIOdL2bRrtlC" + "id": "id_8GxyUDoXJE" }] } }) @@ -115,7 +94,7 @@ export default async function myCustomJob( input: { "cart_id": "{value}", "shipping_options": [{ - "id": "id_x1hNs3lIOdL2bRrtlC" + "id": "id_8GxyUDoXJE" }] } }) @@ -127,6 +106,29 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { calculateShippingOptionsPricesWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = calculateShippingOptionsPricesWorkflow + .runAsStep({ + input: { + "cart_id": "{value}", + "shipping_options": [{ + "id": "id_8GxyUDoXJE" + }] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.cancelFulfillmentWorkflow/page.mdx b/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.cancelFulfillmentWorkflow/page.mdx index 6ffbae68dd..427bda3b32 100644 --- a/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.cancelFulfillmentWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.cancelFulfillmentWorkflow/page.mdx @@ -16,27 +16,9 @@ This workflow cancels a fulfillment. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { cancelFulfillmentWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = cancelFulfillmentWorkflow - .runAsStep({ - input: { - "id": "id_noogJCRH2T" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -53,7 +35,7 @@ export async function POST( const { result } = await cancelFulfillmentWorkflow(req.scope) .run({ input: { - "id": "id_noogJCRH2T" + "id": "id_4amIu7eKaKwkltwYE" } }) @@ -78,7 +60,7 @@ export default async function handleOrderPlaced({ const { result } = await cancelFulfillmentWorkflow(container) .run({ input: { - "id": "id_noogJCRH2T" + "id": "id_4amIu7eKaKwkltwYE" } }) @@ -103,7 +85,7 @@ export default async function myCustomJob( const { result } = await cancelFulfillmentWorkflow(container) .run({ input: { - "id": "id_noogJCRH2T" + "id": "id_4amIu7eKaKwkltwYE" } }) @@ -114,6 +96,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { cancelFulfillmentWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = cancelFulfillmentWorkflow + .runAsStep({ + input: { + "id": "id_4amIu7eKaKwkltwYE" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.createFulfillmentWorkflow/page.mdx b/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.createFulfillmentWorkflow/page.mdx index 361d455c12..9a53b99103 100644 --- a/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.createFulfillmentWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.createFulfillmentWorkflow/page.mdx @@ -17,35 +17,9 @@ This workflow creates a fulfillment. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createFulfillmentWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createFulfillmentWorkflow - .runAsStep({ - input: { - "location_id": "{value}", - "provider_id": "{value}", - "delivery_address": {}, - "items": [{ - "title": "esse", - "sku": "{value}", - "quantity": 34, - "barcode": "{value}" - }] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -66,9 +40,9 @@ export async function POST( "provider_id": "{value}", "delivery_address": {}, "items": [{ - "title": "esse", + "title": "denego", "sku": "{value}", - "quantity": 34, + "quantity": 12, "barcode": "{value}" }] } @@ -99,9 +73,9 @@ export default async function handleOrderPlaced({ "provider_id": "{value}", "delivery_address": {}, "items": [{ - "title": "esse", + "title": "denego", "sku": "{value}", - "quantity": 34, + "quantity": 12, "barcode": "{value}" }] } @@ -132,9 +106,9 @@ export default async function myCustomJob( "provider_id": "{value}", "delivery_address": {}, "items": [{ - "title": "esse", + "title": "denego", "sku": "{value}", - "quantity": 34, + "quantity": 12, "barcode": "{value}" }] } @@ -147,6 +121,34 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createFulfillmentWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createFulfillmentWorkflow + .runAsStep({ + input: { + "location_id": "{value}", + "provider_id": "{value}", + "delivery_address": {}, + "items": [{ + "title": "denego", + "sku": "{value}", + "quantity": 12, + "barcode": "{value}" + }] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.createReturnFulfillmentWorkflow/page.mdx b/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.createReturnFulfillmentWorkflow/page.mdx index 3a5313e2bc..7fbf264516 100644 --- a/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.createReturnFulfillmentWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.createReturnFulfillmentWorkflow/page.mdx @@ -17,35 +17,9 @@ This workflow creates a fulfillment for a return. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createReturnFulfillmentWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createReturnFulfillmentWorkflow - .runAsStep({ - input: { - "location_id": "{value}", - "provider_id": "{value}", - "delivery_address": {}, - "items": [{ - "title": "alias", - "sku": "{value}", - "quantity": 1, - "barcode": "{value}" - }] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -66,9 +40,9 @@ export async function POST( "provider_id": "{value}", "delivery_address": {}, "items": [{ - "title": "alias", + "title": "quidem", "sku": "{value}", - "quantity": 1, + "quantity": 21, "barcode": "{value}" }] } @@ -99,9 +73,9 @@ export default async function handleOrderPlaced({ "provider_id": "{value}", "delivery_address": {}, "items": [{ - "title": "alias", + "title": "quidem", "sku": "{value}", - "quantity": 1, + "quantity": 21, "barcode": "{value}" }] } @@ -132,9 +106,9 @@ export default async function myCustomJob( "provider_id": "{value}", "delivery_address": {}, "items": [{ - "title": "alias", + "title": "quidem", "sku": "{value}", - "quantity": 1, + "quantity": 21, "barcode": "{value}" }] } @@ -147,6 +121,34 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createReturnFulfillmentWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createReturnFulfillmentWorkflow + .runAsStep({ + input: { + "location_id": "{value}", + "provider_id": "{value}", + "delivery_address": {}, + "items": [{ + "title": "quidem", + "sku": "{value}", + "quantity": 21, + "barcode": "{value}" + }] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.createServiceZonesWorkflow/page.mdx b/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.createServiceZonesWorkflow/page.mdx index 3e6fd3ba12..8b6d8e7501 100644 --- a/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.createServiceZonesWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.createServiceZonesWorkflow/page.mdx @@ -16,30 +16,9 @@ This workflow creates one or more service zones. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createServiceZonesWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createServiceZonesWorkflow - .runAsStep({ - input: { - "data": [{ - "name": "Megane", - "fulfillment_set_id": "{value}" - }] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -57,7 +36,7 @@ export async function POST( .run({ input: { "data": [{ - "name": "Megane", + "name": "Max", "fulfillment_set_id": "{value}" }] } @@ -85,7 +64,7 @@ export default async function handleOrderPlaced({ .run({ input: { "data": [{ - "name": "Megane", + "name": "Max", "fulfillment_set_id": "{value}" }] } @@ -113,7 +92,7 @@ export default async function myCustomJob( .run({ input: { "data": [{ - "name": "Megane", + "name": "Max", "fulfillment_set_id": "{value}" }] } @@ -126,6 +105,29 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createServiceZonesWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createServiceZonesWorkflow + .runAsStep({ + input: { + "data": [{ + "name": "Max", + "fulfillment_set_id": "{value}" + }] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.createShipmentWorkflow/page.mdx b/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.createShipmentWorkflow/page.mdx index 9798855486..9dcaa2f7fb 100644 --- a/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.createShipmentWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.createShipmentWorkflow/page.mdx @@ -16,32 +16,9 @@ This workflow creates shipments for a fulfillment. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createShipmentWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createShipmentWorkflow - .runAsStep({ - input: { - "id": "id_6KxdfnQqmcKxHrk1m", - "labels": [{ - "tracking_number": "{value}", - "tracking_url": "{value}", - "label_url": "{value}" - }] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -58,7 +35,7 @@ export async function POST( const { result } = await createShipmentWorkflow(req.scope) .run({ input: { - "id": "id_6KxdfnQqmcKxHrk1m", + "id": "id_bthSIJ3DmvgwjtoD7Ku", "labels": [{ "tracking_number": "{value}", "tracking_url": "{value}", @@ -88,7 +65,7 @@ export default async function handleOrderPlaced({ const { result } = await createShipmentWorkflow(container) .run({ input: { - "id": "id_6KxdfnQqmcKxHrk1m", + "id": "id_bthSIJ3DmvgwjtoD7Ku", "labels": [{ "tracking_number": "{value}", "tracking_url": "{value}", @@ -118,7 +95,7 @@ export default async function myCustomJob( const { result } = await createShipmentWorkflow(container) .run({ input: { - "id": "id_6KxdfnQqmcKxHrk1m", + "id": "id_bthSIJ3DmvgwjtoD7Ku", "labels": [{ "tracking_number": "{value}", "tracking_url": "{value}", @@ -134,6 +111,31 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createShipmentWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createShipmentWorkflow + .runAsStep({ + input: { + "id": "id_bthSIJ3DmvgwjtoD7Ku", + "labels": [{ + "tracking_number": "{value}", + "tracking_url": "{value}", + "label_url": "{value}" + }] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.createShippingOptionsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.createShippingOptionsWorkflow/page.mdx index 337e4c348d..4e25f99be3 100644 --- a/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.createShippingOptionsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.createShippingOptionsWorkflow/page.mdx @@ -17,41 +17,9 @@ This workflow creates one or more shipping options. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createShippingOptionsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createShippingOptionsWorkflow - .runAsStep({ - input: [{ - "name": "Earnest", - "service_zone_id": "{value}", - "shipping_profile_id": "{value}", - "provider_id": "{value}", - "type": { - "label": "{value}", - "description": "Stips antea absens aperte capto solus vobis animi.", - "code": "{value}" - }, - "price_type": "{value}", - "prices": [{ - "currency_code": "{value}", - "amount": 4, - "region_id": "{value}" - }] - }] - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -68,19 +36,19 @@ export async function POST( const { result } = await createShippingOptionsWorkflow(req.scope) .run({ input: [{ - "name": "Earnest", + "name": "Dahlia", "service_zone_id": "{value}", "shipping_profile_id": "{value}", "provider_id": "{value}", "type": { "label": "{value}", - "description": "Stips antea absens aperte capto solus vobis animi.", + "description": "Defero arbustum cerno urbs callide cernuus aggredior caste urbs.", "code": "{value}" }, "price_type": "{value}", "prices": [{ "currency_code": "{value}", - "amount": 4, + "amount": 14, "region_id": "{value}" }] }] @@ -107,19 +75,19 @@ export default async function handleOrderPlaced({ const { result } = await createShippingOptionsWorkflow(container) .run({ input: [{ - "name": "Earnest", + "name": "Dahlia", "service_zone_id": "{value}", "shipping_profile_id": "{value}", "provider_id": "{value}", "type": { "label": "{value}", - "description": "Stips antea absens aperte capto solus vobis animi.", + "description": "Defero arbustum cerno urbs callide cernuus aggredior caste urbs.", "code": "{value}" }, "price_type": "{value}", "prices": [{ "currency_code": "{value}", - "amount": 4, + "amount": 14, "region_id": "{value}" }] }] @@ -146,19 +114,19 @@ export default async function myCustomJob( const { result } = await createShippingOptionsWorkflow(container) .run({ input: [{ - "name": "Earnest", + "name": "Dahlia", "service_zone_id": "{value}", "shipping_profile_id": "{value}", "provider_id": "{value}", "type": { "label": "{value}", - "description": "Stips antea absens aperte capto solus vobis animi.", + "description": "Defero arbustum cerno urbs callide cernuus aggredior caste urbs.", "code": "{value}" }, "price_type": "{value}", "prices": [{ "currency_code": "{value}", - "amount": 4, + "amount": 14, "region_id": "{value}" }] }] @@ -171,6 +139,40 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createShippingOptionsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createShippingOptionsWorkflow + .runAsStep({ + input: [{ + "name": "Dahlia", + "service_zone_id": "{value}", + "shipping_profile_id": "{value}", + "provider_id": "{value}", + "type": { + "label": "{value}", + "description": "Defero arbustum cerno urbs callide cernuus aggredior caste urbs.", + "code": "{value}" + }, + "price_type": "{value}", + "prices": [{ + "currency_code": "{value}", + "amount": 14, + "region_id": "{value}" + }] + }] + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.createShippingProfilesWorkflow/page.mdx b/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.createShippingProfilesWorkflow/page.mdx index e0cde93f55..de57158ce9 100644 --- a/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.createShippingProfilesWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.createShippingProfilesWorkflow/page.mdx @@ -16,30 +16,9 @@ This workflow creates one or more shipping profiles. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createShippingProfilesWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createShippingProfilesWorkflow - .runAsStep({ - input: { - "data": [{ - "name": "Rosanna", - "type": "{value}" - }] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -57,7 +36,7 @@ export async function POST( .run({ input: { "data": [{ - "name": "Rosanna", + "name": "Haven", "type": "{value}" }] } @@ -85,7 +64,7 @@ export default async function handleOrderPlaced({ .run({ input: { "data": [{ - "name": "Rosanna", + "name": "Haven", "type": "{value}" }] } @@ -113,7 +92,7 @@ export default async function myCustomJob( .run({ input: { "data": [{ - "name": "Rosanna", + "name": "Haven", "type": "{value}" }] } @@ -126,6 +105,29 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createShippingProfilesWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createShippingProfilesWorkflow + .runAsStep({ + input: { + "data": [{ + "name": "Haven", + "type": "{value}" + }] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.deleteFulfillmentSetsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.deleteFulfillmentSetsWorkflow/page.mdx index 69edde9580..d657d383db 100644 --- a/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.deleteFulfillmentSetsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.deleteFulfillmentSetsWorkflow/page.mdx @@ -17,29 +17,9 @@ This workflow deletes one or more fulfillment sets. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { deleteFulfillmentSetsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = deleteFulfillmentSetsWorkflow - .runAsStep({ - input: { - "ids": [ - "id_xpzekH8fDmbjGYb1" - ] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -57,7 +37,7 @@ export async function POST( .run({ input: { "ids": [ - "id_xpzekH8fDmbjGYb1" + "id_9LYG9saNaInAMo2jl" ] } }) @@ -84,7 +64,7 @@ export default async function handleOrderPlaced({ .run({ input: { "ids": [ - "id_xpzekH8fDmbjGYb1" + "id_9LYG9saNaInAMo2jl" ] } }) @@ -111,7 +91,7 @@ export default async function myCustomJob( .run({ input: { "ids": [ - "id_xpzekH8fDmbjGYb1" + "id_9LYG9saNaInAMo2jl" ] } }) @@ -123,6 +103,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { deleteFulfillmentSetsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = deleteFulfillmentSetsWorkflow + .runAsStep({ + input: { + "ids": [ + "id_9LYG9saNaInAMo2jl" + ] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.deleteServiceZonesWorkflow/page.mdx b/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.deleteServiceZonesWorkflow/page.mdx index 9c61a6c141..e9a1e3ffb1 100644 --- a/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.deleteServiceZonesWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.deleteServiceZonesWorkflow/page.mdx @@ -16,29 +16,9 @@ This workflow deletes one or more service zones. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { deleteServiceZonesWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = deleteServiceZonesWorkflow - .runAsStep({ - input: { - "ids": [ - "id_yTtSLLYn6RIfjdb5Q" - ] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -56,7 +36,7 @@ export async function POST( .run({ input: { "ids": [ - "id_yTtSLLYn6RIfjdb5Q" + "id_Knqn6UBPOVEcr5lujDNj" ] } }) @@ -83,7 +63,7 @@ export default async function handleOrderPlaced({ .run({ input: { "ids": [ - "id_yTtSLLYn6RIfjdb5Q" + "id_Knqn6UBPOVEcr5lujDNj" ] } }) @@ -110,7 +90,7 @@ export default async function myCustomJob( .run({ input: { "ids": [ - "id_yTtSLLYn6RIfjdb5Q" + "id_Knqn6UBPOVEcr5lujDNj" ] } }) @@ -122,6 +102,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { deleteServiceZonesWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = deleteServiceZonesWorkflow + .runAsStep({ + input: { + "ids": [ + "id_Knqn6UBPOVEcr5lujDNj" + ] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.deleteShippingOptionsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.deleteShippingOptionsWorkflow/page.mdx index ae6d5d1823..f46ec26c7d 100644 --- a/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.deleteShippingOptionsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.deleteShippingOptionsWorkflow/page.mdx @@ -17,29 +17,9 @@ This workflow deletes one or more shipping options. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { deleteShippingOptionsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = deleteShippingOptionsWorkflow - .runAsStep({ - input: { - "ids": [ - "id_G2fEBjyT1zNDdaPUSAa" - ] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -57,7 +37,7 @@ export async function POST( .run({ input: { "ids": [ - "id_G2fEBjyT1zNDdaPUSAa" + "id_hkAaQ9Ihc14UYwx" ] } }) @@ -84,7 +64,7 @@ export default async function handleOrderPlaced({ .run({ input: { "ids": [ - "id_G2fEBjyT1zNDdaPUSAa" + "id_hkAaQ9Ihc14UYwx" ] } }) @@ -111,7 +91,7 @@ export default async function myCustomJob( .run({ input: { "ids": [ - "id_G2fEBjyT1zNDdaPUSAa" + "id_hkAaQ9Ihc14UYwx" ] } }) @@ -123,6 +103,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { deleteShippingOptionsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = deleteShippingOptionsWorkflow + .runAsStep({ + input: { + "ids": [ + "id_hkAaQ9Ihc14UYwx" + ] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.markFulfillmentAsDeliveredWorkflow/page.mdx b/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.markFulfillmentAsDeliveredWorkflow/page.mdx index b7571268e4..3a11e8069b 100644 --- a/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.markFulfillmentAsDeliveredWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.markFulfillmentAsDeliveredWorkflow/page.mdx @@ -17,27 +17,9 @@ This workflow marks fulfillment as delivered. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { markFulfillmentAsDeliveredWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = markFulfillmentAsDeliveredWorkflow - .runAsStep({ - input: { - "id": "id_JeepOuXot0iLRX" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -54,7 +36,7 @@ export async function POST( const { result } = await markFulfillmentAsDeliveredWorkflow(req.scope) .run({ input: { - "id": "id_JeepOuXot0iLRX" + "id": "id_mQNF81yXUvvj4" } }) @@ -79,7 +61,7 @@ export default async function handleOrderPlaced({ const { result } = await markFulfillmentAsDeliveredWorkflow(container) .run({ input: { - "id": "id_JeepOuXot0iLRX" + "id": "id_mQNF81yXUvvj4" } }) @@ -104,7 +86,7 @@ export default async function myCustomJob( const { result } = await markFulfillmentAsDeliveredWorkflow(container) .run({ input: { - "id": "id_JeepOuXot0iLRX" + "id": "id_mQNF81yXUvvj4" } }) @@ -115,6 +97,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { markFulfillmentAsDeliveredWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = markFulfillmentAsDeliveredWorkflow + .runAsStep({ + input: { + "id": "id_mQNF81yXUvvj4" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.updateFulfillmentWorkflow/page.mdx b/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.updateFulfillmentWorkflow/page.mdx index 830d39c140..bba9b52bdd 100644 --- a/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.updateFulfillmentWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.updateFulfillmentWorkflow/page.mdx @@ -16,27 +16,9 @@ This workflow updates a fulfillment. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updateFulfillmentWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updateFulfillmentWorkflow - .runAsStep({ - input: { - "id": "id_MUrEy6v8tUXD" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -53,7 +35,7 @@ export async function POST( const { result } = await updateFulfillmentWorkflow(req.scope) .run({ input: { - "id": "id_MUrEy6v8tUXD" + "id": "id_W0Ia44AVuiQoCi" } }) @@ -78,7 +60,7 @@ export default async function handleOrderPlaced({ const { result } = await updateFulfillmentWorkflow(container) .run({ input: { - "id": "id_MUrEy6v8tUXD" + "id": "id_W0Ia44AVuiQoCi" } }) @@ -103,7 +85,7 @@ export default async function myCustomJob( const { result } = await updateFulfillmentWorkflow(container) .run({ input: { - "id": "id_MUrEy6v8tUXD" + "id": "id_W0Ia44AVuiQoCi" } }) @@ -114,6 +96,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updateFulfillmentWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updateFulfillmentWorkflow + .runAsStep({ + input: { + "id": "id_W0Ia44AVuiQoCi" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.updateServiceZonesWorkflow/page.mdx b/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.updateServiceZonesWorkflow/page.mdx index a5c25fb09a..9196a68003 100644 --- a/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.updateServiceZonesWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.updateServiceZonesWorkflow/page.mdx @@ -15,28 +15,9 @@ This workflow updates one or more service zones. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updateServiceZonesWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updateServiceZonesWorkflow - .runAsStep({ - input: { - "selector": {}, - "update": {} - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -117,6 +98,27 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updateServiceZonesWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updateServiceZonesWorkflow + .runAsStep({ + input: { + "selector": {}, + "update": {} + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.updateShippingOptionsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.updateShippingOptionsWorkflow/page.mdx index e74f5fb38c..c7de162479 100644 --- a/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.updateShippingOptionsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.updateShippingOptionsWorkflow/page.mdx @@ -18,27 +18,9 @@ This workflow updates one or more shipping options. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updateShippingOptionsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updateShippingOptionsWorkflow - .runAsStep({ - input: [{ - "id": "id_solavLhHlKdKuvW7Wr" - }] - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -55,7 +37,7 @@ export async function POST( const { result } = await updateShippingOptionsWorkflow(req.scope) .run({ input: [{ - "id": "id_solavLhHlKdKuvW7Wr" + "id": "id_99ZBSJCJJWoPWPatn" }] }) @@ -80,7 +62,7 @@ export default async function handleOrderPlaced({ const { result } = await updateShippingOptionsWorkflow(container) .run({ input: [{ - "id": "id_solavLhHlKdKuvW7Wr" + "id": "id_99ZBSJCJJWoPWPatn" }] }) @@ -105,7 +87,7 @@ export default async function myCustomJob( const { result } = await updateShippingOptionsWorkflow(container) .run({ input: [{ - "id": "id_solavLhHlKdKuvW7Wr" + "id": "id_99ZBSJCJJWoPWPatn" }] }) @@ -116,6 +98,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updateShippingOptionsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updateShippingOptionsWorkflow + .runAsStep({ + input: [{ + "id": "id_99ZBSJCJJWoPWPatn" + }] + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.updateShippingProfilesWorkflow/page.mdx b/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.updateShippingProfilesWorkflow/page.mdx index 63fd6d854c..bc442eb1e6 100644 --- a/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.updateShippingProfilesWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.updateShippingProfilesWorkflow/page.mdx @@ -16,28 +16,9 @@ This workflow updates one or more shipping profiles. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updateShippingProfilesWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updateShippingProfilesWorkflow - .runAsStep({ - input: { - "selector": {}, - "update": {} - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -118,6 +99,27 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updateShippingProfilesWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updateShippingProfilesWorkflow + .runAsStep({ + input: { + "selector": {}, + "update": {} + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.validateFulfillmentDeliverabilityStep/page.mdx b/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.validateFulfillmentDeliverabilityStep/page.mdx index bd988710f6..1f6a6122a2 100644 --- a/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.validateFulfillmentDeliverabilityStep/page.mdx +++ b/www/apps/resources/references/core_flows/Fulfillment/Workflows_Fulfillment/functions/core_flows.Fulfillment.Workflows_Fulfillment.validateFulfillmentDeliverabilityStep/page.mdx @@ -21,7 +21,7 @@ const myWorkflow = createWorkflow( "my-workflow", () => { const data = validateFulfillmentDeliverabilityStep({ - "id": "id_52Q9Jzw5X1cS6xmE4", + "id": "id_ejdOTOBdmVMA27M5", "location_id": "{value}", "packed_at": {}, "shipped_at": {}, @@ -34,13 +34,13 @@ const myWorkflow = createWorkflow( "shipping_option": {}, "requires_shipping": false, "provider": { - "id": "id_ns8d5Y8IHQAj9a", - "name": "Judy", + "id": "id_R9zKEUqqlBx5d", + "name": "Annabell", "metadata": {}, "shipping_options": [{ - "id": "id_D6BSEjbMx0ai7", - "name": "Blake", - "price_type": "calculated", + "id": "id_WJa8WLg9PKFme", + "name": "Jacey", + "price_type": "flat", "service_zone_id": "{value}", "shipping_profile_id": "{value}", "provider_id": "{value}", @@ -48,12 +48,12 @@ const myWorkflow = createWorkflow( "data": {}, "metadata": {}, "service_zone": { - "id": "id_GCgTlCVmouvkoWVOn8", - "name": "Clifford", + "id": "id_bafEM5M9Exu2DwLu", + "name": "Waino", "metadata": {}, "fulfillment_set": { - "id": "id_v8V4xa9dTIla1WqZOBZ", - "name": "Erling", + "id": "id_UHybOosKKBB6uT5", + "name": "Gerda", "type": "{value}", "metadata": {}, "service_zones": [ @@ -65,7 +65,7 @@ const myWorkflow = createWorkflow( }, "fulfillment_set_id": "{value}", "geo_zones": [{ - "id": "id_PounO6cYZAzF", + "id": "id_crd1t1eQLlGbuf", "type": {}, "country_code": "{value}", "province_code": {}, @@ -77,8 +77,8 @@ const myWorkflow = createWorkflow( "deleted_at": {} }], "shipping_options": [{ - "id": "id_GbC1woJ0i56t6A", - "name": "Reginald", + "id": "id_1kDhUEU1D12f", + "name": "Kody", "price_type": {}, "service_zone_id": "{value}", "shipping_profile_id": "{value}", @@ -101,13 +101,13 @@ const myWorkflow = createWorkflow( "deleted_at": {} }, "shipping_profile": { - "id": "id_Sg4nAg3p7phO", - "name": "Elton", + "id": "id_NUyUeBsU1BtNi", + "name": "Elmo", "type": "{value}", "metadata": {}, "shipping_options": [{ - "id": "id_74d0xcVrSl0RCxb", - "name": "Bennie", + "id": "id_1EsHzSRipDXg", + "name": "Courtney", "price_type": {}, "service_zone_id": "{value}", "shipping_profile_id": "{value}", @@ -130,12 +130,12 @@ const myWorkflow = createWorkflow( "deleted_at": {} }, "fulfillment_provider": { - "id": "id_YQenaWavpjJlyGWw9tn9", - "name": "Jaiden", + "id": "id_eLztCB8jXGeMAuGG", + "name": "Marcelo", "metadata": {}, "shipping_options": [{ - "id": "id_Tag6CbAzPc1", - "name": "Brandy", + "id": "id_qj0vvzhwwE8nIaO7vS", + "name": "Blaise", "price_type": {}, "service_zone_id": "{value}", "shipping_profile_id": "{value}", @@ -158,15 +158,15 @@ const myWorkflow = createWorkflow( "deleted_at": {} }, "type": { - "id": "id_YQ6zKe8n4aGLu", + "id": "id_J3VRKueq4AvvTocPtP", "label": "{value}", - "description": "Delego uberrime convoco appositus defungo artificiose cernuus necessitatibus officia tandem.", + "description": "Arguo vel autus termes cura deduco umbra.", "code": "{value}", "shipping_option_id": "{value}", "shipping_option": { - "id": "id_koVG7NiZxOSC2iJhI16d", - "name": "Rollin", - "price_type": "flat", + "id": "id_gb17OBHdmONS8E", + "name": "Jannie", + "price_type": "calculated", "service_zone_id": "{value}", "shipping_profile_id": "{value}", "provider_id": "{value}", @@ -174,8 +174,8 @@ const myWorkflow = createWorkflow( "data": {}, "metadata": {}, "service_zone": { - "id": "id_fXoIBqubQBbxtDX0jE", - "name": "Ephraim", + "id": "id_28541Avxpiw", + "name": "Kaylee", "metadata": {}, "fulfillment_set": {}, "fulfillment_set_id": "{value}", @@ -186,8 +186,8 @@ const myWorkflow = createWorkflow( "deleted_at": {} }, "shipping_profile": { - "id": "id_cL3m2NZMe4TzcRbPj8YN", - "name": "Rosalee", + "id": "id_Nd6bhfjB3oF80n", + "name": "Weston", "type": "{value}", "metadata": {}, "shipping_options": [], @@ -196,8 +196,8 @@ const myWorkflow = createWorkflow( "deleted_at": {} }, "fulfillment_provider": { - "id": "id_zKZi2YYj7eiSQbFw", - "name": "Augustine", + "id": "id_Wk9vLshajkWJo", + "name": "Mose", "metadata": {}, "shipping_options": [], "created_at": {}, @@ -205,9 +205,9 @@ const myWorkflow = createWorkflow( "deleted_at": {} }, "type": { - "id": "id_Y3OdhITzdTkL", + "id": "id_WKJZjyYP5K", "label": "{value}", - "description": "Currus tumultus comitatus vis agnosco sortitus cunabula verto umbra.", + "description": "Ulciscor antiquus amicitia pel calcar recusandae impedit mollitia.", "code": "{value}", "shipping_option_id": "{value}", "shipping_option": {}, @@ -230,14 +230,14 @@ const myWorkflow = createWorkflow( "deleted_at": {} }, "rules": [{ - "id": "id_tfHvXYbW6YkN3s", + "id": "id_J2nVga5vkVXB9", "attribute": "{value}", "operator": "{value}", "value": {}, "shipping_option_id": "{value}", "shipping_option": { - "id": "id_VE5unUO3K4ZCD", - "name": "Megane", + "id": "id_TejFW5178xR", + "name": "Harmon", "price_type": {}, "service_zone_id": "{value}", "shipping_profile_id": "{value}", @@ -260,7 +260,7 @@ const myWorkflow = createWorkflow( "deleted_at": {} }], "fulfillments": [{ - "id": "id_avqnMHjxB4ORp2bYwvd", + "id": "id_kVJiU5FoebQpX", "location_id": "{value}", "packed_at": {}, "shipped_at": {}, @@ -271,10 +271,10 @@ const myWorkflow = createWorkflow( "shipping_option_id": {}, "metadata": {}, "shipping_option": {}, - "requires_shipping": false, + "requires_shipping": true, "provider": { - "id": "id_5Zhzv7v85gWevjw", - "name": "Naomi", + "id": "id_AsTuBAs6I678qED", + "name": "Jasper", "metadata": {}, "shipping_options": [], "created_at": {}, @@ -282,7 +282,7 @@ const myWorkflow = createWorkflow( "deleted_at": {} }, "delivery_address": { - "id": "id_c8rdGrXL9NYE9Jw6agMp", + "id": "id_nfFvGWuAIxDJ6ZMBH", "fulfillment_id": {}, "company": {}, "first_name": {}, @@ -318,7 +318,7 @@ const myWorkflow = createWorkflow( "deleted_at": {} }, "delivery_address": { - "id": "id_LKeuWFqzr9Ehm", + "id": "id_lxe6njmOoa", "fulfillment_id": {}, "company": {}, "first_name": {}, @@ -336,16 +336,16 @@ const myWorkflow = createWorkflow( "deleted_at": {} }, "items": [{ - "id": "id_DBBArP0uNg1C1c", - "title": "accusantium", - "quantity": 8, + "id": "id_D6l8GraJzDPiQa", + "title": "coepi", + "quantity": 4, "sku": "{value}", "barcode": "{value}", "line_item_id": {}, "inventory_item_id": {}, "fulfillment_id": "{value}", "fulfillment": { - "id": "id_QtjTKRghhYN", + "id": "id_8poxcH80HUGWwjMsJdL", "location_id": "{value}", "packed_at": {}, "shipped_at": {}, @@ -358,12 +358,12 @@ const myWorkflow = createWorkflow( "shipping_option": {}, "requires_shipping": true, "provider": { - "id": "id_hmigWr90t3u", - "name": "Odessa", + "id": "id_kXWMk2Sz2p9", + "name": "Uriah", "metadata": {}, "shipping_options": [{ - "id": "id_9hlCMabUbP", - "name": "Griffin", + "id": "id_jJF72Y8MGdLHuPz", + "name": "Hector", "price_type": {}, "service_zone_id": "{value}", "shipping_profile_id": "{value}", @@ -386,7 +386,7 @@ const myWorkflow = createWorkflow( "deleted_at": {} }, "delivery_address": { - "id": "id_eVZKJ48OpoJwgj1Pg", + "id": "id_W4AdCxZhqjhhd2", "fulfillment_id": {}, "company": {}, "first_name": {}, @@ -404,16 +404,16 @@ const myWorkflow = createWorkflow( "deleted_at": {} }, "items": [{ - "id": "id_5rCp7mgDLdJO", - "title": "ducimus", - "quantity": 22, + "id": "id_xxVTEPHdsQpt29", + "title": "curo", + "quantity": 7, "sku": "{value}", "barcode": "{value}", "line_item_id": {}, "inventory_item_id": {}, "fulfillment_id": "{value}", "fulfillment": { - "id": "id_LcySjIv26ybf", + "id": "id_GiiKTqrgJXGSuFoxp", "location_id": "{value}", "packed_at": {}, "shipped_at": {}, @@ -424,7 +424,7 @@ const myWorkflow = createWorkflow( "shipping_option_id": {}, "metadata": {}, "shipping_option": {}, - "requires_shipping": false, + "requires_shipping": true, "provider": {}, "delivery_address": {}, "items": [], @@ -438,13 +438,13 @@ const myWorkflow = createWorkflow( "deleted_at": {} }], "labels": [{ - "id": "id_w3RLp4etcyC0WRt", + "id": "id_mdou99tdbb59qRlTkf", "tracking_number": "{value}", "tracking_url": "{value}", "label_url": "{value}", "fulfillment_id": "{value}", "fulfillment": { - "id": "id_0oQIWkhxPbmvdz", + "id": "id_0DyVmNSbkqUZW", "location_id": "{value}", "packed_at": {}, "shipped_at": {}, @@ -477,13 +477,13 @@ const myWorkflow = createWorkflow( "deleted_at": {} }], "labels": [{ - "id": "id_Dnw80W292ntay", + "id": "id_U2jwndQAmhR751mwEAcq", "tracking_number": "{value}", "tracking_url": "{value}", "label_url": "{value}", "fulfillment_id": "{value}", "fulfillment": { - "id": "id_IGUAte51Aa", + "id": "id_r3o3EclibZuauzM", "location_id": "{value}", "packed_at": {}, "shipped_at": {}, @@ -496,12 +496,12 @@ const myWorkflow = createWorkflow( "shipping_option": {}, "requires_shipping": true, "provider": { - "id": "id_x2EqCDQGCzMnQK96KHuF", - "name": "Charlene", + "id": "id_Dd6TnDWCMXfJPfTdVB", + "name": "Elmo", "metadata": {}, "shipping_options": [{ - "id": "id_SvXn59ZmCAh", - "name": "Kattie", + "id": "id_voOdNyNUNBC9m58", + "name": "Gianni", "price_type": {}, "service_zone_id": "{value}", "shipping_profile_id": "{value}", @@ -524,7 +524,7 @@ const myWorkflow = createWorkflow( "deleted_at": {} }, "delivery_address": { - "id": "id_cYylHM00I4PPBd", + "id": "id_MdUjhvG5ESOf", "fulfillment_id": {}, "company": {}, "first_name": {}, @@ -542,16 +542,16 @@ const myWorkflow = createWorkflow( "deleted_at": {} }, "items": [{ - "id": "id_JBg9e978G21QqfujBHK5", - "title": "volaticus", - "quantity": 37, + "id": "id_tc2cbyad7GRFSRYoSP", + "title": "templum", + "quantity": 49, "sku": "{value}", "barcode": "{value}", "line_item_id": {}, "inventory_item_id": {}, "fulfillment_id": "{value}", "fulfillment": { - "id": "id_ZUlMIqTdSemfwf", + "id": "id_IHWv45DWjiRlm5SdATE6", "location_id": "{value}", "packed_at": {}, "shipped_at": {}, @@ -576,13 +576,13 @@ const myWorkflow = createWorkflow( "deleted_at": {} }], "labels": [{ - "id": "id_GuIoYhwgNItg2Fm9es7", + "id": "id_Hj4SDfWhsqSMRMZK59d", "tracking_number": "{value}", "tracking_url": "{value}", "label_url": "{value}", "fulfillment_id": "{value}", "fulfillment": { - "id": "id_zmQi7cTL02w", + "id": "id_tVxn3Z1BrYkAi5jkV4UB", "location_id": "{value}", "packed_at": {}, "shipped_at": {}, diff --git a/www/apps/resources/references/core_flows/Inventory/Steps_Inventory/functions/core_flows.Inventory.Steps_Inventory.adjustInventoryLevelsStep/page.mdx b/www/apps/resources/references/core_flows/Inventory/Steps_Inventory/functions/core_flows.Inventory.Steps_Inventory.adjustInventoryLevelsStep/page.mdx index 744715ab5c..73b4790254 100644 --- a/www/apps/resources/references/core_flows/Inventory/Steps_Inventory/functions/core_flows.Inventory.Steps_Inventory.adjustInventoryLevelsStep/page.mdx +++ b/www/apps/resources/references/core_flows/Inventory/Steps_Inventory/functions/core_flows.Inventory.Steps_Inventory.adjustInventoryLevelsStep/page.mdx @@ -24,7 +24,7 @@ const myWorkflow = createWorkflow( const data = adjustInventoryLevelsStep([{ "inventory_item_id": "{value}", "location_id": "{value}", - "adjustment": 38 + "adjustment": 8 }]) } ) diff --git a/www/apps/resources/references/core_flows/Inventory/Steps_Inventory/functions/core_flows.Inventory.Steps_Inventory.updateInventoryItemsStep/page.mdx b/www/apps/resources/references/core_flows/Inventory/Steps_Inventory/functions/core_flows.Inventory.Steps_Inventory.updateInventoryItemsStep/page.mdx index de02ac1d52..f13fa67de8 100644 --- a/www/apps/resources/references/core_flows/Inventory/Steps_Inventory/functions/core_flows.Inventory.Steps_Inventory.updateInventoryItemsStep/page.mdx +++ b/www/apps/resources/references/core_flows/Inventory/Steps_Inventory/functions/core_flows.Inventory.Steps_Inventory.updateInventoryItemsStep/page.mdx @@ -22,7 +22,7 @@ const myWorkflow = createWorkflow( "my-workflow", () => { const data = updateInventoryItemsStep([{ - "id": "id_BOCnkcyrVoVG" + "id": "id_TO5EihFFEY4RT" }]) } ) diff --git a/www/apps/resources/references/core_flows/Inventory/Steps_Inventory/functions/core_flows.Inventory.Steps_Inventory.validateInventoryDeleteStep/page.mdx b/www/apps/resources/references/core_flows/Inventory/Steps_Inventory/functions/core_flows.Inventory.Steps_Inventory.validateInventoryDeleteStep/page.mdx index dd14e31ad9..8c146b86a7 100644 --- a/www/apps/resources/references/core_flows/Inventory/Steps_Inventory/functions/core_flows.Inventory.Steps_Inventory.validateInventoryDeleteStep/page.mdx +++ b/www/apps/resources/references/core_flows/Inventory/Steps_Inventory/functions/core_flows.Inventory.Steps_Inventory.validateInventoryDeleteStep/page.mdx @@ -20,8 +20,8 @@ const myWorkflow = createWorkflow( () => { const data = validateInventoryDeleteStep({ "inventory_items": [{ - "id": "id_FMSClss3wBjzSIH", - "reserved_quantity": 9 + "id": "id_vUgdWnRhWcfP9X", + "reserved_quantity": 30 }] }) } diff --git a/www/apps/resources/references/core_flows/Inventory/Workflows_Inventory/functions/core_flows.Inventory.Workflows_Inventory.batchInventoryItemLevelsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Inventory/Workflows_Inventory/functions/core_flows.Inventory.Workflows_Inventory.batchInventoryItemLevelsWorkflow/page.mdx index 1093a69d47..0e6f82d496 100644 --- a/www/apps/resources/references/core_flows/Inventory/Workflows_Inventory/functions/core_flows.Inventory.Workflows_Inventory.batchInventoryItemLevelsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Inventory/Workflows_Inventory/functions/core_flows.Inventory.Workflows_Inventory.batchInventoryItemLevelsWorkflow/page.mdx @@ -15,25 +15,9 @@ This documentation provides a reference to the `batchInventoryItemLevelsWorkflow +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { batchInventoryItemLevelsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = batchInventoryItemLevelsWorkflow - .runAsStep({ - input: {} - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -105,6 +89,24 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { batchInventoryItemLevelsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = batchInventoryItemLevelsWorkflow + .runAsStep({ + input: {} + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Inventory/Workflows_Inventory/functions/core_flows.Inventory.Workflows_Inventory.bulkCreateDeleteLevelsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Inventory/Workflows_Inventory/functions/core_flows.Inventory.Workflows_Inventory.bulkCreateDeleteLevelsWorkflow/page.mdx index 149b1ca5c7..ca6b28c417 100644 --- a/www/apps/resources/references/core_flows/Inventory/Workflows_Inventory/functions/core_flows.Inventory.Workflows_Inventory.bulkCreateDeleteLevelsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Inventory/Workflows_Inventory/functions/core_flows.Inventory.Workflows_Inventory.bulkCreateDeleteLevelsWorkflow/page.mdx @@ -23,34 +23,9 @@ Use `batchInventoryItemLevels` instead. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { bulkCreateDeleteLevelsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = bulkCreateDeleteLevelsWorkflow - .runAsStep({ - input: { - "creates": [{ - "inventory_item_id": "{value}", - "location_id": "{value}" - }], - "deletes": [{ - "inventory_item_id": "{value}", - "location_id": "{value}" - }] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -149,6 +124,33 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { bulkCreateDeleteLevelsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = bulkCreateDeleteLevelsWorkflow + .runAsStep({ + input: { + "creates": [{ + "inventory_item_id": "{value}", + "location_id": "{value}" + }], + "deletes": [{ + "inventory_item_id": "{value}", + "location_id": "{value}" + }] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Inventory/Workflows_Inventory/functions/core_flows.Inventory.Workflows_Inventory.createInventoryItemsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Inventory/Workflows_Inventory/functions/core_flows.Inventory.Workflows_Inventory.createInventoryItemsWorkflow/page.mdx index 7f41502194..54d18658a7 100644 --- a/www/apps/resources/references/core_flows/Inventory/Workflows_Inventory/functions/core_flows.Inventory.Workflows_Inventory.createInventoryItemsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Inventory/Workflows_Inventory/functions/core_flows.Inventory.Workflows_Inventory.createInventoryItemsWorkflow/page.mdx @@ -17,29 +17,9 @@ This workflow creates one or more inventory items. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createInventoryItemsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createInventoryItemsWorkflow - .runAsStep({ - input: { - "items": [ - {} - ] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -123,6 +103,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createInventoryItemsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createInventoryItemsWorkflow + .runAsStep({ + input: { + "items": [ + {} + ] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Inventory/Workflows_Inventory/functions/core_flows.Inventory.Workflows_Inventory.createInventoryLevelsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Inventory/Workflows_Inventory/functions/core_flows.Inventory.Workflows_Inventory.createInventoryLevelsWorkflow/page.mdx index 454a9528f6..0c9b381673 100644 --- a/www/apps/resources/references/core_flows/Inventory/Workflows_Inventory/functions/core_flows.Inventory.Workflows_Inventory.createInventoryLevelsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Inventory/Workflows_Inventory/functions/core_flows.Inventory.Workflows_Inventory.createInventoryLevelsWorkflow/page.mdx @@ -17,30 +17,9 @@ This workflow creates one or more inventory levels. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createInventoryLevelsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createInventoryLevelsWorkflow - .runAsStep({ - input: { - "inventory_levels": [{ - "inventory_item_id": "{value}", - "location_id": "{value}" - }] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -127,6 +106,29 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createInventoryLevelsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createInventoryLevelsWorkflow + .runAsStep({ + input: { + "inventory_levels": [{ + "inventory_item_id": "{value}", + "location_id": "{value}" + }] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Inventory/Workflows_Inventory/functions/core_flows.Inventory.Workflows_Inventory.deleteInventoryItemWorkflow/page.mdx b/www/apps/resources/references/core_flows/Inventory/Workflows_Inventory/functions/core_flows.Inventory.Workflows_Inventory.deleteInventoryItemWorkflow/page.mdx index 64dc188cb3..825d714f94 100644 --- a/www/apps/resources/references/core_flows/Inventory/Workflows_Inventory/functions/core_flows.Inventory.Workflows_Inventory.deleteInventoryItemWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Inventory/Workflows_Inventory/functions/core_flows.Inventory.Workflows_Inventory.deleteInventoryItemWorkflow/page.mdx @@ -18,27 +18,9 @@ This workflow deletes one or more inventory items. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { deleteInventoryItemWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = deleteInventoryItemWorkflow - .runAsStep({ - input: [ - "{value}" - ] - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -116,6 +98,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { deleteInventoryItemWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = deleteInventoryItemWorkflow + .runAsStep({ + input: [ + "{value}" + ] + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Inventory/Workflows_Inventory/functions/core_flows.Inventory.Workflows_Inventory.deleteInventoryLevelsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Inventory/Workflows_Inventory/functions/core_flows.Inventory.Workflows_Inventory.deleteInventoryLevelsWorkflow/page.mdx index 03049a8ad0..f229372250 100644 --- a/www/apps/resources/references/core_flows/Inventory/Workflows_Inventory/functions/core_flows.Inventory.Workflows_Inventory.deleteInventoryLevelsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Inventory/Workflows_Inventory/functions/core_flows.Inventory.Workflows_Inventory.deleteInventoryLevelsWorkflow/page.mdx @@ -16,25 +16,9 @@ This workflow deletes one or more inventory levels. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { deleteInventoryLevelsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = deleteInventoryLevelsWorkflow - .runAsStep({ - input: {} - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -106,6 +90,24 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { deleteInventoryLevelsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = deleteInventoryLevelsWorkflow + .runAsStep({ + input: {} + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Inventory/Workflows_Inventory/functions/core_flows.Inventory.Workflows_Inventory.updateInventoryItemsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Inventory/Workflows_Inventory/functions/core_flows.Inventory.Workflows_Inventory.updateInventoryItemsWorkflow/page.mdx index 1737d4dbeb..73e2961611 100644 --- a/www/apps/resources/references/core_flows/Inventory/Workflows_Inventory/functions/core_flows.Inventory.Workflows_Inventory.updateInventoryItemsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Inventory/Workflows_Inventory/functions/core_flows.Inventory.Workflows_Inventory.updateInventoryItemsWorkflow/page.mdx @@ -16,29 +16,9 @@ This workflow updates one or more inventory items. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updateInventoryItemsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updateInventoryItemsWorkflow - .runAsStep({ - input: { - "updates": [{ - "id": "id_wUY6hxl9WnPSZ" - }] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -56,7 +36,7 @@ export async function POST( .run({ input: { "updates": [{ - "id": "id_wUY6hxl9WnPSZ" + "id": "id_wkl0ZamLAO5bFSnHF" }] } }) @@ -83,7 +63,7 @@ export default async function handleOrderPlaced({ .run({ input: { "updates": [{ - "id": "id_wUY6hxl9WnPSZ" + "id": "id_wkl0ZamLAO5bFSnHF" }] } }) @@ -110,7 +90,7 @@ export default async function myCustomJob( .run({ input: { "updates": [{ - "id": "id_wUY6hxl9WnPSZ" + "id": "id_wkl0ZamLAO5bFSnHF" }] } }) @@ -122,6 +102,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updateInventoryItemsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updateInventoryItemsWorkflow + .runAsStep({ + input: { + "updates": [{ + "id": "id_wkl0ZamLAO5bFSnHF" + }] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Inventory/Workflows_Inventory/functions/core_flows.Inventory.Workflows_Inventory.updateInventoryLevelsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Inventory/Workflows_Inventory/functions/core_flows.Inventory.Workflows_Inventory.updateInventoryLevelsWorkflow/page.mdx index d0ba8dc07f..d9d021c9e7 100644 --- a/www/apps/resources/references/core_flows/Inventory/Workflows_Inventory/functions/core_flows.Inventory.Workflows_Inventory.updateInventoryLevelsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Inventory/Workflows_Inventory/functions/core_flows.Inventory.Workflows_Inventory.updateInventoryLevelsWorkflow/page.mdx @@ -16,30 +16,9 @@ This workflow updates one or more inventory levels. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updateInventoryLevelsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updateInventoryLevelsWorkflow - .runAsStep({ - input: { - "updates": [{ - "inventory_item_id": "{value}", - "location_id": "{value}" - }] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -126,6 +105,29 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updateInventoryLevelsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updateInventoryLevelsWorkflow + .runAsStep({ + input: { + "updates": [{ + "inventory_item_id": "{value}", + "location_id": "{value}" + }] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Inventory/Workflows_Inventory/functions/core_flows.Inventory.Workflows_Inventory.validateInventoryLevelsDelete/page.mdx b/www/apps/resources/references/core_flows/Inventory/Workflows_Inventory/functions/core_flows.Inventory.Workflows_Inventory.validateInventoryLevelsDelete/page.mdx index 3158a7a0be..4fe21a1aa5 100644 --- a/www/apps/resources/references/core_flows/Inventory/Workflows_Inventory/functions/core_flows.Inventory.Workflows_Inventory.validateInventoryLevelsDelete/page.mdx +++ b/www/apps/resources/references/core_flows/Inventory/Workflows_Inventory/functions/core_flows.Inventory.Workflows_Inventory.validateInventoryLevelsDelete/page.mdx @@ -22,16 +22,16 @@ const myWorkflow = createWorkflow( () => { const data = validateInventoryLevelsDelete({ "inventoryLevels": [{ - "id": "id_Ykyt1N8KRe9", + "id": "id_lyLr612NgbDqbvghPk", "inventory_item_id": "{value}", "location_id": "{value}", - "stocked_quantity": 34, - "reserved_quantity": 5, - "incoming_quantity": 35, - "available_quantity": 35, + "stocked_quantity": 43, + "reserved_quantity": 36, + "incoming_quantity": 0, + "available_quantity": 39, "metadata": {}, - "created_at": "2025-11-30T23:28:16.183Z", - "updated_at": "2025-05-26T03:23:26.285Z", + "created_at": "2025-04-28T10:07:37.395Z", + "updated_at": "2025-11-09T17:57:03.110Z", "deleted_at": {} }] }) diff --git a/www/apps/resources/references/core_flows/Invite/Steps_Invite/functions/core_flows.Invite.Steps_Invite.createInviteStep/page.mdx b/www/apps/resources/references/core_flows/Invite/Steps_Invite/functions/core_flows.Invite.Steps_Invite.createInviteStep/page.mdx index 6722c352bd..6f16294e80 100644 --- a/www/apps/resources/references/core_flows/Invite/Steps_Invite/functions/core_flows.Invite.Steps_Invite.createInviteStep/page.mdx +++ b/www/apps/resources/references/core_flows/Invite/Steps_Invite/functions/core_flows.Invite.Steps_Invite.createInviteStep/page.mdx @@ -22,7 +22,7 @@ const myWorkflow = createWorkflow( "my-workflow", () => { const data = createInviteStep([{ - "email": "Josiane.Jerde7@yahoo.com" + "email": "Shyanne.Sauer12@hotmail.com" }]) } ) diff --git a/www/apps/resources/references/core_flows/Invite/Workflows_Invite/functions/core_flows.Invite.Workflows_Invite.acceptInviteWorkflow/page.mdx b/www/apps/resources/references/core_flows/Invite/Workflows_Invite/functions/core_flows.Invite.Workflows_Invite.acceptInviteWorkflow/page.mdx index 7c7042929d..845bb39a5d 100644 --- a/www/apps/resources/references/core_flows/Invite/Workflows_Invite/functions/core_flows.Invite.Workflows_Invite.acceptInviteWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Invite/Workflows_Invite/functions/core_flows.Invite.Workflows_Invite.acceptInviteWorkflow/page.mdx @@ -18,29 +18,9 @@ This workflow accepts an invite and creates a user. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { acceptInviteWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = acceptInviteWorkflow - .runAsStep({ - input: { - "invite_token": "{value}", - "auth_identity_id": "{value}", - "user": {} - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -124,6 +104,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { acceptInviteWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = acceptInviteWorkflow + .runAsStep({ + input: { + "invite_token": "{value}", + "auth_identity_id": "{value}", + "user": {} + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Invite/Workflows_Invite/functions/core_flows.Invite.Workflows_Invite.createInvitesWorkflow/page.mdx b/www/apps/resources/references/core_flows/Invite/Workflows_Invite/functions/core_flows.Invite.Workflows_Invite.createInvitesWorkflow/page.mdx index 7c40729d3a..c57af167e7 100644 --- a/www/apps/resources/references/core_flows/Invite/Workflows_Invite/functions/core_flows.Invite.Workflows_Invite.createInvitesWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Invite/Workflows_Invite/functions/core_flows.Invite.Workflows_Invite.createInvitesWorkflow/page.mdx @@ -17,29 +17,9 @@ This workflow creates one or more invites. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createInvitesWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createInvitesWorkflow - .runAsStep({ - input: { - "invites": [{ - "email": "Bernhard.Waelchi65@gmail.com" - }] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -57,7 +37,7 @@ export async function POST( .run({ input: { "invites": [{ - "email": "Bernhard.Waelchi65@gmail.com" + "email": "Emanuel.Beahan@gmail.com" }] } }) @@ -84,7 +64,7 @@ export default async function handleOrderPlaced({ .run({ input: { "invites": [{ - "email": "Bernhard.Waelchi65@gmail.com" + "email": "Emanuel.Beahan@gmail.com" }] } }) @@ -111,7 +91,7 @@ export default async function myCustomJob( .run({ input: { "invites": [{ - "email": "Bernhard.Waelchi65@gmail.com" + "email": "Emanuel.Beahan@gmail.com" }] } }) @@ -123,6 +103,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createInvitesWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createInvitesWorkflow + .runAsStep({ + input: { + "invites": [{ + "email": "Emanuel.Beahan@gmail.com" + }] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Invite/Workflows_Invite/functions/core_flows.Invite.Workflows_Invite.deleteInvitesWorkflow/page.mdx b/www/apps/resources/references/core_flows/Invite/Workflows_Invite/functions/core_flows.Invite.Workflows_Invite.deleteInvitesWorkflow/page.mdx index 7e519b4762..bc8c75eb52 100644 --- a/www/apps/resources/references/core_flows/Invite/Workflows_Invite/functions/core_flows.Invite.Workflows_Invite.deleteInvitesWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Invite/Workflows_Invite/functions/core_flows.Invite.Workflows_Invite.deleteInvitesWorkflow/page.mdx @@ -17,29 +17,9 @@ This workflow deletes one or more invites. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { deleteInvitesWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = deleteInvitesWorkflow - .runAsStep({ - input: { - "ids": [ - "id_9HJz6U2SgJyYfZzEv" - ] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -57,7 +37,7 @@ export async function POST( .run({ input: { "ids": [ - "id_9HJz6U2SgJyYfZzEv" + "id_aEC6GRNvTBWOxfKj" ] } }) @@ -84,7 +64,7 @@ export default async function handleOrderPlaced({ .run({ input: { "ids": [ - "id_9HJz6U2SgJyYfZzEv" + "id_aEC6GRNvTBWOxfKj" ] } }) @@ -111,7 +91,7 @@ export default async function myCustomJob( .run({ input: { "ids": [ - "id_9HJz6U2SgJyYfZzEv" + "id_aEC6GRNvTBWOxfKj" ] } }) @@ -123,6 +103,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { deleteInvitesWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = deleteInvitesWorkflow + .runAsStep({ + input: { + "ids": [ + "id_aEC6GRNvTBWOxfKj" + ] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Invite/Workflows_Invite/functions/core_flows.Invite.Workflows_Invite.refreshInviteTokensWorkflow/page.mdx b/www/apps/resources/references/core_flows/Invite/Workflows_Invite/functions/core_flows.Invite.Workflows_Invite.refreshInviteTokensWorkflow/page.mdx index 8f576d7981..38388cbda3 100644 --- a/www/apps/resources/references/core_flows/Invite/Workflows_Invite/functions/core_flows.Invite.Workflows_Invite.refreshInviteTokensWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Invite/Workflows_Invite/functions/core_flows.Invite.Workflows_Invite.refreshInviteTokensWorkflow/page.mdx @@ -17,29 +17,9 @@ This workflow refreshes the token of one or more invites. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { refreshInviteTokensWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = refreshInviteTokensWorkflow - .runAsStep({ - input: { - "invite_ids": [ - "{value}" - ] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -123,6 +103,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { refreshInviteTokensWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = refreshInviteTokensWorkflow + .runAsStep({ + input: { + "invite_ids": [ + "{value}" + ] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Line_Item/Workflows_Line_Item/functions/core_flows.Line_Item.Workflows_Line_Item.deleteLineItemsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Line_Item/Workflows_Line_Item/functions/core_flows.Line_Item.Workflows_Line_Item.deleteLineItemsWorkflow/page.mdx index 5262ed569d..ad9895669c 100644 --- a/www/apps/resources/references/core_flows/Line_Item/Workflows_Line_Item/functions/core_flows.Line_Item.Workflows_Line_Item.deleteLineItemsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Line_Item/Workflows_Line_Item/functions/core_flows.Line_Item.Workflows_Line_Item.deleteLineItemsWorkflow/page.mdx @@ -16,30 +16,9 @@ This workflow deletes line items from a cart. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { deleteLineItemsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = deleteLineItemsWorkflow - .runAsStep({ - input: { - "cart_id": "{value}", - "ids": [ - "id_KAfASefWxqtGMdZ2sEJG" - ] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -58,7 +37,7 @@ export async function POST( input: { "cart_id": "{value}", "ids": [ - "id_KAfASefWxqtGMdZ2sEJG" + "id_gDNTwNY3kSbLvilH9Z2z" ] } }) @@ -86,7 +65,7 @@ export default async function handleOrderPlaced({ input: { "cart_id": "{value}", "ids": [ - "id_KAfASefWxqtGMdZ2sEJG" + "id_gDNTwNY3kSbLvilH9Z2z" ] } }) @@ -114,7 +93,7 @@ export default async function myCustomJob( input: { "cart_id": "{value}", "ids": [ - "id_KAfASefWxqtGMdZ2sEJG" + "id_gDNTwNY3kSbLvilH9Z2z" ] } }) @@ -126,6 +105,29 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { deleteLineItemsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = deleteLineItemsWorkflow + .runAsStep({ + input: { + "cart_id": "{value}", + "ids": [ + "id_gDNTwNY3kSbLvilH9Z2z" + ] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.addOrderTransactionStep/page.mdx b/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.addOrderTransactionStep/page.mdx index 2df996f92b..4bf706a31d 100644 --- a/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.addOrderTransactionStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.addOrderTransactionStep/page.mdx @@ -23,7 +23,7 @@ const myWorkflow = createWorkflow( () => { const data = addOrderTransactionStep({ "order_id": "{value}", - "amount": 19, + "amount": 28, "currency_code": "{value}" }) } diff --git a/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.cancelOrderChangeStep/page.mdx b/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.cancelOrderChangeStep/page.mdx index 205bfbe8dc..6530b2f469 100644 --- a/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.cancelOrderChangeStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.cancelOrderChangeStep/page.mdx @@ -22,7 +22,7 @@ const myWorkflow = createWorkflow( "my-workflow", () => { const data = cancelOrderChangeStep({ - "id": "id_L2vpGMeQyP71" + "id": "id_2WFBkLCxHI7Uu" }) } ) diff --git a/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.cancelOrderFulfillmentStep/page.mdx b/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.cancelOrderFulfillmentStep/page.mdx index 403adf597f..f1ca2490e3 100644 --- a/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.cancelOrderFulfillmentStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.cancelOrderFulfillmentStep/page.mdx @@ -24,8 +24,8 @@ const myWorkflow = createWorkflow( const data = cancelOrderFulfillmentStep({ "order_id": "{value}", "items": [{ - "id": "id_iw4NhMILCHM", - "quantity": 11 + "id": "id_GyTDdSqWuw", + "quantity": 46 }] }) } diff --git a/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.createOrderClaimItemsFromActionsStep/page.mdx b/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.createOrderClaimItemsFromActionsStep/page.mdx index e61137c10c..3a6b5ed1a9 100644 --- a/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.createOrderClaimItemsFromActionsStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.createOrderClaimItemsFromActionsStep/page.mdx @@ -23,7 +23,7 @@ const myWorkflow = createWorkflow( () => { const data = createOrderClaimItemsFromActionsStep({ "changes": [{ - "id": "id_DSzmhk4JlXIe3", + "id": "id_YYpor69jCNv6", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -33,11 +33,11 @@ const myWorkflow = createWorkflow( "order": {}, "reference": "{value}", "reference_id": "{value}", - "action": "SHIP_ITEM", + "action": "ITEM_ADD", "details": {}, "internal_note": {}, - "created_at": "2025-10-15T18:00:57.558Z", - "updated_at": "2025-06-22T05:05:51.118Z" + "created_at": "2025-12-21T14:09:34.054Z", + "updated_at": "2025-08-01T14:18:01.343Z" }], "claimId": "{value}" }) diff --git a/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.createOrderExchangeItemsFromActionsStep/page.mdx b/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.createOrderExchangeItemsFromActionsStep/page.mdx index 1b77964bcb..f023106e77 100644 --- a/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.createOrderExchangeItemsFromActionsStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.createOrderExchangeItemsFromActionsStep/page.mdx @@ -23,7 +23,7 @@ const myWorkflow = createWorkflow( () => { const data = createOrderExchangeItemsFromActionsStep({ "changes": [{ - "id": "id_v9WczE5Q6ZrAUfTtSDU1", + "id": "id_rw2an1gz9QXuB", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -33,11 +33,11 @@ const myWorkflow = createWorkflow( "order": {}, "reference": "{value}", "reference_id": "{value}", - "action": "FULFILL_ITEM", + "action": "SHIPPING_REMOVE", "details": {}, "internal_note": {}, - "created_at": "2025-11-09T02:38:23.006Z", - "updated_at": "2025-11-20T23:56:36.937Z" + "created_at": "2025-12-20T18:53:12.603Z", + "updated_at": "2025-10-09T11:40:59.289Z" }], "exchangeId": "{value}" }) diff --git a/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.createOrderLineItemsStep/page.mdx b/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.createOrderLineItemsStep/page.mdx index 630bf41036..4b2b0db45e 100644 --- a/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.createOrderLineItemsStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.createOrderLineItemsStep/page.mdx @@ -23,9 +23,9 @@ const myWorkflow = createWorkflow( () => { const data = createOrderLineItemsStep({ "items": [{ - "title": "cogo", - "quantity": 34, - "unit_price": 9 + "title": "spiculum", + "quantity": 6, + "unit_price": 5 }] }) } diff --git a/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.declineOrderChangeStep/page.mdx b/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.declineOrderChangeStep/page.mdx index 4d84fc0946..88473d0bc7 100644 --- a/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.declineOrderChangeStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.declineOrderChangeStep/page.mdx @@ -22,7 +22,7 @@ const myWorkflow = createWorkflow( "my-workflow", () => { const data = declineOrderChangeStep({ - "id": "id_FxwuCkmcPzOte" + "id": "id_J6Ra87wUt3" }) } ) diff --git a/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.deleteClaimsStep/page.mdx b/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.deleteClaimsStep/page.mdx index bf172820ca..84cd2d4d6c 100644 --- a/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.deleteClaimsStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.deleteClaimsStep/page.mdx @@ -23,7 +23,7 @@ const myWorkflow = createWorkflow( () => { const data = deleteClaimsStep({ "ids": [ - "id_c7UJmyJekiPzUQ0IDg" + "id_dZ9xrnNTgTzj" ] }) } diff --git a/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.deleteExchangesStep/page.mdx b/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.deleteExchangesStep/page.mdx index 314308cf88..a9382a9898 100644 --- a/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.deleteExchangesStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.deleteExchangesStep/page.mdx @@ -23,7 +23,7 @@ const myWorkflow = createWorkflow( () => { const data = deleteExchangesStep({ "ids": [ - "id_SBlh9riuOHT" + "id_X8yrGK9Ks1KZ" ] }) } diff --git a/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.deleteOrderChangeActionsStep/page.mdx b/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.deleteOrderChangeActionsStep/page.mdx index 63900bde17..f9751d141a 100644 --- a/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.deleteOrderChangeActionsStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.deleteOrderChangeActionsStep/page.mdx @@ -23,7 +23,7 @@ const myWorkflow = createWorkflow( () => { const data = deleteOrderChangeActionsStep({ "ids": [ - "id_EB2Mck9CxNkUw" + "id_JRT2lf3r2emupY111Yp" ] }) } diff --git a/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.deleteOrderChangesStep/page.mdx b/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.deleteOrderChangesStep/page.mdx index d781936166..3fbdaaca52 100644 --- a/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.deleteOrderChangesStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.deleteOrderChangesStep/page.mdx @@ -23,7 +23,7 @@ const myWorkflow = createWorkflow( () => { const data = deleteOrderChangesStep({ "ids": [ - "id_6AlSdTl5Q4bqWNQRDP" + "id_mLdt6hBMzBYGswCc" ] }) } diff --git a/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.deleteOrderLineItems/page.mdx b/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.deleteOrderLineItems/page.mdx index d959c189b0..42fcecbfa9 100644 --- a/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.deleteOrderLineItems/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.deleteOrderLineItems/page.mdx @@ -20,7 +20,7 @@ const myWorkflow = createWorkflow( () => { const data = deleteOrderLineItems({ "ids": [ - "id_9yDNL2QsGg" + "id_sGjCX6hR4v2S" ] }) } diff --git a/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.deleteOrderShippingMethods/page.mdx b/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.deleteOrderShippingMethods/page.mdx index ab51121c0b..f423214186 100644 --- a/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.deleteOrderShippingMethods/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.deleteOrderShippingMethods/page.mdx @@ -23,7 +23,7 @@ const myWorkflow = createWorkflow( () => { const data = deleteOrderShippingMethods({ "ids": [ - "id_YiCnu0XnONf7K" + "id_hJqLku2a8lx" ] }) } diff --git a/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.deleteReturnsStep/page.mdx b/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.deleteReturnsStep/page.mdx index 9a91cc1efb..fec2c89868 100644 --- a/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.deleteReturnsStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.deleteReturnsStep/page.mdx @@ -23,7 +23,7 @@ const myWorkflow = createWorkflow( () => { const data = deleteReturnsStep({ "ids": [ - "id_OjzfAGbtDr6xrua" + "id_uu9hQyG7wk5Bg" ] }) } diff --git a/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.registerOrderFulfillmentStep/page.mdx b/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.registerOrderFulfillmentStep/page.mdx index 8cc82bdc6c..972336a6ec 100644 --- a/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.registerOrderFulfillmentStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.registerOrderFulfillmentStep/page.mdx @@ -24,8 +24,8 @@ const myWorkflow = createWorkflow( const data = registerOrderFulfillmentStep({ "order_id": "{value}", "items": [{ - "id": "id_EuhalJL2rhE6GvQMWa", - "quantity": 3 + "id": "id_Md6KtOyA3XTSe7", + "quantity": 7 }] }) } diff --git a/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.setOrderTaxLinesForItemsStep/page.mdx b/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.setOrderTaxLinesForItemsStep/page.mdx index 57f3f56d20..0cea126dc6 100644 --- a/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.setOrderTaxLinesForItemsStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.setOrderTaxLinesForItemsStep/page.mdx @@ -23,94 +23,94 @@ const myWorkflow = createWorkflow( () => { const data = setOrderTaxLinesForItemsStep({ "order": { - "id": "id_aQLdDjEZNJmjY", - "version": 50, - "display_id": 3, - "status": "draft", + "id": "id_bYyiirivFeAt5PRrBLi", + "version": 5, + "display_id": 25, + "status": "canceled", "currency_code": "{value}", - "created_at": "2025-08-12T00:14:34.265Z", - "updated_at": "2025-03-12T17:18:47.561Z", + "created_at": "2025-12-31T15:01:37.602Z", + "updated_at": "2025-10-02T06:21:52.403Z", "original_item_total": { - "numeric": 42 - }, - "original_item_subtotal": { - "numeric": 28 - }, - "original_item_tax_total": { - "numeric": 16 - }, - "item_total": { - "numeric": 23 - }, - "item_subtotal": { - "numeric": 39 - }, - "item_tax_total": { - "numeric": 15 - }, - "original_total": { - "numeric": 48 - }, - "original_subtotal": { - "numeric": 45 - }, - "original_tax_total": { - "numeric": 10 - }, - "total": { - "numeric": 49 - }, - "subtotal": { - "numeric": 36 - }, - "tax_total": { - "numeric": 1 - }, - "discount_subtotal": { - "numeric": 48 - }, - "discount_total": { - "numeric": 22 - }, - "discount_tax_total": { - "numeric": 33 - }, - "gift_card_total": { - "numeric": 24 - }, - "gift_card_tax_total": { - "numeric": 13 - }, - "shipping_total": { - "numeric": 45 - }, - "shipping_subtotal": { - "numeric": 2 - }, - "shipping_tax_total": { "numeric": 3 }, - "original_shipping_total": { - "numeric": 15 + "original_item_subtotal": { + "numeric": 40 }, - "original_shipping_subtotal": { + "original_item_tax_total": { + "numeric": 25 + }, + "item_total": { + "numeric": 16 + }, + "item_subtotal": { + "numeric": 40 + }, + "item_tax_total": { + "numeric": 48 + }, + "original_total": { + "numeric": 25 + }, + "original_subtotal": { + "numeric": 46 + }, + "original_tax_total": { + "numeric": 42 + }, + "total": { + "numeric": 9 + }, + "subtotal": { + "numeric": 21 + }, + "tax_total": { + "numeric": 7 + }, + "discount_subtotal": { "numeric": 22 }, + "discount_total": { + "numeric": 48 + }, + "discount_tax_total": { + "numeric": 49 + }, + "gift_card_total": { + "numeric": 18 + }, + "gift_card_tax_total": { + "numeric": 42 + }, + "shipping_total": { + "numeric": 1 + }, + "shipping_subtotal": { + "numeric": 33 + }, + "shipping_tax_total": { + "numeric": 34 + }, + "original_shipping_total": { + "numeric": 39 + }, + "original_shipping_subtotal": { + "numeric": 44 + }, "original_shipping_tax_total": { - "numeric": 41 + "numeric": 24 } }, "item_tax_lines": [{ - "rate": 2, + "rate": 21, "code": {}, - "name": "Marty", + "name": "Nikko", "provider_id": "{value}", "line_item_id": "{value}" }], "shipping_tax_lines": [{ - "rate": 10, + "rate": 14, "code": {}, - "name": "Hazel", + "name": "Gideon", "provider_id": "{value}", "shipping_line_id": "{value}" }] diff --git a/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.updateOrderChangeActionsStep/page.mdx b/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.updateOrderChangeActionsStep/page.mdx index d712afe9c0..3cf78487ab 100644 --- a/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.updateOrderChangeActionsStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.updateOrderChangeActionsStep/page.mdx @@ -22,7 +22,7 @@ const myWorkflow = createWorkflow( "my-workflow", () => { const data = updateOrderChangeActionsStep([{ - "id": "id_6R02OJIzq00tipn" + "id": "id_CGmiD6PVMH7" }]) } ) diff --git a/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.updateOrderChangesStep/page.mdx b/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.updateOrderChangesStep/page.mdx index 91db64edcc..275afb4229 100644 --- a/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.updateOrderChangesStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.updateOrderChangesStep/page.mdx @@ -22,7 +22,7 @@ const myWorkflow = createWorkflow( "my-workflow", () => { const data = updateOrderChangesStep([{ - "id": "id_NaNow129rXscjPG" + "id": "id_2XmkZXIAVeAJ" }]) } ) diff --git a/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.updateOrderExchangesStep/page.mdx b/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.updateOrderExchangesStep/page.mdx index 580b0794cf..228fc3511a 100644 --- a/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.updateOrderExchangesStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.updateOrderExchangesStep/page.mdx @@ -22,7 +22,7 @@ const myWorkflow = createWorkflow( "my-workflow", () => { const data = updateOrderExchangesStep([{ - "id": "id_8iE1KYXM1B" + "id": "id_KxElBZJlbUPyOt0uw" }]) } ) diff --git a/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.updateOrderShippingMethodsStep/page.mdx b/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.updateOrderShippingMethodsStep/page.mdx index 2ee20a1744..3347960291 100644 --- a/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.updateOrderShippingMethodsStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.updateOrderShippingMethodsStep/page.mdx @@ -22,7 +22,7 @@ const myWorkflow = createWorkflow( "my-workflow", () => { const data = updateOrderShippingMethodsStep([{ - "id": "id_sUTlocY0hzk92STH" + "id": "id_tBC8aFUJTjcJR8D22a" }]) } ) diff --git a/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.updateReturnItemsStep/page.mdx b/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.updateReturnItemsStep/page.mdx index 30d0397887..faa55ac325 100644 --- a/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.updateReturnItemsStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.updateReturnItemsStep/page.mdx @@ -21,7 +21,7 @@ const myWorkflow = createWorkflow( "my-workflow", () => { const data = updateReturnItemsStep([{ - "id": "id_guJxqFVlZk" + "id": "id_HlXEtcIsd82n" }]) } ) diff --git a/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.updateReturnsStep/page.mdx b/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.updateReturnsStep/page.mdx index 80d9fc3655..5517693f66 100644 --- a/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.updateReturnsStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Steps_Order/functions/core_flows.Order.Steps_Order.updateReturnsStep/page.mdx @@ -21,7 +21,7 @@ const myWorkflow = createWorkflow( "my-workflow", () => { const data = updateReturnsStep([{ - "id": "id_eZbttpTnySn9" + "id": "id_Ri0NCOXe277IpkEMJ" }]) } ) diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.acceptOrderTransferValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.acceptOrderTransferValidationStep/page.mdx index 38bb428b4f..72d4d68a04 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.acceptOrderTransferValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.acceptOrderTransferValidationStep/page.mdx @@ -23,198 +23,198 @@ const myWorkflow = createWorkflow( const data = acceptOrderTransferValidationStep({ "token": "{value}", "order": { - "id": "id_Dm6MF1JmTcnjA", - "version": 33, - "display_id": 31, - "status": "requires_action", + "id": "id_Wn8HjS3Ay1Tb5ytt", + "version": 48, + "display_id": 21, + "status": "pending", "currency_code": "{value}", - "created_at": "2025-12-09T19:18:32.990Z", - "updated_at": "2025-05-09T12:20:59.051Z", + "created_at": "2025-03-28T18:26:14.439Z", + "updated_at": "2025-05-10T21:15:28.884Z", "original_item_total": { - "numeric": 25 + "numeric": 21 }, "original_item_subtotal": { - "numeric": 49 + "numeric": 44 }, "original_item_tax_total": { - "numeric": 0 + "numeric": 32 }, "item_total": { - "numeric": 46 - }, - "item_subtotal": { - "numeric": 1 - }, - "item_tax_total": { "numeric": 36 }, + "item_subtotal": { + "numeric": 35 + }, + "item_tax_total": { + "numeric": 13 + }, "original_total": { - "numeric": 42 + "numeric": 33 }, "original_subtotal": { - "numeric": 50 + "numeric": 5 }, "original_tax_total": { - "numeric": 20 + "numeric": 35 }, "total": { - "numeric": 7 + "numeric": 0 }, "subtotal": { - "numeric": 46 + "numeric": 20 }, "tax_total": { - "numeric": 17 + "numeric": 35 }, "discount_subtotal": { - "numeric": 6 + "numeric": 35 }, "discount_total": { - "numeric": 33 - }, - "discount_tax_total": { - "numeric": 33 - }, - "gift_card_total": { "numeric": 16 }, + "discount_tax_total": { + "numeric": 39 + }, + "gift_card_total": { + "numeric": 23 + }, "gift_card_tax_total": { - "numeric": 7 + "numeric": 8 }, "shipping_total": { - "numeric": 47 + "numeric": 48 }, "shipping_subtotal": { - "numeric": 38 + "numeric": 3 }, "shipping_tax_total": { - "numeric": 42 + "numeric": 27 }, "original_shipping_total": { - "numeric": 50 + "numeric": 45 }, "original_shipping_subtotal": { - "numeric": 10 + "numeric": 31 }, "original_shipping_tax_total": { - "numeric": 13 + "numeric": 20 } }, "orderChange": { - "id": "id_Bm44LHJd2L3zPx6aps", - "version": 34, + "id": "id_wV5Fn8pofpIk3vg4yNfe", + "version": 12, "order_id": "{value}", "return_id": "{value}", "exchange_id": "{value}", "claim_id": "{value}", "order": { - "id": "id_FHPUIZcWrxAZGp", - "version": 24, - "display_id": 34, - "status": "completed", + "id": "id_ApPvX1URIDMEFxul0g1", + "version": 27, + "display_id": 32, + "status": "canceled", "currency_code": "{value}", - "created_at": "2025-04-11T23:50:07.541Z", - "updated_at": "2025-10-03T04:48:11.093Z", + "created_at": "2025-12-30T22:01:26.149Z", + "updated_at": "2025-12-13T20:20:22.023Z", "original_item_total": { - "numeric": 20 + "numeric": 31 }, "original_item_subtotal": { - "numeric": 28 + "numeric": 6 }, "original_item_tax_total": { - "numeric": 39 + "numeric": 13 }, "item_total": { - "numeric": 4 + "numeric": 46 }, "item_subtotal": { - "numeric": 45 - }, - "item_tax_total": { - "numeric": 4 - }, - "original_total": { - "numeric": 5 - }, - "original_subtotal": { - "numeric": 28 - }, - "original_tax_total": { - "numeric": 12 - }, - "total": { - "numeric": 2 - }, - "subtotal": { - "numeric": 41 - }, - "tax_total": { - "numeric": 30 - }, - "discount_subtotal": { - "numeric": 10 - }, - "discount_total": { - "numeric": 36 - }, - "discount_tax_total": { - "numeric": 11 - }, - "gift_card_total": { - "numeric": 9 - }, - "gift_card_tax_total": { - "numeric": 16 - }, - "shipping_total": { - "numeric": 2 - }, - "shipping_subtotal": { - "numeric": 34 - }, - "shipping_tax_total": { - "numeric": 18 - }, - "original_shipping_total": { - "numeric": 2 - }, - "original_shipping_subtotal": { "numeric": 29 }, + "item_tax_total": { + "numeric": 42 + }, + "original_total": { + "numeric": 9 + }, + "original_subtotal": { + "numeric": 43 + }, + "original_tax_total": { + "numeric": 23 + }, + "total": { + "numeric": 48 + }, + "subtotal": { + "numeric": 26 + }, + "tax_total": { + "numeric": 31 + }, + "discount_subtotal": { + "numeric": 41 + }, + "discount_total": { + "numeric": 39 + }, + "discount_tax_total": { + "numeric": 28 + }, + "gift_card_total": { + "numeric": 24 + }, + "gift_card_tax_total": { + "numeric": 4 + }, + "shipping_total": { + "numeric": 34 + }, + "shipping_subtotal": { + "numeric": 21 + }, + "shipping_tax_total": { + "numeric": 6 + }, + "original_shipping_total": { + "numeric": 45 + }, + "original_shipping_subtotal": { + "numeric": 28 + }, "original_shipping_tax_total": { - "numeric": 20 + "numeric": 9 } }, "return_order": { - "id": "id_VnT74LTkHFXzuEaQ5", - "status": "partially_received", + "id": "id_VCLK51USlfe9h", + "status": "canceled", "order_id": "{value}", "items": [{ - "id": "id_QwPubSBTrBBFHqoQuhEG", + "id": "id_kLtdbyILrhwwN2I", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 50 + "quantity": 14 }], - "display_id": 29, + "display_id": 27, "metadata": {} }, "exchange": { - "id": "id_VIyNoG9pP7", + "id": "id_ovkEdUO9FiBflg", "order_id": "{value}", - "order_version": 21, - "display_id": 44, + "order_version": 22, + "display_id": 35, "additional_items": [ "{value}" ], "metadata": {} }, "claim": { - "id": "id_bmGZsi3woFpmO", + "id": "id_sc6MQe6htHfv7vKYD", "type": "refund", "order_id": "{value}", - "order_version": 18, - "display_id": 42, + "order_version": 29, + "display_id": 21, "claim_items": [ "{value}" ], @@ -224,7 +224,7 @@ const myWorkflow = createWorkflow( "metadata": {} }, "actions": [{ - "id": "id_7hxoVnvdBwkYveMMQc", + "id": "id_sDdEtvbqyDnxmkglfF", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -234,13 +234,13 @@ const myWorkflow = createWorkflow( "order": {}, "reference": "{value}", "reference_id": "{value}", - "action": "SHIPPING_ADD", + "action": "SHIPPING_REMOVE", "details": {}, "internal_note": {}, - "created_at": "2025-12-05T07:20:38.728Z", - "updated_at": "2025-01-17T14:45:46.519Z" + "created_at": "2025-03-17T22:25:24.205Z", + "updated_at": "2025-06-27T00:57:15.197Z" }], - "status": "pending", + "status": "canceled", "requested_by": {}, "requested_at": {}, "confirmed_by": {}, @@ -251,8 +251,8 @@ const myWorkflow = createWorkflow( "declined_at": {}, "canceled_by": {}, "canceled_at": {}, - "created_at": "2025-04-08T22:10:24.566Z", - "updated_at": "2025-09-05T03:03:12.480Z" + "created_at": "2025-10-23T04:45:01.908Z", + "updated_at": "2025-10-18T04:33:09.975Z" } }) } diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.acceptOrderTransferWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.acceptOrderTransferWorkflow/page.mdx index b76af92b31..f104aba247 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.acceptOrderTransferWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.acceptOrderTransferWorkflow/page.mdx @@ -17,28 +17,9 @@ This workflow accepts an order transfer. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { acceptOrderTransferWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = acceptOrderTransferWorkflow - .runAsStep({ - input: { - "order_id": "{value}", - "token": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -119,6 +100,27 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { acceptOrderTransferWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = acceptOrderTransferWorkflow + .runAsStep({ + input: { + "order_id": "{value}", + "token": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.addOrderLineItemsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.addOrderLineItemsWorkflow/page.mdx index 42428381fa..71758ee5aa 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.addOrderLineItemsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.addOrderLineItemsWorkflow/page.mdx @@ -22,31 +22,9 @@ This workflow adds line items to an order. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { addOrderLineItemsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = addOrderLineItemsWorkflow - .runAsStep({ - input: { - "order_id": "{value}", - "items": [{ - "variant_id": "{value}", - "quantity": 39 - }] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -66,7 +44,7 @@ export async function POST( "order_id": "{value}", "items": [{ "variant_id": "{value}", - "quantity": 39 + "quantity": 2 }] } }) @@ -95,7 +73,7 @@ export default async function handleOrderPlaced({ "order_id": "{value}", "items": [{ "variant_id": "{value}", - "quantity": 39 + "quantity": 2 }] } }) @@ -124,7 +102,7 @@ export default async function myCustomJob( "order_id": "{value}", "items": [{ "variant_id": "{value}", - "quantity": 39 + "quantity": 2 }] } }) @@ -136,6 +114,30 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { addOrderLineItemsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = addOrderLineItemsWorkflow + .runAsStep({ + input: { + "order_id": "{value}", + "items": [{ + "variant_id": "{value}", + "quantity": 2 + }] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.archiveOrderWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.archiveOrderWorkflow/page.mdx index 5d1461c83d..88f707742e 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.archiveOrderWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.archiveOrderWorkflow/page.mdx @@ -17,29 +17,9 @@ This workflow archives an order. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { archiveOrderWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = archiveOrderWorkflow - .runAsStep({ - input: { - "orderIds": [ - "{value}" - ] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -123,6 +103,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { archiveOrderWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = archiveOrderWorkflow + .runAsStep({ + input: { + "orderIds": [ + "{value}" + ] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.beginClaimOrderValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.beginClaimOrderValidationStep/page.mdx index dec6964a96..ded3889c50 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.beginClaimOrderValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.beginClaimOrderValidationStep/page.mdx @@ -22,81 +22,81 @@ const myWorkflow = createWorkflow( () => { const data = beginClaimOrderValidationStep({ "order": { - "id": "id_P5yIwi2RF1uLm8I", - "version": 15, - "display_id": 37, + "id": "id_nAdX4Ogh2TCORx", + "version": 13, + "display_id": 31, "status": "requires_action", "currency_code": "{value}", - "created_at": "2025-11-25T13:22:25.907Z", - "updated_at": "2025-09-26T03:06:46.629Z", + "created_at": "2025-06-11T15:12:07.482Z", + "updated_at": "2025-08-04T09:03:01.152Z", "original_item_total": { - "numeric": 42 + "numeric": 49 }, "original_item_subtotal": { - "numeric": 48 + "numeric": 33 }, "original_item_tax_total": { - "numeric": 23 + "numeric": 2 }, "item_total": { - "numeric": 9 - }, - "item_subtotal": { - "numeric": 1 - }, - "item_tax_total": { - "numeric": 43 - }, - "original_total": { "numeric": 40 }, + "item_subtotal": { + "numeric": 35 + }, + "item_tax_total": { + "numeric": 35 + }, + "original_total": { + "numeric": 26 + }, "original_subtotal": { - "numeric": 47 + "numeric": 32 }, "original_tax_total": { - "numeric": 11 + "numeric": 38 }, "total": { - "numeric": 7 + "numeric": 2 }, "subtotal": { - "numeric": 9 + "numeric": 47 }, "tax_total": { - "numeric": 36 + "numeric": 18 }, "discount_subtotal": { - "numeric": 3 + "numeric": 47 }, "discount_total": { - "numeric": 9 + "numeric": 47 }, "discount_tax_total": { - "numeric": 6 + "numeric": 2 }, "gift_card_total": { - "numeric": 21 + "numeric": 43 }, "gift_card_tax_total": { - "numeric": 7 + "numeric": 29 }, "shipping_total": { - "numeric": 12 + "numeric": 5 }, "shipping_subtotal": { - "numeric": 44 - }, - "shipping_tax_total": { - "numeric": 4 - }, - "original_shipping_total": { "numeric": 20 }, + "shipping_tax_total": { + "numeric": 9 + }, + "original_shipping_total": { + "numeric": 7 + }, "original_shipping_subtotal": { - "numeric": 24 + "numeric": 16 }, "original_shipping_tax_total": { - "numeric": 13 + "numeric": 16 } } }) diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.beginClaimOrderWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.beginClaimOrderWorkflow/page.mdx index 6a2d25575a..abb6dfcd6e 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.beginClaimOrderWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.beginClaimOrderWorkflow/page.mdx @@ -17,28 +17,9 @@ This workflow creates an order claim in requested state. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { beginClaimOrderWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = beginClaimOrderWorkflow - .runAsStep({ - input: { - "type": "replace", - "order_id": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -55,7 +36,7 @@ export async function POST( const { result } = await beginClaimOrderWorkflow(req.scope) .run({ input: { - "type": "replace", + "type": "refund", "order_id": "{value}" } }) @@ -81,7 +62,7 @@ export default async function handleOrderPlaced({ const { result } = await beginClaimOrderWorkflow(container) .run({ input: { - "type": "replace", + "type": "refund", "order_id": "{value}" } }) @@ -107,7 +88,7 @@ export default async function myCustomJob( const { result } = await beginClaimOrderWorkflow(container) .run({ input: { - "type": "replace", + "type": "refund", "order_id": "{value}" } }) @@ -119,6 +100,27 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { beginClaimOrderWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = beginClaimOrderWorkflow + .runAsStep({ + input: { + "type": "refund", + "order_id": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.beginExchangeOrderWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.beginExchangeOrderWorkflow/page.mdx index 4cf51637af..9d72a2af02 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.beginExchangeOrderWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.beginExchangeOrderWorkflow/page.mdx @@ -17,27 +17,9 @@ This workflow requests an order exchange. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { beginExchangeOrderWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = beginExchangeOrderWorkflow - .runAsStep({ - input: { - "order_id": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -115,6 +97,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { beginExchangeOrderWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = beginExchangeOrderWorkflow + .runAsStep({ + input: { + "order_id": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.beginOrderEditOrderWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.beginOrderEditOrderWorkflow/page.mdx index 8204a9cb5a..efca522b60 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.beginOrderEditOrderWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.beginOrderEditOrderWorkflow/page.mdx @@ -17,27 +17,9 @@ This workflow requests an order order-edit. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { beginOrderEditOrderWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = beginOrderEditOrderWorkflow - .runAsStep({ - input: { - "order_id": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -115,6 +97,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { beginOrderEditOrderWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = beginOrderEditOrderWorkflow + .runAsStep({ + input: { + "order_id": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.beginOrderEditValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.beginOrderEditValidationStep/page.mdx index 1bbf84591a..f6378c63fd 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.beginOrderEditValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.beginOrderEditValidationStep/page.mdx @@ -22,81 +22,81 @@ const myWorkflow = createWorkflow( () => { const data = beginOrderEditValidationStep({ "order": { - "id": "id_iese8IdjhLTCoXdpzb0", - "version": 40, - "display_id": 17, - "status": "completed", + "id": "id_ck5EdOKushb", + "version": 36, + "display_id": 50, + "status": "canceled", "currency_code": "{value}", - "created_at": "2025-06-25T02:36:42.287Z", - "updated_at": "2025-03-11T10:15:29.329Z", + "created_at": "2025-02-05T18:59:42.859Z", + "updated_at": "2025-07-03T17:55:48.038Z", "original_item_total": { - "numeric": 28 + "numeric": 9 }, "original_item_subtotal": { - "numeric": 0 + "numeric": 27 }, "original_item_tax_total": { - "numeric": 18 + "numeric": 48 }, "item_total": { - "numeric": 2 + "numeric": 22 }, "item_subtotal": { - "numeric": 4 + "numeric": 9 }, "item_tax_total": { - "numeric": 38 + "numeric": 33 }, "original_total": { - "numeric": 42 + "numeric": 28 }, "original_subtotal": { - "numeric": 21 + "numeric": 14 }, "original_tax_total": { - "numeric": 44 - }, - "total": { "numeric": 37 }, - "subtotal": { - "numeric": 32 - }, - "tax_total": { - "numeric": 19 - }, - "discount_subtotal": { - "numeric": 17 - }, - "discount_total": { - "numeric": 47 - }, - "discount_tax_total": { - "numeric": 2 - }, - "gift_card_total": { - "numeric": 35 - }, - "gift_card_tax_total": { - "numeric": 26 - }, - "shipping_total": { - "numeric": 46 - }, - "shipping_subtotal": { - "numeric": 30 - }, - "shipping_tax_total": { - "numeric": 17 - }, - "original_shipping_total": { + "total": { "numeric": 11 }, + "subtotal": { + "numeric": 13 + }, + "tax_total": { + "numeric": 39 + }, + "discount_subtotal": { + "numeric": 37 + }, + "discount_total": { + "numeric": 39 + }, + "discount_tax_total": { + "numeric": 19 + }, + "gift_card_total": { + "numeric": 45 + }, + "gift_card_tax_total": { + "numeric": 6 + }, + "shipping_total": { + "numeric": 10 + }, + "shipping_subtotal": { + "numeric": 20 + }, + "shipping_tax_total": { + "numeric": 25 + }, + "original_shipping_total": { + "numeric": 46 + }, "original_shipping_subtotal": { - "numeric": 30 + "numeric": 36 }, "original_shipping_tax_total": { - "numeric": 15 + "numeric": 10 } } }) diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.beginOrderExchangeValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.beginOrderExchangeValidationStep/page.mdx index 67889ba613..00069c5081 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.beginOrderExchangeValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.beginOrderExchangeValidationStep/page.mdx @@ -22,81 +22,81 @@ const myWorkflow = createWorkflow( () => { const data = beginOrderExchangeValidationStep({ "order": { - "id": "id_xiw5GeyYiW3RGwkV", - "version": 45, - "display_id": 49, - "status": "canceled", + "id": "id_SWho4GSCL6t18rgaff", + "version": 6, + "display_id": 44, + "status": "requires_action", "currency_code": "{value}", - "created_at": "2025-08-08T04:37:38.200Z", - "updated_at": "2025-02-21T13:46:18.808Z", + "created_at": "2025-04-20T07:23:39.880Z", + "updated_at": "2025-12-09T16:41:31.006Z", "original_item_total": { - "numeric": 31 + "numeric": 39 }, "original_item_subtotal": { - "numeric": 22 - }, - "original_item_tax_total": { - "numeric": 10 - }, - "item_total": { - "numeric": 3 - }, - "item_subtotal": { - "numeric": 5 - }, - "item_tax_total": { "numeric": 30 }, + "original_item_tax_total": { + "numeric": 34 + }, + "item_total": { + "numeric": 29 + }, + "item_subtotal": { + "numeric": 18 + }, + "item_tax_total": { + "numeric": 7 + }, "original_total": { - "numeric": 41 + "numeric": 14 }, "original_subtotal": { - "numeric": 49 + "numeric": 34 }, "original_tax_total": { "numeric": 0 }, "total": { - "numeric": 25 - }, - "subtotal": { "numeric": 8 }, - "tax_total": { - "numeric": 19 - }, - "discount_subtotal": { + "subtotal": { "numeric": 14 }, - "discount_total": { - "numeric": 11 + "tax_total": { + "numeric": 41 }, - "discount_tax_total": { + "discount_subtotal": { "numeric": 22 }, - "gift_card_total": { - "numeric": 16 + "discount_total": { + "numeric": 49 }, - "gift_card_tax_total": { - "numeric": 48 - }, - "shipping_total": { - "numeric": 2 - }, - "shipping_subtotal": { + "discount_tax_total": { "numeric": 42 }, - "shipping_tax_total": { - "numeric": 29 + "gift_card_total": { + "numeric": 0 }, - "original_shipping_total": { - "numeric": 28 - }, - "original_shipping_subtotal": { + "gift_card_tax_total": { "numeric": 3 }, + "shipping_total": { + "numeric": 12 + }, + "shipping_subtotal": { + "numeric": 7 + }, + "shipping_tax_total": { + "numeric": 41 + }, + "original_shipping_total": { + "numeric": 41 + }, + "original_shipping_subtotal": { + "numeric": 31 + }, "original_shipping_tax_total": { - "numeric": 43 + "numeric": 24 } } }) diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.beginReceiveReturnValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.beginReceiveReturnValidationStep/page.mdx index f0fd41c68b..7d3ce829eb 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.beginReceiveReturnValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.beginReceiveReturnValidationStep/page.mdx @@ -22,95 +22,95 @@ const myWorkflow = createWorkflow( () => { const data = beginReceiveReturnValidationStep({ "orderReturn": { - "id": "id_2bKYLs8EEAB7", - "status": "partially_received", + "id": "id_FRWMOFBxqFixLQBq", + "status": "requested", "order_id": "{value}", "items": [{ - "id": "id_zmUsnT3XyHW5s", + "id": "id_8PWQLGjzO9ESX", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 6 + "quantity": 1 }], - "display_id": 18, + "display_id": 47, "metadata": {} }, "order": { - "id": "id_irLcgwCT9Jbcf", - "version": 10, - "display_id": 31, + "id": "id_2yQaDL1uc3ChqMw", + "version": 23, + "display_id": 46, "status": "canceled", "currency_code": "{value}", - "created_at": "2025-10-07T18:31:47.817Z", - "updated_at": "2025-08-11T16:16:52.732Z", + "created_at": "2025-08-05T17:32:24.542Z", + "updated_at": "2025-10-07T19:49:05.990Z", "original_item_total": { - "numeric": 48 + "numeric": 0 }, "original_item_subtotal": { - "numeric": 34 + "numeric": 6 }, "original_item_tax_total": { - "numeric": 20 + "numeric": 33 }, "item_total": { - "numeric": 45 + "numeric": 19 }, "item_subtotal": { - "numeric": 0 + "numeric": 17 }, "item_tax_total": { - "numeric": 20 + "numeric": 15 }, "original_total": { - "numeric": 27 + "numeric": 34 }, "original_subtotal": { - "numeric": 23 + "numeric": 22 }, "original_tax_total": { - "numeric": 0 + "numeric": 36 }, "total": { - "numeric": 18 + "numeric": 23 }, "subtotal": { - "numeric": 3 + "numeric": 12 }, "tax_total": { - "numeric": 49 + "numeric": 46 }, "discount_subtotal": { - "numeric": 28 + "numeric": 24 }, "discount_total": { - "numeric": 15 + "numeric": 14 }, "discount_tax_total": { - "numeric": 45 + "numeric": 46 }, "gift_card_total": { - "numeric": 29 + "numeric": 50 }, "gift_card_tax_total": { - "numeric": 31 + "numeric": 11 }, "shipping_total": { - "numeric": 45 + "numeric": 19 }, "shipping_subtotal": { - "numeric": 39 + "numeric": 42 }, "shipping_tax_total": { - "numeric": 5 + "numeric": 4 }, "original_shipping_total": { - "numeric": 3 + "numeric": 13 }, "original_shipping_subtotal": { - "numeric": 25 + "numeric": 39 }, "original_shipping_tax_total": { - "numeric": 15 + "numeric": 26 } } }) diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.beginReceiveReturnWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.beginReceiveReturnWorkflow/page.mdx index 9795953b1e..b2724a69d7 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.beginReceiveReturnWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.beginReceiveReturnWorkflow/page.mdx @@ -17,27 +17,9 @@ This workflow requests return receival. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { beginReceiveReturnWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = beginReceiveReturnWorkflow - .runAsStep({ - input: { - "return_id": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -115,6 +97,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { beginReceiveReturnWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = beginReceiveReturnWorkflow + .runAsStep({ + input: { + "return_id": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.beginReturnOrderValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.beginReturnOrderValidationStep/page.mdx index 4764a2f1d5..b6bd69ac96 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.beginReturnOrderValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.beginReturnOrderValidationStep/page.mdx @@ -22,81 +22,81 @@ const myWorkflow = createWorkflow( () => { const data = beginReturnOrderValidationStep({ "order": { - "id": "id_BpizkN8BKJlcVd6", - "version": 50, - "display_id": 7, - "status": "pending", + "id": "id_i64SGSJfow9mhBVrD", + "version": 45, + "display_id": 34, + "status": "requires_action", "currency_code": "{value}", - "created_at": "2025-04-17T07:08:16.976Z", - "updated_at": "2025-11-08T09:34:54.667Z", + "created_at": "2025-12-26T19:18:38.559Z", + "updated_at": "2025-02-17T20:59:46.807Z", "original_item_total": { - "numeric": 46 - }, - "original_item_subtotal": { - "numeric": 25 - }, - "original_item_tax_total": { - "numeric": 9 - }, - "item_total": { - "numeric": 7 - }, - "item_subtotal": { - "numeric": 21 - }, - "item_tax_total": { - "numeric": 29 - }, - "original_total": { - "numeric": 34 - }, - "original_subtotal": { - "numeric": 0 - }, - "original_tax_total": { - "numeric": 25 - }, - "total": { - "numeric": 4 - }, - "subtotal": { - "numeric": 8 - }, - "tax_total": { - "numeric": 37 - }, - "discount_subtotal": { - "numeric": 37 - }, - "discount_total": { - "numeric": 1 - }, - "discount_tax_total": { - "numeric": 46 - }, - "gift_card_total": { - "numeric": 25 - }, - "gift_card_tax_total": { - "numeric": 30 - }, - "shipping_total": { - "numeric": 44 - }, - "shipping_subtotal": { - "numeric": 43 - }, - "shipping_tax_total": { - "numeric": 44 - }, - "original_shipping_total": { "numeric": 11 }, - "original_shipping_subtotal": { + "original_item_subtotal": { + "numeric": 36 + }, + "original_item_tax_total": { + "numeric": 15 + }, + "item_total": { + "numeric": 21 + }, + "item_subtotal": { + "numeric": 10 + }, + "item_tax_total": { + "numeric": 0 + }, + "original_total": { + "numeric": 2 + }, + "original_subtotal": { + "numeric": 3 + }, + "original_tax_total": { + "numeric": 14 + }, + "total": { + "numeric": 29 + }, + "subtotal": { + "numeric": 7 + }, + "tax_total": { + "numeric": 39 + }, + "discount_subtotal": { + "numeric": 10 + }, + "discount_total": { + "numeric": 36 + }, + "discount_tax_total": { + "numeric": 37 + }, + "gift_card_total": { "numeric": 42 }, - "original_shipping_tax_total": { + "gift_card_tax_total": { + "numeric": 42 + }, + "shipping_total": { + "numeric": 4 + }, + "shipping_subtotal": { "numeric": 9 + }, + "shipping_tax_total": { + "numeric": 22 + }, + "original_shipping_total": { + "numeric": 50 + }, + "original_shipping_subtotal": { + "numeric": 29 + }, + "original_shipping_tax_total": { + "numeric": 18 } } }) diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.beginReturnOrderWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.beginReturnOrderWorkflow/page.mdx index 15bdd01575..f111e0b8bc 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.beginReturnOrderWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.beginReturnOrderWorkflow/page.mdx @@ -17,27 +17,9 @@ This workflow requests a return. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { beginReturnOrderWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = beginReturnOrderWorkflow - .runAsStep({ - input: { - "order_id": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -115,6 +97,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { beginReturnOrderWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = beginReturnOrderWorkflow + .runAsStep({ + input: { + "order_id": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelBeginOrderClaimValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelBeginOrderClaimValidationStep/page.mdx index 3fd28cfe4c..19049ea678 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelBeginOrderClaimValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelBeginOrderClaimValidationStep/page.mdx @@ -23,89 +23,89 @@ const myWorkflow = createWorkflow( () => { const data = cancelBeginOrderClaimValidationStep({ "order": { - "id": "id_ikWciBSJ4A", - "version": 21, - "display_id": 10, - "status": "draft", + "id": "id_v7H89BcdlW", + "version": 28, + "display_id": 9, + "status": "archived", "currency_code": "{value}", - "created_at": "2025-04-20T01:30:50.752Z", - "updated_at": "2025-12-26T21:44:08.136Z", + "created_at": "2025-10-10T20:07:38.329Z", + "updated_at": "2025-10-12T00:27:39.777Z", "original_item_total": { - "numeric": 12 + "numeric": 47 }, "original_item_subtotal": { - "numeric": 13 - }, - "original_item_tax_total": { - "numeric": 21 - }, - "item_total": { "numeric": 9 }, + "original_item_tax_total": { + "numeric": 27 + }, + "item_total": { + "numeric": 32 + }, "item_subtotal": { - "numeric": 3 + "numeric": 40 }, "item_tax_total": { - "numeric": 50 + "numeric": 5 }, "original_total": { - "numeric": 3 + "numeric": 42 }, "original_subtotal": { - "numeric": 30 + "numeric": 19 }, "original_tax_total": { - "numeric": 25 + "numeric": 1 }, "total": { - "numeric": 36 + "numeric": 5 }, "subtotal": { - "numeric": 28 + "numeric": 9 }, "tax_total": { - "numeric": 17 + "numeric": 29 }, "discount_subtotal": { - "numeric": 7 + "numeric": 30 }, "discount_total": { "numeric": 37 }, "discount_tax_total": { - "numeric": 9 + "numeric": 38 }, "gift_card_total": { "numeric": 37 }, "gift_card_tax_total": { - "numeric": 0 + "numeric": 12 }, "shipping_total": { - "numeric": 14 + "numeric": 42 }, "shipping_subtotal": { - "numeric": 37 + "numeric": 11 }, "shipping_tax_total": { - "numeric": 26 + "numeric": 7 }, "original_shipping_total": { - "numeric": 9 + "numeric": 40 }, "original_shipping_subtotal": { - "numeric": 34 + "numeric": 16 }, "original_shipping_tax_total": { - "numeric": 50 + "numeric": 17 } }, "orderClaim": { - "id": "id_apw2PgpsOVGLHj3", + "id": "id_6pMfPvxHDo7d9PbkUpw", "type": "replace", "order_id": "{value}", - "order_version": 45, - "display_id": 39, + "order_version": 33, + "display_id": 33, "claim_items": [ "{value}" ], @@ -115,120 +115,120 @@ const myWorkflow = createWorkflow( "metadata": {} }, "orderChange": { - "id": "id_EdTFlQZbmgz1UK", - "version": 47, + "id": "id_J3Obnu5GGAUyc", + "version": 34, "order_id": "{value}", "return_id": "{value}", "exchange_id": "{value}", "claim_id": "{value}", "order": { - "id": "id_GeZbqQa39Qa", - "version": 38, - "display_id": 0, - "status": "completed", + "id": "id_msLF8jWSqrGDTwZI", + "version": 31, + "display_id": 35, + "status": "archived", "currency_code": "{value}", - "created_at": "2025-10-17T22:41:45.191Z", - "updated_at": "2025-12-13T11:35:50.024Z", + "created_at": "2025-10-06T21:06:50.083Z", + "updated_at": "2025-10-28T11:15:48.650Z", "original_item_total": { - "numeric": 42 + "numeric": 23 }, "original_item_subtotal": { - "numeric": 16 + "numeric": 9 }, "original_item_tax_total": { - "numeric": 50 + "numeric": 44 }, "item_total": { - "numeric": 20 - }, - "item_subtotal": { - "numeric": 40 - }, - "item_tax_total": { - "numeric": 24 - }, - "original_total": { "numeric": 6 }, + "item_subtotal": { + "numeric": 20 + }, + "item_tax_total": { + "numeric": 26 + }, + "original_total": { + "numeric": 41 + }, "original_subtotal": { - "numeric": 40 + "numeric": 43 }, "original_tax_total": { - "numeric": 21 + "numeric": 10 }, "total": { - "numeric": 24 + "numeric": 37 }, "subtotal": { - "numeric": 36 + "numeric": 34 }, "tax_total": { - "numeric": 30 + "numeric": 20 }, "discount_subtotal": { "numeric": 44 }, "discount_total": { - "numeric": 46 + "numeric": 0 }, "discount_tax_total": { - "numeric": 12 + "numeric": 38 }, "gift_card_total": { - "numeric": 33 + "numeric": 0 }, "gift_card_tax_total": { - "numeric": 45 + "numeric": 9 }, "shipping_total": { - "numeric": 6 + "numeric": 12 }, "shipping_subtotal": { - "numeric": 17 + "numeric": 11 }, "shipping_tax_total": { - "numeric": 45 + "numeric": 41 }, "original_shipping_total": { - "numeric": 42 + "numeric": 20 }, "original_shipping_subtotal": { - "numeric": 43 + "numeric": 23 }, "original_shipping_tax_total": { - "numeric": 6 + "numeric": 17 } }, "return_order": { - "id": "id_rbo5cxWxiRiFtwVA", - "status": "requested", + "id": "id_1yp5m2LOpe6hUgSpq", + "status": "partially_received", "order_id": "{value}", "items": [{ - "id": "id_28uVTfwiKDW5YOwdN", + "id": "id_iWE5Zze9u2EYAx", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 41 + "quantity": 28 }], - "display_id": 31, + "display_id": 22, "metadata": {} }, "exchange": { - "id": "id_nTOriz5D8B9pR", + "id": "id_tlN3bKaHq6oktHdA", "order_id": "{value}", - "order_version": 42, - "display_id": 10, + "order_version": 3, + "display_id": 21, "additional_items": [ "{value}" ], "metadata": {} }, "claim": { - "id": "id_tLfGCg8wBVO", + "id": "id_H8r7iVDCYn", "type": "refund", "order_id": "{value}", - "order_version": 4, - "display_id": 20, + "order_version": 8, + "display_id": 2, "claim_items": [ "{value}" ], @@ -238,7 +238,7 @@ const myWorkflow = createWorkflow( "metadata": {} }, "actions": [{ - "id": "id_3fWEQLlyEaIVpQPc", + "id": "id_r6dlEc0TAyb2Gd4BJ", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -248,13 +248,13 @@ const myWorkflow = createWorkflow( "order": {}, "reference": "{value}", "reference_id": "{value}", - "action": "CREDIT_LINE_ADD", + "action": "REINSTATE_ITEM", "details": {}, "internal_note": {}, - "created_at": "2025-05-22T16:27:52.698Z", - "updated_at": "2025-01-14T12:58:19.471Z" + "created_at": "2025-11-01T03:18:38.253Z", + "updated_at": "2025-07-26T23:21:58.601Z" }], - "status": "canceled", + "status": "declined", "requested_by": {}, "requested_at": {}, "confirmed_by": {}, @@ -265,8 +265,8 @@ const myWorkflow = createWorkflow( "declined_at": {}, "canceled_by": {}, "canceled_at": {}, - "created_at": "2025-12-05T14:38:12.086Z", - "updated_at": "2025-08-21T14:20:10.141Z" + "created_at": "2025-02-21T07:37:16.657Z", + "updated_at": "2025-06-23T12:12:29.815Z" } }) } diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelBeginOrderClaimWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelBeginOrderClaimWorkflow/page.mdx index 356fed5bef..56f92b7c2c 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelBeginOrderClaimWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelBeginOrderClaimWorkflow/page.mdx @@ -17,27 +17,9 @@ This workflow cancels a requested order claim. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { cancelBeginOrderClaimWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = cancelBeginOrderClaimWorkflow - .runAsStep({ - input: { - "claim_id": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -115,6 +97,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { cancelBeginOrderClaimWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = cancelBeginOrderClaimWorkflow + .runAsStep({ + input: { + "claim_id": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelBeginOrderEditValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelBeginOrderEditValidationStep/page.mdx index e45aa1088f..f01cfedf79 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelBeginOrderEditValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelBeginOrderEditValidationStep/page.mdx @@ -22,198 +22,198 @@ const myWorkflow = createWorkflow( () => { const data = cancelBeginOrderEditValidationStep({ "order": { - "id": "id_i6nXZAv9Wj3", - "version": 37, - "display_id": 45, - "status": "draft", + "id": "id_Ru9qnROnaVgBcn", + "version": 36, + "display_id": 9, + "status": "completed", "currency_code": "{value}", - "created_at": "2025-04-20T17:49:23.523Z", - "updated_at": "2025-07-08T22:48:27.020Z", + "created_at": "2025-10-31T02:46:11.338Z", + "updated_at": "2026-01-01T17:23:17.764Z", "original_item_total": { - "numeric": 13 + "numeric": 41 }, "original_item_subtotal": { - "numeric": 9 - }, - "original_item_tax_total": { - "numeric": 13 - }, - "item_total": { "numeric": 23 }, - "item_subtotal": { + "original_item_tax_total": { + "numeric": 36 + }, + "item_total": { "numeric": 13 }, + "item_subtotal": { + "numeric": 15 + }, "item_tax_total": { - "numeric": 48 + "numeric": 30 }, "original_total": { - "numeric": 5 + "numeric": 41 }, "original_subtotal": { - "numeric": 45 + "numeric": 10 }, "original_tax_total": { - "numeric": 21 + "numeric": 46 }, "total": { - "numeric": 24 + "numeric": 25 }, "subtotal": { - "numeric": 43 + "numeric": 5 }, "tax_total": { - "numeric": 2 + "numeric": 7 }, "discount_subtotal": { - "numeric": 21 + "numeric": 33 }, "discount_total": { - "numeric": 40 + "numeric": 7 }, "discount_tax_total": { - "numeric": 44 + "numeric": 8 }, "gift_card_total": { - "numeric": 38 + "numeric": 33 }, "gift_card_tax_total": { - "numeric": 21 - }, - "shipping_total": { - "numeric": 47 - }, - "shipping_subtotal": { - "numeric": 24 - }, - "shipping_tax_total": { - "numeric": 16 - }, - "original_shipping_total": { - "numeric": 35 - }, - "original_shipping_subtotal": { "numeric": 34 }, + "shipping_total": { + "numeric": 23 + }, + "shipping_subtotal": { + "numeric": 4 + }, + "shipping_tax_total": { + "numeric": 14 + }, + "original_shipping_total": { + "numeric": 7 + }, + "original_shipping_subtotal": { + "numeric": 37 + }, "original_shipping_tax_total": { - "numeric": 49 + "numeric": 24 } }, "orderChange": { - "id": "id_1K0mRIKh5D36x", - "version": 48, + "id": "id_2aHd9dfeRY", + "version": 36, "order_id": "{value}", "return_id": "{value}", "exchange_id": "{value}", "claim_id": "{value}", "order": { - "id": "id_jFH1ROcIEF4k13fjT", - "version": 30, - "display_id": 8, - "status": "draft", + "id": "id_orRNfgSAb06a", + "version": 47, + "display_id": 0, + "status": "canceled", "currency_code": "{value}", - "created_at": "2025-08-15T16:32:57.999Z", - "updated_at": "2025-09-09T18:10:55.340Z", + "created_at": "2025-06-18T20:35:15.218Z", + "updated_at": "2025-01-18T23:54:41.026Z", "original_item_total": { - "numeric": 34 + "numeric": 12 }, "original_item_subtotal": { - "numeric": 39 + "numeric": 31 }, "original_item_tax_total": { - "numeric": 29 + "numeric": 6 }, "item_total": { - "numeric": 2 + "numeric": 32 }, "item_subtotal": { - "numeric": 43 + "numeric": 2 }, "item_tax_total": { - "numeric": 48 + "numeric": 38 }, "original_total": { - "numeric": 3 + "numeric": 27 }, "original_subtotal": { - "numeric": 8 + "numeric": 6 }, "original_tax_total": { - "numeric": 7 - }, - "total": { - "numeric": 9 - }, - "subtotal": { - "numeric": 9 - }, - "tax_total": { "numeric": 30 }, - "discount_subtotal": { - "numeric": 48 - }, - "discount_total": { - "numeric": 49 - }, - "discount_tax_total": { - "numeric": 41 - }, - "gift_card_total": { - "numeric": 17 - }, - "gift_card_tax_total": { - "numeric": 11 - }, - "shipping_total": { - "numeric": 18 - }, - "shipping_subtotal": { - "numeric": 26 - }, - "shipping_tax_total": { + "total": { "numeric": 40 }, + "subtotal": { + "numeric": 21 + }, + "tax_total": { + "numeric": 16 + }, + "discount_subtotal": { + "numeric": 18 + }, + "discount_total": { + "numeric": 25 + }, + "discount_tax_total": { + "numeric": 17 + }, + "gift_card_total": { + "numeric": 1 + }, + "gift_card_tax_total": { + "numeric": 29 + }, + "shipping_total": { + "numeric": 29 + }, + "shipping_subtotal": { + "numeric": 13 + }, + "shipping_tax_total": { + "numeric": 50 + }, "original_shipping_total": { - "numeric": 48 + "numeric": 15 }, "original_shipping_subtotal": { - "numeric": 9 + "numeric": 12 }, "original_shipping_tax_total": { - "numeric": 44 + "numeric": 42 } }, "return_order": { - "id": "id_H7MDQodZexbuqQF", + "id": "id_GyynoZM7eazPJnWdQJ", "status": "partially_received", "order_id": "{value}", "items": [{ - "id": "id_6eG683U7TzNgduHDuxT1", + "id": "id_HRhYs3BTN92", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 43 + "quantity": 21 }], - "display_id": 18, + "display_id": 25, "metadata": {} }, "exchange": { - "id": "id_qTaBpH6eDfMHO0S8AYcv", + "id": "id_U7Zede9l19PJuj7Rw", "order_id": "{value}", - "order_version": 47, - "display_id": 31, + "order_version": 7, + "display_id": 34, "additional_items": [ "{value}" ], "metadata": {} }, "claim": { - "id": "id_UQRr4cmBjmk", - "type": "refund", + "id": "id_uFWl0Dgyn6D3ZEr08xI", + "type": "replace", "order_id": "{value}", - "order_version": 19, - "display_id": 40, + "order_version": 24, + "display_id": 8, "claim_items": [ "{value}" ], @@ -223,7 +223,7 @@ const myWorkflow = createWorkflow( "metadata": {} }, "actions": [{ - "id": "id_WGcv0396dGVoboa", + "id": "id_zAVvR5vmIhuCA", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -233,13 +233,13 @@ const myWorkflow = createWorkflow( "order": {}, "reference": "{value}", "reference_id": "{value}", - "action": "RECEIVE_DAMAGED_RETURN_ITEM", + "action": "CANCEL_RETURN_ITEM", "details": {}, "internal_note": {}, - "created_at": "2025-08-23T12:28:10.085Z", - "updated_at": "2025-10-19T23:04:19.824Z" + "created_at": "2025-08-27T00:38:25.523Z", + "updated_at": "2025-07-15T06:25:01.852Z" }], - "status": "declined", + "status": "confirmed", "requested_by": {}, "requested_at": {}, "confirmed_by": {}, @@ -250,8 +250,8 @@ const myWorkflow = createWorkflow( "declined_at": {}, "canceled_by": {}, "canceled_at": {}, - "created_at": "2025-12-25T00:18:03.617Z", - "updated_at": "2025-03-02T13:45:37.491Z" + "created_at": "2025-10-31T11:45:36.510Z", + "updated_at": "2025-08-16T16:08:25.723Z" } }) } diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelBeginOrderEditWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelBeginOrderEditWorkflow/page.mdx index 374bd36e42..89ca8b3dbb 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelBeginOrderEditWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelBeginOrderEditWorkflow/page.mdx @@ -17,27 +17,9 @@ This workflow cancels a requested order edit. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { cancelBeginOrderEditWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = cancelBeginOrderEditWorkflow - .runAsStep({ - input: { - "order_id": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -115,6 +97,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { cancelBeginOrderEditWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = cancelBeginOrderEditWorkflow + .runAsStep({ + input: { + "order_id": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelBeginOrderExchangeValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelBeginOrderExchangeValidationStep/page.mdx index e932dabeb9..1bec08125f 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelBeginOrderExchangeValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelBeginOrderExchangeValidationStep/page.mdx @@ -22,87 +22,87 @@ const myWorkflow = createWorkflow( () => { const data = cancelBeginOrderExchangeValidationStep({ "order": { - "id": "id_f5PqYXWQqRYpCNrgg", - "version": 8, - "display_id": 15, + "id": "id_viy8CqI1zKt1luwq9", + "version": 38, + "display_id": 4, "status": "pending", "currency_code": "{value}", - "created_at": "2025-07-19T09:55:47.743Z", - "updated_at": "2025-08-09T08:56:59.608Z", + "created_at": "2025-10-04T09:38:52.890Z", + "updated_at": "2025-02-10T04:07:08.569Z", "original_item_total": { - "numeric": 36 - }, - "original_item_subtotal": { - "numeric": 34 - }, - "original_item_tax_total": { "numeric": 4 }, + "original_item_subtotal": { + "numeric": 19 + }, + "original_item_tax_total": { + "numeric": 6 + }, "item_total": { - "numeric": 29 + "numeric": 38 }, "item_subtotal": { - "numeric": 24 + "numeric": 37 }, "item_tax_total": { - "numeric": 7 + "numeric": 38 }, "original_total": { - "numeric": 5 + "numeric": 2 }, "original_subtotal": { - "numeric": 42 + "numeric": 45 }, "original_tax_total": { "numeric": 43 }, "total": { - "numeric": 47 + "numeric": 35 }, "subtotal": { - "numeric": 46 + "numeric": 50 }, "tax_total": { - "numeric": 42 + "numeric": 39 }, "discount_subtotal": { - "numeric": 4 + "numeric": 17 }, "discount_total": { - "numeric": 42 + "numeric": 9 }, "discount_tax_total": { - "numeric": 44 + "numeric": 41 }, "gift_card_total": { - "numeric": 15 + "numeric": 6 }, "gift_card_tax_total": { - "numeric": 26 + "numeric": 28 }, "shipping_total": { - "numeric": 12 + "numeric": 46 }, "shipping_subtotal": { - "numeric": 25 + "numeric": 0 }, "shipping_tax_total": { - "numeric": 48 + "numeric": 23 }, "original_shipping_total": { - "numeric": 30 + "numeric": 45 }, "original_shipping_subtotal": { - "numeric": 38 + "numeric": 50 }, "original_shipping_tax_total": { - "numeric": 47 + "numeric": 27 } }, "orderExchange": { - "id": "id_gBVt0OBQ5KZj", + "id": "id_cHiiPINGnEkir", "order_id": "{value}", - "order_version": 6, + "order_version": 28, "display_id": 48, "additional_items": [ "{value}" @@ -110,120 +110,120 @@ const myWorkflow = createWorkflow( "metadata": {} }, "orderChange": { - "id": "id_9SehF29v3IL7EH4", + "id": "id_lPdEGhBsFonGGZBt4wI", "version": 1, "order_id": "{value}", "return_id": "{value}", "exchange_id": "{value}", "claim_id": "{value}", "order": { - "id": "id_YPKaU0OGTk", - "version": 40, - "display_id": 0, - "status": "draft", + "id": "id_OoMfCpgENQs86", + "version": 37, + "display_id": 44, + "status": "pending", "currency_code": "{value}", - "created_at": "2025-11-28T03:25:13.258Z", - "updated_at": "2025-06-16T05:33:02.512Z", + "created_at": "2025-04-27T02:50:14.231Z", + "updated_at": "2025-02-01T04:13:56.758Z", "original_item_total": { - "numeric": 17 + "numeric": 36 }, "original_item_subtotal": { - "numeric": 48 + "numeric": 40 }, "original_item_tax_total": { - "numeric": 14 + "numeric": 37 }, "item_total": { - "numeric": 38 - }, - "item_subtotal": { - "numeric": 33 - }, - "item_tax_total": { - "numeric": 9 - }, - "original_total": { - "numeric": 30 - }, - "original_subtotal": { - "numeric": 41 - }, - "original_tax_total": { "numeric": 43 }, - "total": { - "numeric": 44 + "item_subtotal": { + "numeric": 29 }, - "subtotal": { - "numeric": 21 + "item_tax_total": { + "numeric": 17 }, - "tax_total": { - "numeric": 19 + "original_total": { + "numeric": 46 }, - "discount_subtotal": { - "numeric": 50 - }, - "discount_total": { - "numeric": 50 - }, - "discount_tax_total": { - "numeric": 50 - }, - "gift_card_total": { - "numeric": 16 - }, - "gift_card_tax_total": { - "numeric": 12 - }, - "shipping_total": { - "numeric": 9 - }, - "shipping_subtotal": { - "numeric": 19 - }, - "shipping_tax_total": { + "original_subtotal": { "numeric": 42 }, + "original_tax_total": { + "numeric": 22 + }, + "total": { + "numeric": 39 + }, + "subtotal": { + "numeric": 25 + }, + "tax_total": { + "numeric": 41 + }, + "discount_subtotal": { + "numeric": 28 + }, + "discount_total": { + "numeric": 38 + }, + "discount_tax_total": { + "numeric": 46 + }, + "gift_card_total": { + "numeric": 13 + }, + "gift_card_tax_total": { + "numeric": 19 + }, + "shipping_total": { + "numeric": 40 + }, + "shipping_subtotal": { + "numeric": 48 + }, + "shipping_tax_total": { + "numeric": 44 + }, "original_shipping_total": { - "numeric": 11 + "numeric": 9 }, "original_shipping_subtotal": { - "numeric": 24 + "numeric": 39 }, "original_shipping_tax_total": { "numeric": 4 } }, "return_order": { - "id": "id_i4aAkDYRKAdAJ", + "id": "id_9OGnmdXCQoX2LnxqbYG", "status": "partially_received", "order_id": "{value}", "items": [{ - "id": "id_Yrw1Crpa5cbQf", + "id": "id_tDTKWdY5kvMmfQX", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 28 + "quantity": 43 }], "display_id": 42, "metadata": {} }, "exchange": { - "id": "id_WJULmD08bJ6", + "id": "id_6OIwAykUsLZ", "order_id": "{value}", - "order_version": 21, - "display_id": 19, + "order_version": 8, + "display_id": 33, "additional_items": [ "{value}" ], "metadata": {} }, "claim": { - "id": "id_cv8rZYPuU8sb8nK1H1z", + "id": "id_KnhvwOMZ5YhKBF", "type": "refund", "order_id": "{value}", - "order_version": 32, - "display_id": 17, + "order_version": 24, + "display_id": 11, "claim_items": [ "{value}" ], @@ -233,7 +233,7 @@ const myWorkflow = createWorkflow( "metadata": {} }, "actions": [{ - "id": "id_tMURkS5fd46jtQ", + "id": "id_W91lNe353Mw", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -246,8 +246,8 @@ const myWorkflow = createWorkflow( "action": "ITEM_UPDATE", "details": {}, "internal_note": {}, - "created_at": "2025-10-06T03:38:28.546Z", - "updated_at": "2025-03-19T01:15:12.572Z" + "created_at": "2026-01-05T23:01:42.259Z", + "updated_at": "2025-06-06T11:51:30.210Z" }], "status": "canceled", "requested_by": {}, @@ -260,8 +260,8 @@ const myWorkflow = createWorkflow( "declined_at": {}, "canceled_by": {}, "canceled_at": {}, - "created_at": "2025-04-08T08:02:04.900Z", - "updated_at": "2025-07-16T23:38:04.585Z" + "created_at": "2025-04-15T22:09:24.575Z", + "updated_at": "2025-07-29T06:35:46.726Z" } }) } diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelBeginOrderExchangeWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelBeginOrderExchangeWorkflow/page.mdx index b4a36d2756..3fa398e170 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelBeginOrderExchangeWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelBeginOrderExchangeWorkflow/page.mdx @@ -17,27 +17,9 @@ This workflow cancels a requested order exchange. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { cancelBeginOrderExchangeWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = cancelBeginOrderExchangeWorkflow - .runAsStep({ - input: { - "exchange_id": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -115,6 +97,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { cancelBeginOrderExchangeWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = cancelBeginOrderExchangeWorkflow + .runAsStep({ + input: { + "exchange_id": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelClaimValidateOrderStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelClaimValidateOrderStep/page.mdx index 10f9f68893..df9a2f9f75 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelClaimValidateOrderStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelClaimValidateOrderStep/page.mdx @@ -22,11 +22,11 @@ const myWorkflow = createWorkflow( () => { const data = cancelClaimValidateOrderStep({ "orderClaim": { - "id": "id_6TCEgI6ePRp", - "type": "refund", + "id": "id_6r5m80MBztw9Lb", + "type": "replace", "order_id": "{value}", - "order_version": 22, - "display_id": 22, + "order_version": 47, + "display_id": 6, "claim_items": [ "{value}" ], diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelExchangeValidateOrder/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelExchangeValidateOrder/page.mdx index 75b3415acc..219928e708 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelExchangeValidateOrder/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelExchangeValidateOrder/page.mdx @@ -22,10 +22,10 @@ const myWorkflow = createWorkflow( () => { const data = cancelExchangeValidateOrder({ "orderExchange": { - "id": "id_6YJ95NRYUcwMVYwp", + "id": "id_fkcNfXQTz9wW", "order_id": "{value}", - "order_version": 31, - "display_id": 46, + "order_version": 10, + "display_id": 40, "additional_items": [ "{value}" ], diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelOrderChangeWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelOrderChangeWorkflow/page.mdx index c3a26e89ca..11db65f0e2 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelOrderChangeWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelOrderChangeWorkflow/page.mdx @@ -16,27 +16,9 @@ This workflow cancels an order change. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { cancelOrderChangeWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = cancelOrderChangeWorkflow - .runAsStep({ - input: { - "id": "id_Xni6j5lOJs28D" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -53,7 +35,7 @@ export async function POST( const { result } = await cancelOrderChangeWorkflow(req.scope) .run({ input: { - "id": "id_Xni6j5lOJs28D" + "id": "id_qYV9esxNsaaxcLlIF" } }) @@ -78,7 +60,7 @@ export default async function handleOrderPlaced({ const { result } = await cancelOrderChangeWorkflow(container) .run({ input: { - "id": "id_Xni6j5lOJs28D" + "id": "id_qYV9esxNsaaxcLlIF" } }) @@ -103,7 +85,7 @@ export default async function myCustomJob( const { result } = await cancelOrderChangeWorkflow(container) .run({ input: { - "id": "id_Xni6j5lOJs28D" + "id": "id_qYV9esxNsaaxcLlIF" } }) @@ -114,6 +96,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { cancelOrderChangeWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = cancelOrderChangeWorkflow + .runAsStep({ + input: { + "id": "id_qYV9esxNsaaxcLlIF" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelOrderClaimWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelOrderClaimWorkflow/page.mdx index ba97ed7bde..bb2a52a0e6 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelOrderClaimWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelOrderClaimWorkflow/page.mdx @@ -18,27 +18,9 @@ This workflow cancels a confirmed order claim. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { cancelOrderClaimWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = cancelOrderClaimWorkflow - .runAsStep({ - input: { - "claim_id": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -116,6 +98,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { cancelOrderClaimWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = cancelOrderClaimWorkflow + .runAsStep({ + input: { + "claim_id": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelOrderExchangeWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelOrderExchangeWorkflow/page.mdx index fdae35ba3b..559d2abf4e 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelOrderExchangeWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelOrderExchangeWorkflow/page.mdx @@ -18,27 +18,9 @@ This workflow cancels a confirmed exchange. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { cancelOrderExchangeWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = cancelOrderExchangeWorkflow - .runAsStep({ - input: { - "exchange_id": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -116,6 +98,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { cancelOrderExchangeWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = cancelOrderExchangeWorkflow + .runAsStep({ + input: { + "exchange_id": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelOrderFulfillmentValidateOrder/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelOrderFulfillmentValidateOrder/page.mdx index 726d3cba35..835127c5e8 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelOrderFulfillmentValidateOrder/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelOrderFulfillmentValidateOrder/page.mdx @@ -22,84 +22,84 @@ const myWorkflow = createWorkflow( () => { const data = cancelOrderFulfillmentValidateOrder({ "order": { - "id": "id_EOJSnsyWjKLDP0", - "version": 11, - "display_id": 30, - "status": "requires_action", + "id": "id_IhxbYk9lPBT", + "version": 17, + "display_id": 21, + "status": "archived", "currency_code": "{value}", - "created_at": "2025-05-01T09:01:26.262Z", - "updated_at": "2025-02-06T09:34:17.545Z", + "created_at": "2025-11-28T22:30:59.687Z", + "updated_at": "2025-07-31T09:10:11.078Z", "original_item_total": { - "numeric": 50 + "numeric": 46 }, "original_item_subtotal": { - "numeric": 12 + "numeric": 5 }, "original_item_tax_total": { - "numeric": 33 + "numeric": 7 }, "item_total": { - "numeric": 49 + "numeric": 13 }, "item_subtotal": { - "numeric": 41 - }, - "item_tax_total": { - "numeric": 12 - }, - "original_total": { - "numeric": 32 - }, - "original_subtotal": { - "numeric": 15 - }, - "original_tax_total": { - "numeric": 0 - }, - "total": { - "numeric": 3 - }, - "subtotal": { - "numeric": 33 - }, - "tax_total": { - "numeric": 14 - }, - "discount_subtotal": { - "numeric": 16 - }, - "discount_total": { - "numeric": 16 - }, - "discount_tax_total": { "numeric": 42 }, - "gift_card_total": { - "numeric": 32 - }, - "gift_card_tax_total": { - "numeric": 19 - }, - "shipping_total": { - "numeric": 40 - }, - "shipping_subtotal": { - "numeric": 23 - }, - "shipping_tax_total": { + "item_tax_total": { "numeric": 36 }, + "original_total": { + "numeric": 4 + }, + "original_subtotal": { + "numeric": 25 + }, + "original_tax_total": { + "numeric": 14 + }, + "total": { + "numeric": 5 + }, + "subtotal": { + "numeric": 14 + }, + "tax_total": { + "numeric": 32 + }, + "discount_subtotal": { + "numeric": 29 + }, + "discount_total": { + "numeric": 1 + }, + "discount_tax_total": { + "numeric": 23 + }, + "gift_card_total": { + "numeric": 41 + }, + "gift_card_tax_total": { + "numeric": 42 + }, + "shipping_total": { + "numeric": 26 + }, + "shipping_subtotal": { + "numeric": 39 + }, + "shipping_tax_total": { + "numeric": 25 + }, "original_shipping_total": { - "numeric": 40 + "numeric": 37 }, "original_shipping_subtotal": { - "numeric": 31 + "numeric": 11 }, "original_shipping_tax_total": { - "numeric": 3 + "numeric": 48 }, "fulfillments": [{ - "id": "id_pGWGFQJp6wa6mBFeo", + "id": "id_76OOausZ64hQ", "location_id": "{value}", "packed_at": {}, "shipped_at": {}, @@ -112,8 +112,8 @@ const myWorkflow = createWorkflow( "shipping_option": {}, "requires_shipping": false, "provider": { - "id": "id_aiaQpvkzssJ4TZR2uf4", - "name": "Haskell", + "id": "id_GRYpPRy5jgrcXW", + "name": "Edwina", "metadata": {}, "shipping_options": [ {} @@ -123,7 +123,7 @@ const myWorkflow = createWorkflow( "deleted_at": {} }, "delivery_address": { - "id": "id_3k4bg0f2V5J93Hm", + "id": "id_hN4MXBkHcOzA1FtMFz", "fulfillment_id": {}, "company": {}, "first_name": {}, @@ -141,9 +141,9 @@ const myWorkflow = createWorkflow( "deleted_at": {} }, "items": [{ - "id": "id_rt4vnNu8MdWz", - "title": "varietas", - "quantity": 44, + "id": "id_FtEYJGNtYwCpPITfZVPy", + "title": "aedificium", + "quantity": 49, "sku": "{value}", "barcode": "{value}", "line_item_id": {}, @@ -155,7 +155,7 @@ const myWorkflow = createWorkflow( "deleted_at": {} }], "labels": [{ - "id": "id_1rdMI03vPVcJ6p", + "id": "id_ZxDxITBliKuGBwe", "tracking_number": "{value}", "tracking_url": "{value}", "label_url": "{value}", diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelOrderFulfillmentWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelOrderFulfillmentWorkflow/page.mdx index 96341f317a..c678f4809e 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelOrderFulfillmentWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelOrderFulfillmentWorkflow/page.mdx @@ -25,31 +25,9 @@ You can also use this workflow within your own custom workflows, allowing you to +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { cancelOrderFulfillmentWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = cancelOrderFulfillmentWorkflow - .runAsStep({ - input: { - order_id: "order_123", - fulfillment_id: "ful_123", - additional_data: { - reason: "Customer changed their mind" - } - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -139,6 +117,30 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { cancelOrderFulfillmentWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = cancelOrderFulfillmentWorkflow + .runAsStep({ + input: { + order_id: "order_123", + fulfillment_id: "ful_123", + additional_data: { + reason: "Customer changed their mind" + } + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelOrderTransferRequestWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelOrderTransferRequestWorkflow/page.mdx index a120085e05..bfed742cbe 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelOrderTransferRequestWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelOrderTransferRequestWorkflow/page.mdx @@ -19,29 +19,9 @@ Customer that requested the transfer or a store admin are allowed to cancel the +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { cancelOrderTransferRequestWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = cancelOrderTransferRequestWorkflow - .runAsStep({ - input: { - "order_id": "{value}", - "logged_in_user_id": "{value}", - "actor_type": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -125,6 +105,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { cancelOrderTransferRequestWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = cancelOrderTransferRequestWorkflow + .runAsStep({ + input: { + "order_id": "{value}", + "logged_in_user_id": "{value}", + "actor_type": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelOrderWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelOrderWorkflow/page.mdx index 0548c918c0..3e0eed122c 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelOrderWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelOrderWorkflow/page.mdx @@ -21,27 +21,9 @@ This workflow cancels an order. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { cancelOrderWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = cancelOrderWorkflow - .runAsStep({ - input: { - "order_id": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -119,6 +101,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { cancelOrderWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = cancelOrderWorkflow + .runAsStep({ + input: { + "order_id": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelReceiveReturnValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelReceiveReturnValidationStep/page.mdx index 206e52c80d..5d8a451e2b 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelReceiveReturnValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelReceiveReturnValidationStep/page.mdx @@ -22,211 +22,211 @@ const myWorkflow = createWorkflow( () => { const data = cancelReceiveReturnValidationStep({ "order": { - "id": "id_ZfsLRzdWVVledtBDA", - "version": 47, - "display_id": 41, + "id": "id_WtM4T4x90ASG", + "version": 33, + "display_id": 26, "status": "completed", "currency_code": "{value}", - "created_at": "2025-08-09T02:04:38.245Z", - "updated_at": "2025-01-18T19:39:26.803Z", + "created_at": "2025-10-27T13:58:55.637Z", + "updated_at": "2025-09-24T08:47:47.678Z", "original_item_total": { - "numeric": 25 + "numeric": 21 }, "original_item_subtotal": { - "numeric": 28 + "numeric": 5 }, "original_item_tax_total": { - "numeric": 13 + "numeric": 49 }, "item_total": { - "numeric": 4 + "numeric": 23 }, "item_subtotal": { - "numeric": 19 + "numeric": 32 }, "item_tax_total": { - "numeric": 9 + "numeric": 14 }, "original_total": { - "numeric": 30 + "numeric": 42 }, "original_subtotal": { - "numeric": 34 + "numeric": 27 }, "original_tax_total": { - "numeric": 15 + "numeric": 0 }, "total": { - "numeric": 6 + "numeric": 2 }, "subtotal": { - "numeric": 3 + "numeric": 27 }, "tax_total": { - "numeric": 36 + "numeric": 30 }, "discount_subtotal": { - "numeric": 47 + "numeric": 24 }, "discount_total": { - "numeric": 36 + "numeric": 47 }, "discount_tax_total": { - "numeric": 22 + "numeric": 8 }, "gift_card_total": { - "numeric": 12 + "numeric": 24 }, "gift_card_tax_total": { - "numeric": 4 + "numeric": 25 }, "shipping_total": { - "numeric": 38 + "numeric": 47 }, "shipping_subtotal": { - "numeric": 41 - }, - "shipping_tax_total": { - "numeric": 7 - }, - "original_shipping_total": { "numeric": 9 }, + "shipping_tax_total": { + "numeric": 46 + }, + "original_shipping_total": { + "numeric": 2 + }, "original_shipping_subtotal": { - "numeric": 3 + "numeric": 43 }, "original_shipping_tax_total": { - "numeric": 26 + "numeric": 10 } }, "orderReturn": { - "id": "id_gqcW0GCu79UO", - "status": "partially_received", + "id": "id_lOeCywkAZbWUu", + "status": "received", "order_id": "{value}", "items": [{ - "id": "id_9JP64tARuwcpdZTostv", + "id": "id_mCgPVJ5a3QpShKg7JOu", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 5 + "quantity": 31 }], - "display_id": 49, + "display_id": 42, "metadata": {} }, "orderChange": { - "id": "id_Z3Np5ViMbFCb6r4", - "version": 44, + "id": "id_nSWvjNzUINS49fE91Ve5", + "version": 24, "order_id": "{value}", "return_id": "{value}", "exchange_id": "{value}", "claim_id": "{value}", "order": { - "id": "id_pyiKNGFeCG6Z", - "version": 19, - "display_id": 19, - "status": "canceled", + "id": "id_53FW3eqLH0Gh", + "version": 46, + "display_id": 26, + "status": "completed", "currency_code": "{value}", - "created_at": "2025-02-24T12:55:17.175Z", - "updated_at": "2025-11-20T19:31:22.092Z", + "created_at": "2025-09-05T15:36:37.918Z", + "updated_at": "2025-01-14T12:38:31.793Z", "original_item_total": { - "numeric": 33 + "numeric": 21 }, "original_item_subtotal": { - "numeric": 4 + "numeric": 12 }, "original_item_tax_total": { - "numeric": 50 + "numeric": 32 }, "item_total": { - "numeric": 37 + "numeric": 14 }, "item_subtotal": { - "numeric": 13 + "numeric": 33 }, "item_tax_total": { - "numeric": 10 - }, - "original_total": { - "numeric": 39 - }, - "original_subtotal": { - "numeric": 19 - }, - "original_tax_total": { - "numeric": 2 - }, - "total": { - "numeric": 47 - }, - "subtotal": { "numeric": 30 }, + "original_total": { + "numeric": 30 + }, + "original_subtotal": { + "numeric": 2 + }, + "original_tax_total": { + "numeric": 22 + }, + "total": { + "numeric": 49 + }, + "subtotal": { + "numeric": 17 + }, "tax_total": { - "numeric": 18 + "numeric": 40 }, "discount_subtotal": { - "numeric": 3 + "numeric": 6 }, "discount_total": { - "numeric": 9 + "numeric": 42 }, "discount_tax_total": { - "numeric": 27 + "numeric": 17 }, "gift_card_total": { - "numeric": 38 + "numeric": 21 }, "gift_card_tax_total": { - "numeric": 43 - }, - "shipping_total": { - "numeric": 31 - }, - "shipping_subtotal": { - "numeric": 26 - }, - "shipping_tax_total": { - "numeric": 28 - }, - "original_shipping_total": { - "numeric": 9 - }, - "original_shipping_subtotal": { "numeric": 1 }, + "shipping_total": { + "numeric": 28 + }, + "shipping_subtotal": { + "numeric": 32 + }, + "shipping_tax_total": { + "numeric": 14 + }, + "original_shipping_total": { + "numeric": 47 + }, + "original_shipping_subtotal": { + "numeric": 15 + }, "original_shipping_tax_total": { - "numeric": 0 + "numeric": 34 } }, "return_order": { - "id": "id_cE2i26jq2w25", - "status": "canceled", + "id": "id_FoTAabmHCQtqO8V", + "status": "received", "order_id": "{value}", "items": [{ - "id": "id_BSE4hV5J8FRE0jHGTzj7", + "id": "id_Oqo2eo0mypLUfafhS", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", "quantity": 36 }], - "display_id": 37, + "display_id": 27, "metadata": {} }, "exchange": { - "id": "id_ZEXnulxpXMSnB7fIo", + "id": "id_zN1Co49GatHvrsNQO", "order_id": "{value}", - "order_version": 32, - "display_id": 42, + "order_version": 39, + "display_id": 43, "additional_items": [ "{value}" ], "metadata": {} }, "claim": { - "id": "id_FYAZ85soQeRwyw", - "type": "refund", + "id": "id_TrDKcxl7L54H68iO", + "type": "replace", "order_id": "{value}", - "order_version": 19, + "order_version": 0, "display_id": 1, "claim_items": [ "{value}" @@ -237,7 +237,7 @@ const myWorkflow = createWorkflow( "metadata": {} }, "actions": [{ - "id": "id_p0xT4PHmfTJDQ613p6Lv", + "id": "id_kXApDEWcvVIRBvIY", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -247,13 +247,13 @@ const myWorkflow = createWorkflow( "order": {}, "reference": "{value}", "reference_id": "{value}", - "action": "UPDATE_ORDER_PROPERTIES", + "action": "TRANSFER_CUSTOMER", "details": {}, "internal_note": {}, - "created_at": "2025-09-01T12:01:32.763Z", - "updated_at": "2025-04-17T21:01:54.502Z" + "created_at": "2025-09-18T01:24:19.357Z", + "updated_at": "2025-02-08T01:20:25.981Z" }], - "status": "requested", + "status": "canceled", "requested_by": {}, "requested_at": {}, "confirmed_by": {}, @@ -264,8 +264,8 @@ const myWorkflow = createWorkflow( "declined_at": {}, "canceled_by": {}, "canceled_at": {}, - "created_at": "2025-04-01T02:56:06.959Z", - "updated_at": "2025-08-05T15:15:23.108Z" + "created_at": "2025-01-27T13:33:42.220Z", + "updated_at": "2025-11-28T23:30:17.811Z" } }) } diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelRequestReturnValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelRequestReturnValidationStep/page.mdx index fc00865e79..eba8184e9c 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelRequestReturnValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelRequestReturnValidationStep/page.mdx @@ -22,212 +22,212 @@ const myWorkflow = createWorkflow( () => { const data = cancelRequestReturnValidationStep({ "order": { - "id": "id_9YLHa56WPmUCft3MTq", - "version": 15, - "display_id": 43, - "status": "draft", + "id": "id_kAQhnNRrDURvpqTOXqj", + "version": 2, + "display_id": 25, + "status": "archived", "currency_code": "{value}", - "created_at": "2025-01-28T23:09:24.083Z", - "updated_at": "2025-04-30T19:29:46.818Z", + "created_at": "2025-02-27T21:42:29.339Z", + "updated_at": "2025-04-29T13:37:12.467Z", "original_item_total": { - "numeric": 38 + "numeric": 18 }, "original_item_subtotal": { - "numeric": 11 + "numeric": 4 }, "original_item_tax_total": { - "numeric": 46 + "numeric": 30 }, "item_total": { - "numeric": 46 + "numeric": 43 }, "item_subtotal": { - "numeric": 16 + "numeric": 47 }, "item_tax_total": { - "numeric": 17 + "numeric": 31 }, "original_total": { - "numeric": 11 + "numeric": 26 }, "original_subtotal": { - "numeric": 23 + "numeric": 19 }, "original_tax_total": { - "numeric": 20 + "numeric": 24 }, "total": { - "numeric": 8 + "numeric": 32 }, "subtotal": { - "numeric": 28 + "numeric": 49 }, "tax_total": { - "numeric": 11 + "numeric": 12 }, "discount_subtotal": { - "numeric": 33 + "numeric": 19 }, "discount_total": { - "numeric": 19 + "numeric": 44 }, "discount_tax_total": { - "numeric": 23 + "numeric": 18 }, "gift_card_total": { - "numeric": 15 - }, - "gift_card_tax_total": { - "numeric": 11 - }, - "shipping_total": { - "numeric": 13 - }, - "shipping_subtotal": { - "numeric": 34 - }, - "shipping_tax_total": { - "numeric": 42 - }, - "original_shipping_total": { - "numeric": 19 - }, - "original_shipping_subtotal": { "numeric": 8 }, - "original_shipping_tax_total": { + "gift_card_tax_total": { + "numeric": 21 + }, + "shipping_total": { "numeric": 34 + }, + "shipping_subtotal": { + "numeric": 23 + }, + "shipping_tax_total": { + "numeric": 11 + }, + "original_shipping_total": { + "numeric": 33 + }, + "original_shipping_subtotal": { + "numeric": 41 + }, + "original_shipping_tax_total": { + "numeric": 36 } }, "orderReturn": { - "id": "id_9PuqpwBKYK", - "status": "partially_received", + "id": "id_ISgBwunGdhqnf94NMLy", + "status": "canceled", "order_id": "{value}", "items": [{ - "id": "id_2rCxVLL0VvaqIpG2ku", + "id": "id_2EJXLHgdDAI", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 5 + "quantity": 17 }], - "display_id": 11, + "display_id": 49, "metadata": {} }, "orderChange": { - "id": "id_VFASqO9bbNxl4ZUj0HL", - "version": 21, + "id": "id_dwkbheMmBGB", + "version": 49, "order_id": "{value}", "return_id": "{value}", "exchange_id": "{value}", "claim_id": "{value}", "order": { - "id": "id_2H4S06sT5rHB", - "version": 7, - "display_id": 50, - "status": "pending", + "id": "id_9YL9CJOpq7Ct", + "version": 5, + "display_id": 47, + "status": "draft", "currency_code": "{value}", - "created_at": "2025-08-26T04:28:03.901Z", - "updated_at": "2025-03-21T00:27:39.889Z", + "created_at": "2025-08-28T10:26:21.234Z", + "updated_at": "2025-10-15T22:09:25.405Z", "original_item_total": { - "numeric": 10 + "numeric": 5 }, "original_item_subtotal": { - "numeric": 23 + "numeric": 22 }, "original_item_tax_total": { - "numeric": 37 + "numeric": 39 }, "item_total": { - "numeric": 39 + "numeric": 42 }, "item_subtotal": { - "numeric": 10 - }, - "item_tax_total": { - "numeric": 48 - }, - "original_total": { - "numeric": 9 - }, - "original_subtotal": { - "numeric": 17 - }, - "original_tax_total": { - "numeric": 16 - }, - "total": { - "numeric": 33 - }, - "subtotal": { - "numeric": 39 - }, - "tax_total": { - "numeric": 30 - }, - "discount_subtotal": { - "numeric": 24 - }, - "discount_total": { - "numeric": 47 - }, - "discount_tax_total": { - "numeric": 39 - }, - "gift_card_total": { "numeric": 41 }, - "gift_card_tax_total": { - "numeric": 14 + "item_tax_total": { + "numeric": 19 }, - "shipping_total": { - "numeric": 48 - }, - "shipping_subtotal": { - "numeric": 23 - }, - "shipping_tax_total": { + "original_total": { "numeric": 11 }, + "original_subtotal": { + "numeric": 7 + }, + "original_tax_total": { + "numeric": 26 + }, + "total": { + "numeric": 48 + }, + "subtotal": { + "numeric": 35 + }, + "tax_total": { + "numeric": 12 + }, + "discount_subtotal": { + "numeric": 46 + }, + "discount_total": { + "numeric": 42 + }, + "discount_tax_total": { + "numeric": 36 + }, + "gift_card_total": { + "numeric": 35 + }, + "gift_card_tax_total": { + "numeric": 4 + }, + "shipping_total": { + "numeric": 34 + }, + "shipping_subtotal": { + "numeric": 33 + }, + "shipping_tax_total": { + "numeric": 34 + }, "original_shipping_total": { - "numeric": 29 + "numeric": 37 }, "original_shipping_subtotal": { - "numeric": 47 + "numeric": 31 }, "original_shipping_tax_total": { - "numeric": 8 + "numeric": 34 } }, "return_order": { - "id": "id_BmzJvmPedFPa9GpdwkAL", + "id": "id_BytILRDFoQJP1vGs0v", "status": "received", "order_id": "{value}", "items": [{ - "id": "id_S9dYws7p7DmT", + "id": "id_kA7PdTHuMMIg", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 26 + "quantity": 11 }], - "display_id": 18, + "display_id": 9, "metadata": {} }, "exchange": { - "id": "id_UCp8dYksnefimHuE", + "id": "id_BUegiDNmzd3BboCvLZ", "order_id": "{value}", - "order_version": 37, - "display_id": 32, + "order_version": 29, + "display_id": 21, "additional_items": [ "{value}" ], "metadata": {} }, "claim": { - "id": "id_bV7RYP2eNBmOa81wBNA", - "type": "refund", + "id": "id_DkLoaLY69kxs9fAPuHe", + "type": "replace", "order_id": "{value}", - "order_version": 13, - "display_id": 11, + "order_version": 41, + "display_id": 29, "claim_items": [ "{value}" ], @@ -237,7 +237,7 @@ const myWorkflow = createWorkflow( "metadata": {} }, "actions": [{ - "id": "id_MglmUbcIi1P1aHgQd2u", + "id": "id_3hW40NvzIv3q7USmsSA", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -247,13 +247,13 @@ const myWorkflow = createWorkflow( "order": {}, "reference": "{value}", "reference_id": "{value}", - "action": "CREDIT_LINE_ADD", + "action": "DELIVER_ITEM", "details": {}, "internal_note": {}, - "created_at": "2025-07-07T04:49:56.971Z", - "updated_at": "2025-03-26T12:16:41.659Z" + "created_at": "2025-03-15T21:24:00.946Z", + "updated_at": "2025-12-29T10:17:06.400Z" }], - "status": "declined", + "status": "pending", "requested_by": {}, "requested_at": {}, "confirmed_by": {}, @@ -264,8 +264,8 @@ const myWorkflow = createWorkflow( "declined_at": {}, "canceled_by": {}, "canceled_at": {}, - "created_at": "2025-04-11T09:12:54.599Z", - "updated_at": "2025-04-29T12:08:45.927Z" + "created_at": "2025-11-29T09:04:10.679Z", + "updated_at": "2025-03-31T06:09:14.116Z" } }) } diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelReturnReceiveWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelReturnReceiveWorkflow/page.mdx index b0f1bb5991..160fab187b 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelReturnReceiveWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelReturnReceiveWorkflow/page.mdx @@ -17,27 +17,9 @@ This workflow cancels a return receival. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { cancelReturnReceiveWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = cancelReturnReceiveWorkflow - .runAsStep({ - input: { - "return_id": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -115,6 +97,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { cancelReturnReceiveWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = cancelReturnReceiveWorkflow + .runAsStep({ + input: { + "return_id": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelReturnRequestWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelReturnRequestWorkflow/page.mdx index 5af5b44e20..b25078078c 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelReturnRequestWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelReturnRequestWorkflow/page.mdx @@ -17,27 +17,9 @@ This workflow cancels a requested return. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { cancelReturnRequestWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = cancelReturnRequestWorkflow - .runAsStep({ - input: { - "return_id": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -115,6 +97,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { cancelReturnRequestWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = cancelReturnRequestWorkflow + .runAsStep({ + input: { + "return_id": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelReturnValidateOrder/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelReturnValidateOrder/page.mdx index 25ff2dc94d..729f282943 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelReturnValidateOrder/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelReturnValidateOrder/page.mdx @@ -22,17 +22,17 @@ const myWorkflow = createWorkflow( () => { const data = cancelReturnValidateOrder({ "orderReturn": { - "id": "id_haIoMt6o4tVSFsuB", - "status": "received", + "id": "id_Q48AH2Gw7BKYU", + "status": "canceled", "order_id": "{value}", "items": [{ - "id": "id_waQKH9rBNFj", + "id": "id_SZT5hIWRyATWy", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 9 + "quantity": 36 }], - "display_id": 9, + "display_id": 1, "metadata": {} }, "input": { diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelReturnWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelReturnWorkflow/page.mdx index 9c1c542ddd..512b8a57e6 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelReturnWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelReturnWorkflow/page.mdx @@ -17,27 +17,9 @@ This workflow cancels a return. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { cancelReturnWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = cancelReturnWorkflow - .runAsStep({ - input: { - "return_id": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -115,6 +97,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { cancelReturnWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = cancelReturnWorkflow + .runAsStep({ + input: { + "return_id": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelTransferOrderRequestValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelTransferOrderRequestValidationStep/page.mdx index 3bc777014e..038db49b9d 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelTransferOrderRequestValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelTransferOrderRequestValidationStep/page.mdx @@ -22,198 +22,198 @@ const myWorkflow = createWorkflow( () => { const data = cancelTransferOrderRequestValidationStep({ "order": { - "id": "id_E2Vnf5ZHodjPZPuPGh", - "version": 32, - "display_id": 48, + "id": "id_cudvynAzg7e74", + "version": 0, + "display_id": 9, "status": "pending", "currency_code": "{value}", - "created_at": "2025-03-04T15:09:11.229Z", - "updated_at": "2025-10-18T14:15:32.291Z", + "created_at": "2025-03-29T08:12:04.467Z", + "updated_at": "2025-05-12T19:00:05.666Z", "original_item_total": { - "numeric": 39 + "numeric": 13 }, "original_item_subtotal": { - "numeric": 36 + "numeric": 26 }, "original_item_tax_total": { - "numeric": 23 + "numeric": 13 }, "item_total": { - "numeric": 42 + "numeric": 11 }, "item_subtotal": { - "numeric": 42 + "numeric": 20 }, "item_tax_total": { - "numeric": 15 + "numeric": 48 }, "original_total": { - "numeric": 10 + "numeric": 46 }, "original_subtotal": { - "numeric": 50 + "numeric": 33 }, "original_tax_total": { "numeric": 49 }, "total": { - "numeric": 23 + "numeric": 43 }, "subtotal": { - "numeric": 17 + "numeric": 16 }, "tax_total": { - "numeric": 2 + "numeric": 44 }, "discount_subtotal": { - "numeric": 23 + "numeric": 41 }, "discount_total": { - "numeric": 49 + "numeric": 34 }, "discount_tax_total": { - "numeric": 35 + "numeric": 50 }, "gift_card_total": { - "numeric": 21 + "numeric": 27 }, "gift_card_tax_total": { - "numeric": 12 + "numeric": 13 }, "shipping_total": { - "numeric": 23 + "numeric": 36 }, "shipping_subtotal": { - "numeric": 39 + "numeric": 0 }, "shipping_tax_total": { - "numeric": 20 + "numeric": 23 }, "original_shipping_total": { - "numeric": 21 + "numeric": 41 }, "original_shipping_subtotal": { - "numeric": 7 + "numeric": 10 }, "original_shipping_tax_total": { - "numeric": 46 + "numeric": 15 } }, "orderChange": { - "id": "id_iMp7DPMGCMlz", - "version": 16, + "id": "id_ohThpqsidnAJFYtVDd", + "version": 23, "order_id": "{value}", "return_id": "{value}", "exchange_id": "{value}", "claim_id": "{value}", "order": { - "id": "id_y8jdDt0PNt7tjL", - "version": 47, - "display_id": 21, - "status": "canceled", + "id": "id_mIqZn5CQEuYXq", + "version": 13, + "display_id": 0, + "status": "pending", "currency_code": "{value}", - "created_at": "2025-03-01T01:17:22.836Z", - "updated_at": "2025-10-07T08:47:39.268Z", + "created_at": "2025-07-04T03:39:17.032Z", + "updated_at": "2025-06-02T05:53:44.003Z", "original_item_total": { - "numeric": 6 + "numeric": 26 }, "original_item_subtotal": { - "numeric": 45 + "numeric": 20 }, "original_item_tax_total": { - "numeric": 5 + "numeric": 0 }, "item_total": { - "numeric": 29 + "numeric": 4 }, "item_subtotal": { - "numeric": 46 + "numeric": 17 }, "item_tax_total": { - "numeric": 20 + "numeric": 30 }, "original_total": { - "numeric": 47 + "numeric": 35 }, "original_subtotal": { - "numeric": 12 - }, - "original_tax_total": { - "numeric": 7 - }, - "total": { - "numeric": 25 - }, - "subtotal": { - "numeric": 13 - }, - "tax_total": { - "numeric": 16 - }, - "discount_subtotal": { - "numeric": 16 - }, - "discount_total": { - "numeric": 12 - }, - "discount_tax_total": { "numeric": 42 }, - "gift_card_total": { + "original_tax_total": { + "numeric": 10 + }, + "total": { + "numeric": 10 + }, + "subtotal": { "numeric": 46 }, - "gift_card_tax_total": { - "numeric": 29 + "tax_total": { + "numeric": 44 }, - "shipping_total": { - "numeric": 12 + "discount_subtotal": { + "numeric": 42 }, - "shipping_subtotal": { - "numeric": 3 + "discount_total": { + "numeric": 26 }, - "shipping_tax_total": { + "discount_tax_total": { + "numeric": 27 + }, + "gift_card_total": { "numeric": 19 }, - "original_shipping_total": { + "gift_card_tax_total": { "numeric": 41 }, + "shipping_total": { + "numeric": 9 + }, + "shipping_subtotal": { + "numeric": 2 + }, + "shipping_tax_total": { + "numeric": 17 + }, + "original_shipping_total": { + "numeric": 28 + }, "original_shipping_subtotal": { - "numeric": 36 + "numeric": 28 }, "original_shipping_tax_total": { - "numeric": 20 + "numeric": 25 } }, "return_order": { - "id": "id_q72jYpa5mr", - "status": "received", + "id": "id_ZfOwNp0egQ1TKQDovNeP", + "status": "requested", "order_id": "{value}", "items": [{ - "id": "id_YlbPgcIoGT4KsfNNl", + "id": "id_sWmT3j61HOiF0sTut", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 48 + "quantity": 15 }], - "display_id": 32, + "display_id": 50, "metadata": {} }, "exchange": { - "id": "id_2Pjt5V2CqnObg", + "id": "id_3zyAiIGHjjGtwsX", "order_id": "{value}", - "order_version": 41, - "display_id": 28, + "order_version": 49, + "display_id": 14, "additional_items": [ "{value}" ], "metadata": {} }, "claim": { - "id": "id_sLftx5DeFWD8lqv", - "type": "replace", + "id": "id_ktAgbUkqyBdVoI", + "type": "refund", "order_id": "{value}", - "order_version": 21, - "display_id": 44, + "order_version": 43, + "display_id": 13, "claim_items": [ "{value}" ], @@ -223,7 +223,7 @@ const myWorkflow = createWorkflow( "metadata": {} }, "actions": [{ - "id": "id_O2OSwd2qqtoNzUD", + "id": "id_EzFDbodQiPruNdpHk", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -233,13 +233,13 @@ const myWorkflow = createWorkflow( "order": {}, "reference": "{value}", "reference_id": "{value}", - "action": "DELIVER_ITEM", + "action": "CANCEL_RETURN_ITEM", "details": {}, "internal_note": {}, - "created_at": "2025-03-26T11:04:22.180Z", - "updated_at": "2025-07-19T18:01:43.566Z" + "created_at": "2025-12-08T10:58:23.313Z", + "updated_at": "2025-04-14T01:15:26.103Z" }], - "status": "declined", + "status": "pending", "requested_by": {}, "requested_at": {}, "confirmed_by": {}, @@ -250,8 +250,8 @@ const myWorkflow = createWorkflow( "declined_at": {}, "canceled_by": {}, "canceled_at": {}, - "created_at": "2025-09-23T08:48:46.120Z", - "updated_at": "2025-10-27T07:55:33.699Z" + "created_at": "2025-12-05T20:35:53.395Z", + "updated_at": "2025-12-21T08:04:11.329Z" }, "input": { "order_id": "{value}", diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelValidateOrder/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelValidateOrder/page.mdx index 8381f2d17d..a9ed7d5b50 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelValidateOrder/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.cancelValidateOrder/page.mdx @@ -22,81 +22,81 @@ const myWorkflow = createWorkflow( () => { const data = cancelValidateOrder({ "order": { - "id": "id_Egz68moB58D69zJEF", - "version": 19, - "display_id": 37, - "status": "completed", + "id": "id_bTYS0qVWIJaasCEJ", + "version": 11, + "display_id": 30, + "status": "draft", "currency_code": "{value}", - "created_at": "2025-09-09T14:55:31.355Z", - "updated_at": "2025-01-29T17:34:18.724Z", + "created_at": "2025-05-05T09:23:04.544Z", + "updated_at": "2025-09-24T20:31:17.022Z", "original_item_total": { - "numeric": 18 + "numeric": 36 }, "original_item_subtotal": { - "numeric": 6 + "numeric": 21 }, "original_item_tax_total": { - "numeric": 35 - }, - "item_total": { - "numeric": 17 - }, - "item_subtotal": { - "numeric": 1 - }, - "item_tax_total": { - "numeric": 32 - }, - "original_total": { - "numeric": 42 - }, - "original_subtotal": { - "numeric": 31 - }, - "original_tax_total": { - "numeric": 27 - }, - "total": { - "numeric": 33 - }, - "subtotal": { - "numeric": 32 - }, - "tax_total": { - "numeric": 48 - }, - "discount_subtotal": { "numeric": 10 }, + "item_total": { + "numeric": 36 + }, + "item_subtotal": { + "numeric": 29 + }, + "item_tax_total": { + "numeric": 14 + }, + "original_total": { + "numeric": 35 + }, + "original_subtotal": { + "numeric": 3 + }, + "original_tax_total": { + "numeric": 47 + }, + "total": { + "numeric": 3 + }, + "subtotal": { + "numeric": 2 + }, + "tax_total": { + "numeric": 26 + }, + "discount_subtotal": { + "numeric": 11 + }, "discount_total": { - "numeric": 50 + "numeric": 25 }, "discount_tax_total": { "numeric": 28 }, "gift_card_total": { - "numeric": 38 + "numeric": 40 }, "gift_card_tax_total": { - "numeric": 15 - }, - "shipping_total": { "numeric": 14 }, + "shipping_total": { + "numeric": 39 + }, "shipping_subtotal": { - "numeric": 6 + "numeric": 43 }, "shipping_tax_total": { - "numeric": 50 + "numeric": 23 }, "original_shipping_total": { - "numeric": 4 + "numeric": 50 }, "original_shipping_subtotal": { - "numeric": 2 + "numeric": 15 }, "original_shipping_tax_total": { - "numeric": 18 + "numeric": 14 } }, "input": { diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.completeOrderWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.completeOrderWorkflow/page.mdx index c04b6e3e12..b2a9f9ae1c 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.completeOrderWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.completeOrderWorkflow/page.mdx @@ -22,30 +22,9 @@ You can also use this workflow within your own custom workflows, allowing you to +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { completeOrderWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = completeOrderWorkflow - .runAsStep({ - input: { - orderIds: ["order_1", "order_2"], - additional_data: { - send_webhook: true, - } - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -132,6 +111,29 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { completeOrderWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = completeOrderWorkflow + .runAsStep({ + input: { + orderIds: ["order_1", "order_2"], + additional_data: { + send_webhook: true, + } + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.confirmClaimRequestValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.confirmClaimRequestValidationStep/page.mdx index 95e4403909..8afe78e225 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.confirmClaimRequestValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.confirmClaimRequestValidationStep/page.mdx @@ -22,89 +22,89 @@ const myWorkflow = createWorkflow( () => { const data = confirmClaimRequestValidationStep({ "order": { - "id": "id_5yUZ7kFx20ZWO", - "version": 45, - "display_id": 15, - "status": "archived", + "id": "id_u2eDDbqTNvrHOxlFi", + "version": 36, + "display_id": 17, + "status": "canceled", "currency_code": "{value}", - "created_at": "2025-10-05T04:09:56.805Z", - "updated_at": "2025-11-05T06:35:50.525Z", + "created_at": "2025-07-27T03:28:10.134Z", + "updated_at": "2025-05-02T14:29:10.093Z", "original_item_total": { - "numeric": 42 + "numeric": 21 }, "original_item_subtotal": { - "numeric": 21 + "numeric": 27 }, "original_item_tax_total": { "numeric": 35 }, "item_total": { - "numeric": 0 + "numeric": 3 }, "item_subtotal": { - "numeric": 37 + "numeric": 14 }, "item_tax_total": { - "numeric": 48 + "numeric": 11 }, "original_total": { - "numeric": 25 + "numeric": 14 }, "original_subtotal": { - "numeric": 40 + "numeric": 3 }, "original_tax_total": { - "numeric": 16 - }, - "total": { - "numeric": 25 - }, - "subtotal": { - "numeric": 50 - }, - "tax_total": { - "numeric": 43 - }, - "discount_subtotal": { "numeric": 4 }, + "total": { + "numeric": 10 + }, + "subtotal": { + "numeric": 32 + }, + "tax_total": { + "numeric": 6 + }, + "discount_subtotal": { + "numeric": 11 + }, "discount_total": { - "numeric": 5 + "numeric": 10 }, "discount_tax_total": { - "numeric": 40 + "numeric": 17 }, "gift_card_total": { - "numeric": 7 + "numeric": 38 }, "gift_card_tax_total": { - "numeric": 34 + "numeric": 50 }, "shipping_total": { - "numeric": 22 + "numeric": 49 }, "shipping_subtotal": { - "numeric": 40 + "numeric": 41 }, "shipping_tax_total": { - "numeric": 46 + "numeric": 26 }, "original_shipping_total": { - "numeric": 13 + "numeric": 48 }, "original_shipping_subtotal": { - "numeric": 30 + "numeric": 12 }, "original_shipping_tax_total": { - "numeric": 16 + "numeric": 42 } }, "orderClaim": { - "id": "id_DyV4lo9iBsWo", - "type": "refund", + "id": "id_ure98IdSvYvDo", + "type": "replace", "order_id": "{value}", - "order_version": 31, - "display_id": 40, + "order_version": 20, + "display_id": 0, "claim_items": [ "{value}" ], @@ -114,120 +114,120 @@ const myWorkflow = createWorkflow( "metadata": {} }, "orderChange": { - "id": "id_0yBgZ1CQzCjNw9iY", - "version": 21, + "id": "id_sQlFDsfEQHIJlJ6bS4x6", + "version": 35, "order_id": "{value}", "return_id": "{value}", "exchange_id": "{value}", "claim_id": "{value}", "order": { - "id": "id_m3Zwyg7izzgO0wdeG7b", - "version": 30, - "display_id": 7, - "status": "archived", + "id": "id_FIJWVrb29ryKn", + "version": 45, + "display_id": 2, + "status": "pending", "currency_code": "{value}", - "created_at": "2025-01-25T12:58:33.380Z", - "updated_at": "2025-12-31T11:05:45.729Z", + "created_at": "2025-04-14T06:20:37.402Z", + "updated_at": "2025-05-02T07:46:04.476Z", "original_item_total": { - "numeric": 5 - }, - "original_item_subtotal": { - "numeric": 23 - }, - "original_item_tax_total": { - "numeric": 50 - }, - "item_total": { - "numeric": 36 - }, - "item_subtotal": { - "numeric": 44 - }, - "item_tax_total": { - "numeric": 28 - }, - "original_total": { - "numeric": 9 - }, - "original_subtotal": { - "numeric": 44 - }, - "original_tax_total": { - "numeric": 17 - }, - "total": { - "numeric": 28 - }, - "subtotal": { - "numeric": 29 - }, - "tax_total": { - "numeric": 46 - }, - "discount_subtotal": { - "numeric": 30 - }, - "discount_total": { - "numeric": 35 - }, - "discount_tax_total": { - "numeric": 46 - }, - "gift_card_total": { - "numeric": 50 - }, - "gift_card_tax_total": { - "numeric": 45 - }, - "shipping_total": { - "numeric": 43 - }, - "shipping_subtotal": { - "numeric": 13 - }, - "shipping_tax_total": { - "numeric": 10 - }, - "original_shipping_total": { "numeric": 39 }, + "original_item_subtotal": { + "numeric": 15 + }, + "original_item_tax_total": { + "numeric": 13 + }, + "item_total": { + "numeric": 6 + }, + "item_subtotal": { + "numeric": 32 + }, + "item_tax_total": { + "numeric": 44 + }, + "original_total": { + "numeric": 17 + }, + "original_subtotal": { + "numeric": 27 + }, + "original_tax_total": { + "numeric": 2 + }, + "total": { + "numeric": 7 + }, + "subtotal": { + "numeric": 20 + }, + "tax_total": { + "numeric": 8 + }, + "discount_subtotal": { + "numeric": 49 + }, + "discount_total": { + "numeric": 44 + }, + "discount_tax_total": { + "numeric": 22 + }, + "gift_card_total": { + "numeric": 0 + }, + "gift_card_tax_total": { + "numeric": 43 + }, + "shipping_total": { + "numeric": 22 + }, + "shipping_subtotal": { + "numeric": 40 + }, + "shipping_tax_total": { + "numeric": 0 + }, + "original_shipping_total": { + "numeric": 10 + }, "original_shipping_subtotal": { - "numeric": 41 + "numeric": 30 }, "original_shipping_tax_total": { - "numeric": 43 + "numeric": 8 } }, "return_order": { - "id": "id_W6naiH12RrwF2txm", - "status": "requested", + "id": "id_I0VIKnyDAvi6LzkCtX", + "status": "canceled", "order_id": "{value}", "items": [{ - "id": "id_EsOP4l247JNP5GrNelo", + "id": "id_1V81zNggKaZgYQgadx", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 8 + "quantity": 9 }], - "display_id": 39, + "display_id": 36, "metadata": {} }, "exchange": { - "id": "id_Pc9u5HqVpzIYFhxq", + "id": "id_O67iGgLFCYwO", "order_id": "{value}", - "order_version": 30, - "display_id": 41, + "order_version": 28, + "display_id": 27, "additional_items": [ "{value}" ], "metadata": {} }, "claim": { - "id": "id_WRpwOgG8hcfyK", - "type": "replace", + "id": "id_qoEudupFnxXi5OFQ0V", + "type": "refund", "order_id": "{value}", - "order_version": 21, - "display_id": 32, + "order_version": 15, + "display_id": 25, "claim_items": [ "{value}" ], @@ -237,7 +237,7 @@ const myWorkflow = createWorkflow( "metadata": {} }, "actions": [{ - "id": "id_ASSAcddM8TgV85V0YfSK", + "id": "id_qlmXKoxHO4HSpmVXKX", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -247,13 +247,13 @@ const myWorkflow = createWorkflow( "order": {}, "reference": "{value}", "reference_id": "{value}", - "action": "DELIVER_ITEM", + "action": "TRANSFER_CUSTOMER", "details": {}, "internal_note": {}, - "created_at": "2025-03-22T04:39:44.078Z", - "updated_at": "2025-06-20T20:47:12.369Z" + "created_at": "2025-10-14T19:01:12.973Z", + "updated_at": "2025-11-04T12:59:05.408Z" }], - "status": "confirmed", + "status": "canceled", "requested_by": {}, "requested_at": {}, "confirmed_by": {}, @@ -264,8 +264,8 @@ const myWorkflow = createWorkflow( "declined_at": {}, "canceled_by": {}, "canceled_at": {}, - "created_at": "2025-05-08T21:59:56.833Z", - "updated_at": "2025-12-26T19:06:49.223Z" + "created_at": "2026-01-09T16:31:43.765Z", + "updated_at": "2025-08-27T09:43:56.053Z" } }) } diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.confirmClaimRequestWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.confirmClaimRequestWorkflow/page.mdx index 923ed65fbb..da720626c1 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.confirmClaimRequestWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.confirmClaimRequestWorkflow/page.mdx @@ -22,27 +22,9 @@ This workflow confirms a requested claim. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { confirmClaimRequestWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = confirmClaimRequestWorkflow - .runAsStep({ - input: { - "claim_id": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -120,6 +102,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { confirmClaimRequestWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = confirmClaimRequestWorkflow + .runAsStep({ + input: { + "claim_id": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.confirmExchangeRequestValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.confirmExchangeRequestValidationStep/page.mdx index 8ca5c95836..f1337b75be 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.confirmExchangeRequestValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.confirmExchangeRequestValidationStep/page.mdx @@ -22,208 +22,208 @@ const myWorkflow = createWorkflow( () => { const data = confirmExchangeRequestValidationStep({ "order": { - "id": "id_6oc1ejCuFzhFr4QtH", - "version": 6, - "display_id": 31, + "id": "id_C7ECRXK8YU4RzqtMbcl", + "version": 9, + "display_id": 42, "status": "archived", "currency_code": "{value}", - "created_at": "2025-07-27T15:21:29.314Z", - "updated_at": "2025-04-02T22:05:50.705Z", + "created_at": "2025-12-29T00:06:46.539Z", + "updated_at": "2025-05-07T20:48:24.453Z", "original_item_total": { "numeric": 39 }, "original_item_subtotal": { - "numeric": 16 + "numeric": 3 }, "original_item_tax_total": { - "numeric": 21 + "numeric": 22 }, "item_total": { - "numeric": 20 + "numeric": 23 }, "item_subtotal": { - "numeric": 20 - }, - "item_tax_total": { - "numeric": 15 - }, - "original_total": { - "numeric": 39 - }, - "original_subtotal": { - "numeric": 46 - }, - "original_tax_total": { - "numeric": 38 - }, - "total": { - "numeric": 43 - }, - "subtotal": { - "numeric": 44 - }, - "tax_total": { - "numeric": 7 - }, - "discount_subtotal": { "numeric": 11 }, - "discount_total": { + "item_tax_total": { + "numeric": 1 + }, + "original_total": { + "numeric": 35 + }, + "original_subtotal": { + "numeric": 33 + }, + "original_tax_total": { "numeric": 24 }, + "total": { + "numeric": 44 + }, + "subtotal": { + "numeric": 5 + }, + "tax_total": { + "numeric": 45 + }, + "discount_subtotal": { + "numeric": 34 + }, + "discount_total": { + "numeric": 22 + }, "discount_tax_total": { - "numeric": 6 + "numeric": 25 }, "gift_card_total": { - "numeric": 3 + "numeric": 27 }, "gift_card_tax_total": { "numeric": 27 }, "shipping_total": { - "numeric": 14 + "numeric": 45 }, "shipping_subtotal": { - "numeric": 6 + "numeric": 24 }, "shipping_tax_total": { - "numeric": 42 + "numeric": 37 }, "original_shipping_total": { - "numeric": 50 + "numeric": 23 }, "original_shipping_subtotal": { - "numeric": 4 + "numeric": 2 }, "original_shipping_tax_total": { - "numeric": 20 + "numeric": 24 } }, "orderExchange": { - "id": "id_iazXhSaE4XgF8lbAUoRp", + "id": "id_UYw7NTICwSnbdoF17S", "order_id": "{value}", - "order_version": 42, - "display_id": 49, + "order_version": 40, + "display_id": 45, "additional_items": [ "{value}" ], "metadata": {} }, "orderChange": { - "id": "id_3KkAv7nUObTu7QX8wUGZ", - "version": 29, + "id": "id_dQzieVepw5rtl", + "version": 12, "order_id": "{value}", "return_id": "{value}", "exchange_id": "{value}", "claim_id": "{value}", "order": { - "id": "id_1BdYClyP7lTTB7bWyY9M", - "version": 48, - "display_id": 12, - "status": "pending", + "id": "id_OXXbSq93gUloT", + "version": 29, + "display_id": 0, + "status": "archived", "currency_code": "{value}", - "created_at": "2026-01-13T13:04:41.947Z", - "updated_at": "2026-01-13T03:01:06.708Z", + "created_at": "2025-02-26T06:21:02.300Z", + "updated_at": "2025-10-02T18:33:17.955Z", "original_item_total": { - "numeric": 27 + "numeric": 41 }, "original_item_subtotal": { - "numeric": 7 + "numeric": 35 }, "original_item_tax_total": { - "numeric": 26 + "numeric": 14 }, "item_total": { - "numeric": 40 + "numeric": 44 }, "item_subtotal": { - "numeric": 45 + "numeric": 0 }, "item_tax_total": { - "numeric": 33 + "numeric": 24 }, "original_total": { - "numeric": 33 + "numeric": 26 }, "original_subtotal": { - "numeric": 10 + "numeric": 45 }, "original_tax_total": { - "numeric": 17 + "numeric": 26 }, "total": { - "numeric": 20 + "numeric": 24 }, "subtotal": { - "numeric": 6 - }, - "tax_total": { - "numeric": 34 - }, - "discount_subtotal": { - "numeric": 30 - }, - "discount_total": { - "numeric": 28 - }, - "discount_tax_total": { "numeric": 36 }, + "tax_total": { + "numeric": 17 + }, + "discount_subtotal": { + "numeric": 44 + }, + "discount_total": { + "numeric": 21 + }, + "discount_tax_total": { + "numeric": 38 + }, "gift_card_total": { - "numeric": 22 + "numeric": 46 }, "gift_card_tax_total": { - "numeric": 22 + "numeric": 18 }, "shipping_total": { - "numeric": 18 + "numeric": 5 }, "shipping_subtotal": { "numeric": 36 }, "shipping_tax_total": { - "numeric": 24 + "numeric": 44 }, "original_shipping_total": { - "numeric": 17 + "numeric": 40 }, "original_shipping_subtotal": { - "numeric": 7 + "numeric": 38 }, "original_shipping_tax_total": { - "numeric": 47 + "numeric": 43 } }, "return_order": { - "id": "id_CRjwmQlwdQ", - "status": "partially_received", + "id": "id_KVA0i6XUdsfs2QoV9Jf", + "status": "received", "order_id": "{value}", "items": [{ - "id": "id_bfVnWkcowUGC", + "id": "id_b0hRf07few", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 50 + "quantity": 5 }], - "display_id": 24, + "display_id": 21, "metadata": {} }, "exchange": { - "id": "id_GP5hbrXMRQV", + "id": "id_cssMuD0rdfG", "order_id": "{value}", - "order_version": 4, - "display_id": 13, + "order_version": 46, + "display_id": 19, "additional_items": [ "{value}" ], "metadata": {} }, "claim": { - "id": "id_0rljvhwllAVhR", + "id": "id_zjnfcWmsNQefue", "type": "replace", "order_id": "{value}", - "order_version": 5, - "display_id": 32, + "order_version": 33, + "display_id": 16, "claim_items": [ "{value}" ], @@ -233,7 +233,7 @@ const myWorkflow = createWorkflow( "metadata": {} }, "actions": [{ - "id": "id_bJuVG3wTUtyKvvI3WO", + "id": "id_euQgHcNNzdLJ", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -243,13 +243,13 @@ const myWorkflow = createWorkflow( "order": {}, "reference": "{value}", "reference_id": "{value}", - "action": "ITEM_ADD", + "action": "RECEIVE_DAMAGED_RETURN_ITEM", "details": {}, "internal_note": {}, - "created_at": "2025-08-01T09:58:39.478Z", - "updated_at": "2025-12-03T02:24:51.787Z" + "created_at": "2025-05-10T10:34:11.869Z", + "updated_at": "2025-10-16T06:16:12.846Z" }], - "status": "requested", + "status": "confirmed", "requested_by": {}, "requested_at": {}, "confirmed_by": {}, @@ -260,8 +260,8 @@ const myWorkflow = createWorkflow( "declined_at": {}, "canceled_by": {}, "canceled_at": {}, - "created_at": "2025-07-14T15:55:27.906Z", - "updated_at": "2025-09-08T10:50:28.916Z" + "created_at": "2025-08-15T19:12:23.395Z", + "updated_at": "2025-10-11T17:32:13.731Z" } }) } diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.confirmExchangeRequestWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.confirmExchangeRequestWorkflow/page.mdx index 2a3f3b68e4..890f676208 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.confirmExchangeRequestWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.confirmExchangeRequestWorkflow/page.mdx @@ -22,27 +22,9 @@ This workflow confirms an exchange request. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { confirmExchangeRequestWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = confirmExchangeRequestWorkflow - .runAsStep({ - input: { - "exchange_id": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -120,6 +102,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { confirmExchangeRequestWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = confirmExchangeRequestWorkflow + .runAsStep({ + input: { + "exchange_id": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.confirmOrderEditRequestValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.confirmOrderEditRequestValidationStep/page.mdx index a0ba988b0a..ae80339baa 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.confirmOrderEditRequestValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.confirmOrderEditRequestValidationStep/page.mdx @@ -22,198 +22,198 @@ const myWorkflow = createWorkflow( () => { const data = confirmOrderEditRequestValidationStep({ "order": { - "id": "id_yYWDTLQAyJKHwI2uT", - "version": 31, - "display_id": 18, - "status": "canceled", + "id": "id_N60PPyHbjQMeiPNIaXfb", + "version": 44, + "display_id": 15, + "status": "requires_action", "currency_code": "{value}", - "created_at": "2025-05-06T12:05:44.002Z", - "updated_at": "2025-04-15T03:00:58.956Z", + "created_at": "2025-09-29T09:01:21.233Z", + "updated_at": "2025-05-15T20:49:52.798Z", "original_item_total": { - "numeric": 37 + "numeric": 12 }, "original_item_subtotal": { - "numeric": 19 + "numeric": 13 }, "original_item_tax_total": { - "numeric": 31 + "numeric": 17 }, "item_total": { - "numeric": 5 + "numeric": 25 }, "item_subtotal": { - "numeric": 50 + "numeric": 8 }, "item_tax_total": { - "numeric": 29 + "numeric": 6 }, "original_total": { - "numeric": 19 + "numeric": 13 }, "original_subtotal": { - "numeric": 35 + "numeric": 26 }, "original_tax_total": { - "numeric": 7 + "numeric": 23 }, "total": { - "numeric": 38 + "numeric": 49 }, "subtotal": { - "numeric": 9 + "numeric": 41 }, "tax_total": { - "numeric": 31 + "numeric": 15 }, "discount_subtotal": { - "numeric": 43 + "numeric": 20 }, "discount_total": { - "numeric": 34 + "numeric": 3 }, "discount_tax_total": { - "numeric": 19 + "numeric": 39 }, "gift_card_total": { - "numeric": 7 + "numeric": 0 }, "gift_card_tax_total": { - "numeric": 38 + "numeric": 29 }, "shipping_total": { - "numeric": 37 + "numeric": 5 }, "shipping_subtotal": { "numeric": 26 }, "shipping_tax_total": { - "numeric": 13 + "numeric": 42 }, "original_shipping_total": { - "numeric": 28 + "numeric": 47 }, "original_shipping_subtotal": { - "numeric": 49 + "numeric": 21 }, "original_shipping_tax_total": { - "numeric": 45 + "numeric": 23 } }, "orderChange": { - "id": "id_Jd6kjmbi1ONECKBGL", - "version": 39, + "id": "id_pReh2vAQW89", + "version": 27, "order_id": "{value}", "return_id": "{value}", "exchange_id": "{value}", "claim_id": "{value}", "order": { - "id": "id_4XwFouVWxBg8", - "version": 46, - "display_id": 48, - "status": "draft", + "id": "id_7rKJDNvFYNsGJwBCmaIh", + "version": 41, + "display_id": 26, + "status": "completed", "currency_code": "{value}", - "created_at": "2025-03-03T11:50:29.439Z", - "updated_at": "2025-02-11T01:55:25.947Z", + "created_at": "2025-05-26T10:17:30.300Z", + "updated_at": "2025-02-11T23:39:39.317Z", "original_item_total": { - "numeric": 0 + "numeric": 17 }, "original_item_subtotal": { - "numeric": 28 + "numeric": 25 }, "original_item_tax_total": { - "numeric": 49 + "numeric": 22 }, "item_total": { - "numeric": 31 + "numeric": 17 }, "item_subtotal": { - "numeric": 50 + "numeric": 33 }, "item_tax_total": { - "numeric": 50 + "numeric": 17 }, "original_total": { - "numeric": 5 + "numeric": 11 }, "original_subtotal": { - "numeric": 29 + "numeric": 19 }, "original_tax_total": { "numeric": 1 }, "total": { - "numeric": 8 + "numeric": 30 }, "subtotal": { - "numeric": 5 + "numeric": 4 }, "tax_total": { - "numeric": 10 + "numeric": 15 }, "discount_subtotal": { - "numeric": 36 + "numeric": 11 }, "discount_total": { - "numeric": 14 + "numeric": 28 }, "discount_tax_total": { - "numeric": 48 + "numeric": 19 }, "gift_card_total": { - "numeric": 49 + "numeric": 10 }, "gift_card_tax_total": { - "numeric": 13 + "numeric": 26 }, "shipping_total": { - "numeric": 21 + "numeric": 30 }, "shipping_subtotal": { - "numeric": 44 + "numeric": 10 }, "shipping_tax_total": { - "numeric": 29 + "numeric": 22 }, "original_shipping_total": { - "numeric": 34 + "numeric": 39 }, "original_shipping_subtotal": { - "numeric": 41 + "numeric": 30 }, "original_shipping_tax_total": { - "numeric": 12 + "numeric": 44 } }, "return_order": { - "id": "id_0siSH8csFMPf8Eqg", - "status": "canceled", + "id": "id_1Rd08e8Iff", + "status": "partially_received", "order_id": "{value}", "items": [{ - "id": "id_aQ35IEIjxJJM", + "id": "id_M5ivG8agnIGgiWSRuN7q", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 7 + "quantity": 41 }], - "display_id": 42, + "display_id": 46, "metadata": {} }, "exchange": { - "id": "id_uVoc8jidW2Z", + "id": "id_ARDKuPmpNc9jXky6U", "order_id": "{value}", - "order_version": 30, - "display_id": 12, + "order_version": 46, + "display_id": 29, "additional_items": [ "{value}" ], "metadata": {} }, "claim": { - "id": "id_8DTCRuugeaa44t8TAE", - "type": "replace", + "id": "id_sM2TAwb84q243r", + "type": "refund", "order_id": "{value}", - "order_version": 29, - "display_id": 18, + "order_version": 42, + "display_id": 9, "claim_items": [ "{value}" ], @@ -223,7 +223,7 @@ const myWorkflow = createWorkflow( "metadata": {} }, "actions": [{ - "id": "id_gsBfo5oqa3TRHUHJc", + "id": "id_a6oMZz7cp9iQHL2gMOnh", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -233,13 +233,13 @@ const myWorkflow = createWorkflow( "order": {}, "reference": "{value}", "reference_id": "{value}", - "action": "SHIPPING_ADD", + "action": "CANCEL_RETURN_ITEM", "details": {}, "internal_note": {}, - "created_at": "2026-01-07T17:25:42.195Z", - "updated_at": "2025-04-26T08:49:00.075Z" + "created_at": "2026-01-02T22:32:26.116Z", + "updated_at": "2025-07-11T05:49:25.776Z" }], - "status": "pending", + "status": "declined", "requested_by": {}, "requested_at": {}, "confirmed_by": {}, @@ -250,8 +250,8 @@ const myWorkflow = createWorkflow( "declined_at": {}, "canceled_by": {}, "canceled_at": {}, - "created_at": "2025-04-16T10:57:44.842Z", - "updated_at": "2025-07-04T23:07:31.519Z" + "created_at": "2025-06-11T16:27:58.557Z", + "updated_at": "2025-06-16T03:34:42.786Z" } }) } diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.confirmOrderEditRequestWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.confirmOrderEditRequestWorkflow/page.mdx index 37dad75d28..61e42be4e5 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.confirmOrderEditRequestWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.confirmOrderEditRequestWorkflow/page.mdx @@ -19,27 +19,9 @@ This workflow confirms an order edit request. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { confirmOrderEditRequestWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = confirmOrderEditRequestWorkflow - .runAsStep({ - input: { - "order_id": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -117,6 +99,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { confirmOrderEditRequestWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = confirmOrderEditRequestWorkflow + .runAsStep({ + input: { + "order_id": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.confirmReceiveReturnValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.confirmReceiveReturnValidationStep/page.mdx index ce0fec302c..b5200ad0e4 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.confirmReceiveReturnValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.confirmReceiveReturnValidationStep/page.mdx @@ -22,212 +22,212 @@ const myWorkflow = createWorkflow( () => { const data = confirmReceiveReturnValidationStep({ "order": { - "id": "id_A7V3ds2EkLF0vjI", - "version": 19, - "display_id": 7, - "status": "completed", + "id": "id_nRNAxZvwW0yESANM1dxt", + "version": 21, + "display_id": 31, + "status": "canceled", "currency_code": "{value}", - "created_at": "2025-05-21T14:10:59.348Z", - "updated_at": "2025-02-10T11:58:13.413Z", + "created_at": "2025-06-09T01:41:39.095Z", + "updated_at": "2025-05-26T03:30:46.514Z", "original_item_total": { - "numeric": 36 + "numeric": 21 }, "original_item_subtotal": { - "numeric": 25 + "numeric": 21 }, "original_item_tax_total": { - "numeric": 40 + "numeric": 48 }, "item_total": { - "numeric": 39 - }, - "item_subtotal": { - "numeric": 50 - }, - "item_tax_total": { - "numeric": 20 - }, - "original_total": { - "numeric": 7 - }, - "original_subtotal": { - "numeric": 11 - }, - "original_tax_total": { - "numeric": 44 - }, - "total": { - "numeric": 12 - }, - "subtotal": { "numeric": 32 }, - "tax_total": { - "numeric": 26 + "item_subtotal": { + "numeric": 28 }, - "discount_subtotal": { - "numeric": 13 - }, - "discount_total": { - "numeric": 33 - }, - "discount_tax_total": { - "numeric": 6 - }, - "gift_card_total": { - "numeric": 4 - }, - "gift_card_tax_total": { - "numeric": 14 - }, - "shipping_total": { + "item_tax_total": { "numeric": 11 }, - "shipping_subtotal": { - "numeric": 35 + "original_total": { + "numeric": 17 }, - "shipping_tax_total": { + "original_subtotal": { + "numeric": 40 + }, + "original_tax_total": { "numeric": 47 }, - "original_shipping_total": { + "total": { + "numeric": 15 + }, + "subtotal": { "numeric": 5 }, + "tax_total": { + "numeric": 21 + }, + "discount_subtotal": { + "numeric": 6 + }, + "discount_total": { + "numeric": 38 + }, + "discount_tax_total": { + "numeric": 32 + }, + "gift_card_total": { + "numeric": 23 + }, + "gift_card_tax_total": { + "numeric": 2 + }, + "shipping_total": { + "numeric": 12 + }, + "shipping_subtotal": { + "numeric": 8 + }, + "shipping_tax_total": { + "numeric": 46 + }, + "original_shipping_total": { + "numeric": 32 + }, "original_shipping_subtotal": { - "numeric": 14 + "numeric": 4 }, "original_shipping_tax_total": { - "numeric": 29 + "numeric": 6 } }, "orderReturn": { - "id": "id_pbZJuhBjne7", - "status": "canceled", + "id": "id_pnzfnGo45AccomjC", + "status": "partially_received", "order_id": "{value}", "items": [{ - "id": "id_PH1awf95NXOtJRm0PTxW", + "id": "id_AjG2XbHJQGc4wdlCw", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 5 + "quantity": 29 }], - "display_id": 0, + "display_id": 35, "metadata": {} }, "orderChange": { - "id": "id_PDwWG7Hh26K572b", - "version": 10, + "id": "id_HiXKMwhsBrMSdus", + "version": 0, "order_id": "{value}", "return_id": "{value}", "exchange_id": "{value}", "claim_id": "{value}", "order": { - "id": "id_lSSqKTODMTgp3VS", - "version": 5, + "id": "id_gNR2WDSJDWspkWWbO", + "version": 25, "display_id": 47, - "status": "canceled", + "status": "archived", "currency_code": "{value}", - "created_at": "2025-11-30T21:56:45.271Z", - "updated_at": "2025-11-20T11:38:10.130Z", + "created_at": "2025-09-21T00:05:06.983Z", + "updated_at": "2025-06-08T12:20:08.074Z", "original_item_total": { - "numeric": 45 + "numeric": 35 }, "original_item_subtotal": { - "numeric": 39 + "numeric": 29 }, "original_item_tax_total": { - "numeric": 32 + "numeric": 25 }, "item_total": { - "numeric": 13 + "numeric": 8 }, "item_subtotal": { - "numeric": 1 + "numeric": 14 }, "item_tax_total": { - "numeric": 26 + "numeric": 12 }, "original_total": { - "numeric": 50 + "numeric": 11 }, "original_subtotal": { "numeric": 33 }, "original_tax_total": { - "numeric": 15 + "numeric": 26 }, "total": { - "numeric": 12 + "numeric": 37 }, "subtotal": { - "numeric": 35 + "numeric": 42 }, "tax_total": { - "numeric": 50 + "numeric": 12 }, "discount_subtotal": { - "numeric": 19 + "numeric": 9 }, "discount_total": { - "numeric": 16 + "numeric": 41 }, "discount_tax_total": { - "numeric": 14 + "numeric": 40 }, "gift_card_total": { - "numeric": 8 + "numeric": 0 }, "gift_card_tax_total": { - "numeric": 10 - }, - "shipping_total": { - "numeric": 6 - }, - "shipping_subtotal": { "numeric": 4 }, + "shipping_total": { + "numeric": 31 + }, + "shipping_subtotal": { + "numeric": 3 + }, "shipping_tax_total": { - "numeric": 7 - }, - "original_shipping_total": { - "numeric": 2 - }, - "original_shipping_subtotal": { "numeric": 28 }, + "original_shipping_total": { + "numeric": 19 + }, + "original_shipping_subtotal": { + "numeric": 12 + }, "original_shipping_tax_total": { - "numeric": 37 + "numeric": 34 } }, "return_order": { - "id": "id_3enAF1ugJrTFZ6zy0M", - "status": "received", + "id": "id_lysJoiTzVXy3z4n5", + "status": "requested", "order_id": "{value}", "items": [{ - "id": "id_ToehWiC1y8fahlu", + "id": "id_GEhAQu8SKIhiC39", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 5 + "quantity": 27 }], - "display_id": 42, + "display_id": 26, "metadata": {} }, "exchange": { - "id": "id_plN7pYoq0IW88k37d", + "id": "id_EnDVR6a83HDN7Tc", "order_id": "{value}", - "order_version": 47, - "display_id": 15, + "order_version": 12, + "display_id": 17, "additional_items": [ "{value}" ], "metadata": {} }, "claim": { - "id": "id_3wwt1eaQ52Rn", + "id": "id_FQ2msYux12Nqf", "type": "refund", "order_id": "{value}", - "order_version": 31, - "display_id": 11, + "order_version": 36, + "display_id": 1, "claim_items": [ "{value}" ], @@ -237,7 +237,7 @@ const myWorkflow = createWorkflow( "metadata": {} }, "actions": [{ - "id": "id_6j9RraALwQYms", + "id": "id_4BHjK5kQGZl0vD", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -247,13 +247,13 @@ const myWorkflow = createWorkflow( "order": {}, "reference": "{value}", "reference_id": "{value}", - "action": "SHIPPING_ADD", + "action": "RECEIVE_RETURN_ITEM", "details": {}, "internal_note": {}, - "created_at": "2025-06-25T15:03:59.402Z", - "updated_at": "2025-11-17T23:53:17.556Z" + "created_at": "2025-12-26T12:14:26.964Z", + "updated_at": "2025-09-07T02:36:34.256Z" }], - "status": "requested", + "status": "pending", "requested_by": {}, "requested_at": {}, "confirmed_by": {}, @@ -264,8 +264,8 @@ const myWorkflow = createWorkflow( "declined_at": {}, "canceled_by": {}, "canceled_at": {}, - "created_at": "2025-04-21T05:58:56.162Z", - "updated_at": "2025-01-18T22:29:40.143Z" + "created_at": "2025-12-01T20:19:33.766Z", + "updated_at": "2025-01-17T12:12:29.364Z" } }) } diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.confirmReturnReceiveWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.confirmReturnReceiveWorkflow/page.mdx index 2dd2399e1f..91b360b806 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.confirmReturnReceiveWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.confirmReturnReceiveWorkflow/page.mdx @@ -19,27 +19,9 @@ This workflow confirms a return receival request. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { confirmReturnReceiveWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = confirmReturnReceiveWorkflow - .runAsStep({ - input: { - "return_id": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -117,6 +99,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { confirmReturnReceiveWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = confirmReturnReceiveWorkflow + .runAsStep({ + input: { + "return_id": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.confirmReturnRequestValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.confirmReturnRequestValidationStep/page.mdx index 8241005854..d9569dce4d 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.confirmReturnRequestValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.confirmReturnRequestValidationStep/page.mdx @@ -22,212 +22,212 @@ const myWorkflow = createWorkflow( () => { const data = confirmReturnRequestValidationStep({ "order": { - "id": "id_P5fu9thdd5btr", - "version": 0, - "display_id": 3, - "status": "archived", + "id": "id_0NVlVxiE5GQ", + "version": 45, + "display_id": 36, + "status": "completed", "currency_code": "{value}", - "created_at": "2026-01-12T12:39:06.734Z", - "updated_at": "2025-05-03T12:18:46.592Z", + "created_at": "2025-09-19T17:59:21.274Z", + "updated_at": "2025-09-13T18:57:59.962Z", "original_item_total": { - "numeric": 14 + "numeric": 5 }, "original_item_subtotal": { - "numeric": 2 + "numeric": 6 }, "original_item_tax_total": { - "numeric": 29 + "numeric": 11 }, "item_total": { - "numeric": 15 - }, - "item_subtotal": { - "numeric": 10 - }, - "item_tax_total": { - "numeric": 35 - }, - "original_total": { - "numeric": 33 - }, - "original_subtotal": { - "numeric": 32 - }, - "original_tax_total": { - "numeric": 48 - }, - "total": { - "numeric": 12 - }, - "subtotal": { - "numeric": 15 - }, - "tax_total": { - "numeric": 46 - }, - "discount_subtotal": { - "numeric": 15 - }, - "discount_total": { - "numeric": 45 - }, - "discount_tax_total": { - "numeric": 50 - }, - "gift_card_total": { - "numeric": 15 - }, - "gift_card_tax_total": { - "numeric": 39 - }, - "shipping_total": { - "numeric": 40 - }, - "shipping_subtotal": { - "numeric": 9 - }, - "shipping_tax_total": { - "numeric": 43 - }, - "original_shipping_total": { "numeric": 21 }, - "original_shipping_subtotal": { + "item_subtotal": { + "numeric": 32 + }, + "item_tax_total": { + "numeric": 49 + }, + "original_total": { + "numeric": 39 + }, + "original_subtotal": { + "numeric": 31 + }, + "original_tax_total": { + "numeric": 42 + }, + "total": { + "numeric": 9 + }, + "subtotal": { + "numeric": 41 + }, + "tax_total": { + "numeric": 6 + }, + "discount_subtotal": { + "numeric": 11 + }, + "discount_total": { + "numeric": 41 + }, + "discount_tax_total": { + "numeric": 28 + }, + "gift_card_total": { "numeric": 23 }, + "gift_card_tax_total": { + "numeric": 38 + }, + "shipping_total": { + "numeric": 31 + }, + "shipping_subtotal": { + "numeric": 23 + }, + "shipping_tax_total": { + "numeric": 9 + }, + "original_shipping_total": { + "numeric": 17 + }, + "original_shipping_subtotal": { + "numeric": 47 + }, "original_shipping_tax_total": { - "numeric": 6 + "numeric": 43 } }, "orderReturn": { - "id": "id_bDYJDGTF6iw0EQyA6ZKI", - "status": "canceled", + "id": "id_jMFDq8bmzhDxwMIIVU", + "status": "received", "order_id": "{value}", "items": [{ - "id": "id_X52wvPmtmW6Qy", + "id": "id_JvZJfB2BEdob8sqT57m", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 41 + "quantity": 30 }], - "display_id": 16, + "display_id": 32, "metadata": {} }, "orderChange": { - "id": "id_jig0HIVBAGfr", - "version": 6, + "id": "id_s2rjLjKQmdZdjEO1f", + "version": 19, "order_id": "{value}", "return_id": "{value}", "exchange_id": "{value}", "claim_id": "{value}", "order": { - "id": "id_0dQGq0oTVw7mBPOOFYq", - "version": 36, - "display_id": 27, - "status": "completed", + "id": "id_KaDiRQuh7v2sbC0", + "version": 13, + "display_id": 6, + "status": "pending", "currency_code": "{value}", - "created_at": "2025-11-16T01:39:05.976Z", - "updated_at": "2025-09-26T09:57:16.535Z", + "created_at": "2025-08-28T22:45:17.001Z", + "updated_at": "2025-04-28T03:29:30.926Z", "original_item_total": { - "numeric": 4 + "numeric": 33 }, "original_item_subtotal": { - "numeric": 9 + "numeric": 24 }, "original_item_tax_total": { - "numeric": 13 + "numeric": 30 }, "item_total": { - "numeric": 34 + "numeric": 5 }, "item_subtotal": { - "numeric": 35 + "numeric": 17 }, "item_tax_total": { - "numeric": 9 + "numeric": 30 }, "original_total": { - "numeric": 32 + "numeric": 13 }, "original_subtotal": { - "numeric": 37 + "numeric": 29 }, "original_tax_total": { - "numeric": 33 + "numeric": 17 }, "total": { - "numeric": 9 + "numeric": 41 }, "subtotal": { - "numeric": 39 + "numeric": 48 }, "tax_total": { - "numeric": 33 + "numeric": 30 }, "discount_subtotal": { - "numeric": 1 - }, - "discount_total": { - "numeric": 22 - }, - "discount_tax_total": { - "numeric": 11 - }, - "gift_card_total": { "numeric": 15 }, + "discount_total": { + "numeric": 33 + }, + "discount_tax_total": { + "numeric": 2 + }, + "gift_card_total": { + "numeric": 25 + }, "gift_card_tax_total": { - "numeric": 37 + "numeric": 16 }, "shipping_total": { - "numeric": 6 + "numeric": 3 }, "shipping_subtotal": { - "numeric": 36 + "numeric": 17 }, "shipping_tax_total": { - "numeric": 35 + "numeric": 12 }, "original_shipping_total": { - "numeric": 8 + "numeric": 22 }, "original_shipping_subtotal": { - "numeric": 27 + "numeric": 5 }, "original_shipping_tax_total": { - "numeric": 16 + "numeric": 3 } }, "return_order": { - "id": "id_1Dq23zySZJDfD", - "status": "partially_received", + "id": "id_NA8AmyP0tcueCwuGw", + "status": "requested", "order_id": "{value}", "items": [{ - "id": "id_XQfJcMLYYmrNcHJ", + "id": "id_AjHhTKjbi4PFVMTZtIgO", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 12 + "quantity": 50 }], - "display_id": 28, + "display_id": 27, "metadata": {} }, "exchange": { - "id": "id_aCo9lAr4W6VLfUsJ", + "id": "id_npsSuNZ0QmO", "order_id": "{value}", - "order_version": 34, - "display_id": 49, + "order_version": 44, + "display_id": 19, "additional_items": [ "{value}" ], "metadata": {} }, "claim": { - "id": "id_VMBXbbc7EhjH", - "type": "refund", + "id": "id_J8bllLxwKCw1s6GO", + "type": "replace", "order_id": "{value}", - "order_version": 28, - "display_id": 29, + "order_version": 40, + "display_id": 31, "claim_items": [ "{value}" ], @@ -237,7 +237,7 @@ const myWorkflow = createWorkflow( "metadata": {} }, "actions": [{ - "id": "id_3pSOaZgZ7TD6G74D", + "id": "id_7vqSdsYKOPWQ3", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -247,13 +247,13 @@ const myWorkflow = createWorkflow( "order": {}, "reference": "{value}", "reference_id": "{value}", - "action": "DELIVER_ITEM", + "action": "RECEIVE_DAMAGED_RETURN_ITEM", "details": {}, "internal_note": {}, - "created_at": "2025-08-14T03:58:49.865Z", - "updated_at": "2025-10-08T01:31:43.856Z" + "created_at": "2025-05-11T13:17:58.113Z", + "updated_at": "2026-01-11T17:51:07.343Z" }], - "status": "confirmed", + "status": "declined", "requested_by": {}, "requested_at": {}, "confirmed_by": {}, @@ -264,8 +264,8 @@ const myWorkflow = createWorkflow( "declined_at": {}, "canceled_by": {}, "canceled_at": {}, - "created_at": "2025-03-22T10:37:52.897Z", - "updated_at": "2025-11-21T03:13:44.934Z" + "created_at": "2025-05-14T02:30:50.437Z", + "updated_at": "2025-05-20T21:05:17.896Z" } }) } diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.confirmReturnRequestWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.confirmReturnRequestWorkflow/page.mdx index 0d82bcb863..44967d6daf 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.confirmReturnRequestWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.confirmReturnRequestWorkflow/page.mdx @@ -20,27 +20,9 @@ This workflow confirms a return request. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { confirmReturnRequestWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = confirmReturnRequestWorkflow - .runAsStep({ - input: { - "return_id": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -118,6 +100,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { confirmReturnRequestWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = confirmReturnRequestWorkflow + .runAsStep({ + input: { + "return_id": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createAndCompleteReturnOrderWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createAndCompleteReturnOrderWorkflow/page.mdx index bb1af833de..91e2ec1753 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createAndCompleteReturnOrderWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createAndCompleteReturnOrderWorkflow/page.mdx @@ -20,31 +20,9 @@ This workflow creates and completes a return. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createAndCompleteReturnOrderWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createAndCompleteReturnOrderWorkflow - .runAsStep({ - input: { - "order_id": "{value}", - "items": [{ - "id": "id_375YshoD5z", - "quantity": 34 - }] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -63,8 +41,8 @@ export async function POST( input: { "order_id": "{value}", "items": [{ - "id": "id_375YshoD5z", - "quantity": 34 + "id": "id_GiI3BjLHKhf", + "quantity": 31 }] } }) @@ -92,8 +70,8 @@ export default async function handleOrderPlaced({ input: { "order_id": "{value}", "items": [{ - "id": "id_375YshoD5z", - "quantity": 34 + "id": "id_GiI3BjLHKhf", + "quantity": 31 }] } }) @@ -121,8 +99,8 @@ export default async function myCustomJob( input: { "order_id": "{value}", "items": [{ - "id": "id_375YshoD5z", - "quantity": 34 + "id": "id_GiI3BjLHKhf", + "quantity": 31 }] } }) @@ -134,6 +112,30 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createAndCompleteReturnOrderWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createAndCompleteReturnOrderWorkflow + .runAsStep({ + input: { + "order_id": "{value}", + "items": [{ + "id": "id_GiI3BjLHKhf", + "quantity": 31 + }] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createClaimShippingMethodValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createClaimShippingMethodValidationStep/page.mdx index 011d055309..74f7565637 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createClaimShippingMethodValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createClaimShippingMethodValidationStep/page.mdx @@ -22,89 +22,89 @@ const myWorkflow = createWorkflow( () => { const data = createClaimShippingMethodValidationStep({ "order": { - "id": "id_GCZ16ZCDzveYZaZ", - "version": 32, - "display_id": 49, - "status": "canceled", + "id": "id_HExzUmXqrf8tYIZ", + "version": 1, + "display_id": 44, + "status": "archived", "currency_code": "{value}", - "created_at": "2025-08-04T02:31:11.796Z", - "updated_at": "2025-11-01T19:22:05.470Z", + "created_at": "2025-02-20T07:55:12.943Z", + "updated_at": "2025-04-11T06:52:35.706Z", "original_item_total": { - "numeric": 7 + "numeric": 3 }, "original_item_subtotal": { - "numeric": 13 + "numeric": 42 }, "original_item_tax_total": { - "numeric": 14 + "numeric": 34 }, "item_total": { - "numeric": 46 + "numeric": 16 }, "item_subtotal": { - "numeric": 41 + "numeric": 31 }, "item_tax_total": { - "numeric": 24 + "numeric": 34 }, "original_total": { - "numeric": 9 + "numeric": 18 }, "original_subtotal": { - "numeric": 35 + "numeric": 4 }, "original_tax_total": { - "numeric": 33 + "numeric": 50 }, "total": { - "numeric": 26 + "numeric": 10 }, "subtotal": { - "numeric": 1 + "numeric": 6 }, "tax_total": { - "numeric": 14 + "numeric": 18 }, "discount_subtotal": { - "numeric": 26 - }, - "discount_total": { - "numeric": 17 - }, - "discount_tax_total": { - "numeric": 23 - }, - "gift_card_total": { - "numeric": 45 - }, - "gift_card_tax_total": { - "numeric": 11 - }, - "shipping_total": { - "numeric": 11 - }, - "shipping_subtotal": { - "numeric": 7 - }, - "shipping_tax_total": { "numeric": 28 }, + "discount_total": { + "numeric": 36 + }, + "discount_tax_total": { + "numeric": 38 + }, + "gift_card_total": { + "numeric": 29 + }, + "gift_card_tax_total": { + "numeric": 5 + }, + "shipping_total": { + "numeric": 7 + }, + "shipping_subtotal": { + "numeric": 39 + }, + "shipping_tax_total": { + "numeric": 26 + }, "original_shipping_total": { - "numeric": 9 + "numeric": 13 }, "original_shipping_subtotal": { - "numeric": 14 + "numeric": 50 }, "original_shipping_tax_total": { - "numeric": 47 + "numeric": 49 } }, "orderClaim": { - "id": "id_bDCdwNCGnMSUuhKjFCSk", + "id": "id_Je52JDgOkcuyue", "type": "replace", "order_id": "{value}", - "order_version": 34, - "display_id": 38, + "order_version": 27, + "display_id": 4, "claim_items": [ "{value}" ], @@ -114,120 +114,120 @@ const myWorkflow = createWorkflow( "metadata": {} }, "orderChange": { - "id": "id_Pkd3gz4CXVVt0", - "version": 18, + "id": "id_MOkSLw8XCzfz6nc7AQ3o", + "version": 39, "order_id": "{value}", "return_id": "{value}", "exchange_id": "{value}", "claim_id": "{value}", "order": { - "id": "id_iggXARHyL4il", - "version": 44, - "display_id": 38, - "status": "requires_action", + "id": "id_pSG6qzYUTDAIAGxa", + "version": 26, + "display_id": 36, + "status": "draft", "currency_code": "{value}", - "created_at": "2025-05-18T16:33:27.108Z", - "updated_at": "2025-10-13T04:12:55.936Z", + "created_at": "2025-04-20T23:53:01.990Z", + "updated_at": "2025-02-01T18:26:06.124Z", "original_item_total": { - "numeric": 18 + "numeric": 23 }, "original_item_subtotal": { - "numeric": 35 + "numeric": 38 }, "original_item_tax_total": { - "numeric": 20 + "numeric": 48 }, "item_total": { - "numeric": 30 + "numeric": 25 }, "item_subtotal": { - "numeric": 6 + "numeric": 32 }, "item_tax_total": { - "numeric": 12 + "numeric": 19 }, "original_total": { - "numeric": 0 + "numeric": 36 }, "original_subtotal": { - "numeric": 26 + "numeric": 30 }, "original_tax_total": { - "numeric": 24 + "numeric": 10 }, "total": { - "numeric": 12 + "numeric": 39 }, "subtotal": { - "numeric": 37 + "numeric": 6 }, "tax_total": { - "numeric": 21 - }, - "discount_subtotal": { - "numeric": 33 - }, - "discount_total": { - "numeric": 31 - }, - "discount_tax_total": { - "numeric": 8 - }, - "gift_card_total": { - "numeric": 26 - }, - "gift_card_tax_total": { - "numeric": 13 - }, - "shipping_total": { "numeric": 15 }, + "discount_subtotal": { + "numeric": 46 + }, + "discount_total": { + "numeric": 34 + }, + "discount_tax_total": { + "numeric": 23 + }, + "gift_card_total": { + "numeric": 5 + }, + "gift_card_tax_total": { + "numeric": 45 + }, + "shipping_total": { + "numeric": 50 + }, "shipping_subtotal": { - "numeric": 7 + "numeric": 30 }, "shipping_tax_total": { - "numeric": 42 + "numeric": 18 }, "original_shipping_total": { - "numeric": 47 + "numeric": 14 }, "original_shipping_subtotal": { - "numeric": 12 + "numeric": 47 }, "original_shipping_tax_total": { - "numeric": 35 + "numeric": 10 } }, "return_order": { - "id": "id_aNamSZC56mv", - "status": "received", + "id": "id_R6hhfJ7DY0", + "status": "partially_received", "order_id": "{value}", "items": [{ - "id": "id_aItQI5LNKSF9TOOnBQW", + "id": "id_3tFwEXKdw4OvvQKozf", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 44 + "quantity": 20 }], - "display_id": 48, + "display_id": 36, "metadata": {} }, "exchange": { - "id": "id_4LJpccjFnrv070TUD", + "id": "id_tort1aIeGckwux8PuDk", "order_id": "{value}", - "order_version": 43, - "display_id": 39, + "order_version": 26, + "display_id": 17, "additional_items": [ "{value}" ], "metadata": {} }, "claim": { - "id": "id_Ql938G4B34a7Xg0zuCf", + "id": "id_4HOaS6bQzLbFChAr", "type": "refund", "order_id": "{value}", - "order_version": 8, - "display_id": 20, + "order_version": 50, + "display_id": 17, "claim_items": [ "{value}" ], @@ -237,7 +237,7 @@ const myWorkflow = createWorkflow( "metadata": {} }, "actions": [{ - "id": "id_Bx0nxuulhujXqFB", + "id": "id_0oihlXMMiPjGROfRA", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -247,13 +247,13 @@ const myWorkflow = createWorkflow( "order": {}, "reference": "{value}", "reference_id": "{value}", - "action": "REINSTATE_ITEM", + "action": "ITEM_REMOVE", "details": {}, "internal_note": {}, - "created_at": "2025-01-22T03:51:21.942Z", - "updated_at": "2025-01-31T06:25:47.187Z" + "created_at": "2025-08-28T00:29:22.393Z", + "updated_at": "2025-12-08T18:48:12.705Z" }], - "status": "canceled", + "status": "declined", "requested_by": {}, "requested_at": {}, "confirmed_by": {}, @@ -264,8 +264,8 @@ const myWorkflow = createWorkflow( "declined_at": {}, "canceled_by": {}, "canceled_at": {}, - "created_at": "2025-05-11T22:24:23.294Z", - "updated_at": "2025-06-02T21:24:43.441Z" + "created_at": "2025-10-28T15:52:48.897Z", + "updated_at": "2025-04-25T07:05:22.599Z" } }) } diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createClaimShippingMethodWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createClaimShippingMethodWorkflow/page.mdx index 2f64c6abd8..9011c48a7c 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createClaimShippingMethodWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createClaimShippingMethodWorkflow/page.mdx @@ -18,27 +18,9 @@ This workflow creates a shipping method for a claim. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createClaimShippingMethodWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createClaimShippingMethodWorkflow - .runAsStep({ - input: { - "shipping_option_id": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -116,6 +98,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createClaimShippingMethodWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createClaimShippingMethodWorkflow + .runAsStep({ + input: { + "shipping_option_id": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createCompleteReturnValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createCompleteReturnValidationStep/page.mdx index 9c5d98ee88..a62fceaf1d 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createCompleteReturnValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createCompleteReturnValidationStep/page.mdx @@ -25,8 +25,8 @@ const myWorkflow = createWorkflow( "input": { "order_id": "{value}", "items": [{ - "id": "id_OqOOICoz45g6h", - "quantity": 34 + "id": "id_u2PKibceyV90pRo", + "quantity": 41 }] } }) diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createExchangeShippingMethodValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createExchangeShippingMethodValidationStep/page.mdx index 5edf71d03f..c2b17b39af 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createExchangeShippingMethodValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createExchangeShippingMethodValidationStep/page.mdx @@ -22,207 +22,207 @@ const myWorkflow = createWorkflow( () => { const data = createExchangeShippingMethodValidationStep({ "order": { - "id": "id_uscPQl5IgKZx", - "version": 2, - "display_id": 21, - "status": "draft", + "id": "id_WPajWYG0jHJGQ", + "version": 26, + "display_id": 8, + "status": "archived", "currency_code": "{value}", - "created_at": "2025-10-30T14:48:13.178Z", - "updated_at": "2025-01-23T04:49:25.877Z", + "created_at": "2025-11-19T09:04:09.258Z", + "updated_at": "2025-09-26T20:40:02.547Z", "original_item_total": { - "numeric": 30 + "numeric": 9 }, "original_item_subtotal": { - "numeric": 29 - }, - "original_item_tax_total": { - "numeric": 50 - }, - "item_total": { - "numeric": 20 - }, - "item_subtotal": { - "numeric": 26 - }, - "item_tax_total": { - "numeric": 22 - }, - "original_total": { - "numeric": 16 - }, - "original_subtotal": { - "numeric": 37 - }, - "original_tax_total": { - "numeric": 32 - }, - "total": { - "numeric": 43 - }, - "subtotal": { - "numeric": 13 - }, - "tax_total": { - "numeric": 35 - }, - "discount_subtotal": { - "numeric": 6 - }, - "discount_total": { - "numeric": 25 - }, - "discount_tax_total": { - "numeric": 48 - }, - "gift_card_total": { "numeric": 23 }, + "original_item_tax_total": { + "numeric": 19 + }, + "item_total": { + "numeric": 3 + }, + "item_subtotal": { + "numeric": 5 + }, + "item_tax_total": { + "numeric": 10 + }, + "original_total": { + "numeric": 14 + }, + "original_subtotal": { + "numeric": 7 + }, + "original_tax_total": { + "numeric": 6 + }, + "total": { + "numeric": 17 + }, + "subtotal": { + "numeric": 44 + }, + "tax_total": { + "numeric": 18 + }, + "discount_subtotal": { + "numeric": 19 + }, + "discount_total": { + "numeric": 49 + }, + "discount_tax_total": { + "numeric": 35 + }, + "gift_card_total": { + "numeric": 31 + }, "gift_card_tax_total": { - "numeric": 38 + "numeric": 32 }, "shipping_total": { - "numeric": 50 + "numeric": 31 }, "shipping_subtotal": { - "numeric": 41 + "numeric": 40 }, "shipping_tax_total": { - "numeric": 2 + "numeric": 31 }, "original_shipping_total": { - "numeric": 22 + "numeric": 13 }, "original_shipping_subtotal": { - "numeric": 39 + "numeric": 9 }, "original_shipping_tax_total": { - "numeric": 35 + "numeric": 47 } }, "orderExchange": { - "id": "id_wSYQLnK2xhdA3QkmPqvQ", + "id": "id_eVS0giYjYTu", "order_id": "{value}", - "order_version": 32, - "display_id": 12, + "order_version": 33, + "display_id": 45, "additional_items": [ "{value}" ], "metadata": {} }, "orderChange": { - "id": "id_LrWnKuX05fh4Z6HR94", - "version": 10, + "id": "id_X94AWAXiy2T", + "version": 36, "order_id": "{value}", "return_id": "{value}", "exchange_id": "{value}", "claim_id": "{value}", "order": { - "id": "id_Itn4bOUJQo", - "version": 42, - "display_id": 0, - "status": "draft", + "id": "id_Lw0lY0Rg1k0UdJjwI", + "version": 45, + "display_id": 42, + "status": "pending", "currency_code": "{value}", - "created_at": "2025-06-17T06:52:56.690Z", - "updated_at": "2025-10-21T08:55:19.428Z", + "created_at": "2025-04-15T15:31:37.118Z", + "updated_at": "2025-08-07T03:23:12.446Z", "original_item_total": { - "numeric": 20 + "numeric": 40 }, "original_item_subtotal": { - "numeric": 22 + "numeric": 45 }, "original_item_tax_total": { - "numeric": 21 + "numeric": 12 }, "item_total": { - "numeric": 2 + "numeric": 34 }, "item_subtotal": { - "numeric": 30 + "numeric": 43 }, "item_tax_total": { - "numeric": 39 + "numeric": 45 }, "original_total": { - "numeric": 28 + "numeric": 17 }, "original_subtotal": { - "numeric": 13 + "numeric": 16 }, "original_tax_total": { - "numeric": 36 + "numeric": 25 }, "total": { - "numeric": 1 + "numeric": 47 }, "subtotal": { - "numeric": 27 + "numeric": 28 }, "tax_total": { - "numeric": 7 + "numeric": 10 }, "discount_subtotal": { - "numeric": 20 + "numeric": 5 }, "discount_total": { - "numeric": 49 + "numeric": 9 }, "discount_tax_total": { - "numeric": 39 + "numeric": 21 }, "gift_card_total": { "numeric": 34 }, "gift_card_tax_total": { - "numeric": 33 + "numeric": 35 }, "shipping_total": { - "numeric": 36 + "numeric": 4 }, "shipping_subtotal": { - "numeric": 30 + "numeric": 1 }, "shipping_tax_total": { - "numeric": 40 + "numeric": 29 }, "original_shipping_total": { - "numeric": 8 + "numeric": 31 }, "original_shipping_subtotal": { - "numeric": 28 + "numeric": 30 }, "original_shipping_tax_total": { - "numeric": 13 + "numeric": 47 } }, "return_order": { - "id": "id_GuyUpPI3TkJhntxMGjy", - "status": "received", + "id": "id_VOwebBNdAluSk", + "status": "partially_received", "order_id": "{value}", "items": [{ - "id": "id_UrUxOsDR6pGD", + "id": "id_F2VuoEymxg216pv", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 46 + "quantity": 40 }], - "display_id": 9, + "display_id": 38, "metadata": {} }, "exchange": { - "id": "id_gm0jeVqLYgpHq5", + "id": "id_6aplyu9SGC1e", "order_id": "{value}", - "order_version": 25, - "display_id": 33, + "order_version": 38, + "display_id": 28, "additional_items": [ "{value}" ], "metadata": {} }, "claim": { - "id": "id_qfP8gCDQXZ", - "type": "replace", + "id": "id_HHQUQJhCPfjxKHO", + "type": "refund", "order_id": "{value}", - "order_version": 32, + "order_version": 40, "display_id": 22, "claim_items": [ "{value}" @@ -233,7 +233,7 @@ const myWorkflow = createWorkflow( "metadata": {} }, "actions": [{ - "id": "id_cpm7OGDCYqjpOAN", + "id": "id_MLwzJUWjgtY", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -243,13 +243,13 @@ const myWorkflow = createWorkflow( "order": {}, "reference": "{value}", "reference_id": "{value}", - "action": "ITEM_UPDATE", + "action": "RECEIVE_RETURN_ITEM", "details": {}, "internal_note": {}, - "created_at": "2025-12-28T02:08:59.729Z", - "updated_at": "2025-01-18T22:36:04.961Z" + "created_at": "2025-01-23T04:37:39.801Z", + "updated_at": "2025-11-30T04:29:33.274Z" }], - "status": "canceled", + "status": "pending", "requested_by": {}, "requested_at": {}, "confirmed_by": {}, @@ -260,8 +260,8 @@ const myWorkflow = createWorkflow( "declined_at": {}, "canceled_by": {}, "canceled_at": {}, - "created_at": "2025-02-26T08:33:17.667Z", - "updated_at": "2025-10-24T16:39:46.838Z" + "created_at": "2025-05-08T22:43:03.318Z", + "updated_at": "2025-05-08T00:59:07.882Z" } }) } diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createExchangeShippingMethodWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createExchangeShippingMethodWorkflow/page.mdx index 1c438d5edd..3652bc4567 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createExchangeShippingMethodWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createExchangeShippingMethodWorkflow/page.mdx @@ -18,27 +18,9 @@ This workflow creates a shipping method for an exchange. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createExchangeShippingMethodWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createExchangeShippingMethodWorkflow - .runAsStep({ - input: { - "shipping_option_id": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -116,6 +98,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createExchangeShippingMethodWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createExchangeShippingMethodWorkflow + .runAsStep({ + input: { + "shipping_option_id": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createFulfillmentValidateOrder/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createFulfillmentValidateOrder/page.mdx index fb2af63eb7..9c3b1ab676 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createFulfillmentValidateOrder/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createFulfillmentValidateOrder/page.mdx @@ -22,86 +22,86 @@ const myWorkflow = createWorkflow( () => { const data = createFulfillmentValidateOrder({ "order": { - "id": "id_nZyA7BL4mkRrj5P3", - "version": 28, - "display_id": 6, - "status": "pending", + "id": "id_M9lZGvpbzFigYE", + "version": 9, + "display_id": 23, + "status": "archived", "currency_code": "{value}", - "created_at": "2025-09-15T01:07:28.985Z", - "updated_at": "2025-04-20T19:06:27.395Z", + "created_at": "2025-09-05T01:07:30.601Z", + "updated_at": "2025-07-30T13:37:20.157Z", "original_item_total": { - "numeric": 14 + "numeric": 23 }, "original_item_subtotal": { - "numeric": 43 + "numeric": 31 }, "original_item_tax_total": { - "numeric": 9 + "numeric": 17 }, "item_total": { - "numeric": 34 + "numeric": 31 }, "item_subtotal": { - "numeric": 39 + "numeric": 3 }, "item_tax_total": { - "numeric": 30 - }, - "original_total": { - "numeric": 32 - }, - "original_subtotal": { - "numeric": 6 - }, - "original_tax_total": { - "numeric": 32 - }, - "total": { - "numeric": 10 - }, - "subtotal": { - "numeric": 20 - }, - "tax_total": { - "numeric": 16 - }, - "discount_subtotal": { - "numeric": 46 - }, - "discount_total": { "numeric": 13 }, - "discount_tax_total": { - "numeric": 1 - }, - "gift_card_total": { - "numeric": 42 - }, - "gift_card_tax_total": { - "numeric": 2 - }, - "shipping_total": { - "numeric": 35 - }, - "shipping_subtotal": { - "numeric": 49 - }, - "shipping_tax_total": { - "numeric": 21 - }, - "original_shipping_total": { - "numeric": 38 - }, - "original_shipping_subtotal": { + "original_total": { "numeric": 44 }, + "original_subtotal": { + "numeric": 24 + }, + "original_tax_total": { + "numeric": 40 + }, + "total": { + "numeric": 27 + }, + "subtotal": { + "numeric": 14 + }, + "tax_total": { + "numeric": 21 + }, + "discount_subtotal": { + "numeric": 23 + }, + "discount_total": { + "numeric": 18 + }, + "discount_tax_total": { + "numeric": 25 + }, + "gift_card_total": { + "numeric": 6 + }, + "gift_card_tax_total": { + "numeric": 37 + }, + "shipping_total": { + "numeric": 8 + }, + "shipping_subtotal": { + "numeric": 16 + }, + "shipping_tax_total": { + "numeric": 4 + }, + "original_shipping_total": { + "numeric": 12 + }, + "original_shipping_subtotal": { + "numeric": 10 + }, "original_shipping_tax_total": { - "numeric": 29 + "numeric": 2 } }, "inputItems": [{ - "id": "id_OqOoTat0x5nRoWa8x8dG", - "quantity": 31 + "id": "id_h0402jc9nf4iGUjf", + "quantity": 48 }] }) } diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createOrderChangeActionsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createOrderChangeActionsWorkflow/page.mdx index fb4fe3afa3..6d66bf56ca 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createOrderChangeActionsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createOrderChangeActionsWorkflow/page.mdx @@ -15,27 +15,9 @@ This workflow creates order change actions. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createOrderChangeActionsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createOrderChangeActionsWorkflow - .runAsStep({ - input: [{ - "action": "FULFILL_ITEM" - }] - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -52,7 +34,7 @@ export async function POST( const { result } = await createOrderChangeActionsWorkflow(req.scope) .run({ input: [{ - "action": "FULFILL_ITEM" + "action": "DELIVER_ITEM" }] }) @@ -77,7 +59,7 @@ export default async function handleOrderPlaced({ const { result } = await createOrderChangeActionsWorkflow(container) .run({ input: [{ - "action": "FULFILL_ITEM" + "action": "DELIVER_ITEM" }] }) @@ -102,7 +84,7 @@ export default async function myCustomJob( const { result } = await createOrderChangeActionsWorkflow(container) .run({ input: [{ - "action": "FULFILL_ITEM" + "action": "DELIVER_ITEM" }] }) @@ -113,6 +95,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createOrderChangeActionsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createOrderChangeActionsWorkflow + .runAsStep({ + input: [{ + "action": "DELIVER_ITEM" + }] + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createOrderChangeWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createOrderChangeWorkflow/page.mdx index 7c923c1c6e..33c6737140 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createOrderChangeWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createOrderChangeWorkflow/page.mdx @@ -16,27 +16,9 @@ This workflow creates an order change. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createOrderChangeWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createOrderChangeWorkflow - .runAsStep({ - input: { - "order_id": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -114,6 +96,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createOrderChangeWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createOrderChangeWorkflow + .runAsStep({ + input: { + "order_id": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createOrderEditShippingMethodValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createOrderEditShippingMethodValidationStep/page.mdx index db054b4b6a..b946956032 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createOrderEditShippingMethodValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createOrderEditShippingMethodValidationStep/page.mdx @@ -20,198 +20,198 @@ const myWorkflow = createWorkflow( () => { const data = createOrderEditShippingMethodValidationStep({ "order": { - "id": "id_vqsSTIAPvpY1wd9", - "version": 44, - "display_id": 40, - "status": "completed", + "id": "id_35XsttSl4aIcRkGsMn", + "version": 40, + "display_id": 34, + "status": "canceled", "currency_code": "{value}", - "created_at": "2025-08-23T16:07:40.903Z", - "updated_at": "2025-11-19T01:04:40.704Z", + "created_at": "2025-06-30T03:33:09.672Z", + "updated_at": "2025-03-22T22:18:21.882Z", "original_item_total": { - "numeric": 48 + "numeric": 38 }, "original_item_subtotal": { - "numeric": 46 - }, - "original_item_tax_total": { "numeric": 23 }, + "original_item_tax_total": { + "numeric": 45 + }, "item_total": { - "numeric": 20 + "numeric": 37 }, "item_subtotal": { - "numeric": 20 + "numeric": 13 }, "item_tax_total": { - "numeric": 17 + "numeric": 5 }, "original_total": { - "numeric": 4 + "numeric": 42 }, "original_subtotal": { "numeric": 43 }, "original_tax_total": { - "numeric": 38 - }, - "total": { - "numeric": 28 - }, - "subtotal": { - "numeric": 2 - }, - "tax_total": { - "numeric": 13 - }, - "discount_subtotal": { "numeric": 4 }, + "total": { + "numeric": 49 + }, + "subtotal": { + "numeric": 36 + }, + "tax_total": { + "numeric": 48 + }, + "discount_subtotal": { + "numeric": 0 + }, "discount_total": { - "numeric": 40 - }, - "discount_tax_total": { - "numeric": 38 - }, - "gift_card_total": { - "numeric": 28 - }, - "gift_card_tax_total": { - "numeric": 19 - }, - "shipping_total": { "numeric": 22 }, + "discount_tax_total": { + "numeric": 19 + }, + "gift_card_total": { + "numeric": 24 + }, + "gift_card_tax_total": { + "numeric": 2 + }, + "shipping_total": { + "numeric": 11 + }, "shipping_subtotal": { - "numeric": 32 + "numeric": 8 }, "shipping_tax_total": { - "numeric": 30 + "numeric": 9 }, "original_shipping_total": { - "numeric": 26 + "numeric": 18 }, "original_shipping_subtotal": { - "numeric": 1 + "numeric": 22 }, "original_shipping_tax_total": { - "numeric": 21 + "numeric": 46 } }, "orderChange": { - "id": "id_LheMv8YJUnhmsDyoGbeB", - "version": 39, + "id": "id_AH8C89M4eOdnEFuYYuJv", + "version": 42, "order_id": "{value}", "return_id": "{value}", "exchange_id": "{value}", "claim_id": "{value}", "order": { - "id": "id_fyXOBRDWwT02", - "version": 33, - "display_id": 6, - "status": "archived", + "id": "id_X5FbkvFsqSNXaXvGNOe", + "version": 15, + "display_id": 23, + "status": "requires_action", "currency_code": "{value}", - "created_at": "2025-05-18T19:57:19.904Z", - "updated_at": "2025-12-22T07:09:43.808Z", + "created_at": "2025-08-02T14:07:18.190Z", + "updated_at": "2025-10-27T08:34:16.814Z", "original_item_total": { - "numeric": 49 + "numeric": 5 }, "original_item_subtotal": { - "numeric": 38 + "numeric": 28 }, "original_item_tax_total": { - "numeric": 35 + "numeric": 39 }, "item_total": { - "numeric": 40 + "numeric": 25 }, "item_subtotal": { - "numeric": 45 + "numeric": 3 }, "item_tax_total": { - "numeric": 2 + "numeric": 17 }, "original_total": { - "numeric": 13 + "numeric": 5 }, "original_subtotal": { - "numeric": 16 + "numeric": 3 }, "original_tax_total": { - "numeric": 9 + "numeric": 31 }, "total": { - "numeric": 38 + "numeric": 47 }, "subtotal": { - "numeric": 29 + "numeric": 44 }, "tax_total": { - "numeric": 21 + "numeric": 40 }, "discount_subtotal": { - "numeric": 11 + "numeric": 32 }, "discount_total": { - "numeric": 36 + "numeric": 13 }, "discount_tax_total": { - "numeric": 27 + "numeric": 15 }, "gift_card_total": { - "numeric": 20 - }, - "gift_card_tax_total": { - "numeric": 27 - }, - "shipping_total": { - "numeric": 26 - }, - "shipping_subtotal": { - "numeric": 2 - }, - "shipping_tax_total": { "numeric": 22 }, - "original_shipping_total": { + "gift_card_tax_total": { + "numeric": 7 + }, + "shipping_total": { + "numeric": 38 + }, + "shipping_subtotal": { "numeric": 3 }, + "shipping_tax_total": { + "numeric": 40 + }, + "original_shipping_total": { + "numeric": 29 + }, "original_shipping_subtotal": { - "numeric": 27 + "numeric": 8 }, "original_shipping_tax_total": { - "numeric": 3 + "numeric": 22 } }, "return_order": { - "id": "id_0TfzS5XtVUY", - "status": "requested", + "id": "id_g9uy3gAra3oQ8Pp", + "status": "canceled", "order_id": "{value}", "items": [{ - "id": "id_zAQ6lXVEQnysOB9bQzl", + "id": "id_ek5hzLvBOqP5W3vT5", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 18 + "quantity": 50 }], - "display_id": 27, + "display_id": 2, "metadata": {} }, "exchange": { - "id": "id_Yf7ykqnC7PsmMXz", + "id": "id_DjwdQC5kk3upb60Udm", "order_id": "{value}", - "order_version": 24, - "display_id": 11, + "order_version": 40, + "display_id": 36, "additional_items": [ "{value}" ], "metadata": {} }, "claim": { - "id": "id_c4uj9FrShyJNBQPZSb6", - "type": "replace", + "id": "id_tLObm36g1hPhe5PggJPR", + "type": "refund", "order_id": "{value}", - "order_version": 7, - "display_id": 46, + "order_version": 19, + "display_id": 6, "claim_items": [ "{value}" ], @@ -221,7 +221,7 @@ const myWorkflow = createWorkflow( "metadata": {} }, "actions": [{ - "id": "id_oTgvxICLpkE9181nb", + "id": "id_aPIhE1vb9R", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -231,13 +231,13 @@ const myWorkflow = createWorkflow( "order": {}, "reference": "{value}", "reference_id": "{value}", - "action": "FULFILL_ITEM", + "action": "ITEM_REMOVE", "details": {}, "internal_note": {}, - "created_at": "2025-05-05T22:57:54.086Z", - "updated_at": "2025-09-18T16:46:01.289Z" + "created_at": "2025-09-20T16:45:46.227Z", + "updated_at": "2025-02-11T14:32:23.624Z" }], - "status": "declined", + "status": "pending", "requested_by": {}, "requested_at": {}, "confirmed_by": {}, @@ -248,8 +248,8 @@ const myWorkflow = createWorkflow( "declined_at": {}, "canceled_by": {}, "canceled_at": {}, - "created_at": "2025-07-30T12:11:19.705Z", - "updated_at": "2025-02-03T18:01:15.425Z" + "created_at": "2025-07-02T23:18:08.310Z", + "updated_at": "2025-01-31T12:18:03.793Z" } }) } diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createOrderEditShippingMethodWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createOrderEditShippingMethodWorkflow/page.mdx index 10735b3b89..284b896cc2 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createOrderEditShippingMethodWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createOrderEditShippingMethodWorkflow/page.mdx @@ -18,28 +18,9 @@ This workflow creates a shipping method for an order edit. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createOrderEditShippingMethodWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createOrderEditShippingMethodWorkflow - .runAsStep({ - input: { - "order_id": "{value}", - "shipping_option_id": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -120,6 +101,27 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createOrderEditShippingMethodWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createOrderEditShippingMethodWorkflow + .runAsStep({ + input: { + "order_id": "{value}", + "shipping_option_id": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createOrderFulfillmentWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createOrderFulfillmentWorkflow/page.mdx index dc4bd2baf2..6f419a4636 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createOrderFulfillmentWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createOrderFulfillmentWorkflow/page.mdx @@ -26,34 +26,9 @@ You can also use this workflow within your own custom workflows, allowing you to +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createOrderFulfillmentWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createOrderFulfillmentWorkflow - .runAsStep({ - input: { - order_id: "order_123", - items: [{ - id: "orli_123", - quantity: 1, - }], - additional_data: { - send_oms: true - } - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -152,6 +127,33 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createOrderFulfillmentWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createOrderFulfillmentWorkflow + .runAsStep({ + input: { + order_id: "order_123", + items: [{ + id: "orli_123", + quantity: 1, + }], + additional_data: { + send_oms: true + } + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createOrderPaymentCollectionWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createOrderPaymentCollectionWorkflow/page.mdx index d0876c3b1b..e442cce59e 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createOrderPaymentCollectionWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createOrderPaymentCollectionWorkflow/page.mdx @@ -18,28 +18,9 @@ This workflow creates a payment collection for an order. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createOrderPaymentCollectionWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createOrderPaymentCollectionWorkflow - .runAsStep({ - input: { - "order_id": "{value}", - "amount": 24 - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -57,7 +38,7 @@ export async function POST( .run({ input: { "order_id": "{value}", - "amount": 24 + "amount": 10 } }) @@ -83,7 +64,7 @@ export default async function handleOrderPlaced({ .run({ input: { "order_id": "{value}", - "amount": 24 + "amount": 10 } }) @@ -109,7 +90,7 @@ export default async function myCustomJob( .run({ input: { "order_id": "{value}", - "amount": 24 + "amount": 10 } }) @@ -120,6 +101,27 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createOrderPaymentCollectionWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createOrderPaymentCollectionWorkflow + .runAsStep({ + input: { + "order_id": "{value}", + "amount": 10 + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createOrderShipmentWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createOrderShipmentWorkflow/page.mdx index f840eb0e4b..f53c75bfb0 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createOrderShipmentWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createOrderShipmentWorkflow/page.mdx @@ -24,35 +24,9 @@ You can also use this workflow within your own custom workflows, allowing you to +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createOrderShipmentWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createOrderShipmentWorkflow - .runAsStep({ - input: { - order_id: "order_123", - fulfillment_id: "fulfillment_123", - items: [{ - id: "orli_123", - quantity: 1 - }], - additional_data: { - oms_id: "123" - } - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -154,6 +128,34 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createOrderShipmentWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createOrderShipmentWorkflow + .runAsStep({ + input: { + order_id: "order_123", + fulfillment_id: "fulfillment_123", + items: [{ + id: "orli_123", + quantity: 1 + }], + additional_data: { + oms_id: "123" + } + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createOrderWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createOrderWorkflow/page.mdx index 189722c696..bcabd37f35 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createOrderWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createOrderWorkflow/page.mdx @@ -30,46 +30,9 @@ you can create a workflow that imports orders from an external system, then uses +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createOrderWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createOrderWorkflow - .runAsStep({ - input: { - region_id: "reg_123", - items: [{ - variant_id: "variant_123", - quantity: 1, - title: "Shirt", - unit_price: 10 - }], - sales_channel_id: "sc_123", - status: "pending", - shipping_address: { - first_name: "John", - last_name: "Doe", - address_1: "123 Main St", - city: "Los Angeles", - country_code: "us", - postal_code: "90001" - }, - additional_data: { - sync_oms: true - } - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -204,6 +167,45 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createOrderWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createOrderWorkflow + .runAsStep({ + input: { + region_id: "reg_123", + items: [{ + variant_id: "variant_123", + quantity: 1, + title: "Shirt", + unit_price: 10 + }], + sales_channel_id: "sc_123", + status: "pending", + shipping_address: { + first_name: "John", + last_name: "Doe", + address_1: "123 Main St", + city: "Los Angeles", + country_code: "us", + postal_code: "90001" + }, + additional_data: { + sync_oms: true + } + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createOrdersWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createOrdersWorkflow/page.mdx index 89fa2a24d1..8358d7393e 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createOrdersWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createOrdersWorkflow/page.mdx @@ -11,25 +11,9 @@ This documentation provides a reference to the `createOrdersWorkflow`. It belong +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createOrdersWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createOrdersWorkflow - .runAsStep({ - input: {} - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -101,6 +85,24 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createOrdersWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createOrdersWorkflow + .runAsStep({ + input: {} + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createReturnShippingMethodValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createReturnShippingMethodValidationStep/page.mdx index 5a5309e486..45baeb1be2 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createReturnShippingMethodValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createReturnShippingMethodValidationStep/page.mdx @@ -22,212 +22,212 @@ const myWorkflow = createWorkflow( () => { const data = createReturnShippingMethodValidationStep({ "order": { - "id": "id_pufdiHHnQwbH", - "version": 27, - "display_id": 29, - "status": "canceled", + "id": "id_Q4qU3Q4HpfXJlocUsO", + "version": 23, + "display_id": 50, + "status": "archived", "currency_code": "{value}", - "created_at": "2025-02-09T15:31:56.859Z", - "updated_at": "2025-11-21T13:12:28.415Z", + "created_at": "2025-09-12T03:28:43.184Z", + "updated_at": "2025-03-31T17:32:10.238Z", "original_item_total": { - "numeric": 19 - }, - "original_item_subtotal": { - "numeric": 46 - }, - "original_item_tax_total": { - "numeric": 7 - }, - "item_total": { "numeric": 25 }, - "item_subtotal": { - "numeric": 50 - }, - "item_tax_total": { - "numeric": 7 - }, - "original_total": { - "numeric": 46 - }, - "original_subtotal": { - "numeric": 8 - }, - "original_tax_total": { - "numeric": 10 - }, - "total": { - "numeric": 46 - }, - "subtotal": { + "original_item_subtotal": { "numeric": 31 }, - "tax_total": { - "numeric": 18 - }, - "discount_subtotal": { - "numeric": 0 - }, - "discount_total": { - "numeric": 2 - }, - "discount_tax_total": { - "numeric": 28 - }, - "gift_card_total": { - "numeric": 1 - }, - "gift_card_tax_total": { - "numeric": 34 - }, - "shipping_total": { - "numeric": 24 - }, - "shipping_subtotal": { - "numeric": 29 - }, - "shipping_tax_total": { - "numeric": 14 - }, - "original_shipping_total": { - "numeric": 1 - }, - "original_shipping_subtotal": { + "original_item_tax_total": { "numeric": 23 }, + "item_total": { + "numeric": 7 + }, + "item_subtotal": { + "numeric": 9 + }, + "item_tax_total": { + "numeric": 33 + }, + "original_total": { + "numeric": 14 + }, + "original_subtotal": { + "numeric": 40 + }, + "original_tax_total": { + "numeric": 21 + }, + "total": { + "numeric": 35 + }, + "subtotal": { + "numeric": 32 + }, + "tax_total": { + "numeric": 19 + }, + "discount_subtotal": { + "numeric": 31 + }, + "discount_total": { + "numeric": 32 + }, + "discount_tax_total": { + "numeric": 16 + }, + "gift_card_total": { + "numeric": 24 + }, + "gift_card_tax_total": { + "numeric": 10 + }, + "shipping_total": { + "numeric": 48 + }, + "shipping_subtotal": { + "numeric": 32 + }, + "shipping_tax_total": { + "numeric": 15 + }, + "original_shipping_total": { + "numeric": 16 + }, + "original_shipping_subtotal": { + "numeric": 31 + }, "original_shipping_tax_total": { - "numeric": 41 + "numeric": 6 } }, "orderReturn": { - "id": "id_FHvNRTYSaMu", - "status": "canceled", + "id": "id_YXfD2rLWwDntQopd", + "status": "partially_received", "order_id": "{value}", "items": [{ - "id": "id_WWlcYe8oM7VPb", + "id": "id_Bnh3bHkEYHfjbc", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 29 + "quantity": 6 }], - "display_id": 39, + "display_id": 18, "metadata": {} }, "orderChange": { - "id": "id_CDsf9b2jxAOvipK5nw", - "version": 47, + "id": "id_WwAPdZO4Vw6Ii", + "version": 30, "order_id": "{value}", "return_id": "{value}", "exchange_id": "{value}", "claim_id": "{value}", "order": { - "id": "id_8gpyOKswx1K", - "version": 21, - "display_id": 34, - "status": "canceled", + "id": "id_11KnlCazJOzr", + "version": 8, + "display_id": 47, + "status": "draft", "currency_code": "{value}", - "created_at": "2025-11-01T05:42:18.378Z", - "updated_at": "2025-11-10T11:54:28.311Z", + "created_at": "2025-04-03T10:24:49.069Z", + "updated_at": "2025-03-05T11:28:40.288Z", "original_item_total": { - "numeric": 38 + "numeric": 41 }, "original_item_subtotal": { - "numeric": 11 + "numeric": 20 }, "original_item_tax_total": { - "numeric": 2 + "numeric": 38 }, "item_total": { - "numeric": 7 - }, - "item_subtotal": { - "numeric": 1 - }, - "item_tax_total": { - "numeric": 1 - }, - "original_total": { - "numeric": 30 - }, - "original_subtotal": { - "numeric": 48 - }, - "original_tax_total": { - "numeric": 6 - }, - "total": { - "numeric": 22 - }, - "subtotal": { "numeric": 32 }, + "item_subtotal": { + "numeric": 42 + }, + "item_tax_total": { + "numeric": 22 + }, + "original_total": { + "numeric": 34 + }, + "original_subtotal": { + "numeric": 25 + }, + "original_tax_total": { + "numeric": 30 + }, + "total": { + "numeric": 37 + }, + "subtotal": { + "numeric": 43 + }, "tax_total": { - "numeric": 5 + "numeric": 22 }, "discount_subtotal": { - "numeric": 49 + "numeric": 23 }, "discount_total": { - "numeric": 29 + "numeric": 25 }, "discount_tax_total": { - "numeric": 14 - }, - "gift_card_total": { - "numeric": 26 - }, - "gift_card_tax_total": { - "numeric": 19 - }, - "shipping_total": { - "numeric": 18 - }, - "shipping_subtotal": { - "numeric": 7 - }, - "shipping_tax_total": { - "numeric": 31 - }, - "original_shipping_total": { - "numeric": 49 - }, - "original_shipping_subtotal": { "numeric": 36 }, + "gift_card_total": { + "numeric": 29 + }, + "gift_card_tax_total": { + "numeric": 21 + }, + "shipping_total": { + "numeric": 10 + }, + "shipping_subtotal": { + "numeric": 50 + }, + "shipping_tax_total": { + "numeric": 50 + }, + "original_shipping_total": { + "numeric": 32 + }, + "original_shipping_subtotal": { + "numeric": 0 + }, "original_shipping_tax_total": { - "numeric": 26 + "numeric": 33 } }, "return_order": { - "id": "id_aNrurGOXrUxz", - "status": "canceled", + "id": "id_wcgXHg1hK5gmnJXWHmIZ", + "status": "requested", "order_id": "{value}", "items": [{ - "id": "id_b7LwN20AgUQc", + "id": "id_O11lq8xYY1zOL", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 49 + "quantity": 21 }], - "display_id": 25, + "display_id": 34, "metadata": {} }, "exchange": { - "id": "id_g1gblk5OdIFP", + "id": "id_JBM4W7GzPoK", "order_id": "{value}", - "order_version": 21, - "display_id": 49, + "order_version": 13, + "display_id": 28, "additional_items": [ "{value}" ], "metadata": {} }, "claim": { - "id": "id_xQNPrNI5KIIgB", - "type": "refund", + "id": "id_18omE4emFORMvZ", + "type": "replace", "order_id": "{value}", - "order_version": 27, - "display_id": 26, + "order_version": 28, + "display_id": 31, "claim_items": [ "{value}" ], @@ -237,7 +237,7 @@ const myWorkflow = createWorkflow( "metadata": {} }, "actions": [{ - "id": "id_c29lOgQARtbP", + "id": "id_uV3SpABT5FyKjDP7vzz", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -247,13 +247,13 @@ const myWorkflow = createWorkflow( "order": {}, "reference": "{value}", "reference_id": "{value}", - "action": "FULFILL_ITEM", + "action": "WRITE_OFF_ITEM", "details": {}, "internal_note": {}, - "created_at": "2025-05-09T19:38:18.602Z", - "updated_at": "2025-12-21T07:10:34.542Z" + "created_at": "2025-10-15T00:03:22.254Z", + "updated_at": "2025-10-12T00:18:32.971Z" }], - "status": "declined", + "status": "pending", "requested_by": {}, "requested_at": {}, "confirmed_by": {}, @@ -264,8 +264,8 @@ const myWorkflow = createWorkflow( "declined_at": {}, "canceled_by": {}, "canceled_at": {}, - "created_at": "2025-11-22T20:47:56.063Z", - "updated_at": "2025-09-27T23:00:11.855Z" + "created_at": "2025-08-16T09:31:27.364Z", + "updated_at": "2025-12-30T04:57:15.498Z" } }) } diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createReturnShippingMethodWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createReturnShippingMethodWorkflow/page.mdx index 3da5817caa..e3b10e3904 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createReturnShippingMethodWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createReturnShippingMethodWorkflow/page.mdx @@ -18,28 +18,9 @@ This workflow creates a shipping method for a return. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createReturnShippingMethodWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createReturnShippingMethodWorkflow - .runAsStep({ - input: { - "return_id": "{value}", - "shipping_option_id": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -120,6 +101,27 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createReturnShippingMethodWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createReturnShippingMethodWorkflow + .runAsStep({ + input: { + "return_id": "{value}", + "shipping_option_id": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createShipmentValidateOrder/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createShipmentValidateOrder/page.mdx index f8510e1f59..8f0846b91f 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createShipmentValidateOrder/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.createShipmentValidateOrder/page.mdx @@ -22,89 +22,89 @@ const myWorkflow = createWorkflow( () => { const data = createShipmentValidateOrder({ "order": { - "id": "id_DQRERpKQGVxo", - "version": 7, - "display_id": 4, - "status": "canceled", + "id": "id_mV2eGbnMfYvu0", + "version": 25, + "display_id": 5, + "status": "completed", "currency_code": "{value}", - "created_at": "2025-03-20T10:41:18.454Z", - "updated_at": "2025-09-28T19:23:30.028Z", + "created_at": "2025-08-30T02:12:25.493Z", + "updated_at": "2025-03-17T13:23:59.534Z", "original_item_total": { - "numeric": 15 + "numeric": 2 }, "original_item_subtotal": { - "numeric": 7 + "numeric": 34 }, "original_item_tax_total": { - "numeric": 45 + "numeric": 16 }, "item_total": { - "numeric": 29 + "numeric": 42 }, "item_subtotal": { - "numeric": 32 - }, - "item_tax_total": { - "numeric": 15 - }, - "original_total": { - "numeric": 14 - }, - "original_subtotal": { - "numeric": 40 - }, - "original_tax_total": { - "numeric": 40 - }, - "total": { - "numeric": 33 - }, - "subtotal": { - "numeric": 5 - }, - "tax_total": { - "numeric": 28 - }, - "discount_subtotal": { - "numeric": 49 - }, - "discount_total": { - "numeric": 31 - }, - "discount_tax_total": { - "numeric": 30 - }, - "gift_card_total": { "numeric": 8 }, - "gift_card_tax_total": { + "item_tax_total": { + "numeric": 36 + }, + "original_total": { + "numeric": 25 + }, + "original_subtotal": { + "numeric": 23 + }, + "original_tax_total": { + "numeric": 41 + }, + "total": { "numeric": 28 }, - "shipping_total": { + "subtotal": { + "numeric": 44 + }, + "tax_total": { + "numeric": 1 + }, + "discount_subtotal": { + "numeric": 34 + }, + "discount_total": { + "numeric": 22 + }, + "discount_tax_total": { "numeric": 43 }, + "gift_card_total": { + "numeric": 26 + }, + "gift_card_tax_total": { + "numeric": 15 + }, + "shipping_total": { + "numeric": 22 + }, "shipping_subtotal": { - "numeric": 32 + "numeric": 40 }, "shipping_tax_total": { - "numeric": 13 + "numeric": 25 }, "original_shipping_total": { - "numeric": 30 + "numeric": 7 }, "original_shipping_subtotal": { "numeric": 49 }, "original_shipping_tax_total": { - "numeric": 28 + "numeric": 31 } }, "input": { "order_id": "{value}", "fulfillment_id": "{value}", "items": [{ - "id": "id_ddxAB0mPwV2lA6", - "quantity": 29 + "id": "id_G5tARI6V0xOgaKX0W", + "quantity": 40 }] } }) diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.declineOrderChangeWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.declineOrderChangeWorkflow/page.mdx index 0976a9201e..b0f227054c 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.declineOrderChangeWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.declineOrderChangeWorkflow/page.mdx @@ -16,27 +16,9 @@ This workflow declines an order change. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { declineOrderChangeWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = declineOrderChangeWorkflow - .runAsStep({ - input: { - "id": "id_YpLn1L5D5HL3ocZ" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -53,7 +35,7 @@ export async function POST( const { result } = await declineOrderChangeWorkflow(req.scope) .run({ input: { - "id": "id_YpLn1L5D5HL3ocZ" + "id": "id_gSODbUT6PJMvuQQH" } }) @@ -78,7 +60,7 @@ export default async function handleOrderPlaced({ const { result } = await declineOrderChangeWorkflow(container) .run({ input: { - "id": "id_YpLn1L5D5HL3ocZ" + "id": "id_gSODbUT6PJMvuQQH" } }) @@ -103,7 +85,7 @@ export default async function myCustomJob( const { result } = await declineOrderChangeWorkflow(container) .run({ input: { - "id": "id_YpLn1L5D5HL3ocZ" + "id": "id_gSODbUT6PJMvuQQH" } }) @@ -114,6 +96,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { declineOrderChangeWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = declineOrderChangeWorkflow + .runAsStep({ + input: { + "id": "id_gSODbUT6PJMvuQQH" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.declineOrderTransferRequestWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.declineOrderTransferRequestWorkflow/page.mdx index 216ea29a4f..bdb91b7535 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.declineOrderTransferRequestWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.declineOrderTransferRequestWorkflow/page.mdx @@ -19,28 +19,9 @@ Only the original customer (who has the token) is allowed to decline the transfe +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { declineOrderTransferRequestWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = declineOrderTransferRequestWorkflow - .runAsStep({ - input: { - "order_id": "{value}", - "token": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -121,6 +102,27 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { declineOrderTransferRequestWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = declineOrderTransferRequestWorkflow + .runAsStep({ + input: { + "order_id": "{value}", + "token": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.declineTransferOrderRequestValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.declineTransferOrderRequestValidationStep/page.mdx index b4c7a4da0e..ee2895776d 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.declineTransferOrderRequestValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.declineTransferOrderRequestValidationStep/page.mdx @@ -22,198 +22,198 @@ const myWorkflow = createWorkflow( () => { const data = declineTransferOrderRequestValidationStep({ "order": { - "id": "id_L8ycSrqBgfPf7gx0", - "version": 32, - "display_id": 40, - "status": "pending", + "id": "id_CImQskVnZQyAYv4e9", + "version": 14, + "display_id": 9, + "status": "canceled", "currency_code": "{value}", - "created_at": "2025-12-19T15:07:54.949Z", - "updated_at": "2025-09-06T13:00:06.967Z", + "created_at": "2025-12-01T08:06:43.429Z", + "updated_at": "2025-11-06T15:25:50.456Z", "original_item_total": { - "numeric": 12 + "numeric": 2 }, "original_item_subtotal": { - "numeric": 6 + "numeric": 50 }, "original_item_tax_total": { - "numeric": 8 + "numeric": 43 }, "item_total": { - "numeric": 1 + "numeric": 17 }, "item_subtotal": { - "numeric": 50 + "numeric": 10 }, "item_tax_total": { "numeric": 29 }, "original_total": { - "numeric": 24 + "numeric": 17 }, "original_subtotal": { - "numeric": 24 + "numeric": 26 }, "original_tax_total": { - "numeric": 32 + "numeric": 2 }, "total": { - "numeric": 36 + "numeric": 48 }, "subtotal": { - "numeric": 5 - }, - "tax_total": { "numeric": 21 }, + "tax_total": { + "numeric": 31 + }, "discount_subtotal": { - "numeric": 16 + "numeric": 26 }, "discount_total": { - "numeric": 16 + "numeric": 46 }, "discount_tax_total": { - "numeric": 12 + "numeric": 10 }, "gift_card_total": { - "numeric": 6 + "numeric": 16 }, "gift_card_tax_total": { - "numeric": 22 + "numeric": 5 }, "shipping_total": { - "numeric": 14 + "numeric": 0 }, "shipping_subtotal": { - "numeric": 43 + "numeric": 3 }, "shipping_tax_total": { - "numeric": 7 + "numeric": 15 }, "original_shipping_total": { - "numeric": 35 + "numeric": 14 }, "original_shipping_subtotal": { - "numeric": 48 + "numeric": 11 }, "original_shipping_tax_total": { "numeric": 25 } }, "orderChange": { - "id": "id_r97xn4e2pJqskQeIQ", - "version": 18, + "id": "id_d1Fa0zvRnVv7", + "version": 8, "order_id": "{value}", "return_id": "{value}", "exchange_id": "{value}", "claim_id": "{value}", "order": { - "id": "id_a4QB6J2EDav", - "version": 3, - "display_id": 38, - "status": "completed", + "id": "id_hJKwpRboi6E", + "version": 22, + "display_id": 19, + "status": "requires_action", "currency_code": "{value}", - "created_at": "2025-09-28T23:58:18.529Z", - "updated_at": "2025-08-18T03:24:20.123Z", + "created_at": "2025-06-18T03:59:23.314Z", + "updated_at": "2025-10-11T21:22:11.975Z", "original_item_total": { - "numeric": 40 + "numeric": 7 }, "original_item_subtotal": { - "numeric": 30 + "numeric": 42 }, "original_item_tax_total": { - "numeric": 28 + "numeric": 8 }, "item_total": { - "numeric": 49 + "numeric": 36 }, "item_subtotal": { - "numeric": 7 + "numeric": 0 }, "item_tax_total": { - "numeric": 35 - }, - "original_total": { - "numeric": 17 - }, - "original_subtotal": { - "numeric": 7 - }, - "original_tax_total": { - "numeric": 4 - }, - "total": { - "numeric": 43 - }, - "subtotal": { - "numeric": 38 - }, - "tax_total": { - "numeric": 30 - }, - "discount_subtotal": { - "numeric": 13 - }, - "discount_total": { "numeric": 10 }, - "discount_tax_total": { - "numeric": 35 + "original_total": { + "numeric": 8 }, - "gift_card_total": { + "original_subtotal": { + "numeric": 27 + }, + "original_tax_total": { + "numeric": 8 + }, + "total": { + "numeric": 11 + }, + "subtotal": { + "numeric": 11 + }, + "tax_total": { + "numeric": 15 + }, + "discount_subtotal": { "numeric": 38 }, + "discount_total": { + "numeric": 22 + }, + "discount_tax_total": { + "numeric": 0 + }, + "gift_card_total": { + "numeric": 26 + }, "gift_card_tax_total": { - "numeric": 24 + "numeric": 37 }, "shipping_total": { - "numeric": 6 + "numeric": 17 }, "shipping_subtotal": { - "numeric": 30 + "numeric": 37 }, "shipping_tax_total": { - "numeric": 3 + "numeric": 7 }, "original_shipping_total": { - "numeric": 20 + "numeric": 9 }, "original_shipping_subtotal": { - "numeric": 24 + "numeric": 28 }, "original_shipping_tax_total": { - "numeric": 0 + "numeric": 45 } }, "return_order": { - "id": "id_w07DGEjoyEgQ", - "status": "canceled", + "id": "id_zKPfPkPtax", + "status": "received", "order_id": "{value}", "items": [{ - "id": "id_mNaHZZUsxrRnwb", + "id": "id_tiWcDuIzKqL7aXdHPT", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 24 + "quantity": 23 }], - "display_id": 5, + "display_id": 31, "metadata": {} }, "exchange": { - "id": "id_8BPTPLIbqqppoH8Ri", + "id": "id_GAKj0SHHpApFaVuAOTk", "order_id": "{value}", - "order_version": 26, - "display_id": 50, + "order_version": 13, + "display_id": 22, "additional_items": [ "{value}" ], "metadata": {} }, "claim": { - "id": "id_vjeGrAGKJKl3memoztV", - "type": "replace", + "id": "id_XHjLcu2p4wPKPEMP9NS", + "type": "refund", "order_id": "{value}", - "order_version": 14, - "display_id": 36, + "order_version": 26, + "display_id": 42, "claim_items": [ "{value}" ], @@ -223,7 +223,7 @@ const myWorkflow = createWorkflow( "metadata": {} }, "actions": [{ - "id": "id_3dwGNLq0nKw9RK", + "id": "id_IhOx4kAT89kbF", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -233,13 +233,13 @@ const myWorkflow = createWorkflow( "order": {}, "reference": "{value}", "reference_id": "{value}", - "action": "SHIPPING_ADD", + "action": "CREDIT_LINE_ADD", "details": {}, "internal_note": {}, - "created_at": "2025-03-27T00:54:32.772Z", - "updated_at": "2025-04-24T04:52:47.627Z" + "created_at": "2025-11-18T02:46:43.857Z", + "updated_at": "2025-08-24T04:06:56.696Z" }], - "status": "declined", + "status": "confirmed", "requested_by": {}, "requested_at": {}, "confirmed_by": {}, @@ -250,8 +250,8 @@ const myWorkflow = createWorkflow( "declined_at": {}, "canceled_by": {}, "canceled_at": {}, - "created_at": "2025-06-19T08:39:15.290Z", - "updated_at": "2025-07-19T15:03:58.063Z" + "created_at": "2025-09-06T07:47:50.372Z", + "updated_at": "2025-05-16T19:31:25.033Z" }, "input": { "order_id": "{value}", diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.deleteOrderChangeActionsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.deleteOrderChangeActionsWorkflow/page.mdx index d774f41163..3110b7b1f4 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.deleteOrderChangeActionsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.deleteOrderChangeActionsWorkflow/page.mdx @@ -16,29 +16,9 @@ This workflow deletes one or more order change actions. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { deleteOrderChangeActionsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = deleteOrderChangeActionsWorkflow - .runAsStep({ - input: { - "ids": [ - "id_1UCWdpISdfu2q7cal" - ] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -56,7 +36,7 @@ export async function POST( .run({ input: { "ids": [ - "id_1UCWdpISdfu2q7cal" + "id_RSYgjooL3f7oVssdvA" ] } }) @@ -83,7 +63,7 @@ export default async function handleOrderPlaced({ .run({ input: { "ids": [ - "id_1UCWdpISdfu2q7cal" + "id_RSYgjooL3f7oVssdvA" ] } }) @@ -110,7 +90,7 @@ export default async function myCustomJob( .run({ input: { "ids": [ - "id_1UCWdpISdfu2q7cal" + "id_RSYgjooL3f7oVssdvA" ] } }) @@ -122,6 +102,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { deleteOrderChangeActionsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = deleteOrderChangeActionsWorkflow + .runAsStep({ + input: { + "ids": [ + "id_RSYgjooL3f7oVssdvA" + ] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.deleteOrderChangeWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.deleteOrderChangeWorkflow/page.mdx index 753391c3b8..b0b70f2cb5 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.deleteOrderChangeWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.deleteOrderChangeWorkflow/page.mdx @@ -16,29 +16,9 @@ This workflow deletes one or more order changes. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { deleteOrderChangeWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = deleteOrderChangeWorkflow - .runAsStep({ - input: { - "ids": [ - "id_CMhLYMrDZZivWvPof" - ] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -56,7 +36,7 @@ export async function POST( .run({ input: { "ids": [ - "id_CMhLYMrDZZivWvPof" + "id_YMhdqemA8d2Iu2CyRkH8" ] } }) @@ -83,7 +63,7 @@ export default async function handleOrderPlaced({ .run({ input: { "ids": [ - "id_CMhLYMrDZZivWvPof" + "id_YMhdqemA8d2Iu2CyRkH8" ] } }) @@ -110,7 +90,7 @@ export default async function myCustomJob( .run({ input: { "ids": [ - "id_CMhLYMrDZZivWvPof" + "id_YMhdqemA8d2Iu2CyRkH8" ] } }) @@ -122,6 +102,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { deleteOrderChangeWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = deleteOrderChangeWorkflow + .runAsStep({ + input: { + "ids": [ + "id_YMhdqemA8d2Iu2CyRkH8" + ] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.deleteOrderPaymentCollections/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.deleteOrderPaymentCollections/page.mdx index da116e1634..f883defe22 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.deleteOrderPaymentCollections/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.deleteOrderPaymentCollections/page.mdx @@ -17,27 +17,9 @@ This workflow deletes one or more invites. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { deleteOrderPaymentCollections } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = deleteOrderPaymentCollections - .runAsStep({ - input: { - "id": "id_rJsnIx9W0ofEotAF" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -54,7 +36,7 @@ export async function POST( const { result } = await deleteOrderPaymentCollections(req.scope) .run({ input: { - "id": "id_rJsnIx9W0ofEotAF" + "id": "id_twUPZp16G714n" } }) @@ -79,7 +61,7 @@ export default async function handleOrderPlaced({ const { result } = await deleteOrderPaymentCollections(container) .run({ input: { - "id": "id_rJsnIx9W0ofEotAF" + "id": "id_twUPZp16G714n" } }) @@ -104,7 +86,7 @@ export default async function myCustomJob( const { result } = await deleteOrderPaymentCollections(container) .run({ input: { - "id": "id_rJsnIx9W0ofEotAF" + "id": "id_twUPZp16G714n" } }) @@ -115,6 +97,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { deleteOrderPaymentCollections } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = deleteOrderPaymentCollections + .runAsStep({ + input: { + "id": "id_twUPZp16G714n" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.dismissItemReturnRequestValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.dismissItemReturnRequestValidationStep/page.mdx index 6ad02dd924..af73ead080 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.dismissItemReturnRequestValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.dismissItemReturnRequestValidationStep/page.mdx @@ -23,134 +23,134 @@ const myWorkflow = createWorkflow( const data = dismissItemReturnRequestValidationStep({ "order": "{value}", "orderReturn": { - "id": "id_LvGGtQTy2OaXfQGfRRwl", - "status": "partially_received", + "id": "id_sq5QrdxeYAb6tzq", + "status": "received", "order_id": "{value}", "items": [{ - "id": "id_HRgmLlXCuDcWg", + "id": "id_JeYPyarPod9YMBUp", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 46 + "quantity": 39 }], - "display_id": 32, + "display_id": 48, "metadata": {} }, "orderChange": { - "id": "id_uMDGEzyd7A1PENIFjO8e", - "version": 35, + "id": "id_zC0yq5WLlqEJor23q9fo", + "version": 30, "order_id": "{value}", "return_id": "{value}", "exchange_id": "{value}", "claim_id": "{value}", "order": { - "id": "id_ZRP0NUz3B9aUBeBn", - "version": 41, - "display_id": 37, - "status": "draft", + "id": "id_Lfx0bs04CdWjh23mGUg8", + "version": 45, + "display_id": 17, + "status": "canceled", "currency_code": "{value}", - "created_at": "2025-01-31T08:39:39.896Z", - "updated_at": "2025-08-04T04:21:28.460Z", + "created_at": "2025-02-06T00:55:34.388Z", + "updated_at": "2025-03-03T15:08:14.151Z", "original_item_total": { - "numeric": 48 + "numeric": 18 }, "original_item_subtotal": { "numeric": 25 }, "original_item_tax_total": { - "numeric": 11 + "numeric": 42 }, "item_total": { - "numeric": 8 + "numeric": 43 }, "item_subtotal": { - "numeric": 17 + "numeric": 15 }, "item_tax_total": { - "numeric": 23 + "numeric": 33 }, "original_total": { - "numeric": 42 + "numeric": 0 }, "original_subtotal": { "numeric": 8 }, "original_tax_total": { - "numeric": 18 + "numeric": 35 }, "total": { - "numeric": 37 + "numeric": 38 }, "subtotal": { - "numeric": 8 + "numeric": 41 }, "tax_total": { - "numeric": 11 + "numeric": 7 }, "discount_subtotal": { - "numeric": 15 + "numeric": 12 }, "discount_total": { - "numeric": 0 + "numeric": 10 }, "discount_tax_total": { - "numeric": 19 + "numeric": 12 }, "gift_card_total": { - "numeric": 8 + "numeric": 3 }, "gift_card_tax_total": { - "numeric": 24 + "numeric": 31 }, "shipping_total": { - "numeric": 32 + "numeric": 0 }, "shipping_subtotal": { - "numeric": 8 - }, - "shipping_tax_total": { "numeric": 29 }, + "shipping_tax_total": { + "numeric": 32 + }, "original_shipping_total": { - "numeric": 42 + "numeric": 5 }, "original_shipping_subtotal": { - "numeric": 13 + "numeric": 47 }, "original_shipping_tax_total": { - "numeric": 38 + "numeric": 50 } }, "return_order": { - "id": "id_eySDPgLIbeXw", - "status": "requested", + "id": "id_R5EEwuBGqsqjs1xixF", + "status": "partially_received", "order_id": "{value}", "items": [{ - "id": "id_g8BlILOcDsfIrKs", + "id": "id_GvADwwQDVPNUikaQ", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 44 + "quantity": 47 }], - "display_id": 4, + "display_id": 49, "metadata": {} }, "exchange": { - "id": "id_VGnbIsQqxibd", + "id": "id_zCGWcnkAR6SVcaL5", "order_id": "{value}", "order_version": 37, - "display_id": 40, + "display_id": 7, "additional_items": [ "{value}" ], "metadata": {} }, "claim": { - "id": "id_QMtZmpVBJYsOMxm9v", - "type": "refund", + "id": "id_lYxv4j4MYLH", + "type": "replace", "order_id": "{value}", - "order_version": 1, - "display_id": 36, + "order_version": 23, + "display_id": 33, "claim_items": [ "{value}" ], @@ -160,7 +160,7 @@ const myWorkflow = createWorkflow( "metadata": {} }, "actions": [{ - "id": "id_By0VXZWEjqOGwNBs", + "id": "id_C4ttGKTBrGXDKcyT", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -170,13 +170,13 @@ const myWorkflow = createWorkflow( "order": {}, "reference": "{value}", "reference_id": "{value}", - "action": "SHIP_ITEM", + "action": "CREDIT_LINE_ADD", "details": {}, "internal_note": {}, - "created_at": "2025-09-29T08:47:20.725Z", - "updated_at": "2025-01-24T16:03:39.257Z" + "created_at": "2025-07-08T07:13:10.688Z", + "updated_at": "2025-10-21T20:27:22.686Z" }], - "status": "confirmed", + "status": "pending", "requested_by": {}, "requested_at": {}, "confirmed_by": {}, @@ -187,12 +187,12 @@ const myWorkflow = createWorkflow( "declined_at": {}, "canceled_by": {}, "canceled_at": {}, - "created_at": "2025-09-25T19:36:44.384Z", - "updated_at": "2025-04-10T10:54:56.072Z" + "created_at": "2025-03-04T04:12:28.424Z", + "updated_at": "2025-12-23T08:53:09.173Z" }, "items": [{ - "id": "id_6YYQmjUYpx8Uihsp7", - "quantity": 43 + "id": "id_zlNrez54acP1QG5O734", + "quantity": 32 }] }) } diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.dismissItemReturnRequestWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.dismissItemReturnRequestWorkflow/page.mdx index b1fab934b8..657702f211 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.dismissItemReturnRequestWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.dismissItemReturnRequestWorkflow/page.mdx @@ -17,31 +17,9 @@ This workflow dismisses items from a return request. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { dismissItemReturnRequestWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = dismissItemReturnRequestWorkflow - .runAsStep({ - input: { - "return_id": "{value}", - "items": [{ - "id": "id_BXq6bXar0vJZ", - "quantity": 2 - }] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -60,8 +38,8 @@ export async function POST( input: { "return_id": "{value}", "items": [{ - "id": "id_BXq6bXar0vJZ", - "quantity": 2 + "id": "id_ONXyR3NZnM4yQ30QLgQY", + "quantity": 38 }] } }) @@ -89,8 +67,8 @@ export default async function handleOrderPlaced({ input: { "return_id": "{value}", "items": [{ - "id": "id_BXq6bXar0vJZ", - "quantity": 2 + "id": "id_ONXyR3NZnM4yQ30QLgQY", + "quantity": 38 }] } }) @@ -118,8 +96,8 @@ export default async function myCustomJob( input: { "return_id": "{value}", "items": [{ - "id": "id_BXq6bXar0vJZ", - "quantity": 2 + "id": "id_ONXyR3NZnM4yQ30QLgQY", + "quantity": 38 }] } }) @@ -131,6 +109,30 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { dismissItemReturnRequestWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = dismissItemReturnRequestWorkflow + .runAsStep({ + input: { + "return_id": "{value}", + "items": [{ + "id": "id_ONXyR3NZnM4yQ30QLgQY", + "quantity": 38 + }] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.exchangeAddNewItemValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.exchangeAddNewItemValidationStep/page.mdx index c99c4da10a..6eb8678cfe 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.exchangeAddNewItemValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.exchangeAddNewItemValidationStep/page.mdx @@ -22,208 +22,208 @@ const myWorkflow = createWorkflow( () => { const data = exchangeAddNewItemValidationStep({ "order": { - "id": "id_iKwRIEDGnQr1U", + "id": "id_wQf0a9uD3U", "version": 8, - "display_id": 3, - "status": "completed", + "display_id": 16, + "status": "pending", "currency_code": "{value}", - "created_at": "2025-09-29T07:02:31.776Z", - "updated_at": "2025-08-03T08:33:53.736Z", + "created_at": "2025-04-13T23:04:27.338Z", + "updated_at": "2025-05-28T08:08:22.715Z", "original_item_total": { - "numeric": 23 + "numeric": 27 }, "original_item_subtotal": { - "numeric": 14 + "numeric": 39 }, "original_item_tax_total": { - "numeric": 10 + "numeric": 20 }, "item_total": { - "numeric": 2 - }, - "item_subtotal": { - "numeric": 26 - }, - "item_tax_total": { - "numeric": 24 - }, - "original_total": { - "numeric": 24 - }, - "original_subtotal": { - "numeric": 47 - }, - "original_tax_total": { "numeric": 49 }, - "total": { - "numeric": 48 - }, - "subtotal": { + "item_subtotal": { "numeric": 32 }, - "tax_total": { - "numeric": 14 + "item_tax_total": { + "numeric": 20 }, - "discount_subtotal": { - "numeric": 41 - }, - "discount_total": { - "numeric": 31 - }, - "discount_tax_total": { + "original_total": { "numeric": 47 }, - "gift_card_total": { - "numeric": 44 + "original_subtotal": { + "numeric": 35 }, - "gift_card_tax_total": { + "original_tax_total": { + "numeric": 21 + }, + "total": { + "numeric": 35 + }, + "subtotal": { + "numeric": 1 + }, + "tax_total": { + "numeric": 28 + }, + "discount_subtotal": { + "numeric": 25 + }, + "discount_total": { "numeric": 34 }, + "discount_tax_total": { + "numeric": 8 + }, + "gift_card_total": { + "numeric": 4 + }, + "gift_card_tax_total": { + "numeric": 30 + }, "shipping_total": { - "numeric": 22 + "numeric": 46 }, "shipping_subtotal": { - "numeric": 18 + "numeric": 50 }, "shipping_tax_total": { - "numeric": 6 + "numeric": 46 }, "original_shipping_total": { - "numeric": 7 + "numeric": 16 }, "original_shipping_subtotal": { - "numeric": 40 + "numeric": 5 }, "original_shipping_tax_total": { - "numeric": 37 + "numeric": 44 } }, "orderExchange": { - "id": "id_s3tqXEtsnF", + "id": "id_eXCLuspHX0Q", "order_id": "{value}", - "order_version": 8, - "display_id": 13, + "order_version": 0, + "display_id": 46, "additional_items": [ "{value}" ], "metadata": {} }, "orderChange": { - "id": "id_UYPywWQBz5ORdXAN", - "version": 15, + "id": "id_Z09rPb8tYLkA", + "version": 40, "order_id": "{value}", "return_id": "{value}", "exchange_id": "{value}", "claim_id": "{value}", "order": { - "id": "id_c5MlmIgtcVU2f694cA5B", - "version": 23, - "display_id": 5, - "status": "completed", + "id": "id_cTdvCvbMmkV3Q13D9", + "version": 19, + "display_id": 0, + "status": "archived", "currency_code": "{value}", - "created_at": "2025-03-10T01:52:32.652Z", - "updated_at": "2025-07-20T23:54:10.447Z", + "created_at": "2025-06-20T09:20:30.843Z", + "updated_at": "2025-08-24T12:16:00.247Z", "original_item_total": { - "numeric": 16 + "numeric": 3 }, "original_item_subtotal": { - "numeric": 45 + "numeric": 46 }, "original_item_tax_total": { - "numeric": 29 + "numeric": 37 }, "item_total": { - "numeric": 19 + "numeric": 33 }, "item_subtotal": { - "numeric": 25 + "numeric": 5 }, "item_tax_total": { - "numeric": 25 + "numeric": 30 }, "original_total": { - "numeric": 49 + "numeric": 1 }, "original_subtotal": { - "numeric": 48 + "numeric": 22 }, "original_tax_total": { - "numeric": 11 + "numeric": 34 }, "total": { - "numeric": 9 + "numeric": 39 }, "subtotal": { - "numeric": 24 + "numeric": 36 }, "tax_total": { - "numeric": 12 + "numeric": 49 }, "discount_subtotal": { - "numeric": 42 - }, - "discount_total": { - "numeric": 4 - }, - "discount_tax_total": { "numeric": 35 }, + "discount_total": { + "numeric": 33 + }, + "discount_tax_total": { + "numeric": 11 + }, "gift_card_total": { - "numeric": 9 + "numeric": 41 }, "gift_card_tax_total": { - "numeric": 5 + "numeric": 13 }, "shipping_total": { - "numeric": 47 + "numeric": 16 }, "shipping_subtotal": { - "numeric": 0 + "numeric": 16 }, "shipping_tax_total": { - "numeric": 5 + "numeric": 35 }, "original_shipping_total": { - "numeric": 18 + "numeric": 24 }, "original_shipping_subtotal": { - "numeric": 6 + "numeric": 5 }, "original_shipping_tax_total": { - "numeric": 1 + "numeric": 32 } }, "return_order": { - "id": "id_5Cc2i6JWt7DLXBHk5", - "status": "requested", + "id": "id_VevhENgj4ZIv", + "status": "canceled", "order_id": "{value}", "items": [{ - "id": "id_8cP4Rsvkd3m", + "id": "id_ELNo4cdrFiznRvmi0", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 4 + "quantity": 16 }], - "display_id": 19, + "display_id": 36, "metadata": {} }, "exchange": { - "id": "id_KqEnrWQTnxP7UgbW", + "id": "id_7J0dCTafsLZ3lK3MrS", "order_id": "{value}", - "order_version": 21, - "display_id": 0, + "order_version": 50, + "display_id": 33, "additional_items": [ "{value}" ], "metadata": {} }, "claim": { - "id": "id_V8uGBqQMkPq0SxmRNwx3", + "id": "id_uat3rJAOqihiipb7V", "type": "refund", "order_id": "{value}", - "order_version": 15, - "display_id": 9, + "order_version": 43, + "display_id": 30, "claim_items": [ "{value}" ], @@ -233,7 +233,7 @@ const myWorkflow = createWorkflow( "metadata": {} }, "actions": [{ - "id": "id_7zNJUwBpV9Yg", + "id": "id_nFKQ6pVZZ1tX", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -243,11 +243,11 @@ const myWorkflow = createWorkflow( "order": {}, "reference": "{value}", "reference_id": "{value}", - "action": "CANCEL_ITEM_FULFILLMENT", + "action": "REINSTATE_ITEM", "details": {}, "internal_note": {}, - "created_at": "2025-10-19T12:28:59.386Z", - "updated_at": "2025-05-05T11:34:19.186Z" + "created_at": "2025-07-16T02:21:17.050Z", + "updated_at": "2025-10-03T17:19:31.447Z" }], "status": "requested", "requested_by": {}, @@ -260,8 +260,8 @@ const myWorkflow = createWorkflow( "declined_at": {}, "canceled_by": {}, "canceled_at": {}, - "created_at": "2025-12-11T13:46:31.504Z", - "updated_at": "2025-03-19T23:30:00.050Z" + "created_at": "2025-04-12T07:09:30.127Z", + "updated_at": "2025-03-06T08:35:33.090Z" } }) } diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.exchangeRequestItemReturnValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.exchangeRequestItemReturnValidationStep/page.mdx index fdca86a454..0de41fa1a5 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.exchangeRequestItemReturnValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.exchangeRequestItemReturnValidationStep/page.mdx @@ -22,222 +22,222 @@ const myWorkflow = createWorkflow( () => { const data = exchangeRequestItemReturnValidationStep({ "order": { - "id": "id_oCGgBXGn0lPkPVnhm", - "version": 27, - "display_id": 7, - "status": "completed", + "id": "id_x6BirPDwkK7lM", + "version": 46, + "display_id": 8, + "status": "requires_action", "currency_code": "{value}", - "created_at": "2025-09-10T16:40:35.044Z", - "updated_at": "2025-03-30T17:14:42.649Z", + "created_at": "2025-03-05T21:16:55.669Z", + "updated_at": "2025-06-26T05:08:55.703Z", "original_item_total": { - "numeric": 4 - }, - "original_item_subtotal": { - "numeric": 6 - }, - "original_item_tax_total": { - "numeric": 43 - }, - "item_total": { - "numeric": 6 - }, - "item_subtotal": { - "numeric": 50 - }, - "item_tax_total": { - "numeric": 47 - }, - "original_total": { - "numeric": 38 - }, - "original_subtotal": { - "numeric": 10 - }, - "original_tax_total": { - "numeric": 33 - }, - "total": { - "numeric": 34 - }, - "subtotal": { - "numeric": 44 - }, - "tax_total": { - "numeric": 26 - }, - "discount_subtotal": { - "numeric": 29 - }, - "discount_total": { - "numeric": 32 - }, - "discount_tax_total": { "numeric": 39 }, - "gift_card_total": { - "numeric": 35 + "original_item_subtotal": { + "numeric": 41 }, - "gift_card_tax_total": { - "numeric": 14 + "original_item_tax_total": { + "numeric": 3 }, - "shipping_total": { - "numeric": 18 + "item_total": { + "numeric": 7 }, - "shipping_subtotal": { - "numeric": 50 + "item_subtotal": { + "numeric": 28 }, - "shipping_tax_total": { + "item_tax_total": { "numeric": 40 }, - "original_shipping_total": { - "numeric": 14 + "original_total": { + "numeric": 20 }, - "original_shipping_subtotal": { + "original_subtotal": { + "numeric": 37 + }, + "original_tax_total": { + "numeric": 48 + }, + "total": { + "numeric": 24 + }, + "subtotal": { + "numeric": 42 + }, + "tax_total": { + "numeric": 22 + }, + "discount_subtotal": { + "numeric": 39 + }, + "discount_total": { + "numeric": 29 + }, + "discount_tax_total": { + "numeric": 32 + }, + "gift_card_total": { "numeric": 10 }, + "gift_card_tax_total": { + "numeric": 36 + }, + "shipping_total": { + "numeric": 25 + }, + "shipping_subtotal": { + "numeric": 6 + }, + "shipping_tax_total": { + "numeric": 19 + }, + "original_shipping_total": { + "numeric": 30 + }, + "original_shipping_subtotal": { + "numeric": 23 + }, "original_shipping_tax_total": { - "numeric": 46 + "numeric": 21 } }, "orderReturn": { - "id": "id_fwtABdqDxPJet3EdcSfZ", - "status": "partially_received", + "id": "id_1Dhz8gVK14zedR", + "status": "received", "order_id": "{value}", "items": [{ - "id": "id_BtNWQ99QDCz0ku8n6K", + "id": "id_oEXCY2Y5PPO3GHGhJcYC", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 13 + "quantity": 2 }], - "display_id": 3, + "display_id": 19, "metadata": {} }, "orderExchange": { - "id": "id_KvpxfnzCPVfbRfolwb", + "id": "id_rWDnC6vgh22U2pc4HE", "order_id": "{value}", - "order_version": 36, - "display_id": 21, + "order_version": 22, + "display_id": 10, "additional_items": [ "{value}" ], "metadata": {} }, "orderChange": { - "id": "id_EyJKuF3JBPK2dT3R40s", - "version": 30, + "id": "id_uHyy57BkGKbp3ouDZ", + "version": 18, "order_id": "{value}", "return_id": "{value}", "exchange_id": "{value}", "claim_id": "{value}", "order": { - "id": "id_uvZvIvSSW0Oh", - "version": 11, - "display_id": 12, + "id": "id_4yHaHR9iab3T9YuOCya", + "version": 30, + "display_id": 1, "status": "completed", "currency_code": "{value}", - "created_at": "2025-05-23T10:04:37.925Z", - "updated_at": "2025-09-06T10:33:02.035Z", + "created_at": "2025-10-15T13:11:36.466Z", + "updated_at": "2025-07-22T12:43:11.693Z", "original_item_total": { - "numeric": 4 + "numeric": 3 }, "original_item_subtotal": { - "numeric": 0 - }, - "original_item_tax_total": { - "numeric": 3 - }, - "item_total": { - "numeric": 11 - }, - "item_subtotal": { - "numeric": 31 - }, - "item_tax_total": { "numeric": 7 }, - "original_total": { - "numeric": 0 - }, - "original_subtotal": { - "numeric": 4 - }, - "original_tax_total": { - "numeric": 6 - }, - "total": { - "numeric": 28 - }, - "subtotal": { - "numeric": 19 - }, - "tax_total": { - "numeric": 43 - }, - "discount_subtotal": { - "numeric": 6 - }, - "discount_total": { - "numeric": 49 - }, - "discount_tax_total": { - "numeric": 0 - }, - "gift_card_total": { - "numeric": 50 - }, - "gift_card_tax_total": { - "numeric": 27 - }, - "shipping_total": { + "original_item_tax_total": { "numeric": 11 }, + "item_total": { + "numeric": 41 + }, + "item_subtotal": { + "numeric": 18 + }, + "item_tax_total": { + "numeric": 42 + }, + "original_total": { + "numeric": 45 + }, + "original_subtotal": { + "numeric": 47 + }, + "original_tax_total": { + "numeric": 20 + }, + "total": { + "numeric": 49 + }, + "subtotal": { + "numeric": 38 + }, + "tax_total": { + "numeric": 39 + }, + "discount_subtotal": { + "numeric": 14 + }, + "discount_total": { + "numeric": 31 + }, + "discount_tax_total": { + "numeric": 10 + }, + "gift_card_total": { + "numeric": 44 + }, + "gift_card_tax_total": { + "numeric": 36 + }, + "shipping_total": { + "numeric": 40 + }, "shipping_subtotal": { - "numeric": 3 + "numeric": 26 }, "shipping_tax_total": { - "numeric": 35 + "numeric": 13 }, "original_shipping_total": { - "numeric": 21 + "numeric": 48 }, "original_shipping_subtotal": { - "numeric": 29 + "numeric": 4 }, "original_shipping_tax_total": { - "numeric": 46 + "numeric": 3 } }, "return_order": { - "id": "id_RsqMfDGYai", - "status": "canceled", + "id": "id_hug0F3f5gTk6pkLx3qnh", + "status": "requested", "order_id": "{value}", "items": [{ - "id": "id_6b6PCfZED6ugjh", + "id": "id_LHnLaHW4Byp", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 33 + "quantity": 26 }], - "display_id": 14, + "display_id": 31, "metadata": {} }, "exchange": { - "id": "id_9E0s0oAjDseHB", + "id": "id_DwaApfW6By", "order_id": "{value}", - "order_version": 18, - "display_id": 49, + "order_version": 25, + "display_id": 43, "additional_items": [ "{value}" ], "metadata": {} }, "claim": { - "id": "id_8hkNQhTs24rp7", + "id": "id_AFZYEudUO35M3xUt3r", "type": "refund", "order_id": "{value}", - "order_version": 24, - "display_id": 20, + "order_version": 36, + "display_id": 1, "claim_items": [ "{value}" ], @@ -247,7 +247,7 @@ const myWorkflow = createWorkflow( "metadata": {} }, "actions": [{ - "id": "id_kwjaUhlPNaeDDvFs", + "id": "id_NOqRhohK9L3y6", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -257,11 +257,11 @@ const myWorkflow = createWorkflow( "order": {}, "reference": "{value}", "reference_id": "{value}", - "action": "CANCEL_ITEM_FULFILLMENT", + "action": "WRITE_OFF_ITEM", "details": {}, "internal_note": {}, - "created_at": "2025-05-06T06:50:28.681Z", - "updated_at": "2025-02-11T04:06:25.216Z" + "created_at": "2025-08-24T04:59:32.234Z", + "updated_at": "2025-10-06T13:11:40.121Z" }], "status": "canceled", "requested_by": {}, @@ -274,12 +274,12 @@ const myWorkflow = createWorkflow( "declined_at": {}, "canceled_by": {}, "canceled_at": {}, - "created_at": "2025-10-20T20:47:13.066Z", - "updated_at": "2025-11-08T19:17:48.836Z" + "created_at": "2025-05-23T15:08:28.860Z", + "updated_at": "2025-02-01T16:45:44.466Z" }, "items": [{ - "id": "id_cNURlqVbo5Xlx", - "quantity": 13 + "id": "id_aP5XsZnPN3JpZWi0vi", + "quantity": 42 }] }) } diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.getOrderDetailWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.getOrderDetailWorkflow/page.mdx index d882165ebc..818244f6ea 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.getOrderDetailWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.getOrderDetailWorkflow/page.mdx @@ -16,30 +16,9 @@ This workflow retrieves an order's details. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { getOrderDetailWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = getOrderDetailWorkflow - .runAsStep({ - input: { - "fields": [ - "{value}" - ], - "order_id": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -126,6 +105,29 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { getOrderDetailWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = getOrderDetailWorkflow + .runAsStep({ + input: { + "fields": [ + "{value}" + ], + "order_id": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.getOrdersListWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.getOrdersListWorkflow/page.mdx index 4bb95c2337..1745d8c7c5 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.getOrdersListWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.getOrdersListWorkflow/page.mdx @@ -16,29 +16,9 @@ This workflow retrieves a list of orders. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { getOrdersListWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = getOrdersListWorkflow - .runAsStep({ - input: { - "fields": [ - "{value}" - ] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -122,6 +102,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { getOrdersListWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = getOrdersListWorkflow + .runAsStep({ + input: { + "fields": [ + "{value}" + ] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.markOrderFulfillmentAsDeliveredWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.markOrderFulfillmentAsDeliveredWorkflow/page.mdx index 5ab26becf3..fed7485dce 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.markOrderFulfillmentAsDeliveredWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.markOrderFulfillmentAsDeliveredWorkflow/page.mdx @@ -18,28 +18,9 @@ This workflow marks a fulfillment in an order as delivered. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { markOrderFulfillmentAsDeliveredWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = markOrderFulfillmentAsDeliveredWorkflow - .runAsStep({ - input: { - "orderId": "{value}", - "fulfillmentId": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -120,6 +101,27 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { markOrderFulfillmentAsDeliveredWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = markOrderFulfillmentAsDeliveredWorkflow + .runAsStep({ + input: { + "orderId": "{value}", + "fulfillmentId": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.markPaymentCollectionAsPaid/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.markPaymentCollectionAsPaid/page.mdx index 486aef332a..9c92f93ac3 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.markPaymentCollectionAsPaid/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.markPaymentCollectionAsPaid/page.mdx @@ -20,28 +20,9 @@ This workflow marks a payment collection for an order as paid. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { markPaymentCollectionAsPaid } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = markPaymentCollectionAsPaid - .runAsStep({ - input: { - "payment_collection_id": "{value}", - "order_id": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -122,6 +103,27 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { markPaymentCollectionAsPaid } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = markPaymentCollectionAsPaid + .runAsStep({ + input: { + "payment_collection_id": "{value}", + "order_id": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderClaimAddNewItemValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderClaimAddNewItemValidationStep/page.mdx index d0ccb2f3d6..023bc8be37 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderClaimAddNewItemValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderClaimAddNewItemValidationStep/page.mdx @@ -22,89 +22,89 @@ const myWorkflow = createWorkflow( () => { const data = orderClaimAddNewItemValidationStep({ "order": { - "id": "id_LfqT2TTa1aHQNFVNl", - "version": 16, - "display_id": 16, - "status": "draft", + "id": "id_grhmnAn3N43Inc", + "version": 19, + "display_id": 48, + "status": "requires_action", "currency_code": "{value}", - "created_at": "2025-02-04T21:30:09.937Z", - "updated_at": "2025-03-26T13:22:48.039Z", + "created_at": "2025-11-27T16:49:15.684Z", + "updated_at": "2025-06-25T19:03:26.307Z", "original_item_total": { - "numeric": 37 - }, - "original_item_subtotal": { - "numeric": 16 - }, - "original_item_tax_total": { - "numeric": 43 - }, - "item_total": { - "numeric": 25 - }, - "item_subtotal": { - "numeric": 38 - }, - "item_tax_total": { - "numeric": 10 - }, - "original_total": { - "numeric": 47 - }, - "original_subtotal": { - "numeric": 5 - }, - "original_tax_total": { - "numeric": 40 - }, - "total": { - "numeric": 28 - }, - "subtotal": { - "numeric": 30 - }, - "tax_total": { - "numeric": 10 - }, - "discount_subtotal": { - "numeric": 9 - }, - "discount_total": { - "numeric": 46 - }, - "discount_tax_total": { - "numeric": 12 - }, - "gift_card_total": { - "numeric": 32 - }, - "gift_card_tax_total": { - "numeric": 48 - }, - "shipping_total": { - "numeric": 5 - }, - "shipping_subtotal": { - "numeric": 25 - }, - "shipping_tax_total": { - "numeric": 23 - }, - "original_shipping_total": { - "numeric": 40 - }, - "original_shipping_subtotal": { "numeric": 26 }, + "original_item_subtotal": { + "numeric": 13 + }, + "original_item_tax_total": { + "numeric": 8 + }, + "item_total": { + "numeric": 32 + }, + "item_subtotal": { + "numeric": 20 + }, + "item_tax_total": { + "numeric": 29 + }, + "original_total": { + "numeric": 11 + }, + "original_subtotal": { + "numeric": 30 + }, + "original_tax_total": { + "numeric": 0 + }, + "total": { + "numeric": 3 + }, + "subtotal": { + "numeric": 12 + }, + "tax_total": { + "numeric": 12 + }, + "discount_subtotal": { + "numeric": 46 + }, + "discount_total": { + "numeric": 11 + }, + "discount_tax_total": { + "numeric": 49 + }, + "gift_card_total": { + "numeric": 45 + }, + "gift_card_tax_total": { + "numeric": 8 + }, + "shipping_total": { + "numeric": 26 + }, + "shipping_subtotal": { + "numeric": 38 + }, + "shipping_tax_total": { + "numeric": 17 + }, + "original_shipping_total": { + "numeric": 33 + }, + "original_shipping_subtotal": { + "numeric": 47 + }, "original_shipping_tax_total": { - "numeric": 44 + "numeric": 5 } }, "orderClaim": { - "id": "id_CDjprWnnx8juM2", + "id": "id_LEbxdYaKRJekypC2bf", "type": "replace", "order_id": "{value}", - "order_version": 38, - "display_id": 14, + "order_version": 1, + "display_id": 44, "claim_items": [ "{value}" ], @@ -114,120 +114,120 @@ const myWorkflow = createWorkflow( "metadata": {} }, "orderChange": { - "id": "id_CTThT4qlqMzSqSZ4uxh", - "version": 35, + "id": "id_HmKov8sByJl500rc8GtE", + "version": 23, "order_id": "{value}", "return_id": "{value}", "exchange_id": "{value}", "claim_id": "{value}", "order": { - "id": "id_nAUzOEG3mMBOY2GvC", - "version": 35, - "display_id": 45, - "status": "requires_action", + "id": "id_bRH9MLFyQuyjZGeP", + "version": 48, + "display_id": 33, + "status": "archived", "currency_code": "{value}", - "created_at": "2025-10-27T14:27:54.801Z", - "updated_at": "2025-05-30T08:53:20.359Z", + "created_at": "2025-11-30T02:54:38.610Z", + "updated_at": "2025-03-21T22:25:04.032Z", "original_item_total": { - "numeric": 11 - }, - "original_item_subtotal": { "numeric": 14 }, + "original_item_subtotal": { + "numeric": 28 + }, "original_item_tax_total": { - "numeric": 8 + "numeric": 6 }, "item_total": { - "numeric": 29 + "numeric": 31 }, "item_subtotal": { - "numeric": 45 + "numeric": 25 }, "item_tax_total": { - "numeric": 37 + "numeric": 18 }, "original_total": { - "numeric": 12 + "numeric": 29 }, "original_subtotal": { - "numeric": 49 + "numeric": 39 }, "original_tax_total": { - "numeric": 40 + "numeric": 37 }, "total": { - "numeric": 32 + "numeric": 47 }, "subtotal": { - "numeric": 34 + "numeric": 9 }, "tax_total": { "numeric": 29 }, "discount_subtotal": { - "numeric": 23 + "numeric": 15 }, "discount_total": { - "numeric": 0 + "numeric": 24 }, "discount_tax_total": { - "numeric": 48 + "numeric": 5 }, "gift_card_total": { - "numeric": 13 + "numeric": 0 }, "gift_card_tax_total": { - "numeric": 11 + "numeric": 36 }, "shipping_total": { - "numeric": 18 + "numeric": 30 }, "shipping_subtotal": { - "numeric": 34 + "numeric": 46 }, "shipping_tax_total": { "numeric": 31 }, "original_shipping_total": { - "numeric": 26 + "numeric": 0 }, "original_shipping_subtotal": { - "numeric": 23 + "numeric": 24 }, "original_shipping_tax_total": { - "numeric": 9 + "numeric": 0 } }, "return_order": { - "id": "id_PY98AF2hVxMtu4VYien4", - "status": "requested", + "id": "id_q5DPo29Bo7yC", + "status": "partially_received", "order_id": "{value}", "items": [{ - "id": "id_RixoNdOXu8oLKlE9a", + "id": "id_sAoQ8xFWwIUNfjevwIwy", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 50 + "quantity": 34 }], - "display_id": 11, + "display_id": 44, "metadata": {} }, "exchange": { - "id": "id_xhlOg7lRNwUros5", + "id": "id_4haDEmf4IfC", "order_id": "{value}", - "order_version": 49, - "display_id": 5, + "order_version": 0, + "display_id": 2, "additional_items": [ "{value}" ], "metadata": {} }, "claim": { - "id": "id_Lrubeo4y1fZYCD", + "id": "id_TWMd2ZpPH3acIMnrzg", "type": "replace", "order_id": "{value}", - "order_version": 49, - "display_id": 1, + "order_version": 3, + "display_id": 0, "claim_items": [ "{value}" ], @@ -237,7 +237,7 @@ const myWorkflow = createWorkflow( "metadata": {} }, "actions": [{ - "id": "id_ZtoeHgpAlARC71q", + "id": "id_ymGwysgmEp", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -247,13 +247,13 @@ const myWorkflow = createWorkflow( "order": {}, "reference": "{value}", "reference_id": "{value}", - "action": "WRITE_OFF_ITEM", + "action": "ITEM_REMOVE", "details": {}, "internal_note": {}, - "created_at": "2025-09-03T11:07:16.986Z", - "updated_at": "2025-08-08T04:48:56.108Z" + "created_at": "2025-11-01T19:23:39.111Z", + "updated_at": "2025-04-06T04:43:27.089Z" }], - "status": "requested", + "status": "canceled", "requested_by": {}, "requested_at": {}, "confirmed_by": {}, @@ -264,8 +264,8 @@ const myWorkflow = createWorkflow( "declined_at": {}, "canceled_by": {}, "canceled_at": {}, - "created_at": "2025-07-14T11:26:34.639Z", - "updated_at": "2025-11-12T14:50:00.415Z" + "created_at": "2025-02-02T13:22:01.008Z", + "updated_at": "2025-11-26T19:57:39.465Z" } }) } diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderClaimAddNewItemWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderClaimAddNewItemWorkflow/page.mdx index 5dd57ee003..e5e16dba79 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderClaimAddNewItemWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderClaimAddNewItemWorkflow/page.mdx @@ -23,31 +23,9 @@ This workflow adds a new item to a claim. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { orderClaimAddNewItemWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = orderClaimAddNewItemWorkflow - .runAsStep({ - input: { - "claim_id": "{value}", - "items": [{ - "variant_id": "{value}", - "quantity": 12 - }] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -67,7 +45,7 @@ export async function POST( "claim_id": "{value}", "items": [{ "variant_id": "{value}", - "quantity": 12 + "quantity": 35 }] } }) @@ -96,7 +74,7 @@ export default async function handleOrderPlaced({ "claim_id": "{value}", "items": [{ "variant_id": "{value}", - "quantity": 12 + "quantity": 35 }] } }) @@ -125,7 +103,7 @@ export default async function myCustomJob( "claim_id": "{value}", "items": [{ "variant_id": "{value}", - "quantity": 12 + "quantity": 35 }] } }) @@ -137,6 +115,30 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { orderClaimAddNewItemWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = orderClaimAddNewItemWorkflow + .runAsStep({ + input: { + "claim_id": "{value}", + "items": [{ + "variant_id": "{value}", + "quantity": 35 + }] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderClaimItemValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderClaimItemValidationStep/page.mdx index c01c91c3d6..4cdab064ed 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderClaimItemValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderClaimItemValidationStep/page.mdx @@ -22,89 +22,89 @@ const myWorkflow = createWorkflow( () => { const data = orderClaimItemValidationStep({ "order": { - "id": "id_jwE8FmzSzNdrLk7vm", - "version": 8, - "display_id": 50, - "status": "canceled", + "id": "id_YyR4o9roRhUHOZ", + "version": 28, + "display_id": 43, + "status": "pending", "currency_code": "{value}", - "created_at": "2025-10-08T02:54:38.734Z", - "updated_at": "2025-08-01T12:13:47.429Z", + "created_at": "2025-10-28T22:22:24.102Z", + "updated_at": "2025-03-27T11:39:08.442Z", "original_item_total": { - "numeric": 23 + "numeric": 33 }, "original_item_subtotal": { - "numeric": 29 + "numeric": 16 }, "original_item_tax_total": { - "numeric": 28 + "numeric": 12 }, "item_total": { - "numeric": 38 + "numeric": 12 }, "item_subtotal": { - "numeric": 31 + "numeric": 26 }, "item_tax_total": { - "numeric": 43 + "numeric": 41 }, "original_total": { - "numeric": 39 + "numeric": 47 }, "original_subtotal": { - "numeric": 7 + "numeric": 42 }, "original_tax_total": { - "numeric": 35 - }, - "total": { - "numeric": 30 - }, - "subtotal": { "numeric": 31 }, + "total": { + "numeric": 43 + }, + "subtotal": { + "numeric": 16 + }, "tax_total": { - "numeric": 44 + "numeric": 16 }, "discount_subtotal": { - "numeric": 0 + "numeric": 5 }, "discount_total": { - "numeric": 35 + "numeric": 37 }, "discount_tax_total": { "numeric": 5 }, "gift_card_total": { - "numeric": 28 + "numeric": 44 }, "gift_card_tax_total": { - "numeric": 20 + "numeric": 18 }, "shipping_total": { - "numeric": 23 + "numeric": 46 }, "shipping_subtotal": { - "numeric": 20 + "numeric": 11 }, "shipping_tax_total": { - "numeric": 48 + "numeric": 19 }, "original_shipping_total": { - "numeric": 48 + "numeric": 30 }, "original_shipping_subtotal": { - "numeric": 22 + "numeric": 23 }, "original_shipping_tax_total": { - "numeric": 3 + "numeric": 15 } }, "orderClaim": { - "id": "id_adJmBhIqHE7qfTGoe3", + "id": "id_sEdwYbid3mN", "type": "refund", "order_id": "{value}", - "order_version": 8, - "display_id": 49, + "order_version": 13, + "display_id": 21, "claim_items": [ "{value}" ], @@ -114,120 +114,120 @@ const myWorkflow = createWorkflow( "metadata": {} }, "orderChange": { - "id": "id_pqtHtOQIkjw7S", - "version": 41, + "id": "id_ouDU8TneTQUMNa18UxC", + "version": 25, "order_id": "{value}", "return_id": "{value}", "exchange_id": "{value}", "claim_id": "{value}", "order": { - "id": "id_uoUE2UOAAOMGF", - "version": 27, - "display_id": 44, + "id": "id_dueeL2fsNvNjPBPQ", + "version": 18, + "display_id": 49, "status": "archived", "currency_code": "{value}", - "created_at": "2025-08-11T11:16:32.218Z", - "updated_at": "2025-07-24T16:23:35.480Z", + "created_at": "2025-08-04T22:44:55.522Z", + "updated_at": "2025-11-28T13:39:19.804Z", "original_item_total": { - "numeric": 35 + "numeric": 42 }, "original_item_subtotal": { - "numeric": 24 + "numeric": 5 }, "original_item_tax_total": { - "numeric": 34 + "numeric": 49 }, "item_total": { - "numeric": 27 + "numeric": 22 }, "item_subtotal": { - "numeric": 50 + "numeric": 18 }, "item_tax_total": { - "numeric": 1 + "numeric": 40 }, "original_total": { - "numeric": 0 + "numeric": 40 }, "original_subtotal": { - "numeric": 35 + "numeric": 38 }, "original_tax_total": { - "numeric": 33 + "numeric": 43 }, "total": { - "numeric": 29 + "numeric": 19 }, "subtotal": { "numeric": 18 }, "tax_total": { - "numeric": 33 - }, - "discount_subtotal": { - "numeric": 31 - }, - "discount_total": { - "numeric": 29 - }, - "discount_tax_total": { - "numeric": 37 - }, - "gift_card_total": { - "numeric": 35 - }, - "gift_card_tax_total": { - "numeric": 39 - }, - "shipping_total": { - "numeric": 17 - }, - "shipping_subtotal": { "numeric": 38 }, - "shipping_tax_total": { - "numeric": 50 + "discount_subtotal": { + "numeric": 5 }, - "original_shipping_total": { - "numeric": 42 + "discount_total": { + "numeric": 6 }, - "original_shipping_subtotal": { + "discount_tax_total": { + "numeric": 41 + }, + "gift_card_total": { + "numeric": 7 + }, + "gift_card_tax_total": { + "numeric": 28 + }, + "shipping_total": { "numeric": 21 }, + "shipping_subtotal": { + "numeric": 10 + }, + "shipping_tax_total": { + "numeric": 1 + }, + "original_shipping_total": { + "numeric": 16 + }, + "original_shipping_subtotal": { + "numeric": 19 + }, "original_shipping_tax_total": { - "numeric": 30 + "numeric": 41 } }, "return_order": { - "id": "id_SpFr0mWl7ETVUTs", - "status": "received", + "id": "id_l2xXxZ1PMZ6Tbo4KfZD", + "status": "requested", "order_id": "{value}", "items": [{ - "id": "id_PwEj1q8V6qcuOxGR", + "id": "id_4NSWPdjmIgH", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 17 + "quantity": 1 }], - "display_id": 25, + "display_id": 30, "metadata": {} }, "exchange": { - "id": "id_rq6nAFrhFuV", + "id": "id_SS5AgqCKvyjX", "order_id": "{value}", - "order_version": 24, - "display_id": 17, + "order_version": 42, + "display_id": 48, "additional_items": [ "{value}" ], "metadata": {} }, "claim": { - "id": "id_nCTMiPG6Hzol", + "id": "id_K1o1XS5g90EW4zYbl", "type": "replace", "order_id": "{value}", - "order_version": 14, - "display_id": 39, + "order_version": 12, + "display_id": 21, "claim_items": [ "{value}" ], @@ -237,7 +237,7 @@ const myWorkflow = createWorkflow( "metadata": {} }, "actions": [{ - "id": "id_ZFdgL8Nw0B6Q", + "id": "id_NYEeRNP7BXbwg4Xvn", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -247,13 +247,13 @@ const myWorkflow = createWorkflow( "order": {}, "reference": "{value}", "reference_id": "{value}", - "action": "ITEM_UPDATE", + "action": "WRITE_OFF_ITEM", "details": {}, "internal_note": {}, - "created_at": "2026-01-05T07:27:45.813Z", - "updated_at": "2025-10-02T21:58:49.761Z" + "created_at": "2025-07-23T01:26:04.733Z", + "updated_at": "2025-09-29T13:03:26.885Z" }], - "status": "pending", + "status": "confirmed", "requested_by": {}, "requested_at": {}, "confirmed_by": {}, @@ -264,8 +264,8 @@ const myWorkflow = createWorkflow( "declined_at": {}, "canceled_by": {}, "canceled_at": {}, - "created_at": "2025-02-27T23:17:01.100Z", - "updated_at": "2025-03-28T04:07:21.516Z" + "created_at": "2025-08-29T10:24:08.431Z", + "updated_at": "2025-03-20T00:43:47.693Z" } }) } diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderClaimItemWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderClaimItemWorkflow/page.mdx index 212a3a01fa..5c09a5b089 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderClaimItemWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderClaimItemWorkflow/page.mdx @@ -17,31 +17,9 @@ This workflow adds claim items to a claim. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { orderClaimItemWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = orderClaimItemWorkflow - .runAsStep({ - input: { - "claim_id": "{value}", - "items": [{ - "id": "id_Eupn104hJo63CGtywod", - "quantity": 6 - }] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -60,8 +38,8 @@ export async function POST( input: { "claim_id": "{value}", "items": [{ - "id": "id_Eupn104hJo63CGtywod", - "quantity": 6 + "id": "id_9BHdKHhRnT4AD", + "quantity": 43 }] } }) @@ -89,8 +67,8 @@ export default async function handleOrderPlaced({ input: { "claim_id": "{value}", "items": [{ - "id": "id_Eupn104hJo63CGtywod", - "quantity": 6 + "id": "id_9BHdKHhRnT4AD", + "quantity": 43 }] } }) @@ -118,8 +96,8 @@ export default async function myCustomJob( input: { "claim_id": "{value}", "items": [{ - "id": "id_Eupn104hJo63CGtywod", - "quantity": 6 + "id": "id_9BHdKHhRnT4AD", + "quantity": 43 }] } }) @@ -131,6 +109,30 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { orderClaimItemWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = orderClaimItemWorkflow + .runAsStep({ + input: { + "claim_id": "{value}", + "items": [{ + "id": "id_9BHdKHhRnT4AD", + "quantity": 43 + }] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderClaimRequestItemReturnValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderClaimRequestItemReturnValidationStep/page.mdx index 503a489c76..8138ecab0d 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderClaimRequestItemReturnValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderClaimRequestItemReturnValidationStep/page.mdx @@ -22,103 +22,103 @@ const myWorkflow = createWorkflow( () => { const data = orderClaimRequestItemReturnValidationStep({ "order": { - "id": "id_S0BzGMHOqbo", - "version": 5, - "display_id": 44, - "status": "archived", + "id": "id_S4X5AGeiANUyS9", + "version": 49, + "display_id": 23, + "status": "canceled", "currency_code": "{value}", - "created_at": "2025-02-05T09:50:27.648Z", - "updated_at": "2025-10-30T07:56:33.699Z", + "created_at": "2025-10-16T09:45:27.538Z", + "updated_at": "2025-12-10T13:59:11.558Z", "original_item_total": { - "numeric": 15 + "numeric": 36 }, "original_item_subtotal": { - "numeric": 42 + "numeric": 32 }, "original_item_tax_total": { - "numeric": 5 + "numeric": 28 }, "item_total": { - "numeric": 42 + "numeric": 28 }, "item_subtotal": { - "numeric": 26 + "numeric": 40 }, "item_tax_total": { - "numeric": 48 + "numeric": 1 }, "original_total": { - "numeric": 33 + "numeric": 45 }, "original_subtotal": { - "numeric": 30 - }, - "original_tax_total": { - "numeric": 23 - }, - "total": { - "numeric": 29 - }, - "subtotal": { - "numeric": 30 - }, - "tax_total": { - "numeric": 8 - }, - "discount_subtotal": { - "numeric": 11 - }, - "discount_total": { - "numeric": 35 - }, - "discount_tax_total": { - "numeric": 38 - }, - "gift_card_total": { - "numeric": 9 - }, - "gift_card_tax_total": { - "numeric": 17 - }, - "shipping_total": { - "numeric": 0 - }, - "shipping_subtotal": { - "numeric": 27 - }, - "shipping_tax_total": { - "numeric": 10 - }, - "original_shipping_total": { "numeric": 46 }, + "original_tax_total": { + "numeric": 41 + }, + "total": { + "numeric": 10 + }, + "subtotal": { + "numeric": 38 + }, + "tax_total": { + "numeric": 20 + }, + "discount_subtotal": { + "numeric": 5 + }, + "discount_total": { + "numeric": 42 + }, + "discount_tax_total": { + "numeric": 47 + }, + "gift_card_total": { + "numeric": 36 + }, + "gift_card_tax_total": { + "numeric": 29 + }, + "shipping_total": { + "numeric": 41 + }, + "shipping_subtotal": { + "numeric": 9 + }, + "shipping_tax_total": { + "numeric": 31 + }, + "original_shipping_total": { + "numeric": 21 + }, "original_shipping_subtotal": { - "numeric": 48 + "numeric": 0 }, "original_shipping_tax_total": { - "numeric": 34 + "numeric": 42 } }, "orderReturn": { - "id": "id_VWcNVWnZQbVAC1Li", - "status": "requested", + "id": "id_S4tfh8TaYtp6QL", + "status": "partially_received", "order_id": "{value}", "items": [{ - "id": "id_3LBPikJzceXTUfjfWJ", + "id": "id_aQr4zdeT17734axI", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 38 + "quantity": 13 }], - "display_id": 13, + "display_id": 6, "metadata": {} }, "orderClaim": { - "id": "id_0ZTaP1McTENUy", + "id": "id_9jHXUVlHXL9I4gbtL2wR", "type": "refund", "order_id": "{value}", - "order_version": 22, - "display_id": 8, + "order_version": 41, + "display_id": 6, "claim_items": [ "{value}" ], @@ -128,120 +128,120 @@ const myWorkflow = createWorkflow( "metadata": {} }, "orderChange": { - "id": "id_NGNIqnAciMs", - "version": 43, + "id": "id_uQCwH63XUPb9kUm", + "version": 49, "order_id": "{value}", "return_id": "{value}", "exchange_id": "{value}", "claim_id": "{value}", "order": { - "id": "id_AP826wEhlfEvsXG1DJ", - "version": 19, - "display_id": 40, - "status": "draft", + "id": "id_VG7GWkhlXg17EyyGd8", + "version": 20, + "display_id": 36, + "status": "canceled", "currency_code": "{value}", - "created_at": "2025-08-06T16:05:25.624Z", - "updated_at": "2025-12-25T23:04:19.784Z", + "created_at": "2025-11-29T06:54:54.241Z", + "updated_at": "2025-10-18T09:18:34.290Z", "original_item_total": { - "numeric": 8 + "numeric": 16 }, "original_item_subtotal": { - "numeric": 10 + "numeric": 17 }, "original_item_tax_total": { - "numeric": 41 + "numeric": 7 }, "item_total": { - "numeric": 24 - }, - "item_subtotal": { - "numeric": 4 - }, - "item_tax_total": { - "numeric": 9 - }, - "original_total": { "numeric": 49 }, + "item_subtotal": { + "numeric": 8 + }, + "item_tax_total": { + "numeric": 40 + }, + "original_total": { + "numeric": 35 + }, "original_subtotal": { - "numeric": 1 + "numeric": 15 }, "original_tax_total": { - "numeric": 19 + "numeric": 13 }, "total": { - "numeric": 30 + "numeric": 38 }, "subtotal": { - "numeric": 47 + "numeric": 44 }, "tax_total": { - "numeric": 14 + "numeric": 20 }, "discount_subtotal": { - "numeric": 11 - }, - "discount_total": { - "numeric": 13 - }, - "discount_tax_total": { - "numeric": 13 - }, - "gift_card_total": { - "numeric": 26 - }, - "gift_card_tax_total": { - "numeric": 44 - }, - "shipping_total": { - "numeric": 29 - }, - "shipping_subtotal": { - "numeric": 44 - }, - "shipping_tax_total": { - "numeric": 41 - }, - "original_shipping_total": { "numeric": 27 }, + "discount_total": { + "numeric": 34 + }, + "discount_tax_total": { + "numeric": 1 + }, + "gift_card_total": { + "numeric": 23 + }, + "gift_card_tax_total": { + "numeric": 37 + }, + "shipping_total": { + "numeric": 34 + }, + "shipping_subtotal": { + "numeric": 13 + }, + "shipping_tax_total": { + "numeric": 32 + }, + "original_shipping_total": { + "numeric": 11 + }, "original_shipping_subtotal": { - "numeric": 22 + "numeric": 0 }, "original_shipping_tax_total": { - "numeric": 29 + "numeric": 28 } }, "return_order": { - "id": "id_IjttUPTMoN", - "status": "received", + "id": "id_aJQMY7qi5yAtI", + "status": "canceled", "order_id": "{value}", "items": [{ - "id": "id_rF67qYhrhW6AuZOr09", + "id": "id_1g1ngW5SEt8", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 20 + "quantity": 23 }], - "display_id": 22, + "display_id": 2, "metadata": {} }, "exchange": { - "id": "id_XNSbUuzmPo", + "id": "id_AvrjNdxwuVtPUG8", "order_id": "{value}", - "order_version": 17, - "display_id": 3, + "order_version": 9, + "display_id": 40, "additional_items": [ "{value}" ], "metadata": {} }, "claim": { - "id": "id_GERE17VyH1XO", - "type": "refund", + "id": "id_tRpVBCf6L0lI86Dkrr1", + "type": "replace", "order_id": "{value}", - "order_version": 4, - "display_id": 6, + "order_version": 21, + "display_id": 23, "claim_items": [ "{value}" ], @@ -251,7 +251,7 @@ const myWorkflow = createWorkflow( "metadata": {} }, "actions": [{ - "id": "id_xSxzZkWO6Y1fWeXyr", + "id": "id_kNU7nTCUDGhB", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -261,13 +261,13 @@ const myWorkflow = createWorkflow( "order": {}, "reference": "{value}", "reference_id": "{value}", - "action": "CREDIT_LINE_ADD", + "action": "RETURN_ITEM", "details": {}, "internal_note": {}, - "created_at": "2025-02-20T16:29:30.795Z", - "updated_at": "2025-12-06T20:18:04.437Z" + "created_at": "2025-06-14T00:25:21.160Z", + "updated_at": "2025-05-19T09:15:03.631Z" }], - "status": "requested", + "status": "pending", "requested_by": {}, "requested_at": {}, "confirmed_by": {}, @@ -278,12 +278,12 @@ const myWorkflow = createWorkflow( "declined_at": {}, "canceled_by": {}, "canceled_at": {}, - "created_at": "2025-05-10T01:41:16.825Z", - "updated_at": "2025-12-27T10:04:39.917Z" + "created_at": "2025-09-06T23:28:53.807Z", + "updated_at": "2025-05-10T13:28:09.094Z" }, "items": [{ - "id": "id_S3hAwGnRCd8G0uUq", - "quantity": 41 + "id": "id_ZwdYA1uem8u1", + "quantity": 20 }] }) } diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderClaimRequestItemReturnWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderClaimRequestItemReturnWorkflow/page.mdx index 36ea2f3ace..8a548259e3 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderClaimRequestItemReturnWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderClaimRequestItemReturnWorkflow/page.mdx @@ -17,32 +17,9 @@ This workflow requests one or more items to be returned as part of a claim. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { orderClaimRequestItemReturnWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = orderClaimRequestItemReturnWorkflow - .runAsStep({ - input: { - "return_id": "{value}", - "claim_id": "{value}", - "items": [{ - "id": "id_9g496y1Rp2VAN", - "quantity": 10 - }] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -62,8 +39,8 @@ export async function POST( "return_id": "{value}", "claim_id": "{value}", "items": [{ - "id": "id_9g496y1Rp2VAN", - "quantity": 10 + "id": "id_j9fPnhGZq61eClN", + "quantity": 40 }] } }) @@ -92,8 +69,8 @@ export default async function handleOrderPlaced({ "return_id": "{value}", "claim_id": "{value}", "items": [{ - "id": "id_9g496y1Rp2VAN", - "quantity": 10 + "id": "id_j9fPnhGZq61eClN", + "quantity": 40 }] } }) @@ -122,8 +99,8 @@ export default async function myCustomJob( "return_id": "{value}", "claim_id": "{value}", "items": [{ - "id": "id_9g496y1Rp2VAN", - "quantity": 10 + "id": "id_j9fPnhGZq61eClN", + "quantity": 40 }] } }) @@ -135,6 +112,31 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { orderClaimRequestItemReturnWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = orderClaimRequestItemReturnWorkflow + .runAsStep({ + input: { + "return_id": "{value}", + "claim_id": "{value}", + "items": [{ + "id": "id_j9fPnhGZq61eClN", + "quantity": 40 + }] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderEditAddNewItemValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderEditAddNewItemValidationStep/page.mdx index b017ebf0b6..f336a6cf4a 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderEditAddNewItemValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderEditAddNewItemValidationStep/page.mdx @@ -22,198 +22,198 @@ const myWorkflow = createWorkflow( () => { const data = orderEditAddNewItemValidationStep({ "order": { - "id": "id_4VFFBLQ92xtw", - "version": 50, - "display_id": 20, - "status": "archived", + "id": "id_chwOYdJV7qTgVCWLV", + "version": 2, + "display_id": 30, + "status": "pending", "currency_code": "{value}", - "created_at": "2025-11-09T23:00:02.392Z", - "updated_at": "2025-01-30T10:53:17.146Z", + "created_at": "2025-11-01T15:19:17.602Z", + "updated_at": "2025-09-12T17:12:39.800Z", "original_item_total": { - "numeric": 30 + "numeric": 17 }, "original_item_subtotal": { - "numeric": 39 + "numeric": 47 }, "original_item_tax_total": { - "numeric": 38 + "numeric": 36 }, "item_total": { - "numeric": 40 + "numeric": 34 }, "item_subtotal": { - "numeric": 28 + "numeric": 37 }, "item_tax_total": { - "numeric": 3 + "numeric": 41 }, "original_total": { - "numeric": 21 - }, - "original_subtotal": { - "numeric": 7 - }, - "original_tax_total": { "numeric": 11 }, + "original_subtotal": { + "numeric": 11 + }, + "original_tax_total": { + "numeric": 8 + }, "total": { - "numeric": 4 + "numeric": 7 }, "subtotal": { - "numeric": 41 - }, - "tax_total": { - "numeric": 31 - }, - "discount_subtotal": { - "numeric": 24 - }, - "discount_total": { - "numeric": 46 - }, - "discount_tax_total": { - "numeric": 39 - }, - "gift_card_total": { - "numeric": 14 - }, - "gift_card_tax_total": { - "numeric": 41 - }, - "shipping_total": { - "numeric": 10 - }, - "shipping_subtotal": { - "numeric": 3 - }, - "shipping_tax_total": { - "numeric": 50 - }, - "original_shipping_total": { "numeric": 35 }, + "tax_total": { + "numeric": 50 + }, + "discount_subtotal": { + "numeric": 47 + }, + "discount_total": { + "numeric": 9 + }, + "discount_tax_total": { + "numeric": 47 + }, + "gift_card_total": { + "numeric": 38 + }, + "gift_card_tax_total": { + "numeric": 14 + }, + "shipping_total": { + "numeric": 27 + }, + "shipping_subtotal": { + "numeric": 31 + }, + "shipping_tax_total": { + "numeric": 14 + }, + "original_shipping_total": { + "numeric": 10 + }, "original_shipping_subtotal": { - "numeric": 0 + "numeric": 7 }, "original_shipping_tax_total": { - "numeric": 26 + "numeric": 15 } }, "orderChange": { - "id": "id_9ooIMGBuD8tLHQ", - "version": 14, + "id": "id_QqY0uU7hF5DaJu8XT", + "version": 8, "order_id": "{value}", "return_id": "{value}", "exchange_id": "{value}", "claim_id": "{value}", "order": { - "id": "id_lbvugaMXDzh", - "version": 2, - "display_id": 7, - "status": "archived", + "id": "id_eECQUFXg2DjtrPjI4Ix", + "version": 25, + "display_id": 22, + "status": "completed", "currency_code": "{value}", - "created_at": "2025-06-30T11:53:21.571Z", - "updated_at": "2025-01-17T09:12:16.202Z", + "created_at": "2025-12-14T19:22:36.803Z", + "updated_at": "2025-10-28T20:13:07.390Z", "original_item_total": { - "numeric": 36 + "numeric": 45 }, "original_item_subtotal": { - "numeric": 19 + "numeric": 3 }, "original_item_tax_total": { - "numeric": 49 + "numeric": 32 }, "item_total": { - "numeric": 1 + "numeric": 26 }, "item_subtotal": { - "numeric": 40 + "numeric": 23 }, "item_tax_total": { - "numeric": 4 + "numeric": 41 }, "original_total": { - "numeric": 19 + "numeric": 22 }, "original_subtotal": { - "numeric": 9 + "numeric": 49 }, "original_tax_total": { - "numeric": 12 + "numeric": 50 }, "total": { - "numeric": 36 + "numeric": 20 }, "subtotal": { - "numeric": 35 + "numeric": 9 }, "tax_total": { - "numeric": 13 + "numeric": 37 }, "discount_subtotal": { - "numeric": 28 + "numeric": 35 }, "discount_total": { - "numeric": 17 + "numeric": 9 }, "discount_tax_total": { - "numeric": 6 + "numeric": 20 }, "gift_card_total": { - "numeric": 33 + "numeric": 8 }, "gift_card_tax_total": { - "numeric": 22 + "numeric": 4 }, "shipping_total": { - "numeric": 7 + "numeric": 43 }, "shipping_subtotal": { - "numeric": 1 + "numeric": 32 }, "shipping_tax_total": { - "numeric": 22 + "numeric": 9 }, "original_shipping_total": { - "numeric": 40 + "numeric": 1 }, "original_shipping_subtotal": { - "numeric": 38 + "numeric": 34 }, "original_shipping_tax_total": { - "numeric": 25 + "numeric": 50 } }, "return_order": { - "id": "id_VSv028en4uiYCHMu", + "id": "id_qQfoZ9jJ6PRbis", "status": "requested", "order_id": "{value}", "items": [{ - "id": "id_IZDMnL0QbPp", + "id": "id_ZHgFA4Cm2hKtLxcGLEx6", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 49 + "quantity": 42 }], - "display_id": 37, + "display_id": 22, "metadata": {} }, "exchange": { - "id": "id_zZe39abYmOE1jw", + "id": "id_irdM4oeQVrm", "order_id": "{value}", - "order_version": 0, - "display_id": 49, + "order_version": 34, + "display_id": 23, "additional_items": [ "{value}" ], "metadata": {} }, "claim": { - "id": "id_cJb4MpYVY8tbfr", + "id": "id_E249CtrU2El", "type": "refund", "order_id": "{value}", - "order_version": 40, - "display_id": 30, + "order_version": 50, + "display_id": 13, "claim_items": [ "{value}" ], @@ -223,7 +223,7 @@ const myWorkflow = createWorkflow( "metadata": {} }, "actions": [{ - "id": "id_b4vfmaJEvAEG96P6", + "id": "id_enxwerUPOmAOh", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -233,13 +233,13 @@ const myWorkflow = createWorkflow( "order": {}, "reference": "{value}", "reference_id": "{value}", - "action": "CANCEL_RETURN_ITEM", + "action": "ITEM_ADD", "details": {}, "internal_note": {}, - "created_at": "2025-12-13T19:40:01.528Z", - "updated_at": "2025-08-09T11:32:46.584Z" + "created_at": "2025-10-09T20:31:30.544Z", + "updated_at": "2025-05-05T13:54:40.644Z" }], - "status": "canceled", + "status": "pending", "requested_by": {}, "requested_at": {}, "confirmed_by": {}, @@ -250,8 +250,8 @@ const myWorkflow = createWorkflow( "declined_at": {}, "canceled_by": {}, "canceled_at": {}, - "created_at": "2025-03-12T11:54:37.787Z", - "updated_at": "2025-05-31T21:17:38.551Z" + "created_at": "2025-08-07T10:33:16.826Z", + "updated_at": "2025-04-24T08:06:57.239Z" } }) } diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderEditAddNewItemWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderEditAddNewItemWorkflow/page.mdx index 97a3166c63..9cdf7860d4 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderEditAddNewItemWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderEditAddNewItemWorkflow/page.mdx @@ -23,31 +23,9 @@ This workflow adds new items to an order edit. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { orderEditAddNewItemWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = orderEditAddNewItemWorkflow - .runAsStep({ - input: { - "order_id": "{value}", - "items": [{ - "variant_id": "{value}", - "quantity": 31 - }] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -67,7 +45,7 @@ export async function POST( "order_id": "{value}", "items": [{ "variant_id": "{value}", - "quantity": 31 + "quantity": 11 }] } }) @@ -96,7 +74,7 @@ export default async function handleOrderPlaced({ "order_id": "{value}", "items": [{ "variant_id": "{value}", - "quantity": 31 + "quantity": 11 }] } }) @@ -125,7 +103,7 @@ export default async function myCustomJob( "order_id": "{value}", "items": [{ "variant_id": "{value}", - "quantity": 31 + "quantity": 11 }] } }) @@ -137,6 +115,30 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { orderEditAddNewItemWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = orderEditAddNewItemWorkflow + .runAsStep({ + input: { + "order_id": "{value}", + "items": [{ + "variant_id": "{value}", + "quantity": 11 + }] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderEditUpdateItemQuantityValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderEditUpdateItemQuantityValidationStep/page.mdx index 83518227c4..2fe93c0cfc 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderEditUpdateItemQuantityValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderEditUpdateItemQuantityValidationStep/page.mdx @@ -22,198 +22,198 @@ const myWorkflow = createWorkflow( () => { const data = orderEditUpdateItemQuantityValidationStep({ "order": { - "id": "id_iKcMsXSKqCZg2rqO3dO", - "version": 38, - "display_id": 40, - "status": "archived", + "id": "id_S5fdJsTVeudp3hC0", + "version": 9, + "display_id": 0, + "status": "canceled", "currency_code": "{value}", - "created_at": "2025-04-03T01:28:26.075Z", - "updated_at": "2025-01-20T16:44:10.533Z", + "created_at": "2025-12-25T23:20:10.328Z", + "updated_at": "2025-10-28T10:52:25.422Z", "original_item_total": { - "numeric": 0 + "numeric": 12 }, "original_item_subtotal": { "numeric": 47 }, "original_item_tax_total": { - "numeric": 42 + "numeric": 26 }, "item_total": { - "numeric": 15 + "numeric": 44 }, "item_subtotal": { - "numeric": 26 + "numeric": 21 }, "item_tax_total": { - "numeric": 33 + "numeric": 1 }, "original_total": { - "numeric": 24 + "numeric": 9 }, "original_subtotal": { - "numeric": 23 + "numeric": 18 }, "original_tax_total": { - "numeric": 49 + "numeric": 15 }, "total": { - "numeric": 25 + "numeric": 37 }, "subtotal": { - "numeric": 42 + "numeric": 49 }, "tax_total": { - "numeric": 40 + "numeric": 0 }, "discount_subtotal": { - "numeric": 22 + "numeric": 15 }, "discount_total": { - "numeric": 32 + "numeric": 18 }, "discount_tax_total": { - "numeric": 45 - }, - "gift_card_total": { - "numeric": 36 - }, - "gift_card_tax_total": { - "numeric": 38 - }, - "shipping_total": { - "numeric": 35 - }, - "shipping_subtotal": { "numeric": 2 }, + "gift_card_total": { + "numeric": 27 + }, + "gift_card_tax_total": { + "numeric": 8 + }, + "shipping_total": { + "numeric": 17 + }, + "shipping_subtotal": { + "numeric": 15 + }, "shipping_tax_total": { - "numeric": 38 + "numeric": 34 }, "original_shipping_total": { - "numeric": 33 + "numeric": 8 }, "original_shipping_subtotal": { - "numeric": 40 + "numeric": 45 }, "original_shipping_tax_total": { - "numeric": 26 + "numeric": 19 } }, "orderChange": { - "id": "id_XBZmQiYCgTu92t", - "version": 20, + "id": "id_D4VBpBvjv1WH4SDL", + "version": 21, "order_id": "{value}", "return_id": "{value}", "exchange_id": "{value}", "claim_id": "{value}", "order": { - "id": "id_rrKgJGJOG41nwW", - "version": 30, - "display_id": 1, - "status": "pending", + "id": "id_Ugho0K65qqRvBgusG", + "version": 36, + "display_id": 4, + "status": "draft", "currency_code": "{value}", - "created_at": "2025-04-13T18:49:44.507Z", - "updated_at": "2025-05-02T10:38:18.755Z", + "created_at": "2025-07-17T22:32:09.889Z", + "updated_at": "2025-11-10T19:23:23.068Z", "original_item_total": { - "numeric": 40 + "numeric": 49 }, "original_item_subtotal": { - "numeric": 48 + "numeric": 18 }, "original_item_tax_total": { - "numeric": 17 - }, - "item_total": { "numeric": 29 }, + "item_total": { + "numeric": 50 + }, "item_subtotal": { - "numeric": 12 - }, - "item_tax_total": { - "numeric": 0 - }, - "original_total": { - "numeric": 35 - }, - "original_subtotal": { - "numeric": 36 - }, - "original_tax_total": { - "numeric": 10 - }, - "total": { - "numeric": 3 - }, - "subtotal": { - "numeric": 11 - }, - "tax_total": { - "numeric": 19 - }, - "discount_subtotal": { - "numeric": 33 - }, - "discount_total": { - "numeric": 26 - }, - "discount_tax_total": { - "numeric": 11 - }, - "gift_card_total": { - "numeric": 2 - }, - "gift_card_tax_total": { "numeric": 14 }, - "shipping_total": { + "item_tax_total": { + "numeric": 21 + }, + "original_total": { + "numeric": 47 + }, + "original_subtotal": { + "numeric": 21 + }, + "original_tax_total": { + "numeric": 7 + }, + "total": { + "numeric": 12 + }, + "subtotal": { + "numeric": 44 + }, + "tax_total": { + "numeric": 23 + }, + "discount_subtotal": { + "numeric": 12 + }, + "discount_total": { "numeric": 2 }, + "discount_tax_total": { + "numeric": 42 + }, + "gift_card_total": { + "numeric": 20 + }, + "gift_card_tax_total": { + "numeric": 29 + }, + "shipping_total": { + "numeric": 6 + }, "shipping_subtotal": { - "numeric": 2 + "numeric": 23 }, "shipping_tax_total": { - "numeric": 34 + "numeric": 29 }, "original_shipping_total": { - "numeric": 8 + "numeric": 11 }, "original_shipping_subtotal": { - "numeric": 10 + "numeric": 46 }, "original_shipping_tax_total": { - "numeric": 28 + "numeric": 35 } }, "return_order": { - "id": "id_6zDXOiz9ztyOkh7Rf2L3", - "status": "partially_received", + "id": "id_8Oek8fX4wf5jre0YN0R", + "status": "received", "order_id": "{value}", "items": [{ - "id": "id_5gTxouM94SOltWJ", + "id": "id_0Xp8yIb2dx", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 49 + "quantity": 50 }], - "display_id": 49, + "display_id": 7, "metadata": {} }, "exchange": { - "id": "id_nZxN5TUSIroqQb3", + "id": "id_Son0zhkLVE1U", "order_id": "{value}", - "order_version": 25, - "display_id": 44, + "order_version": 35, + "display_id": 42, "additional_items": [ "{value}" ], "metadata": {} }, "claim": { - "id": "id_3VUUyiQNuhyzNM1", - "type": "refund", + "id": "id_qAumgZt5VbeEP9bUH", + "type": "replace", "order_id": "{value}", - "order_version": 43, - "display_id": 41, + "order_version": 44, + "display_id": 27, "claim_items": [ "{value}" ], @@ -223,7 +223,7 @@ const myWorkflow = createWorkflow( "metadata": {} }, "actions": [{ - "id": "id_8jCj7CG5SIe6fbiQ", + "id": "id_NluLmFgNRFp", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -233,11 +233,11 @@ const myWorkflow = createWorkflow( "order": {}, "reference": "{value}", "reference_id": "{value}", - "action": "ITEM_ADD", + "action": "REINSTATE_ITEM", "details": {}, "internal_note": {}, - "created_at": "2025-04-30T04:31:59.348Z", - "updated_at": "2025-02-01T12:47:16.746Z" + "created_at": "2025-07-20T12:21:18.830Z", + "updated_at": "2025-06-18T09:21:56.090Z" }], "status": "canceled", "requested_by": {}, @@ -250,8 +250,8 @@ const myWorkflow = createWorkflow( "declined_at": {}, "canceled_by": {}, "canceled_at": {}, - "created_at": "2025-08-15T06:05:29.201Z", - "updated_at": "2025-11-11T17:10:43.587Z" + "created_at": "2025-10-12T19:21:07.798Z", + "updated_at": "2025-10-02T03:03:23.339Z" } }) } diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderEditUpdateItemQuantityWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderEditUpdateItemQuantityWorkflow/page.mdx index 7e027d2cb4..3e408a13c9 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderEditUpdateItemQuantityWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderEditUpdateItemQuantityWorkflow/page.mdx @@ -17,31 +17,9 @@ This workflow update item's quantity of an order. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { orderEditUpdateItemQuantityWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = orderEditUpdateItemQuantityWorkflow - .runAsStep({ - input: { - "order_id": "{value}", - "items": [{ - "id": "id_rbcdbOnUqObpz", - "quantity": 20 - }] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -60,8 +38,8 @@ export async function POST( input: { "order_id": "{value}", "items": [{ - "id": "id_rbcdbOnUqObpz", - "quantity": 20 + "id": "id_wT8SpG3WXB3ofu", + "quantity": 41 }] } }) @@ -89,8 +67,8 @@ export default async function handleOrderPlaced({ input: { "order_id": "{value}", "items": [{ - "id": "id_rbcdbOnUqObpz", - "quantity": 20 + "id": "id_wT8SpG3WXB3ofu", + "quantity": 41 }] } }) @@ -118,8 +96,8 @@ export default async function myCustomJob( input: { "order_id": "{value}", "items": [{ - "id": "id_rbcdbOnUqObpz", - "quantity": 20 + "id": "id_wT8SpG3WXB3ofu", + "quantity": 41 }] } }) @@ -131,6 +109,30 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { orderEditUpdateItemQuantityWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = orderEditUpdateItemQuantityWorkflow + .runAsStep({ + input: { + "order_id": "{value}", + "items": [{ + "id": "id_wT8SpG3WXB3ofu", + "quantity": 41 + }] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderExchangeAddNewItemWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderExchangeAddNewItemWorkflow/page.mdx index 85d37f703c..bb21d2b239 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderExchangeAddNewItemWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderExchangeAddNewItemWorkflow/page.mdx @@ -23,31 +23,9 @@ This workflow adds new items to an exchange. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { orderExchangeAddNewItemWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = orderExchangeAddNewItemWorkflow - .runAsStep({ - input: { - "exchange_id": "{value}", - "items": [{ - "variant_id": "{value}", - "quantity": 11 - }] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -67,7 +45,7 @@ export async function POST( "exchange_id": "{value}", "items": [{ "variant_id": "{value}", - "quantity": 11 + "quantity": 27 }] } }) @@ -96,7 +74,7 @@ export default async function handleOrderPlaced({ "exchange_id": "{value}", "items": [{ "variant_id": "{value}", - "quantity": 11 + "quantity": 27 }] } }) @@ -125,7 +103,7 @@ export default async function myCustomJob( "exchange_id": "{value}", "items": [{ "variant_id": "{value}", - "quantity": 11 + "quantity": 27 }] } }) @@ -137,6 +115,30 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { orderExchangeAddNewItemWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = orderExchangeAddNewItemWorkflow + .runAsStep({ + input: { + "exchange_id": "{value}", + "items": [{ + "variant_id": "{value}", + "quantity": 27 + }] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderExchangeRequestItemReturnWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderExchangeRequestItemReturnWorkflow/page.mdx index 3655871eec..5ec57866d8 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderExchangeRequestItemReturnWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderExchangeRequestItemReturnWorkflow/page.mdx @@ -17,32 +17,9 @@ This workflow adds items to be retuned as part of the exchange. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { orderExchangeRequestItemReturnWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = orderExchangeRequestItemReturnWorkflow - .runAsStep({ - input: { - "return_id": "{value}", - "exchange_id": "{value}", - "items": [{ - "id": "id_R8jJBtfwy3pPlYt", - "quantity": 20 - }] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -62,8 +39,8 @@ export async function POST( "return_id": "{value}", "exchange_id": "{value}", "items": [{ - "id": "id_R8jJBtfwy3pPlYt", - "quantity": 20 + "id": "id_wiLfughGN4Ji8onYD", + "quantity": 38 }] } }) @@ -92,8 +69,8 @@ export default async function handleOrderPlaced({ "return_id": "{value}", "exchange_id": "{value}", "items": [{ - "id": "id_R8jJBtfwy3pPlYt", - "quantity": 20 + "id": "id_wiLfughGN4Ji8onYD", + "quantity": 38 }] } }) @@ -122,8 +99,8 @@ export default async function myCustomJob( "return_id": "{value}", "exchange_id": "{value}", "items": [{ - "id": "id_R8jJBtfwy3pPlYt", - "quantity": 20 + "id": "id_wiLfughGN4Ji8onYD", + "quantity": 38 }] } }) @@ -135,6 +112,31 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { orderExchangeRequestItemReturnWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = orderExchangeRequestItemReturnWorkflow + .runAsStep({ + input: { + "return_id": "{value}", + "exchange_id": "{value}", + "items": [{ + "id": "id_wiLfughGN4Ji8onYD", + "quantity": 38 + }] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderFulfillmentDeliverablilityValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderFulfillmentDeliverablilityValidationStep/page.mdx index cf992ab82b..f55f2f6a26 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderFulfillmentDeliverablilityValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.orderFulfillmentDeliverablilityValidationStep/page.mdx @@ -22,84 +22,84 @@ const myWorkflow = createWorkflow( () => { const data = orderFulfillmentDeliverablilityValidationStep({ "order": { - "id": "id_n5q2kubyGR1o", - "version": 49, - "display_id": 45, - "status": "pending", + "id": "id_5a88otS0svBT9KjZN1H", + "version": 9, + "display_id": 30, + "status": "requires_action", "currency_code": "{value}", - "created_at": "2025-07-25T09:48:14.196Z", - "updated_at": "2025-01-21T08:15:30.754Z", + "created_at": "2026-01-04T13:03:07.427Z", + "updated_at": "2025-09-05T19:49:50.632Z", "original_item_total": { - "numeric": 8 - }, - "original_item_subtotal": { - "numeric": 49 - }, - "original_item_tax_total": { - "numeric": 38 - }, - "item_total": { - "numeric": 7 - }, - "item_subtotal": { - "numeric": 40 - }, - "item_tax_total": { "numeric": 36 }, - "original_total": { - "numeric": 23 - }, - "original_subtotal": { - "numeric": 0 - }, - "original_tax_total": { - "numeric": 42 - }, - "total": { - "numeric": 8 - }, - "subtotal": { + "original_item_subtotal": { "numeric": 18 }, - "tax_total": { + "original_item_tax_total": { "numeric": 9 }, + "item_total": { + "numeric": 31 + }, + "item_subtotal": { + "numeric": 29 + }, + "item_tax_total": { + "numeric": 9 + }, + "original_total": { + "numeric": 12 + }, + "original_subtotal": { + "numeric": 13 + }, + "original_tax_total": { + "numeric": 48 + }, + "total": { + "numeric": 42 + }, + "subtotal": { + "numeric": 14 + }, + "tax_total": { + "numeric": 14 + }, "discount_subtotal": { "numeric": 34 }, "discount_total": { - "numeric": 10 + "numeric": 44 }, "discount_tax_total": { - "numeric": 27 + "numeric": 26 }, "gift_card_total": { - "numeric": 3 + "numeric": 2 }, "gift_card_tax_total": { - "numeric": 40 + "numeric": 26 }, "shipping_total": { - "numeric": 10 + "numeric": 4 }, "shipping_subtotal": { - "numeric": 46 + "numeric": 22 }, "shipping_tax_total": { - "numeric": 9 + "numeric": 16 }, "original_shipping_total": { - "numeric": 0 + "numeric": 44 }, "original_shipping_subtotal": { - "numeric": 43 + "numeric": 24 }, "original_shipping_tax_total": { - "numeric": 8 + "numeric": 0 }, "fulfillments": [{ - "id": "id_ld2N1AEoTqoO0IE", + "id": "id_5PQYbSrvY0kDSB", "location_id": "{value}", "packed_at": {}, "shipped_at": {}, @@ -110,10 +110,10 @@ const myWorkflow = createWorkflow( "shipping_option_id": {}, "metadata": {}, "shipping_option": {}, - "requires_shipping": true, + "requires_shipping": false, "provider": { - "id": "id_Tw2WQsq3pIAIFF", - "name": "Marina", + "id": "id_RVgHvksxY3KJvj8eQjj", + "name": "Madyson", "metadata": {}, "shipping_options": [ {} @@ -123,7 +123,7 @@ const myWorkflow = createWorkflow( "deleted_at": {} }, "delivery_address": { - "id": "id_Q7VEhspBYmX3", + "id": "id_71NJFJRhWeudeRE", "fulfillment_id": {}, "company": {}, "first_name": {}, @@ -141,9 +141,9 @@ const myWorkflow = createWorkflow( "deleted_at": {} }, "items": [{ - "id": "id_RfJt6iWEYbejC8NlDZN", - "title": "decerno", - "quantity": 49, + "id": "id_XvupAkddnAm3wY72", + "title": "caries", + "quantity": 35, "sku": "{value}", "barcode": "{value}", "line_item_id": {}, @@ -155,7 +155,7 @@ const myWorkflow = createWorkflow( "deleted_at": {} }], "labels": [{ - "id": "id_oZEtWhEAJaIjJZCjN5T", + "id": "id_bRElxMsdCoWZr756Gi", "tracking_number": "{value}", "tracking_url": "{value}", "label_url": "{value}", @@ -171,7 +171,7 @@ const myWorkflow = createWorkflow( }] }, "fulfillment": { - "id": "id_AVPMYEbhHO", + "id": "id_epmWmV6rDGM18l4", "location_id": "{value}", "packed_at": {}, "shipped_at": {}, @@ -184,13 +184,13 @@ const myWorkflow = createWorkflow( "shipping_option": {}, "requires_shipping": true, "provider": { - "id": "id_M6kyCHUOV0qQ8kcigw", - "name": "Alexander", + "id": "id_HHRjTomA8VAe", + "name": "Sanford", "metadata": {}, "shipping_options": [{ - "id": "id_esAR8am17QDLw32QpXF", - "name": "Mona", - "price_type": "calculated", + "id": "id_s2L89iUCdBjU", + "name": "Timothy", + "price_type": "flat", "service_zone_id": "{value}", "shipping_profile_id": "{value}", "provider_id": "{value}", @@ -198,12 +198,12 @@ const myWorkflow = createWorkflow( "data": {}, "metadata": {}, "service_zone": { - "id": "id_Kn57lt1g5B5z", - "name": "Ola", + "id": "id_NyhC8RGNN0Q2", + "name": "Hope", "metadata": {}, "fulfillment_set": { - "id": "id_hGCMQLsA58IhEjhOmo1Y", - "name": "Kamron", + "id": "id_BBzjAmqilk", + "name": "Dallin", "type": "{value}", "metadata": {}, "service_zones": [], @@ -223,8 +223,8 @@ const myWorkflow = createWorkflow( "deleted_at": {} }, "shipping_profile": { - "id": "id_j3oMltW8O9TdtyHz8H", - "name": "Margret", + "id": "id_qyoEYKVFF5f5iq7", + "name": "Bernadette", "type": "{value}", "metadata": {}, "shipping_options": [ @@ -235,8 +235,8 @@ const myWorkflow = createWorkflow( "deleted_at": {} }, "fulfillment_provider": { - "id": "id_9Ehmhk4gtQAjcK84", - "name": "Leonor", + "id": "id_z4ekkWTZ6Qwo", + "name": "Randy", "metadata": {}, "shipping_options": [ {} @@ -246,14 +246,14 @@ const myWorkflow = createWorkflow( "deleted_at": {} }, "type": { - "id": "id_FFwd6JkfRDWdl", + "id": "id_p4iBeFN3Hc", "label": "{value}", - "description": "Comitatus casso tabesco absconditus vorax.", + "description": "Conculco patria convoco.", "code": "{value}", "shipping_option_id": "{value}", "shipping_option": { - "id": "id_AI35FwyajReor", - "name": "Tiana", + "id": "id_Qrrr3FwcheIW5MjZ2kxr", + "name": "Nolan", "price_type": {}, "service_zone_id": "{value}", "shipping_profile_id": "{value}", @@ -276,7 +276,7 @@ const myWorkflow = createWorkflow( "deleted_at": {} }, "rules": [{ - "id": "id_4HUb39RSO1qEwIPGA", + "id": "id_6YMlgrBriv", "attribute": "{value}", "operator": "{value}", "value": {}, @@ -287,7 +287,7 @@ const myWorkflow = createWorkflow( "deleted_at": {} }], "fulfillments": [{ - "id": "id_cnygxdLMUkH7Ax", + "id": "id_8djD0Wk5b3B", "location_id": "{value}", "packed_at": {}, "shipped_at": {}, @@ -316,7 +316,7 @@ const myWorkflow = createWorkflow( "deleted_at": {} }, "delivery_address": { - "id": "id_MUNs1APcn8989TVU1e0S", + "id": "id_0YW9AM4zKQyJ", "fulfillment_id": {}, "company": {}, "first_name": {}, @@ -334,16 +334,16 @@ const myWorkflow = createWorkflow( "deleted_at": {} }, "items": [{ - "id": "id_pBvRgvv8AFPO6", - "title": "amplitudo", - "quantity": 17, + "id": "id_GB9LvHlN4HQRT", + "title": "arbustum", + "quantity": 24, "sku": "{value}", "barcode": "{value}", "line_item_id": {}, "inventory_item_id": {}, "fulfillment_id": "{value}", "fulfillment": { - "id": "id_vkH33EdrADd", + "id": "id_ZS2YgAiqumBZE0", "location_id": "{value}", "packed_at": {}, "shipped_at": {}, @@ -356,8 +356,8 @@ const myWorkflow = createWorkflow( "shipping_option": {}, "requires_shipping": false, "provider": { - "id": "id_KfSGAk5haRD", - "name": "Dustin", + "id": "id_ejFoXgI6PpSGgkUGOYu", + "name": "Emmy", "metadata": {}, "shipping_options": [ {} @@ -367,7 +367,7 @@ const myWorkflow = createWorkflow( "deleted_at": {} }, "delivery_address": { - "id": "id_Ti6Us4C4R5gn9M0", + "id": "id_SEfCONNF13Lgg3aveW", "fulfillment_id": {}, "company": {}, "first_name": {}, @@ -385,9 +385,9 @@ const myWorkflow = createWorkflow( "deleted_at": {} }, "items": [{ - "id": "id_2gLXvyU4O9WJQtIj", - "title": "excepturi", - "quantity": 0, + "id": "id_eCJKHZKO9UOqaqi", + "title": "officia", + "quantity": 1, "sku": "{value}", "barcode": "{value}", "line_item_id": {}, @@ -399,7 +399,7 @@ const myWorkflow = createWorkflow( "deleted_at": {} }], "labels": [{ - "id": "id_Yc7ova9dyTp5", + "id": "id_H3bGBV8UCsy7dyMZfL", "tracking_number": "{value}", "tracking_url": "{value}", "label_url": "{value}", @@ -418,13 +418,13 @@ const myWorkflow = createWorkflow( "deleted_at": {} }], "labels": [{ - "id": "id_kg0Q1mgiAdJLgK2su", + "id": "id_uZgFBA5FiSvu", "tracking_number": "{value}", "tracking_url": "{value}", "label_url": "{value}", "fulfillment_id": "{value}", "fulfillment": { - "id": "id_UOgXrELoXmc8A2", + "id": "id_0HqYJoHvU9M9Eufpct", "location_id": "{value}", "packed_at": {}, "shipped_at": {}, @@ -437,8 +437,8 @@ const myWorkflow = createWorkflow( "shipping_option": {}, "requires_shipping": false, "provider": { - "id": "id_E6bk5WTzxJRUn4kxx5Tc", - "name": "Ezra", + "id": "id_VuInaHVK5wqf5Mh", + "name": "Rosamond", "metadata": {}, "shipping_options": [ {} @@ -448,7 +448,7 @@ const myWorkflow = createWorkflow( "deleted_at": {} }, "delivery_address": { - "id": "id_C5Pyr4YJhDrih9EQmhq", + "id": "id_Eb3c4lyQN4Ly7pJ", "fulfillment_id": {}, "company": {}, "first_name": {}, @@ -466,9 +466,9 @@ const myWorkflow = createWorkflow( "deleted_at": {} }, "items": [{ - "id": "id_T8V3rOVULuZwes9UuiF", - "title": "civitas", - "quantity": 22, + "id": "id_67F3KvtBr3eQQ", + "title": "cognatus", + "quantity": 6, "sku": "{value}", "barcode": "{value}", "line_item_id": {}, @@ -480,7 +480,7 @@ const myWorkflow = createWorkflow( "deleted_at": {} }], "labels": [{ - "id": "id_1LvKw9aXIYY7m", + "id": "id_hHzpJvagers", "tracking_number": "{value}", "tracking_url": "{value}", "label_url": "{value}", diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.receiveAndCompleteReturnOrderWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.receiveAndCompleteReturnOrderWorkflow/page.mdx index 6c05bb1f21..cfadda65b9 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.receiveAndCompleteReturnOrderWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.receiveAndCompleteReturnOrderWorkflow/page.mdx @@ -16,31 +16,9 @@ This workflow marks a return as received and completes it. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { receiveAndCompleteReturnOrderWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = receiveAndCompleteReturnOrderWorkflow - .runAsStep({ - input: { - "return_id": "{value}", - "items": [{ - "id": "id_0ocygKLFUoKBiTtu", - "quantity": 6 - }] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -59,8 +37,8 @@ export async function POST( input: { "return_id": "{value}", "items": [{ - "id": "id_0ocygKLFUoKBiTtu", - "quantity": 6 + "id": "id_e8cO7BTPhnTaliE8w", + "quantity": 38 }] } }) @@ -88,8 +66,8 @@ export default async function handleOrderPlaced({ input: { "return_id": "{value}", "items": [{ - "id": "id_0ocygKLFUoKBiTtu", - "quantity": 6 + "id": "id_e8cO7BTPhnTaliE8w", + "quantity": 38 }] } }) @@ -117,8 +95,8 @@ export default async function myCustomJob( input: { "return_id": "{value}", "items": [{ - "id": "id_0ocygKLFUoKBiTtu", - "quantity": 6 + "id": "id_e8cO7BTPhnTaliE8w", + "quantity": 38 }] } }) @@ -130,6 +108,30 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { receiveAndCompleteReturnOrderWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = receiveAndCompleteReturnOrderWorkflow + .runAsStep({ + input: { + "return_id": "{value}", + "items": [{ + "id": "id_e8cO7BTPhnTaliE8w", + "quantity": 38 + }] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.receiveCompleteReturnValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.receiveCompleteReturnValidationStep/page.mdx index 498a790ab1..1e88845bea 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.receiveCompleteReturnValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.receiveCompleteReturnValidationStep/page.mdx @@ -25,8 +25,8 @@ const myWorkflow = createWorkflow( "input": { "return_id": "{value}", "items": [{ - "id": "id_inzn4BfRYBpJJzN2", - "quantity": 1 + "id": "id_qRCl2aV4NRHxTL7", + "quantity": 11 }] } }) diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.receiveItemReturnRequestValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.receiveItemReturnRequestValidationStep/page.mdx index 54fcf93326..bdd8c5c387 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.receiveItemReturnRequestValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.receiveItemReturnRequestValidationStep/page.mdx @@ -23,134 +23,134 @@ const myWorkflow = createWorkflow( const data = receiveItemReturnRequestValidationStep({ "order": "{value}", "orderReturn": { - "id": "id_ebZCxZs41g8t3F1WHQoV", - "status": "partially_received", + "id": "id_uJ1SzUSMyft", + "status": "received", "order_id": "{value}", "items": [{ - "id": "id_0GLv4GNyiS6hBaSbzj0V", + "id": "id_PNBnNBUEllX", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 41 + "quantity": 25 }], - "display_id": 23, + "display_id": 34, "metadata": {} }, "orderChange": { - "id": "id_sxmL6WGN6kIkQ23", - "version": 14, + "id": "id_IaUtgPqXAPw3nrdjei1", + "version": 39, "order_id": "{value}", "return_id": "{value}", "exchange_id": "{value}", "claim_id": "{value}", "order": { - "id": "id_Ow8q1MWLb2XA9", - "version": 6, - "display_id": 44, - "status": "draft", + "id": "id_yy96Yv8XAQXwIdFVBS8", + "version": 34, + "display_id": 35, + "status": "pending", "currency_code": "{value}", - "created_at": "2025-04-21T19:40:02.234Z", - "updated_at": "2025-06-11T16:48:37.092Z", + "created_at": "2025-09-08T15:21:02.568Z", + "updated_at": "2025-04-26T18:45:14.177Z", "original_item_total": { - "numeric": 50 + "numeric": 27 }, "original_item_subtotal": { - "numeric": 41 + "numeric": 15 }, "original_item_tax_total": { - "numeric": 28 + "numeric": 3 }, "item_total": { - "numeric": 42 + "numeric": 39 }, "item_subtotal": { - "numeric": 0 + "numeric": 50 }, "item_tax_total": { - "numeric": 11 - }, - "original_total": { - "numeric": 34 - }, - "original_subtotal": { - "numeric": 47 - }, - "original_tax_total": { - "numeric": 35 - }, - "total": { - "numeric": 32 - }, - "subtotal": { - "numeric": 9 - }, - "tax_total": { - "numeric": 42 - }, - "discount_subtotal": { - "numeric": 37 - }, - "discount_total": { - "numeric": 49 - }, - "discount_tax_total": { - "numeric": 34 - }, - "gift_card_total": { - "numeric": 23 - }, - "gift_card_tax_total": { "numeric": 7 }, + "original_total": { + "numeric": 49 + }, + "original_subtotal": { + "numeric": 0 + }, + "original_tax_total": { + "numeric": 39 + }, + "total": { + "numeric": 40 + }, + "subtotal": { + "numeric": 13 + }, + "tax_total": { + "numeric": 14 + }, + "discount_subtotal": { + "numeric": 35 + }, + "discount_total": { + "numeric": 12 + }, + "discount_tax_total": { + "numeric": 9 + }, + "gift_card_total": { + "numeric": 6 + }, + "gift_card_tax_total": { + "numeric": 29 + }, "shipping_total": { - "numeric": 20 + "numeric": 1 }, "shipping_subtotal": { - "numeric": 9 + "numeric": 35 }, "shipping_tax_total": { "numeric": 41 }, "original_shipping_total": { - "numeric": 26 + "numeric": 21 }, "original_shipping_subtotal": { - "numeric": 41 + "numeric": 1 }, "original_shipping_tax_total": { - "numeric": 47 + "numeric": 0 } }, "return_order": { - "id": "id_orGy41V9hE", - "status": "received", + "id": "id_YzbsiBTxqk2oS8Ib3ULi", + "status": "partially_received", "order_id": "{value}", "items": [{ - "id": "id_pO5wUCOJCKwDF", + "id": "id_YUbwITf0UninCo", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 29 + "quantity": 48 }], - "display_id": 46, + "display_id": 4, "metadata": {} }, "exchange": { - "id": "id_yLELthr9MWT33", + "id": "id_Ou6RfkGPY84lAvWI0", "order_id": "{value}", - "order_version": 33, - "display_id": 11, + "order_version": 24, + "display_id": 49, "additional_items": [ "{value}" ], "metadata": {} }, "claim": { - "id": "id_FhTTZX4vu8IrfkxexC2X", - "type": "replace", + "id": "id_CZF3bpK9Z8e94rPJfVF", + "type": "refund", "order_id": "{value}", "order_version": 0, - "display_id": 9, + "display_id": 23, "claim_items": [ "{value}" ], @@ -160,7 +160,7 @@ const myWorkflow = createWorkflow( "metadata": {} }, "actions": [{ - "id": "id_i08OQurHoif", + "id": "id_6uL1EDOyWiN0fj12", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -170,13 +170,13 @@ const myWorkflow = createWorkflow( "order": {}, "reference": "{value}", "reference_id": "{value}", - "action": "SHIP_ITEM", + "action": "ITEM_UPDATE", "details": {}, "internal_note": {}, - "created_at": "2025-10-26T20:43:53.361Z", - "updated_at": "2025-02-26T08:26:58.712Z" + "created_at": "2025-01-15T16:34:56.231Z", + "updated_at": "2025-07-31T12:53:06.631Z" }], - "status": "confirmed", + "status": "declined", "requested_by": {}, "requested_at": {}, "confirmed_by": {}, @@ -187,12 +187,12 @@ const myWorkflow = createWorkflow( "declined_at": {}, "canceled_by": {}, "canceled_at": {}, - "created_at": "2025-05-08T17:45:49.954Z", - "updated_at": "2025-05-31T13:13:43.491Z" + "created_at": "2025-04-08T17:27:27.276Z", + "updated_at": "2025-02-09T12:22:43.185Z" }, "items": [{ - "id": "id_450bECdjIu", - "quantity": 30 + "id": "id_AqGtK6mX4a", + "quantity": 28 }] }) } diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.receiveItemReturnRequestWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.receiveItemReturnRequestWorkflow/page.mdx index de4d475ae5..f7a2594993 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.receiveItemReturnRequestWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.receiveItemReturnRequestWorkflow/page.mdx @@ -17,31 +17,9 @@ This workflow marks return items as received. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { receiveItemReturnRequestWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = receiveItemReturnRequestWorkflow - .runAsStep({ - input: { - "return_id": "{value}", - "items": [{ - "id": "id_tKLskYqFI3", - "quantity": 36 - }] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -60,8 +38,8 @@ export async function POST( input: { "return_id": "{value}", "items": [{ - "id": "id_tKLskYqFI3", - "quantity": 36 + "id": "id_Nv7ZmWMC1dqh4kulJwJb", + "quantity": 32 }] } }) @@ -89,8 +67,8 @@ export default async function handleOrderPlaced({ input: { "return_id": "{value}", "items": [{ - "id": "id_tKLskYqFI3", - "quantity": 36 + "id": "id_Nv7ZmWMC1dqh4kulJwJb", + "quantity": 32 }] } }) @@ -118,8 +96,8 @@ export default async function myCustomJob( input: { "return_id": "{value}", "items": [{ - "id": "id_tKLskYqFI3", - "quantity": 36 + "id": "id_Nv7ZmWMC1dqh4kulJwJb", + "quantity": 32 }] } }) @@ -131,6 +109,30 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { receiveItemReturnRequestWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = receiveItemReturnRequestWorkflow + .runAsStep({ + input: { + "return_id": "{value}", + "items": [{ + "id": "id_Nv7ZmWMC1dqh4kulJwJb", + "quantity": 32 + }] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeAddItemClaimActionWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeAddItemClaimActionWorkflow/page.mdx index 624fac7b78..de8717e4c0 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeAddItemClaimActionWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeAddItemClaimActionWorkflow/page.mdx @@ -17,28 +17,9 @@ This workflow removes new items from a claim. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { removeAddItemClaimActionWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = removeAddItemClaimActionWorkflow - .runAsStep({ - input: { - "claim_id": "{value}", - "action_id": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -119,6 +100,27 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { removeAddItemClaimActionWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = removeAddItemClaimActionWorkflow + .runAsStep({ + input: { + "claim_id": "{value}", + "action_id": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeClaimAddItemActionValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeClaimAddItemActionValidationStep/page.mdx index 4f70927fe0..9c5a3bd239 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeClaimAddItemActionValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeClaimAddItemActionValidationStep/page.mdx @@ -22,89 +22,89 @@ const myWorkflow = createWorkflow( () => { const data = removeClaimAddItemActionValidationStep({ "order": { - "id": "id_G4xW6OLyRc", - "version": 3, + "id": "id_bh9K26ZzFnGJz6udEjQ7", + "version": 10, "display_id": 31, - "status": "pending", + "status": "draft", "currency_code": "{value}", - "created_at": "2025-01-25T22:15:31.558Z", - "updated_at": "2025-03-02T02:51:25.671Z", + "created_at": "2025-12-20T16:27:35.649Z", + "updated_at": "2025-09-27T07:56:03.212Z", "original_item_total": { - "numeric": 27 - }, - "original_item_subtotal": { - "numeric": 7 - }, - "original_item_tax_total": { - "numeric": 25 - }, - "item_total": { - "numeric": 46 - }, - "item_subtotal": { - "numeric": 17 - }, - "item_tax_total": { - "numeric": 29 - }, - "original_total": { "numeric": 28 }, - "original_subtotal": { - "numeric": 35 - }, - "original_tax_total": { - "numeric": 26 - }, - "total": { - "numeric": 47 - }, - "subtotal": { - "numeric": 24 - }, - "tax_total": { - "numeric": 20 - }, - "discount_subtotal": { - "numeric": 34 - }, - "discount_total": { - "numeric": 15 - }, - "discount_tax_total": { - "numeric": 3 - }, - "gift_card_total": { - "numeric": 4 - }, - "gift_card_tax_total": { - "numeric": 16 - }, - "shipping_total": { - "numeric": 3 - }, - "shipping_subtotal": { - "numeric": 47 - }, - "shipping_tax_total": { + "original_item_subtotal": { "numeric": 11 }, - "original_shipping_total": { - "numeric": 38 + "original_item_tax_total": { + "numeric": 33 }, - "original_shipping_subtotal": { + "item_total": { + "numeric": 19 + }, + "item_subtotal": { + "numeric": 28 + }, + "item_tax_total": { + "numeric": 15 + }, + "original_total": { + "numeric": 40 + }, + "original_subtotal": { + "numeric": 34 + }, + "original_tax_total": { + "numeric": 13 + }, + "total": { + "numeric": 22 + }, + "subtotal": { + "numeric": 26 + }, + "tax_total": { + "numeric": 40 + }, + "discount_subtotal": { "numeric": 0 }, + "discount_total": { + "numeric": 27 + }, + "discount_tax_total": { + "numeric": 50 + }, + "gift_card_total": { + "numeric": 34 + }, + "gift_card_tax_total": { + "numeric": 19 + }, + "shipping_total": { + "numeric": 32 + }, + "shipping_subtotal": { + "numeric": 9 + }, + "shipping_tax_total": { + "numeric": 13 + }, + "original_shipping_total": { + "numeric": 37 + }, + "original_shipping_subtotal": { + "numeric": 17 + }, "original_shipping_tax_total": { - "numeric": 33 + "numeric": 41 } }, "orderClaim": { - "id": "id_eWiFtu0x8qy0W", - "type": "replace", + "id": "id_eAk8qOpIVjUe", + "type": "refund", "order_id": "{value}", - "order_version": 38, - "display_id": 28, + "order_version": 32, + "display_id": 27, "claim_items": [ "{value}" ], @@ -114,120 +114,120 @@ const myWorkflow = createWorkflow( "metadata": {} }, "orderChange": { - "id": "id_GHdjgXWZyPzWE8Mzc", - "version": 39, + "id": "id_tKwfdcQs4PZ4xVXMf0N", + "version": 17, "order_id": "{value}", "return_id": "{value}", "exchange_id": "{value}", "claim_id": "{value}", "order": { - "id": "id_7qvOLkexF1sN", - "version": 36, - "display_id": 37, - "status": "completed", + "id": "id_Xuv0WAgWIyTJtlVn", + "version": 41, + "display_id": 50, + "status": "requires_action", "currency_code": "{value}", - "created_at": "2025-11-05T13:14:52.736Z", - "updated_at": "2025-02-24T14:00:43.307Z", + "created_at": "2025-03-21T08:48:32.169Z", + "updated_at": "2025-03-18T13:39:55.843Z", "original_item_total": { - "numeric": 35 + "numeric": 0 }, "original_item_subtotal": { - "numeric": 47 + "numeric": 28 }, "original_item_tax_total": { - "numeric": 17 + "numeric": 9 }, "item_total": { - "numeric": 38 - }, - "item_subtotal": { "numeric": 41 }, + "item_subtotal": { + "numeric": 38 + }, "item_tax_total": { - "numeric": 6 + "numeric": 9 }, "original_total": { - "numeric": 22 + "numeric": 40 }, "original_subtotal": { "numeric": 11 }, "original_tax_total": { - "numeric": 0 + "numeric": 21 }, "total": { - "numeric": 42 - }, - "subtotal": { - "numeric": 38 - }, - "tax_total": { - "numeric": 0 - }, - "discount_subtotal": { - "numeric": 26 - }, - "discount_total": { "numeric": 31 }, + "subtotal": { + "numeric": 22 + }, + "tax_total": { + "numeric": 40 + }, + "discount_subtotal": { + "numeric": 12 + }, + "discount_total": { + "numeric": 32 + }, "discount_tax_total": { - "numeric": 18 + "numeric": 15 }, "gift_card_total": { - "numeric": 48 + "numeric": 38 }, "gift_card_tax_total": { - "numeric": 10 + "numeric": 41 }, "shipping_total": { - "numeric": 47 + "numeric": 31 }, "shipping_subtotal": { - "numeric": 6 + "numeric": 20 }, "shipping_tax_total": { - "numeric": 47 + "numeric": 25 }, "original_shipping_total": { - "numeric": 5 + "numeric": 10 }, "original_shipping_subtotal": { - "numeric": 50 + "numeric": 33 }, "original_shipping_tax_total": { - "numeric": 24 + "numeric": 48 } }, "return_order": { - "id": "id_aL1RjWnW6QalnBAQ", + "id": "id_nbPKwPVMvJ06W", "status": "received", "order_id": "{value}", "items": [{ - "id": "id_AaLR6os7Y0isl", + "id": "id_QYiHL92DboA7", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 11 + "quantity": 48 }], - "display_id": 36, + "display_id": 30, "metadata": {} }, "exchange": { - "id": "id_JpjwfF1V3Ocsj", + "id": "id_XakgT9J0TYkQy", "order_id": "{value}", - "order_version": 1, - "display_id": 4, + "order_version": 35, + "display_id": 32, "additional_items": [ "{value}" ], "metadata": {} }, "claim": { - "id": "id_Mw6GOKfzUdVHQNN", - "type": "refund", + "id": "id_gfR9L66V8pc8fD", + "type": "replace", "order_id": "{value}", - "order_version": 17, - "display_id": 49, + "order_version": 34, + "display_id": 32, "claim_items": [ "{value}" ], @@ -237,7 +237,7 @@ const myWorkflow = createWorkflow( "metadata": {} }, "actions": [{ - "id": "id_PV8sO4W2Iflf", + "id": "id_xOADRTdBsk", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -247,13 +247,13 @@ const myWorkflow = createWorkflow( "order": {}, "reference": "{value}", "reference_id": "{value}", - "action": "FULFILL_ITEM", + "action": "RECEIVE_DAMAGED_RETURN_ITEM", "details": {}, "internal_note": {}, - "created_at": "2025-12-12T23:18:50.508Z", - "updated_at": "2025-01-24T19:53:34.996Z" + "created_at": "2025-04-30T07:07:33.178Z", + "updated_at": "2025-11-14T23:37:58.707Z" }], - "status": "confirmed", + "status": "canceled", "requested_by": {}, "requested_at": {}, "confirmed_by": {}, @@ -264,8 +264,8 @@ const myWorkflow = createWorkflow( "declined_at": {}, "canceled_by": {}, "canceled_at": {}, - "created_at": "2026-01-05T00:46:22.740Z", - "updated_at": "2025-05-22T02:26:00.400Z" + "created_at": "2025-10-08T19:15:19.465Z", + "updated_at": "2025-05-10T01:56:25.072Z" }, "input": { "claim_id": "{value}", diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeClaimItemActionValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeClaimItemActionValidationStep/page.mdx index 7c441f78fe..c02605e739 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeClaimItemActionValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeClaimItemActionValidationStep/page.mdx @@ -22,89 +22,89 @@ const myWorkflow = createWorkflow( () => { const data = removeClaimItemActionValidationStep({ "order": { - "id": "id_b3uTWUlqATezM1", - "version": 10, - "display_id": 39, - "status": "pending", + "id": "id_9hnbiu1PnFSBLzDlpb", + "version": 40, + "display_id": 32, + "status": "draft", "currency_code": "{value}", - "created_at": "2025-07-22T17:56:58.160Z", - "updated_at": "2025-01-15T12:17:35.497Z", + "created_at": "2025-12-05T06:17:59.349Z", + "updated_at": "2025-03-16T06:48:33.303Z", "original_item_total": { - "numeric": 13 + "numeric": 44 }, "original_item_subtotal": { - "numeric": 0 + "numeric": 34 }, "original_item_tax_total": { - "numeric": 37 + "numeric": 1 }, "item_total": { "numeric": 41 }, "item_subtotal": { - "numeric": 26 + "numeric": 13 }, "item_tax_total": { - "numeric": 10 + "numeric": 1 }, "original_total": { - "numeric": 16 + "numeric": 3 }, "original_subtotal": { - "numeric": 5 + "numeric": 41 }, "original_tax_total": { - "numeric": 7 + "numeric": 14 }, "total": { - "numeric": 29 + "numeric": 10 }, "subtotal": { - "numeric": 30 + "numeric": 0 }, "tax_total": { - "numeric": 6 + "numeric": 0 }, "discount_subtotal": { - "numeric": 29 - }, - "discount_total": { - "numeric": 20 - }, - "discount_tax_total": { - "numeric": 26 - }, - "gift_card_total": { - "numeric": 31 - }, - "gift_card_tax_total": { - "numeric": 32 - }, - "shipping_total": { - "numeric": 27 - }, - "shipping_subtotal": { - "numeric": 35 - }, - "shipping_tax_total": { - "numeric": 8 - }, - "original_shipping_total": { - "numeric": 47 - }, - "original_shipping_subtotal": { "numeric": 50 }, + "discount_total": { + "numeric": 22 + }, + "discount_tax_total": { + "numeric": 41 + }, + "gift_card_total": { + "numeric": 35 + }, + "gift_card_tax_total": { + "numeric": 47 + }, + "shipping_total": { + "numeric": 21 + }, + "shipping_subtotal": { + "numeric": 6 + }, + "shipping_tax_total": { + "numeric": 9 + }, + "original_shipping_total": { + "numeric": 35 + }, + "original_shipping_subtotal": { + "numeric": 18 + }, "original_shipping_tax_total": { - "numeric": 4 + "numeric": 20 } }, "orderClaim": { - "id": "id_aqBdSF6ZmFWIE1IfH", - "type": "refund", + "id": "id_B8WPsCfxR5S", + "type": "replace", "order_id": "{value}", - "order_version": 32, - "display_id": 43, + "order_version": 35, + "display_id": 4, "claim_items": [ "{value}" ], @@ -114,120 +114,120 @@ const myWorkflow = createWorkflow( "metadata": {} }, "orderChange": { - "id": "id_SdZrL5PNXKT", - "version": 3, + "id": "id_f0pMZT19PKf6x8rS", + "version": 45, "order_id": "{value}", "return_id": "{value}", "exchange_id": "{value}", "claim_id": "{value}", "order": { - "id": "id_8InCsygOTeIv", - "version": 28, - "display_id": 47, - "status": "archived", + "id": "id_7V59ODkrKuifZ", + "version": 38, + "display_id": 7, + "status": "draft", "currency_code": "{value}", - "created_at": "2025-11-27T06:48:26.094Z", - "updated_at": "2025-01-29T21:15:30.463Z", + "created_at": "2025-07-21T07:22:19.106Z", + "updated_at": "2025-07-17T02:45:05.896Z", "original_item_total": { - "numeric": 12 - }, - "original_item_subtotal": { - "numeric": 30 - }, - "original_item_tax_total": { - "numeric": 32 - }, - "item_total": { - "numeric": 49 - }, - "item_subtotal": { - "numeric": 35 - }, - "item_tax_total": { - "numeric": 39 - }, - "original_total": { - "numeric": 10 - }, - "original_subtotal": { - "numeric": 42 - }, - "original_tax_total": { - "numeric": 29 - }, - "total": { - "numeric": 48 - }, - "subtotal": { - "numeric": 34 - }, - "tax_total": { - "numeric": 2 - }, - "discount_subtotal": { - "numeric": 5 - }, - "discount_total": { - "numeric": 8 - }, - "discount_tax_total": { - "numeric": 39 - }, - "gift_card_total": { - "numeric": 38 - }, - "gift_card_tax_total": { "numeric": 1 }, - "shipping_total": { - "numeric": 43 + "original_item_subtotal": { + "numeric": 29 }, - "shipping_subtotal": { + "original_item_tax_total": { + "numeric": 28 + }, + "item_total": { + "numeric": 50 + }, + "item_subtotal": { + "numeric": 27 + }, + "item_tax_total": { + "numeric": 46 + }, + "original_total": { + "numeric": 32 + }, + "original_subtotal": { "numeric": 20 }, - "shipping_tax_total": { - "numeric": 40 + "original_tax_total": { + "numeric": 12 }, - "original_shipping_total": { - "numeric": 35 + "total": { + "numeric": 2 }, - "original_shipping_subtotal": { + "subtotal": { + "numeric": 13 + }, + "tax_total": { + "numeric": 1 + }, + "discount_subtotal": { + "numeric": 4 + }, + "discount_total": { + "numeric": 38 + }, + "discount_tax_total": { + "numeric": 48 + }, + "gift_card_total": { + "numeric": 22 + }, + "gift_card_tax_total": { "numeric": 21 }, + "shipping_total": { + "numeric": 28 + }, + "shipping_subtotal": { + "numeric": 7 + }, + "shipping_tax_total": { + "numeric": 6 + }, + "original_shipping_total": { + "numeric": 25 + }, + "original_shipping_subtotal": { + "numeric": 33 + }, "original_shipping_tax_total": { - "numeric": 49 + "numeric": 8 } }, "return_order": { - "id": "id_1J0WmWs6kF4oBY4Ma", - "status": "received", + "id": "id_lxJGdASRS2iyBpvb", + "status": "requested", "order_id": "{value}", "items": [{ - "id": "id_3QSvXvKZaVQiz", + "id": "id_mzB6JPSy89A35EU5", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 19 + "quantity": 32 }], - "display_id": 37, + "display_id": 6, "metadata": {} }, "exchange": { - "id": "id_L8ew0IqI8V9g", + "id": "id_ieyVwJ9rDA9MZUVV7Jdg", "order_id": "{value}", - "order_version": 10, - "display_id": 48, + "order_version": 29, + "display_id": 28, "additional_items": [ "{value}" ], "metadata": {} }, "claim": { - "id": "id_hE3tJ7tzZDarIB4v", - "type": "replace", + "id": "id_szUKtiyJ8MAPvuv5Akef", + "type": "refund", "order_id": "{value}", - "order_version": 33, - "display_id": 41, + "order_version": 19, + "display_id": 22, "claim_items": [ "{value}" ], @@ -237,7 +237,7 @@ const myWorkflow = createWorkflow( "metadata": {} }, "actions": [{ - "id": "id_30H8KFUaIFTt8", + "id": "id_1IzjQ5PMs9Nu4SKVyjO", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -247,13 +247,13 @@ const myWorkflow = createWorkflow( "order": {}, "reference": "{value}", "reference_id": "{value}", - "action": "CANCEL_ITEM_FULFILLMENT", + "action": "CANCEL_RETURN_ITEM", "details": {}, "internal_note": {}, - "created_at": "2025-09-18T18:42:47.891Z", - "updated_at": "2025-02-12T17:02:02.106Z" + "created_at": "2025-07-17T21:08:49.211Z", + "updated_at": "2025-01-21T02:13:12.720Z" }], - "status": "canceled", + "status": "confirmed", "requested_by": {}, "requested_at": {}, "confirmed_by": {}, @@ -264,8 +264,8 @@ const myWorkflow = createWorkflow( "declined_at": {}, "canceled_by": {}, "canceled_at": {}, - "created_at": "2025-10-03T12:12:02.707Z", - "updated_at": "2025-10-05T23:50:17.041Z" + "created_at": "2025-02-02T05:19:48.207Z", + "updated_at": "2025-11-28T10:44:58.107Z" }, "input": { "claim_id": "{value}", diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeClaimShippingMethodValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeClaimShippingMethodValidationStep/page.mdx index 61c8cde8ad..50e827934f 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeClaimShippingMethodValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeClaimShippingMethodValidationStep/page.mdx @@ -26,11 +26,11 @@ const myWorkflow = createWorkflow( "action_id": "{value}" }, "orderClaim": { - "id": "id_G9DpSEt9Wtt3O0oQ", - "type": "replace", + "id": "id_jrTgINHpaGrx9nsUBG", + "type": "refund", "order_id": "{value}", - "order_version": 21, - "display_id": 19, + "order_version": 23, + "display_id": 48, "claim_items": [ "{value}" ], @@ -40,120 +40,120 @@ const myWorkflow = createWorkflow( "metadata": {} }, "orderChange": { - "id": "id_ep6pYZ5MNQZiFrtAhU", - "version": 11, + "id": "id_P8iAv6ObbNoGwEkjAJa", + "version": 28, "order_id": "{value}", "return_id": "{value}", "exchange_id": "{value}", "claim_id": "{value}", "order": { - "id": "id_tnaYLr6c2OI7o", - "version": 31, - "display_id": 28, - "status": "draft", + "id": "id_oSXZip79pYRx3YtFSpt5", + "version": 0, + "display_id": 11, + "status": "requires_action", "currency_code": "{value}", - "created_at": "2025-08-27T19:08:51.981Z", - "updated_at": "2025-05-10T07:22:56.038Z", + "created_at": "2025-03-23T21:43:19.582Z", + "updated_at": "2025-06-17T12:16:56.393Z", "original_item_total": { - "numeric": 15 + "numeric": 36 }, "original_item_subtotal": { - "numeric": 11 + "numeric": 7 }, "original_item_tax_total": { - "numeric": 2 + "numeric": 50 }, "item_total": { - "numeric": 4 + "numeric": 41 }, "item_subtotal": { - "numeric": 47 + "numeric": 26 }, "item_tax_total": { - "numeric": 45 + "numeric": 40 }, "original_total": { "numeric": 33 }, "original_subtotal": { - "numeric": 31 - }, - "original_tax_total": { - "numeric": 49 - }, - "total": { - "numeric": 47 - }, - "subtotal": { - "numeric": 6 - }, - "tax_total": { - "numeric": 41 - }, - "discount_subtotal": { - "numeric": 22 - }, - "discount_total": { - "numeric": 30 - }, - "discount_tax_total": { - "numeric": 10 - }, - "gift_card_total": { - "numeric": 34 - }, - "gift_card_tax_total": { - "numeric": 4 - }, - "shipping_total": { - "numeric": 32 - }, - "shipping_subtotal": { - "numeric": 3 - }, - "shipping_tax_total": { "numeric": 17 }, - "original_shipping_total": { + "original_tax_total": { + "numeric": 11 + }, + "total": { + "numeric": 33 + }, + "subtotal": { + "numeric": 27 + }, + "tax_total": { + "numeric": 50 + }, + "discount_subtotal": { + "numeric": 28 + }, + "discount_total": { + "numeric": 21 + }, + "discount_tax_total": { + "numeric": 6 + }, + "gift_card_total": { + "numeric": 30 + }, + "gift_card_tax_total": { + "numeric": 5 + }, + "shipping_total": { + "numeric": 47 + }, + "shipping_subtotal": { "numeric": 46 }, + "shipping_tax_total": { + "numeric": 19 + }, + "original_shipping_total": { + "numeric": 38 + }, "original_shipping_subtotal": { - "numeric": 9 + "numeric": 20 }, "original_shipping_tax_total": { - "numeric": 23 + "numeric": 17 } }, "return_order": { - "id": "id_7R4GSAMF9GME", - "status": "received", + "id": "id_TLyW9skOb26wy9x8", + "status": "partially_received", "order_id": "{value}", "items": [{ - "id": "id_2In0yJkcwJc559n", + "id": "id_rfSW1VvO1hd", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 36 + "quantity": 46 }], - "display_id": 18, + "display_id": 45, "metadata": {} }, "exchange": { - "id": "id_Fxn1vcbIcYy4akrs", + "id": "id_7MSWM927CPZfxK", "order_id": "{value}", - "order_version": 46, - "display_id": 3, + "order_version": 35, + "display_id": 23, "additional_items": [ "{value}" ], "metadata": {} }, "claim": { - "id": "id_MyZHIhTBIiGwXtS", - "type": "refund", + "id": "id_IXNSTl7bRCF", + "type": "replace", "order_id": "{value}", - "order_version": 36, - "display_id": 20, + "order_version": 15, + "display_id": 12, "claim_items": [ "{value}" ], @@ -163,7 +163,7 @@ const myWorkflow = createWorkflow( "metadata": {} }, "actions": [{ - "id": "id_Docb0TQBuKgI0xQXF", + "id": "id_vsq0oAYMWBerq26Za", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -173,13 +173,13 @@ const myWorkflow = createWorkflow( "order": {}, "reference": "{value}", "reference_id": "{value}", - "action": "CREDIT_LINE_ADD", + "action": "DELIVER_ITEM", "details": {}, "internal_note": {}, - "created_at": "2025-09-06T16:17:33.199Z", - "updated_at": "2025-05-28T06:00:27.859Z" + "created_at": "2025-12-27T03:52:44.350Z", + "updated_at": "2025-10-21T07:57:02.294Z" }], - "status": "confirmed", + "status": "declined", "requested_by": {}, "requested_at": {}, "confirmed_by": {}, @@ -190,8 +190,8 @@ const myWorkflow = createWorkflow( "declined_at": {}, "canceled_by": {}, "canceled_at": {}, - "created_at": "2025-10-31T18:53:46.584Z", - "updated_at": "2025-10-05T00:53:05.517Z" + "created_at": "2025-03-20T21:32:47.643Z", + "updated_at": "2025-03-07T16:46:18.903Z" } }) } diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeClaimShippingMethodWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeClaimShippingMethodWorkflow/page.mdx index 18d716b2cc..37b1715d62 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeClaimShippingMethodWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeClaimShippingMethodWorkflow/page.mdx @@ -17,28 +17,9 @@ This workflow removes the shipping method of a claim. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { removeClaimShippingMethodWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = removeClaimShippingMethodWorkflow - .runAsStep({ - input: { - "claim_id": "{value}", - "action_id": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -119,6 +100,27 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { removeClaimShippingMethodWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = removeClaimShippingMethodWorkflow + .runAsStep({ + input: { + "claim_id": "{value}", + "action_id": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeExchangeItemActionValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeExchangeItemActionValidationStep/page.mdx index 2cd8de459e..84d2e3cd4a 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeExchangeItemActionValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeExchangeItemActionValidationStep/page.mdx @@ -22,208 +22,208 @@ const myWorkflow = createWorkflow( () => { const data = removeExchangeItemActionValidationStep({ "order": { - "id": "id_Vfbo7j5gU6", - "version": 39, - "display_id": 5, - "status": "pending", + "id": "id_zCPZ8qep4Sev", + "version": 2, + "display_id": 31, + "status": "completed", "currency_code": "{value}", - "created_at": "2025-10-07T15:02:19.966Z", - "updated_at": "2025-08-07T22:52:49.439Z", + "created_at": "2025-06-05T09:55:28.599Z", + "updated_at": "2025-07-21T23:39:00.779Z", "original_item_total": { - "numeric": 28 + "numeric": 1 }, "original_item_subtotal": { - "numeric": 50 + "numeric": 21 }, "original_item_tax_total": { - "numeric": 11 + "numeric": 10 }, "item_total": { - "numeric": 1 + "numeric": 37 }, "item_subtotal": { "numeric": 4 }, "item_tax_total": { - "numeric": 38 - }, - "original_total": { - "numeric": 44 - }, - "original_subtotal": { - "numeric": 43 - }, - "original_tax_total": { - "numeric": 3 - }, - "total": { - "numeric": 26 - }, - "subtotal": { - "numeric": 37 - }, - "tax_total": { - "numeric": 7 - }, - "discount_subtotal": { - "numeric": 0 - }, - "discount_total": { - "numeric": 7 - }, - "discount_tax_total": { - "numeric": 15 - }, - "gift_card_total": { - "numeric": 24 - }, - "gift_card_tax_total": { - "numeric": 44 - }, - "shipping_total": { - "numeric": 40 - }, - "shipping_subtotal": { "numeric": 41 }, + "original_total": { + "numeric": 19 + }, + "original_subtotal": { + "numeric": 0 + }, + "original_tax_total": { + "numeric": 12 + }, + "total": { + "numeric": 0 + }, + "subtotal": { + "numeric": 44 + }, + "tax_total": { + "numeric": 41 + }, + "discount_subtotal": { + "numeric": 13 + }, + "discount_total": { + "numeric": 23 + }, + "discount_tax_total": { + "numeric": 3 + }, + "gift_card_total": { + "numeric": 30 + }, + "gift_card_tax_total": { + "numeric": 49 + }, + "shipping_total": { + "numeric": 45 + }, + "shipping_subtotal": { + "numeric": 5 + }, "shipping_tax_total": { - "numeric": 10 - }, - "original_shipping_total": { - "numeric": 15 - }, - "original_shipping_subtotal": { "numeric": 20 }, + "original_shipping_total": { + "numeric": 36 + }, + "original_shipping_subtotal": { + "numeric": 21 + }, "original_shipping_tax_total": { - "numeric": 17 + "numeric": 32 } }, "orderExchange": { - "id": "id_jgzXkjk459sCd1uf", + "id": "id_zaWJUaaO0R2Z7Q4", "order_id": "{value}", - "order_version": 32, - "display_id": 35, + "order_version": 22, + "display_id": 39, "additional_items": [ "{value}" ], "metadata": {} }, "orderChange": { - "id": "id_mpGO4oM6HoK5rFARy", - "version": 16, + "id": "id_HGPuhTWi0Ne", + "version": 35, "order_id": "{value}", "return_id": "{value}", "exchange_id": "{value}", "claim_id": "{value}", "order": { - "id": "id_J2gDpDjkcubDkO9Vcw", - "version": 45, - "display_id": 17, - "status": "archived", + "id": "id_RLywtdGQXZY2VPPjew", + "version": 20, + "display_id": 24, + "status": "completed", "currency_code": "{value}", - "created_at": "2025-07-22T03:20:47.567Z", - "updated_at": "2025-03-17T08:48:49.971Z", + "created_at": "2025-11-10T07:00:44.249Z", + "updated_at": "2025-01-31T08:01:25.076Z", "original_item_total": { - "numeric": 9 + "numeric": 6 }, "original_item_subtotal": { "numeric": 41 }, "original_item_tax_total": { - "numeric": 23 - }, - "item_total": { - "numeric": 21 - }, - "item_subtotal": { "numeric": 15 }, + "item_total": { + "numeric": 44 + }, + "item_subtotal": { + "numeric": 35 + }, "item_tax_total": { - "numeric": 23 - }, - "original_total": { - "numeric": 48 - }, - "original_subtotal": { - "numeric": 13 - }, - "original_tax_total": { - "numeric": 50 - }, - "total": { - "numeric": 8 - }, - "subtotal": { - "numeric": 46 - }, - "tax_total": { - "numeric": 48 - }, - "discount_subtotal": { "numeric": 29 }, - "discount_total": { - "numeric": 4 + "original_total": { + "numeric": 6 }, - "discount_tax_total": { - "numeric": 26 - }, - "gift_card_total": { + "original_subtotal": { "numeric": 5 }, - "gift_card_tax_total": { - "numeric": 5 + "original_tax_total": { + "numeric": 45 }, - "shipping_total": { - "numeric": 25 - }, - "shipping_subtotal": { - "numeric": 37 - }, - "shipping_tax_total": { + "total": { "numeric": 33 }, + "subtotal": { + "numeric": 3 + }, + "tax_total": { + "numeric": 24 + }, + "discount_subtotal": { + "numeric": 15 + }, + "discount_total": { + "numeric": 32 + }, + "discount_tax_total": { + "numeric": 43 + }, + "gift_card_total": { + "numeric": 28 + }, + "gift_card_tax_total": { + "numeric": 16 + }, + "shipping_total": { + "numeric": 43 + }, + "shipping_subtotal": { + "numeric": 43 + }, + "shipping_tax_total": { + "numeric": 36 + }, "original_shipping_total": { - "numeric": 19 + "numeric": 16 }, "original_shipping_subtotal": { - "numeric": 46 + "numeric": 7 }, "original_shipping_tax_total": { - "numeric": 50 + "numeric": 3 } }, "return_order": { - "id": "id_Q0Np7lzfObQdWL9K", + "id": "id_lu5USgAKtaxlq518b", "status": "partially_received", "order_id": "{value}", "items": [{ - "id": "id_6DbY7fmqTZ", + "id": "id_ekDDA7muEIyvykbGI", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 25 + "quantity": 13 }], - "display_id": 9, + "display_id": 33, "metadata": {} }, "exchange": { - "id": "id_5LhytxCkWjnDDe2", + "id": "id_eZrkf8JKwj4adKzLs", "order_id": "{value}", - "order_version": 48, - "display_id": 26, + "order_version": 50, + "display_id": 32, "additional_items": [ "{value}" ], "metadata": {} }, "claim": { - "id": "id_c8Wi8DEauiY5yJjX", - "type": "replace", + "id": "id_UXsg3sDMx7Dbetfv", + "type": "refund", "order_id": "{value}", - "order_version": 44, - "display_id": 24, + "order_version": 36, + "display_id": 20, "claim_items": [ "{value}" ], @@ -233,7 +233,7 @@ const myWorkflow = createWorkflow( "metadata": {} }, "actions": [{ - "id": "id_RQFXEiCnkuE3N2Nm6hV1", + "id": "id_jcWfEuJvyW", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -243,13 +243,13 @@ const myWorkflow = createWorkflow( "order": {}, "reference": "{value}", "reference_id": "{value}", - "action": "TRANSFER_CUSTOMER", + "action": "CREDIT_LINE_ADD", "details": {}, "internal_note": {}, - "created_at": "2025-01-21T21:06:55.694Z", - "updated_at": "2025-04-08T18:14:05.357Z" + "created_at": "2025-05-17T08:56:02.570Z", + "updated_at": "2026-01-14T03:52:43.694Z" }], - "status": "confirmed", + "status": "canceled", "requested_by": {}, "requested_at": {}, "confirmed_by": {}, @@ -260,8 +260,8 @@ const myWorkflow = createWorkflow( "declined_at": {}, "canceled_by": {}, "canceled_at": {}, - "created_at": "2025-06-25T00:25:27.772Z", - "updated_at": "2026-01-04T04:06:14.012Z" + "created_at": "2025-08-05T22:25:59.029Z", + "updated_at": "2025-04-02T06:48:43.583Z" }, "input": { "exchange_id": "{value}", diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeExchangeShippingMethodValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeExchangeShippingMethodValidationStep/page.mdx index 66dc2d4cfb..9a5a1f8158 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeExchangeShippingMethodValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeExchangeShippingMethodValidationStep/page.mdx @@ -26,130 +26,130 @@ const myWorkflow = createWorkflow( "action_id": "{value}" }, "orderExchange": { - "id": "id_vP0t0rvTghgfr0D", + "id": "id_OBWj7FPCmgb", "order_id": "{value}", - "order_version": 47, - "display_id": 25, + "order_version": 16, + "display_id": 42, "additional_items": [ "{value}" ], "metadata": {} }, "orderChange": { - "id": "id_aUVRDYEuqJ", + "id": "id_EFGlcmqyaTPI0hpiiFvm", "version": 43, "order_id": "{value}", "return_id": "{value}", "exchange_id": "{value}", "claim_id": "{value}", "order": { - "id": "id_uJZEgcwGdVwK", - "version": 2, - "display_id": 28, - "status": "draft", + "id": "id_grUxwm42YNfBK", + "version": 16, + "display_id": 14, + "status": "completed", "currency_code": "{value}", - "created_at": "2025-01-29T00:50:04.207Z", - "updated_at": "2025-03-05T06:43:32.986Z", + "created_at": "2025-06-06T01:50:47.242Z", + "updated_at": "2025-04-10T03:01:09.158Z", "original_item_total": { - "numeric": 15 + "numeric": 9 }, "original_item_subtotal": { - "numeric": 31 + "numeric": 33 }, "original_item_tax_total": { - "numeric": 8 + "numeric": 17 }, "item_total": { - "numeric": 27 + "numeric": 26 }, "item_subtotal": { - "numeric": 11 + "numeric": 6 }, "item_tax_total": { - "numeric": 24 + "numeric": 32 }, "original_total": { - "numeric": 30 - }, - "original_subtotal": { - "numeric": 47 - }, - "original_tax_total": { - "numeric": 8 - }, - "total": { - "numeric": 49 - }, - "subtotal": { - "numeric": 22 - }, - "tax_total": { - "numeric": 27 - }, - "discount_subtotal": { - "numeric": 26 - }, - "discount_total": { - "numeric": 40 - }, - "discount_tax_total": { - "numeric": 11 - }, - "gift_card_total": { - "numeric": 0 - }, - "gift_card_tax_total": { - "numeric": 28 - }, - "shipping_total": { - "numeric": 1 - }, - "shipping_subtotal": { "numeric": 29 }, + "original_subtotal": { + "numeric": 33 + }, + "original_tax_total": { + "numeric": 31 + }, + "total": { + "numeric": 48 + }, + "subtotal": { + "numeric": 21 + }, + "tax_total": { + "numeric": 17 + }, + "discount_subtotal": { + "numeric": 8 + }, + "discount_total": { + "numeric": 1 + }, + "discount_tax_total": { + "numeric": 13 + }, + "gift_card_total": { + "numeric": 39 + }, + "gift_card_tax_total": { + "numeric": 40 + }, + "shipping_total": { + "numeric": 18 + }, + "shipping_subtotal": { + "numeric": 6 + }, "shipping_tax_total": { - "numeric": 10 + "numeric": 12 }, "original_shipping_total": { - "numeric": 26 + "numeric": 43 }, "original_shipping_subtotal": { - "numeric": 47 + "numeric": 20 }, "original_shipping_tax_total": { - "numeric": 41 + "numeric": 8 } }, "return_order": { - "id": "id_6ewbNNgYEJzZ", - "status": "requested", + "id": "id_TUrHej3nhJuzBxQgA", + "status": "partially_received", "order_id": "{value}", "items": [{ - "id": "id_qiLXJrRfpE", + "id": "id_rYD5LMHp8WU052Jh", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 25 + "quantity": 24 }], - "display_id": 17, + "display_id": 29, "metadata": {} }, "exchange": { - "id": "id_fMqQxbIUmaONYtdJXK", + "id": "id_ta3NY2yIKg", "order_id": "{value}", - "order_version": 12, - "display_id": 34, + "order_version": 9, + "display_id": 46, "additional_items": [ "{value}" ], "metadata": {} }, "claim": { - "id": "id_deHNgLE9WMO2PIZIKfY", + "id": "id_4iFbveYwsJ2u4yDp", "type": "replace", "order_id": "{value}", - "order_version": 17, - "display_id": 26, + "order_version": 44, + "display_id": 36, "claim_items": [ "{value}" ], @@ -159,7 +159,7 @@ const myWorkflow = createWorkflow( "metadata": {} }, "actions": [{ - "id": "id_fYDN9o10ls92I8Pk", + "id": "id_d4yB72tAcTqiJVvWiQ", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -172,10 +172,10 @@ const myWorkflow = createWorkflow( "action": "CANCEL_ITEM_FULFILLMENT", "details": {}, "internal_note": {}, - "created_at": "2025-05-21T16:04:10.289Z", - "updated_at": "2025-08-04T06:53:01.169Z" + "created_at": "2025-06-06T18:55:16.816Z", + "updated_at": "2025-08-22T15:32:03.953Z" }], - "status": "declined", + "status": "pending", "requested_by": {}, "requested_at": {}, "confirmed_by": {}, @@ -186,8 +186,8 @@ const myWorkflow = createWorkflow( "declined_at": {}, "canceled_by": {}, "canceled_at": {}, - "created_at": "2025-12-28T22:26:11.717Z", - "updated_at": "2025-02-13T13:23:02.352Z" + "created_at": "2025-11-08T15:38:38.127Z", + "updated_at": "2025-08-05T18:45:27.175Z" } }) } diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeExchangeShippingMethodWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeExchangeShippingMethodWorkflow/page.mdx index d317635b33..19fbb95114 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeExchangeShippingMethodWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeExchangeShippingMethodWorkflow/page.mdx @@ -17,28 +17,9 @@ This workflow removes a shipping method of an exchange. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { removeExchangeShippingMethodWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = removeExchangeShippingMethodWorkflow - .runAsStep({ - input: { - "exchange_id": "{value}", - "action_id": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -119,6 +100,27 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { removeExchangeShippingMethodWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = removeExchangeShippingMethodWorkflow + .runAsStep({ + input: { + "exchange_id": "{value}", + "action_id": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeItemClaimActionWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeItemClaimActionWorkflow/page.mdx index 57119acc86..aca45bdbde 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeItemClaimActionWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeItemClaimActionWorkflow/page.mdx @@ -17,28 +17,9 @@ This workflow removes claim items. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { removeItemClaimActionWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = removeItemClaimActionWorkflow - .runAsStep({ - input: { - "claim_id": "{value}", - "action_id": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -119,6 +100,27 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { removeItemClaimActionWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = removeItemClaimActionWorkflow + .runAsStep({ + input: { + "claim_id": "{value}", + "action_id": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeItemExchangeActionWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeItemExchangeActionWorkflow/page.mdx index ec331176e0..6b3cade17c 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeItemExchangeActionWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeItemExchangeActionWorkflow/page.mdx @@ -17,28 +17,9 @@ This workflow removes a new item in an exchange. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { removeItemExchangeActionWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = removeItemExchangeActionWorkflow - .runAsStep({ - input: { - "exchange_id": "{value}", - "action_id": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -119,6 +100,27 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { removeItemExchangeActionWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = removeItemExchangeActionWorkflow + .runAsStep({ + input: { + "exchange_id": "{value}", + "action_id": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeItemOrderEditActionWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeItemOrderEditActionWorkflow/page.mdx index 7fc844dfd2..1fbd75b7e5 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeItemOrderEditActionWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeItemOrderEditActionWorkflow/page.mdx @@ -17,28 +17,9 @@ This workflow removes a new item in an order edit. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { removeItemOrderEditActionWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = removeItemOrderEditActionWorkflow - .runAsStep({ - input: { - "order_id": "{value}", - "action_id": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -119,6 +100,27 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { removeItemOrderEditActionWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = removeItemOrderEditActionWorkflow + .runAsStep({ + input: { + "order_id": "{value}", + "action_id": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeItemReceiveReturnActionValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeItemReceiveReturnActionValidationStep/page.mdx index e0ed263fbd..4403eb73fc 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeItemReceiveReturnActionValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeItemReceiveReturnActionValidationStep/page.mdx @@ -22,212 +22,212 @@ const myWorkflow = createWorkflow( () => { const data = removeItemReceiveReturnActionValidationStep({ "order": { - "id": "id_XxlX65glEzYAhPKZi", - "version": 3, - "display_id": 8, - "status": "pending", + "id": "id_RFA4nxW8xLh7H", + "version": 7, + "display_id": 2, + "status": "completed", "currency_code": "{value}", - "created_at": "2025-03-15T21:07:47.557Z", - "updated_at": "2025-12-15T03:44:43.429Z", + "created_at": "2025-08-30T03:22:32.634Z", + "updated_at": "2025-11-16T18:27:49.127Z", "original_item_total": { - "numeric": 43 + "numeric": 7 }, "original_item_subtotal": { - "numeric": 33 - }, - "original_item_tax_total": { - "numeric": 38 - }, - "item_total": { - "numeric": 16 - }, - "item_subtotal": { - "numeric": 21 - }, - "item_tax_total": { - "numeric": 40 - }, - "original_total": { - "numeric": 21 - }, - "original_subtotal": { - "numeric": 22 - }, - "original_tax_total": { - "numeric": 49 - }, - "total": { - "numeric": 46 - }, - "subtotal": { - "numeric": 4 - }, - "tax_total": { - "numeric": 31 - }, - "discount_subtotal": { - "numeric": 37 - }, - "discount_total": { - "numeric": 4 - }, - "discount_tax_total": { "numeric": 28 }, - "gift_card_total": { + "original_item_tax_total": { + "numeric": 3 + }, + "item_total": { + "numeric": 12 + }, + "item_subtotal": { + "numeric": 43 + }, + "item_tax_total": { + "numeric": 0 + }, + "original_total": { + "numeric": 46 + }, + "original_subtotal": { "numeric": 34 }, - "gift_card_tax_total": { - "numeric": 14 + "original_tax_total": { + "numeric": 33 }, - "shipping_total": { - "numeric": 14 + "total": { + "numeric": 27 }, - "shipping_subtotal": { - "numeric": 39 + "subtotal": { + "numeric": 0 }, - "shipping_tax_total": { - "numeric": 17 + "tax_total": { + "numeric": 40 }, - "original_shipping_total": { + "discount_subtotal": { + "numeric": 40 + }, + "discount_total": { + "numeric": 31 + }, + "discount_tax_total": { + "numeric": 48 + }, + "gift_card_total": { "numeric": 9 }, - "original_shipping_subtotal": { + "gift_card_tax_total": { + "numeric": 35 + }, + "shipping_total": { "numeric": 17 }, + "shipping_subtotal": { + "numeric": 23 + }, + "shipping_tax_total": { + "numeric": 19 + }, + "original_shipping_total": { + "numeric": 49 + }, + "original_shipping_subtotal": { + "numeric": 7 + }, "original_shipping_tax_total": { - "numeric": 39 + "numeric": 45 } }, "orderReturn": { - "id": "id_9KkxlHuvpeb4s", - "status": "partially_received", + "id": "id_JflJRBvy7P8Zt7bfNzfq", + "status": "requested", "order_id": "{value}", "items": [{ - "id": "id_cjrDnBoEt5gR", + "id": "id_SZwzoSjGn8YlVrOW", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 0 + "quantity": 42 }], - "display_id": 25, + "display_id": 23, "metadata": {} }, "orderChange": { - "id": "id_kq6fRCj2uJlC3WAc2Uap", - "version": 50, + "id": "id_Q6wnXKGxqZiUbgY4", + "version": 9, "order_id": "{value}", "return_id": "{value}", "exchange_id": "{value}", "claim_id": "{value}", "order": { - "id": "id_31OiP9PBZZn", + "id": "id_JTkSFhRTPbpUG6", "version": 11, - "display_id": 46, - "status": "pending", + "display_id": 5, + "status": "completed", "currency_code": "{value}", - "created_at": "2025-12-04T10:46:17.286Z", - "updated_at": "2025-08-30T22:38:20.342Z", + "created_at": "2025-10-26T10:02:05.565Z", + "updated_at": "2025-06-05T21:36:11.590Z", "original_item_total": { - "numeric": 3 + "numeric": 38 }, "original_item_subtotal": { - "numeric": 32 + "numeric": 47 }, "original_item_tax_total": { "numeric": 26 }, "item_total": { - "numeric": 26 + "numeric": 6 }, "item_subtotal": { - "numeric": 13 + "numeric": 14 }, "item_tax_total": { - "numeric": 24 - }, - "original_total": { - "numeric": 49 - }, - "original_subtotal": { - "numeric": 39 - }, - "original_tax_total": { - "numeric": 7 - }, - "total": { - "numeric": 41 - }, - "subtotal": { - "numeric": 36 - }, - "tax_total": { - "numeric": 33 - }, - "discount_subtotal": { - "numeric": 29 - }, - "discount_total": { "numeric": 13 }, - "discount_tax_total": { - "numeric": 38 + "original_total": { + "numeric": 16 }, - "gift_card_total": { + "original_subtotal": { + "numeric": 24 + }, + "original_tax_total": { + "numeric": 26 + }, + "total": { + "numeric": 50 + }, + "subtotal": { "numeric": 44 }, - "gift_card_tax_total": { - "numeric": 44 + "tax_total": { + "numeric": 5 }, - "shipping_total": { + "discount_subtotal": { "numeric": 23 }, + "discount_total": { + "numeric": 26 + }, + "discount_tax_total": { + "numeric": 40 + }, + "gift_card_total": { + "numeric": 19 + }, + "gift_card_tax_total": { + "numeric": 14 + }, + "shipping_total": { + "numeric": 32 + }, "shipping_subtotal": { - "numeric": 4 + "numeric": 43 }, "shipping_tax_total": { - "numeric": 17 + "numeric": 11 }, "original_shipping_total": { - "numeric": 1 + "numeric": 4 }, "original_shipping_subtotal": { - "numeric": 25 + "numeric": 49 }, "original_shipping_tax_total": { - "numeric": 7 + "numeric": 38 } }, "return_order": { - "id": "id_mF2MYwBunA0ObU", + "id": "id_EjHXwppl8NN", "status": "canceled", "order_id": "{value}", "items": [{ - "id": "id_mM9XbxrvDERkjr", + "id": "id_cwoKSKpPAl", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 26 + "quantity": 17 }], - "display_id": 13, + "display_id": 46, "metadata": {} }, "exchange": { - "id": "id_U8lnmLCwBjOCcHJ", + "id": "id_pGDLgMWw3Z", "order_id": "{value}", - "order_version": 47, - "display_id": 25, + "order_version": 3, + "display_id": 16, "additional_items": [ "{value}" ], "metadata": {} }, "claim": { - "id": "id_xMiZPUMdxCB", - "type": "replace", + "id": "id_pjEH0llZJDxRQ", + "type": "refund", "order_id": "{value}", - "order_version": 37, - "display_id": 24, + "order_version": 34, + "display_id": 33, "claim_items": [ "{value}" ], @@ -237,7 +237,7 @@ const myWorkflow = createWorkflow( "metadata": {} }, "actions": [{ - "id": "id_xYaTGt8C65ruUg", + "id": "id_CXjDEl63hHE", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -247,13 +247,13 @@ const myWorkflow = createWorkflow( "order": {}, "reference": "{value}", "reference_id": "{value}", - "action": "TRANSFER_CUSTOMER", + "action": "SHIPPING_ADD", "details": {}, "internal_note": {}, - "created_at": "2025-09-21T07:43:56.456Z", - "updated_at": "2025-02-23T21:17:08.526Z" + "created_at": "2025-04-11T19:52:49.363Z", + "updated_at": "2025-08-28T01:24:48.305Z" }], - "status": "canceled", + "status": "declined", "requested_by": {}, "requested_at": {}, "confirmed_by": {}, @@ -264,8 +264,8 @@ const myWorkflow = createWorkflow( "declined_at": {}, "canceled_by": {}, "canceled_at": {}, - "created_at": "2025-07-21T07:00:59.099Z", - "updated_at": "2025-04-21T12:13:22.660Z" + "created_at": "2025-09-08T06:33:27.700Z", + "updated_at": "2025-12-21T14:30:45.960Z" }, "input": { "return_id": "{value}", diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeItemReceiveReturnActionWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeItemReceiveReturnActionWorkflow/page.mdx index 3d25ddb05d..f1380ac7dd 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeItemReceiveReturnActionWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeItemReceiveReturnActionWorkflow/page.mdx @@ -17,28 +17,9 @@ This workflow removes an item from a return receival. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { removeItemReceiveReturnActionWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = removeItemReceiveReturnActionWorkflow - .runAsStep({ - input: { - "return_id": "{value}", - "action_id": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -119,6 +100,27 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { removeItemReceiveReturnActionWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = removeItemReceiveReturnActionWorkflow + .runAsStep({ + input: { + "return_id": "{value}", + "action_id": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeItemReturnActionWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeItemReturnActionWorkflow/page.mdx index 0c774a3e62..4c8dd071c1 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeItemReturnActionWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeItemReturnActionWorkflow/page.mdx @@ -17,28 +17,9 @@ This workflow removes a return item. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { removeItemReturnActionWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = removeItemReturnActionWorkflow - .runAsStep({ - input: { - "return_id": "{value}", - "action_id": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -119,6 +100,27 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { removeItemReturnActionWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = removeItemReturnActionWorkflow + .runAsStep({ + input: { + "return_id": "{value}", + "action_id": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeOrderEditItemActionValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeOrderEditItemActionValidationStep/page.mdx index 2a40c947f5..a26b56d999 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeOrderEditItemActionValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeOrderEditItemActionValidationStep/page.mdx @@ -22,186 +22,186 @@ const myWorkflow = createWorkflow( () => { const data = removeOrderEditItemActionValidationStep({ "order": { - "id": "id_5ORdwoedYYDwby", - "version": 50, - "display_id": 25, - "status": "draft", + "id": "id_SoV9Cfk3qt0tLiFu", + "version": 12, + "display_id": 18, + "status": "completed", "currency_code": "{value}", - "created_at": "2025-07-30T10:33:37.325Z", - "updated_at": "2025-06-16T02:47:06.177Z", + "created_at": "2025-01-28T19:10:02.270Z", + "updated_at": "2025-01-23T11:56:52.299Z", "original_item_total": { "numeric": 28 }, "original_item_subtotal": { - "numeric": 16 + "numeric": 24 }, "original_item_tax_total": { - "numeric": 28 + "numeric": 40 }, "item_total": { - "numeric": 32 + "numeric": 42 }, "item_subtotal": { - "numeric": 34 + "numeric": 9 }, "item_tax_total": { - "numeric": 29 + "numeric": 30 }, "original_total": { - "numeric": 31 + "numeric": 32 }, "original_subtotal": { - "numeric": 13 + "numeric": 29 }, "original_tax_total": { - "numeric": 41 + "numeric": 25 }, "total": { "numeric": 13 }, "subtotal": { - "numeric": 1 + "numeric": 42 }, "tax_total": { - "numeric": 17 + "numeric": 0 }, "discount_subtotal": { - "numeric": 41 - }, - "discount_total": { - "numeric": 31 - }, - "discount_tax_total": { - "numeric": 13 - }, - "gift_card_total": { "numeric": 39 }, - "gift_card_tax_total": { + "discount_total": { + "numeric": 36 + }, + "discount_tax_total": { "numeric": 2 }, + "gift_card_total": { + "numeric": 36 + }, + "gift_card_tax_total": { + "numeric": 26 + }, "shipping_total": { - "numeric": 19 + "numeric": 50 }, "shipping_subtotal": { "numeric": 6 }, "shipping_tax_total": { - "numeric": 50 + "numeric": 1 }, "original_shipping_total": { - "numeric": 33 + "numeric": 3 }, "original_shipping_subtotal": { - "numeric": 4 + "numeric": 46 }, "original_shipping_tax_total": { - "numeric": 42 + "numeric": 7 } }, "orderChange": { - "id": "id_sJJpEdVgLIZ6opv", - "version": 30, + "id": "id_Jy8v75j53qvBx7fkH6N", + "version": 2, "order_id": "{value}", "return_id": "{value}", "exchange_id": "{value}", "claim_id": "{value}", "order": { - "id": "id_zO0NQcae6WEqNReIJ", - "version": 40, - "display_id": 48, - "status": "requires_action", + "id": "id_Obwln7gFvpia8", + "version": 32, + "display_id": 29, + "status": "archived", "currency_code": "{value}", - "created_at": "2025-09-23T16:59:32.681Z", - "updated_at": "2025-11-19T03:38:57.965Z", + "created_at": "2025-03-04T03:38:27.897Z", + "updated_at": "2025-06-08T21:23:42.359Z", "original_item_total": { "numeric": 7 }, "original_item_subtotal": { - "numeric": 29 - }, - "original_item_tax_total": { - "numeric": 29 - }, - "item_total": { - "numeric": 25 - }, - "item_subtotal": { - "numeric": 39 - }, - "item_tax_total": { - "numeric": 31 - }, - "original_total": { - "numeric": 34 - }, - "original_subtotal": { - "numeric": 6 - }, - "original_tax_total": { - "numeric": 13 - }, - "total": { - "numeric": 16 - }, - "subtotal": { - "numeric": 25 - }, - "tax_total": { - "numeric": 42 - }, - "discount_subtotal": { - "numeric": 46 - }, - "discount_total": { - "numeric": 32 - }, - "discount_tax_total": { - "numeric": 1 - }, - "gift_card_total": { - "numeric": 31 - }, - "gift_card_tax_total": { - "numeric": 39 - }, - "shipping_total": { - "numeric": 27 - }, - "shipping_subtotal": { - "numeric": 1 - }, - "shipping_tax_total": { "numeric": 37 }, + "original_item_tax_total": { + "numeric": 11 + }, + "item_total": { + "numeric": 37 + }, + "item_subtotal": { + "numeric": 11 + }, + "item_tax_total": { + "numeric": 37 + }, + "original_total": { + "numeric": 2 + }, + "original_subtotal": { + "numeric": 31 + }, + "original_tax_total": { + "numeric": 26 + }, + "total": { + "numeric": 9 + }, + "subtotal": { + "numeric": 5 + }, + "tax_total": { + "numeric": 4 + }, + "discount_subtotal": { + "numeric": 16 + }, + "discount_total": { + "numeric": 31 + }, + "discount_tax_total": { + "numeric": 44 + }, + "gift_card_total": { + "numeric": 37 + }, + "gift_card_tax_total": { + "numeric": 12 + }, + "shipping_total": { + "numeric": 38 + }, + "shipping_subtotal": { + "numeric": 19 + }, + "shipping_tax_total": { + "numeric": 45 + }, "original_shipping_total": { - "numeric": 7 + "numeric": 11 }, "original_shipping_subtotal": { - "numeric": 23 + "numeric": 21 }, "original_shipping_tax_total": { - "numeric": 31 + "numeric": 30 } }, "return_order": { - "id": "id_OjMSW4NhAn", - "status": "partially_received", + "id": "id_vNsDmDjfaCv", + "status": "requested", "order_id": "{value}", "items": [{ - "id": "id_5aouzibOhfIm", + "id": "id_Vx1pipWIrVaw5aCJm", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 26 + "quantity": 25 }], - "display_id": 23, + "display_id": 38, "metadata": {} }, "exchange": { - "id": "id_nTWszkjI93vqlBu9bU", + "id": "id_qs4DiuS2xert2", "order_id": "{value}", - "order_version": 20, + "order_version": 36, "display_id": 11, "additional_items": [ "{value}" @@ -209,11 +209,11 @@ const myWorkflow = createWorkflow( "metadata": {} }, "claim": { - "id": "id_x7f8wd4ZB0SOHTUB", + "id": "id_0guU2lB6bV8gEL7NT", "type": "replace", "order_id": "{value}", - "order_version": 37, - "display_id": 27, + "order_version": 8, + "display_id": 11, "claim_items": [ "{value}" ], @@ -223,7 +223,7 @@ const myWorkflow = createWorkflow( "metadata": {} }, "actions": [{ - "id": "id_apz6qr0h9lJ", + "id": "id_OEbM6UfvRCd11w", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -233,11 +233,11 @@ const myWorkflow = createWorkflow( "order": {}, "reference": "{value}", "reference_id": "{value}", - "action": "RETURN_ITEM", + "action": "ITEM_ADD", "details": {}, "internal_note": {}, - "created_at": "2025-07-23T19:43:36.288Z", - "updated_at": "2025-04-29T15:01:55.518Z" + "created_at": "2025-12-28T03:54:08.886Z", + "updated_at": "2025-03-23T03:52:59.938Z" }], "status": "pending", "requested_by": {}, @@ -250,8 +250,8 @@ const myWorkflow = createWorkflow( "declined_at": {}, "canceled_by": {}, "canceled_at": {}, - "created_at": "2025-08-25T09:39:59.629Z", - "updated_at": "2025-11-19T00:53:25.286Z" + "created_at": "2025-04-12T16:30:44.199Z", + "updated_at": "2025-08-17T17:23:38.916Z" }, "input": { "order_id": "{value}", diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeOrderEditShippingMethodValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeOrderEditShippingMethodValidationStep/page.mdx index 9849e753f3..b48b896495 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeOrderEditShippingMethodValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeOrderEditShippingMethodValidationStep/page.mdx @@ -26,120 +26,120 @@ const myWorkflow = createWorkflow( "action_id": "{value}" }, "orderChange": { - "id": "id_lXHDofdIxLw", - "version": 15, + "id": "id_cHmISHEUm9JCfR", + "version": 2, "order_id": "{value}", "return_id": "{value}", "exchange_id": "{value}", "claim_id": "{value}", "order": { - "id": "id_BMCy167pzTXlxgKzd", - "version": 41, - "display_id": 44, - "status": "draft", + "id": "id_VUnBNPCib5", + "version": 38, + "display_id": 38, + "status": "requires_action", "currency_code": "{value}", - "created_at": "2025-06-24T04:57:59.663Z", - "updated_at": "2025-05-04T18:01:52.901Z", + "created_at": "2025-06-01T16:47:03.651Z", + "updated_at": "2025-03-29T18:31:12.135Z", "original_item_total": { - "numeric": 12 - }, - "original_item_subtotal": { - "numeric": 1 - }, - "original_item_tax_total": { - "numeric": 3 - }, - "item_total": { - "numeric": 4 - }, - "item_subtotal": { - "numeric": 35 - }, - "item_tax_total": { - "numeric": 38 - }, - "original_total": { - "numeric": 25 - }, - "original_subtotal": { - "numeric": 26 - }, - "original_tax_total": { - "numeric": 35 - }, - "total": { "numeric": 7 }, - "subtotal": { - "numeric": 28 - }, - "tax_total": { - "numeric": 40 - }, - "discount_subtotal": { - "numeric": 46 - }, - "discount_total": { - "numeric": 26 - }, - "discount_tax_total": { - "numeric": 29 - }, - "gift_card_total": { - "numeric": 10 - }, - "gift_card_tax_total": { - "numeric": 18 - }, - "shipping_total": { + "original_item_subtotal": { "numeric": 43 }, - "shipping_subtotal": { + "original_item_tax_total": { + "numeric": 1 + }, + "item_total": { + "numeric": 21 + }, + "item_subtotal": { + "numeric": 7 + }, + "item_tax_total": { + "numeric": 8 + }, + "original_total": { + "numeric": 36 + }, + "original_subtotal": { + "numeric": 4 + }, + "original_tax_total": { + "numeric": 40 + }, + "total": { + "numeric": 3 + }, + "subtotal": { + "numeric": 3 + }, + "tax_total": { + "numeric": 33 + }, + "discount_subtotal": { + "numeric": 12 + }, + "discount_total": { + "numeric": 13 + }, + "discount_tax_total": { + "numeric": 11 + }, + "gift_card_total": { + "numeric": 36 + }, + "gift_card_tax_total": { "numeric": 26 }, + "shipping_total": { + "numeric": 19 + }, + "shipping_subtotal": { + "numeric": 13 + }, "shipping_tax_total": { - "numeric": 18 + "numeric": 31 }, "original_shipping_total": { - "numeric": 3 + "numeric": 47 }, "original_shipping_subtotal": { - "numeric": 3 + "numeric": 25 }, "original_shipping_tax_total": { - "numeric": 24 + "numeric": 11 } }, "return_order": { - "id": "id_4AGWo0jFLpaF", + "id": "id_l0hgfT8D6nQDmvbS", "status": "canceled", "order_id": "{value}", "items": [{ - "id": "id_B3ZPch11aM4", + "id": "id_CxPHRmAdcLkLooUdu", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 12 + "quantity": 20 }], - "display_id": 30, + "display_id": 16, "metadata": {} }, "exchange": { - "id": "id_WNSpQmRgt1WtIa26cup", + "id": "id_vGJHWKd2t1knhhPj1Sg", "order_id": "{value}", - "order_version": 30, - "display_id": 41, + "order_version": 22, + "display_id": 2, "additional_items": [ "{value}" ], "metadata": {} }, "claim": { - "id": "id_fnWvcYt0AgSC", + "id": "id_x6PchCVQac", "type": "refund", "order_id": "{value}", - "order_version": 28, - "display_id": 33, + "order_version": 25, + "display_id": 39, "claim_items": [ "{value}" ], @@ -149,7 +149,7 @@ const myWorkflow = createWorkflow( "metadata": {} }, "actions": [{ - "id": "id_TbvRrJ1AWYMJp", + "id": "id_67iUCeASWTCtMExAz", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -159,13 +159,13 @@ const myWorkflow = createWorkflow( "order": {}, "reference": "{value}", "reference_id": "{value}", - "action": "RETURN_ITEM", + "action": "DELIVER_ITEM", "details": {}, "internal_note": {}, - "created_at": "2025-05-02T22:08:32.394Z", - "updated_at": "2025-07-30T19:24:30.857Z" + "created_at": "2025-01-18T06:33:11.694Z", + "updated_at": "2025-09-10T20:14:20.542Z" }], - "status": "requested", + "status": "canceled", "requested_by": {}, "requested_at": {}, "confirmed_by": {}, @@ -176,8 +176,8 @@ const myWorkflow = createWorkflow( "declined_at": {}, "canceled_by": {}, "canceled_at": {}, - "created_at": "2025-07-10T16:13:36.991Z", - "updated_at": "2025-10-08T00:41:07.821Z" + "created_at": "2025-12-12T14:09:55.966Z", + "updated_at": "2025-05-27T14:30:11.221Z" } }) } diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeOrderEditShippingMethodWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeOrderEditShippingMethodWorkflow/page.mdx index 407eb9174e..f5e058d032 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeOrderEditShippingMethodWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeOrderEditShippingMethodWorkflow/page.mdx @@ -17,28 +17,9 @@ This workflow removes a shipping method of an order edit. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { removeOrderEditShippingMethodWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = removeOrderEditShippingMethodWorkflow - .runAsStep({ - input: { - "order_id": "{value}", - "action_id": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -119,6 +100,27 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { removeOrderEditShippingMethodWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = removeOrderEditShippingMethodWorkflow + .runAsStep({ + input: { + "order_id": "{value}", + "action_id": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeReturnItemActionValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeReturnItemActionValidationStep/page.mdx index f558949b1a..6e58565643 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeReturnItemActionValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeReturnItemActionValidationStep/page.mdx @@ -22,212 +22,212 @@ const myWorkflow = createWorkflow( () => { const data = removeReturnItemActionValidationStep({ "order": { - "id": "id_WRLxBafuGcgz", - "version": 47, - "display_id": 24, - "status": "draft", + "id": "id_cGIuKA0WWYcSLA", + "version": 25, + "display_id": 38, + "status": "canceled", "currency_code": "{value}", - "created_at": "2025-03-27T03:30:14.469Z", - "updated_at": "2025-10-14T22:50:38.982Z", + "created_at": "2025-09-18T07:42:07.018Z", + "updated_at": "2025-06-28T08:16:06.848Z", "original_item_total": { - "numeric": 29 + "numeric": 0 }, "original_item_subtotal": { - "numeric": 26 + "numeric": 1 }, "original_item_tax_total": { - "numeric": 36 + "numeric": 50 }, "item_total": { "numeric": 16 }, "item_subtotal": { - "numeric": 17 - }, - "item_tax_total": { - "numeric": 49 - }, - "original_total": { - "numeric": 40 - }, - "original_subtotal": { - "numeric": 34 - }, - "original_tax_total": { - "numeric": 33 - }, - "total": { - "numeric": 38 - }, - "subtotal": { - "numeric": 26 - }, - "tax_total": { - "numeric": 46 - }, - "discount_subtotal": { - "numeric": 24 - }, - "discount_total": { - "numeric": 35 - }, - "discount_tax_total": { - "numeric": 9 - }, - "gift_card_total": { "numeric": 27 }, - "gift_card_tax_total": { - "numeric": 23 + "item_tax_total": { + "numeric": 25 }, - "shipping_total": { - "numeric": 14 + "original_total": { + "numeric": 7 }, - "shipping_subtotal": { - "numeric": 2 + "original_subtotal": { + "numeric": 24 }, - "shipping_tax_total": { - "numeric": 38 + "original_tax_total": { + "numeric": 8 }, - "original_shipping_total": { - "numeric": 21 + "total": { + "numeric": 49 }, - "original_shipping_subtotal": { + "subtotal": { + "numeric": 4 + }, + "tax_total": { + "numeric": 39 + }, + "discount_subtotal": { + "numeric": 45 + }, + "discount_total": { "numeric": 37 }, + "discount_tax_total": { + "numeric": 1 + }, + "gift_card_total": { + "numeric": 46 + }, + "gift_card_tax_total": { + "numeric": 41 + }, + "shipping_total": { + "numeric": 23 + }, + "shipping_subtotal": { + "numeric": 25 + }, + "shipping_tax_total": { + "numeric": 50 + }, + "original_shipping_total": { + "numeric": 41 + }, + "original_shipping_subtotal": { + "numeric": 40 + }, "original_shipping_tax_total": { - "numeric": 29 + "numeric": 32 } }, "orderReturn": { - "id": "id_cJCk3RmeGQVxEdnzM4", - "status": "requested", + "id": "id_EnzXRYLcOn", + "status": "canceled", "order_id": "{value}", "items": [{ - "id": "id_TJJsiNSPhVJ1t5j5HgEK", + "id": "id_oY0NCxdE2xE", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 0 + "quantity": 8 }], - "display_id": 15, + "display_id": 41, "metadata": {} }, "orderChange": { - "id": "id_MghUDPTEKoVKAP5Lsd", - "version": 25, + "id": "id_6zogllPNge6kPr7g8Nwp", + "version": 15, "order_id": "{value}", "return_id": "{value}", "exchange_id": "{value}", "claim_id": "{value}", "order": { - "id": "id_jGTjWUzvzpH8YhxR", - "version": 31, - "display_id": 31, - "status": "pending", + "id": "id_BoZbo4V0PD6ZRTcp", + "version": 17, + "display_id": 2, + "status": "requires_action", "currency_code": "{value}", - "created_at": "2025-02-20T10:32:11.158Z", - "updated_at": "2025-09-30T04:31:38.439Z", + "created_at": "2025-05-13T09:56:17.613Z", + "updated_at": "2025-11-10T11:34:55.773Z", "original_item_total": { "numeric": 30 }, "original_item_subtotal": { - "numeric": 10 - }, - "original_item_tax_total": { - "numeric": 8 - }, - "item_total": { - "numeric": 13 - }, - "item_subtotal": { - "numeric": 25 - }, - "item_tax_total": { - "numeric": 0 - }, - "original_total": { - "numeric": 37 - }, - "original_subtotal": { - "numeric": 4 - }, - "original_tax_total": { - "numeric": 18 - }, - "total": { - "numeric": 50 - }, - "subtotal": { - "numeric": 8 - }, - "tax_total": { - "numeric": 38 - }, - "discount_subtotal": { - "numeric": 48 - }, - "discount_total": { - "numeric": 17 - }, - "discount_tax_total": { - "numeric": 7 - }, - "gift_card_total": { - "numeric": 17 - }, - "gift_card_tax_total": { "numeric": 29 }, - "shipping_total": { - "numeric": 25 + "original_item_tax_total": { + "numeric": 16 }, - "shipping_subtotal": { - "numeric": 31 + "item_total": { + "numeric": 17 }, - "shipping_tax_total": { + "item_subtotal": { + "numeric": 10 + }, + "item_tax_total": { + "numeric": 4 + }, + "original_total": { + "numeric": 4 + }, + "original_subtotal": { + "numeric": 45 + }, + "original_tax_total": { + "numeric": 15 + }, + "total": { + "numeric": 23 + }, + "subtotal": { + "numeric": 49 + }, + "tax_total": { + "numeric": 30 + }, + "discount_subtotal": { + "numeric": 46 + }, + "discount_total": { "numeric": 0 }, - "original_shipping_total": { + "discount_tax_total": { + "numeric": 46 + }, + "gift_card_total": { + "numeric": 22 + }, + "gift_card_tax_total": { "numeric": 28 }, + "shipping_total": { + "numeric": 11 + }, + "shipping_subtotal": { + "numeric": 38 + }, + "shipping_tax_total": { + "numeric": 33 + }, + "original_shipping_total": { + "numeric": 39 + }, "original_shipping_subtotal": { - "numeric": 18 + "numeric": 28 }, "original_shipping_tax_total": { - "numeric": 28 + "numeric": 3 } }, "return_order": { - "id": "id_eagm2EIDwb1ERA2", - "status": "received", + "id": "id_DtM9JWpoPgADfkUw", + "status": "canceled", "order_id": "{value}", "items": [{ - "id": "id_MtbbtUk5C2UV7nRmKZpJ", + "id": "id_gJapBCloFAg", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 46 + "quantity": 24 }], - "display_id": 22, + "display_id": 6, "metadata": {} }, "exchange": { - "id": "id_bjt92myUOVStsvcT", + "id": "id_sNjn7Z6cyBaO4M", "order_id": "{value}", - "order_version": 21, - "display_id": 39, + "order_version": 44, + "display_id": 15, "additional_items": [ "{value}" ], "metadata": {} }, "claim": { - "id": "id_eeuVuh0CDUeQyQjv", + "id": "id_DPqbgAW1orlOY4S", "type": "replace", "order_id": "{value}", - "order_version": 31, - "display_id": 7, + "order_version": 25, + "display_id": 1, "claim_items": [ "{value}" ], @@ -237,7 +237,7 @@ const myWorkflow = createWorkflow( "metadata": {} }, "actions": [{ - "id": "id_DWNbs7xUbTvrGAK", + "id": "id_tjgR9zfOXsHcJTKEGN", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -247,13 +247,13 @@ const myWorkflow = createWorkflow( "order": {}, "reference": "{value}", "reference_id": "{value}", - "action": "RETURN_ITEM", + "action": "TRANSFER_CUSTOMER", "details": {}, "internal_note": {}, - "created_at": "2025-03-05T17:17:47.036Z", - "updated_at": "2025-09-22T09:54:48.423Z" + "created_at": "2025-02-12T02:22:25.924Z", + "updated_at": "2025-07-05T17:32:11.791Z" }], - "status": "pending", + "status": "canceled", "requested_by": {}, "requested_at": {}, "confirmed_by": {}, @@ -264,8 +264,8 @@ const myWorkflow = createWorkflow( "declined_at": {}, "canceled_by": {}, "canceled_at": {}, - "created_at": "2025-02-03T19:29:51.347Z", - "updated_at": "2025-10-11T21:37:45.724Z" + "created_at": "2025-03-09T08:49:54.815Z", + "updated_at": "2025-04-14T10:06:09.050Z" }, "input": { "return_id": "{value}", diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeReturnShippingMethodValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeReturnShippingMethodValidationStep/page.mdx index a94b688c19..03c818a346 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeReturnShippingMethodValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeReturnShippingMethodValidationStep/page.mdx @@ -26,134 +26,134 @@ const myWorkflow = createWorkflow( "action_id": "{value}" }, "orderReturn": { - "id": "id_J0emf4mSrkPnk98EYTm", + "id": "id_Z4890k6R7DOJZSA", "status": "requested", "order_id": "{value}", "items": [{ - "id": "id_udbFThYDFEx77RJQP", + "id": "id_tQ2NCowxlbRDxwpR7Di", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 29 + "quantity": 17 }], - "display_id": 23, + "display_id": 2, "metadata": {} }, "orderChange": { - "id": "id_qYvEC2UL1LBB7S", - "version": 13, + "id": "id_B50J1OOS9mos0jTQjQ", + "version": 24, "order_id": "{value}", "return_id": "{value}", "exchange_id": "{value}", "claim_id": "{value}", "order": { - "id": "id_J7RflM9Ot2OfBw", - "version": 37, - "display_id": 17, - "status": "completed", + "id": "id_1IfiAM8IWfeZ", + "version": 27, + "display_id": 1, + "status": "pending", "currency_code": "{value}", - "created_at": "2025-06-04T15:03:01.735Z", - "updated_at": "2026-01-10T02:01:44.999Z", + "created_at": "2025-09-03T10:26:33.359Z", + "updated_at": "2025-12-03T23:06:58.289Z", "original_item_total": { - "numeric": 15 - }, - "original_item_subtotal": { - "numeric": 30 - }, - "original_item_tax_total": { - "numeric": 27 - }, - "item_total": { - "numeric": 23 - }, - "item_subtotal": { - "numeric": 45 - }, - "item_tax_total": { - "numeric": 33 - }, - "original_total": { - "numeric": 49 - }, - "original_subtotal": { - "numeric": 10 - }, - "original_tax_total": { - "numeric": 31 - }, - "total": { - "numeric": 15 - }, - "subtotal": { - "numeric": 35 - }, - "tax_total": { - "numeric": 9 - }, - "discount_subtotal": { - "numeric": 10 - }, - "discount_total": { - "numeric": 32 - }, - "discount_tax_total": { - "numeric": 42 - }, - "gift_card_total": { - "numeric": 0 - }, - "gift_card_tax_total": { - "numeric": 21 - }, - "shipping_total": { - "numeric": 48 - }, - "shipping_subtotal": { - "numeric": 38 - }, - "shipping_tax_total": { - "numeric": 11 - }, - "original_shipping_total": { "numeric": 6 }, - "original_shipping_subtotal": { + "original_item_subtotal": { + "numeric": 39 + }, + "original_item_tax_total": { + "numeric": 40 + }, + "item_total": { "numeric": 20 }, - "original_shipping_tax_total": { + "item_subtotal": { + "numeric": 23 + }, + "item_tax_total": { + "numeric": 20 + }, + "original_total": { + "numeric": 33 + }, + "original_subtotal": { + "numeric": 44 + }, + "original_tax_total": { + "numeric": 32 + }, + "total": { + "numeric": 5 + }, + "subtotal": { + "numeric": 8 + }, + "tax_total": { + "numeric": 16 + }, + "discount_subtotal": { "numeric": 40 + }, + "discount_total": { + "numeric": 39 + }, + "discount_tax_total": { + "numeric": 49 + }, + "gift_card_total": { + "numeric": 48 + }, + "gift_card_tax_total": { + "numeric": 45 + }, + "shipping_total": { + "numeric": 50 + }, + "shipping_subtotal": { + "numeric": 41 + }, + "shipping_tax_total": { + "numeric": 49 + }, + "original_shipping_total": { + "numeric": 18 + }, + "original_shipping_subtotal": { + "numeric": 27 + }, + "original_shipping_tax_total": { + "numeric": 8 } }, "return_order": { - "id": "id_utM5ie9WtAPH1B6PB89", - "status": "canceled", + "id": "id_0DDqqxWmzKUY", + "status": "requested", "order_id": "{value}", "items": [{ - "id": "id_K1GaydU7waxtNgxrMm", + "id": "id_GnLpnPIff2nlnF6ow", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 24 + "quantity": 6 }], - "display_id": 40, + "display_id": 11, "metadata": {} }, "exchange": { - "id": "id_8FMGwmrQF1y6MRoL", + "id": "id_8EmyHICqMkO45W", "order_id": "{value}", - "order_version": 3, - "display_id": 23, + "order_version": 1, + "display_id": 41, "additional_items": [ "{value}" ], "metadata": {} }, "claim": { - "id": "id_Qff4FPwumy9ej", + "id": "id_ET9UTaiFu5W", "type": "replace", "order_id": "{value}", - "order_version": 36, - "display_id": 47, + "order_version": 50, + "display_id": 46, "claim_items": [ "{value}" ], @@ -163,7 +163,7 @@ const myWorkflow = createWorkflow( "metadata": {} }, "actions": [{ - "id": "id_sR3vwrhFoS", + "id": "id_JxZyQNdwjEVBBFij0", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -173,13 +173,13 @@ const myWorkflow = createWorkflow( "order": {}, "reference": "{value}", "reference_id": "{value}", - "action": "CANCEL_RETURN_ITEM", + "action": "REINSTATE_ITEM", "details": {}, "internal_note": {}, - "created_at": "2026-01-05T22:56:24.802Z", - "updated_at": "2025-12-24T12:59:05.900Z" + "created_at": "2025-11-18T18:46:01.254Z", + "updated_at": "2025-11-20T02:08:40.040Z" }], - "status": "canceled", + "status": "confirmed", "requested_by": {}, "requested_at": {}, "confirmed_by": {}, @@ -190,8 +190,8 @@ const myWorkflow = createWorkflow( "declined_at": {}, "canceled_by": {}, "canceled_at": {}, - "created_at": "2025-11-22T20:49:31.862Z", - "updated_at": "2025-03-26T01:15:07.236Z" + "created_at": "2025-09-03T14:00:57.863Z", + "updated_at": "2025-12-07T04:00:20.008Z" } }) } diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeReturnShippingMethodWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeReturnShippingMethodWorkflow/page.mdx index 8745ed5de7..895b908887 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeReturnShippingMethodWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.removeReturnShippingMethodWorkflow/page.mdx @@ -17,28 +17,9 @@ This workflow removes a shipping method from a return. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { removeReturnShippingMethodWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = removeReturnShippingMethodWorkflow - .runAsStep({ - input: { - "return_id": "{value}", - "action_id": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -119,6 +100,27 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { removeReturnShippingMethodWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = removeReturnShippingMethodWorkflow + .runAsStep({ + input: { + "return_id": "{value}", + "action_id": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.requestItemReturnValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.requestItemReturnValidationStep/page.mdx index 34c0d40eca..a8aeb5c517 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.requestItemReturnValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.requestItemReturnValidationStep/page.mdx @@ -23,134 +23,134 @@ const myWorkflow = createWorkflow( const data = requestItemReturnValidationStep({ "order": "{value}", "orderReturn": { - "id": "id_2dV0dbxdQBpMhrs9n", - "status": "received", + "id": "id_0tbrpiOiHo", + "status": "canceled", "order_id": "{value}", "items": [{ - "id": "id_Z5RAYMM18S3rsZwGJV", + "id": "id_EQaOsO0onL1W14mh", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 42 + "quantity": 20 }], - "display_id": 25, + "display_id": 0, "metadata": {} }, "orderChange": { - "id": "id_4hwgmk3d8ZlhK8Flb", - "version": 0, + "id": "id_gqukj2QozyzOViEUXl", + "version": 45, "order_id": "{value}", "return_id": "{value}", "exchange_id": "{value}", "claim_id": "{value}", "order": { - "id": "id_bvSsI9fdJn", - "version": 24, - "display_id": 27, - "status": "requires_action", + "id": "id_OQfDeYotwgcXpnnKMl", + "version": 7, + "display_id": 36, + "status": "archived", "currency_code": "{value}", - "created_at": "2025-11-24T01:13:44.253Z", - "updated_at": "2025-10-07T10:34:08.904Z", + "created_at": "2025-08-24T23:33:55.952Z", + "updated_at": "2025-06-27T09:16:13.116Z", "original_item_total": { - "numeric": 6 + "numeric": 13 }, "original_item_subtotal": { - "numeric": 30 - }, - "original_item_tax_total": { - "numeric": 2 - }, - "item_total": { - "numeric": 11 - }, - "item_subtotal": { - "numeric": 47 - }, - "item_tax_total": { - "numeric": 43 - }, - "original_total": { - "numeric": 4 - }, - "original_subtotal": { - "numeric": 36 - }, - "original_tax_total": { - "numeric": 27 - }, - "total": { - "numeric": 4 - }, - "subtotal": { - "numeric": 8 - }, - "tax_total": { - "numeric": 21 - }, - "discount_subtotal": { - "numeric": 14 - }, - "discount_total": { - "numeric": 16 - }, - "discount_tax_total": { - "numeric": 35 - }, - "gift_card_total": { - "numeric": 11 - }, - "gift_card_tax_total": { - "numeric": 26 - }, - "shipping_total": { - "numeric": 10 - }, - "shipping_subtotal": { - "numeric": 24 - }, - "shipping_tax_total": { - "numeric": 35 - }, - "original_shipping_total": { "numeric": 6 }, - "original_shipping_subtotal": { + "original_item_tax_total": { + "numeric": 22 + }, + "item_total": { + "numeric": 12 + }, + "item_subtotal": { + "numeric": 18 + }, + "item_tax_total": { "numeric": 3 }, + "original_total": { + "numeric": 3 + }, + "original_subtotal": { + "numeric": 25 + }, + "original_tax_total": { + "numeric": 42 + }, + "total": { + "numeric": 44 + }, + "subtotal": { + "numeric": 43 + }, + "tax_total": { + "numeric": 19 + }, + "discount_subtotal": { + "numeric": 20 + }, + "discount_total": { + "numeric": 36 + }, + "discount_tax_total": { + "numeric": 38 + }, + "gift_card_total": { + "numeric": 2 + }, + "gift_card_tax_total": { + "numeric": 16 + }, + "shipping_total": { + "numeric": 46 + }, + "shipping_subtotal": { + "numeric": 0 + }, + "shipping_tax_total": { + "numeric": 26 + }, + "original_shipping_total": { + "numeric": 48 + }, + "original_shipping_subtotal": { + "numeric": 4 + }, "original_shipping_tax_total": { - "numeric": 8 + "numeric": 3 } }, "return_order": { - "id": "id_FgtQ9wCt8OyaJ91", - "status": "requested", + "id": "id_9TEZAnLX4grNtoKXuPyJ", + "status": "partially_received", "order_id": "{value}", "items": [{ - "id": "id_SmkruRrY0t2MLjvcEL", + "id": "id_e5jbUHaPul5Hn", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 25 + "quantity": 8 }], - "display_id": 24, + "display_id": 14, "metadata": {} }, "exchange": { - "id": "id_a6xj3Ksy50mVwTMxeDc", + "id": "id_o1xUKvEtRD9q3HlJD0CR", "order_id": "{value}", - "order_version": 29, - "display_id": 7, + "order_version": 44, + "display_id": 16, "additional_items": [ "{value}" ], "metadata": {} }, "claim": { - "id": "id_VY5cxFe0NSKhJE", - "type": "replace", + "id": "id_kxULfEASaarQPltRsfUC", + "type": "refund", "order_id": "{value}", - "order_version": 31, - "display_id": 19, + "order_version": 3, + "display_id": 15, "claim_items": [ "{value}" ], @@ -160,7 +160,7 @@ const myWorkflow = createWorkflow( "metadata": {} }, "actions": [{ - "id": "id_kZeaOJc8mO8xhhuY", + "id": "id_q45kKMaQp4MfeToFEEo", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -170,13 +170,13 @@ const myWorkflow = createWorkflow( "order": {}, "reference": "{value}", "reference_id": "{value}", - "action": "CANCEL_ITEM_FULFILLMENT", + "action": "SHIPPING_ADD", "details": {}, "internal_note": {}, - "created_at": "2025-12-25T13:08:36.473Z", - "updated_at": "2025-08-24T19:31:48.261Z" + "created_at": "2025-02-11T11:47:45.712Z", + "updated_at": "2025-12-22T10:31:14.577Z" }], - "status": "confirmed", + "status": "pending", "requested_by": {}, "requested_at": {}, "confirmed_by": {}, @@ -187,12 +187,12 @@ const myWorkflow = createWorkflow( "declined_at": {}, "canceled_by": {}, "canceled_at": {}, - "created_at": "2025-03-04T23:14:07.538Z", - "updated_at": "2025-05-09T21:49:49.783Z" + "created_at": "2025-02-07T16:44:19.266Z", + "updated_at": "2025-02-08T04:14:57.351Z" }, "items": [{ - "id": "id_OZbCPWQcCN", - "quantity": 19 + "id": "id_ePo7YDY1ZOb2qr", + "quantity": 17 }] }) } diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.requestItemReturnWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.requestItemReturnWorkflow/page.mdx index f3fb32f976..72b6d85709 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.requestItemReturnWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.requestItemReturnWorkflow/page.mdx @@ -17,31 +17,9 @@ This workflow adds items to a return. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { requestItemReturnWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = requestItemReturnWorkflow - .runAsStep({ - input: { - "return_id": "{value}", - "items": [{ - "id": "id_loGFFJMjWr9WCzEFJWD", - "quantity": 38 - }] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -60,8 +38,8 @@ export async function POST( input: { "return_id": "{value}", "items": [{ - "id": "id_loGFFJMjWr9WCzEFJWD", - "quantity": 38 + "id": "id_quXDXun9HNHDqD", + "quantity": 2 }] } }) @@ -89,8 +67,8 @@ export default async function handleOrderPlaced({ input: { "return_id": "{value}", "items": [{ - "id": "id_loGFFJMjWr9WCzEFJWD", - "quantity": 38 + "id": "id_quXDXun9HNHDqD", + "quantity": 2 }] } }) @@ -118,8 +96,8 @@ export default async function myCustomJob( input: { "return_id": "{value}", "items": [{ - "id": "id_loGFFJMjWr9WCzEFJWD", - "quantity": 38 + "id": "id_quXDXun9HNHDqD", + "quantity": 2 }] } }) @@ -131,6 +109,30 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { requestItemReturnWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = requestItemReturnWorkflow + .runAsStep({ + input: { + "return_id": "{value}", + "items": [{ + "id": "id_quXDXun9HNHDqD", + "quantity": 2 + }] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.requestOrderEditRequestValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.requestOrderEditRequestValidationStep/page.mdx index 290ec8f81c..7970439e1b 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.requestOrderEditRequestValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.requestOrderEditRequestValidationStep/page.mdx @@ -22,198 +22,198 @@ const myWorkflow = createWorkflow( () => { const data = requestOrderEditRequestValidationStep({ "order": { - "id": "id_jLPGkDtj9un", - "version": 3, - "display_id": 16, - "status": "pending", + "id": "id_z4Oj4ysazgTRHJ", + "version": 48, + "display_id": 32, + "status": "archived", "currency_code": "{value}", - "created_at": "2025-06-08T01:07:20.734Z", - "updated_at": "2026-01-12T08:38:27.832Z", + "created_at": "2025-02-07T12:03:50.373Z", + "updated_at": "2025-02-22T13:24:49.413Z", "original_item_total": { - "numeric": 32 + "numeric": 5 }, "original_item_subtotal": { - "numeric": 28 + "numeric": 6 }, "original_item_tax_total": { - "numeric": 25 + "numeric": 33 }, "item_total": { - "numeric": 31 + "numeric": 43 }, "item_subtotal": { - "numeric": 49 + "numeric": 36 }, "item_tax_total": { - "numeric": 45 + "numeric": 0 }, "original_total": { - "numeric": 39 + "numeric": 29 }, "original_subtotal": { - "numeric": 30 - }, - "original_tax_total": { - "numeric": 7 - }, - "total": { - "numeric": 21 - }, - "subtotal": { - "numeric": 19 - }, - "tax_total": { - "numeric": 29 - }, - "discount_subtotal": { - "numeric": 29 - }, - "discount_total": { - "numeric": 50 - }, - "discount_tax_total": { - "numeric": 20 - }, - "gift_card_total": { - "numeric": 2 - }, - "gift_card_tax_total": { - "numeric": 4 - }, - "shipping_total": { "numeric": 14 }, + "original_tax_total": { + "numeric": 29 + }, + "total": { + "numeric": 50 + }, + "subtotal": { + "numeric": 25 + }, + "tax_total": { + "numeric": 42 + }, + "discount_subtotal": { + "numeric": 0 + }, + "discount_total": { + "numeric": 27 + }, + "discount_tax_total": { + "numeric": 11 + }, + "gift_card_total": { + "numeric": 26 + }, + "gift_card_tax_total": { + "numeric": 29 + }, + "shipping_total": { + "numeric": 2 + }, "shipping_subtotal": { - "numeric": 23 + "numeric": 25 }, "shipping_tax_total": { - "numeric": 37 + "numeric": 34 }, "original_shipping_total": { - "numeric": 16 + "numeric": 11 }, "original_shipping_subtotal": { - "numeric": 32 + "numeric": 21 }, "original_shipping_tax_total": { - "numeric": 24 + "numeric": 36 } }, "orderChange": { - "id": "id_01oZFIMHARS", - "version": 3, + "id": "id_832lxI0JkyAVu", + "version": 12, "order_id": "{value}", "return_id": "{value}", "exchange_id": "{value}", "claim_id": "{value}", "order": { - "id": "id_vINkargW3Y0EK9reie9", - "version": 31, - "display_id": 31, - "status": "draft", + "id": "id_mWpkrYL5KoC2D7lt", + "version": 32, + "display_id": 42, + "status": "requires_action", "currency_code": "{value}", - "created_at": "2025-10-01T11:26:10.015Z", - "updated_at": "2025-05-29T21:07:27.908Z", + "created_at": "2025-03-30T08:19:59.988Z", + "updated_at": "2025-03-12T19:15:04.772Z", "original_item_total": { - "numeric": 40 + "numeric": 45 }, "original_item_subtotal": { - "numeric": 19 + "numeric": 42 }, "original_item_tax_total": { - "numeric": 10 - }, - "item_total": { - "numeric": 44 - }, - "item_subtotal": { - "numeric": 39 - }, - "item_tax_total": { - "numeric": 14 - }, - "original_total": { - "numeric": 38 - }, - "original_subtotal": { - "numeric": 30 - }, - "original_tax_total": { - "numeric": 4 - }, - "total": { - "numeric": 4 - }, - "subtotal": { - "numeric": 21 - }, - "tax_total": { - "numeric": 20 - }, - "discount_subtotal": { - "numeric": 3 - }, - "discount_total": { - "numeric": 30 - }, - "discount_tax_total": { "numeric": 17 }, - "gift_card_total": { - "numeric": 29 + "item_total": { + "numeric": 0 }, - "gift_card_tax_total": { - "numeric": 20 + "item_subtotal": { + "numeric": 37 }, - "shipping_total": { - "numeric": 50 - }, - "shipping_subtotal": { - "numeric": 36 - }, - "shipping_tax_total": { + "item_tax_total": { "numeric": 19 }, + "original_total": { + "numeric": 0 + }, + "original_subtotal": { + "numeric": 13 + }, + "original_tax_total": { + "numeric": 19 + }, + "total": { + "numeric": 2 + }, + "subtotal": { + "numeric": 6 + }, + "tax_total": { + "numeric": 31 + }, + "discount_subtotal": { + "numeric": 26 + }, + "discount_total": { + "numeric": 29 + }, + "discount_tax_total": { + "numeric": 5 + }, + "gift_card_total": { + "numeric": 34 + }, + "gift_card_tax_total": { + "numeric": 46 + }, + "shipping_total": { + "numeric": 47 + }, + "shipping_subtotal": { + "numeric": 11 + }, + "shipping_tax_total": { + "numeric": 24 + }, "original_shipping_total": { - "numeric": 44 + "numeric": 49 }, "original_shipping_subtotal": { - "numeric": 14 + "numeric": 46 }, "original_shipping_tax_total": { - "numeric": 30 + "numeric": 27 } }, "return_order": { - "id": "id_kAyppqwRh2O", - "status": "requested", + "id": "id_4NYL1s7N4waj3sBeTo", + "status": "canceled", "order_id": "{value}", "items": [{ - "id": "id_T9TT4zC1hWRi8X0r0", + "id": "id_8rxufvO6jiKDWLeiR", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 49 + "quantity": 34 }], - "display_id": 22, + "display_id": 4, "metadata": {} }, "exchange": { - "id": "id_9Y2Vpd3XEIO5f7", + "id": "id_oEiofF8mCdl80", "order_id": "{value}", - "order_version": 32, - "display_id": 19, + "order_version": 2, + "display_id": 41, "additional_items": [ "{value}" ], "metadata": {} }, "claim": { - "id": "id_p1zwUZmwgPPuU7BEf", - "type": "replace", + "id": "id_MYzYurElRsrYU0N", + "type": "refund", "order_id": "{value}", - "order_version": 31, - "display_id": 14, + "order_version": 26, + "display_id": 20, "claim_items": [ "{value}" ], @@ -223,7 +223,7 @@ const myWorkflow = createWorkflow( "metadata": {} }, "actions": [{ - "id": "id_0a6d5cNzxhIms", + "id": "id_PrKGUJTgdd3pUgtueIeK", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -233,11 +233,11 @@ const myWorkflow = createWorkflow( "order": {}, "reference": "{value}", "reference_id": "{value}", - "action": "REINSTATE_ITEM", + "action": "SHIP_ITEM", "details": {}, "internal_note": {}, - "created_at": "2026-01-10T23:12:16.756Z", - "updated_at": "2025-07-01T22:09:42.213Z" + "created_at": "2025-11-05T05:48:38.593Z", + "updated_at": "2025-11-10T19:52:47.319Z" }], "status": "pending", "requested_by": {}, @@ -250,8 +250,8 @@ const myWorkflow = createWorkflow( "declined_at": {}, "canceled_by": {}, "canceled_at": {}, - "created_at": "2025-12-02T12:05:00.621Z", - "updated_at": "2025-07-02T03:35:02.856Z" + "created_at": "2025-07-25T03:11:59.657Z", + "updated_at": "2025-06-30T22:24:11.640Z" } }) } diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.requestOrderEditRequestWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.requestOrderEditRequestWorkflow/page.mdx index 286134c359..d22b7fe096 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.requestOrderEditRequestWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.requestOrderEditRequestWorkflow/page.mdx @@ -17,27 +17,9 @@ This workflow requests an order edit request. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { requestOrderEditRequestWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = requestOrderEditRequestWorkflow - .runAsStep({ - input: { - "order_id": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -115,6 +97,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { requestOrderEditRequestWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = requestOrderEditRequestWorkflow + .runAsStep({ + input: { + "order_id": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.requestOrderTransferValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.requestOrderTransferValidationStep/page.mdx index d8967deeb2..7be162ef12 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.requestOrderTransferValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.requestOrderTransferValidationStep/page.mdx @@ -22,86 +22,86 @@ const myWorkflow = createWorkflow( () => { const data = requestOrderTransferValidationStep({ "order": { - "id": "id_2R7RfEDmVr0", - "version": 40, - "display_id": 0, - "status": "completed", + "id": "id_vMn1tmMYbX66SmM6c", + "version": 25, + "display_id": 43, + "status": "requires_action", "currency_code": "{value}", - "created_at": "2025-12-05T18:20:53.076Z", - "updated_at": "2026-01-01T07:56:21.591Z", + "created_at": "2025-03-08T18:49:11.540Z", + "updated_at": "2025-06-10T14:31:14.111Z", "original_item_total": { - "numeric": 50 + "numeric": 41 }, "original_item_subtotal": { - "numeric": 2 + "numeric": 46 }, "original_item_tax_total": { - "numeric": 1 + "numeric": 32 }, "item_total": { - "numeric": 49 + "numeric": 10 }, "item_subtotal": { - "numeric": 37 + "numeric": 13 }, "item_tax_total": { - "numeric": 29 + "numeric": 6 }, "original_total": { - "numeric": 0 + "numeric": 45 }, "original_subtotal": { - "numeric": 42 + "numeric": 14 }, "original_tax_total": { - "numeric": 16 + "numeric": 48 }, "total": { - "numeric": 38 + "numeric": 24 }, "subtotal": { - "numeric": 40 + "numeric": 15 }, "tax_total": { - "numeric": 42 + "numeric": 49 }, "discount_subtotal": { - "numeric": 40 + "numeric": 39 }, "discount_total": { - "numeric": 34 + "numeric": 38 }, "discount_tax_total": { - "numeric": 12 + "numeric": 34 }, "gift_card_total": { - "numeric": 30 + "numeric": 7 }, "gift_card_tax_total": { - "numeric": 4 + "numeric": 50 }, "shipping_total": { - "numeric": 1 + "numeric": 49 }, "shipping_subtotal": { - "numeric": 0 + "numeric": 3 }, "shipping_tax_total": { - "numeric": 28 + "numeric": 15 }, "original_shipping_total": { - "numeric": 12 + "numeric": 32 }, "original_shipping_subtotal": { - "numeric": 11 + "numeric": 22 }, "original_shipping_tax_total": { - "numeric": 11 + "numeric": 45 } }, "customer": { - "id": "id_dGedFtVWMoTQu0Zv1", - "email": "Brennon.Blanda@yahoo.com", + "id": "id_xwXsv2tlR8O6kYbgeLF", + "email": "Elisha_Murazik65@gmail.com", "has_account": false, "default_billing_address_id": {}, "default_shipping_address_id": {}, @@ -109,23 +109,23 @@ const myWorkflow = createWorkflow( "first_name": {}, "last_name": {}, "addresses": [{ - "id": "id_ItauiQIa7Sf1GgG", + "id": "id_ETohK0EMZiTnM4e", "is_default_shipping": false, "is_default_billing": true, "customer_id": "{value}", - "created_at": "2025-05-06T18:59:02.054Z", - "updated_at": "2025-12-06T08:26:31.590Z" + "created_at": "2025-07-29T14:20:08.462Z", + "updated_at": "2025-11-25T21:05:42.562Z" }], "phone": {}, "groups": [{ - "id": "id_CtG6y11yAA25", - "name": "Bruce" + "id": "id_v0JzrdpBxwPBtM", + "name": "Donato" }], "metadata": "{value}", "created_by": {}, "deleted_at": {}, - "created_at": "2025-09-26T08:34:36.447Z", - "updated_at": "2025-10-04T12:02:18.229Z" + "created_at": "2025-06-14T17:24:32.808Z", + "updated_at": "2025-08-13T13:28:07.893Z" } }) } diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.requestOrderTransferWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.requestOrderTransferWorkflow/page.mdx index 6983d21c00..cb8215cd4b 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.requestOrderTransferWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.requestOrderTransferWorkflow/page.mdx @@ -21,29 +21,9 @@ If customer requested the transfer `input.logged_in_user === input.customer_id`. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { requestOrderTransferWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = requestOrderTransferWorkflow - .runAsStep({ - input: { - "order_id": "{value}", - "customer_id": "{value}", - "logged_in_user": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -127,6 +107,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { requestOrderTransferWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = requestOrderTransferWorkflow + .runAsStep({ + input: { + "order_id": "{value}", + "customer_id": "{value}", + "logged_in_user": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.throwUnlessPaymentCollectionNotPaid/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.throwUnlessPaymentCollectionNotPaid/page.mdx index 7c720c9286..9c31e200ea 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.throwUnlessPaymentCollectionNotPaid/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.throwUnlessPaymentCollectionNotPaid/page.mdx @@ -22,16 +22,16 @@ const myWorkflow = createWorkflow( () => { const data = throwUnlessPaymentCollectionNotPaid({ "paymentCollection": { - "id": "id_O4CUjvPLUnW", + "id": "id_BwFtlWJ4wLE", "currency_code": "{value}", "region_id": "{value}", "amount": { - "numeric": 34 + "numeric": 42 }, - "status": "authorized", + "status": "partially_authorized", "payment_providers": [{ - "id": "id_tIc72A6Wf94Z", - "is_enabled": true + "id": "id_b2wkxqqOqfLQtbWozF", + "is_enabled": false }] } }) diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.throwUnlessStatusIsNotPaid/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.throwUnlessStatusIsNotPaid/page.mdx index cd11f66950..fc42f73ef3 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.throwUnlessStatusIsNotPaid/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.throwUnlessStatusIsNotPaid/page.mdx @@ -22,15 +22,15 @@ const myWorkflow = createWorkflow( () => { const data = throwUnlessStatusIsNotPaid({ "paymentCollection": { - "id": "id_pqL7WnOdXGcuSK853Q", + "id": "id_2PYZrYFHGsH", "currency_code": "{value}", "region_id": "{value}", "amount": { - "numeric": 38 + "numeric": 5 }, - "status": "awaiting", + "status": "canceled", "payment_providers": [{ - "id": "id_rNOYKkIiXbmN2ET773d", + "id": "id_YpI79KHMjuyORy", "is_enabled": true }] } diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateClaimAddItemValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateClaimAddItemValidationStep/page.mdx index f6f8aaef47..4aac71ad7e 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateClaimAddItemValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateClaimAddItemValidationStep/page.mdx @@ -22,89 +22,89 @@ const myWorkflow = createWorkflow( () => { const data = updateClaimAddItemValidationStep({ "order": { - "id": "id_iLxmQG80rR", - "version": 44, - "display_id": 15, - "status": "canceled", + "id": "id_LF5JiW0TPri", + "version": 32, + "display_id": 18, + "status": "pending", "currency_code": "{value}", - "created_at": "2025-10-08T16:08:36.637Z", - "updated_at": "2025-07-20T05:53:36.893Z", + "created_at": "2025-06-01T05:25:33.649Z", + "updated_at": "2025-07-23T11:11:39.309Z", "original_item_total": { - "numeric": 3 + "numeric": 5 }, "original_item_subtotal": { - "numeric": 12 + "numeric": 34 }, "original_item_tax_total": { - "numeric": 11 + "numeric": 48 }, "item_total": { - "numeric": 2 + "numeric": 29 }, "item_subtotal": { - "numeric": 3 + "numeric": 34 }, "item_tax_total": { - "numeric": 19 - }, - "original_total": { - "numeric": 37 - }, - "original_subtotal": { - "numeric": 40 - }, - "original_tax_total": { "numeric": 2 }, - "total": { + "original_total": { + "numeric": 21 + }, + "original_subtotal": { + "numeric": 26 + }, + "original_tax_total": { "numeric": 44 }, + "total": { + "numeric": 35 + }, "subtotal": { - "numeric": 18 + "numeric": 28 }, "tax_total": { - "numeric": 39 + "numeric": 24 }, "discount_subtotal": { - "numeric": 43 + "numeric": 16 }, "discount_total": { - "numeric": 10 - }, - "discount_tax_total": { - "numeric": 15 - }, - "gift_card_total": { - "numeric": 41 - }, - "gift_card_tax_total": { "numeric": 8 }, + "discount_tax_total": { + "numeric": 9 + }, + "gift_card_total": { + "numeric": 32 + }, + "gift_card_tax_total": { + "numeric": 11 + }, "shipping_total": { - "numeric": 4 - }, - "shipping_subtotal": { - "numeric": 20 - }, - "shipping_tax_total": { "numeric": 15 }, - "original_shipping_total": { - "numeric": 31 - }, - "original_shipping_subtotal": { + "shipping_subtotal": { "numeric": 7 }, + "shipping_tax_total": { + "numeric": 25 + }, + "original_shipping_total": { + "numeric": 22 + }, + "original_shipping_subtotal": { + "numeric": 13 + }, "original_shipping_tax_total": { - "numeric": 1 + "numeric": 12 } }, "orderClaim": { - "id": "id_SCu6ByJpQGpPwQ", + "id": "id_bikCV9WHxchhQljs4", "type": "replace", "order_id": "{value}", - "order_version": 34, - "display_id": 45, + "order_version": 50, + "display_id": 30, "claim_items": [ "{value}" ], @@ -114,120 +114,120 @@ const myWorkflow = createWorkflow( "metadata": {} }, "orderChange": { - "id": "id_zNwQZMKkFTlTy7AJY2F", - "version": 11, + "id": "id_Z0s1ILYnlvd26z", + "version": 15, "order_id": "{value}", "return_id": "{value}", "exchange_id": "{value}", "claim_id": "{value}", "order": { - "id": "id_0cPfw0BYjmWaEYCJ0tL", - "version": 31, - "display_id": 23, - "status": "pending", + "id": "id_AJIBkWRbroVf8Ah5B", + "version": 0, + "display_id": 25, + "status": "completed", "currency_code": "{value}", - "created_at": "2025-07-20T06:03:34.936Z", - "updated_at": "2025-11-06T13:08:47.306Z", + "created_at": "2025-03-21T09:50:09.530Z", + "updated_at": "2025-10-03T02:22:53.373Z", "original_item_total": { - "numeric": 4 + "numeric": 36 }, "original_item_subtotal": { - "numeric": 40 + "numeric": 41 }, "original_item_tax_total": { - "numeric": 30 + "numeric": 43 }, "item_total": { "numeric": 50 }, "item_subtotal": { - "numeric": 22 + "numeric": 49 }, "item_tax_total": { - "numeric": 27 + "numeric": 15 }, "original_total": { - "numeric": 43 + "numeric": 9 }, "original_subtotal": { - "numeric": 13 + "numeric": 1 }, "original_tax_total": { - "numeric": 50 + "numeric": 17 }, "total": { - "numeric": 36 + "numeric": 23 }, "subtotal": { - "numeric": 7 + "numeric": 25 }, "tax_total": { - "numeric": 24 + "numeric": 38 }, "discount_subtotal": { - "numeric": 43 + "numeric": 10 }, "discount_total": { - "numeric": 27 + "numeric": 11 }, "discount_tax_total": { - "numeric": 13 + "numeric": 44 }, "gift_card_total": { - "numeric": 5 + "numeric": 12 }, "gift_card_tax_total": { - "numeric": 30 + "numeric": 16 }, "shipping_total": { - "numeric": 50 + "numeric": 8 }, "shipping_subtotal": { - "numeric": 7 + "numeric": 33 }, "shipping_tax_total": { "numeric": 21 }, "original_shipping_total": { - "numeric": 34 + "numeric": 47 }, "original_shipping_subtotal": { - "numeric": 10 + "numeric": 9 }, "original_shipping_tax_total": { - "numeric": 19 + "numeric": 31 } }, "return_order": { - "id": "id_3vQLhqALMvpjv9KI7", - "status": "requested", + "id": "id_n5xxUMv8PtY1hHLfv", + "status": "received", "order_id": "{value}", "items": [{ - "id": "id_JkMFJITrs2aLlym", + "id": "id_pr0M05RKwX", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", "quantity": 15 }], - "display_id": 11, + "display_id": 26, "metadata": {} }, "exchange": { - "id": "id_2RoWXMkEZhVIac3", + "id": "id_WuGEbg6qFkCZVTI1q", "order_id": "{value}", - "order_version": 38, - "display_id": 33, + "order_version": 50, + "display_id": 28, "additional_items": [ "{value}" ], "metadata": {} }, "claim": { - "id": "id_ryFUTtEN06A0yBONk", - "type": "replace", + "id": "id_1wnF0ybLP6ouyDOIf7m", + "type": "refund", "order_id": "{value}", - "order_version": 14, - "display_id": 44, + "order_version": 18, + "display_id": 5, "claim_items": [ "{value}" ], @@ -237,7 +237,7 @@ const myWorkflow = createWorkflow( "metadata": {} }, "actions": [{ - "id": "id_kx4Wo51jEhHKJo", + "id": "id_ph02l9BNoQg9T1C", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -247,13 +247,13 @@ const myWorkflow = createWorkflow( "order": {}, "reference": "{value}", "reference_id": "{value}", - "action": "ITEM_REMOVE", + "action": "WRITE_OFF_ITEM", "details": {}, "internal_note": {}, - "created_at": "2025-08-05T19:35:48.076Z", - "updated_at": "2025-05-31T14:19:59.391Z" + "created_at": "2025-05-26T02:18:18.848Z", + "updated_at": "2025-12-26T21:47:50.747Z" }], - "status": "canceled", + "status": "requested", "requested_by": {}, "requested_at": {}, "confirmed_by": {}, @@ -264,8 +264,8 @@ const myWorkflow = createWorkflow( "declined_at": {}, "canceled_by": {}, "canceled_at": {}, - "created_at": "2025-03-09T05:25:56.228Z", - "updated_at": "2025-04-15T02:04:01.258Z" + "created_at": "2025-05-27T16:23:19.893Z", + "updated_at": "2025-10-31T07:52:39.049Z" }, "input": { "claim_id": "{value}", diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateClaimAddItemWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateClaimAddItemWorkflow/page.mdx index b1813587c6..dff1a84284 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateClaimAddItemWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateClaimAddItemWorkflow/page.mdx @@ -17,29 +17,9 @@ This workflow updates a claim's new item. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updateClaimAddItemWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updateClaimAddItemWorkflow - .runAsStep({ - input: { - "claim_id": "{value}", - "action_id": "{value}", - "data": {} - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -123,6 +103,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updateClaimAddItemWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updateClaimAddItemWorkflow + .runAsStep({ + input: { + "claim_id": "{value}", + "action_id": "{value}", + "data": {} + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateClaimItemValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateClaimItemValidationStep/page.mdx index ef0444b82f..92ba938a5b 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateClaimItemValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateClaimItemValidationStep/page.mdx @@ -22,89 +22,89 @@ const myWorkflow = createWorkflow( () => { const data = updateClaimItemValidationStep({ "order": { - "id": "id_rxQEDo4SFYd4nfrYoz", - "version": 9, - "display_id": 4, - "status": "canceled", + "id": "id_RyimRIYeLFVgJuyzWj", + "version": 11, + "display_id": 16, + "status": "archived", "currency_code": "{value}", - "created_at": "2025-12-17T04:55:20.949Z", - "updated_at": "2026-01-13T11:41:24.030Z", + "created_at": "2025-12-14T01:30:26.522Z", + "updated_at": "2025-08-16T07:35:03.244Z", "original_item_total": { - "numeric": 38 + "numeric": 20 }, "original_item_subtotal": { - "numeric": 18 + "numeric": 31 }, "original_item_tax_total": { - "numeric": 16 + "numeric": 22 }, "item_total": { - "numeric": 38 - }, - "item_subtotal": { - "numeric": 6 - }, - "item_tax_total": { - "numeric": 46 - }, - "original_total": { "numeric": 28 }, + "item_subtotal": { + "numeric": 9 + }, + "item_tax_total": { + "numeric": 22 + }, + "original_total": { + "numeric": 0 + }, "original_subtotal": { - "numeric": 10 + "numeric": 21 }, "original_tax_total": { - "numeric": 7 + "numeric": 20 }, "total": { - "numeric": 8 + "numeric": 1 }, "subtotal": { - "numeric": 32 - }, - "tax_total": { - "numeric": 29 - }, - "discount_subtotal": { - "numeric": 39 - }, - "discount_total": { - "numeric": 34 - }, - "discount_tax_total": { - "numeric": 25 - }, - "gift_card_total": { - "numeric": 9 - }, - "gift_card_tax_total": { - "numeric": 40 - }, - "shipping_total": { - "numeric": 34 - }, - "shipping_subtotal": { "numeric": 42 }, + "tax_total": { + "numeric": 1 + }, + "discount_subtotal": { + "numeric": 28 + }, + "discount_total": { + "numeric": 42 + }, + "discount_tax_total": { + "numeric": 45 + }, + "gift_card_total": { + "numeric": 8 + }, + "gift_card_tax_total": { + "numeric": 9 + }, + "shipping_total": { + "numeric": 3 + }, + "shipping_subtotal": { + "numeric": 6 + }, "shipping_tax_total": { - "numeric": 2 + "numeric": 16 }, "original_shipping_total": { - "numeric": 50 + "numeric": 40 }, "original_shipping_subtotal": { - "numeric": 41 + "numeric": 17 }, "original_shipping_tax_total": { - "numeric": 9 + "numeric": 6 } }, "orderClaim": { - "id": "id_S15h0egekYBtbyGHRMhT", - "type": "refund", + "id": "id_aRiv0eBGHtet", + "type": "replace", "order_id": "{value}", - "order_version": 14, - "display_id": 17, + "order_version": 22, + "display_id": 7, "claim_items": [ "{value}" ], @@ -114,120 +114,120 @@ const myWorkflow = createWorkflow( "metadata": {} }, "orderChange": { - "id": "id_3BzKFkKCnxAi", - "version": 4, + "id": "id_xW2TYmdtKk05lM1p", + "version": 15, "order_id": "{value}", "return_id": "{value}", "exchange_id": "{value}", "claim_id": "{value}", "order": { - "id": "id_Pbacjqz02f", - "version": 32, - "display_id": 14, - "status": "completed", + "id": "id_thVutDXzAxAg", + "version": 36, + "display_id": 42, + "status": "requires_action", "currency_code": "{value}", - "created_at": "2025-09-07T13:32:45.562Z", - "updated_at": "2025-06-14T07:50:13.347Z", + "created_at": "2025-11-27T21:20:43.543Z", + "updated_at": "2025-06-08T15:23:23.668Z", "original_item_total": { - "numeric": 42 - }, - "original_item_subtotal": { - "numeric": 43 - }, - "original_item_tax_total": { - "numeric": 32 - }, - "item_total": { - "numeric": 24 - }, - "item_subtotal": { - "numeric": 11 - }, - "item_tax_total": { - "numeric": 15 - }, - "original_total": { - "numeric": 47 - }, - "original_subtotal": { - "numeric": 2 - }, - "original_tax_total": { - "numeric": 39 - }, - "total": { - "numeric": 22 - }, - "subtotal": { - "numeric": 18 - }, - "tax_total": { - "numeric": 31 - }, - "discount_subtotal": { - "numeric": 38 - }, - "discount_total": { - "numeric": 7 - }, - "discount_tax_total": { "numeric": 49 }, - "gift_card_total": { - "numeric": 37 + "original_item_subtotal": { + "numeric": 22 }, - "gift_card_tax_total": { - "numeric": 0 + "original_item_tax_total": { + "numeric": 20 }, - "shipping_total": { + "item_total": { "numeric": 15 }, - "shipping_subtotal": { + "item_subtotal": { + "numeric": 24 + }, + "item_tax_total": { + "numeric": 48 + }, + "original_total": { "numeric": 2 }, - "shipping_tax_total": { - "numeric": 18 + "original_subtotal": { + "numeric": 4 }, - "original_shipping_total": { - "numeric": 45 + "original_tax_total": { + "numeric": 49 }, - "original_shipping_subtotal": { + "total": { + "numeric": 3 + }, + "subtotal": { + "numeric": 25 + }, + "tax_total": { + "numeric": 27 + }, + "discount_subtotal": { + "numeric": 23 + }, + "discount_total": { + "numeric": 29 + }, + "discount_tax_total": { + "numeric": 34 + }, + "gift_card_total": { + "numeric": 13 + }, + "gift_card_tax_total": { + "numeric": 3 + }, + "shipping_total": { + "numeric": 4 + }, + "shipping_subtotal": { "numeric": 38 }, + "shipping_tax_total": { + "numeric": 42 + }, + "original_shipping_total": { + "numeric": 27 + }, + "original_shipping_subtotal": { + "numeric": 37 + }, "original_shipping_tax_total": { - "numeric": 20 + "numeric": 25 } }, "return_order": { - "id": "id_lvvYPh0ZpmR2lqLPB", - "status": "partially_received", + "id": "id_79xjN2ZDK7", + "status": "canceled", "order_id": "{value}", "items": [{ - "id": "id_7qWqSF6LjGvImb54kkm", + "id": "id_DSpT8lQpt9T", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 20 + "quantity": 11 }], - "display_id": 45, + "display_id": 13, "metadata": {} }, "exchange": { - "id": "id_ExW7ncQJMN", + "id": "id_oe9Nnji6a95nbw", "order_id": "{value}", - "order_version": 42, - "display_id": 19, + "order_version": 45, + "display_id": 23, "additional_items": [ "{value}" ], "metadata": {} }, "claim": { - "id": "id_9jVtYRZpuyeABu", - "type": "refund", + "id": "id_TPWI6cYUv6hwdpU2B4", + "type": "replace", "order_id": "{value}", - "order_version": 30, - "display_id": 31, + "order_version": 49, + "display_id": 0, "claim_items": [ "{value}" ], @@ -237,7 +237,7 @@ const myWorkflow = createWorkflow( "metadata": {} }, "actions": [{ - "id": "id_65xxrfuLAnVfb9E", + "id": "id_EDGRgHck7krboC2", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -250,10 +250,10 @@ const myWorkflow = createWorkflow( "action": "CREDIT_LINE_ADD", "details": {}, "internal_note": {}, - "created_at": "2025-10-20T18:35:52.545Z", - "updated_at": "2025-02-24T22:01:36.647Z" + "created_at": "2025-09-17T06:37:28.730Z", + "updated_at": "2025-05-13T15:17:06.007Z" }], - "status": "confirmed", + "status": "requested", "requested_by": {}, "requested_at": {}, "confirmed_by": {}, @@ -264,8 +264,8 @@ const myWorkflow = createWorkflow( "declined_at": {}, "canceled_by": {}, "canceled_at": {}, - "created_at": "2026-01-12T06:20:12.928Z", - "updated_at": "2025-11-02T14:24:53.357Z" + "created_at": "2025-12-29T16:54:14.255Z", + "updated_at": "2026-01-09T16:34:47.358Z" }, "input": { "claim_id": "{value}", diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateClaimItemWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateClaimItemWorkflow/page.mdx index 1799adebe5..0ecd5d1d95 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateClaimItemWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateClaimItemWorkflow/page.mdx @@ -17,29 +17,9 @@ This workflow updates a claim item. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updateClaimItemWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updateClaimItemWorkflow - .runAsStep({ - input: { - "claim_id": "{value}", - "action_id": "{value}", - "data": {} - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -123,6 +103,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updateClaimItemWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updateClaimItemWorkflow + .runAsStep({ + input: { + "claim_id": "{value}", + "action_id": "{value}", + "data": {} + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateClaimShippingMethodValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateClaimShippingMethodValidationStep/page.mdx index 8aaa1ea270..45ff54efd5 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateClaimShippingMethodValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateClaimShippingMethodValidationStep/page.mdx @@ -26,11 +26,11 @@ const myWorkflow = createWorkflow( "action_id": "{value}" }, "orderClaim": { - "id": "id_xKw28IyFjvsOFrV0U", - "type": "refund", + "id": "id_NMCXEfjccbfBj4e", + "type": "replace", "order_id": "{value}", - "order_version": 19, - "display_id": 45, + "order_version": 33, + "display_id": 1, "claim_items": [ "{value}" ], @@ -40,120 +40,120 @@ const myWorkflow = createWorkflow( "metadata": {} }, "orderChange": { - "id": "id_SzSigth7i938I", + "id": "id_yho7muKNq6S7EJpI", "version": 41, "order_id": "{value}", "return_id": "{value}", "exchange_id": "{value}", "claim_id": "{value}", "order": { - "id": "id_x1b5DZujkxBIJJFXLP2", - "version": 15, - "display_id": 44, - "status": "requires_action", + "id": "id_pTbtUL4dbmIDLhpo", + "version": 40, + "display_id": 20, + "status": "archived", "currency_code": "{value}", - "created_at": "2025-12-30T22:58:25.122Z", - "updated_at": "2025-09-26T06:02:58.313Z", + "created_at": "2025-11-28T03:29:30.312Z", + "updated_at": "2025-02-14T22:28:17.266Z", "original_item_total": { - "numeric": 4 + "numeric": 12 }, "original_item_subtotal": { - "numeric": 4 + "numeric": 2 }, "original_item_tax_total": { - "numeric": 27 - }, - "item_total": { - "numeric": 1 - }, - "item_subtotal": { - "numeric": 6 - }, - "item_tax_total": { - "numeric": 40 - }, - "original_total": { - "numeric": 22 - }, - "original_subtotal": { - "numeric": 30 - }, - "original_tax_total": { "numeric": 4 }, - "total": { - "numeric": 7 + "item_total": { + "numeric": 20 }, - "subtotal": { - "numeric": 5 + "item_subtotal": { + "numeric": 29 }, - "tax_total": { + "item_tax_total": { "numeric": 39 }, - "discount_subtotal": { - "numeric": 17 - }, - "discount_total": { - "numeric": 8 - }, - "discount_tax_total": { - "numeric": 6 - }, - "gift_card_total": { + "original_total": { "numeric": 0 }, + "original_subtotal": { + "numeric": 39 + }, + "original_tax_total": { + "numeric": 17 + }, + "total": { + "numeric": 1 + }, + "subtotal": { + "numeric": 40 + }, + "tax_total": { + "numeric": 42 + }, + "discount_subtotal": { + "numeric": 35 + }, + "discount_total": { + "numeric": 18 + }, + "discount_tax_total": { + "numeric": 0 + }, + "gift_card_total": { + "numeric": 41 + }, "gift_card_tax_total": { - "numeric": 44 + "numeric": 0 }, "shipping_total": { - "numeric": 6 + "numeric": 22 }, "shipping_subtotal": { - "numeric": 34 + "numeric": 23 }, "shipping_tax_total": { - "numeric": 47 + "numeric": 40 }, "original_shipping_total": { - "numeric": 44 + "numeric": 50 }, "original_shipping_subtotal": { - "numeric": 8 + "numeric": 1 }, "original_shipping_tax_total": { - "numeric": 25 + "numeric": 47 } }, "return_order": { - "id": "id_ZabfHBcM0YA5nG", - "status": "canceled", + "id": "id_sPI7IjSViEeG4LX0S9aJ", + "status": "partially_received", "order_id": "{value}", "items": [{ - "id": "id_LE2mq8dnUTH", + "id": "id_hwpXbrp5tDUB6", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 23 + "quantity": 40 }], - "display_id": 42, + "display_id": 14, "metadata": {} }, "exchange": { - "id": "id_bCjGDT08yGl8Bq5Eq9", + "id": "id_CUHphLTP8ehoa6guCHB", "order_id": "{value}", - "order_version": 36, - "display_id": 30, + "order_version": 39, + "display_id": 10, "additional_items": [ "{value}" ], "metadata": {} }, "claim": { - "id": "id_iyHulYrKJmGrlf", + "id": "id_Pp9nKO7bJ51fNx", "type": "refund", "order_id": "{value}", - "order_version": 34, - "display_id": 15, + "order_version": 48, + "display_id": 45, "claim_items": [ "{value}" ], @@ -163,7 +163,7 @@ const myWorkflow = createWorkflow( "metadata": {} }, "actions": [{ - "id": "id_M2S7HMWI5rpt5ZxJu", + "id": "id_U60j32wKffja", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -173,13 +173,13 @@ const myWorkflow = createWorkflow( "order": {}, "reference": "{value}", "reference_id": "{value}", - "action": "RETURN_ITEM", + "action": "WRITE_OFF_ITEM", "details": {}, "internal_note": {}, - "created_at": "2025-10-29T21:16:41.664Z", - "updated_at": "2025-12-08T04:22:29.288Z" + "created_at": "2025-09-19T15:01:10.282Z", + "updated_at": "2025-06-15T17:38:41.005Z" }], - "status": "canceled", + "status": "pending", "requested_by": {}, "requested_at": {}, "confirmed_by": {}, @@ -190,8 +190,8 @@ const myWorkflow = createWorkflow( "declined_at": {}, "canceled_by": {}, "canceled_at": {}, - "created_at": "2025-08-17T20:04:24.787Z", - "updated_at": "2025-05-26T00:40:29.230Z" + "created_at": "2025-10-27T00:00:26.556Z", + "updated_at": "2025-02-20T01:25:58.097Z" } }) } diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateClaimShippingMethodWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateClaimShippingMethodWorkflow/page.mdx index 4ae3e79421..cbff0183d2 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateClaimShippingMethodWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateClaimShippingMethodWorkflow/page.mdx @@ -17,29 +17,9 @@ This workflow updates a claim's shipping method. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updateClaimShippingMethodWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updateClaimShippingMethodWorkflow - .runAsStep({ - input: { - "claim_id": "{value}", - "action_id": "{value}", - "data": {} - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -123,6 +103,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updateClaimShippingMethodWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updateClaimShippingMethodWorkflow + .runAsStep({ + input: { + "claim_id": "{value}", + "action_id": "{value}", + "data": {} + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateExchangeAddItemValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateExchangeAddItemValidationStep/page.mdx index 86ceab7f66..6e42c61f12 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateExchangeAddItemValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateExchangeAddItemValidationStep/page.mdx @@ -22,208 +22,208 @@ const myWorkflow = createWorkflow( () => { const data = updateExchangeAddItemValidationStep({ "order": { - "id": "id_9nIxYYTY1xOehdqoqx", - "version": 34, - "display_id": 29, - "status": "archived", + "id": "id_eA9bNlrvxZsEdW4", + "version": 38, + "display_id": 37, + "status": "canceled", "currency_code": "{value}", - "created_at": "2025-03-31T05:03:12.927Z", - "updated_at": "2025-09-12T14:43:59.758Z", + "created_at": "2025-12-18T23:16:44.591Z", + "updated_at": "2025-01-26T22:47:15.651Z", "original_item_total": { - "numeric": 7 + "numeric": 5 }, "original_item_subtotal": { - "numeric": 1 + "numeric": 39 }, "original_item_tax_total": { - "numeric": 3 + "numeric": 33 }, "item_total": { - "numeric": 35 + "numeric": 45 }, "item_subtotal": { - "numeric": 38 + "numeric": 30 }, "item_tax_total": { - "numeric": 44 + "numeric": 27 }, "original_total": { - "numeric": 44 + "numeric": 45 }, "original_subtotal": { - "numeric": 38 + "numeric": 25 }, "original_tax_total": { - "numeric": 40 + "numeric": 16 }, "total": { - "numeric": 44 + "numeric": 11 }, "subtotal": { - "numeric": 18 + "numeric": 26 }, "tax_total": { - "numeric": 5 - }, - "discount_subtotal": { - "numeric": 6 - }, - "discount_total": { - "numeric": 24 - }, - "discount_tax_total": { - "numeric": 36 - }, - "gift_card_total": { - "numeric": 6 - }, - "gift_card_tax_total": { - "numeric": 10 - }, - "shipping_total": { "numeric": 20 }, + "discount_subtotal": { + "numeric": 14 + }, + "discount_total": { + "numeric": 6 + }, + "discount_tax_total": { + "numeric": 29 + }, + "gift_card_total": { + "numeric": 0 + }, + "gift_card_tax_total": { + "numeric": 31 + }, + "shipping_total": { + "numeric": 33 + }, "shipping_subtotal": { - "numeric": 36 + "numeric": 14 }, "shipping_tax_total": { - "numeric": 5 + "numeric": 14 }, "original_shipping_total": { - "numeric": 36 + "numeric": 11 }, "original_shipping_subtotal": { - "numeric": 4 + "numeric": 16 }, "original_shipping_tax_total": { - "numeric": 12 + "numeric": 35 } }, "orderExchange": { - "id": "id_fIW2522wFOMtmOmazO", + "id": "id_3rPAtynVVxDdVw", "order_id": "{value}", - "order_version": 15, - "display_id": 19, + "order_version": 48, + "display_id": 43, "additional_items": [ "{value}" ], "metadata": {} }, "orderChange": { - "id": "id_8h4ht6BTZgWs", - "version": 42, + "id": "id_ZCLbXCUkqlH5wVE6d2", + "version": 17, "order_id": "{value}", "return_id": "{value}", "exchange_id": "{value}", "claim_id": "{value}", "order": { - "id": "id_wc9wQyK1oJ", - "version": 31, - "display_id": 45, - "status": "completed", + "id": "id_gEcrQM1zvvbVR", + "version": 47, + "display_id": 49, + "status": "canceled", "currency_code": "{value}", - "created_at": "2025-05-21T07:10:01.575Z", - "updated_at": "2025-05-29T07:59:31.325Z", + "created_at": "2025-05-23T22:39:13.737Z", + "updated_at": "2025-04-19T19:36:44.453Z", "original_item_total": { - "numeric": 17 + "numeric": 21 }, "original_item_subtotal": { - "numeric": 27 + "numeric": 47 }, "original_item_tax_total": { - "numeric": 47 + "numeric": 49 }, "item_total": { - "numeric": 38 + "numeric": 50 }, "item_subtotal": { - "numeric": 27 + "numeric": 37 }, "item_tax_total": { - "numeric": 30 + "numeric": 5 }, "original_total": { - "numeric": 8 + "numeric": 36 }, "original_subtotal": { - "numeric": 47 + "numeric": 40 }, "original_tax_total": { - "numeric": 25 + "numeric": 43 }, "total": { - "numeric": 48 + "numeric": 7 }, "subtotal": { - "numeric": 21 + "numeric": 5 }, "tax_total": { "numeric": 44 }, "discount_subtotal": { - "numeric": 46 + "numeric": 20 }, "discount_total": { - "numeric": 1 + "numeric": 0 }, "discount_tax_total": { - "numeric": 7 + "numeric": 47 }, "gift_card_total": { - "numeric": 43 + "numeric": 7 }, "gift_card_tax_total": { - "numeric": 16 + "numeric": 42 }, "shipping_total": { - "numeric": 48 + "numeric": 21 }, "shipping_subtotal": { - "numeric": 48 + "numeric": 46 }, "shipping_tax_total": { - "numeric": 24 + "numeric": 19 }, "original_shipping_total": { - "numeric": 40 + "numeric": 28 }, "original_shipping_subtotal": { - "numeric": 39 + "numeric": 12 }, "original_shipping_tax_total": { - "numeric": 17 + "numeric": 29 } }, "return_order": { - "id": "id_6DAbJvzJx857n8jAN", - "status": "requested", + "id": "id_2sUZDK3r4VnXxCW", + "status": "partially_received", "order_id": "{value}", "items": [{ - "id": "id_bX6Cd2z7kIH", + "id": "id_GwmYO2nOpreFfqAcx", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 27 + "quantity": 22 }], - "display_id": 40, + "display_id": 4, "metadata": {} }, "exchange": { - "id": "id_9FBvB32fcQukMvvBPMMM", + "id": "id_wrCdtNdoV0EPfeGu3T0", "order_id": "{value}", - "order_version": 6, - "display_id": 37, + "order_version": 25, + "display_id": 36, "additional_items": [ "{value}" ], "metadata": {} }, "claim": { - "id": "id_BvZeABf5sGnGnk7Fir", - "type": "replace", + "id": "id_NhgNbpWm2zItbQ2kskfb", + "type": "refund", "order_id": "{value}", - "order_version": 1, - "display_id": 6, + "order_version": 6, + "display_id": 8, "claim_items": [ "{value}" ], @@ -233,7 +233,7 @@ const myWorkflow = createWorkflow( "metadata": {} }, "actions": [{ - "id": "id_DpTkNQEZppvgkQeFQ", + "id": "id_6poRcY4lKcB4XN", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -243,13 +243,13 @@ const myWorkflow = createWorkflow( "order": {}, "reference": "{value}", "reference_id": "{value}", - "action": "CANCEL_ITEM_FULFILLMENT", + "action": "TRANSFER_CUSTOMER", "details": {}, "internal_note": {}, - "created_at": "2025-02-28T19:24:04.892Z", - "updated_at": "2025-07-19T20:07:04.150Z" + "created_at": "2025-07-16T00:50:07.598Z", + "updated_at": "2025-05-19T02:44:51.783Z" }], - "status": "requested", + "status": "canceled", "requested_by": {}, "requested_at": {}, "confirmed_by": {}, @@ -260,8 +260,8 @@ const myWorkflow = createWorkflow( "declined_at": {}, "canceled_by": {}, "canceled_at": {}, - "created_at": "2025-10-17T20:16:48.321Z", - "updated_at": "2025-03-12T09:50:08.564Z" + "created_at": "2026-01-06T12:56:58.517Z", + "updated_at": "2025-07-26T14:46:32.501Z" }, "input": { "exchange_id": "{value}", diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateExchangeAddItemWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateExchangeAddItemWorkflow/page.mdx index 78fff8d411..687b571079 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateExchangeAddItemWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateExchangeAddItemWorkflow/page.mdx @@ -17,29 +17,9 @@ This workflow updates a new item in the exchange. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updateExchangeAddItemWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updateExchangeAddItemWorkflow - .runAsStep({ - input: { - "exchange_id": "{value}", - "action_id": "{value}", - "data": {} - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -123,6 +103,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updateExchangeAddItemWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updateExchangeAddItemWorkflow + .runAsStep({ + input: { + "exchange_id": "{value}", + "action_id": "{value}", + "data": {} + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateExchangeShippingMethodValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateExchangeShippingMethodValidationStep/page.mdx index d52f6bd263..72cdf9507a 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateExchangeShippingMethodValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateExchangeShippingMethodValidationStep/page.mdx @@ -26,130 +26,130 @@ const myWorkflow = createWorkflow( "action_id": "{value}" }, "orderExchange": { - "id": "id_JfaWS3S8RqKur7J", + "id": "id_tiXLD0tKgw", "order_id": "{value}", - "order_version": 45, - "display_id": 41, + "order_version": 33, + "display_id": 10, "additional_items": [ "{value}" ], "metadata": {} }, "orderChange": { - "id": "id_Hhr5jI66kwfHXE", - "version": 23, + "id": "id_I8vlvmbzpFZyM6ovMqD", + "version": 11, "order_id": "{value}", "return_id": "{value}", "exchange_id": "{value}", "claim_id": "{value}", "order": { - "id": "id_S4XGU9F1EY5GPf3w8Re", - "version": 35, - "display_id": 6, - "status": "canceled", + "id": "id_iZcAC27AcdWwgQBP", + "version": 28, + "display_id": 39, + "status": "archived", "currency_code": "{value}", - "created_at": "2025-05-28T02:34:00.413Z", - "updated_at": "2025-06-01T09:49:36.302Z", + "created_at": "2025-12-08T14:15:08.077Z", + "updated_at": "2025-02-05T01:12:44.461Z", "original_item_total": { - "numeric": 48 + "numeric": 46 }, "original_item_subtotal": { - "numeric": 15 + "numeric": 37 }, "original_item_tax_total": { - "numeric": 25 + "numeric": 40 }, "item_total": { - "numeric": 50 + "numeric": 19 }, "item_subtotal": { - "numeric": 8 + "numeric": 42 }, "item_tax_total": { - "numeric": 49 + "numeric": 21 }, "original_total": { - "numeric": 33 + "numeric": 21 }, "original_subtotal": { - "numeric": 36 + "numeric": 49 }, "original_tax_total": { - "numeric": 40 + "numeric": 41 }, "total": { "numeric": 37 }, "subtotal": { - "numeric": 47 - }, - "tax_total": { - "numeric": 8 - }, - "discount_subtotal": { "numeric": 26 }, + "tax_total": { + "numeric": 27 + }, + "discount_subtotal": { + "numeric": 8 + }, "discount_total": { - "numeric": 46 + "numeric": 40 }, "discount_tax_total": { - "numeric": 36 + "numeric": 21 }, "gift_card_total": { - "numeric": 13 + "numeric": 2 }, "gift_card_tax_total": { - "numeric": 0 + "numeric": 43 }, "shipping_total": { - "numeric": 16 + "numeric": 9 }, "shipping_subtotal": { - "numeric": 17 + "numeric": 9 }, "shipping_tax_total": { - "numeric": 30 + "numeric": 28 }, "original_shipping_total": { - "numeric": 38 + "numeric": 18 }, "original_shipping_subtotal": { "numeric": 9 }, "original_shipping_tax_total": { - "numeric": 26 + "numeric": 30 } }, "return_order": { - "id": "id_WzppHVpxNBW", - "status": "canceled", + "id": "id_onImZHlFQ7", + "status": "requested", "order_id": "{value}", "items": [{ - "id": "id_kdY0YINVO8LW", + "id": "id_bpadov0Evqg86WM", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 49 + "quantity": 19 }], - "display_id": 9, + "display_id": 50, "metadata": {} }, "exchange": { - "id": "id_In790bj1UCyq7", + "id": "id_eFawYg28XycqSYLWBHF7", "order_id": "{value}", - "order_version": 17, - "display_id": 6, + "order_version": 45, + "display_id": 21, "additional_items": [ "{value}" ], "metadata": {} }, "claim": { - "id": "id_sd1lI8eSN5Uq7R", - "type": "refund", + "id": "id_rFtoaidmPqxGsA", + "type": "replace", "order_id": "{value}", - "order_version": 24, - "display_id": 2, + "order_version": 35, + "display_id": 4, "claim_items": [ "{value}" ], @@ -159,7 +159,7 @@ const myWorkflow = createWorkflow( "metadata": {} }, "actions": [{ - "id": "id_I9B2c18rgVAXok5w", + "id": "id_XVxnm7wYjSawA", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -169,11 +169,11 @@ const myWorkflow = createWorkflow( "order": {}, "reference": "{value}", "reference_id": "{value}", - "action": "RETURN_ITEM", + "action": "CANCEL_ITEM_FULFILLMENT", "details": {}, "internal_note": {}, - "created_at": "2025-08-16T15:32:25.249Z", - "updated_at": "2025-10-20T07:47:26.196Z" + "created_at": "2025-07-13T09:30:21.864Z", + "updated_at": "2026-01-06T01:12:55.930Z" }], "status": "canceled", "requested_by": {}, @@ -186,8 +186,8 @@ const myWorkflow = createWorkflow( "declined_at": {}, "canceled_by": {}, "canceled_at": {}, - "created_at": "2025-09-08T21:16:14.449Z", - "updated_at": "2025-04-22T20:52:08.872Z" + "created_at": "2025-03-15T12:16:35.330Z", + "updated_at": "2025-05-15T21:42:31.786Z" } }) } diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateExchangeShippingMethodWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateExchangeShippingMethodWorkflow/page.mdx index fe3bad88e8..6b99bd781b 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateExchangeShippingMethodWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateExchangeShippingMethodWorkflow/page.mdx @@ -17,29 +17,9 @@ This workflow updates an exchange's shipping method. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updateExchangeShippingMethodWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updateExchangeShippingMethodWorkflow - .runAsStep({ - input: { - "exchange_id": "{value}", - "action_id": "{value}", - "data": {} - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -123,6 +103,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updateExchangeShippingMethodWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updateExchangeShippingMethodWorkflow + .runAsStep({ + input: { + "exchange_id": "{value}", + "action_id": "{value}", + "data": {} + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateOrderChangeActionsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateOrderChangeActionsWorkflow/page.mdx index a792d17568..cd9f582ad9 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateOrderChangeActionsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateOrderChangeActionsWorkflow/page.mdx @@ -16,27 +16,9 @@ This workflow updates one or more order change actions. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updateOrderChangeActionsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updateOrderChangeActionsWorkflow - .runAsStep({ - input: [{ - "id": "id_pwmlMEYkFZH" - }] - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -53,7 +35,7 @@ export async function POST( const { result } = await updateOrderChangeActionsWorkflow(req.scope) .run({ input: [{ - "id": "id_pwmlMEYkFZH" + "id": "id_7dO15lKjGTMg" }] }) @@ -78,7 +60,7 @@ export default async function handleOrderPlaced({ const { result } = await updateOrderChangeActionsWorkflow(container) .run({ input: [{ - "id": "id_pwmlMEYkFZH" + "id": "id_7dO15lKjGTMg" }] }) @@ -103,7 +85,7 @@ export default async function myCustomJob( const { result } = await updateOrderChangeActionsWorkflow(container) .run({ input: [{ - "id": "id_pwmlMEYkFZH" + "id": "id_7dO15lKjGTMg" }] }) @@ -114,6 +96,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updateOrderChangeActionsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updateOrderChangeActionsWorkflow + .runAsStep({ + input: [{ + "id": "id_7dO15lKjGTMg" + }] + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateOrderChangesWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateOrderChangesWorkflow/page.mdx index 859e6a06c9..ee09b9ddfd 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateOrderChangesWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateOrderChangesWorkflow/page.mdx @@ -16,27 +16,9 @@ This workflow updates one or more order changes. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updateOrderChangesWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updateOrderChangesWorkflow - .runAsStep({ - input: [{ - "id": "id_mvwaK24eQPJWmkckiU9" - }] - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -53,7 +35,7 @@ export async function POST( const { result } = await updateOrderChangesWorkflow(req.scope) .run({ input: [{ - "id": "id_mvwaK24eQPJWmkckiU9" + "id": "id_ZKWCX4HR5XYnczr09" }] }) @@ -78,7 +60,7 @@ export default async function handleOrderPlaced({ const { result } = await updateOrderChangesWorkflow(container) .run({ input: [{ - "id": "id_mvwaK24eQPJWmkckiU9" + "id": "id_ZKWCX4HR5XYnczr09" }] }) @@ -103,7 +85,7 @@ export default async function myCustomJob( const { result } = await updateOrderChangesWorkflow(container) .run({ input: [{ - "id": "id_mvwaK24eQPJWmkckiU9" + "id": "id_ZKWCX4HR5XYnczr09" }] }) @@ -114,6 +96,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updateOrderChangesWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updateOrderChangesWorkflow + .runAsStep({ + input: [{ + "id": "id_ZKWCX4HR5XYnczr09" + }] + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateOrderEditAddItemValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateOrderEditAddItemValidationStep/page.mdx index bda1069468..f70a466b29 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateOrderEditAddItemValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateOrderEditAddItemValidationStep/page.mdx @@ -22,198 +22,198 @@ const myWorkflow = createWorkflow( () => { const data = updateOrderEditAddItemValidationStep({ "order": { - "id": "id_WZOfX4UQCIi57v1Hwb", - "version": 6, - "display_id": 33, - "status": "requires_action", + "id": "id_z1AYGcd6MF2p2LB9QZl", + "version": 14, + "display_id": 9, + "status": "archived", "currency_code": "{value}", - "created_at": "2025-10-15T14:46:43.531Z", - "updated_at": "2025-07-10T02:54:46.694Z", + "created_at": "2025-10-13T14:20:37.376Z", + "updated_at": "2025-05-01T18:34:01.869Z", "original_item_total": { - "numeric": 38 + "numeric": 20 }, "original_item_subtotal": { - "numeric": 6 + "numeric": 43 }, "original_item_tax_total": { - "numeric": 38 + "numeric": 15 }, "item_total": { - "numeric": 23 + "numeric": 1 }, "item_subtotal": { - "numeric": 18 + "numeric": 27 }, "item_tax_total": { - "numeric": 18 + "numeric": 11 }, "original_total": { - "numeric": 6 + "numeric": 43 }, "original_subtotal": { - "numeric": 16 + "numeric": 18 }, "original_tax_total": { "numeric": 8 }, "total": { - "numeric": 6 + "numeric": 32 }, "subtotal": { - "numeric": 4 + "numeric": 30 }, "tax_total": { - "numeric": 44 + "numeric": 28 }, "discount_subtotal": { - "numeric": 44 + "numeric": 11 }, "discount_total": { - "numeric": 21 + "numeric": 47 }, "discount_tax_total": { - "numeric": 16 + "numeric": 15 }, "gift_card_total": { - "numeric": 42 - }, - "gift_card_tax_total": { - "numeric": 35 - }, - "shipping_total": { "numeric": 12 }, + "gift_card_tax_total": { + "numeric": 26 + }, + "shipping_total": { + "numeric": 19 + }, "shipping_subtotal": { - "numeric": 2 + "numeric": 10 }, "shipping_tax_total": { - "numeric": 34 + "numeric": 48 }, "original_shipping_total": { - "numeric": 34 + "numeric": 17 }, "original_shipping_subtotal": { - "numeric": 5 + "numeric": 34 }, "original_shipping_tax_total": { - "numeric": 43 + "numeric": 33 } }, "orderChange": { - "id": "id_EOZ17Il644inF0iGSRS", - "version": 24, + "id": "id_Y7r4bJpo90qU", + "version": 50, "order_id": "{value}", "return_id": "{value}", "exchange_id": "{value}", "claim_id": "{value}", "order": { - "id": "id_pA45IJ1UeNmcxz8OY", - "version": 14, - "display_id": 45, - "status": "draft", + "id": "id_frWlLW6OCO", + "version": 47, + "display_id": 30, + "status": "completed", "currency_code": "{value}", - "created_at": "2026-01-03T05:57:24.110Z", - "updated_at": "2025-09-13T18:56:17.219Z", + "created_at": "2025-03-20T15:53:44.570Z", + "updated_at": "2025-04-23T18:12:55.482Z", "original_item_total": { - "numeric": 11 + "numeric": 35 }, "original_item_subtotal": { - "numeric": 36 + "numeric": 8 }, "original_item_tax_total": { - "numeric": 20 + "numeric": 6 }, "item_total": { - "numeric": 40 + "numeric": 27 }, "item_subtotal": { - "numeric": 33 + "numeric": 17 }, "item_tax_total": { - "numeric": 31 - }, - "original_total": { - "numeric": 2 - }, - "original_subtotal": { - "numeric": 10 - }, - "original_tax_total": { - "numeric": 40 - }, - "total": { - "numeric": 9 - }, - "subtotal": { - "numeric": 18 - }, - "tax_total": { - "numeric": 48 - }, - "discount_subtotal": { "numeric": 32 }, + "original_total": { + "numeric": 11 + }, + "original_subtotal": { + "numeric": 48 + }, + "original_tax_total": { + "numeric": 12 + }, + "total": { + "numeric": 0 + }, + "subtotal": { + "numeric": 49 + }, + "tax_total": { + "numeric": 29 + }, + "discount_subtotal": { + "numeric": 7 + }, "discount_total": { - "numeric": 14 + "numeric": 15 }, "discount_tax_total": { - "numeric": 43 + "numeric": 32 }, "gift_card_total": { - "numeric": 35 + "numeric": 24 }, "gift_card_tax_total": { "numeric": 47 }, "shipping_total": { - "numeric": 0 + "numeric": 8 }, "shipping_subtotal": { - "numeric": 18 + "numeric": 24 }, "shipping_tax_total": { - "numeric": 4 + "numeric": 18 }, "original_shipping_total": { - "numeric": 19 + "numeric": 9 }, "original_shipping_subtotal": { - "numeric": 10 + "numeric": 31 }, "original_shipping_tax_total": { - "numeric": 24 + "numeric": 16 } }, "return_order": { - "id": "id_B8wHIuVHWDfnF7UtC", - "status": "partially_received", + "id": "id_5Ep6Mu9FZHQ1AOmgdV", + "status": "requested", "order_id": "{value}", "items": [{ - "id": "id_JJ5JZoUHhsAj", + "id": "id_OZBDML0tPFeZ", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 17 + "quantity": 22 }], - "display_id": 44, + "display_id": 9, "metadata": {} }, "exchange": { - "id": "id_5590XMUYjmE2bg2NDJH7", + "id": "id_KrK3lv10jDKAH", "order_id": "{value}", - "order_version": 19, - "display_id": 26, + "order_version": 5, + "display_id": 32, "additional_items": [ "{value}" ], "metadata": {} }, "claim": { - "id": "id_PlDEE869Hvn2", + "id": "id_kwVAFOrbnbVUlj", "type": "refund", "order_id": "{value}", - "order_version": 21, - "display_id": 19, + "order_version": 14, + "display_id": 41, "claim_items": [ "{value}" ], @@ -223,7 +223,7 @@ const myWorkflow = createWorkflow( "metadata": {} }, "actions": [{ - "id": "id_LRywdc2QSjP4VMZi5", + "id": "id_K8lvkzZ5LTYHLal", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -233,13 +233,13 @@ const myWorkflow = createWorkflow( "order": {}, "reference": "{value}", "reference_id": "{value}", - "action": "CANCEL_ITEM_FULFILLMENT", + "action": "RECEIVE_DAMAGED_RETURN_ITEM", "details": {}, "internal_note": {}, - "created_at": "2025-10-01T22:34:41.614Z", - "updated_at": "2025-08-10T15:07:02.399Z" + "created_at": "2025-03-08T20:32:03.992Z", + "updated_at": "2025-06-20T01:27:08.368Z" }], - "status": "confirmed", + "status": "pending", "requested_by": {}, "requested_at": {}, "confirmed_by": {}, @@ -250,8 +250,8 @@ const myWorkflow = createWorkflow( "declined_at": {}, "canceled_by": {}, "canceled_at": {}, - "created_at": "2025-09-03T09:31:55.451Z", - "updated_at": "2025-12-14T12:46:39.266Z" + "created_at": "2025-10-27T20:40:46.727Z", + "updated_at": "2025-04-24T15:22:56.859Z" }, "input": { "order_id": "{value}", diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateOrderEditAddItemWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateOrderEditAddItemWorkflow/page.mdx index 50286c1ca2..7ef3028ed5 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateOrderEditAddItemWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateOrderEditAddItemWorkflow/page.mdx @@ -17,29 +17,9 @@ This workflow updates a new item in the order edit. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updateOrderEditAddItemWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updateOrderEditAddItemWorkflow - .runAsStep({ - input: { - "order_id": "{value}", - "action_id": "{value}", - "data": {} - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -123,6 +103,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updateOrderEditAddItemWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updateOrderEditAddItemWorkflow + .runAsStep({ + input: { + "order_id": "{value}", + "action_id": "{value}", + "data": {} + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateOrderEditItemQuantityValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateOrderEditItemQuantityValidationStep/page.mdx index c7d1dd2f17..a07e65cd4e 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateOrderEditItemQuantityValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateOrderEditItemQuantityValidationStep/page.mdx @@ -22,198 +22,198 @@ const myWorkflow = createWorkflow( () => { const data = updateOrderEditItemQuantityValidationStep({ "order": { - "id": "id_SbdZ1FVPn2nxo7NTTfp", - "version": 20, - "display_id": 13, + "id": "id_wvAK2WqVBsNRO3cIGYYl", + "version": 30, + "display_id": 22, "status": "pending", "currency_code": "{value}", - "created_at": "2025-08-01T10:54:32.166Z", - "updated_at": "2025-07-26T16:19:54.506Z", + "created_at": "2025-12-28T08:17:07.712Z", + "updated_at": "2025-04-03T15:11:10.771Z", "original_item_total": { - "numeric": 44 + "numeric": 21 }, "original_item_subtotal": { - "numeric": 20 + "numeric": 14 }, "original_item_tax_total": { - "numeric": 7 + "numeric": 28 }, "item_total": { - "numeric": 19 + "numeric": 32 }, "item_subtotal": { - "numeric": 47 + "numeric": 21 }, "item_tax_total": { - "numeric": 48 + "numeric": 42 }, "original_total": { - "numeric": 0 + "numeric": 32 }, "original_subtotal": { - "numeric": 19 + "numeric": 6 }, "original_tax_total": { - "numeric": 0 + "numeric": 30 }, "total": { - "numeric": 49 + "numeric": 8 }, "subtotal": { - "numeric": 50 + "numeric": 8 }, "tax_total": { - "numeric": 9 + "numeric": 2 }, "discount_subtotal": { - "numeric": 34 + "numeric": 1 }, "discount_total": { - "numeric": 46 + "numeric": 42 }, "discount_tax_total": { - "numeric": 38 + "numeric": 6 }, "gift_card_total": { - "numeric": 34 + "numeric": 41 }, "gift_card_tax_total": { - "numeric": 38 + "numeric": 45 }, "shipping_total": { - "numeric": 17 + "numeric": 33 }, "shipping_subtotal": { - "numeric": 34 + "numeric": 12 }, "shipping_tax_total": { - "numeric": 27 + "numeric": 22 }, "original_shipping_total": { - "numeric": 13 + "numeric": 8 }, "original_shipping_subtotal": { - "numeric": 24 + "numeric": 42 }, "original_shipping_tax_total": { - "numeric": 17 + "numeric": 48 } }, "orderChange": { - "id": "id_F5umS6ExtQa", - "version": 32, + "id": "id_I4WWUupCtD", + "version": 25, "order_id": "{value}", "return_id": "{value}", "exchange_id": "{value}", "claim_id": "{value}", "order": { - "id": "id_2k9bKZiwZl2GSZ", - "version": 20, - "display_id": 30, - "status": "completed", + "id": "id_9ay7WA7XMMpFbJTznUv", + "version": 14, + "display_id": 36, + "status": "archived", "currency_code": "{value}", - "created_at": "2025-09-21T11:40:55.047Z", - "updated_at": "2025-01-25T02:48:42.982Z", + "created_at": "2025-09-13T12:26:01.517Z", + "updated_at": "2025-10-18T04:38:54.440Z", "original_item_total": { - "numeric": 45 + "numeric": 6 }, "original_item_subtotal": { - "numeric": 17 + "numeric": 0 }, "original_item_tax_total": { "numeric": 24 }, "item_total": { - "numeric": 30 + "numeric": 37 }, "item_subtotal": { - "numeric": 19 + "numeric": 17 }, "item_tax_total": { - "numeric": 22 + "numeric": 47 }, "original_total": { - "numeric": 44 + "numeric": 38 }, "original_subtotal": { - "numeric": 13 + "numeric": 10 }, "original_tax_total": { - "numeric": 2 + "numeric": 3 }, "total": { - "numeric": 26 + "numeric": 11 }, "subtotal": { "numeric": 19 }, "tax_total": { - "numeric": 9 - }, - "discount_subtotal": { - "numeric": 9 - }, - "discount_total": { "numeric": 20 }, + "discount_subtotal": { + "numeric": 31 + }, + "discount_total": { + "numeric": 50 + }, "discount_tax_total": { - "numeric": 27 + "numeric": 28 }, "gift_card_total": { - "numeric": 12 + "numeric": 3 }, "gift_card_tax_total": { - "numeric": 40 + "numeric": 1 }, "shipping_total": { - "numeric": 35 + "numeric": 47 }, "shipping_subtotal": { - "numeric": 4 + "numeric": 10 }, "shipping_tax_total": { - "numeric": 19 + "numeric": 44 }, "original_shipping_total": { - "numeric": 24 + "numeric": 25 }, "original_shipping_subtotal": { - "numeric": 41 + "numeric": 24 }, "original_shipping_tax_total": { - "numeric": 25 + "numeric": 41 } }, "return_order": { - "id": "id_HB7N2dyBkrifn7I9QouC", - "status": "received", + "id": "id_dOA7B5mWs9CAn1yo", + "status": "partially_received", "order_id": "{value}", "items": [{ - "id": "id_XCyzyMO73vdsIfyKnu1u", + "id": "id_YF8Dd3DyJBGQB", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 48 + "quantity": 28 }], - "display_id": 29, + "display_id": 31, "metadata": {} }, "exchange": { - "id": "id_clHqYN584Gon", + "id": "id_s5xPJU64SLTvKW7", "order_id": "{value}", - "order_version": 23, - "display_id": 46, + "order_version": 13, + "display_id": 29, "additional_items": [ "{value}" ], "metadata": {} }, "claim": { - "id": "id_o0HCSDHaCam", + "id": "id_jCrLOCNO5s", "type": "refund", "order_id": "{value}", - "order_version": 32, - "display_id": 31, + "order_version": 1, + "display_id": 39, "claim_items": [ "{value}" ], @@ -223,7 +223,7 @@ const myWorkflow = createWorkflow( "metadata": {} }, "actions": [{ - "id": "id_SWcz3AqH2pztDqJ7Rzfv", + "id": "id_Q0kpULYOkco", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -233,11 +233,11 @@ const myWorkflow = createWorkflow( "order": {}, "reference": "{value}", "reference_id": "{value}", - "action": "SHIPPING_ADD", + "action": "RECEIVE_RETURN_ITEM", "details": {}, "internal_note": {}, - "created_at": "2025-11-27T03:39:20.953Z", - "updated_at": "2025-07-25T23:56:32.494Z" + "created_at": "2025-01-25T08:58:49.090Z", + "updated_at": "2025-09-13T17:03:05.091Z" }], "status": "canceled", "requested_by": {}, @@ -250,8 +250,8 @@ const myWorkflow = createWorkflow( "declined_at": {}, "canceled_by": {}, "canceled_at": {}, - "created_at": "2025-11-16T23:40:58.001Z", - "updated_at": "2025-09-24T15:56:04.162Z" + "created_at": "2025-09-19T11:05:10.069Z", + "updated_at": "2025-08-13T02:35:18.862Z" }, "input": { "order_id": "{value}", diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateOrderEditItemQuantityWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateOrderEditItemQuantityWorkflow/page.mdx index 8232b6ea25..2c15ee6f64 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateOrderEditItemQuantityWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateOrderEditItemQuantityWorkflow/page.mdx @@ -17,29 +17,9 @@ This workflow updates a new item in the order edit. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updateOrderEditItemQuantityWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updateOrderEditItemQuantityWorkflow - .runAsStep({ - input: { - "order_id": "{value}", - "action_id": "{value}", - "data": {} - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -123,6 +103,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updateOrderEditItemQuantityWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updateOrderEditItemQuantityWorkflow + .runAsStep({ + input: { + "order_id": "{value}", + "action_id": "{value}", + "data": {} + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateOrderEditShippingMethodValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateOrderEditShippingMethodValidationStep/page.mdx index f4329d2ab6..f6d3935702 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateOrderEditShippingMethodValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateOrderEditShippingMethodValidationStep/page.mdx @@ -26,120 +26,120 @@ const myWorkflow = createWorkflow( "action_id": "{value}" }, "orderChange": { - "id": "id_T6rKht5tyOkfwBeyJb", - "version": 31, + "id": "id_ME4hiXxoSzUPBE", + "version": 47, "order_id": "{value}", "return_id": "{value}", "exchange_id": "{value}", "claim_id": "{value}", "order": { - "id": "id_zfQ791uaIbb3iyp", - "version": 16, - "display_id": 47, - "status": "requires_action", + "id": "id_JCXZMXvVzEYExSW", + "version": 11, + "display_id": 25, + "status": "completed", "currency_code": "{value}", - "created_at": "2025-10-23T06:44:13.942Z", - "updated_at": "2025-06-30T23:28:04.482Z", + "created_at": "2025-09-29T11:51:45.139Z", + "updated_at": "2025-08-30T03:18:32.114Z", "original_item_total": { - "numeric": 49 + "numeric": 40 }, "original_item_subtotal": { - "numeric": 35 - }, - "original_item_tax_total": { - "numeric": 35 - }, - "item_total": { "numeric": 18 }, + "original_item_tax_total": { + "numeric": 16 + }, + "item_total": { + "numeric": 43 + }, "item_subtotal": { - "numeric": 7 + "numeric": 44 }, "item_tax_total": { - "numeric": 35 + "numeric": 18 }, "original_total": { - "numeric": 42 + "numeric": 40 }, "original_subtotal": { - "numeric": 37 + "numeric": 16 }, "original_tax_total": { - "numeric": 36 + "numeric": 0 }, "total": { - "numeric": 3 + "numeric": 47 }, "subtotal": { "numeric": 31 }, "tax_total": { - "numeric": 35 + "numeric": 25 }, "discount_subtotal": { "numeric": 39 }, "discount_total": { - "numeric": 13 + "numeric": 8 }, "discount_tax_total": { - "numeric": 16 + "numeric": 35 }, "gift_card_total": { - "numeric": 10 + "numeric": 17 }, "gift_card_tax_total": { - "numeric": 41 + "numeric": 20 }, "shipping_total": { - "numeric": 44 + "numeric": 39 }, "shipping_subtotal": { - "numeric": 42 + "numeric": 12 }, "shipping_tax_total": { - "numeric": 16 + "numeric": 40 }, "original_shipping_total": { - "numeric": 31 + "numeric": 34 }, "original_shipping_subtotal": { - "numeric": 50 + "numeric": 20 }, "original_shipping_tax_total": { - "numeric": 33 + "numeric": 49 } }, "return_order": { - "id": "id_ModybWX2CszQanHcd", - "status": "requested", + "id": "id_wIHBWcPuDYQ1PDOQP9V7", + "status": "canceled", "order_id": "{value}", "items": [{ - "id": "id_BgkHFB01oL0N1Dw39IZR", + "id": "id_kEvwoQGKirjE26w6hJ", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 18 + "quantity": 34 }], - "display_id": 12, + "display_id": 17, "metadata": {} }, "exchange": { - "id": "id_92fMav1PoR", + "id": "id_rStrk4k2yZ9neJ8dx", "order_id": "{value}", - "order_version": 14, - "display_id": 45, + "order_version": 40, + "display_id": 11, "additional_items": [ "{value}" ], "metadata": {} }, "claim": { - "id": "id_smAGeNT4XnRJS1SDwn", + "id": "id_8ciX2ghEvBpSW2jXa", "type": "replace", "order_id": "{value}", - "order_version": 36, - "display_id": 36, + "order_version": 10, + "display_id": 7, "claim_items": [ "{value}" ], @@ -149,7 +149,7 @@ const myWorkflow = createWorkflow( "metadata": {} }, "actions": [{ - "id": "id_YoelsKkyeoz5Pp", + "id": "id_m71lHSbC86DOdM", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -159,13 +159,13 @@ const myWorkflow = createWorkflow( "order": {}, "reference": "{value}", "reference_id": "{value}", - "action": "WRITE_OFF_ITEM", + "action": "CANCEL_ITEM_FULFILLMENT", "details": {}, "internal_note": {}, - "created_at": "2025-12-09T08:31:09.807Z", - "updated_at": "2025-08-19T02:45:30.871Z" + "created_at": "2025-03-31T23:56:47.399Z", + "updated_at": "2025-01-14T21:33:53.495Z" }], - "status": "pending", + "status": "confirmed", "requested_by": {}, "requested_at": {}, "confirmed_by": {}, @@ -176,8 +176,8 @@ const myWorkflow = createWorkflow( "declined_at": {}, "canceled_by": {}, "canceled_at": {}, - "created_at": "2025-11-01T19:53:30.840Z", - "updated_at": "2025-07-21T12:36:51.548Z" + "created_at": "2025-01-26T20:42:46.579Z", + "updated_at": "2025-06-27T13:41:22.260Z" } }) } diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateOrderEditShippingMethodWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateOrderEditShippingMethodWorkflow/page.mdx index e21e8e1226..f092f08cd9 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateOrderEditShippingMethodWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateOrderEditShippingMethodWorkflow/page.mdx @@ -17,29 +17,9 @@ This workflow updates an order edit's shipping method. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updateOrderEditShippingMethodWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updateOrderEditShippingMethodWorkflow - .runAsStep({ - input: { - "order_id": "{value}", - "action_id": "{value}", - "data": {} - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -123,6 +103,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updateOrderEditShippingMethodWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updateOrderEditShippingMethodWorkflow + .runAsStep({ + input: { + "order_id": "{value}", + "action_id": "{value}", + "data": {} + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateOrderTaxLinesWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateOrderTaxLinesWorkflow/page.mdx index ee27e5039c..a258564960 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateOrderTaxLinesWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateOrderTaxLinesWorkflow/page.mdx @@ -18,27 +18,9 @@ This workflow updates the tax lines of items and shipping methods in an order. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updateOrderTaxLinesWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updateOrderTaxLinesWorkflow - .runAsStep({ - input: { - "order_id": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -116,6 +98,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updateOrderTaxLinesWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updateOrderTaxLinesWorkflow + .runAsStep({ + input: { + "order_id": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateOrderValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateOrderValidationStep/page.mdx index 326a9529b2..bc2e096cc5 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateOrderValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateOrderValidationStep/page.mdx @@ -22,85 +22,85 @@ const myWorkflow = createWorkflow( () => { const data = updateOrderValidationStep({ "order": { - "id": "id_fTtixIkX8kFSuPCmcGV9", - "version": 22, - "display_id": 12, - "status": "pending", + "id": "id_NMh8klJEswoIw6Fjlof", + "version": 4, + "display_id": 16, + "status": "draft", "currency_code": "{value}", - "created_at": "2025-12-16T02:49:01.862Z", - "updated_at": "2025-06-09T15:55:02.403Z", + "created_at": "2025-12-27T22:45:25.751Z", + "updated_at": "2025-01-25T17:29:45.652Z", "original_item_total": { - "numeric": 34 + "numeric": 48 }, "original_item_subtotal": { - "numeric": 3 + "numeric": 21 }, "original_item_tax_total": { - "numeric": 37 + "numeric": 41 }, "item_total": { - "numeric": 42 + "numeric": 36 }, "item_subtotal": { - "numeric": 13 + "numeric": 28 }, "item_tax_total": { - "numeric": 9 + "numeric": 41 }, "original_total": { - "numeric": 37 - }, - "original_subtotal": { - "numeric": 12 - }, - "original_tax_total": { - "numeric": 40 - }, - "total": { - "numeric": 49 - }, - "subtotal": { - "numeric": 24 - }, - "tax_total": { - "numeric": 29 - }, - "discount_subtotal": { - "numeric": 33 - }, - "discount_total": { "numeric": 35 }, - "discount_tax_total": { - "numeric": 42 + "original_subtotal": { + "numeric": 36 }, - "gift_card_total": { - "numeric": 11 + "original_tax_total": { + "numeric": 0 }, - "gift_card_tax_total": { + "total": { "numeric": 12 }, + "subtotal": { + "numeric": 27 + }, + "tax_total": { + "numeric": 44 + }, + "discount_subtotal": { + "numeric": 0 + }, + "discount_total": { + "numeric": 41 + }, + "discount_tax_total": { + "numeric": 49 + }, + "gift_card_total": { + "numeric": 6 + }, + "gift_card_tax_total": { + "numeric": 30 + }, "shipping_total": { - "numeric": 9 + "numeric": 3 }, "shipping_subtotal": { - "numeric": 23 + "numeric": 44 }, "shipping_tax_total": { - "numeric": 17 - }, - "original_shipping_total": { - "numeric": 16 - }, - "original_shipping_subtotal": { "numeric": 5 }, + "original_shipping_total": { + "numeric": 8 + }, + "original_shipping_subtotal": { + "numeric": 39 + }, "original_shipping_tax_total": { - "numeric": 49 + "numeric": 47 } }, "input": { - "id": "id_IWSGKPaD3qJq50TKW", + "id": "id_mWW0VEhs4mhxzi1sIo", "user_id": "{value}" } }) diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateOrderWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateOrderWorkflow/page.mdx index 4182fcf0f8..5be478b0ab 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateOrderWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateOrderWorkflow/page.mdx @@ -18,28 +18,9 @@ Update order workflow. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updateOrderWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updateOrderWorkflow - .runAsStep({ - input: { - "id": "id_RYLo1vUgTzObLIh7Gq", - "user_id": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -56,7 +37,7 @@ export async function POST( const { result } = await updateOrderWorkflow(req.scope) .run({ input: { - "id": "id_RYLo1vUgTzObLIh7Gq", + "id": "id_2MmlXYBnn0", "user_id": "{value}" } }) @@ -82,7 +63,7 @@ export default async function handleOrderPlaced({ const { result } = await updateOrderWorkflow(container) .run({ input: { - "id": "id_RYLo1vUgTzObLIh7Gq", + "id": "id_2MmlXYBnn0", "user_id": "{value}" } }) @@ -108,7 +89,7 @@ export default async function myCustomJob( const { result } = await updateOrderWorkflow(container) .run({ input: { - "id": "id_RYLo1vUgTzObLIh7Gq", + "id": "id_2MmlXYBnn0", "user_id": "{value}" } }) @@ -120,6 +101,27 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updateOrderWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updateOrderWorkflow + .runAsStep({ + input: { + "id": "id_2MmlXYBnn0", + "user_id": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateReceiveItemReturnRequestValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateReceiveItemReturnRequestValidationStep/page.mdx index 6bb7e6642b..5ab5773e76 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateReceiveItemReturnRequestValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateReceiveItemReturnRequestValidationStep/page.mdx @@ -22,212 +22,212 @@ const myWorkflow = createWorkflow( () => { const data = updateReceiveItemReturnRequestValidationStep({ "order": { - "id": "id_2T8XLcWQbI7qhW8", - "version": 30, - "display_id": 35, - "status": "completed", + "id": "id_BQEULfM14oFY2Ek", + "version": 13, + "display_id": 48, + "status": "canceled", "currency_code": "{value}", - "created_at": "2025-02-23T22:44:17.076Z", - "updated_at": "2025-05-21T10:44:03.899Z", + "created_at": "2025-09-10T01:28:29.151Z", + "updated_at": "2025-07-17T12:14:27.063Z", "original_item_total": { - "numeric": 23 - }, - "original_item_subtotal": { - "numeric": 48 - }, - "original_item_tax_total": { - "numeric": 15 - }, - "item_total": { - "numeric": 25 - }, - "item_subtotal": { - "numeric": 48 - }, - "item_tax_total": { - "numeric": 46 - }, - "original_total": { - "numeric": 36 - }, - "original_subtotal": { - "numeric": 19 - }, - "original_tax_total": { - "numeric": 30 - }, - "total": { - "numeric": 38 - }, - "subtotal": { - "numeric": 5 - }, - "tax_total": { - "numeric": 3 - }, - "discount_subtotal": { - "numeric": 31 - }, - "discount_total": { - "numeric": 18 - }, - "discount_tax_total": { - "numeric": 10 - }, - "gift_card_total": { - "numeric": 11 - }, - "gift_card_tax_total": { - "numeric": 13 - }, - "shipping_total": { - "numeric": 35 - }, - "shipping_subtotal": { - "numeric": 3 - }, - "shipping_tax_total": { - "numeric": 33 - }, - "original_shipping_total": { - "numeric": 25 - }, - "original_shipping_subtotal": { "numeric": 12 }, + "original_item_subtotal": { + "numeric": 33 + }, + "original_item_tax_total": { + "numeric": 27 + }, + "item_total": { + "numeric": 44 + }, + "item_subtotal": { + "numeric": 13 + }, + "item_tax_total": { + "numeric": 25 + }, + "original_total": { + "numeric": 1 + }, + "original_subtotal": { + "numeric": 41 + }, + "original_tax_total": { + "numeric": 20 + }, + "total": { + "numeric": 28 + }, + "subtotal": { + "numeric": 36 + }, + "tax_total": { + "numeric": 36 + }, + "discount_subtotal": { + "numeric": 46 + }, + "discount_total": { + "numeric": 47 + }, + "discount_tax_total": { + "numeric": 1 + }, + "gift_card_total": { + "numeric": 50 + }, + "gift_card_tax_total": { + "numeric": 32 + }, + "shipping_total": { + "numeric": 31 + }, + "shipping_subtotal": { + "numeric": 24 + }, + "shipping_tax_total": { + "numeric": 0 + }, + "original_shipping_total": { + "numeric": 48 + }, + "original_shipping_subtotal": { + "numeric": 5 + }, "original_shipping_tax_total": { - "numeric": 4 + "numeric": 0 } }, "orderReturn": { - "id": "id_CQPu0tunK7XLUyrF9N", - "status": "partially_received", + "id": "id_4yErE1j9QLWBy3v7zUC", + "status": "canceled", "order_id": "{value}", "items": [{ - "id": "id_OH8WtM9wWoMze8", + "id": "id_glBN7M4htWhox4O44", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 34 + "quantity": 21 }], - "display_id": 7, + "display_id": 13, "metadata": {} }, "orderChange": { - "id": "id_TWQmVEvo34Zyxuitzy0", - "version": 20, + "id": "id_JH4lfpyhbU5H", + "version": 28, "order_id": "{value}", "return_id": "{value}", "exchange_id": "{value}", "claim_id": "{value}", "order": { - "id": "id_oyjWjUUQJ85Tgr", - "version": 28, - "display_id": 23, - "status": "draft", + "id": "id_xWvcD5vK5J", + "version": 35, + "display_id": 42, + "status": "canceled", "currency_code": "{value}", - "created_at": "2025-04-17T05:35:37.258Z", - "updated_at": "2025-07-04T02:07:27.244Z", + "created_at": "2025-05-20T08:54:34.109Z", + "updated_at": "2025-05-25T17:06:05.900Z", "original_item_total": { - "numeric": 34 + "numeric": 39 }, "original_item_subtotal": { - "numeric": 0 + "numeric": 22 }, "original_item_tax_total": { - "numeric": 30 + "numeric": 22 }, "item_total": { - "numeric": 34 + "numeric": 36 }, "item_subtotal": { - "numeric": 32 + "numeric": 34 }, "item_tax_total": { - "numeric": 21 + "numeric": 12 }, "original_total": { - "numeric": 37 + "numeric": 16 }, "original_subtotal": { - "numeric": 0 - }, - "original_tax_total": { - "numeric": 47 - }, - "total": { "numeric": 33 }, + "original_tax_total": { + "numeric": 39 + }, + "total": { + "numeric": 37 + }, "subtotal": { - "numeric": 5 - }, - "tax_total": { - "numeric": 41 - }, - "discount_subtotal": { - "numeric": 18 - }, - "discount_total": { - "numeric": 24 - }, - "discount_tax_total": { - "numeric": 13 - }, - "gift_card_total": { - "numeric": 20 - }, - "gift_card_tax_total": { "numeric": 50 }, - "shipping_total": { - "numeric": 7 + "tax_total": { + "numeric": 48 }, - "shipping_subtotal": { + "discount_subtotal": { + "numeric": 30 + }, + "discount_total": { + "numeric": 16 + }, + "discount_tax_total": { + "numeric": 23 + }, + "gift_card_total": { + "numeric": 25 + }, + "gift_card_tax_total": { "numeric": 45 }, + "shipping_total": { + "numeric": 35 + }, + "shipping_subtotal": { + "numeric": 28 + }, "shipping_tax_total": { - "numeric": 38 + "numeric": 39 }, "original_shipping_total": { - "numeric": 27 + "numeric": 10 }, "original_shipping_subtotal": { - "numeric": 11 + "numeric": 45 }, "original_shipping_tax_total": { - "numeric": 49 + "numeric": 2 } }, "return_order": { - "id": "id_FgNWgF7zL21cq5Gm", - "status": "received", + "id": "id_XcEA0Jl5ey8NjIcL", + "status": "requested", "order_id": "{value}", "items": [{ - "id": "id_D2xV7fStY98oh1", + "id": "id_jdwupjEugVjai4y1vHVi", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 19 + "quantity": 7 }], "display_id": 38, "metadata": {} }, "exchange": { - "id": "id_uF4QBU320WJS", + "id": "id_aNcfYthYfePO6d", "order_id": "{value}", - "order_version": 21, - "display_id": 42, + "order_version": 32, + "display_id": 49, "additional_items": [ "{value}" ], "metadata": {} }, "claim": { - "id": "id_ZiHArX6F2Ob6Pgw2V", + "id": "id_OPLjpaY9dKE", "type": "replace", "order_id": "{value}", - "order_version": 13, - "display_id": 23, + "order_version": 25, + "display_id": 16, "claim_items": [ "{value}" ], @@ -237,7 +237,7 @@ const myWorkflow = createWorkflow( "metadata": {} }, "actions": [{ - "id": "id_Zf7zMI2M4EltsapbqDO", + "id": "id_9E389HnCqawvdxRcfU", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -247,13 +247,13 @@ const myWorkflow = createWorkflow( "order": {}, "reference": "{value}", "reference_id": "{value}", - "action": "CANCEL_RETURN_ITEM", + "action": "REINSTATE_ITEM", "details": {}, "internal_note": {}, - "created_at": "2025-12-03T18:40:18.548Z", - "updated_at": "2025-04-12T21:16:51.243Z" + "created_at": "2025-09-21T13:21:44.542Z", + "updated_at": "2025-07-28T12:26:16.268Z" }], - "status": "pending", + "status": "requested", "requested_by": {}, "requested_at": {}, "confirmed_by": {}, @@ -264,8 +264,8 @@ const myWorkflow = createWorkflow( "declined_at": {}, "canceled_by": {}, "canceled_at": {}, - "created_at": "2025-05-02T14:08:20.696Z", - "updated_at": "2025-07-14T18:10:13.583Z" + "created_at": "2025-04-02T16:44:59.661Z", + "updated_at": "2025-12-12T19:04:46.305Z" }, "input": { "return_id": "{value}", diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateReceiveItemReturnRequestWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateReceiveItemReturnRequestWorkflow/page.mdx index 55fe721c40..b8a02568ec 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateReceiveItemReturnRequestWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateReceiveItemReturnRequestWorkflow/page.mdx @@ -17,29 +17,9 @@ This workflow updates an item in a return receival request. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updateReceiveItemReturnRequestWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updateReceiveItemReturnRequestWorkflow - .runAsStep({ - input: { - "return_id": "{value}", - "action_id": "{value}", - "data": {} - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -123,6 +103,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updateReceiveItemReturnRequestWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updateReceiveItemReturnRequestWorkflow + .runAsStep({ + input: { + "return_id": "{value}", + "action_id": "{value}", + "data": {} + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateRequestItemReturnValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateRequestItemReturnValidationStep/page.mdx index 662eb6cb87..6b4e43aeda 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateRequestItemReturnValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateRequestItemReturnValidationStep/page.mdx @@ -22,200 +22,200 @@ const myWorkflow = createWorkflow( () => { const data = updateRequestItemReturnValidationStep({ "order": { - "id": "id_N64FKjceXI8d", + "id": "id_XVkmK9txrFEqh", "version": 39, - "display_id": 45, + "display_id": 18, "status": "draft", "currency_code": "{value}", - "created_at": "2025-05-13T19:42:42.594Z", - "updated_at": "2025-04-10T02:39:29.241Z", + "created_at": "2025-12-11T15:08:07.958Z", + "updated_at": "2025-06-10T16:52:03.712Z", "original_item_total": { - "numeric": 28 + "numeric": 25 }, "original_item_subtotal": { - "numeric": 7 - }, - "original_item_tax_total": { - "numeric": 23 - }, - "item_total": { - "numeric": 9 - }, - "item_subtotal": { - "numeric": 25 - }, - "item_tax_total": { - "numeric": 25 - }, - "original_total": { - "numeric": 5 - }, - "original_subtotal": { - "numeric": 15 - }, - "original_tax_total": { - "numeric": 41 - }, - "total": { - "numeric": 25 - }, - "subtotal": { - "numeric": 24 - }, - "tax_total": { - "numeric": 33 - }, - "discount_subtotal": { "numeric": 49 }, - "discount_total": { - "numeric": 38 + "original_item_tax_total": { + "numeric": 5 }, - "discount_tax_total": { - "numeric": 29 - }, - "gift_card_total": { - "numeric": 46 - }, - "gift_card_tax_total": { - "numeric": 39 - }, - "shipping_total": { - "numeric": 20 - }, - "shipping_subtotal": { + "item_total": { "numeric": 16 }, - "shipping_tax_total": { - "numeric": 2 + "item_subtotal": { + "numeric": 35 }, - "original_shipping_total": { + "item_tax_total": { + "numeric": 11 + }, + "original_total": { + "numeric": 13 + }, + "original_subtotal": { + "numeric": 34 + }, + "original_tax_total": { + "numeric": 32 + }, + "total": { + "numeric": 40 + }, + "subtotal": { + "numeric": 38 + }, + "tax_total": { + "numeric": 11 + }, + "discount_subtotal": { + "numeric": 34 + }, + "discount_total": { "numeric": 6 }, + "discount_tax_total": { + "numeric": 10 + }, + "gift_card_total": { + "numeric": 32 + }, + "gift_card_tax_total": { + "numeric": 35 + }, + "shipping_total": { + "numeric": 11 + }, + "shipping_subtotal": { + "numeric": 11 + }, + "shipping_tax_total": { + "numeric": 25 + }, + "original_shipping_total": { + "numeric": 13 + }, "original_shipping_subtotal": { - "numeric": 30 + "numeric": 23 }, "original_shipping_tax_total": { - "numeric": 39 + "numeric": 46 } }, "orderReturn": { - "id": "id_izLijpcbtfLb8y0AT", + "id": "id_WkZ6BYCIeVqwJgZ5gl", "status": "partially_received", "order_id": "{value}", "items": [{ - "id": "id_1nDsqJHaj8xMln", + "id": "id_8Zo7yGdoGjvxElBQ82jx", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 34 + "quantity": 3 }], - "display_id": 6, + "display_id": 10, "metadata": {} }, "orderChange": { - "id": "id_xSEiUMBROIACMF", - "version": 16, + "id": "id_ZKlzZFaAZa7uyEmW", + "version": 25, "order_id": "{value}", "return_id": "{value}", "exchange_id": "{value}", "claim_id": "{value}", "order": { - "id": "id_JzXh6aeBJlZ", - "version": 9, - "display_id": 40, - "status": "pending", + "id": "id_1FuqO9KP9EIV0ljYoy", + "version": 3, + "display_id": 4, + "status": "archived", "currency_code": "{value}", - "created_at": "2025-08-22T06:47:25.829Z", - "updated_at": "2025-12-06T17:51:53.269Z", + "created_at": "2025-08-01T12:30:15.623Z", + "updated_at": "2025-08-02T04:47:43.411Z", "original_item_total": { - "numeric": 2 + "numeric": 23 }, "original_item_subtotal": { - "numeric": 49 + "numeric": 45 }, "original_item_tax_total": { - "numeric": 44 + "numeric": 31 }, "item_total": { - "numeric": 22 + "numeric": 12 }, "item_subtotal": { - "numeric": 48 + "numeric": 36 }, "item_tax_total": { - "numeric": 45 + "numeric": 48 }, "original_total": { - "numeric": 44 - }, - "original_subtotal": { - "numeric": 21 - }, - "original_tax_total": { - "numeric": 27 - }, - "total": { - "numeric": 45 - }, - "subtotal": { "numeric": 33 }, + "original_subtotal": { + "numeric": 30 + }, + "original_tax_total": { + "numeric": 1 + }, + "total": { + "numeric": 13 + }, + "subtotal": { + "numeric": 32 + }, "tax_total": { - "numeric": 26 + "numeric": 47 }, "discount_subtotal": { - "numeric": 43 + "numeric": 12 }, "discount_total": { - "numeric": 0 + "numeric": 46 }, "discount_tax_total": { - "numeric": 27 + "numeric": 2 }, "gift_card_total": { - "numeric": 50 + "numeric": 6 }, "gift_card_tax_total": { - "numeric": 40 + "numeric": 34 }, "shipping_total": { - "numeric": 37 + "numeric": 48 }, "shipping_subtotal": { "numeric": 32 }, "shipping_tax_total": { - "numeric": 12 + "numeric": 15 }, "original_shipping_total": { - "numeric": 48 + "numeric": 38 }, "original_shipping_subtotal": { - "numeric": 32 + "numeric": 0 }, "original_shipping_tax_total": { - "numeric": 32 + "numeric": 21 } }, "return_order": { - "id": "id_WxUTUQqAEa", - "status": "partially_received", + "id": "id_QXggvv3qnn7klMj1", + "status": "requested", "order_id": "{value}", "items": [{ - "id": "id_BGo88UoyoHKWcBbkcb", + "id": "id_HqGVFgkSjg9lrV0Qh", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 6 + "quantity": 30 }], - "display_id": 47, + "display_id": 5, "metadata": {} }, "exchange": { - "id": "id_tNkB7FNGrKi3uCJB", + "id": "id_VVNf9bf3b6dVB", "order_id": "{value}", - "order_version": 33, + "order_version": 48, "display_id": 45, "additional_items": [ "{value}" @@ -223,11 +223,11 @@ const myWorkflow = createWorkflow( "metadata": {} }, "claim": { - "id": "id_hzd4PDVgrGyM", - "type": "refund", + "id": "id_d6X2RIIOp9ivGaRG", + "type": "replace", "order_id": "{value}", - "order_version": 15, - "display_id": 8, + "order_version": 25, + "display_id": 45, "claim_items": [ "{value}" ], @@ -237,7 +237,7 @@ const myWorkflow = createWorkflow( "metadata": {} }, "actions": [{ - "id": "id_6Onfqr4WqboBs04", + "id": "id_iBcuePMZgQq8QEyGsUu", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -247,13 +247,13 @@ const myWorkflow = createWorkflow( "order": {}, "reference": "{value}", "reference_id": "{value}", - "action": "SHIPPING_ADD", + "action": "ITEM_UPDATE", "details": {}, "internal_note": {}, - "created_at": "2025-06-20T20:04:07.747Z", - "updated_at": "2025-06-07T00:19:14.180Z" + "created_at": "2025-07-17T15:40:58.108Z", + "updated_at": "2025-09-20T21:55:30.112Z" }], - "status": "pending", + "status": "canceled", "requested_by": {}, "requested_at": {}, "confirmed_by": {}, @@ -264,8 +264,8 @@ const myWorkflow = createWorkflow( "declined_at": {}, "canceled_by": {}, "canceled_at": {}, - "created_at": "2025-07-17T18:13:34.481Z", - "updated_at": "2025-11-12T01:53:55.596Z" + "created_at": "2025-08-31T13:41:25.318Z", + "updated_at": "2025-04-22T08:29:10.881Z" }, "input": { "return_id": "{value}", diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateRequestItemReturnWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateRequestItemReturnWorkflow/page.mdx index 3e175df00d..567fcc642a 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateRequestItemReturnWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateRequestItemReturnWorkflow/page.mdx @@ -17,29 +17,9 @@ This workflow updates an item in a return. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updateRequestItemReturnWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updateRequestItemReturnWorkflow - .runAsStep({ - input: { - "return_id": "{value}", - "action_id": "{value}", - "data": {} - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -123,6 +103,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updateRequestItemReturnWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updateRequestItemReturnWorkflow + .runAsStep({ + input: { + "return_id": "{value}", + "action_id": "{value}", + "data": {} + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateReturnShippingMethodValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateReturnShippingMethodValidationStep/page.mdx index 9d572f0414..7fff8bd837 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateReturnShippingMethodValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateReturnShippingMethodValidationStep/page.mdx @@ -26,134 +26,134 @@ const myWorkflow = createWorkflow( "action_id": "{value}" }, "orderReturn": { - "id": "id_1H288s93Un2GHXKBfB", + "id": "id_hunGIzCDgz7CmLiBg5RL", "status": "canceled", "order_id": "{value}", "items": [{ - "id": "id_RZmeeom8skLfb2mCMkSi", + "id": "id_DJzjVJ06Wh5", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 48 + "quantity": 16 }], - "display_id": 32, + "display_id": 9, "metadata": {} }, "orderChange": { - "id": "id_AWluihblfiDu", - "version": 16, + "id": "id_ceNX86lzaeJ3MpnJ", + "version": 41, "order_id": "{value}", "return_id": "{value}", "exchange_id": "{value}", "claim_id": "{value}", "order": { - "id": "id_d6DWFQUWpKU", - "version": 20, - "display_id": 45, - "status": "completed", + "id": "id_XC68fwTrgd", + "version": 26, + "display_id": 26, + "status": "archived", "currency_code": "{value}", - "created_at": "2025-09-16T12:28:13.133Z", - "updated_at": "2025-07-05T23:09:05.461Z", + "created_at": "2025-03-08T00:23:15.640Z", + "updated_at": "2025-01-21T22:56:26.777Z", "original_item_total": { - "numeric": 22 + "numeric": 10 }, "original_item_subtotal": { - "numeric": 36 + "numeric": 38 }, "original_item_tax_total": { - "numeric": 44 + "numeric": 1 }, "item_total": { - "numeric": 19 + "numeric": 41 }, "item_subtotal": { - "numeric": 31 + "numeric": 43 }, "item_tax_total": { - "numeric": 17 + "numeric": 24 }, "original_total": { - "numeric": 40 + "numeric": 49 }, "original_subtotal": { - "numeric": 9 + "numeric": 3 }, "original_tax_total": { - "numeric": 24 - }, - "total": { - "numeric": 4 - }, - "subtotal": { - "numeric": 39 - }, - "tax_total": { - "numeric": 9 - }, - "discount_subtotal": { - "numeric": 36 - }, - "discount_total": { - "numeric": 29 - }, - "discount_tax_total": { - "numeric": 47 - }, - "gift_card_total": { - "numeric": 12 - }, - "gift_card_tax_total": { - "numeric": 29 - }, - "shipping_total": { - "numeric": 39 - }, - "shipping_subtotal": { - "numeric": 8 - }, - "shipping_tax_total": { "numeric": 34 }, + "total": { + "numeric": 40 + }, + "subtotal": { + "numeric": 33 + }, + "tax_total": { + "numeric": 45 + }, + "discount_subtotal": { + "numeric": 39 + }, + "discount_total": { + "numeric": 25 + }, + "discount_tax_total": { + "numeric": 23 + }, + "gift_card_total": { + "numeric": 35 + }, + "gift_card_tax_total": { + "numeric": 3 + }, + "shipping_total": { + "numeric": 8 + }, + "shipping_subtotal": { + "numeric": 43 + }, + "shipping_tax_total": { + "numeric": 38 + }, "original_shipping_total": { - "numeric": 24 + "numeric": 29 }, "original_shipping_subtotal": { - "numeric": 16 + "numeric": 6 }, "original_shipping_tax_total": { - "numeric": 45 + "numeric": 10 } }, "return_order": { - "id": "id_qpCHr09m25KL", + "id": "id_bxbJZ0jCVmgMUcDKpd3", "status": "received", "order_id": "{value}", "items": [{ - "id": "id_1aNwcZUHycWbBO", + "id": "id_tq1iSm0ROGN", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 36 + "quantity": 46 }], - "display_id": 2, + "display_id": 20, "metadata": {} }, "exchange": { - "id": "id_LDWo4ljfQba", + "id": "id_BXojhpsA2rTz1gw4xoMu", "order_id": "{value}", - "order_version": 41, - "display_id": 45, + "order_version": 16, + "display_id": 19, "additional_items": [ "{value}" ], "metadata": {} }, "claim": { - "id": "id_ZYHpus6e649X9lUx", - "type": "replace", + "id": "id_Nfz1ab4HjUTSCqY", + "type": "refund", "order_id": "{value}", - "order_version": 40, - "display_id": 44, + "order_version": 3, + "display_id": 9, "claim_items": [ "{value}" ], @@ -163,7 +163,7 @@ const myWorkflow = createWorkflow( "metadata": {} }, "actions": [{ - "id": "id_ILFmvZLkk7DS1RUM", + "id": "id_6C6GTq2G0tlm", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -173,13 +173,13 @@ const myWorkflow = createWorkflow( "order": {}, "reference": "{value}", "reference_id": "{value}", - "action": "ITEM_UPDATE", + "action": "DELIVER_ITEM", "details": {}, "internal_note": {}, - "created_at": "2025-01-26T08:13:10.656Z", - "updated_at": "2025-06-10T06:39:36.491Z" + "created_at": "2025-04-28T09:25:33.686Z", + "updated_at": "2026-01-07T19:20:20.102Z" }], - "status": "pending", + "status": "canceled", "requested_by": {}, "requested_at": {}, "confirmed_by": {}, @@ -190,8 +190,8 @@ const myWorkflow = createWorkflow( "declined_at": {}, "canceled_by": {}, "canceled_at": {}, - "created_at": "2025-03-03T04:05:13.629Z", - "updated_at": "2025-06-09T06:46:21.121Z" + "created_at": "2025-03-06T16:23:16.165Z", + "updated_at": "2025-12-24T11:52:24.365Z" } }) } diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateReturnShippingMethodWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateReturnShippingMethodWorkflow/page.mdx index 1a4928a783..fe6bffa9f2 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateReturnShippingMethodWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateReturnShippingMethodWorkflow/page.mdx @@ -17,29 +17,9 @@ This workflow updates the shipping method of a return. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updateReturnShippingMethodWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updateReturnShippingMethodWorkflow - .runAsStep({ - input: { - "return_id": "{value}", - "action_id": "{value}", - "data": {} - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -123,6 +103,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updateReturnShippingMethodWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updateReturnShippingMethodWorkflow + .runAsStep({ + input: { + "return_id": "{value}", + "action_id": "{value}", + "data": {} + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateReturnValidationStep/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateReturnValidationStep/page.mdx index f163372833..adf61e0340 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateReturnValidationStep/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateReturnValidationStep/page.mdx @@ -22,134 +22,134 @@ const myWorkflow = createWorkflow( () => { const data = updateReturnValidationStep({ "orderReturn": { - "id": "id_O7Te66pnnqn", + "id": "id_2evJL4BZ1owz", "status": "partially_received", "order_id": "{value}", "items": [{ - "id": "id_velb3kTiwiSqkT9Mp", + "id": "id_TQabGqjlwMDLFcptm", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 22 + "quantity": 14 }], - "display_id": 23, + "display_id": 40, "metadata": {} }, "orderChange": { - "id": "id_GDhWR0ObQV", - "version": 3, + "id": "id_Vfle2SgEU49jGSsL", + "version": 30, "order_id": "{value}", "return_id": "{value}", "exchange_id": "{value}", "claim_id": "{value}", "order": { - "id": "id_P8CEQWdNJA6sz", - "version": 26, - "display_id": 1, - "status": "draft", + "id": "id_wLM6l2kAaysfcL1WVs", + "version": 25, + "display_id": 0, + "status": "pending", "currency_code": "{value}", - "created_at": "2025-12-22T15:14:30.421Z", - "updated_at": "2025-10-21T15:22:36.242Z", + "created_at": "2025-05-21T21:54:54.627Z", + "updated_at": "2025-11-04T09:40:08.538Z", "original_item_total": { - "numeric": 15 + "numeric": 2 }, "original_item_subtotal": { - "numeric": 48 + "numeric": 18 }, "original_item_tax_total": { "numeric": 1 }, "item_total": { - "numeric": 45 + "numeric": 2 }, "item_subtotal": { - "numeric": 47 - }, - "item_tax_total": { - "numeric": 43 - }, - "original_total": { - "numeric": 32 - }, - "original_subtotal": { - "numeric": 13 - }, - "original_tax_total": { - "numeric": 28 - }, - "total": { - "numeric": 4 - }, - "subtotal": { - "numeric": 36 - }, - "tax_total": { - "numeric": 13 - }, - "discount_subtotal": { - "numeric": 27 - }, - "discount_total": { - "numeric": 14 - }, - "discount_tax_total": { - "numeric": 48 - }, - "gift_card_total": { - "numeric": 44 - }, - "gift_card_tax_total": { - "numeric": 38 - }, - "shipping_total": { - "numeric": 8 - }, - "shipping_subtotal": { - "numeric": 31 - }, - "shipping_tax_total": { - "numeric": 16 - }, - "original_shipping_total": { - "numeric": 20 - }, - "original_shipping_subtotal": { "numeric": 6 }, + "item_tax_total": { + "numeric": 8 + }, + "original_total": { + "numeric": 7 + }, + "original_subtotal": { + "numeric": 27 + }, + "original_tax_total": { + "numeric": 9 + }, + "total": { + "numeric": 36 + }, + "subtotal": { + "numeric": 48 + }, + "tax_total": { + "numeric": 3 + }, + "discount_subtotal": { + "numeric": 14 + }, + "discount_total": { + "numeric": 9 + }, + "discount_tax_total": { + "numeric": 45 + }, + "gift_card_total": { + "numeric": 26 + }, + "gift_card_tax_total": { + "numeric": 44 + }, + "shipping_total": { + "numeric": 14 + }, + "shipping_subtotal": { + "numeric": 6 + }, + "shipping_tax_total": { + "numeric": 8 + }, + "original_shipping_total": { + "numeric": 3 + }, + "original_shipping_subtotal": { + "numeric": 7 + }, "original_shipping_tax_total": { - "numeric": 39 + "numeric": 23 } }, "return_order": { - "id": "id_MPYJYazYo3EL5bh8s3II", - "status": "requested", + "id": "id_kKbjQY4L5hZsQXy5t", + "status": "received", "order_id": "{value}", "items": [{ - "id": "id_Qlug8FoRqGug7Eo6wlCh", + "id": "id_NVDhJfT79Kvnsc", "return_id": "{value}", "order_id": "{value}", "item_id": "{value}", - "quantity": 14 + "quantity": 40 }], - "display_id": 40, + "display_id": 35, "metadata": {} }, "exchange": { - "id": "id_2sOnI8oW6C", + "id": "id_EXP7KR1aRB", "order_id": "{value}", - "order_version": 30, - "display_id": 49, + "order_version": 45, + "display_id": 30, "additional_items": [ "{value}" ], "metadata": {} }, "claim": { - "id": "id_ZgMkqjfu9Gq0Vn99e", - "type": "refund", + "id": "id_DuhuR1jbW4gk8xGHS", + "type": "replace", "order_id": "{value}", - "order_version": 46, - "display_id": 7, + "order_version": 47, + "display_id": 27, "claim_items": [ "{value}" ], @@ -159,7 +159,7 @@ const myWorkflow = createWorkflow( "metadata": {} }, "actions": [{ - "id": "id_sDa8cdYlSFBQKgv3sOR", + "id": "id_Y1uEO7R8zjHupgUA", "order_change_id": {}, "order_change": {}, "order_id": {}, @@ -169,13 +169,13 @@ const myWorkflow = createWorkflow( "order": {}, "reference": "{value}", "reference_id": "{value}", - "action": "REINSTATE_ITEM", + "action": "DELIVER_ITEM", "details": {}, "internal_note": {}, - "created_at": "2025-02-16T09:11:26.548Z", - "updated_at": "2026-01-05T02:56:11.057Z" + "created_at": "2025-06-15T23:47:24.417Z", + "updated_at": "2025-03-17T10:35:44.511Z" }], - "status": "canceled", + "status": "pending", "requested_by": {}, "requested_at": {}, "confirmed_by": {}, @@ -186,8 +186,8 @@ const myWorkflow = createWorkflow( "declined_at": {}, "canceled_by": {}, "canceled_at": {}, - "created_at": "2025-02-20T02:11:32.671Z", - "updated_at": "2025-09-01T14:59:14.138Z" + "created_at": "2025-12-06T04:14:48.685Z", + "updated_at": "2025-01-26T13:49:03.756Z" } }) } diff --git a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateReturnWorkflow/page.mdx b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateReturnWorkflow/page.mdx index e13a68059a..8d20ec79bb 100644 --- a/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateReturnWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Order/Workflows_Order/functions/core_flows.Order.Workflows_Order.updateReturnWorkflow/page.mdx @@ -17,27 +17,9 @@ This workflow updates a return. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updateReturnWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updateReturnWorkflow - .runAsStep({ - input: { - "return_id": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -115,6 +97,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updateReturnWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updateReturnWorkflow + .runAsStep({ + input: { + "return_id": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Payment/Steps_Payment/functions/core_flows.Payment.Steps_Payment.authorizePaymentSessionStep/page.mdx b/www/apps/resources/references/core_flows/Payment/Steps_Payment/functions/core_flows.Payment.Steps_Payment.authorizePaymentSessionStep/page.mdx index c0c703d147..3648aa5def 100644 --- a/www/apps/resources/references/core_flows/Payment/Steps_Payment/functions/core_flows.Payment.Steps_Payment.authorizePaymentSessionStep/page.mdx +++ b/www/apps/resources/references/core_flows/Payment/Steps_Payment/functions/core_flows.Payment.Steps_Payment.authorizePaymentSessionStep/page.mdx @@ -23,7 +23,7 @@ const myWorkflow = createWorkflow( "my-workflow", () => { const data = authorizePaymentSessionStep({ - "id": "id_cpyzzC1vpvWlnvyG", + "id": "id_mblMkAPH6xCKNTKdmeW", "context": "{value}" }) } diff --git a/www/apps/resources/references/core_flows/Payment/Steps_Payment/functions/core_flows.Payment.Steps_Payment.refundPaymentsStep/page.mdx b/www/apps/resources/references/core_flows/Payment/Steps_Payment/functions/core_flows.Payment.Steps_Payment.refundPaymentsStep/page.mdx index 06655471b0..5af1e77889 100644 --- a/www/apps/resources/references/core_flows/Payment/Steps_Payment/functions/core_flows.Payment.Steps_Payment.refundPaymentsStep/page.mdx +++ b/www/apps/resources/references/core_flows/Payment/Steps_Payment/functions/core_flows.Payment.Steps_Payment.refundPaymentsStep/page.mdx @@ -24,7 +24,7 @@ const myWorkflow = createWorkflow( () => { const data = refundPaymentsStep([{ "payment_id": "{value}", - "amount": 34 + "amount": 35 }]) } ) diff --git a/www/apps/resources/references/core_flows/Payment/Workflows_Payment/functions/core_flows.Payment.Workflows_Payment.capturePaymentWorkflow/page.mdx b/www/apps/resources/references/core_flows/Payment/Workflows_Payment/functions/core_flows.Payment.Workflows_Payment.capturePaymentWorkflow/page.mdx index ee8deeefed..764ef6dec2 100644 --- a/www/apps/resources/references/core_flows/Payment/Workflows_Payment/functions/core_flows.Payment.Workflows_Payment.capturePaymentWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Payment/Workflows_Payment/functions/core_flows.Payment.Workflows_Payment.capturePaymentWorkflow/page.mdx @@ -19,27 +19,9 @@ This workflow captures a payment. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { capturePaymentWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = capturePaymentWorkflow - .runAsStep({ - input: { - "payment_id": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -117,6 +99,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { capturePaymentWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = capturePaymentWorkflow + .runAsStep({ + input: { + "payment_id": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Payment/Workflows_Payment/functions/core_flows.Payment.Workflows_Payment.processPaymentWorkflow/page.mdx b/www/apps/resources/references/core_flows/Payment/Workflows_Payment/functions/core_flows.Payment.Workflows_Payment.processPaymentWorkflow/page.mdx index e02e4586e0..d7787a8816 100644 --- a/www/apps/resources/references/core_flows/Payment/Workflows_Payment/functions/core_flows.Payment.Workflows_Payment.processPaymentWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Payment/Workflows_Payment/functions/core_flows.Payment.Workflows_Payment.processPaymentWorkflow/page.mdx @@ -19,25 +19,9 @@ This documentation provides a reference to the `processPaymentWorkflow`. It belo +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { processPaymentWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = processPaymentWorkflow - .runAsStep({ - input: "{value}" - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -109,6 +93,24 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { processPaymentWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = processPaymentWorkflow + .runAsStep({ + input: "{value}" + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Payment/Workflows_Payment/functions/core_flows.Payment.Workflows_Payment.refundPaymentWorkflow/page.mdx b/www/apps/resources/references/core_flows/Payment/Workflows_Payment/functions/core_flows.Payment.Workflows_Payment.refundPaymentWorkflow/page.mdx index 5ac80740f9..dc05a50a89 100644 --- a/www/apps/resources/references/core_flows/Payment/Workflows_Payment/functions/core_flows.Payment.Workflows_Payment.refundPaymentWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Payment/Workflows_Payment/functions/core_flows.Payment.Workflows_Payment.refundPaymentWorkflow/page.mdx @@ -19,27 +19,9 @@ This workflow refunds a payment. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { refundPaymentWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = refundPaymentWorkflow - .runAsStep({ - input: { - "payment_id": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -117,6 +99,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { refundPaymentWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = refundPaymentWorkflow + .runAsStep({ + input: { + "payment_id": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Payment/Workflows_Payment/functions/core_flows.Payment.Workflows_Payment.refundPaymentsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Payment/Workflows_Payment/functions/core_flows.Payment.Workflows_Payment.refundPaymentsWorkflow/page.mdx index 057fd50605..8bb4837710 100644 --- a/www/apps/resources/references/core_flows/Payment/Workflows_Payment/functions/core_flows.Payment.Workflows_Payment.refundPaymentsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Payment/Workflows_Payment/functions/core_flows.Payment.Workflows_Payment.refundPaymentsWorkflow/page.mdx @@ -19,27 +19,9 @@ This workflow refunds a payment. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { refundPaymentsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = refundPaymentsWorkflow - .runAsStep({ - input: [ - "{value}" - ] - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -117,6 +99,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { refundPaymentsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = refundPaymentsWorkflow + .runAsStep({ + input: [ + "{value}" + ] + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Payment/Workflows_Payment/functions/core_flows.Payment.Workflows_Payment.validatePaymentsRefundStep/page.mdx b/www/apps/resources/references/core_flows/Payment/Workflows_Payment/functions/core_flows.Payment.Workflows_Payment.validatePaymentsRefundStep/page.mdx index 51285f949d..1b86f1053a 100644 --- a/www/apps/resources/references/core_flows/Payment/Workflows_Payment/functions/core_flows.Payment.Workflows_Payment.validatePaymentsRefundStep/page.mdx +++ b/www/apps/resources/references/core_flows/Payment/Workflows_Payment/functions/core_flows.Payment.Workflows_Payment.validatePaymentsRefundStep/page.mdx @@ -22,9 +22,9 @@ const myWorkflow = createWorkflow( () => { const data = validatePaymentsRefundStep({ "payments": [{ - "id": "id_ODsnOXBeLxMx6TmCL", + "id": "id_l7v1MUQtttStTN", "amount": { - "numeric": 11 + "numeric": 28 }, "currency_code": "{value}", "provider_id": "{value}", diff --git a/www/apps/resources/references/core_flows/Payment/Workflows_Payment/functions/core_flows.Payment.Workflows_Payment.validateRefundStep/page.mdx b/www/apps/resources/references/core_flows/Payment/Workflows_Payment/functions/core_flows.Payment.Workflows_Payment.validateRefundStep/page.mdx index 8aa3cbe97d..505c01edd6 100644 --- a/www/apps/resources/references/core_flows/Payment/Workflows_Payment/functions/core_flows.Payment.Workflows_Payment.validateRefundStep/page.mdx +++ b/www/apps/resources/references/core_flows/Payment/Workflows_Payment/functions/core_flows.Payment.Workflows_Payment.validateRefundStep/page.mdx @@ -22,87 +22,87 @@ const myWorkflow = createWorkflow( () => { const data = validateRefundStep({ "order": { - "id": "id_SnDmwjH43O", - "version": 41, - "display_id": 39, - "status": "pending", + "id": "id_ScT29ulv8OCuFN", + "version": 31, + "display_id": 24, + "status": "draft", "currency_code": "{value}", - "created_at": "2025-12-01T11:41:53.070Z", - "updated_at": "2025-04-27T19:25:36.271Z", + "created_at": "2025-11-03T11:49:09.128Z", + "updated_at": "2025-10-23T16:49:38.203Z", "original_item_total": { - "numeric": 46 + "numeric": 43 }, "original_item_subtotal": { - "numeric": 37 - }, - "original_item_tax_total": { - "numeric": 22 - }, - "item_total": { - "numeric": 41 - }, - "item_subtotal": { - "numeric": 25 - }, - "item_tax_total": { - "numeric": 41 - }, - "original_total": { - "numeric": 1 - }, - "original_subtotal": { - "numeric": 32 - }, - "original_tax_total": { - "numeric": 7 - }, - "total": { "numeric": 49 }, - "subtotal": { - "numeric": 36 + "original_item_tax_total": { + "numeric": 47 }, - "tax_total": { + "item_total": { + "numeric": 21 + }, + "item_subtotal": { "numeric": 46 }, - "discount_subtotal": { + "item_tax_total": { + "numeric": 23 + }, + "original_total": { + "numeric": 19 + }, + "original_subtotal": { + "numeric": 12 + }, + "original_tax_total": { + "numeric": 5 + }, + "total": { + "numeric": 9 + }, + "subtotal": { "numeric": 0 }, + "tax_total": { + "numeric": 24 + }, + "discount_subtotal": { + "numeric": 40 + }, "discount_total": { - "numeric": 29 + "numeric": 32 }, "discount_tax_total": { - "numeric": 29 + "numeric": 37 }, "gift_card_total": { - "numeric": 13 + "numeric": 37 }, "gift_card_tax_total": { - "numeric": 8 + "numeric": 1 }, "shipping_total": { - "numeric": 25 + "numeric": 13 }, "shipping_subtotal": { - "numeric": 8 + "numeric": 4 }, "shipping_tax_total": { - "numeric": 39 + "numeric": 1 }, "original_shipping_total": { - "numeric": 16 + "numeric": 41 }, "original_shipping_subtotal": { - "numeric": 34 + "numeric": 28 }, "original_shipping_tax_total": { - "numeric": 40 + "numeric": 1 } }, "payment": { - "id": "id_qhgdoZijFUl9AZ1e4L", + "id": "id_wQ7DWNOU1Vhpofgzrs", "amount": { - "numeric": 37 + "numeric": 49 }, "currency_code": "{value}", "provider_id": "{value}", diff --git a/www/apps/resources/references/core_flows/Payment_Collection/Steps_Payment_Collection/functions/core_flows.Payment_Collection.Steps_Payment_Collection.createPaymentSessionStep/page.mdx b/www/apps/resources/references/core_flows/Payment_Collection/Steps_Payment_Collection/functions/core_flows.Payment_Collection.Steps_Payment_Collection.createPaymentSessionStep/page.mdx index e9aab0cab7..b051cf5c24 100644 --- a/www/apps/resources/references/core_flows/Payment_Collection/Steps_Payment_Collection/functions/core_flows.Payment_Collection.Steps_Payment_Collection.createPaymentSessionStep/page.mdx +++ b/www/apps/resources/references/core_flows/Payment_Collection/Steps_Payment_Collection/functions/core_flows.Payment_Collection.Steps_Payment_Collection.createPaymentSessionStep/page.mdx @@ -24,7 +24,7 @@ const myWorkflow = createWorkflow( const data = createPaymentSessionStep({ "payment_collection_id": "{value}", "provider_id": "{value}", - "amount": 33, + "amount": 19, "currency_code": "{value}" }) } diff --git a/www/apps/resources/references/core_flows/Payment_Collection/Steps_Payment_Collection/functions/core_flows.Payment_Collection.Steps_Payment_Collection.deletePaymentSessionsStep/page.mdx b/www/apps/resources/references/core_flows/Payment_Collection/Steps_Payment_Collection/functions/core_flows.Payment_Collection.Steps_Payment_Collection.deletePaymentSessionsStep/page.mdx index d34f136e4b..70b3a9e082 100644 --- a/www/apps/resources/references/core_flows/Payment_Collection/Steps_Payment_Collection/functions/core_flows.Payment_Collection.Steps_Payment_Collection.deletePaymentSessionsStep/page.mdx +++ b/www/apps/resources/references/core_flows/Payment_Collection/Steps_Payment_Collection/functions/core_flows.Payment_Collection.Steps_Payment_Collection.deletePaymentSessionsStep/page.mdx @@ -27,7 +27,7 @@ const myWorkflow = createWorkflow( () => { const data = deletePaymentSessionsStep({ "ids": [ - "id_ZiHvA7WzATXPumiufO" + "id_QxSjef3Zul2L7Zc" ] }) } diff --git a/www/apps/resources/references/core_flows/Payment_Collection/Steps_Payment_Collection/functions/core_flows.Payment_Collection.Steps_Payment_Collection.updateRefundReasonsStep/page.mdx b/www/apps/resources/references/core_flows/Payment_Collection/Steps_Payment_Collection/functions/core_flows.Payment_Collection.Steps_Payment_Collection.updateRefundReasonsStep/page.mdx index b954fb5a4d..451a562db9 100644 --- a/www/apps/resources/references/core_flows/Payment_Collection/Steps_Payment_Collection/functions/core_flows.Payment_Collection.Steps_Payment_Collection.updateRefundReasonsStep/page.mdx +++ b/www/apps/resources/references/core_flows/Payment_Collection/Steps_Payment_Collection/functions/core_flows.Payment_Collection.Steps_Payment_Collection.updateRefundReasonsStep/page.mdx @@ -22,7 +22,7 @@ const myWorkflow = createWorkflow( "my-workflow", () => { const data = updateRefundReasonsStep([{ - "id": "id_FNKHDZhR2NkL4s" + "id": "id_nO2vUPhZq8BiFSg0U19" }]) } ) diff --git a/www/apps/resources/references/core_flows/Payment_Collection/Workflows_Payment_Collection/functions/core_flows.Payment_Collection.Workflows_Payment_Collection.createPaymentSessionsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Payment_Collection/Workflows_Payment_Collection/functions/core_flows.Payment_Collection.Workflows_Payment_Collection.createPaymentSessionsWorkflow/page.mdx index eca5c0004b..fa8dc93528 100644 --- a/www/apps/resources/references/core_flows/Payment_Collection/Workflows_Payment_Collection/functions/core_flows.Payment_Collection.Workflows_Payment_Collection.createPaymentSessionsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Payment_Collection/Workflows_Payment_Collection/functions/core_flows.Payment_Collection.Workflows_Payment_Collection.createPaymentSessionsWorkflow/page.mdx @@ -18,28 +18,9 @@ This workflow creates payment sessions. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createPaymentSessionsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createPaymentSessionsWorkflow - .runAsStep({ - input: { - "payment_collection_id": "{value}", - "provider_id": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -120,6 +101,27 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createPaymentSessionsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createPaymentSessionsWorkflow + .runAsStep({ + input: { + "payment_collection_id": "{value}", + "provider_id": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Payment_Collection/Workflows_Payment_Collection/functions/core_flows.Payment_Collection.Workflows_Payment_Collection.createRefundReasonsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Payment_Collection/Workflows_Payment_Collection/functions/core_flows.Payment_Collection.Workflows_Payment_Collection.createRefundReasonsWorkflow/page.mdx index 1945417336..06a4ab1872 100644 --- a/www/apps/resources/references/core_flows/Payment_Collection/Workflows_Payment_Collection/functions/core_flows.Payment_Collection.Workflows_Payment_Collection.createRefundReasonsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Payment_Collection/Workflows_Payment_Collection/functions/core_flows.Payment_Collection.Workflows_Payment_Collection.createRefundReasonsWorkflow/page.mdx @@ -16,29 +16,9 @@ This workflow creates one or more refund reasons. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createRefundReasonsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createRefundReasonsWorkflow - .runAsStep({ - input: { - "data": [{ - "label": "{value}" - }] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -122,6 +102,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createRefundReasonsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createRefundReasonsWorkflow + .runAsStep({ + input: { + "data": [{ + "label": "{value}" + }] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Payment_Collection/Workflows_Payment_Collection/functions/core_flows.Payment_Collection.Workflows_Payment_Collection.deletePaymentSessionsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Payment_Collection/Workflows_Payment_Collection/functions/core_flows.Payment_Collection.Workflows_Payment_Collection.deletePaymentSessionsWorkflow/page.mdx index fbaec9b91a..67e2c0bb99 100644 --- a/www/apps/resources/references/core_flows/Payment_Collection/Workflows_Payment_Collection/functions/core_flows.Payment_Collection.Workflows_Payment_Collection.deletePaymentSessionsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Payment_Collection/Workflows_Payment_Collection/functions/core_flows.Payment_Collection.Workflows_Payment_Collection.deletePaymentSessionsWorkflow/page.mdx @@ -17,29 +17,9 @@ This workflow deletes one or more payment sessions. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { deletePaymentSessionsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = deletePaymentSessionsWorkflow - .runAsStep({ - input: { - "ids": [ - "id_jc18njeeCWjJVTJi" - ] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -57,7 +37,7 @@ export async function POST( .run({ input: { "ids": [ - "id_jc18njeeCWjJVTJi" + "id_g3yXlIZ216xQAswr" ] } }) @@ -84,7 +64,7 @@ export default async function handleOrderPlaced({ .run({ input: { "ids": [ - "id_jc18njeeCWjJVTJi" + "id_g3yXlIZ216xQAswr" ] } }) @@ -111,7 +91,7 @@ export default async function myCustomJob( .run({ input: { "ids": [ - "id_jc18njeeCWjJVTJi" + "id_g3yXlIZ216xQAswr" ] } }) @@ -123,6 +103,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { deletePaymentSessionsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = deletePaymentSessionsWorkflow + .runAsStep({ + input: { + "ids": [ + "id_g3yXlIZ216xQAswr" + ] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Payment_Collection/Workflows_Payment_Collection/functions/core_flows.Payment_Collection.Workflows_Payment_Collection.updateRefundReasonsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Payment_Collection/Workflows_Payment_Collection/functions/core_flows.Payment_Collection.Workflows_Payment_Collection.updateRefundReasonsWorkflow/page.mdx index 4a167a45f4..6f75489dc0 100644 --- a/www/apps/resources/references/core_flows/Payment_Collection/Workflows_Payment_Collection/functions/core_flows.Payment_Collection.Workflows_Payment_Collection.updateRefundReasonsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Payment_Collection/Workflows_Payment_Collection/functions/core_flows.Payment_Collection.Workflows_Payment_Collection.updateRefundReasonsWorkflow/page.mdx @@ -16,27 +16,9 @@ This workflow updates one or more refund reasons. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updateRefundReasonsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updateRefundReasonsWorkflow - .runAsStep({ - input: [{ - "id": "id_mnvi8ggaPgf4IBd3E4G" - }] - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -53,7 +35,7 @@ export async function POST( const { result } = await updateRefundReasonsWorkflow(req.scope) .run({ input: [{ - "id": "id_mnvi8ggaPgf4IBd3E4G" + "id": "id_Nv7EMvq4c6sb" }] }) @@ -78,7 +60,7 @@ export default async function handleOrderPlaced({ const { result } = await updateRefundReasonsWorkflow(container) .run({ input: [{ - "id": "id_mnvi8ggaPgf4IBd3E4G" + "id": "id_Nv7EMvq4c6sb" }] }) @@ -103,7 +85,7 @@ export default async function myCustomJob( const { result } = await updateRefundReasonsWorkflow(container) .run({ input: [{ - "id": "id_mnvi8ggaPgf4IBd3E4G" + "id": "id_Nv7EMvq4c6sb" }] }) @@ -114,6 +96,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updateRefundReasonsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updateRefundReasonsWorkflow + .runAsStep({ + input: [{ + "id": "id_Nv7EMvq4c6sb" + }] + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Price_List/Steps_Price_List/functions/core_flows.Price_List.Steps_Price_List.createPriceListPricesStep/page.mdx b/www/apps/resources/references/core_flows/Price_List/Steps_Price_List/functions/core_flows.Price_List.Steps_Price_List.createPriceListPricesStep/page.mdx index 5e7006e96b..3492246e9a 100644 --- a/www/apps/resources/references/core_flows/Price_List/Steps_Price_List/functions/core_flows.Price_List.Steps_Price_List.createPriceListPricesStep/page.mdx +++ b/www/apps/resources/references/core_flows/Price_List/Steps_Price_List/functions/core_flows.Price_List.Steps_Price_List.createPriceListPricesStep/page.mdx @@ -24,7 +24,7 @@ const myWorkflow = createWorkflow( const data = createPriceListPricesStep({ "data": [{ "data": "{value}", - "id": "id_C48noulkhx8" + "id": "id_HdzlBpHUS24GjBbyImWt" }], "variant_price_map": "{value}" }) diff --git a/www/apps/resources/references/core_flows/Price_List/Steps_Price_List/functions/core_flows.Price_List.Steps_Price_List.createPriceListsStep/page.mdx b/www/apps/resources/references/core_flows/Price_List/Steps_Price_List/functions/core_flows.Price_List.Steps_Price_List.createPriceListsStep/page.mdx index 5b8517da3d..033786c2fa 100644 --- a/www/apps/resources/references/core_flows/Price_List/Steps_Price_List/functions/core_flows.Price_List.Steps_Price_List.createPriceListsStep/page.mdx +++ b/www/apps/resources/references/core_flows/Price_List/Steps_Price_List/functions/core_flows.Price_List.Steps_Price_List.createPriceListsStep/page.mdx @@ -23,8 +23,8 @@ const myWorkflow = createWorkflow( () => { const data = createPriceListsStep({ "data": [{ - "title": "adficio", - "description": "Decipio atrox amor undique." + "title": "exercitationem", + "description": "Sustineo quasi vir solus terga coniecto adaugeo vulariter." }], "variant_price_map": "{value}" }) diff --git a/www/apps/resources/references/core_flows/Price_List/Steps_Price_List/functions/core_flows.Price_List.Steps_Price_List.updatePriceListsStep/page.mdx b/www/apps/resources/references/core_flows/Price_List/Steps_Price_List/functions/core_flows.Price_List.Steps_Price_List.updatePriceListsStep/page.mdx index 1adc56ca9a..65b9b8c099 100644 --- a/www/apps/resources/references/core_flows/Price_List/Steps_Price_List/functions/core_flows.Price_List.Steps_Price_List.updatePriceListsStep/page.mdx +++ b/www/apps/resources/references/core_flows/Price_List/Steps_Price_List/functions/core_flows.Price_List.Steps_Price_List.updatePriceListsStep/page.mdx @@ -22,7 +22,7 @@ const myWorkflow = createWorkflow( "my-workflow", () => { const data = updatePriceListsStep([{ - "id": "id_RAxowWxYMJ" + "id": "id_b5Ph4o1klLIQILA8AtE" }]) } ) diff --git a/www/apps/resources/references/core_flows/Price_List/Workflows_Price_List/functions/core_flows.Price_List.Workflows_Price_List.batchPriceListPricesWorkflow/page.mdx b/www/apps/resources/references/core_flows/Price_List/Workflows_Price_List/functions/core_flows.Price_List.Workflows_Price_List.batchPriceListPricesWorkflow/page.mdx index db9e969fda..0eb55d368c 100644 --- a/www/apps/resources/references/core_flows/Price_List/Workflows_Price_List/functions/core_flows.Price_List.Workflows_Price_List.batchPriceListPricesWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Price_List/Workflows_Price_List/functions/core_flows.Price_List.Workflows_Price_List.batchPriceListPricesWorkflow/page.mdx @@ -17,41 +17,9 @@ This workflow manages price lists' prices by creating, updating, or removing the +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { batchPriceListPricesWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = batchPriceListPricesWorkflow - .runAsStep({ - input: { - "data": { - "id": "id_aAp3paTs1g1NfI23b8", - "create": [{ - "amount": 37, - "currency_code": "{value}", - "variant_id": "{value}" - }], - "update": [{ - "id": "id_q4lfsr9lMLr1lgl4", - "variant_id": "{value}" - }], - "delete": [ - "{value}" - ] - } - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -69,14 +37,14 @@ export async function POST( .run({ input: { "data": { - "id": "id_aAp3paTs1g1NfI23b8", + "id": "id_b8sZyHlUz2xk85oDi", "create": [{ - "amount": 37, + "amount": 17, "currency_code": "{value}", "variant_id": "{value}" }], "update": [{ - "id": "id_q4lfsr9lMLr1lgl4", + "id": "id_6Zq593sG3BLJdugPLj9e", "variant_id": "{value}" }], "delete": [ @@ -108,14 +76,14 @@ export default async function handleOrderPlaced({ .run({ input: { "data": { - "id": "id_aAp3paTs1g1NfI23b8", + "id": "id_b8sZyHlUz2xk85oDi", "create": [{ - "amount": 37, + "amount": 17, "currency_code": "{value}", "variant_id": "{value}" }], "update": [{ - "id": "id_q4lfsr9lMLr1lgl4", + "id": "id_6Zq593sG3BLJdugPLj9e", "variant_id": "{value}" }], "delete": [ @@ -147,14 +115,14 @@ export default async function myCustomJob( .run({ input: { "data": { - "id": "id_aAp3paTs1g1NfI23b8", + "id": "id_b8sZyHlUz2xk85oDi", "create": [{ - "amount": 37, + "amount": 17, "currency_code": "{value}", "variant_id": "{value}" }], "update": [{ - "id": "id_q4lfsr9lMLr1lgl4", + "id": "id_6Zq593sG3BLJdugPLj9e", "variant_id": "{value}" }], "delete": [ @@ -171,6 +139,40 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { batchPriceListPricesWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = batchPriceListPricesWorkflow + .runAsStep({ + input: { + "data": { + "id": "id_b8sZyHlUz2xk85oDi", + "create": [{ + "amount": 17, + "currency_code": "{value}", + "variant_id": "{value}" + }], + "update": [{ + "id": "id_6Zq593sG3BLJdugPLj9e", + "variant_id": "{value}" + }], + "delete": [ + "{value}" + ] + } + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Price_List/Workflows_Price_List/functions/core_flows.Price_List.Workflows_Price_List.createPriceListPricesWorkflow/page.mdx b/www/apps/resources/references/core_flows/Price_List/Workflows_Price_List/functions/core_flows.Price_List.Workflows_Price_List.createPriceListPricesWorkflow/page.mdx index a35cec073c..fe7462da3f 100644 --- a/www/apps/resources/references/core_flows/Price_List/Workflows_Price_List/functions/core_flows.Price_List.Workflows_Price_List.createPriceListPricesWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Price_List/Workflows_Price_List/functions/core_flows.Price_List.Workflows_Price_List.createPriceListPricesWorkflow/page.mdx @@ -17,34 +17,9 @@ This workflow creates prices in price lists. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createPriceListPricesWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createPriceListPricesWorkflow - .runAsStep({ - input: { - "data": [{ - "id": "id_zXurVk5yn6QDucPnh", - "prices": [{ - "amount": 9, - "currency_code": "{value}", - "variant_id": "{value}" - }] - }] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -62,9 +37,9 @@ export async function POST( .run({ input: { "data": [{ - "id": "id_zXurVk5yn6QDucPnh", + "id": "id_6wrskj2wsvwv6N", "prices": [{ - "amount": 9, + "amount": 33, "currency_code": "{value}", "variant_id": "{value}" }] @@ -94,9 +69,9 @@ export default async function handleOrderPlaced({ .run({ input: { "data": [{ - "id": "id_zXurVk5yn6QDucPnh", + "id": "id_6wrskj2wsvwv6N", "prices": [{ - "amount": 9, + "amount": 33, "currency_code": "{value}", "variant_id": "{value}" }] @@ -126,9 +101,9 @@ export default async function myCustomJob( .run({ input: { "data": [{ - "id": "id_zXurVk5yn6QDucPnh", + "id": "id_6wrskj2wsvwv6N", "prices": [{ - "amount": 9, + "amount": 33, "currency_code": "{value}", "variant_id": "{value}" }] @@ -143,6 +118,33 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createPriceListPricesWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createPriceListPricesWorkflow + .runAsStep({ + input: { + "data": [{ + "id": "id_6wrskj2wsvwv6N", + "prices": [{ + "amount": 33, + "currency_code": "{value}", + "variant_id": "{value}" + }] + }] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Price_List/Workflows_Price_List/functions/core_flows.Price_List.Workflows_Price_List.createPriceListsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Price_List/Workflows_Price_List/functions/core_flows.Price_List.Workflows_Price_List.createPriceListsWorkflow/page.mdx index d7e7ecd390..e0f3734f32 100644 --- a/www/apps/resources/references/core_flows/Price_List/Workflows_Price_List/functions/core_flows.Price_List.Workflows_Price_List.createPriceListsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Price_List/Workflows_Price_List/functions/core_flows.Price_List.Workflows_Price_List.createPriceListsWorkflow/page.mdx @@ -17,30 +17,9 @@ This workflow creates one or more price lists. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createPriceListsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createPriceListsWorkflow - .runAsStep({ - input: { - "price_lists_data": [{ - "title": "iste", - "description": "Auxilium aurum aetas territo spero caelum." - }] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -58,8 +37,8 @@ export async function POST( .run({ input: { "price_lists_data": [{ - "title": "iste", - "description": "Auxilium aurum aetas territo spero caelum." + "title": "umquam", + "description": "Culpo carbo stillicidium natus tandem." }] } }) @@ -86,8 +65,8 @@ export default async function handleOrderPlaced({ .run({ input: { "price_lists_data": [{ - "title": "iste", - "description": "Auxilium aurum aetas territo spero caelum." + "title": "umquam", + "description": "Culpo carbo stillicidium natus tandem." }] } }) @@ -114,8 +93,8 @@ export default async function myCustomJob( .run({ input: { "price_lists_data": [{ - "title": "iste", - "description": "Auxilium aurum aetas territo spero caelum." + "title": "umquam", + "description": "Culpo carbo stillicidium natus tandem." }] } }) @@ -127,6 +106,29 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createPriceListsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createPriceListsWorkflow + .runAsStep({ + input: { + "price_lists_data": [{ + "title": "umquam", + "description": "Culpo carbo stillicidium natus tandem." + }] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Price_List/Workflows_Price_List/functions/core_flows.Price_List.Workflows_Price_List.deletePriceListsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Price_List/Workflows_Price_List/functions/core_flows.Price_List.Workflows_Price_List.deletePriceListsWorkflow/page.mdx index 57f7f029d5..96b7104363 100644 --- a/www/apps/resources/references/core_flows/Price_List/Workflows_Price_List/functions/core_flows.Price_List.Workflows_Price_List.deletePriceListsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Price_List/Workflows_Price_List/functions/core_flows.Price_List.Workflows_Price_List.deletePriceListsWorkflow/page.mdx @@ -16,29 +16,9 @@ This workflow deletes one or more price lists. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { deletePriceListsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = deletePriceListsWorkflow - .runAsStep({ - input: { - "ids": [ - "id_OlqqAWJ25zTNRQMJC" - ] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -56,7 +36,7 @@ export async function POST( .run({ input: { "ids": [ - "id_OlqqAWJ25zTNRQMJC" + "id_J6IDEsXLSaiDu" ] } }) @@ -83,7 +63,7 @@ export default async function handleOrderPlaced({ .run({ input: { "ids": [ - "id_OlqqAWJ25zTNRQMJC" + "id_J6IDEsXLSaiDu" ] } }) @@ -110,7 +90,7 @@ export default async function myCustomJob( .run({ input: { "ids": [ - "id_OlqqAWJ25zTNRQMJC" + "id_J6IDEsXLSaiDu" ] } }) @@ -122,6 +102,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { deletePriceListsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = deletePriceListsWorkflow + .runAsStep({ + input: { + "ids": [ + "id_J6IDEsXLSaiDu" + ] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Price_List/Workflows_Price_List/functions/core_flows.Price_List.Workflows_Price_List.removePriceListPricesWorkflow/page.mdx b/www/apps/resources/references/core_flows/Price_List/Workflows_Price_List/functions/core_flows.Price_List.Workflows_Price_List.removePriceListPricesWorkflow/page.mdx index 17693423f7..f1816c2bee 100644 --- a/www/apps/resources/references/core_flows/Price_List/Workflows_Price_List/functions/core_flows.Price_List.Workflows_Price_List.removePriceListPricesWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Price_List/Workflows_Price_List/functions/core_flows.Price_List.Workflows_Price_List.removePriceListPricesWorkflow/page.mdx @@ -16,29 +16,9 @@ This workflow removes price lists' prices. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { removePriceListPricesWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = removePriceListPricesWorkflow - .runAsStep({ - input: { - "ids": [ - "id_CwPYlh13yMc3EZ" - ] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -56,7 +36,7 @@ export async function POST( .run({ input: { "ids": [ - "id_CwPYlh13yMc3EZ" + "id_Og631tcmAj" ] } }) @@ -83,7 +63,7 @@ export default async function handleOrderPlaced({ .run({ input: { "ids": [ - "id_CwPYlh13yMc3EZ" + "id_Og631tcmAj" ] } }) @@ -110,7 +90,7 @@ export default async function myCustomJob( .run({ input: { "ids": [ - "id_CwPYlh13yMc3EZ" + "id_Og631tcmAj" ] } }) @@ -122,6 +102,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { removePriceListPricesWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = removePriceListPricesWorkflow + .runAsStep({ + input: { + "ids": [ + "id_Og631tcmAj" + ] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Price_List/Workflows_Price_List/functions/core_flows.Price_List.Workflows_Price_List.updatePriceListPricesWorkflow/page.mdx b/www/apps/resources/references/core_flows/Price_List/Workflows_Price_List/functions/core_flows.Price_List.Workflows_Price_List.updatePriceListPricesWorkflow/page.mdx index 21c8356062..78aa6d3730 100644 --- a/www/apps/resources/references/core_flows/Price_List/Workflows_Price_List/functions/core_flows.Price_List.Workflows_Price_List.updatePriceListPricesWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Price_List/Workflows_Price_List/functions/core_flows.Price_List.Workflows_Price_List.updatePriceListPricesWorkflow/page.mdx @@ -17,33 +17,9 @@ This workflow update price lists' prices. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updatePriceListPricesWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updatePriceListPricesWorkflow - .runAsStep({ - input: { - "data": [{ - "id": "id_asRgp3soMfdb9", - "prices": [{ - "id": "id_K6se4urv7eJI9l8uTjg", - "variant_id": "{value}" - }] - }] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -61,9 +37,9 @@ export async function POST( .run({ input: { "data": [{ - "id": "id_asRgp3soMfdb9", + "id": "id_KVXH6hWo4wmgEj8m4z", "prices": [{ - "id": "id_K6se4urv7eJI9l8uTjg", + "id": "id_wr7PZQ4daJ8KpVb8dHW", "variant_id": "{value}" }] }] @@ -92,9 +68,9 @@ export default async function handleOrderPlaced({ .run({ input: { "data": [{ - "id": "id_asRgp3soMfdb9", + "id": "id_KVXH6hWo4wmgEj8m4z", "prices": [{ - "id": "id_K6se4urv7eJI9l8uTjg", + "id": "id_wr7PZQ4daJ8KpVb8dHW", "variant_id": "{value}" }] }] @@ -123,9 +99,9 @@ export default async function myCustomJob( .run({ input: { "data": [{ - "id": "id_asRgp3soMfdb9", + "id": "id_KVXH6hWo4wmgEj8m4z", "prices": [{ - "id": "id_K6se4urv7eJI9l8uTjg", + "id": "id_wr7PZQ4daJ8KpVb8dHW", "variant_id": "{value}" }] }] @@ -139,6 +115,32 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updatePriceListPricesWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updatePriceListPricesWorkflow + .runAsStep({ + input: { + "data": [{ + "id": "id_KVXH6hWo4wmgEj8m4z", + "prices": [{ + "id": "id_wr7PZQ4daJ8KpVb8dHW", + "variant_id": "{value}" + }] + }] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Price_List/Workflows_Price_List/functions/core_flows.Price_List.Workflows_Price_List.updatePriceListsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Price_List/Workflows_Price_List/functions/core_flows.Price_List.Workflows_Price_List.updatePriceListsWorkflow/page.mdx index 8fb2cff6b1..d3934d1d49 100644 --- a/www/apps/resources/references/core_flows/Price_List/Workflows_Price_List/functions/core_flows.Price_List.Workflows_Price_List.updatePriceListsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Price_List/Workflows_Price_List/functions/core_flows.Price_List.Workflows_Price_List.updatePriceListsWorkflow/page.mdx @@ -16,29 +16,9 @@ This workflow updates one or more price lists. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updatePriceListsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updatePriceListsWorkflow - .runAsStep({ - input: { - "price_lists_data": [{ - "id": "id_x0CVNYYPYBLbU" - }] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -56,7 +36,7 @@ export async function POST( .run({ input: { "price_lists_data": [{ - "id": "id_x0CVNYYPYBLbU" + "id": "id_DmfYTffz5doptrEWLOeR" }] } }) @@ -83,7 +63,7 @@ export default async function handleOrderPlaced({ .run({ input: { "price_lists_data": [{ - "id": "id_x0CVNYYPYBLbU" + "id": "id_DmfYTffz5doptrEWLOeR" }] } }) @@ -110,7 +90,7 @@ export default async function myCustomJob( .run({ input: { "price_lists_data": [{ - "id": "id_x0CVNYYPYBLbU" + "id": "id_DmfYTffz5doptrEWLOeR" }] } }) @@ -122,6 +102,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updatePriceListsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updatePriceListsWorkflow + .runAsStep({ + input: { + "price_lists_data": [{ + "id": "id_DmfYTffz5doptrEWLOeR" + }] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Pricing/Workflows_Pricing/functions/core_flows.Pricing.Workflows_Pricing.createPricePreferencesWorkflow/page.mdx b/www/apps/resources/references/core_flows/Pricing/Workflows_Pricing/functions/core_flows.Pricing.Workflows_Pricing.createPricePreferencesWorkflow/page.mdx index 44a810d8ce..4386997225 100644 --- a/www/apps/resources/references/core_flows/Pricing/Workflows_Pricing/functions/core_flows.Pricing.Workflows_Pricing.createPricePreferencesWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Pricing/Workflows_Pricing/functions/core_flows.Pricing.Workflows_Pricing.createPricePreferencesWorkflow/page.mdx @@ -16,27 +16,9 @@ This workflow creates one or more price preferences. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createPricePreferencesWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createPricePreferencesWorkflow - .runAsStep({ - input: [ - {} - ] - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -114,6 +96,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createPricePreferencesWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createPricePreferencesWorkflow + .runAsStep({ + input: [ + {} + ] + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Pricing/Workflows_Pricing/functions/core_flows.Pricing.Workflows_Pricing.deletePricePreferencesWorkflow/page.mdx b/www/apps/resources/references/core_flows/Pricing/Workflows_Pricing/functions/core_flows.Pricing.Workflows_Pricing.deletePricePreferencesWorkflow/page.mdx index 63eebcb9b2..faa170892c 100644 --- a/www/apps/resources/references/core_flows/Pricing/Workflows_Pricing/functions/core_flows.Pricing.Workflows_Pricing.deletePricePreferencesWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Pricing/Workflows_Pricing/functions/core_flows.Pricing.Workflows_Pricing.deletePricePreferencesWorkflow/page.mdx @@ -16,27 +16,9 @@ This workflow deletes one or more price preferences. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { deletePricePreferencesWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = deletePricePreferencesWorkflow - .runAsStep({ - input: [ - "{value}" - ] - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -114,6 +96,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { deletePricePreferencesWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = deletePricePreferencesWorkflow + .runAsStep({ + input: [ + "{value}" + ] + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Pricing/Workflows_Pricing/functions/core_flows.Pricing.Workflows_Pricing.updatePricePreferencesWorkflow/page.mdx b/www/apps/resources/references/core_flows/Pricing/Workflows_Pricing/functions/core_flows.Pricing.Workflows_Pricing.updatePricePreferencesWorkflow/page.mdx index 40598d8950..48e5f711b5 100644 --- a/www/apps/resources/references/core_flows/Pricing/Workflows_Pricing/functions/core_flows.Pricing.Workflows_Pricing.updatePricePreferencesWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Pricing/Workflows_Pricing/functions/core_flows.Pricing.Workflows_Pricing.updatePricePreferencesWorkflow/page.mdx @@ -16,28 +16,9 @@ This workflow updates one or more price preferences. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updatePricePreferencesWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updatePricePreferencesWorkflow - .runAsStep({ - input: { - "selector": {}, - "update": {} - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -118,6 +99,27 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updatePricePreferencesWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updatePricePreferencesWorkflow + .runAsStep({ + input: { + "selector": {}, + "update": {} + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Product/Steps_Product/functions/core_flows.Product.Steps_Product.batchLinkProductsToCollectionStep/page.mdx b/www/apps/resources/references/core_flows/Product/Steps_Product/functions/core_flows.Product.Steps_Product.batchLinkProductsToCollectionStep/page.mdx index b54527e0f0..df9f5c347d 100644 --- a/www/apps/resources/references/core_flows/Product/Steps_Product/functions/core_flows.Product.Steps_Product.batchLinkProductsToCollectionStep/page.mdx +++ b/www/apps/resources/references/core_flows/Product/Steps_Product/functions/core_flows.Product.Steps_Product.batchLinkProductsToCollectionStep/page.mdx @@ -22,7 +22,7 @@ const myWorkflow = createWorkflow( "my-workflow", () => { const data = batchLinkProductsToCollectionStep({ - "id": "id_2M5WRp5HTM9s" + "id": "id_ZiFE1YbSWwHl1" }) } ) diff --git a/www/apps/resources/references/core_flows/Product/Steps_Product/functions/core_flows.Product.Steps_Product.createCollectionsStep/page.mdx b/www/apps/resources/references/core_flows/Product/Steps_Product/functions/core_flows.Product.Steps_Product.createCollectionsStep/page.mdx index 7a357d4dfe..60c1f9e2c1 100644 --- a/www/apps/resources/references/core_flows/Product/Steps_Product/functions/core_flows.Product.Steps_Product.createCollectionsStep/page.mdx +++ b/www/apps/resources/references/core_flows/Product/Steps_Product/functions/core_flows.Product.Steps_Product.createCollectionsStep/page.mdx @@ -22,7 +22,7 @@ const myWorkflow = createWorkflow( "my-workflow", () => { const data = createCollectionsStep([{ - "title": "supra" + "title": "peior" }]) } ) diff --git a/www/apps/resources/references/core_flows/Product/Steps_Product/functions/core_flows.Product.Steps_Product.createProductOptionsStep/page.mdx b/www/apps/resources/references/core_flows/Product/Steps_Product/functions/core_flows.Product.Steps_Product.createProductOptionsStep/page.mdx index 26cfbe0852..bd246907cb 100644 --- a/www/apps/resources/references/core_flows/Product/Steps_Product/functions/core_flows.Product.Steps_Product.createProductOptionsStep/page.mdx +++ b/www/apps/resources/references/core_flows/Product/Steps_Product/functions/core_flows.Product.Steps_Product.createProductOptionsStep/page.mdx @@ -22,7 +22,7 @@ const myWorkflow = createWorkflow( "my-workflow", () => { const data = createProductOptionsStep([{ - "title": "explicabo", + "title": "arguo", "values": [ "{value}" ] diff --git a/www/apps/resources/references/core_flows/Product/Steps_Product/functions/core_flows.Product.Steps_Product.createProductVariantsStep/page.mdx b/www/apps/resources/references/core_flows/Product/Steps_Product/functions/core_flows.Product.Steps_Product.createProductVariantsStep/page.mdx index da88bf979a..b2dc7f404e 100644 --- a/www/apps/resources/references/core_flows/Product/Steps_Product/functions/core_flows.Product.Steps_Product.createProductVariantsStep/page.mdx +++ b/www/apps/resources/references/core_flows/Product/Steps_Product/functions/core_flows.Product.Steps_Product.createProductVariantsStep/page.mdx @@ -22,7 +22,7 @@ const myWorkflow = createWorkflow( "my-workflow", () => { const data = createProductVariantsStep([{ - "title": "sursum" + "title": "terebro" }]) } ) diff --git a/www/apps/resources/references/core_flows/Product/Steps_Product/functions/core_flows.Product.Steps_Product.createProductsStep/page.mdx b/www/apps/resources/references/core_flows/Product/Steps_Product/functions/core_flows.Product.Steps_Product.createProductsStep/page.mdx index 3dd0c8ae76..3675cdce1b 100644 --- a/www/apps/resources/references/core_flows/Product/Steps_Product/functions/core_flows.Product.Steps_Product.createProductsStep/page.mdx +++ b/www/apps/resources/references/core_flows/Product/Steps_Product/functions/core_flows.Product.Steps_Product.createProductsStep/page.mdx @@ -22,7 +22,7 @@ const myWorkflow = createWorkflow( "my-workflow", () => { const data = createProductsStep([{ - "title": "aliquid" + "title": "universe" }]) } ) diff --git a/www/apps/resources/references/core_flows/Product/Steps_Product/functions/core_flows.Product.Steps_Product.generateProductCsvStep/page.mdx b/www/apps/resources/references/core_flows/Product/Steps_Product/functions/core_flows.Product.Steps_Product.generateProductCsvStep/page.mdx index 8a6bc3ab2f..9f7311235b 100644 --- a/www/apps/resources/references/core_flows/Product/Steps_Product/functions/core_flows.Product.Steps_Product.generateProductCsvStep/page.mdx +++ b/www/apps/resources/references/core_flows/Product/Steps_Product/functions/core_flows.Product.Steps_Product.generateProductCsvStep/page.mdx @@ -27,13 +27,13 @@ const myWorkflow = createWorkflow( "type": {}, "options": {}, "images": {}, - "id": "id_iAO0SI47MBK", - "title": "esse", + "id": "id_tfksKKkBEP", + "title": "amaritudo", "handle": "{value}", "subtitle": {}, "description": {}, - "is_giftcard": true, - "status": "published", + "is_giftcard": false, + "status": "proposed", "thumbnail": {}, "width": {}, "weight": {}, @@ -45,7 +45,7 @@ const myWorkflow = createWorkflow( "material": {}, "collection_id": {}, "type_id": {}, - "discountable": true, + "discountable": false, "external_id": {}, "created_at": {}, "updated_at": {}, diff --git a/www/apps/resources/references/core_flows/Product/Steps_Product/functions/core_flows.Product.Steps_Product.groupProductsForBatchStep/page.mdx b/www/apps/resources/references/core_flows/Product/Steps_Product/functions/core_flows.Product.Steps_Product.groupProductsForBatchStep/page.mdx index 52a79ac733..5f3af5cf65 100644 --- a/www/apps/resources/references/core_flows/Product/Steps_Product/functions/core_flows.Product.Steps_Product.groupProductsForBatchStep/page.mdx +++ b/www/apps/resources/references/core_flows/Product/Steps_Product/functions/core_flows.Product.Steps_Product.groupProductsForBatchStep/page.mdx @@ -22,9 +22,9 @@ const myWorkflow = createWorkflow( "my-workflow", () => { const data = groupProductsForBatchStep([{ - "title": "vulgo", + "title": "tollo", "options": [{ - "title": "somnus", + "title": "advenio", "values": [ "{value}" ] diff --git a/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.batchLinkProductsToCategoryWorkflow/page.mdx b/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.batchLinkProductsToCategoryWorkflow/page.mdx index a2d4f5e63c..f3e000b6a1 100644 --- a/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.batchLinkProductsToCategoryWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.batchLinkProductsToCategoryWorkflow/page.mdx @@ -15,27 +15,9 @@ This workflow creates links between product and category records. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { batchLinkProductsToCategoryWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = batchLinkProductsToCategoryWorkflow - .runAsStep({ - input: { - "id": "id_59HgTAclZ35Lt" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -52,7 +34,7 @@ export async function POST( const { result } = await batchLinkProductsToCategoryWorkflow(req.scope) .run({ input: { - "id": "id_59HgTAclZ35Lt" + "id": "id_CF7CqwJw4Kl5y5C2TYFF" } }) @@ -77,7 +59,7 @@ export default async function handleOrderPlaced({ const { result } = await batchLinkProductsToCategoryWorkflow(container) .run({ input: { - "id": "id_59HgTAclZ35Lt" + "id": "id_CF7CqwJw4Kl5y5C2TYFF" } }) @@ -102,7 +84,7 @@ export default async function myCustomJob( const { result } = await batchLinkProductsToCategoryWorkflow(container) .run({ input: { - "id": "id_59HgTAclZ35Lt" + "id": "id_CF7CqwJw4Kl5y5C2TYFF" } }) @@ -113,6 +95,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { batchLinkProductsToCategoryWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = batchLinkProductsToCategoryWorkflow + .runAsStep({ + input: { + "id": "id_CF7CqwJw4Kl5y5C2TYFF" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.batchLinkProductsToCollectionWorkflow/page.mdx b/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.batchLinkProductsToCollectionWorkflow/page.mdx index aa8ee3ae5e..33408729ca 100644 --- a/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.batchLinkProductsToCollectionWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.batchLinkProductsToCollectionWorkflow/page.mdx @@ -16,27 +16,9 @@ This workflow creates links between product and collection records. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { batchLinkProductsToCollectionWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = batchLinkProductsToCollectionWorkflow - .runAsStep({ - input: { - "id": "id_6f8wAqbfWVmT8JqTXYu" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -53,7 +35,7 @@ export async function POST( const { result } = await batchLinkProductsToCollectionWorkflow(req.scope) .run({ input: { - "id": "id_6f8wAqbfWVmT8JqTXYu" + "id": "id_fZxN1tMnjIO28GEfA" } }) @@ -78,7 +60,7 @@ export default async function handleOrderPlaced({ const { result } = await batchLinkProductsToCollectionWorkflow(container) .run({ input: { - "id": "id_6f8wAqbfWVmT8JqTXYu" + "id": "id_fZxN1tMnjIO28GEfA" } }) @@ -103,7 +85,7 @@ export default async function myCustomJob( const { result } = await batchLinkProductsToCollectionWorkflow(container) .run({ input: { - "id": "id_6f8wAqbfWVmT8JqTXYu" + "id": "id_fZxN1tMnjIO28GEfA" } }) @@ -114,6 +96,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { batchLinkProductsToCollectionWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = batchLinkProductsToCollectionWorkflow + .runAsStep({ + input: { + "id": "id_fZxN1tMnjIO28GEfA" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.batchProductVariantsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.batchProductVariantsWorkflow/page.mdx index 59de5450ff..7f145fd7bb 100644 --- a/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.batchProductVariantsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.batchProductVariantsWorkflow/page.mdx @@ -22,25 +22,9 @@ This workflow creates, updates, and deletes product variants. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { batchProductVariantsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = batchProductVariantsWorkflow - .runAsStep({ - input: {} - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -112,6 +96,24 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { batchProductVariantsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = batchProductVariantsWorkflow + .runAsStep({ + input: {} + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.batchProductsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.batchProductsWorkflow/page.mdx index 5bb967f139..7855e1d031 100644 --- a/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.batchProductsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.batchProductsWorkflow/page.mdx @@ -22,25 +22,9 @@ This workflow creates, updates, or deletes products. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { batchProductsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = batchProductsWorkflow - .runAsStep({ - input: {} - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -112,6 +96,24 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { batchProductsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = batchProductsWorkflow + .runAsStep({ + input: {} + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.createCollectionsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.createCollectionsWorkflow/page.mdx index e691210e9b..4c3de8033a 100644 --- a/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.createCollectionsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.createCollectionsWorkflow/page.mdx @@ -17,29 +17,9 @@ This workflow creates one or more collections. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createCollectionsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createCollectionsWorkflow - .runAsStep({ - input: { - "collections": [{ - "title": "suffragium" - }] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -57,7 +37,7 @@ export async function POST( .run({ input: { "collections": [{ - "title": "suffragium" + "title": "amaritudo" }] } }) @@ -84,7 +64,7 @@ export default async function handleOrderPlaced({ .run({ input: { "collections": [{ - "title": "suffragium" + "title": "amaritudo" }] } }) @@ -111,7 +91,7 @@ export default async function myCustomJob( .run({ input: { "collections": [{ - "title": "suffragium" + "title": "amaritudo" }] } }) @@ -123,6 +103,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createCollectionsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createCollectionsWorkflow + .runAsStep({ + input: { + "collections": [{ + "title": "amaritudo" + }] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.createProductOptionsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.createProductOptionsWorkflow/page.mdx index 49b6889297..893366d0d6 100644 --- a/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.createProductOptionsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.createProductOptionsWorkflow/page.mdx @@ -22,38 +22,9 @@ You can also use this workflow within your own custom workflows, allowing you to +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createProductOptionsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createProductOptionsWorkflow - .runAsStep({ - input: { - product_options: [{ - title: "Size", - values: ["S", "M", "L", "XL"] - }, - { - title: "Color", - values: ["Red", "Blue", "Green"] - } - ], - additional_data: { - erp_id: "123" - } - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -164,6 +135,37 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createProductOptionsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createProductOptionsWorkflow + .runAsStep({ + input: { + product_options: [{ + title: "Size", + values: ["S", "M", "L", "XL"] + }, + { + title: "Color", + values: ["Red", "Blue", "Green"] + } + ], + additional_data: { + erp_id: "123" + } + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.createProductTagsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.createProductTagsWorkflow/page.mdx index 9f18ee5269..1df993c504 100644 --- a/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.createProductTagsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.createProductTagsWorkflow/page.mdx @@ -17,29 +17,9 @@ This workflow creates one or more product tags. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createProductTagsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createProductTagsWorkflow - .runAsStep({ - input: { - "product_tags": [{ - "value": "{value}" - }] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -123,6 +103,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createProductTagsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createProductTagsWorkflow + .runAsStep({ + input: { + "product_tags": [{ + "value": "{value}" + }] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.createProductTypesWorkflow/page.mdx b/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.createProductTypesWorkflow/page.mdx index afbd3d50e1..4fc749870b 100644 --- a/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.createProductTypesWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.createProductTypesWorkflow/page.mdx @@ -17,29 +17,9 @@ This workflow creates one or more product types. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createProductTypesWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createProductTypesWorkflow - .runAsStep({ - input: { - "product_types": [{ - "value": "{value}" - }] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -123,6 +103,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createProductTypesWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createProductTypesWorkflow + .runAsStep({ + input: { + "product_types": [{ + "value": "{value}" + }] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.createProductVariantsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.createProductVariantsWorkflow/page.mdx index a190e98e97..2af23e9720 100644 --- a/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.createProductVariantsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.createProductVariantsWorkflow/page.mdx @@ -26,41 +26,9 @@ You can also use this workflow within your own custom workflows, allowing you to +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createProductVariantsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createProductVariantsWorkflow - .runAsStep({ - input: { - product_variants: [{ - product_id: "prod_123", - sku: "SHIRT-123", - title: "Small Shirt", - prices: [{ - amount: 10, - currency_code: "USD", - }, ], - options: { - Size: "Small", - }, - }, ], - additional_data: { - erp_id: "123" - } - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -180,6 +148,40 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createProductVariantsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createProductVariantsWorkflow + .runAsStep({ + input: { + product_variants: [{ + product_id: "prod_123", + sku: "SHIRT-123", + title: "Small Shirt", + prices: [{ + amount: 10, + currency_code: "USD", + }, ], + options: { + Size: "Small", + }, + }, ], + additional_data: { + erp_id: "123" + } + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.createProductsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.createProductsWorkflow/page.mdx index 14febd60eb..58dc33059d 100644 --- a/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.createProductsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.createProductsWorkflow/page.mdx @@ -26,48 +26,9 @@ You can also use this workflow within your own custom workflows, allowing you to +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createProductsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createProductsWorkflow - .runAsStep({ - input: { - products: [{ - title: "Shirt", - options: [{ - title: "Size", - values: ["S", "M", "L"] - }], - variants: [{ - title: "Small Shirt", - sku: "SMALLSHIRT", - options: { - Size: "S" - }, - prices: [{ - amount: 10, - currency_code: "usd" - }], - manage_inventory: true, - }, ] - }], - additional_data: { - erp_id: "123" - } - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -208,6 +169,47 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createProductsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createProductsWorkflow + .runAsStep({ + input: { + products: [{ + title: "Shirt", + options: [{ + title: "Size", + values: ["S", "M", "L"] + }], + variants: [{ + title: "Small Shirt", + sku: "SMALLSHIRT", + options: { + Size: "S" + }, + prices: [{ + amount: 10, + currency_code: "usd" + }], + manage_inventory: true, + }, ] + }], + additional_data: { + erp_id: "123" + } + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.deleteCollectionsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.deleteCollectionsWorkflow/page.mdx index c3705d2e76..1c41f8348a 100644 --- a/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.deleteCollectionsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.deleteCollectionsWorkflow/page.mdx @@ -17,29 +17,9 @@ This workflow deletes one or more collection. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { deleteCollectionsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = deleteCollectionsWorkflow - .runAsStep({ - input: { - "ids": [ - "id_YhSQFC1MksEmM" - ] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -57,7 +37,7 @@ export async function POST( .run({ input: { "ids": [ - "id_YhSQFC1MksEmM" + "id_r2pjzsMswBfdmHyWlBJC" ] } }) @@ -84,7 +64,7 @@ export default async function handleOrderPlaced({ .run({ input: { "ids": [ - "id_YhSQFC1MksEmM" + "id_r2pjzsMswBfdmHyWlBJC" ] } }) @@ -111,7 +91,7 @@ export default async function myCustomJob( .run({ input: { "ids": [ - "id_YhSQFC1MksEmM" + "id_r2pjzsMswBfdmHyWlBJC" ] } }) @@ -123,6 +103,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { deleteCollectionsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = deleteCollectionsWorkflow + .runAsStep({ + input: { + "ids": [ + "id_r2pjzsMswBfdmHyWlBJC" + ] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.deleteProductOptionsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.deleteProductOptionsWorkflow/page.mdx index 41a71eab29..7124739b9d 100644 --- a/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.deleteProductOptionsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.deleteProductOptionsWorkflow/page.mdx @@ -17,29 +17,9 @@ This workflow deletes one or more product options. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { deleteProductOptionsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = deleteProductOptionsWorkflow - .runAsStep({ - input: { - "ids": [ - "id_eXJ0kamA6SIqv" - ] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -57,7 +37,7 @@ export async function POST( .run({ input: { "ids": [ - "id_eXJ0kamA6SIqv" + "id_MQLRG4qGVL" ] } }) @@ -84,7 +64,7 @@ export default async function handleOrderPlaced({ .run({ input: { "ids": [ - "id_eXJ0kamA6SIqv" + "id_MQLRG4qGVL" ] } }) @@ -111,7 +91,7 @@ export default async function myCustomJob( .run({ input: { "ids": [ - "id_eXJ0kamA6SIqv" + "id_MQLRG4qGVL" ] } }) @@ -123,6 +103,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { deleteProductOptionsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = deleteProductOptionsWorkflow + .runAsStep({ + input: { + "ids": [ + "id_MQLRG4qGVL" + ] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.deleteProductTagsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.deleteProductTagsWorkflow/page.mdx index 987813a488..4e10ef746c 100644 --- a/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.deleteProductTagsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.deleteProductTagsWorkflow/page.mdx @@ -17,29 +17,9 @@ This workflow deletes one or more product tags. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { deleteProductTagsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = deleteProductTagsWorkflow - .runAsStep({ - input: { - "ids": [ - "id_neJm17VINMOVa" - ] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -57,7 +37,7 @@ export async function POST( .run({ input: { "ids": [ - "id_neJm17VINMOVa" + "id_SIem1ERF07C0ZPZ0X" ] } }) @@ -84,7 +64,7 @@ export default async function handleOrderPlaced({ .run({ input: { "ids": [ - "id_neJm17VINMOVa" + "id_SIem1ERF07C0ZPZ0X" ] } }) @@ -111,7 +91,7 @@ export default async function myCustomJob( .run({ input: { "ids": [ - "id_neJm17VINMOVa" + "id_SIem1ERF07C0ZPZ0X" ] } }) @@ -123,6 +103,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { deleteProductTagsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = deleteProductTagsWorkflow + .runAsStep({ + input: { + "ids": [ + "id_SIem1ERF07C0ZPZ0X" + ] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.deleteProductTypesWorkflow/page.mdx b/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.deleteProductTypesWorkflow/page.mdx index 97724d86df..a9900fa587 100644 --- a/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.deleteProductTypesWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.deleteProductTypesWorkflow/page.mdx @@ -17,29 +17,9 @@ This workflow deletes one or more product types. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { deleteProductTypesWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = deleteProductTypesWorkflow - .runAsStep({ - input: { - "ids": [ - "id_Ap5Vsydti79BexF" - ] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -57,7 +37,7 @@ export async function POST( .run({ input: { "ids": [ - "id_Ap5Vsydti79BexF" + "id_cvOu37tf5oXaXVr1lC" ] } }) @@ -84,7 +64,7 @@ export default async function handleOrderPlaced({ .run({ input: { "ids": [ - "id_Ap5Vsydti79BexF" + "id_cvOu37tf5oXaXVr1lC" ] } }) @@ -111,7 +91,7 @@ export default async function myCustomJob( .run({ input: { "ids": [ - "id_Ap5Vsydti79BexF" + "id_cvOu37tf5oXaXVr1lC" ] } }) @@ -123,6 +103,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { deleteProductTypesWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = deleteProductTypesWorkflow + .runAsStep({ + input: { + "ids": [ + "id_cvOu37tf5oXaXVr1lC" + ] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.deleteProductVariantsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.deleteProductVariantsWorkflow/page.mdx index 0558700ca5..1051cdf6f9 100644 --- a/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.deleteProductVariantsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.deleteProductVariantsWorkflow/page.mdx @@ -20,29 +20,9 @@ This workflow deletes one or more product variants. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { deleteProductVariantsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = deleteProductVariantsWorkflow - .runAsStep({ - input: { - "ids": [ - "id_jVGenFdPCBq" - ] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -60,7 +40,7 @@ export async function POST( .run({ input: { "ids": [ - "id_jVGenFdPCBq" + "id_p0bj5YjUh0AFiLJJgI" ] } }) @@ -87,7 +67,7 @@ export default async function handleOrderPlaced({ .run({ input: { "ids": [ - "id_jVGenFdPCBq" + "id_p0bj5YjUh0AFiLJJgI" ] } }) @@ -114,7 +94,7 @@ export default async function myCustomJob( .run({ input: { "ids": [ - "id_jVGenFdPCBq" + "id_p0bj5YjUh0AFiLJJgI" ] } }) @@ -126,6 +106,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { deleteProductVariantsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = deleteProductVariantsWorkflow + .runAsStep({ + input: { + "ids": [ + "id_p0bj5YjUh0AFiLJJgI" + ] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.deleteProductsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.deleteProductsWorkflow/page.mdx index 2e53bd194f..2932ff3e6f 100644 --- a/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.deleteProductsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.deleteProductsWorkflow/page.mdx @@ -20,29 +20,9 @@ This workflow deletes one or more products. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { deleteProductsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = deleteProductsWorkflow - .runAsStep({ - input: { - "ids": [ - "id_a8saXSjVRMITNL" - ] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -60,7 +40,7 @@ export async function POST( .run({ input: { "ids": [ - "id_a8saXSjVRMITNL" + "id_A2atzFKRf7tCmQ4C" ] } }) @@ -87,7 +67,7 @@ export default async function handleOrderPlaced({ .run({ input: { "ids": [ - "id_a8saXSjVRMITNL" + "id_A2atzFKRf7tCmQ4C" ] } }) @@ -114,7 +94,7 @@ export default async function myCustomJob( .run({ input: { "ids": [ - "id_a8saXSjVRMITNL" + "id_A2atzFKRf7tCmQ4C" ] } }) @@ -126,6 +106,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { deleteProductsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = deleteProductsWorkflow + .runAsStep({ + input: { + "ids": [ + "id_A2atzFKRf7tCmQ4C" + ] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.exportProductsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.exportProductsWorkflow/page.mdx index 8bc60da24c..9315e9ba96 100644 --- a/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.exportProductsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.exportProductsWorkflow/page.mdx @@ -18,29 +18,9 @@ This workflow exports products matching the specified filters. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { exportProductsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = exportProductsWorkflow - .runAsStep({ - input: { - "select": [ - "{value}" - ] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -124,6 +104,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { exportProductsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = exportProductsWorkflow + .runAsStep({ + input: { + "select": [ + "{value}" + ] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.importProductsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.importProductsWorkflow/page.mdx index f68aae02bd..1cf8809d74 100644 --- a/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.importProductsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.importProductsWorkflow/page.mdx @@ -18,28 +18,9 @@ This workflow imports products from a CSV file. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { importProductsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = importProductsWorkflow - .runAsStep({ - input: { - "fileContent": "{value}", - "filename": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -120,6 +101,27 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { importProductsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = importProductsWorkflow + .runAsStep({ + input: { + "fileContent": "{value}", + "filename": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.updateCollectionsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.updateCollectionsWorkflow/page.mdx index 59ed48f423..3830d6e9f3 100644 --- a/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.updateCollectionsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.updateCollectionsWorkflow/page.mdx @@ -17,28 +17,9 @@ This workflow updates collections matching the specified filters. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updateCollectionsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updateCollectionsWorkflow - .runAsStep({ - input: { - "selector": {}, - "update": {} - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -119,6 +100,27 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updateCollectionsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updateCollectionsWorkflow + .runAsStep({ + input: { + "selector": {}, + "update": {} + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.updateProductOptionsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.updateProductOptionsWorkflow/page.mdx index b9406e64e3..1f3e20ea57 100644 --- a/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.updateProductOptionsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.updateProductOptionsWorkflow/page.mdx @@ -22,35 +22,9 @@ You can also use this workflow within your own custom workflows, allowing you to +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updateProductOptionsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updateProductOptionsWorkflow - .runAsStep({ - input: { - selector: { - title: "Color" - }, - update: { - values: ["Red", "Blue", "Green"] - }, - additional_data: { - erp_id: "123" - } - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -152,6 +126,34 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updateProductOptionsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updateProductOptionsWorkflow + .runAsStep({ + input: { + selector: { + title: "Color" + }, + update: { + values: ["Red", "Blue", "Green"] + }, + additional_data: { + erp_id: "123" + } + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.updateProductTagsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.updateProductTagsWorkflow/page.mdx index c4f16f1ba4..4812a7afaa 100644 --- a/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.updateProductTagsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.updateProductTagsWorkflow/page.mdx @@ -17,28 +17,9 @@ This workflow updates product tags matching the specified filters. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updateProductTagsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updateProductTagsWorkflow - .runAsStep({ - input: { - "selector": {}, - "update": {} - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -119,6 +100,27 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updateProductTagsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updateProductTagsWorkflow + .runAsStep({ + input: { + "selector": {}, + "update": {} + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.updateProductTypesWorkflow/page.mdx b/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.updateProductTypesWorkflow/page.mdx index ce7a971375..60b822c989 100644 --- a/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.updateProductTypesWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.updateProductTypesWorkflow/page.mdx @@ -17,25 +17,9 @@ This workflow updates product types matching the specified filters. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updateProductTypesWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updateProductTypesWorkflow - .runAsStep({ - input: "{value}" - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -107,6 +91,24 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updateProductTypesWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updateProductTypesWorkflow + .runAsStep({ + input: "{value}" + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.updateProductVariantsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.updateProductVariantsWorkflow/page.mdx index 6c753aef06..8397cd1f63 100644 --- a/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.updateProductVariantsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.updateProductVariantsWorkflow/page.mdx @@ -23,9 +23,133 @@ You can also use this workflow within your own custom workflows, allowing you to +## Examples + To update product variants by their IDs: + + +```ts title="src/api/workflow/route.ts" +import type { + MedusaRequest, + MedusaResponse, +} from "@medusajs/framework/http" +import { updateProductVariantsWorkflow } from "@medusajs/medusa/core-flows" + +export async function POST( + req: MedusaRequest, + res: MedusaResponse +) { + const { result } = await updateProductVariantsWorkflow(req.scope) + .run({ + input: { + product_variants: [{ + id: "variant_123", + prices: [{ + amount: 10, + currency_code: "usd", + }] + }, + { + id: "variant_321", + title: "Small Shirt", + }, + ], + additional_data: { + erp_id: "123" + } + } + }) + + res.send(result) +} +``` + + + + +```ts title="src/subscribers/order-placed.ts" +import { + type SubscriberConfig, + type SubscriberArgs, +} from "@medusajs/framework" +import { updateProductVariantsWorkflow } from "@medusajs/medusa/core-flows" + +export default async function handleOrderPlaced({ + event: { data }, + container, +}: SubscriberArgs < { id: string } > ) { + const { result } = await updateProductVariantsWorkflow(container) + .run({ + input: { + product_variants: [{ + id: "variant_123", + prices: [{ + amount: 10, + currency_code: "usd", + }] + }, + { + id: "variant_321", + title: "Small Shirt", + }, + ], + additional_data: { + erp_id: "123" + } + } + }) + + console.log(result) +} + +export const config: SubscriberConfig = { + event: "order.placed", +} +``` + + + + +```ts title="src/jobs/message-daily.ts" +import { MedusaContainer } from "@medusajs/framework/types" +import { updateProductVariantsWorkflow } from "@medusajs/medusa/core-flows" + +export default async function myCustomJob( + container: MedusaContainer +) { + const { result } = await updateProductVariantsWorkflow(container) + .run({ + input: { + product_variants: [{ + id: "variant_123", + prices: [{ + amount: 10, + currency_code: "usd", + }] + }, + { + id: "variant_321", + title: "Small Shirt", + }, + ], + additional_data: { + erp_id: "123" + } + } + }) + + console.log(result) +} + +export const config = { + name: "run-once-a-day", + schedule: "0 0 * * *", +} +``` + + ```ts title="src/workflows/my-workflow.ts" @@ -60,6 +184,11 @@ const myWorkflow = createWorkflow( ``` + + +You can also update product variants by a selector: + + ```ts title="src/api/workflow/route.ts" @@ -76,18 +205,15 @@ export async function POST( const { result } = await updateProductVariantsWorkflow(req.scope) .run({ input: { - product_variants: [{ - id: "variant_123", - prices: [{ - amount: 10, - currency_code: "usd", - }] - }, - { - id: "variant_321", - title: "Small Shirt", - }, - ], + selector: { + product_id: "prod_123" + }, + update: { + prices: [{ + amount: 10, + currency_code: "usd" + }] + }, additional_data: { erp_id: "123" } @@ -115,18 +241,15 @@ export default async function handleOrderPlaced({ const { result } = await updateProductVariantsWorkflow(container) .run({ input: { - product_variants: [{ - id: "variant_123", - prices: [{ - amount: 10, - currency_code: "usd", - }] - }, - { - id: "variant_321", - title: "Small Shirt", - }, - ], + selector: { + product_id: "prod_123" + }, + update: { + prices: [{ + amount: 10, + currency_code: "usd" + }] + }, additional_data: { erp_id: "123" } @@ -154,18 +277,15 @@ export default async function myCustomJob( const { result } = await updateProductVariantsWorkflow(container) .run({ input: { - product_variants: [{ - id: "variant_123", - prices: [{ - amount: 10, - currency_code: "usd", - }] - }, - { - id: "variant_321", - title: "Small Shirt", - }, - ], + selector: { + product_id: "prod_123" + }, + update: { + prices: [{ + amount: 10, + currency_code: "usd" + }] + }, additional_data: { erp_id: "123" } @@ -182,11 +302,6 @@ export const config = { ``` - - -You can also update product variants by a selector: - - ```ts title="src/workflows/my-workflow.ts" @@ -215,119 +330,6 @@ const myWorkflow = createWorkflow( }) } ) -``` - - - - -```ts title="src/api/workflow/route.ts" -import type { - MedusaRequest, - MedusaResponse, -} from "@medusajs/framework/http" -import { updateProductVariantsWorkflow } from "@medusajs/medusa/core-flows" - -export async function POST( - req: MedusaRequest, - res: MedusaResponse -) { - const { result } = await updateProductVariantsWorkflow(req.scope) - .run({ - input: { - selector: { - product_id: "prod_123" - }, - update: { - prices: [{ - amount: 10, - currency_code: "usd" - }] - }, - additional_data: { - erp_id: "123" - } - } - }) - - res.send(result) -} -``` - - - - -```ts title="src/subscribers/order-placed.ts" -import { - type SubscriberConfig, - type SubscriberArgs, -} from "@medusajs/framework" -import { updateProductVariantsWorkflow } from "@medusajs/medusa/core-flows" - -export default async function handleOrderPlaced({ - event: { data }, - container, -}: SubscriberArgs < { id: string } > ) { - const { result } = await updateProductVariantsWorkflow(container) - .run({ - input: { - selector: { - product_id: "prod_123" - }, - update: { - prices: [{ - amount: 10, - currency_code: "usd" - }] - }, - additional_data: { - erp_id: "123" - } - } - }) - - console.log(result) -} - -export const config: SubscriberConfig = { - event: "order.placed", -} -``` - - - - -```ts title="src/jobs/message-daily.ts" -import { MedusaContainer } from "@medusajs/framework/types" -import { updateProductVariantsWorkflow } from "@medusajs/medusa/core-flows" - -export default async function myCustomJob( - container: MedusaContainer -) { - const { result } = await updateProductVariantsWorkflow(container) - .run({ - input: { - selector: { - product_id: "prod_123" - }, - update: { - prices: [{ - amount: 10, - currency_code: "usd" - }] - }, - additional_data: { - erp_id: "123" - } - } - }) - - console.log(result) -} - -export const config = { - name: "run-once-a-day", - schedule: "0 0 * * *", -} ``` diff --git a/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.updateProductsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.updateProductsWorkflow/page.mdx index 6a97a57157..7fffedc20e 100644 --- a/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.updateProductsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.updateProductsWorkflow/page.mdx @@ -25,9 +25,139 @@ You can also use this workflow within your own custom workflows, allowing you to +## Examples + To update products by their IDs: + + +```ts title="src/api/workflow/route.ts" +import type { + MedusaRequest, + MedusaResponse, +} from "@medusajs/framework/http" +import { updateProductsWorkflow } from "@medusajs/medusa/core-flows" + +export async function POST( + req: MedusaRequest, + res: MedusaResponse +) { + const { result } = await updateProductsWorkflow(req.scope) + .run({ + input: { + products: [{ + id: "prod_123", + title: "Shirts" + }, + { + id: "prod_321", + variants: [{ + id: "variant_123", + options: { + Size: "S" + } + }] + } + ], + additional_data: { + erp_id: "erp_123" + } + } + }) + + res.send(result) +} +``` + + + + +```ts title="src/subscribers/order-placed.ts" +import { + type SubscriberConfig, + type SubscriberArgs, +} from "@medusajs/framework" +import { updateProductsWorkflow } from "@medusajs/medusa/core-flows" + +export default async function handleOrderPlaced({ + event: { data }, + container, +}: SubscriberArgs < { id: string } > ) { + const { result } = await updateProductsWorkflow(container) + .run({ + input: { + products: [{ + id: "prod_123", + title: "Shirts" + }, + { + id: "prod_321", + variants: [{ + id: "variant_123", + options: { + Size: "S" + } + }] + } + ], + additional_data: { + erp_id: "erp_123" + } + } + }) + + console.log(result) +} + +export const config: SubscriberConfig = { + event: "order.placed", +} +``` + + + + +```ts title="src/jobs/message-daily.ts" +import { MedusaContainer } from "@medusajs/framework/types" +import { updateProductsWorkflow } from "@medusajs/medusa/core-flows" + +export default async function myCustomJob( + container: MedusaContainer +) { + const { result } = await updateProductsWorkflow(container) + .run({ + input: { + products: [{ + id: "prod_123", + title: "Shirts" + }, + { + id: "prod_321", + variants: [{ + id: "variant_123", + options: { + Size: "S" + } + }] + } + ], + additional_data: { + erp_id: "erp_123" + } + } + }) + + console.log(result) +} + +export const config = { + name: "run-once-a-day", + schedule: "0 0 * * *", +} +``` + + ```ts title="src/workflows/my-workflow.ts" @@ -64,6 +194,11 @@ const myWorkflow = createWorkflow( ``` + + +You can also update products by a selector: + + ```ts title="src/api/workflow/route.ts" @@ -80,20 +215,12 @@ export async function POST( const { result } = await updateProductsWorkflow(req.scope) .run({ input: { - products: [{ - id: "prod_123", - title: "Shirts" - }, - { - id: "prod_321", - variants: [{ - id: "variant_123", - options: { - Size: "S" - } - }] - } - ], + selector: { + type_id: ["ptyp_123"] + }, + update: { + description: "This is a shirt product" + }, additional_data: { erp_id: "erp_123" } @@ -121,20 +248,12 @@ export default async function handleOrderPlaced({ const { result } = await updateProductsWorkflow(container) .run({ input: { - products: [{ - id: "prod_123", - title: "Shirts" - }, - { - id: "prod_321", - variants: [{ - id: "variant_123", - options: { - Size: "S" - } - }] - } - ], + selector: { + type_id: ["ptyp_123"] + }, + update: { + description: "This is a shirt product" + }, additional_data: { erp_id: "erp_123" } @@ -162,20 +281,12 @@ export default async function myCustomJob( const { result } = await updateProductsWorkflow(container) .run({ input: { - products: [{ - id: "prod_123", - title: "Shirts" - }, - { - id: "prod_321", - variants: [{ - id: "variant_123", - options: { - Size: "S" - } - }] - } - ], + selector: { + type_id: ["ptyp_123"] + }, + update: { + description: "This is a shirt product" + }, additional_data: { erp_id: "erp_123" } @@ -192,11 +303,6 @@ export const config = { ``` - - -You can also update products by a selector: - - ```ts title="src/workflows/my-workflow.ts" @@ -222,110 +328,6 @@ const myWorkflow = createWorkflow( }) } ) -``` - - - - -```ts title="src/api/workflow/route.ts" -import type { - MedusaRequest, - MedusaResponse, -} from "@medusajs/framework/http" -import { updateProductsWorkflow } from "@medusajs/medusa/core-flows" - -export async function POST( - req: MedusaRequest, - res: MedusaResponse -) { - const { result } = await updateProductsWorkflow(req.scope) - .run({ - input: { - selector: { - type_id: ["ptyp_123"] - }, - update: { - description: "This is a shirt product" - }, - additional_data: { - erp_id: "erp_123" - } - } - }) - - res.send(result) -} -``` - - - - -```ts title="src/subscribers/order-placed.ts" -import { - type SubscriberConfig, - type SubscriberArgs, -} from "@medusajs/framework" -import { updateProductsWorkflow } from "@medusajs/medusa/core-flows" - -export default async function handleOrderPlaced({ - event: { data }, - container, -}: SubscriberArgs < { id: string } > ) { - const { result } = await updateProductsWorkflow(container) - .run({ - input: { - selector: { - type_id: ["ptyp_123"] - }, - update: { - description: "This is a shirt product" - }, - additional_data: { - erp_id: "erp_123" - } - } - }) - - console.log(result) -} - -export const config: SubscriberConfig = { - event: "order.placed", -} -``` - - - - -```ts title="src/jobs/message-daily.ts" -import { MedusaContainer } from "@medusajs/framework/types" -import { updateProductsWorkflow } from "@medusajs/medusa/core-flows" - -export default async function myCustomJob( - container: MedusaContainer -) { - const { result } = await updateProductsWorkflow(container) - .run({ - input: { - selector: { - type_id: ["ptyp_123"] - }, - update: { - description: "This is a shirt product" - }, - additional_data: { - erp_id: "erp_123" - } - } - }) - - console.log(result) -} - -export const config = { - name: "run-once-a-day", - schedule: "0 0 * * *", -} ``` diff --git a/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.upsertVariantPricesWorkflow/page.mdx b/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.upsertVariantPricesWorkflow/page.mdx index 2eff608df9..e17f450863 100644 --- a/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.upsertVariantPricesWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Product/Workflows_Product/functions/core_flows.Product.Workflows_Product.upsertVariantPricesWorkflow/page.mdx @@ -18,33 +18,9 @@ This workflow creates or updates variants' prices. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { upsertVariantPricesWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = upsertVariantPricesWorkflow - .runAsStep({ - input: { - "variantPrices": [{ - "variant_id": "{value}", - "product_id": "{value}" - }], - "previousVariantIds": [ - "{value}" - ] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -140,6 +116,32 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { upsertVariantPricesWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = upsertVariantPricesWorkflow + .runAsStep({ + input: { + "variantPrices": [{ + "variant_id": "{value}", + "product_id": "{value}" + }], + "previousVariantIds": [ + "{value}" + ] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Product_Category/Steps_Product_Category/functions/core_flows.Product_Category.Steps_Product_Category.createProductCategoriesStep/page.mdx b/www/apps/resources/references/core_flows/Product_Category/Steps_Product_Category/functions/core_flows.Product_Category.Steps_Product_Category.createProductCategoriesStep/page.mdx index 406ad69dff..9fc3f779d0 100644 --- a/www/apps/resources/references/core_flows/Product_Category/Steps_Product_Category/functions/core_flows.Product_Category.Steps_Product_Category.createProductCategoriesStep/page.mdx +++ b/www/apps/resources/references/core_flows/Product_Category/Steps_Product_Category/functions/core_flows.Product_Category.Steps_Product_Category.createProductCategoriesStep/page.mdx @@ -23,7 +23,7 @@ const myWorkflow = createWorkflow( () => { const data = createProductCategoriesStep({ "product_categories": [{ - "name": "Dora" + "name": "Mertie" }] }) } diff --git a/www/apps/resources/references/core_flows/Product_Category/Workflows_Product_Category/functions/core_flows.Product_Category.Workflows_Product_Category.createProductCategoriesWorkflow/page.mdx b/www/apps/resources/references/core_flows/Product_Category/Workflows_Product_Category/functions/core_flows.Product_Category.Workflows_Product_Category.createProductCategoriesWorkflow/page.mdx index 32d3a56a59..851674856c 100644 --- a/www/apps/resources/references/core_flows/Product_Category/Workflows_Product_Category/functions/core_flows.Product_Category.Workflows_Product_Category.createProductCategoriesWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Product_Category/Workflows_Product_Category/functions/core_flows.Product_Category.Workflows_Product_Category.createProductCategoriesWorkflow/page.mdx @@ -17,29 +17,9 @@ This workflow creates one or more product categories. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createProductCategoriesWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createProductCategoriesWorkflow - .runAsStep({ - input: { - "product_categories": [{ - "name": "Deontae" - }] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -57,7 +37,7 @@ export async function POST( .run({ input: { "product_categories": [{ - "name": "Deontae" + "name": "Johnathan" }] } }) @@ -84,7 +64,7 @@ export default async function handleOrderPlaced({ .run({ input: { "product_categories": [{ - "name": "Deontae" + "name": "Johnathan" }] } }) @@ -111,7 +91,7 @@ export default async function myCustomJob( .run({ input: { "product_categories": [{ - "name": "Deontae" + "name": "Johnathan" }] } }) @@ -123,6 +103,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createProductCategoriesWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createProductCategoriesWorkflow + .runAsStep({ + input: { + "product_categories": [{ + "name": "Johnathan" + }] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Product_Category/Workflows_Product_Category/functions/core_flows.Product_Category.Workflows_Product_Category.deleteProductCategoriesWorkflow/page.mdx b/www/apps/resources/references/core_flows/Product_Category/Workflows_Product_Category/functions/core_flows.Product_Category.Workflows_Product_Category.deleteProductCategoriesWorkflow/page.mdx index 7bcd0092d5..d8bc1e69aa 100644 --- a/www/apps/resources/references/core_flows/Product_Category/Workflows_Product_Category/functions/core_flows.Product_Category.Workflows_Product_Category.deleteProductCategoriesWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Product_Category/Workflows_Product_Category/functions/core_flows.Product_Category.Workflows_Product_Category.deleteProductCategoriesWorkflow/page.mdx @@ -17,27 +17,9 @@ This workflow deletes one or more product categories. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { deleteProductCategoriesWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = deleteProductCategoriesWorkflow - .runAsStep({ - input: [ - "{value}" - ] - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -115,6 +97,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { deleteProductCategoriesWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = deleteProductCategoriesWorkflow + .runAsStep({ + input: [ + "{value}" + ] + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Product_Category/Workflows_Product_Category/functions/core_flows.Product_Category.Workflows_Product_Category.updateProductCategoriesWorkflow/page.mdx b/www/apps/resources/references/core_flows/Product_Category/Workflows_Product_Category/functions/core_flows.Product_Category.Workflows_Product_Category.updateProductCategoriesWorkflow/page.mdx index 2da47a06fe..54baed16e0 100644 --- a/www/apps/resources/references/core_flows/Product_Category/Workflows_Product_Category/functions/core_flows.Product_Category.Workflows_Product_Category.updateProductCategoriesWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Product_Category/Workflows_Product_Category/functions/core_flows.Product_Category.Workflows_Product_Category.updateProductCategoriesWorkflow/page.mdx @@ -17,28 +17,9 @@ This workflow updates product categories matching specified filters. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updateProductCategoriesWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updateProductCategoriesWorkflow - .runAsStep({ - input: { - "selector": {}, - "update": {} - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -119,6 +100,27 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updateProductCategoriesWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updateProductCategoriesWorkflow + .runAsStep({ + input: { + "selector": {}, + "update": {} + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Promotion/Steps_Promotion/functions/core_flows.Promotion.Steps_Promotion.addRulesToPromotionsStep/page.mdx b/www/apps/resources/references/core_flows/Promotion/Steps_Promotion/functions/core_flows.Promotion.Steps_Promotion.addRulesToPromotionsStep/page.mdx index 1c4d74a2b2..1e2153e569 100644 --- a/www/apps/resources/references/core_flows/Promotion/Steps_Promotion/functions/core_flows.Promotion.Steps_Promotion.addRulesToPromotionsStep/page.mdx +++ b/www/apps/resources/references/core_flows/Promotion/Steps_Promotion/functions/core_flows.Promotion.Steps_Promotion.addRulesToPromotionsStep/page.mdx @@ -24,10 +24,10 @@ const myWorkflow = createWorkflow( const data = addRulesToPromotionsStep({ "rule_type": "{value}", "data": { - "id": "id_WYaXNxcFcayl50mx8M", + "id": "id_CbKNZ67XZqZZvJdKA8", "rules": [{ "attribute": "{value}", - "operator": "gte", + "operator": "lte", "values": "{value}" }] } diff --git a/www/apps/resources/references/core_flows/Promotion/Steps_Promotion/functions/core_flows.Promotion.Steps_Promotion.createCampaignsStep/page.mdx b/www/apps/resources/references/core_flows/Promotion/Steps_Promotion/functions/core_flows.Promotion.Steps_Promotion.createCampaignsStep/page.mdx index df0c9b05d8..a85e2ae858 100644 --- a/www/apps/resources/references/core_flows/Promotion/Steps_Promotion/functions/core_flows.Promotion.Steps_Promotion.createCampaignsStep/page.mdx +++ b/www/apps/resources/references/core_flows/Promotion/Steps_Promotion/functions/core_flows.Promotion.Steps_Promotion.createCampaignsStep/page.mdx @@ -22,7 +22,7 @@ const myWorkflow = createWorkflow( "my-workflow", () => { const data = createCampaignsStep([{ - "name": "Jeff", + "name": "Flo", "campaign_identifier": "{value}" }]) } diff --git a/www/apps/resources/references/core_flows/Promotion/Steps_Promotion/functions/core_flows.Promotion.Steps_Promotion.createPromotionsStep/page.mdx b/www/apps/resources/references/core_flows/Promotion/Steps_Promotion/functions/core_flows.Promotion.Steps_Promotion.createPromotionsStep/page.mdx index 048d3e4d7f..4636d32ff9 100644 --- a/www/apps/resources/references/core_flows/Promotion/Steps_Promotion/functions/core_flows.Promotion.Steps_Promotion.createPromotionsStep/page.mdx +++ b/www/apps/resources/references/core_flows/Promotion/Steps_Promotion/functions/core_flows.Promotion.Steps_Promotion.createPromotionsStep/page.mdx @@ -25,7 +25,7 @@ const myWorkflow = createWorkflow( "code": "{value}", "type": "standard", "application_method": { - "type": "fixed", + "type": "percentage", "target_type": "items" } }]) diff --git a/www/apps/resources/references/core_flows/Promotion/Steps_Promotion/functions/core_flows.Promotion.Steps_Promotion.removeRulesFromPromotionsStep/page.mdx b/www/apps/resources/references/core_flows/Promotion/Steps_Promotion/functions/core_flows.Promotion.Steps_Promotion.removeRulesFromPromotionsStep/page.mdx index 1b5d647661..1f72ec7237 100644 --- a/www/apps/resources/references/core_flows/Promotion/Steps_Promotion/functions/core_flows.Promotion.Steps_Promotion.removeRulesFromPromotionsStep/page.mdx +++ b/www/apps/resources/references/core_flows/Promotion/Steps_Promotion/functions/core_flows.Promotion.Steps_Promotion.removeRulesFromPromotionsStep/page.mdx @@ -24,7 +24,7 @@ const myWorkflow = createWorkflow( const data = removeRulesFromPromotionsStep({ "rule_type": "{value}", "data": { - "id": "id_hHpS7EkHAbry298", + "id": "id_mvAy9iJWhQ", "rule_ids": [ "{value}" ] diff --git a/www/apps/resources/references/core_flows/Promotion/Steps_Promotion/functions/core_flows.Promotion.Steps_Promotion.updateCampaignsStep/page.mdx b/www/apps/resources/references/core_flows/Promotion/Steps_Promotion/functions/core_flows.Promotion.Steps_Promotion.updateCampaignsStep/page.mdx index f49041cf77..eaeebd87bd 100644 --- a/www/apps/resources/references/core_flows/Promotion/Steps_Promotion/functions/core_flows.Promotion.Steps_Promotion.updateCampaignsStep/page.mdx +++ b/www/apps/resources/references/core_flows/Promotion/Steps_Promotion/functions/core_flows.Promotion.Steps_Promotion.updateCampaignsStep/page.mdx @@ -22,7 +22,7 @@ const myWorkflow = createWorkflow( "my-workflow", () => { const data = updateCampaignsStep([{ - "id": "id_raOqXfrhY2yUQi" + "id": "id_rwUz5hh02aIjQAoV" }]) } ) diff --git a/www/apps/resources/references/core_flows/Promotion/Steps_Promotion/functions/core_flows.Promotion.Steps_Promotion.updatePromotionRulesStep/page.mdx b/www/apps/resources/references/core_flows/Promotion/Steps_Promotion/functions/core_flows.Promotion.Steps_Promotion.updatePromotionRulesStep/page.mdx index 63a67aa5be..21312ad8cd 100644 --- a/www/apps/resources/references/core_flows/Promotion/Steps_Promotion/functions/core_flows.Promotion.Steps_Promotion.updatePromotionRulesStep/page.mdx +++ b/www/apps/resources/references/core_flows/Promotion/Steps_Promotion/functions/core_flows.Promotion.Steps_Promotion.updatePromotionRulesStep/page.mdx @@ -23,7 +23,7 @@ const myWorkflow = createWorkflow( () => { const data = updatePromotionRulesStep({ "data": [{ - "id": "id_XNTvrPSQCZjsR50QMAvn" + "id": "id_sFmEXjKu3PFvJtEdqL" }] }) } diff --git a/www/apps/resources/references/core_flows/Promotion/Steps_Promotion/functions/core_flows.Promotion.Steps_Promotion.updatePromotionsStep/page.mdx b/www/apps/resources/references/core_flows/Promotion/Steps_Promotion/functions/core_flows.Promotion.Steps_Promotion.updatePromotionsStep/page.mdx index 9012ec346d..9295664f2f 100644 --- a/www/apps/resources/references/core_flows/Promotion/Steps_Promotion/functions/core_flows.Promotion.Steps_Promotion.updatePromotionsStep/page.mdx +++ b/www/apps/resources/references/core_flows/Promotion/Steps_Promotion/functions/core_flows.Promotion.Steps_Promotion.updatePromotionsStep/page.mdx @@ -22,7 +22,7 @@ const myWorkflow = createWorkflow( "my-workflow", () => { const data = updatePromotionsStep([{ - "id": "id_MRlqKKxRwD3yBLfSzt8" + "id": "id_d9H9jn9hkqnc9lMsntl" }]) } ) diff --git a/www/apps/resources/references/core_flows/Promotion/Workflows_Promotion/functions/core_flows.Promotion.Workflows_Promotion.addOrRemoveCampaignPromotionsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Promotion/Workflows_Promotion/functions/core_flows.Promotion.Workflows_Promotion.addOrRemoveCampaignPromotionsWorkflow/page.mdx index 241bb33af8..1729213c3a 100644 --- a/www/apps/resources/references/core_flows/Promotion/Workflows_Promotion/functions/core_flows.Promotion.Workflows_Promotion.addOrRemoveCampaignPromotionsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Promotion/Workflows_Promotion/functions/core_flows.Promotion.Workflows_Promotion.addOrRemoveCampaignPromotionsWorkflow/page.mdx @@ -16,27 +16,9 @@ This workflow adds or removes promotions from campaigns. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { addOrRemoveCampaignPromotionsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = addOrRemoveCampaignPromotionsWorkflow - .runAsStep({ - input: { - "id": "id_Yxyi8jrWrJ6" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -53,7 +35,7 @@ export async function POST( const { result } = await addOrRemoveCampaignPromotionsWorkflow(req.scope) .run({ input: { - "id": "id_Yxyi8jrWrJ6" + "id": "id_5qPiyzauVZ4hN7tCOUw" } }) @@ -78,7 +60,7 @@ export default async function handleOrderPlaced({ const { result } = await addOrRemoveCampaignPromotionsWorkflow(container) .run({ input: { - "id": "id_Yxyi8jrWrJ6" + "id": "id_5qPiyzauVZ4hN7tCOUw" } }) @@ -103,7 +85,7 @@ export default async function myCustomJob( const { result } = await addOrRemoveCampaignPromotionsWorkflow(container) .run({ input: { - "id": "id_Yxyi8jrWrJ6" + "id": "id_5qPiyzauVZ4hN7tCOUw" } }) @@ -114,6 +96,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { addOrRemoveCampaignPromotionsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = addOrRemoveCampaignPromotionsWorkflow + .runAsStep({ + input: { + "id": "id_5qPiyzauVZ4hN7tCOUw" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Promotion/Workflows_Promotion/functions/core_flows.Promotion.Workflows_Promotion.batchPromotionRulesWorkflow/page.mdx b/www/apps/resources/references/core_flows/Promotion/Workflows_Promotion/functions/core_flows.Promotion.Workflows_Promotion.batchPromotionRulesWorkflow/page.mdx index 7a89b2f89c..da93fa50f5 100644 --- a/www/apps/resources/references/core_flows/Promotion/Workflows_Promotion/functions/core_flows.Promotion.Workflows_Promotion.batchPromotionRulesWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Promotion/Workflows_Promotion/functions/core_flows.Promotion.Workflows_Promotion.batchPromotionRulesWorkflow/page.mdx @@ -16,32 +16,9 @@ This workflow creates, updates, or deletes promotion rules. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { batchPromotionRulesWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = batchPromotionRulesWorkflow - .runAsStep({ - input: { - "id": "id_XuhJWOkYX2cfBRz3t0Mv", - "rule_type": { - "RULES": "{value}", - "TARGET_RULES": "{value}", - "BUY_RULES": "{value}" - } - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -58,7 +35,7 @@ export async function POST( const { result } = await batchPromotionRulesWorkflow(req.scope) .run({ input: { - "id": "id_XuhJWOkYX2cfBRz3t0Mv", + "id": "id_jg4vnWrZ5CmkE4", "rule_type": { "RULES": "{value}", "TARGET_RULES": "{value}", @@ -88,7 +65,7 @@ export default async function handleOrderPlaced({ const { result } = await batchPromotionRulesWorkflow(container) .run({ input: { - "id": "id_XuhJWOkYX2cfBRz3t0Mv", + "id": "id_jg4vnWrZ5CmkE4", "rule_type": { "RULES": "{value}", "TARGET_RULES": "{value}", @@ -118,7 +95,7 @@ export default async function myCustomJob( const { result } = await batchPromotionRulesWorkflow(container) .run({ input: { - "id": "id_XuhJWOkYX2cfBRz3t0Mv", + "id": "id_jg4vnWrZ5CmkE4", "rule_type": { "RULES": "{value}", "TARGET_RULES": "{value}", @@ -134,6 +111,31 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { batchPromotionRulesWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = batchPromotionRulesWorkflow + .runAsStep({ + input: { + "id": "id_jg4vnWrZ5CmkE4", + "rule_type": { + "RULES": "{value}", + "TARGET_RULES": "{value}", + "BUY_RULES": "{value}" + } + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Promotion/Workflows_Promotion/functions/core_flows.Promotion.Workflows_Promotion.createCampaignsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Promotion/Workflows_Promotion/functions/core_flows.Promotion.Workflows_Promotion.createCampaignsWorkflow/page.mdx index a6f82195cc..4817c6c069 100644 --- a/www/apps/resources/references/core_flows/Promotion/Workflows_Promotion/functions/core_flows.Promotion.Workflows_Promotion.createCampaignsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Promotion/Workflows_Promotion/functions/core_flows.Promotion.Workflows_Promotion.createCampaignsWorkflow/page.mdx @@ -21,39 +21,9 @@ You can also use this workflow within your own custom workflows, allowing you to +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createCampaignsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createCampaignsWorkflow - .runAsStep({ - input: { - campaignsData: [{ - name: "Launch Promotions", - campaign_identifier: "GA-123456", - starts_at: new Date("2025-01-01"), - ends_at: new Date("2026-01-01"), - budget: { - type: "usage", - limit: 100, - } - }], - additional_data: { - target_audience: "new_customers" - } - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -167,6 +137,38 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createCampaignsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createCampaignsWorkflow + .runAsStep({ + input: { + campaignsData: [{ + name: "Launch Promotions", + campaign_identifier: "GA-123456", + starts_at: new Date("2025-01-01"), + ends_at: new Date("2026-01-01"), + budget: { + type: "usage", + limit: 100, + } + }], + additional_data: { + target_audience: "new_customers" + } + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Promotion/Workflows_Promotion/functions/core_flows.Promotion.Workflows_Promotion.createPromotionRulesWorkflow/page.mdx b/www/apps/resources/references/core_flows/Promotion/Workflows_Promotion/functions/core_flows.Promotion.Workflows_Promotion.createPromotionRulesWorkflow/page.mdx index c22b7bb0cd..3f4e0c5dfa 100644 --- a/www/apps/resources/references/core_flows/Promotion/Workflows_Promotion/functions/core_flows.Promotion.Workflows_Promotion.createPromotionRulesWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Promotion/Workflows_Promotion/functions/core_flows.Promotion.Workflows_Promotion.createPromotionRulesWorkflow/page.mdx @@ -16,35 +16,9 @@ This workflow creates one or more promotion rules. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createPromotionRulesWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createPromotionRulesWorkflow - .runAsStep({ - input: { - "rule_type": "{value}", - "data": { - "id": "id_M9SetjCAx9pcyMoRfim", - "rules": [{ - "attribute": "{value}", - "operator": "in", - "values": "{value}" - }] - } - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -63,10 +37,10 @@ export async function POST( input: { "rule_type": "{value}", "data": { - "id": "id_M9SetjCAx9pcyMoRfim", + "id": "id_dgeazdtUx23V", "rules": [{ "attribute": "{value}", - "operator": "in", + "operator": "ne", "values": "{value}" }] } @@ -96,10 +70,10 @@ export default async function handleOrderPlaced({ input: { "rule_type": "{value}", "data": { - "id": "id_M9SetjCAx9pcyMoRfim", + "id": "id_dgeazdtUx23V", "rules": [{ "attribute": "{value}", - "operator": "in", + "operator": "ne", "values": "{value}" }] } @@ -129,10 +103,10 @@ export default async function myCustomJob( input: { "rule_type": "{value}", "data": { - "id": "id_M9SetjCAx9pcyMoRfim", + "id": "id_dgeazdtUx23V", "rules": [{ "attribute": "{value}", - "operator": "in", + "operator": "ne", "values": "{value}" }] } @@ -146,6 +120,34 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createPromotionRulesWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createPromotionRulesWorkflow + .runAsStep({ + input: { + "rule_type": "{value}", + "data": { + "id": "id_dgeazdtUx23V", + "rules": [{ + "attribute": "{value}", + "operator": "ne", + "values": "{value}" + }] + } + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Promotion/Workflows_Promotion/functions/core_flows.Promotion.Workflows_Promotion.createPromotionsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Promotion/Workflows_Promotion/functions/core_flows.Promotion.Workflows_Promotion.createPromotionsWorkflow/page.mdx index 7bd3b04496..151b3d8bae 100644 --- a/www/apps/resources/references/core_flows/Promotion/Workflows_Promotion/functions/core_flows.Promotion.Workflows_Promotion.createPromotionsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Promotion/Workflows_Promotion/functions/core_flows.Promotion.Workflows_Promotion.createPromotionsWorkflow/page.mdx @@ -21,40 +21,9 @@ You can also use this workflow within your own custom workflows, allowing you to +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createPromotionsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createPromotionsWorkflow - .runAsStep({ - input: { - promotionsData: [{ - code: "10OFF", - type: "standard", - application_method: { - type: "percentage", - target_type: "items", - allocation: "across", - value: 10, - currency_code: "usd" - } - }], - additional_data: { - external_id: "123" - } - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -171,6 +140,39 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createPromotionsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createPromotionsWorkflow + .runAsStep({ + input: { + promotionsData: [{ + code: "10OFF", + type: "standard", + application_method: { + type: "percentage", + target_type: "items", + allocation: "across", + value: 10, + currency_code: "usd" + } + }], + additional_data: { + external_id: "123" + } + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Promotion/Workflows_Promotion/functions/core_flows.Promotion.Workflows_Promotion.deleteCampaignsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Promotion/Workflows_Promotion/functions/core_flows.Promotion.Workflows_Promotion.deleteCampaignsWorkflow/page.mdx index 5459294b3a..bc4aade12a 100644 --- a/www/apps/resources/references/core_flows/Promotion/Workflows_Promotion/functions/core_flows.Promotion.Workflows_Promotion.deleteCampaignsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Promotion/Workflows_Promotion/functions/core_flows.Promotion.Workflows_Promotion.deleteCampaignsWorkflow/page.mdx @@ -16,29 +16,9 @@ This workflow deletes one or more campaigns. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { deleteCampaignsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = deleteCampaignsWorkflow - .runAsStep({ - input: { - "ids": [ - "id_U7q859xrFewR" - ] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -56,7 +36,7 @@ export async function POST( .run({ input: { "ids": [ - "id_U7q859xrFewR" + "id_q4WmwIJbLMjp81" ] } }) @@ -83,7 +63,7 @@ export default async function handleOrderPlaced({ .run({ input: { "ids": [ - "id_U7q859xrFewR" + "id_q4WmwIJbLMjp81" ] } }) @@ -110,7 +90,7 @@ export default async function myCustomJob( .run({ input: { "ids": [ - "id_U7q859xrFewR" + "id_q4WmwIJbLMjp81" ] } }) @@ -122,6 +102,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { deleteCampaignsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = deleteCampaignsWorkflow + .runAsStep({ + input: { + "ids": [ + "id_q4WmwIJbLMjp81" + ] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Promotion/Workflows_Promotion/functions/core_flows.Promotion.Workflows_Promotion.deletePromotionRulesWorkflow/page.mdx b/www/apps/resources/references/core_flows/Promotion/Workflows_Promotion/functions/core_flows.Promotion.Workflows_Promotion.deletePromotionRulesWorkflow/page.mdx index 1d4f45b1a4..2bd3dfbe79 100644 --- a/www/apps/resources/references/core_flows/Promotion/Workflows_Promotion/functions/core_flows.Promotion.Workflows_Promotion.deletePromotionRulesWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Promotion/Workflows_Promotion/functions/core_flows.Promotion.Workflows_Promotion.deletePromotionRulesWorkflow/page.mdx @@ -16,33 +16,9 @@ This workflow deletes one or more promotion rules. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { deletePromotionRulesWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = deletePromotionRulesWorkflow - .runAsStep({ - input: { - "rule_type": "{value}", - "data": { - "id": "id_Mp3nr58Qfix", - "rule_ids": [ - "{value}" - ] - } - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -61,7 +37,7 @@ export async function POST( input: { "rule_type": "{value}", "data": { - "id": "id_Mp3nr58Qfix", + "id": "id_Mh1PFA8giy1m", "rule_ids": [ "{value}" ] @@ -92,7 +68,7 @@ export default async function handleOrderPlaced({ input: { "rule_type": "{value}", "data": { - "id": "id_Mp3nr58Qfix", + "id": "id_Mh1PFA8giy1m", "rule_ids": [ "{value}" ] @@ -123,7 +99,7 @@ export default async function myCustomJob( input: { "rule_type": "{value}", "data": { - "id": "id_Mp3nr58Qfix", + "id": "id_Mh1PFA8giy1m", "rule_ids": [ "{value}" ] @@ -138,6 +114,32 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { deletePromotionRulesWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = deletePromotionRulesWorkflow + .runAsStep({ + input: { + "rule_type": "{value}", + "data": { + "id": "id_Mh1PFA8giy1m", + "rule_ids": [ + "{value}" + ] + } + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Promotion/Workflows_Promotion/functions/core_flows.Promotion.Workflows_Promotion.deletePromotionsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Promotion/Workflows_Promotion/functions/core_flows.Promotion.Workflows_Promotion.deletePromotionsWorkflow/page.mdx index 20f331cffe..200992d9be 100644 --- a/www/apps/resources/references/core_flows/Promotion/Workflows_Promotion/functions/core_flows.Promotion.Workflows_Promotion.deletePromotionsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Promotion/Workflows_Promotion/functions/core_flows.Promotion.Workflows_Promotion.deletePromotionsWorkflow/page.mdx @@ -16,29 +16,9 @@ This workflow deletes one or more promotions. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { deletePromotionsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = deletePromotionsWorkflow - .runAsStep({ - input: { - "ids": [ - "id_noXpVGgnpTL2NqZXFqhc" - ] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -56,7 +36,7 @@ export async function POST( .run({ input: { "ids": [ - "id_noXpVGgnpTL2NqZXFqhc" + "id_PXFIgp3nxIZtixB7yb" ] } }) @@ -83,7 +63,7 @@ export default async function handleOrderPlaced({ .run({ input: { "ids": [ - "id_noXpVGgnpTL2NqZXFqhc" + "id_PXFIgp3nxIZtixB7yb" ] } }) @@ -110,7 +90,7 @@ export default async function myCustomJob( .run({ input: { "ids": [ - "id_noXpVGgnpTL2NqZXFqhc" + "id_PXFIgp3nxIZtixB7yb" ] } }) @@ -122,6 +102,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { deletePromotionsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = deletePromotionsWorkflow + .runAsStep({ + input: { + "ids": [ + "id_PXFIgp3nxIZtixB7yb" + ] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Promotion/Workflows_Promotion/functions/core_flows.Promotion.Workflows_Promotion.updateCampaignsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Promotion/Workflows_Promotion/functions/core_flows.Promotion.Workflows_Promotion.updateCampaignsWorkflow/page.mdx index 8b0cd147ac..60e5aff064 100644 --- a/www/apps/resources/references/core_flows/Promotion/Workflows_Promotion/functions/core_flows.Promotion.Workflows_Promotion.updateCampaignsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Promotion/Workflows_Promotion/functions/core_flows.Promotion.Workflows_Promotion.updateCampaignsWorkflow/page.mdx @@ -21,34 +21,9 @@ You can also use this workflow within your own custom workflows, allowing you to +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updateCampaignsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updateCampaignsWorkflow - .runAsStep({ - input: { - campaignsData: [{ - id: "camp_123", - name: "Launch Promotions", - ends_at: new Date("2026-01-01"), - }], - additional_data: { - target_audience: "new_customers" - } - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -147,6 +122,33 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updateCampaignsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updateCampaignsWorkflow + .runAsStep({ + input: { + campaignsData: [{ + id: "camp_123", + name: "Launch Promotions", + ends_at: new Date("2026-01-01"), + }], + additional_data: { + target_audience: "new_customers" + } + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Promotion/Workflows_Promotion/functions/core_flows.Promotion.Workflows_Promotion.updatePromotionRulesWorkflow/page.mdx b/www/apps/resources/references/core_flows/Promotion/Workflows_Promotion/functions/core_flows.Promotion.Workflows_Promotion.updatePromotionRulesWorkflow/page.mdx index 9cfe80937c..9cf846f456 100644 --- a/www/apps/resources/references/core_flows/Promotion/Workflows_Promotion/functions/core_flows.Promotion.Workflows_Promotion.updatePromotionRulesWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Promotion/Workflows_Promotion/functions/core_flows.Promotion.Workflows_Promotion.updatePromotionRulesWorkflow/page.mdx @@ -16,29 +16,9 @@ This workflow updates one or more promotion rules. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updatePromotionRulesWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updatePromotionRulesWorkflow - .runAsStep({ - input: { - "data": [{ - "id": "id_m2udTnXyUKC" - }] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -56,7 +36,7 @@ export async function POST( .run({ input: { "data": [{ - "id": "id_m2udTnXyUKC" + "id": "id_YEB9k1J7eGtSqpAYCzn" }] } }) @@ -83,7 +63,7 @@ export default async function handleOrderPlaced({ .run({ input: { "data": [{ - "id": "id_m2udTnXyUKC" + "id": "id_YEB9k1J7eGtSqpAYCzn" }] } }) @@ -110,7 +90,7 @@ export default async function myCustomJob( .run({ input: { "data": [{ - "id": "id_m2udTnXyUKC" + "id": "id_YEB9k1J7eGtSqpAYCzn" }] } }) @@ -122,6 +102,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updatePromotionRulesWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updatePromotionRulesWorkflow + .runAsStep({ + input: { + "data": [{ + "id": "id_YEB9k1J7eGtSqpAYCzn" + }] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Promotion/Workflows_Promotion/functions/core_flows.Promotion.Workflows_Promotion.updatePromotionsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Promotion/Workflows_Promotion/functions/core_flows.Promotion.Workflows_Promotion.updatePromotionsWorkflow/page.mdx index 331b13ceee..a5bb00db08 100644 --- a/www/apps/resources/references/core_flows/Promotion/Workflows_Promotion/functions/core_flows.Promotion.Workflows_Promotion.updatePromotionsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Promotion/Workflows_Promotion/functions/core_flows.Promotion.Workflows_Promotion.updatePromotionsWorkflow/page.mdx @@ -21,33 +21,9 @@ You can also use this workflow within your own custom workflows, allowing you to +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updatePromotionsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updatePromotionsWorkflow - .runAsStep({ - input: { - promotionsData: [{ - id: "promo_123", - code: "10OFF", - }], - additional_data: { - external_id: "123" - } - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -143,6 +119,32 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updatePromotionsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updatePromotionsWorkflow + .runAsStep({ + input: { + promotionsData: [{ + id: "promo_123", + code: "10OFF", + }], + additional_data: { + external_id: "123" + } + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Region/Steps_Region/functions/core_flows.Region.Steps_Region.createRegionsStep/page.mdx b/www/apps/resources/references/core_flows/Region/Steps_Region/functions/core_flows.Region.Steps_Region.createRegionsStep/page.mdx index e2dbbede3e..bc4578db5f 100644 --- a/www/apps/resources/references/core_flows/Region/Steps_Region/functions/core_flows.Region.Steps_Region.createRegionsStep/page.mdx +++ b/www/apps/resources/references/core_flows/Region/Steps_Region/functions/core_flows.Region.Steps_Region.createRegionsStep/page.mdx @@ -22,7 +22,7 @@ const myWorkflow = createWorkflow( "my-workflow", () => { const data = createRegionsStep([{ - "name": "Lula", + "name": "Sylvan", "currency_code": "{value}" }]) } diff --git a/www/apps/resources/references/core_flows/Region/Workflows_Region/functions/core_flows.Region.Workflows_Region.createRegionsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Region/Workflows_Region/functions/core_flows.Region.Workflows_Region.createRegionsWorkflow/page.mdx index d2524ce693..edcbc3cd98 100644 --- a/www/apps/resources/references/core_flows/Region/Workflows_Region/functions/core_flows.Region.Workflows_Region.createRegionsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Region/Workflows_Region/functions/core_flows.Region.Workflows_Region.createRegionsWorkflow/page.mdx @@ -18,30 +18,9 @@ This workflow creates one or more regions. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createRegionsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createRegionsWorkflow - .runAsStep({ - input: { - "regions": [{ - "name": "Carole", - "currency_code": "{value}" - }] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -59,7 +38,7 @@ export async function POST( .run({ input: { "regions": [{ - "name": "Carole", + "name": "Carolyne", "currency_code": "{value}" }] } @@ -87,7 +66,7 @@ export default async function handleOrderPlaced({ .run({ input: { "regions": [{ - "name": "Carole", + "name": "Carolyne", "currency_code": "{value}" }] } @@ -115,7 +94,7 @@ export default async function myCustomJob( .run({ input: { "regions": [{ - "name": "Carole", + "name": "Carolyne", "currency_code": "{value}" }] } @@ -128,6 +107,29 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createRegionsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createRegionsWorkflow + .runAsStep({ + input: { + "regions": [{ + "name": "Carolyne", + "currency_code": "{value}" + }] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Region/Workflows_Region/functions/core_flows.Region.Workflows_Region.deleteRegionsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Region/Workflows_Region/functions/core_flows.Region.Workflows_Region.deleteRegionsWorkflow/page.mdx index 35da47b2bc..b40a6a879c 100644 --- a/www/apps/resources/references/core_flows/Region/Workflows_Region/functions/core_flows.Region.Workflows_Region.deleteRegionsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Region/Workflows_Region/functions/core_flows.Region.Workflows_Region.deleteRegionsWorkflow/page.mdx @@ -17,29 +17,9 @@ This workflow deletes one or more regions. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { deleteRegionsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = deleteRegionsWorkflow - .runAsStep({ - input: { - "ids": [ - "id_PXPGlG1DAxXfHS" - ] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -57,7 +37,7 @@ export async function POST( .run({ input: { "ids": [ - "id_PXPGlG1DAxXfHS" + "id_uPhJKGWkoj3" ] } }) @@ -84,7 +64,7 @@ export default async function handleOrderPlaced({ .run({ input: { "ids": [ - "id_PXPGlG1DAxXfHS" + "id_uPhJKGWkoj3" ] } }) @@ -111,7 +91,7 @@ export default async function myCustomJob( .run({ input: { "ids": [ - "id_PXPGlG1DAxXfHS" + "id_uPhJKGWkoj3" ] } }) @@ -123,6 +103,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { deleteRegionsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = deleteRegionsWorkflow + .runAsStep({ + input: { + "ids": [ + "id_uPhJKGWkoj3" + ] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Region/Workflows_Region/functions/core_flows.Region.Workflows_Region.updateRegionsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Region/Workflows_Region/functions/core_flows.Region.Workflows_Region.updateRegionsWorkflow/page.mdx index ca328ad8f3..e15ef88377 100644 --- a/www/apps/resources/references/core_flows/Region/Workflows_Region/functions/core_flows.Region.Workflows_Region.updateRegionsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Region/Workflows_Region/functions/core_flows.Region.Workflows_Region.updateRegionsWorkflow/page.mdx @@ -18,28 +18,9 @@ This workflow updates regions matching the specified filters. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updateRegionsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updateRegionsWorkflow - .runAsStep({ - input: { - "selector": {}, - "update": {} - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -120,6 +101,27 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updateRegionsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updateRegionsWorkflow + .runAsStep({ + input: { + "selector": {}, + "update": {} + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Reservation/Steps_Reservation/functions/core_flows.Reservation.Steps_Reservation.createReservationsStep/page.mdx b/www/apps/resources/references/core_flows/Reservation/Steps_Reservation/functions/core_flows.Reservation.Steps_Reservation.createReservationsStep/page.mdx index c826b8ae94..baf760b15e 100644 --- a/www/apps/resources/references/core_flows/Reservation/Steps_Reservation/functions/core_flows.Reservation.Steps_Reservation.createReservationsStep/page.mdx +++ b/www/apps/resources/references/core_flows/Reservation/Steps_Reservation/functions/core_flows.Reservation.Steps_Reservation.createReservationsStep/page.mdx @@ -25,7 +25,7 @@ const myWorkflow = createWorkflow( const data = createReservationsStep([{ "inventory_item_id": "{value}", "location_id": "{value}", - "quantity": 50 + "quantity": 32 }]) } ) diff --git a/www/apps/resources/references/core_flows/Reservation/Steps_Reservation/functions/core_flows.Reservation.Steps_Reservation.updateReservationsStep/page.mdx b/www/apps/resources/references/core_flows/Reservation/Steps_Reservation/functions/core_flows.Reservation.Steps_Reservation.updateReservationsStep/page.mdx index 8185de02a5..0100adf6a9 100644 --- a/www/apps/resources/references/core_flows/Reservation/Steps_Reservation/functions/core_flows.Reservation.Steps_Reservation.updateReservationsStep/page.mdx +++ b/www/apps/resources/references/core_flows/Reservation/Steps_Reservation/functions/core_flows.Reservation.Steps_Reservation.updateReservationsStep/page.mdx @@ -22,7 +22,7 @@ const myWorkflow = createWorkflow( "my-workflow", () => { const data = updateReservationsStep([{ - "id": "id_psQ8eMCWOlWh" + "id": "id_2A34Y02GNwCedrZ" }]) } ) diff --git a/www/apps/resources/references/core_flows/Reservation/Workflows_Reservation/functions/core_flows.Reservation.Workflows_Reservation.createReservationsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Reservation/Workflows_Reservation/functions/core_flows.Reservation.Workflows_Reservation.createReservationsWorkflow/page.mdx index e860b03aa6..9b09327bc5 100644 --- a/www/apps/resources/references/core_flows/Reservation/Workflows_Reservation/functions/core_flows.Reservation.Workflows_Reservation.createReservationsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Reservation/Workflows_Reservation/functions/core_flows.Reservation.Workflows_Reservation.createReservationsWorkflow/page.mdx @@ -17,31 +17,9 @@ This workflow creates one or more reservations. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createReservationsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createReservationsWorkflow - .runAsStep({ - input: { - "reservations": [{ - "inventory_item_id": "{value}", - "location_id": "{value}", - "quantity": 15 - }] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -61,7 +39,7 @@ export async function POST( "reservations": [{ "inventory_item_id": "{value}", "location_id": "{value}", - "quantity": 15 + "quantity": 6 }] } }) @@ -90,7 +68,7 @@ export default async function handleOrderPlaced({ "reservations": [{ "inventory_item_id": "{value}", "location_id": "{value}", - "quantity": 15 + "quantity": 6 }] } }) @@ -119,7 +97,7 @@ export default async function myCustomJob( "reservations": [{ "inventory_item_id": "{value}", "location_id": "{value}", - "quantity": 15 + "quantity": 6 }] } }) @@ -131,6 +109,30 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createReservationsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createReservationsWorkflow + .runAsStep({ + input: { + "reservations": [{ + "inventory_item_id": "{value}", + "location_id": "{value}", + "quantity": 6 + }] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Reservation/Workflows_Reservation/functions/core_flows.Reservation.Workflows_Reservation.deleteReservationsByLineItemsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Reservation/Workflows_Reservation/functions/core_flows.Reservation.Workflows_Reservation.deleteReservationsByLineItemsWorkflow/page.mdx index 13b250a1d1..ca8e9d98e6 100644 --- a/www/apps/resources/references/core_flows/Reservation/Workflows_Reservation/functions/core_flows.Reservation.Workflows_Reservation.deleteReservationsByLineItemsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Reservation/Workflows_Reservation/functions/core_flows.Reservation.Workflows_Reservation.deleteReservationsByLineItemsWorkflow/page.mdx @@ -16,29 +16,9 @@ This workflow deletes reservations by their associated line items. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { deleteReservationsByLineItemsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = deleteReservationsByLineItemsWorkflow - .runAsStep({ - input: { - "ids": [ - "id_YlIXdX5rgxII3SMwoGoD" - ] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -56,7 +36,7 @@ export async function POST( .run({ input: { "ids": [ - "id_YlIXdX5rgxII3SMwoGoD" + "id_5t6kG5KmiEN" ] } }) @@ -83,7 +63,7 @@ export default async function handleOrderPlaced({ .run({ input: { "ids": [ - "id_YlIXdX5rgxII3SMwoGoD" + "id_5t6kG5KmiEN" ] } }) @@ -110,7 +90,7 @@ export default async function myCustomJob( .run({ input: { "ids": [ - "id_YlIXdX5rgxII3SMwoGoD" + "id_5t6kG5KmiEN" ] } }) @@ -122,6 +102,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { deleteReservationsByLineItemsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = deleteReservationsByLineItemsWorkflow + .runAsStep({ + input: { + "ids": [ + "id_5t6kG5KmiEN" + ] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Reservation/Workflows_Reservation/functions/core_flows.Reservation.Workflows_Reservation.deleteReservationsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Reservation/Workflows_Reservation/functions/core_flows.Reservation.Workflows_Reservation.deleteReservationsWorkflow/page.mdx index b1786032a9..06586d6a19 100644 --- a/www/apps/resources/references/core_flows/Reservation/Workflows_Reservation/functions/core_flows.Reservation.Workflows_Reservation.deleteReservationsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Reservation/Workflows_Reservation/functions/core_flows.Reservation.Workflows_Reservation.deleteReservationsWorkflow/page.mdx @@ -16,25 +16,9 @@ This workflow deletes one or more reservations. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { deleteReservationsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = deleteReservationsWorkflow - .runAsStep({ - input: "{value}" - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -106,6 +90,24 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { deleteReservationsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = deleteReservationsWorkflow + .runAsStep({ + input: "{value}" + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Reservation/Workflows_Reservation/functions/core_flows.Reservation.Workflows_Reservation.updateReservationsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Reservation/Workflows_Reservation/functions/core_flows.Reservation.Workflows_Reservation.updateReservationsWorkflow/page.mdx index 71fe247154..a500959a92 100644 --- a/www/apps/resources/references/core_flows/Reservation/Workflows_Reservation/functions/core_flows.Reservation.Workflows_Reservation.updateReservationsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Reservation/Workflows_Reservation/functions/core_flows.Reservation.Workflows_Reservation.updateReservationsWorkflow/page.mdx @@ -16,29 +16,9 @@ This workflow updates one or more reservations. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updateReservationsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updateReservationsWorkflow - .runAsStep({ - input: { - "updates": [{ - "id": "id_l518zd9HVRqUb9N0f" - }] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -56,7 +36,7 @@ export async function POST( .run({ input: { "updates": [{ - "id": "id_l518zd9HVRqUb9N0f" + "id": "id_CM0xNtYFVGsndigtxzs" }] } }) @@ -83,7 +63,7 @@ export default async function handleOrderPlaced({ .run({ input: { "updates": [{ - "id": "id_l518zd9HVRqUb9N0f" + "id": "id_CM0xNtYFVGsndigtxzs" }] } }) @@ -110,7 +90,7 @@ export default async function myCustomJob( .run({ input: { "updates": [{ - "id": "id_l518zd9HVRqUb9N0f" + "id": "id_CM0xNtYFVGsndigtxzs" }] } }) @@ -122,6 +102,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updateReservationsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updateReservationsWorkflow + .runAsStep({ + input: { + "updates": [{ + "id": "id_CM0xNtYFVGsndigtxzs" + }] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Return_Reason/Workflows_Return_Reason/functions/core_flows.Return_Reason.Workflows_Return_Reason.createReturnReasonsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Return_Reason/Workflows_Return_Reason/functions/core_flows.Return_Reason.Workflows_Return_Reason.createReturnReasonsWorkflow/page.mdx index 28aeadc56f..52ece55abc 100644 --- a/www/apps/resources/references/core_flows/Return_Reason/Workflows_Return_Reason/functions/core_flows.Return_Reason.Workflows_Return_Reason.createReturnReasonsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Return_Reason/Workflows_Return_Reason/functions/core_flows.Return_Reason.Workflows_Return_Reason.createReturnReasonsWorkflow/page.mdx @@ -16,30 +16,9 @@ This workflow creates one or more return reasons. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createReturnReasonsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createReturnReasonsWorkflow - .runAsStep({ - input: { - "data": [{ - "value": "{value}", - "label": "{value}" - }] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -126,6 +105,29 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createReturnReasonsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createReturnReasonsWorkflow + .runAsStep({ + input: { + "data": [{ + "value": "{value}", + "label": "{value}" + }] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Return_Reason/Workflows_Return_Reason/functions/core_flows.Return_Reason.Workflows_Return_Reason.deleteReturnReasonsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Return_Reason/Workflows_Return_Reason/functions/core_flows.Return_Reason.Workflows_Return_Reason.deleteReturnReasonsWorkflow/page.mdx index a4542b0bbc..75456a4c5a 100644 --- a/www/apps/resources/references/core_flows/Return_Reason/Workflows_Return_Reason/functions/core_flows.Return_Reason.Workflows_Return_Reason.deleteReturnReasonsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Return_Reason/Workflows_Return_Reason/functions/core_flows.Return_Reason.Workflows_Return_Reason.deleteReturnReasonsWorkflow/page.mdx @@ -16,29 +16,9 @@ This workflow deletes one or more return reasons. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { deleteReturnReasonsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = deleteReturnReasonsWorkflow - .runAsStep({ - input: { - "ids": [ - "id_Gj3SCocEg84vRNrX" - ] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -56,7 +36,7 @@ export async function POST( .run({ input: { "ids": [ - "id_Gj3SCocEg84vRNrX" + "id_zLhhgqhExSqeOyDlcxbC" ] } }) @@ -83,7 +63,7 @@ export default async function handleOrderPlaced({ .run({ input: { "ids": [ - "id_Gj3SCocEg84vRNrX" + "id_zLhhgqhExSqeOyDlcxbC" ] } }) @@ -110,7 +90,7 @@ export default async function myCustomJob( .run({ input: { "ids": [ - "id_Gj3SCocEg84vRNrX" + "id_zLhhgqhExSqeOyDlcxbC" ] } }) @@ -122,6 +102,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { deleteReturnReasonsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = deleteReturnReasonsWorkflow + .runAsStep({ + input: { + "ids": [ + "id_zLhhgqhExSqeOyDlcxbC" + ] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Return_Reason/Workflows_Return_Reason/functions/core_flows.Return_Reason.Workflows_Return_Reason.updateReturnReasonsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Return_Reason/Workflows_Return_Reason/functions/core_flows.Return_Reason.Workflows_Return_Reason.updateReturnReasonsWorkflow/page.mdx index 4d9ddaab67..a89ed7d0a8 100644 --- a/www/apps/resources/references/core_flows/Return_Reason/Workflows_Return_Reason/functions/core_flows.Return_Reason.Workflows_Return_Reason.updateReturnReasonsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Return_Reason/Workflows_Return_Reason/functions/core_flows.Return_Reason.Workflows_Return_Reason.updateReturnReasonsWorkflow/page.mdx @@ -16,28 +16,9 @@ This workflow updates return reasons matching the specified filters. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updateReturnReasonsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updateReturnReasonsWorkflow - .runAsStep({ - input: { - "selector": {}, - "update": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -118,6 +99,27 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updateReturnReasonsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updateReturnReasonsWorkflow + .runAsStep({ + input: { + "selector": {}, + "update": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Sales_Channel/Steps_Sales_Channel/functions/core_flows.Sales_Channel.Steps_Sales_Channel.canDeleteSalesChannelsOrThrowStep/page.mdx b/www/apps/resources/references/core_flows/Sales_Channel/Steps_Sales_Channel/functions/core_flows.Sales_Channel.Steps_Sales_Channel.canDeleteSalesChannelsOrThrowStep/page.mdx index 5fc0880500..2cf0d048b1 100644 --- a/www/apps/resources/references/core_flows/Sales_Channel/Steps_Sales_Channel/functions/core_flows.Sales_Channel.Steps_Sales_Channel.canDeleteSalesChannelsOrThrowStep/page.mdx +++ b/www/apps/resources/references/core_flows/Sales_Channel/Steps_Sales_Channel/functions/core_flows.Sales_Channel.Steps_Sales_Channel.canDeleteSalesChannelsOrThrowStep/page.mdx @@ -19,7 +19,7 @@ const myWorkflow = createWorkflow( "my-workflow", () => { const data = canDeleteSalesChannelsOrThrowStep({ - "ids": "id_3UvmSr2KE6eYH" + "ids": "id_H5DZRryRwhGSYq" }) } ) diff --git a/www/apps/resources/references/core_flows/Sales_Channel/Steps_Sales_Channel/functions/core_flows.Sales_Channel.Steps_Sales_Channel.createDefaultSalesChannelStep/page.mdx b/www/apps/resources/references/core_flows/Sales_Channel/Steps_Sales_Channel/functions/core_flows.Sales_Channel.Steps_Sales_Channel.createDefaultSalesChannelStep/page.mdx index e45d42d3a1..8c349e66ee 100644 --- a/www/apps/resources/references/core_flows/Sales_Channel/Steps_Sales_Channel/functions/core_flows.Sales_Channel.Steps_Sales_Channel.createDefaultSalesChannelStep/page.mdx +++ b/www/apps/resources/references/core_flows/Sales_Channel/Steps_Sales_Channel/functions/core_flows.Sales_Channel.Steps_Sales_Channel.createDefaultSalesChannelStep/page.mdx @@ -23,7 +23,7 @@ const myWorkflow = createWorkflow( () => { const data = createDefaultSalesChannelStep({ "data": { - "name": "Emerson" + "name": "Kaylee" } }) } diff --git a/www/apps/resources/references/core_flows/Sales_Channel/Steps_Sales_Channel/functions/core_flows.Sales_Channel.Steps_Sales_Channel.createSalesChannelsStep/page.mdx b/www/apps/resources/references/core_flows/Sales_Channel/Steps_Sales_Channel/functions/core_flows.Sales_Channel.Steps_Sales_Channel.createSalesChannelsStep/page.mdx index 86380cc923..6cdd7b292c 100644 --- a/www/apps/resources/references/core_flows/Sales_Channel/Steps_Sales_Channel/functions/core_flows.Sales_Channel.Steps_Sales_Channel.createSalesChannelsStep/page.mdx +++ b/www/apps/resources/references/core_flows/Sales_Channel/Steps_Sales_Channel/functions/core_flows.Sales_Channel.Steps_Sales_Channel.createSalesChannelsStep/page.mdx @@ -23,7 +23,7 @@ const myWorkflow = createWorkflow( () => { const data = createSalesChannelsStep({ "data": [{ - "name": "Tiana" + "name": "Asa" }] }) } diff --git a/www/apps/resources/references/core_flows/Sales_Channel/Workflows_Sales_Channel/functions/core_flows.Sales_Channel.Workflows_Sales_Channel.createSalesChannelsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Sales_Channel/Workflows_Sales_Channel/functions/core_flows.Sales_Channel.Workflows_Sales_Channel.createSalesChannelsWorkflow/page.mdx index 706b289708..7bc03e6b1f 100644 --- a/www/apps/resources/references/core_flows/Sales_Channel/Workflows_Sales_Channel/functions/core_flows.Sales_Channel.Workflows_Sales_Channel.createSalesChannelsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Sales_Channel/Workflows_Sales_Channel/functions/core_flows.Sales_Channel.Workflows_Sales_Channel.createSalesChannelsWorkflow/page.mdx @@ -17,29 +17,9 @@ This workflow creates one or more sales channels. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createSalesChannelsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createSalesChannelsWorkflow - .runAsStep({ - input: { - "salesChannelsData": [{ - "name": "Jakob" - }] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -57,7 +37,7 @@ export async function POST( .run({ input: { "salesChannelsData": [{ - "name": "Jakob" + "name": "Daija" }] } }) @@ -84,7 +64,7 @@ export default async function handleOrderPlaced({ .run({ input: { "salesChannelsData": [{ - "name": "Jakob" + "name": "Daija" }] } }) @@ -111,7 +91,7 @@ export default async function myCustomJob( .run({ input: { "salesChannelsData": [{ - "name": "Jakob" + "name": "Daija" }] } }) @@ -123,6 +103,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createSalesChannelsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createSalesChannelsWorkflow + .runAsStep({ + input: { + "salesChannelsData": [{ + "name": "Daija" + }] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Sales_Channel/Workflows_Sales_Channel/functions/core_flows.Sales_Channel.Workflows_Sales_Channel.deleteSalesChannelsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Sales_Channel/Workflows_Sales_Channel/functions/core_flows.Sales_Channel.Workflows_Sales_Channel.deleteSalesChannelsWorkflow/page.mdx index dc8812e02d..db6c1b8305 100644 --- a/www/apps/resources/references/core_flows/Sales_Channel/Workflows_Sales_Channel/functions/core_flows.Sales_Channel.Workflows_Sales_Channel.deleteSalesChannelsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Sales_Channel/Workflows_Sales_Channel/functions/core_flows.Sales_Channel.Workflows_Sales_Channel.deleteSalesChannelsWorkflow/page.mdx @@ -18,29 +18,9 @@ This workflow deletes one or more sales channels. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { deleteSalesChannelsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = deleteSalesChannelsWorkflow - .runAsStep({ - input: { - "ids": [ - "id_exscjADluzaB" - ] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -58,7 +38,7 @@ export async function POST( .run({ input: { "ids": [ - "id_exscjADluzaB" + "id_tKdzLkobovKsOAyJUS" ] } }) @@ -85,7 +65,7 @@ export default async function handleOrderPlaced({ .run({ input: { "ids": [ - "id_exscjADluzaB" + "id_tKdzLkobovKsOAyJUS" ] } }) @@ -112,7 +92,7 @@ export default async function myCustomJob( .run({ input: { "ids": [ - "id_exscjADluzaB" + "id_tKdzLkobovKsOAyJUS" ] } }) @@ -124,6 +104,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { deleteSalesChannelsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = deleteSalesChannelsWorkflow + .runAsStep({ + input: { + "ids": [ + "id_tKdzLkobovKsOAyJUS" + ] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Sales_Channel/Workflows_Sales_Channel/functions/core_flows.Sales_Channel.Workflows_Sales_Channel.linkProductsToSalesChannelWorkflow/page.mdx b/www/apps/resources/references/core_flows/Sales_Channel/Workflows_Sales_Channel/functions/core_flows.Sales_Channel.Workflows_Sales_Channel.linkProductsToSalesChannelWorkflow/page.mdx index 15b7df021a..417439732d 100644 --- a/www/apps/resources/references/core_flows/Sales_Channel/Workflows_Sales_Channel/functions/core_flows.Sales_Channel.Workflows_Sales_Channel.linkProductsToSalesChannelWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Sales_Channel/Workflows_Sales_Channel/functions/core_flows.Sales_Channel.Workflows_Sales_Channel.linkProductsToSalesChannelWorkflow/page.mdx @@ -16,27 +16,9 @@ This workflow creates or dismisses links between product and sales channel recor +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { linkProductsToSalesChannelWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = linkProductsToSalesChannelWorkflow - .runAsStep({ - input: { - "id": "id_kNCVr3dcK9oNE" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -53,7 +35,7 @@ export async function POST( const { result } = await linkProductsToSalesChannelWorkflow(req.scope) .run({ input: { - "id": "id_kNCVr3dcK9oNE" + "id": "id_GtsUa6ZhGNwsYtS7fjxJ" } }) @@ -78,7 +60,7 @@ export default async function handleOrderPlaced({ const { result } = await linkProductsToSalesChannelWorkflow(container) .run({ input: { - "id": "id_kNCVr3dcK9oNE" + "id": "id_GtsUa6ZhGNwsYtS7fjxJ" } }) @@ -103,7 +85,7 @@ export default async function myCustomJob( const { result } = await linkProductsToSalesChannelWorkflow(container) .run({ input: { - "id": "id_kNCVr3dcK9oNE" + "id": "id_GtsUa6ZhGNwsYtS7fjxJ" } }) @@ -114,6 +96,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { linkProductsToSalesChannelWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = linkProductsToSalesChannelWorkflow + .runAsStep({ + input: { + "id": "id_GtsUa6ZhGNwsYtS7fjxJ" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Sales_Channel/Workflows_Sales_Channel/functions/core_flows.Sales_Channel.Workflows_Sales_Channel.updateSalesChannelsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Sales_Channel/Workflows_Sales_Channel/functions/core_flows.Sales_Channel.Workflows_Sales_Channel.updateSalesChannelsWorkflow/page.mdx index 6c6a840508..d8224e030d 100644 --- a/www/apps/resources/references/core_flows/Sales_Channel/Workflows_Sales_Channel/functions/core_flows.Sales_Channel.Workflows_Sales_Channel.updateSalesChannelsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Sales_Channel/Workflows_Sales_Channel/functions/core_flows.Sales_Channel.Workflows_Sales_Channel.updateSalesChannelsWorkflow/page.mdx @@ -17,28 +17,9 @@ This workflow updates sales channels matching the specified conditions. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updateSalesChannelsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updateSalesChannelsWorkflow - .runAsStep({ - input: { - "selector": {}, - "update": {} - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -119,6 +100,27 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updateSalesChannelsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updateSalesChannelsWorkflow + .runAsStep({ + input: { + "selector": {}, + "update": {} + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Shipping_Profile/Workflows_Shipping_Profile/functions/core_flows.Shipping_Profile.Workflows_Shipping_Profile.deleteShippingProfileWorkflow/page.mdx b/www/apps/resources/references/core_flows/Shipping_Profile/Workflows_Shipping_Profile/functions/core_flows.Shipping_Profile.Workflows_Shipping_Profile.deleteShippingProfileWorkflow/page.mdx index a2a13959f5..d8cb16a133 100644 --- a/www/apps/resources/references/core_flows/Shipping_Profile/Workflows_Shipping_Profile/functions/core_flows.Shipping_Profile.Workflows_Shipping_Profile.deleteShippingProfileWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Shipping_Profile/Workflows_Shipping_Profile/functions/core_flows.Shipping_Profile.Workflows_Shipping_Profile.deleteShippingProfileWorkflow/page.mdx @@ -17,29 +17,9 @@ This workflow deletes one or more shipping profiles. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { deleteShippingProfileWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = deleteShippingProfileWorkflow - .runAsStep({ - input: { - "ids": [ - "id_quISzRsNhulqo" - ] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -57,7 +37,7 @@ export async function POST( .run({ input: { "ids": [ - "id_quISzRsNhulqo" + "id_UaRiLX2hoPKFhKwY" ] } }) @@ -84,7 +64,7 @@ export default async function handleOrderPlaced({ .run({ input: { "ids": [ - "id_quISzRsNhulqo" + "id_UaRiLX2hoPKFhKwY" ] } }) @@ -111,7 +91,7 @@ export default async function myCustomJob( .run({ input: { "ids": [ - "id_quISzRsNhulqo" + "id_UaRiLX2hoPKFhKwY" ] } }) @@ -123,6 +103,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { deleteShippingProfileWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = deleteShippingProfileWorkflow + .runAsStep({ + input: { + "ids": [ + "id_UaRiLX2hoPKFhKwY" + ] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Stock_Location/Steps_Stock_Location/functions/core_flows.Stock_Location.Steps_Stock_Location.createStockLocations/page.mdx b/www/apps/resources/references/core_flows/Stock_Location/Steps_Stock_Location/functions/core_flows.Stock_Location.Steps_Stock_Location.createStockLocations/page.mdx index 98de4a24f6..a95855f65f 100644 --- a/www/apps/resources/references/core_flows/Stock_Location/Steps_Stock_Location/functions/core_flows.Stock_Location.Steps_Stock_Location.createStockLocations/page.mdx +++ b/www/apps/resources/references/core_flows/Stock_Location/Steps_Stock_Location/functions/core_flows.Stock_Location.Steps_Stock_Location.createStockLocations/page.mdx @@ -22,7 +22,7 @@ const myWorkflow = createWorkflow( "my-workflow", () => { const data = createStockLocations([{ - "name": "Jade" + "name": "Dawson" }]) } ) diff --git a/www/apps/resources/references/core_flows/Stock_Location/Workflows_Stock_Location/functions/core_flows.Stock_Location.Workflows_Stock_Location.createLocationFulfillmentSetWorkflow/page.mdx b/www/apps/resources/references/core_flows/Stock_Location/Workflows_Stock_Location/functions/core_flows.Stock_Location.Workflows_Stock_Location.createLocationFulfillmentSetWorkflow/page.mdx index 5cb2d5cc15..8f5bc765ef 100644 --- a/www/apps/resources/references/core_flows/Stock_Location/Workflows_Stock_Location/functions/core_flows.Stock_Location.Workflows_Stock_Location.createLocationFulfillmentSetWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Stock_Location/Workflows_Stock_Location/functions/core_flows.Stock_Location.Workflows_Stock_Location.createLocationFulfillmentSetWorkflow/page.mdx @@ -16,31 +16,9 @@ This workflow creates links between location and fulfillment set records. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createLocationFulfillmentSetWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createLocationFulfillmentSetWorkflow - .runAsStep({ - input: { - "location_id": "{value}", - "fulfillment_set_data": { - "name": "Leora", - "type": "{value}" - } - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -59,7 +37,7 @@ export async function POST( input: { "location_id": "{value}", "fulfillment_set_data": { - "name": "Leora", + "name": "Eunice", "type": "{value}" } } @@ -88,7 +66,7 @@ export default async function handleOrderPlaced({ input: { "location_id": "{value}", "fulfillment_set_data": { - "name": "Leora", + "name": "Eunice", "type": "{value}" } } @@ -117,7 +95,7 @@ export default async function myCustomJob( input: { "location_id": "{value}", "fulfillment_set_data": { - "name": "Leora", + "name": "Eunice", "type": "{value}" } } @@ -130,6 +108,30 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createLocationFulfillmentSetWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createLocationFulfillmentSetWorkflow + .runAsStep({ + input: { + "location_id": "{value}", + "fulfillment_set_data": { + "name": "Eunice", + "type": "{value}" + } + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Stock_Location/Workflows_Stock_Location/functions/core_flows.Stock_Location.Workflows_Stock_Location.createStockLocationsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Stock_Location/Workflows_Stock_Location/functions/core_flows.Stock_Location.Workflows_Stock_Location.createStockLocationsWorkflow/page.mdx index d8b6c780bb..2029b3ee49 100644 --- a/www/apps/resources/references/core_flows/Stock_Location/Workflows_Stock_Location/functions/core_flows.Stock_Location.Workflows_Stock_Location.createStockLocationsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Stock_Location/Workflows_Stock_Location/functions/core_flows.Stock_Location.Workflows_Stock_Location.createStockLocationsWorkflow/page.mdx @@ -16,29 +16,9 @@ This workflow creates one or more stock locations. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createStockLocationsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createStockLocationsWorkflow - .runAsStep({ - input: { - "locations": [{ - "name": "Ford" - }] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -56,7 +36,7 @@ export async function POST( .run({ input: { "locations": [{ - "name": "Ford" + "name": "Ebba" }] } }) @@ -83,7 +63,7 @@ export default async function handleOrderPlaced({ .run({ input: { "locations": [{ - "name": "Ford" + "name": "Ebba" }] } }) @@ -110,7 +90,7 @@ export default async function myCustomJob( .run({ input: { "locations": [{ - "name": "Ford" + "name": "Ebba" }] } }) @@ -122,6 +102,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createStockLocationsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createStockLocationsWorkflow + .runAsStep({ + input: { + "locations": [{ + "name": "Ebba" + }] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Stock_Location/Workflows_Stock_Location/functions/core_flows.Stock_Location.Workflows_Stock_Location.deleteStockLocationsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Stock_Location/Workflows_Stock_Location/functions/core_flows.Stock_Location.Workflows_Stock_Location.deleteStockLocationsWorkflow/page.mdx index b4c5db5d0a..c8e2e40375 100644 --- a/www/apps/resources/references/core_flows/Stock_Location/Workflows_Stock_Location/functions/core_flows.Stock_Location.Workflows_Stock_Location.deleteStockLocationsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Stock_Location/Workflows_Stock_Location/functions/core_flows.Stock_Location.Workflows_Stock_Location.deleteStockLocationsWorkflow/page.mdx @@ -17,29 +17,9 @@ This workflow deletes one or more stock locations. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { deleteStockLocationsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = deleteStockLocationsWorkflow - .runAsStep({ - input: { - "ids": [ - "id_QL8TShqCfAs" - ] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -57,7 +37,7 @@ export async function POST( .run({ input: { "ids": [ - "id_QL8TShqCfAs" + "id_6RqCuCxIQHywGiW0mm" ] } }) @@ -84,7 +64,7 @@ export default async function handleOrderPlaced({ .run({ input: { "ids": [ - "id_QL8TShqCfAs" + "id_6RqCuCxIQHywGiW0mm" ] } }) @@ -111,7 +91,7 @@ export default async function myCustomJob( .run({ input: { "ids": [ - "id_QL8TShqCfAs" + "id_6RqCuCxIQHywGiW0mm" ] } }) @@ -123,6 +103,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { deleteStockLocationsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = deleteStockLocationsWorkflow + .runAsStep({ + input: { + "ids": [ + "id_6RqCuCxIQHywGiW0mm" + ] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Stock_Location/Workflows_Stock_Location/functions/core_flows.Stock_Location.Workflows_Stock_Location.linkSalesChannelsToStockLocationWorkflow/page.mdx b/www/apps/resources/references/core_flows/Stock_Location/Workflows_Stock_Location/functions/core_flows.Stock_Location.Workflows_Stock_Location.linkSalesChannelsToStockLocationWorkflow/page.mdx index 5d820cbe08..ea25da4e06 100644 --- a/www/apps/resources/references/core_flows/Stock_Location/Workflows_Stock_Location/functions/core_flows.Stock_Location.Workflows_Stock_Location.linkSalesChannelsToStockLocationWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Stock_Location/Workflows_Stock_Location/functions/core_flows.Stock_Location.Workflows_Stock_Location.linkSalesChannelsToStockLocationWorkflow/page.mdx @@ -16,27 +16,9 @@ This workflow creates and dismisses links between location and sales channel rec +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { linkSalesChannelsToStockLocationWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = linkSalesChannelsToStockLocationWorkflow - .runAsStep({ - input: { - "id": "id_xF7LQuoh4JgQpN8BwD" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -53,7 +35,7 @@ export async function POST( const { result } = await linkSalesChannelsToStockLocationWorkflow(req.scope) .run({ input: { - "id": "id_xF7LQuoh4JgQpN8BwD" + "id": "id_3qzgHt0VY2qaJV" } }) @@ -78,7 +60,7 @@ export default async function handleOrderPlaced({ const { result } = await linkSalesChannelsToStockLocationWorkflow(container) .run({ input: { - "id": "id_xF7LQuoh4JgQpN8BwD" + "id": "id_3qzgHt0VY2qaJV" } }) @@ -103,7 +85,7 @@ export default async function myCustomJob( const { result } = await linkSalesChannelsToStockLocationWorkflow(container) .run({ input: { - "id": "id_xF7LQuoh4JgQpN8BwD" + "id": "id_3qzgHt0VY2qaJV" } }) @@ -114,6 +96,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { linkSalesChannelsToStockLocationWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = linkSalesChannelsToStockLocationWorkflow + .runAsStep({ + input: { + "id": "id_3qzgHt0VY2qaJV" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Stock_Location/Workflows_Stock_Location/functions/core_flows.Stock_Location.Workflows_Stock_Location.updateStockLocationsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Stock_Location/Workflows_Stock_Location/functions/core_flows.Stock_Location.Workflows_Stock_Location.updateStockLocationsWorkflow/page.mdx index e58bb54c9c..5bff7b34e6 100644 --- a/www/apps/resources/references/core_flows/Stock_Location/Workflows_Stock_Location/functions/core_flows.Stock_Location.Workflows_Stock_Location.updateStockLocationsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Stock_Location/Workflows_Stock_Location/functions/core_flows.Stock_Location.Workflows_Stock_Location.updateStockLocationsWorkflow/page.mdx @@ -17,28 +17,9 @@ This workflow updates stock locations matching the specified filters. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updateStockLocationsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updateStockLocationsWorkflow - .runAsStep({ - input: { - "selector": {}, - "update": {} - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -119,6 +100,27 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updateStockLocationsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updateStockLocationsWorkflow + .runAsStep({ + input: { + "selector": {}, + "update": {} + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Store/Workflows_Store/functions/core_flows.Store.Workflows_Store.createStoresWorkflow/page.mdx b/www/apps/resources/references/core_flows/Store/Workflows_Store/functions/core_flows.Store.Workflows_Store.createStoresWorkflow/page.mdx index 09b6a297ca..2cc54ce571 100644 --- a/www/apps/resources/references/core_flows/Store/Workflows_Store/functions/core_flows.Store.Workflows_Store.createStoresWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Store/Workflows_Store/functions/core_flows.Store.Workflows_Store.createStoresWorkflow/page.mdx @@ -17,25 +17,9 @@ This workflow creates one or more stores. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createStoresWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createStoresWorkflow - .runAsStep({ - input: "{value}" - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -107,6 +91,24 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createStoresWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createStoresWorkflow + .runAsStep({ + input: "{value}" + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Store/Workflows_Store/functions/core_flows.Store.Workflows_Store.deleteStoresWorkflow/page.mdx b/www/apps/resources/references/core_flows/Store/Workflows_Store/functions/core_flows.Store.Workflows_Store.deleteStoresWorkflow/page.mdx index 9e6683f3a8..2f41b69793 100644 --- a/www/apps/resources/references/core_flows/Store/Workflows_Store/functions/core_flows.Store.Workflows_Store.deleteStoresWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Store/Workflows_Store/functions/core_flows.Store.Workflows_Store.deleteStoresWorkflow/page.mdx @@ -16,29 +16,9 @@ This workflow deletes one or more stores. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { deleteStoresWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = deleteStoresWorkflow - .runAsStep({ - input: { - "ids": [ - "id_GdaKOurifV4IE9GaEmp" - ] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -56,7 +36,7 @@ export async function POST( .run({ input: { "ids": [ - "id_GdaKOurifV4IE9GaEmp" + "id_2XRbDyO8WP" ] } }) @@ -83,7 +63,7 @@ export default async function handleOrderPlaced({ .run({ input: { "ids": [ - "id_GdaKOurifV4IE9GaEmp" + "id_2XRbDyO8WP" ] } }) @@ -110,7 +90,7 @@ export default async function myCustomJob( .run({ input: { "ids": [ - "id_GdaKOurifV4IE9GaEmp" + "id_2XRbDyO8WP" ] } }) @@ -122,6 +102,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { deleteStoresWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = deleteStoresWorkflow + .runAsStep({ + input: { + "ids": [ + "id_2XRbDyO8WP" + ] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Store/Workflows_Store/functions/core_flows.Store.Workflows_Store.updateStoresWorkflow/page.mdx b/www/apps/resources/references/core_flows/Store/Workflows_Store/functions/core_flows.Store.Workflows_Store.updateStoresWorkflow/page.mdx index c1d936a0aa..f9e7bc71ed 100644 --- a/www/apps/resources/references/core_flows/Store/Workflows_Store/functions/core_flows.Store.Workflows_Store.updateStoresWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Store/Workflows_Store/functions/core_flows.Store.Workflows_Store.updateStoresWorkflow/page.mdx @@ -17,28 +17,9 @@ This workflow updates stores matching the specified filters. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updateStoresWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updateStoresWorkflow - .runAsStep({ - input: { - "selector": {}, - "update": {} - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -119,6 +100,27 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updateStoresWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updateStoresWorkflow + .runAsStep({ + input: { + "selector": {}, + "update": {} + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Tax/Steps_Tax/functions/core_flows.Tax.Steps_Tax.createTaxRatesStep/page.mdx b/www/apps/resources/references/core_flows/Tax/Steps_Tax/functions/core_flows.Tax.Steps_Tax.createTaxRatesStep/page.mdx index 69ce17114f..2d4759a35e 100644 --- a/www/apps/resources/references/core_flows/Tax/Steps_Tax/functions/core_flows.Tax.Steps_Tax.createTaxRatesStep/page.mdx +++ b/www/apps/resources/references/core_flows/Tax/Steps_Tax/functions/core_flows.Tax.Steps_Tax.createTaxRatesStep/page.mdx @@ -23,7 +23,7 @@ const myWorkflow = createWorkflow( () => { const data = createTaxRatesStep([{ "tax_region_id": "{value}", - "name": "Godfrey" + "name": "Kenyon" }]) } ) diff --git a/www/apps/resources/references/core_flows/Tax/Steps_Tax/functions/core_flows.Tax.Steps_Tax.getItemTaxLinesStep/page.mdx b/www/apps/resources/references/core_flows/Tax/Steps_Tax/functions/core_flows.Tax.Steps_Tax.getItemTaxLinesStep/page.mdx index f134c8096d..f0cb41b9c0 100644 --- a/www/apps/resources/references/core_flows/Tax/Steps_Tax/functions/core_flows.Tax.Steps_Tax.getItemTaxLinesStep/page.mdx +++ b/www/apps/resources/references/core_flows/Tax/Steps_Tax/functions/core_flows.Tax.Steps_Tax.getItemTaxLinesStep/page.mdx @@ -23,54 +23,54 @@ const myWorkflow = createWorkflow( () => { const data = getItemTaxLinesStep({ "orderOrCart": { - "id": "id_Vl3De7pieYraIQMuG", + "id": "id_FqDpO5kDecLd6EpUE5S6", "payment_collection": { - "id": "id_K3dZ1JuVEq8y3QDjx", + "id": "id_IpmDJo86CcGoGGs", "currency_code": "{value}", "region_id": "{value}", "amount": { - "numeric": 39 + "numeric": 35 }, - "status": "canceled", + "status": "authorized", "payment_providers": [{ - "id": "id_T8xnSIJmJnialwVQAr", - "is_enabled": true + "id": "id_Sw3AjjQcv15", + "is_enabled": false }] } }, "items": [{ "original_total": { - "numeric": 35 + "numeric": 42 }, "original_subtotal": { - "numeric": 24 + "numeric": 19 }, "original_tax_total": { - "numeric": 45 + "numeric": 6 }, "item_total": { - "numeric": 38 + "numeric": 29 }, "item_subtotal": { - "numeric": 18 + "numeric": 8 }, "item_tax_total": { - "numeric": 48 + "numeric": 0 }, "total": { - "numeric": 10 + "numeric": 6 }, "subtotal": { - "numeric": 32 + "numeric": 22 }, "tax_total": { - "numeric": 17 + "numeric": 49 }, "discount_total": { - "numeric": 47 + "numeric": 11 }, "discount_tax_total": { - "numeric": 35 + "numeric": 10 }, "raw_original_total": { "value": "{value}" @@ -105,86 +105,86 @@ const myWorkflow = createWorkflow( "raw_discount_tax_total": { "value": "{value}" }, - "id": "id_MCwxYxbUJBOu3", - "title": "solitudo", + "id": "id_8dt1OmAIDnbhVFmz5IlN", + "title": "valeo", "quantity": { + "numeric": 3 + }, + "requires_shipping": true, + "is_discountable": false, + "is_tax_inclusive": false, + "is_custom_price": true, + "unit_price": { "numeric": 37 }, - "requires_shipping": false, - "is_discountable": false, - "is_tax_inclusive": true, - "is_custom_price": false, - "unit_price": { - "numeric": 14 - }, "cart": { - "id": "id_dYSLxOgxIGt", + "id": "id_zluBS07PIVaN0U3OVm2", "currency_code": "{value}", "original_item_total": { - "numeric": 39 + "numeric": 35 }, "original_item_subtotal": { "numeric": 3 }, "original_item_tax_total": { - "numeric": 21 + "numeric": 12 }, "item_total": { - "numeric": 20 + "numeric": 14 }, "item_subtotal": { - "numeric": 42 + "numeric": 8 }, "item_tax_total": { - "numeric": 10 + "numeric": 8 }, "original_total": { "numeric": 36 }, "original_subtotal": { - "numeric": 2 + "numeric": 24 }, "original_tax_total": { - "numeric": 18 + "numeric": 46 }, "total": { - "numeric": 50 + "numeric": 45 }, "subtotal": { - "numeric": 8 + "numeric": 44 }, "tax_total": { - "numeric": 1 + "numeric": 46 }, "discount_total": { - "numeric": 49 + "numeric": 11 }, "discount_tax_total": { - "numeric": 19 + "numeric": 4 }, "gift_card_total": { "numeric": 39 }, "gift_card_tax_total": { - "numeric": 18 + "numeric": 34 }, "shipping_total": { - "numeric": 15 + "numeric": 21 }, "shipping_subtotal": { - "numeric": 32 + "numeric": 18 }, "shipping_tax_total": { - "numeric": 22 + "numeric": 33 }, "original_shipping_total": { - "numeric": 28 + "numeric": 6 }, "original_shipping_subtotal": { - "numeric": 7 + "numeric": 8 }, "original_shipping_tax_total": { - "numeric": 36 + "numeric": 26 }, "raw_original_item_total": { "value": "{value}" @@ -256,38 +256,38 @@ const myWorkflow = createWorkflow( "cart_id": "{value}" }], "shipping_methods": [{ - "id": "id_gZqbdxpPCVEo", + "id": "id_TvylOl3jvl8Pd7w8nN9", "cart_id": "{value}", - "name": "Lavonne", + "name": "Elisa", "amount": { - "numeric": 34 + "numeric": 31 }, "is_tax_inclusive": false, - "created_at": "2025-03-29T21:13:02.034Z", - "updated_at": "2025-02-20T21:46:20.838Z", + "created_at": "2025-01-27T07:18:36.514Z", + "updated_at": "2025-02-24T15:14:27.253Z", "original_total": { - "numeric": 44 + "numeric": 3 }, "original_subtotal": { - "numeric": 46 - }, - "original_tax_total": { - "numeric": 49 - }, - "total": { - "numeric": 10 - }, - "subtotal": { - "numeric": 26 - }, - "tax_total": { "numeric": 12 }, + "original_tax_total": { + "numeric": 3 + }, + "total": { + "numeric": 15 + }, + "subtotal": { + "numeric": 4 + }, + "tax_total": { + "numeric": 16 + }, "discount_total": { - "numeric": 47 + "numeric": 37 }, "discount_tax_total": { - "numeric": 26 + "numeric": 32 }, "raw_original_total": { "value": "{value}" diff --git a/www/apps/resources/references/core_flows/Tax/Steps_Tax/functions/core_flows.Tax.Steps_Tax.updateTaxRegionsStep/page.mdx b/www/apps/resources/references/core_flows/Tax/Steps_Tax/functions/core_flows.Tax.Steps_Tax.updateTaxRegionsStep/page.mdx index ef646d8237..a0c7c9791d 100644 --- a/www/apps/resources/references/core_flows/Tax/Steps_Tax/functions/core_flows.Tax.Steps_Tax.updateTaxRegionsStep/page.mdx +++ b/www/apps/resources/references/core_flows/Tax/Steps_Tax/functions/core_flows.Tax.Steps_Tax.updateTaxRegionsStep/page.mdx @@ -22,7 +22,7 @@ const myWorkflow = createWorkflow( "my-workflow", () => { const data = updateTaxRegionsStep([{ - "id": "id_KytDoTEfyb96X" + "id": "id_edQcv9qHbg4vxLsezPF" }]) } ) diff --git a/www/apps/resources/references/core_flows/Tax/Workflows_Tax/functions/core_flows.Tax.Workflows_Tax.createTaxRateRulesWorkflow/page.mdx b/www/apps/resources/references/core_flows/Tax/Workflows_Tax/functions/core_flows.Tax.Workflows_Tax.createTaxRateRulesWorkflow/page.mdx index 9f1e8f5fc3..2dfb02121e 100644 --- a/www/apps/resources/references/core_flows/Tax/Workflows_Tax/functions/core_flows.Tax.Workflows_Tax.createTaxRateRulesWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Tax/Workflows_Tax/functions/core_flows.Tax.Workflows_Tax.createTaxRateRulesWorkflow/page.mdx @@ -16,31 +16,9 @@ This workflow creates one or more tax rate rules. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createTaxRateRulesWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createTaxRateRulesWorkflow - .runAsStep({ - input: { - "rules": [{ - "reference": "{value}", - "reference_id": "{value}", - "tax_rate_id": "{value}" - }] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -130,6 +108,30 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createTaxRateRulesWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createTaxRateRulesWorkflow + .runAsStep({ + input: { + "rules": [{ + "reference": "{value}", + "reference_id": "{value}", + "tax_rate_id": "{value}" + }] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Tax/Workflows_Tax/functions/core_flows.Tax.Workflows_Tax.createTaxRatesWorkflow/page.mdx b/www/apps/resources/references/core_flows/Tax/Workflows_Tax/functions/core_flows.Tax.Workflows_Tax.createTaxRatesWorkflow/page.mdx index 7d516aa633..ae4bc4334f 100644 --- a/www/apps/resources/references/core_flows/Tax/Workflows_Tax/functions/core_flows.Tax.Workflows_Tax.createTaxRatesWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Tax/Workflows_Tax/functions/core_flows.Tax.Workflows_Tax.createTaxRatesWorkflow/page.mdx @@ -16,28 +16,9 @@ This workflow creates one or more tax rates. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createTaxRatesWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createTaxRatesWorkflow - .runAsStep({ - input: [{ - "tax_region_id": "{value}", - "name": "Roslyn" - }] - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -55,7 +36,7 @@ export async function POST( .run({ input: [{ "tax_region_id": "{value}", - "name": "Roslyn" + "name": "Sterling" }] }) @@ -81,7 +62,7 @@ export default async function handleOrderPlaced({ .run({ input: [{ "tax_region_id": "{value}", - "name": "Roslyn" + "name": "Sterling" }] }) @@ -107,7 +88,7 @@ export default async function myCustomJob( .run({ input: [{ "tax_region_id": "{value}", - "name": "Roslyn" + "name": "Sterling" }] }) @@ -118,6 +99,27 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createTaxRatesWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createTaxRatesWorkflow + .runAsStep({ + input: [{ + "tax_region_id": "{value}", + "name": "Sterling" + }] + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Tax/Workflows_Tax/functions/core_flows.Tax.Workflows_Tax.createTaxRegionsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Tax/Workflows_Tax/functions/core_flows.Tax.Workflows_Tax.createTaxRegionsWorkflow/page.mdx index 9b61f60c28..1791df4616 100644 --- a/www/apps/resources/references/core_flows/Tax/Workflows_Tax/functions/core_flows.Tax.Workflows_Tax.createTaxRegionsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Tax/Workflows_Tax/functions/core_flows.Tax.Workflows_Tax.createTaxRegionsWorkflow/page.mdx @@ -16,27 +16,9 @@ This workflow creates one or more tax regions. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createTaxRegionsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createTaxRegionsWorkflow - .runAsStep({ - input: [{ - "country_code": "{value}" - }] - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -114,6 +96,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createTaxRegionsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createTaxRegionsWorkflow + .runAsStep({ + input: [{ + "country_code": "{value}" + }] + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Tax/Workflows_Tax/functions/core_flows.Tax.Workflows_Tax.deleteTaxRateRulesWorkflow/page.mdx b/www/apps/resources/references/core_flows/Tax/Workflows_Tax/functions/core_flows.Tax.Workflows_Tax.deleteTaxRateRulesWorkflow/page.mdx index d266e74c0f..f8ccff615d 100644 --- a/www/apps/resources/references/core_flows/Tax/Workflows_Tax/functions/core_flows.Tax.Workflows_Tax.deleteTaxRateRulesWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Tax/Workflows_Tax/functions/core_flows.Tax.Workflows_Tax.deleteTaxRateRulesWorkflow/page.mdx @@ -16,29 +16,9 @@ This workflow deletes one or more tax rate rules. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { deleteTaxRateRulesWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = deleteTaxRateRulesWorkflow - .runAsStep({ - input: { - "ids": [ - "id_tjkoyMpyaprIgXNpxAhN" - ] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -56,7 +36,7 @@ export async function POST( .run({ input: { "ids": [ - "id_tjkoyMpyaprIgXNpxAhN" + "id_yLyLJi8ZAo2sfwAw" ] } }) @@ -83,7 +63,7 @@ export default async function handleOrderPlaced({ .run({ input: { "ids": [ - "id_tjkoyMpyaprIgXNpxAhN" + "id_yLyLJi8ZAo2sfwAw" ] } }) @@ -110,7 +90,7 @@ export default async function myCustomJob( .run({ input: { "ids": [ - "id_tjkoyMpyaprIgXNpxAhN" + "id_yLyLJi8ZAo2sfwAw" ] } }) @@ -122,6 +102,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { deleteTaxRateRulesWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = deleteTaxRateRulesWorkflow + .runAsStep({ + input: { + "ids": [ + "id_yLyLJi8ZAo2sfwAw" + ] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Tax/Workflows_Tax/functions/core_flows.Tax.Workflows_Tax.deleteTaxRatesWorkflow/page.mdx b/www/apps/resources/references/core_flows/Tax/Workflows_Tax/functions/core_flows.Tax.Workflows_Tax.deleteTaxRatesWorkflow/page.mdx index d7ef0de398..2f9e4aef96 100644 --- a/www/apps/resources/references/core_flows/Tax/Workflows_Tax/functions/core_flows.Tax.Workflows_Tax.deleteTaxRatesWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Tax/Workflows_Tax/functions/core_flows.Tax.Workflows_Tax.deleteTaxRatesWorkflow/page.mdx @@ -16,29 +16,9 @@ This workflow deletes one or more tax rates. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { deleteTaxRatesWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = deleteTaxRatesWorkflow - .runAsStep({ - input: { - "ids": [ - "id_ZqTRoUlKVs0xd" - ] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -56,7 +36,7 @@ export async function POST( .run({ input: { "ids": [ - "id_ZqTRoUlKVs0xd" + "id_4LbAHjLoizaC9kyF9Q60" ] } }) @@ -83,7 +63,7 @@ export default async function handleOrderPlaced({ .run({ input: { "ids": [ - "id_ZqTRoUlKVs0xd" + "id_4LbAHjLoizaC9kyF9Q60" ] } }) @@ -110,7 +90,7 @@ export default async function myCustomJob( .run({ input: { "ids": [ - "id_ZqTRoUlKVs0xd" + "id_4LbAHjLoizaC9kyF9Q60" ] } }) @@ -122,6 +102,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { deleteTaxRatesWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = deleteTaxRatesWorkflow + .runAsStep({ + input: { + "ids": [ + "id_4LbAHjLoizaC9kyF9Q60" + ] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Tax/Workflows_Tax/functions/core_flows.Tax.Workflows_Tax.deleteTaxRegionsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Tax/Workflows_Tax/functions/core_flows.Tax.Workflows_Tax.deleteTaxRegionsWorkflow/page.mdx index 2c596f532c..08f610e268 100644 --- a/www/apps/resources/references/core_flows/Tax/Workflows_Tax/functions/core_flows.Tax.Workflows_Tax.deleteTaxRegionsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Tax/Workflows_Tax/functions/core_flows.Tax.Workflows_Tax.deleteTaxRegionsWorkflow/page.mdx @@ -16,29 +16,9 @@ This workflow deletes one or more tax regions. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { deleteTaxRegionsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = deleteTaxRegionsWorkflow - .runAsStep({ - input: { - "ids": [ - "id_3vJ7VgZHVneAeCPS9e" - ] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -56,7 +36,7 @@ export async function POST( .run({ input: { "ids": [ - "id_3vJ7VgZHVneAeCPS9e" + "id_zqqkozLS333" ] } }) @@ -83,7 +63,7 @@ export default async function handleOrderPlaced({ .run({ input: { "ids": [ - "id_3vJ7VgZHVneAeCPS9e" + "id_zqqkozLS333" ] } }) @@ -110,7 +90,7 @@ export default async function myCustomJob( .run({ input: { "ids": [ - "id_3vJ7VgZHVneAeCPS9e" + "id_zqqkozLS333" ] } }) @@ -122,6 +102,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { deleteTaxRegionsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = deleteTaxRegionsWorkflow + .runAsStep({ + input: { + "ids": [ + "id_zqqkozLS333" + ] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Tax/Workflows_Tax/functions/core_flows.Tax.Workflows_Tax.setTaxRateRulesWorkflow/page.mdx b/www/apps/resources/references/core_flows/Tax/Workflows_Tax/functions/core_flows.Tax.Workflows_Tax.setTaxRateRulesWorkflow/page.mdx index 78398bb288..67a6bf9d47 100644 --- a/www/apps/resources/references/core_flows/Tax/Workflows_Tax/functions/core_flows.Tax.Workflows_Tax.setTaxRateRulesWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Tax/Workflows_Tax/functions/core_flows.Tax.Workflows_Tax.setTaxRateRulesWorkflow/page.mdx @@ -16,32 +16,9 @@ This workflow sets the rules of tax rates. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { setTaxRateRulesWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = setTaxRateRulesWorkflow - .runAsStep({ - input: { - "tax_rate_ids": [ - "{value}" - ], - "rules": [ - "{value}" - ] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -134,6 +111,31 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { setTaxRateRulesWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = setTaxRateRulesWorkflow + .runAsStep({ + input: { + "tax_rate_ids": [ + "{value}" + ], + "rules": [ + "{value}" + ] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Tax/Workflows_Tax/functions/core_flows.Tax.Workflows_Tax.updateTaxRatesWorkflow/page.mdx b/www/apps/resources/references/core_flows/Tax/Workflows_Tax/functions/core_flows.Tax.Workflows_Tax.updateTaxRatesWorkflow/page.mdx index 79167d9f9c..bab6cca088 100644 --- a/www/apps/resources/references/core_flows/Tax/Workflows_Tax/functions/core_flows.Tax.Workflows_Tax.updateTaxRatesWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Tax/Workflows_Tax/functions/core_flows.Tax.Workflows_Tax.updateTaxRatesWorkflow/page.mdx @@ -16,28 +16,9 @@ This workflow updates tax rates matching specified filters. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updateTaxRatesWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updateTaxRatesWorkflow - .runAsStep({ - input: { - "selector": {}, - "update": {} - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -118,6 +99,27 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updateTaxRatesWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updateTaxRatesWorkflow + .runAsStep({ + input: { + "selector": {}, + "update": {} + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/Tax/Workflows_Tax/functions/core_flows.Tax.Workflows_Tax.updateTaxRegionsWorkflow/page.mdx b/www/apps/resources/references/core_flows/Tax/Workflows_Tax/functions/core_flows.Tax.Workflows_Tax.updateTaxRegionsWorkflow/page.mdx index 8b8863428d..b77855dbc5 100644 --- a/www/apps/resources/references/core_flows/Tax/Workflows_Tax/functions/core_flows.Tax.Workflows_Tax.updateTaxRegionsWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/Tax/Workflows_Tax/functions/core_flows.Tax.Workflows_Tax.updateTaxRegionsWorkflow/page.mdx @@ -16,27 +16,9 @@ This workflow updates one or more tax regions. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updateTaxRegionsWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updateTaxRegionsWorkflow - .runAsStep({ - input: [{ - "id": "id_JcutDuQ2eMYRhbIAqoQ" - }] - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -53,7 +35,7 @@ export async function POST( const { result } = await updateTaxRegionsWorkflow(req.scope) .run({ input: [{ - "id": "id_JcutDuQ2eMYRhbIAqoQ" + "id": "id_xCZkFV4bvTffqqMEx" }] }) @@ -78,7 +60,7 @@ export default async function handleOrderPlaced({ const { result } = await updateTaxRegionsWorkflow(container) .run({ input: [{ - "id": "id_JcutDuQ2eMYRhbIAqoQ" + "id": "id_xCZkFV4bvTffqqMEx" }] }) @@ -103,7 +85,7 @@ export default async function myCustomJob( const { result } = await updateTaxRegionsWorkflow(container) .run({ input: [{ - "id": "id_JcutDuQ2eMYRhbIAqoQ" + "id": "id_xCZkFV4bvTffqqMEx" }] }) @@ -114,6 +96,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updateTaxRegionsWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updateTaxRegionsWorkflow + .runAsStep({ + input: [{ + "id": "id_xCZkFV4bvTffqqMEx" + }] + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/User/Steps_User/functions/core_flows.User.Steps_User.createUsersStep/page.mdx b/www/apps/resources/references/core_flows/User/Steps_User/functions/core_flows.User.Steps_User.createUsersStep/page.mdx index f8ea983dcb..ef7652fdba 100644 --- a/www/apps/resources/references/core_flows/User/Steps_User/functions/core_flows.User.Steps_User.createUsersStep/page.mdx +++ b/www/apps/resources/references/core_flows/User/Steps_User/functions/core_flows.User.Steps_User.createUsersStep/page.mdx @@ -22,7 +22,7 @@ const myWorkflow = createWorkflow( "my-workflow", () => { const data = createUsersStep([{ - "email": "Harvey_Beer63@hotmail.com" + "email": "Carmel82@gmail.com" }]) } ) diff --git a/www/apps/resources/references/core_flows/User/Steps_User/functions/core_flows.User.Steps_User.updateUsersStep/page.mdx b/www/apps/resources/references/core_flows/User/Steps_User/functions/core_flows.User.Steps_User.updateUsersStep/page.mdx index 8e50dcdb3c..9d90c4a2fd 100644 --- a/www/apps/resources/references/core_flows/User/Steps_User/functions/core_flows.User.Steps_User.updateUsersStep/page.mdx +++ b/www/apps/resources/references/core_flows/User/Steps_User/functions/core_flows.User.Steps_User.updateUsersStep/page.mdx @@ -22,7 +22,7 @@ const myWorkflow = createWorkflow( "my-workflow", () => { const data = updateUsersStep([{ - "id": "id_G9GeHf1BgDnXCezA2de5" + "id": "id_2K774SWBWdpcBQsi" }]) } ) diff --git a/www/apps/resources/references/core_flows/User/Workflows_User/functions/core_flows.User.Workflows_User.createUserAccountWorkflow/page.mdx b/www/apps/resources/references/core_flows/User/Workflows_User/functions/core_flows.User.Workflows_User.createUserAccountWorkflow/page.mdx index 71a26b3605..6831202225 100644 --- a/www/apps/resources/references/core_flows/User/Workflows_User/functions/core_flows.User.Workflows_User.createUserAccountWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/User/Workflows_User/functions/core_flows.User.Workflows_User.createUserAccountWorkflow/page.mdx @@ -18,30 +18,9 @@ This workflow creates an authentication identity for a user. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createUserAccountWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createUserAccountWorkflow - .runAsStep({ - input: { - "authIdentityId": "{value}", - "userData": { - "email": "Malvina70@gmail.com" - } - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -60,7 +39,7 @@ export async function POST( input: { "authIdentityId": "{value}", "userData": { - "email": "Malvina70@gmail.com" + "email": "Asha19@hotmail.com" } } }) @@ -88,7 +67,7 @@ export default async function handleOrderPlaced({ input: { "authIdentityId": "{value}", "userData": { - "email": "Malvina70@gmail.com" + "email": "Asha19@hotmail.com" } } }) @@ -116,7 +95,7 @@ export default async function myCustomJob( input: { "authIdentityId": "{value}", "userData": { - "email": "Malvina70@gmail.com" + "email": "Asha19@hotmail.com" } } }) @@ -128,6 +107,29 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createUserAccountWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createUserAccountWorkflow + .runAsStep({ + input: { + "authIdentityId": "{value}", + "userData": { + "email": "Asha19@hotmail.com" + } + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/User/Workflows_User/functions/core_flows.User.Workflows_User.createUsersWorkflow/page.mdx b/www/apps/resources/references/core_flows/User/Workflows_User/functions/core_flows.User.Workflows_User.createUsersWorkflow/page.mdx index 6556681e05..5ceee7d5d7 100644 --- a/www/apps/resources/references/core_flows/User/Workflows_User/functions/core_flows.User.Workflows_User.createUsersWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/User/Workflows_User/functions/core_flows.User.Workflows_User.createUsersWorkflow/page.mdx @@ -17,29 +17,9 @@ This workflow creates one or more users. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { createUsersWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = createUsersWorkflow - .runAsStep({ - input: { - "users": [{ - "email": "Name_Tremblay90@yahoo.com" - }] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -57,7 +37,7 @@ export async function POST( .run({ input: { "users": [{ - "email": "Name_Tremblay90@yahoo.com" + "email": "Ari.Terry62@hotmail.com" }] } }) @@ -84,7 +64,7 @@ export default async function handleOrderPlaced({ .run({ input: { "users": [{ - "email": "Name_Tremblay90@yahoo.com" + "email": "Ari.Terry62@hotmail.com" }] } }) @@ -111,7 +91,7 @@ export default async function myCustomJob( .run({ input: { "users": [{ - "email": "Name_Tremblay90@yahoo.com" + "email": "Ari.Terry62@hotmail.com" }] } }) @@ -123,6 +103,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { createUsersWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = createUsersWorkflow + .runAsStep({ + input: { + "users": [{ + "email": "Ari.Terry62@hotmail.com" + }] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/User/Workflows_User/functions/core_flows.User.Workflows_User.deleteUsersWorkflow/page.mdx b/www/apps/resources/references/core_flows/User/Workflows_User/functions/core_flows.User.Workflows_User.deleteUsersWorkflow/page.mdx index ca9d81d78a..d1d04dcd25 100644 --- a/www/apps/resources/references/core_flows/User/Workflows_User/functions/core_flows.User.Workflows_User.deleteUsersWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/User/Workflows_User/functions/core_flows.User.Workflows_User.deleteUsersWorkflow/page.mdx @@ -17,29 +17,9 @@ This workflow deletes one or more users. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { deleteUsersWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = deleteUsersWorkflow - .runAsStep({ - input: { - "ids": [ - "id_IIcBoQC1xkInGuNWT4" - ] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -57,7 +37,7 @@ export async function POST( .run({ input: { "ids": [ - "id_IIcBoQC1xkInGuNWT4" + "id_ii66UaqcPTcVTRkDtZ" ] } }) @@ -84,7 +64,7 @@ export default async function handleOrderPlaced({ .run({ input: { "ids": [ - "id_IIcBoQC1xkInGuNWT4" + "id_ii66UaqcPTcVTRkDtZ" ] } }) @@ -111,7 +91,7 @@ export default async function myCustomJob( .run({ input: { "ids": [ - "id_IIcBoQC1xkInGuNWT4" + "id_ii66UaqcPTcVTRkDtZ" ] } }) @@ -123,6 +103,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { deleteUsersWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = deleteUsersWorkflow + .runAsStep({ + input: { + "ids": [ + "id_ii66UaqcPTcVTRkDtZ" + ] + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/User/Workflows_User/functions/core_flows.User.Workflows_User.removeUserAccountWorkflow/page.mdx b/www/apps/resources/references/core_flows/User/Workflows_User/functions/core_flows.User.Workflows_User.removeUserAccountWorkflow/page.mdx index 7ac7555d94..82d77fac23 100644 --- a/www/apps/resources/references/core_flows/User/Workflows_User/functions/core_flows.User.Workflows_User.removeUserAccountWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/User/Workflows_User/functions/core_flows.User.Workflows_User.removeUserAccountWorkflow/page.mdx @@ -19,27 +19,9 @@ This workflow deletes a user and remove the association in the auth identity. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { removeUserAccountWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = removeUserAccountWorkflow - .runAsStep({ - input: { - "userId": "{value}" - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -117,6 +99,26 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { removeUserAccountWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = removeUserAccountWorkflow + .runAsStep({ + input: { + "userId": "{value}" + } + }) + } +) ``` diff --git a/www/apps/resources/references/core_flows/User/Workflows_User/functions/core_flows.User.Workflows_User.updateUsersWorkflow/page.mdx b/www/apps/resources/references/core_flows/User/Workflows_User/functions/core_flows.User.Workflows_User.updateUsersWorkflow/page.mdx index c04e469d33..0283106fca 100644 --- a/www/apps/resources/references/core_flows/User/Workflows_User/functions/core_flows.User.Workflows_User.updateUsersWorkflow/page.mdx +++ b/www/apps/resources/references/core_flows/User/Workflows_User/functions/core_flows.User.Workflows_User.updateUsersWorkflow/page.mdx @@ -17,29 +17,9 @@ This workflow updates one or more users. +## Examples + - - -```ts title="src/workflows/my-workflow.ts" -import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { updateUsersWorkflow } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - const result = updateUsersWorkflow - .runAsStep({ - input: { - "updates": [{ - "id": "id_MAAMyEjPVti2VFpXe4" - }] - } - }) - } -) -``` - - ```ts title="src/api/workflow/route.ts" @@ -57,7 +37,7 @@ export async function POST( .run({ input: { "updates": [{ - "id": "id_MAAMyEjPVti2VFpXe4" + "id": "id_Ps27IEZ6hUFL8v" }] } }) @@ -84,7 +64,7 @@ export default async function handleOrderPlaced({ .run({ input: { "updates": [{ - "id": "id_MAAMyEjPVti2VFpXe4" + "id": "id_Ps27IEZ6hUFL8v" }] } }) @@ -111,7 +91,7 @@ export default async function myCustomJob( .run({ input: { "updates": [{ - "id": "id_MAAMyEjPVti2VFpXe4" + "id": "id_Ps27IEZ6hUFL8v" }] } }) @@ -123,6 +103,28 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", } +``` + + + + +```ts title="src/workflows/my-workflow.ts" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { updateUsersWorkflow } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + const result = updateUsersWorkflow + .runAsStep({ + input: { + "updates": [{ + "id": "id_Ps27IEZ6hUFL8v" + }] + } + }) + } +) ``` diff --git a/www/apps/resources/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.listAndCountCurrencies/page.mdx b/www/apps/resources/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.listAndCountCurrencies/page.mdx index a23b4e62e8..7184765219 100644 --- a/www/apps/resources/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.listAndCountCurrencies/page.mdx +++ b/www/apps/resources/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.listAndCountCurrencies/page.mdx @@ -46,7 +46,7 @@ const [currencies, count] = ## Parameters -`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record`","description":"Enable ORM specific defined options","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/currency.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/currency.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listAndCountCurrencies"/> +`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record`","description":"Enable ORM specific defined options","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/currency.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/currency.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listAndCountCurrencies"/> ## Returns diff --git a/www/apps/resources/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.listCurrencies/page.mdx b/www/apps/resources/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.listCurrencies/page.mdx index 8c9a3ad7b1..678cd5031e 100644 --- a/www/apps/resources/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.listCurrencies/page.mdx +++ b/www/apps/resources/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.listCurrencies/page.mdx @@ -44,7 +44,7 @@ const currencies = await currencyModuleService.listCurrencies( ## Parameters -`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record`","description":"Enable ORM specific defined options","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/currency.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/currency.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listCurrencies"/> +`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record`","description":"Enable ORM specific defined options","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/currency.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/currency.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listCurrencies"/> ## Returns diff --git a/www/apps/resources/references/currency/IMessageAggregator/methods/currency.IMessageAggregator.saveRawMessageData/page.mdx b/www/apps/resources/references/currency/IMessageAggregator/methods/currency.IMessageAggregator.saveRawMessageData/page.mdx index 4c74698b9f..59ed2bb81c 100644 --- a/www/apps/resources/references/currency/IMessageAggregator/methods/currency.IMessageAggregator.saveRawMessageData/page.mdx +++ b/www/apps/resources/references/currency/IMessageAggregator/methods/currency.IMessageAggregator.saveRawMessageData/page.mdx @@ -8,7 +8,7 @@ import { TypeList } from "docs-ui" ## Parameters -`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"action","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"Pick<[Context](../../../interfaces/currency.Context/page.mdx), \"eventGroupId\">","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"options","type":"`Record`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"options","type":"`Record`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="saveRawMessageData"/> +`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"options","type":"`Record`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="saveRawMessageData"/> ## Returns diff --git a/www/apps/resources/references/currency/IModuleService/methods/currency.IModuleService.__joinerConfig/page.mdx b/www/apps/resources/references/currency/IModuleService/methods/currency.IModuleService.__joinerConfig/page.mdx index 70a8e842c3..073d9ad4dd 100644 --- a/www/apps/resources/references/currency/IModuleService/methods/currency.IModuleService.__joinerConfig/page.mdx +++ b/www/apps/resources/references/currency/IModuleService/methods/currency.IModuleService.__joinerConfig/page.mdx @@ -8,4 +8,4 @@ import { TypeList } from "docs-ui" ## Returns -`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"fieldAlias","type":"`Record`","description":"alias for deeper nested relationships (e.g. { 'price': 'prices.calculated\\_price\\_set.amount' })","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"path","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"forwardArgumentsOnPath","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"schema","type":"`string`","description":"GraphQL schema for the all module's available entities and fields","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relationships","type":"[ModuleJoinerRelationship](../../../types/currency.ModuleJoinerRelationship/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleteCascade","type":"`boolean`","description":"If true, the link joiner will cascade deleting the relationship","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"extends","type":"`object`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"relationship","type":"[ModuleJoinerRelationship](../../../types/currency.ModuleJoinerRelationship/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleteCascade","type":"`boolean`","description":"If true, the link joiner will cascade deleting the relationship","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fieldAlias","type":"`Record`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"path","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"forwardArgumentsOnPath","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"serviceName","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKeys","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isLink","type":"`boolean`","description":"If the module is a link module","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"linkableKeys","type":"`Record`","description":"Keys that can be used to link to other modules. e.g { product\\_id: \"Product\" } \"Product\" being the entity it refers to","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isReadOnlyLink","type":"`boolean`","description":"If true it expands a RemoteQuery property but doesn't create a pivot table","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"extraDataFields","type":"`string`[]","description":"Fields that will be part of the link record aside from the primary keys that can be updated\nIf not explicitly defined, this array will be populated by databaseConfig.extraFields","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"databaseConfig","type":"`object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tableName","type":"`string`","description":"Name of the pivot table. If not provided it is auto generated","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idPrefix","type":"`string`","description":"Prefix for the id column. If not provided it is \"link\"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"extraFields","type":"[LinkModulesExtraFields](../../../types/currency.LinkModulesExtraFields/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"type","type":"`\"date\"` \\| `\"time\"` \\| `\"datetime\"` \\| `bigint` \\| `\"blob\"` \\| `\"uint8array\"` \\| `\"array\"` \\| `\"enumArray\"` \\| `\"enum\"` \\| `\"json\"` \\| `\"integer\"` \\| `\"smallint\"` \\| `\"tinyint\"` \\| `\"mediumint\"` \\| `\"float\"` \\| `\"double\"` \\| `\"boolean\"` \\| `\"decimal\"` \\| `\"string\"` \\| `\"uuid\"` \\| `\"text\"`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"defaultValue","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"nullable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record`","description":"Mikro-orm options for the column","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__joinerConfig"/> +`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"fieldAlias","type":"`Record`","description":"alias for deeper nested relationships (e.g. { 'price': 'prices.calculated\\_price\\_set.amount' })","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"path","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"forwardArgumentsOnPath","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"schema","type":"`string`","description":"GraphQL schema for the all module's available entities and fields","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relationships","type":"[ModuleJoinerRelationship](../../../types/currency.ModuleJoinerRelationship/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleteCascade","type":"`boolean`","description":"If true, the link joiner will cascade deleting the relationship","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"extends","type":"`object`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"relationship","type":"[ModuleJoinerRelationship](../../../types/currency.ModuleJoinerRelationship/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleteCascade","type":"`boolean`","description":"If true, the link joiner will cascade deleting the relationship","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fieldAlias","type":"`Record`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"path","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"forwardArgumentsOnPath","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"serviceName","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKeys","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isLink","type":"`boolean`","description":"If the module is a link module","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"linkableKeys","type":"`Record`","description":"Keys that can be used to link to other modules. e.g { product\\_id: \"Product\" } \"Product\" being the entity it refers to","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isReadOnlyLink","type":"`boolean`","description":"If true it expands a RemoteQuery property but doesn't create a pivot table","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"extraDataFields","type":"`string`[]","description":"Fields that will be part of the link record aside from the primary keys that can be updated\nIf not explicitly defined, this array will be populated by databaseConfig.extraFields","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"databaseConfig","type":"`object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tableName","type":"`string`","description":"Name of the pivot table. If not provided it is auto generated","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idPrefix","type":"`string`","description":"Prefix for the id column. If not provided it is \"link\"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"extraFields","type":"[LinkModulesExtraFields](../../../types/currency.LinkModulesExtraFields/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"type","type":"`\"date\"` \\| `\"time\"` \\| `\"datetime\"` \\| `bigint` \\| `\"blob\"` \\| `\"uint8array\"` \\| `\"array\"` \\| `\"enumArray\"` \\| `\"enum\"` \\| `\"json\"` \\| `\"integer\"` \\| `\"smallint\"` \\| `\"tinyint\"` \\| `\"mediumint\"` \\| `\"float\"` \\| `\"double\"` \\| `\"boolean\"` \\| `\"decimal\"` \\| `\"string\"` \\| `\"uuid\"` \\| `\"text\"`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"defaultValue","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"nullable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record`","description":"Mikro-orm options for the column","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__joinerConfig"/> diff --git a/www/apps/resources/references/currency/interfaces/currency.FilterableCurrencyProps/page.mdx b/www/apps/resources/references/currency/interfaces/currency.FilterableCurrencyProps/page.mdx index 3a706f5ae4..f58b24a545 100644 --- a/www/apps/resources/references/currency/interfaces/currency.FilterableCurrencyProps/page.mdx +++ b/www/apps/resources/references/currency/interfaces/currency.FilterableCurrencyProps/page.mdx @@ -8,4 +8,4 @@ import { TypeList } from "docs-ui" Filters to apply on a currency. - + diff --git a/www/apps/resources/references/currency/interfaces/currency.JoinerServiceConfig/page.mdx b/www/apps/resources/references/currency/interfaces/currency.JoinerServiceConfig/page.mdx index 6306cca161..8865bcefc9 100644 --- a/www/apps/resources/references/currency/interfaces/currency.JoinerServiceConfig/page.mdx +++ b/www/apps/resources/references/currency/interfaces/currency.JoinerServiceConfig/page.mdx @@ -6,4 +6,4 @@ import { TypeList } from "docs-ui" # JoinerServiceConfig -`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"fieldAlias","type":"`Record`","description":"alias for deeper nested relationships (e.g. { 'price': 'prices.calculated\\_price\\_set.amount' })","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"path","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"forwardArgumentsOnPath","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"relationships","type":"[JoinerRelationship](../../types/currency.JoinerRelationship/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"extends","type":"`object`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"relationship","type":"[JoinerRelationship](../../types/currency.JoinerRelationship/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="JoinerServiceConfig"/> +`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"fieldAlias","type":"`Record`","description":"alias for deeper nested relationships (e.g. { 'price': 'prices.calculated\\_price\\_set.amount' })","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"path","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"forwardArgumentsOnPath","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"relationships","type":"[JoinerRelationship](../../types/currency.JoinerRelationship/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"extends","type":"`object`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"relationship","type":"[JoinerRelationship](../../types/currency.JoinerRelationship/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="JoinerServiceConfig"/> diff --git a/www/utils/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/workflow-examples.ts b/www/utils/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/workflow-examples.ts index 53241b8a67..7891f8560c 100644 --- a/www/utils/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/workflow-examples.ts +++ b/www/utils/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/workflow-examples.ts @@ -39,7 +39,9 @@ export default function () { }) } - return exampleStr.join("\n") + return `${Handlebars.helpers.titleLevel()} Examples\n\n${exampleStr.join( + "\n" + )}` } ) } @@ -54,25 +56,6 @@ function getExecutionCodeTabs({ exampleCode = exampleCode.replace("```ts\n", "").replace("\n```", "") return ` - - -\`\`\`ts title="src/workflows/my-workflow.ts" -${beautifyCode(`import { createWorkflow } from "@medusajs/framework/workflows-sdk" -import { ${workflowName} } from "@medusajs/medusa/core-flows" - -const myWorkflow = createWorkflow( - "my-workflow", - () => { - ${exampleCode - .replace(`{ result }`, "result") - .replace(`await `, "") - .replace(`(container)`, "") - .replace(".run(", ".runAsStep(")} - } -)`)} -\`\`\` - - \`\`\`ts title="src/api/workflow/route.ts" @@ -136,6 +119,25 @@ export const config = { name: "run-once-a-day", schedule: "0 0 * * *", }`)} +\`\`\` + + + + +\`\`\`ts title="src/workflows/my-workflow.ts" +${beautifyCode(`import { createWorkflow } from "@medusajs/framework/workflows-sdk" +import { ${workflowName} } from "@medusajs/medusa/core-flows" + +const myWorkflow = createWorkflow( + "my-workflow", + () => { + ${exampleCode + .replace(`{ result }`, "result") + .replace(`await `, "") + .replace(`(container)`, "") + .replace(".run(", ".runAsStep(")} + } +)`)} \`\`\`