Skip to content

Commit b79dc40

Browse files
authored
chore(core-flows): improve TSDocs of customer and customer groups workflows / steps (#10993)
* improve customer tsdocs * finished improving tsdocs * fix build error
1 parent 52f6cfe commit b79dc40

35 files changed

+541
-28
lines changed

packages/core/core-flows/src/cart/workflows/add-shipping-method-to-cart.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ export const addShippingMethodToCartWorkflowId = "add-shipping-method-to-cart"
7575
* @summary
7676
*
7777
* Add a shipping method to a cart.
78+
*
79+
* @property hooks.validate - This hook is executed before all operations. You can consume this hook to perform any custom validation. If validation fails, you can throw an error to stop the workflow execution.
7880
*/
7981
export const addShippingMethodToCartWorkflow = createWorkflow(
8082
addShippingMethodToCartWorkflowId,

packages/core/core-flows/src/cart/workflows/add-to-cart.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ export const addToCartWorkflowId = "add-to-cart"
6363
* @summary
6464
*
6565
* Add a line item to a cart.
66+
*
67+
* @property hooks.validate - This hook is executed before all operations. You can consume this hook to perform any custom validation. If validation fails, you can throw an error to stop the workflow execution.
6668
*/
6769
export const addToCartWorkflow = createWorkflow(
6870
addToCartWorkflowId,

packages/core/core-flows/src/cart/workflows/complete-cart.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ export const completeCartWorkflowId = "complete-cart"
7575
* @summary
7676
*
7777
* Complete a cart and place an order.
78+
*
79+
* @property hooks.validate - This hook is executed before all operations. You can consume this hook to perform any custom validation. If validation fails, you can throw an error to stop the workflow execution.
7880
*/
7981
export const completeCartWorkflow = createWorkflow(
8082
{

packages/core/core-flows/src/cart/workflows/create-carts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export const createCartWorkflowId = "create-cart"
7373
*
7474
* Create a cart specifying region, items, and more.
7575
*
76-
* @property hooks.validate - This hook is executed before all operations. You can consume this hook to perform any custom validation.
76+
* @property hooks.validate - This hook is executed before all operations. You can consume this hook to perform any custom validation. If validation fails, you can throw an error to stop the workflow execution.
7777
* @property hooks.cartCreated - This hook is executed after a cart is created. You can consume this hook to perform custom actions on the created cart.
7878
*/
7979
export const createCartWorkflow = createWorkflow(

packages/core/core-flows/src/cart/workflows/refresh-cart-items.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ export const refreshCartItemsWorkflowId = "refresh-cart-items"
6565
* @summary
6666
*
6767
* Refresh a cart's details after an update.
68+
*
69+
* @property hooks.validate - This hook is executed before all operations. You can consume this hook to perform any custom validation. If validation fails, you can throw an error to stop the workflow execution.
6870
*/
6971
export const refreshCartItemsWorkflow = createWorkflow(
7072
refreshCartItemsWorkflowId,

packages/core/core-flows/src/cart/workflows/refresh-cart-shipping-methods.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ export const refreshCartShippingMethodsWorkflowId =
4242
* @summary
4343
*
4444
* Refresh a cart's shipping methods after an update.
45+
*
46+
* @property hooks.validate - This hook is executed before all operations. You can consume this hook to perform any custom validation. If validation fails, you can throw an error to stop the workflow execution.
4547
*/
4648
export const refreshCartShippingMethodsWorkflow = createWorkflow(
4749
refreshCartShippingMethodsWorkflowId,

packages/core/core-flows/src/cart/workflows/refresh-payment-collection.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ export const refreshPaymentCollectionForCartWorkflowId =
4646
* @summary
4747
*
4848
* Refresh a cart's payment collection details.
49+
*
50+
* @property hooks.validate - This hook is executed before all operations. You can consume this hook to perform any custom validation. If validation fails, you can throw an error to stop the workflow execution.
4951
*/
5052
export const refreshPaymentCollectionForCartWorkflow = createWorkflow(
5153
refreshPaymentCollectionForCartWorkflowId,

packages/core/core-flows/src/cart/workflows/transfer-cart-customer.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ export const transferCartCustomerWorkflowId = "transfer-cart-customer"
4444
* @summary
4545
*
4646
* Refresh a cart's payment collection details.
47+
*
48+
* @property hooks.validate - This hook is executed before all operations. You can consume this hook to perform any custom validation. If validation fails, you can throw an error to stop the workflow execution.
4749
*/
4850
export const transferCartCustomerWorkflow = createWorkflow(
4951
transferCartCustomerWorkflowId,

packages/core/core-flows/src/cart/workflows/update-cart-promotions.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ export const updateCartPromotionsWorkflowId = "update-cart-promotions"
6464
* @summary
6565
*
6666
* Update a cart's applied promotions to add, replace, or remove them.
67+
*
68+
* @property hooks.validate - This hook is executed before all operations. You can consume this hook to perform any custom validation. If validation fails, you can throw an error to stop the workflow execution.
6769
*/
6870
export const updateCartPromotionsWorkflow = createWorkflow(
6971
updateCartPromotionsWorkflowId,

packages/core/core-flows/src/cart/workflows/update-cart.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export const updateCartWorkflowId = "update-cart"
7676
*
7777
* Update a cart's details, such as region, address, and more.
7878
*
79-
* @property hooks.validate - This hook is executed before all operations. You can consume this hook to perform any custom validation.
79+
* @property hooks.validate - This hook is executed before all operations. You can consume this hook to perform any custom validation. If validation fails, you can throw an error to stop the workflow execution.
8080
* @property hooks.cartUpdated - This hook is executed after a cart is update. You can consume this hook to perform custom actions on the updated cart.
8181
*/
8282
export const updateCartWorkflow = createWorkflow(

0 commit comments

Comments
 (0)