Skip to content

Commit 405594e

Browse files
docs: add TSDocs for 5cc7fde (#16317)
Co-authored-by: kodiakhq[bot] <kodiakhq[bot]@users.noreply.github.com>
1 parent 63467a4 commit 405594e

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

packages/core/core-flows/src/cart/workflows/get-variants-and-items-with-prices.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,25 @@ export const prepareVariantsAndItemsWithPricesStep = createStep(
185185

186186
export const getVariantsAndItemsWithPricesId =
187187
"get-variant-items-with-prices-workflow"
188+
/**
189+
* This workflow retrieves product variants and cart line items with their
190+
* calculated prices. It's used as a sub-workflow when adding items to a cart
191+
* or refreshing cart prices to attach up-to-date pricing context to each line
192+
* item.
193+
*
194+
* @example
195+
* const { result } = await getVariantsAndItemsWithPrices(container)
196+
* .run({
197+
* input: {
198+
* cart: { id: "cart_123", items: [] },
199+
* setPricingContextResult: {},
200+
* },
201+
* })
202+
*
203+
* @summary
204+
*
205+
* Retrieve variants and line items with their calculated prices.
206+
*/
188207
export const getVariantsAndItemsWithPrices = createWorkflow(
189208
getVariantsAndItemsWithPricesId,
190209
(

0 commit comments

Comments
 (0)