From 0dd4572964a4ad6956d6d535b407db3818a4a77d Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Wed, 7 May 2025 14:25:11 +0300 Subject: [PATCH] chore(utils): fixes to events TSDocs (#12395) * chore(utils): fixes to events TSDocs * more fixes --- packages/core/types/src/cart/workflows.ts | 2 ++ packages/core/types/src/http/cart/store/payloads.ts | 2 ++ packages/core/utils/src/core-flows/events.ts | 13 ++++++------- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/packages/core/types/src/cart/workflows.ts b/packages/core/types/src/cart/workflows.ts index d244ae7027..d57d2704f3 100644 --- a/packages/core/types/src/cart/workflows.ts +++ b/packages/core/types/src/cart/workflows.ts @@ -218,6 +218,8 @@ export interface CreateCartAddressDTO { export interface CreateCartWorkflowInputDTO { /** * The ID of the region that the cart belongs to. + * If not provided, the default region of the store is used. + * If the store doesn't have a default region, an error is thrown. */ region_id?: string diff --git a/packages/core/types/src/http/cart/store/payloads.ts b/packages/core/types/src/http/cart/store/payloads.ts index dccd73688c..20b3cc2a81 100644 --- a/packages/core/types/src/http/cart/store/payloads.ts +++ b/packages/core/types/src/http/cart/store/payloads.ts @@ -1,6 +1,8 @@ export interface StoreCreateCart { /** * The ID of the region that the cart is created in. + * If not provided, the default region of the store is used. + * If the store doesn't have a default region, an error is thrown. */ region_id?: string /** diff --git a/packages/core/utils/src/core-flows/events.ts b/packages/core/utils/src/core-flows/events.ts index b5ac78a81f..b4417e0316 100644 --- a/packages/core/utils/src/core-flows/events.ts +++ b/packages/core/utils/src/core-flows/events.ts @@ -162,7 +162,7 @@ export const OrderWorkflowEvents = { * { * order_id, // The ID of the order * fulfillment_id, // The ID of the fulfillment - * no_notification, // Whether to notify the customer + * no_notification, // (boolean) Whether to notify the customer * } * ``` */ @@ -175,7 +175,7 @@ export const OrderWorkflowEvents = { * { * order_id, // The ID of the order * fulfillment_id, // The ID of the fulfillment - * no_notification, // Whether to notify the customer + * no_notification, // (boolean) Whether to notify the customer * } * ``` */ @@ -258,7 +258,7 @@ export const OrderEditWorkflowEvents = { * ```ts * { * order_id, // The ID of the order - * actions, // The actions to edit the order + * actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order * } * ``` */ @@ -270,8 +270,7 @@ export const OrderEditWorkflowEvents = { * ```ts * { * order_id, // The ID of the order - * actions, // The actions to edit the order - * } + * actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order * ``` */ CONFIRMED: "order-edit.confirmed", @@ -282,7 +281,7 @@ export const OrderEditWorkflowEvents = { * ```ts * { * order_id, // The ID of the order - * actions, // The actions to edit the order + * actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order * } * ``` */ @@ -776,7 +775,7 @@ export const FulfillmentWorkflowEvents = { * ```ts * { * id, // the ID of the shipment - * no_notification, // whether to notify the customer + * no_notification, // (boolean) whether to notify the customer * } * ``` */