@medusajs/core-flows 3.0.0-snapshot-20251114155958 → 3.0.0-snapshot-20251201170954

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (193) hide show
  1. package/dist/cart/steps/get-actions-to-compute-from-promotions.d.ts +13 -9
  2. package/dist/cart/steps/get-actions-to-compute-from-promotions.d.ts.map +1 -1
  3. package/dist/cart/steps/get-actions-to-compute-from-promotions.js +6 -6
  4. package/dist/cart/steps/get-actions-to-compute-from-promotions.js.map +1 -1
  5. package/dist/cart/workflows/complete-cart.d.ts +208 -0
  6. package/dist/cart/workflows/complete-cart.d.ts.map +1 -1
  7. package/dist/cart/workflows/complete-cart.js +208 -0
  8. package/dist/cart/workflows/complete-cart.js.map +1 -1
  9. package/dist/cart/workflows/get-variants-and-items-with-prices.js +2 -2
  10. package/dist/cart/workflows/get-variants-and-items-with-prices.js.map +1 -1
  11. package/dist/cart/workflows/update-cart-promotions.js +1 -1
  12. package/dist/cart/workflows/update-cart-promotions.js.map +1 -1
  13. package/dist/common/steps/emit-event.d.ts +20 -0
  14. package/dist/common/steps/emit-event.d.ts.map +1 -1
  15. package/dist/common/steps/emit-event.js +18 -0
  16. package/dist/common/steps/emit-event.js.map +1 -1
  17. package/dist/draft-order/steps/create-draft-order-line-item-adjustments.d.ts +4 -0
  18. package/dist/draft-order/steps/create-draft-order-line-item-adjustments.d.ts.map +1 -1
  19. package/dist/draft-order/steps/create-draft-order-line-item-adjustments.js +2 -1
  20. package/dist/draft-order/steps/create-draft-order-line-item-adjustments.js.map +1 -1
  21. package/dist/draft-order/workflows/add-draft-order-items.d.ts.map +1 -1
  22. package/dist/draft-order/workflows/add-draft-order-items.js +4 -6
  23. package/dist/draft-order/workflows/add-draft-order-items.js.map +1 -1
  24. package/dist/draft-order/workflows/add-draft-order-promotions.d.ts.map +1 -1
  25. package/dist/draft-order/workflows/add-draft-order-promotions.js +10 -6
  26. package/dist/draft-order/workflows/add-draft-order-promotions.js.map +1 -1
  27. package/dist/draft-order/workflows/add-draft-order-shipping-methods.d.ts.map +1 -1
  28. package/dist/draft-order/workflows/add-draft-order-shipping-methods.js +3 -12
  29. package/dist/draft-order/workflows/add-draft-order-shipping-methods.js.map +1 -1
  30. package/dist/draft-order/workflows/cancel-draft-order-edit.d.ts.map +1 -1
  31. package/dist/draft-order/workflows/cancel-draft-order-edit.js +26 -28
  32. package/dist/draft-order/workflows/cancel-draft-order-edit.js.map +1 -1
  33. package/dist/draft-order/workflows/compute-draft-order-adjustments.d.ts +33 -0
  34. package/dist/draft-order/workflows/compute-draft-order-adjustments.d.ts.map +1 -0
  35. package/dist/draft-order/workflows/compute-draft-order-adjustments.js +142 -0
  36. package/dist/draft-order/workflows/compute-draft-order-adjustments.js.map +1 -0
  37. package/dist/draft-order/workflows/confirm-draft-order-edit.d.ts.map +1 -1
  38. package/dist/draft-order/workflows/confirm-draft-order-edit.js +0 -60
  39. package/dist/draft-order/workflows/confirm-draft-order-edit.js.map +1 -1
  40. package/dist/draft-order/workflows/convert-draft-order.d.ts.map +1 -1
  41. package/dist/draft-order/workflows/convert-draft-order.js +33 -0
  42. package/dist/draft-order/workflows/convert-draft-order.js.map +1 -1
  43. package/dist/draft-order/workflows/index.d.ts +1 -0
  44. package/dist/draft-order/workflows/index.d.ts.map +1 -1
  45. package/dist/draft-order/workflows/index.js +1 -0
  46. package/dist/draft-order/workflows/index.js.map +1 -1
  47. package/dist/draft-order/workflows/refresh-draft-order-adjustments.d.ts +4 -0
  48. package/dist/draft-order/workflows/refresh-draft-order-adjustments.d.ts.map +1 -1
  49. package/dist/draft-order/workflows/refresh-draft-order-adjustments.js +2 -1
  50. package/dist/draft-order/workflows/refresh-draft-order-adjustments.js.map +1 -1
  51. package/dist/draft-order/workflows/remove-draft-order-action-item.d.ts.map +1 -1
  52. package/dist/draft-order/workflows/remove-draft-order-action-item.js +3 -5
  53. package/dist/draft-order/workflows/remove-draft-order-action-item.js.map +1 -1
  54. package/dist/draft-order/workflows/remove-draft-order-action-shipping-method.d.ts.map +1 -1
  55. package/dist/draft-order/workflows/remove-draft-order-action-shipping-method.js +3 -5
  56. package/dist/draft-order/workflows/remove-draft-order-action-shipping-method.js.map +1 -1
  57. package/dist/draft-order/workflows/remove-draft-order-promotions.d.ts.map +1 -1
  58. package/dist/draft-order/workflows/remove-draft-order-promotions.js +10 -6
  59. package/dist/draft-order/workflows/remove-draft-order-promotions.js.map +1 -1
  60. package/dist/draft-order/workflows/remove-draft-order-shipping-method.d.ts.map +1 -1
  61. package/dist/draft-order/workflows/remove-draft-order-shipping-method.js +3 -12
  62. package/dist/draft-order/workflows/remove-draft-order-shipping-method.js.map +1 -1
  63. package/dist/draft-order/workflows/update-draft-order-action-item.d.ts.map +1 -1
  64. package/dist/draft-order/workflows/update-draft-order-action-item.js +3 -5
  65. package/dist/draft-order/workflows/update-draft-order-action-item.js.map +1 -1
  66. package/dist/draft-order/workflows/update-draft-order-action-shipping-method.d.ts.map +1 -1
  67. package/dist/draft-order/workflows/update-draft-order-action-shipping-method.js +3 -5
  68. package/dist/draft-order/workflows/update-draft-order-action-shipping-method.js.map +1 -1
  69. package/dist/draft-order/workflows/update-draft-order-item.d.ts.map +1 -1
  70. package/dist/draft-order/workflows/update-draft-order-item.js +4 -6
  71. package/dist/draft-order/workflows/update-draft-order-item.js.map +1 -1
  72. package/dist/draft-order/workflows/update-draft-order-shipping-method.d.ts.map +1 -1
  73. package/dist/draft-order/workflows/update-draft-order-shipping-method.js +3 -5
  74. package/dist/draft-order/workflows/update-draft-order-shipping-method.js.map +1 -1
  75. package/dist/fulfillment/workflows/mark-fulfillment-as-delivered.d.ts.map +1 -1
  76. package/dist/fulfillment/workflows/mark-fulfillment-as-delivered.js +13 -1
  77. package/dist/fulfillment/workflows/mark-fulfillment-as-delivered.js.map +1 -1
  78. package/dist/notification/steps/send-notifications.d.ts +9 -0
  79. package/dist/notification/steps/send-notifications.d.ts.map +1 -1
  80. package/dist/notification/steps/send-notifications.js.map +1 -1
  81. package/dist/order/steps/index.d.ts +1 -0
  82. package/dist/order/steps/index.d.ts.map +1 -1
  83. package/dist/order/steps/index.js +1 -0
  84. package/dist/order/steps/index.js.map +1 -1
  85. package/dist/order/steps/list-order-change-actions-by-type.d.ts +11 -0
  86. package/dist/order/steps/list-order-change-actions-by-type.d.ts.map +1 -0
  87. package/dist/order/steps/list-order-change-actions-by-type.js +21 -0
  88. package/dist/order/steps/list-order-change-actions-by-type.js.map +1 -0
  89. package/dist/order/utils/fields.d.ts.map +1 -1
  90. package/dist/order/utils/fields.js +2 -0
  91. package/dist/order/utils/fields.js.map +1 -1
  92. package/dist/order/workflows/compute-adjustments-for-preview.d.ts +53 -0
  93. package/dist/order/workflows/compute-adjustments-for-preview.d.ts.map +1 -0
  94. package/dist/order/workflows/compute-adjustments-for-preview.js +107 -0
  95. package/dist/order/workflows/compute-adjustments-for-preview.js.map +1 -0
  96. package/dist/order/workflows/create-fulfillment.d.ts.map +1 -1
  97. package/dist/order/workflows/create-fulfillment.js +2 -0
  98. package/dist/order/workflows/create-fulfillment.js.map +1 -1
  99. package/dist/order/workflows/create-or-update-order-payment-collection.js +1 -1
  100. package/dist/order/workflows/create-or-update-order-payment-collection.js.map +1 -1
  101. package/dist/order/workflows/exchange/exchange-add-new-item.d.ts.map +1 -1
  102. package/dist/order/workflows/exchange/exchange-add-new-item.js +28 -2
  103. package/dist/order/workflows/exchange/exchange-add-new-item.js.map +1 -1
  104. package/dist/order/workflows/exchange/exchange-request-item-return.d.ts.map +1 -1
  105. package/dist/order/workflows/exchange/exchange-request-item-return.js +22 -1
  106. package/dist/order/workflows/exchange/exchange-request-item-return.js.map +1 -1
  107. package/dist/order/workflows/exchange/update-exchange-add-item.d.ts.map +1 -1
  108. package/dist/order/workflows/exchange/update-exchange-add-item.js +22 -2
  109. package/dist/order/workflows/exchange/update-exchange-add-item.js.map +1 -1
  110. package/dist/order/workflows/index.d.ts +5 -2
  111. package/dist/order/workflows/index.d.ts.map +1 -1
  112. package/dist/order/workflows/index.js +5 -2
  113. package/dist/order/workflows/index.js.map +1 -1
  114. package/dist/order/workflows/mark-order-fulfillment-as-delivered.d.ts.map +1 -1
  115. package/dist/order/workflows/mark-order-fulfillment-as-delivered.js +11 -1
  116. package/dist/order/workflows/mark-order-fulfillment-as-delivered.js.map +1 -1
  117. package/dist/order/workflows/on-carry-promotions-flag-set.d.ts +79 -0
  118. package/dist/order/workflows/on-carry-promotions-flag-set.d.ts.map +1 -0
  119. package/dist/order/workflows/on-carry-promotions-flag-set.js +160 -0
  120. package/dist/order/workflows/on-carry-promotions-flag-set.js.map +1 -0
  121. package/dist/order/workflows/order-edit/begin-order-edit.d.ts.map +1 -1
  122. package/dist/order/workflows/order-edit/begin-order-edit.js +2 -1
  123. package/dist/order/workflows/order-edit/begin-order-edit.js.map +1 -1
  124. package/dist/order/workflows/order-edit/confirm-order-edit-request.d.ts.map +1 -1
  125. package/dist/order/workflows/order-edit/confirm-order-edit-request.js +15 -15
  126. package/dist/order/workflows/order-edit/confirm-order-edit-request.js.map +1 -1
  127. package/dist/order/workflows/order-edit/order-edit-add-new-item.d.ts.map +1 -1
  128. package/dist/order/workflows/order-edit/order-edit-add-new-item.js +14 -2
  129. package/dist/order/workflows/order-edit/order-edit-add-new-item.js.map +1 -1
  130. package/dist/order/workflows/order-edit/order-edit-update-item-quantity.d.ts +4 -0
  131. package/dist/order/workflows/order-edit/order-edit-update-item-quantity.d.ts.map +1 -1
  132. package/dist/order/workflows/order-edit/order-edit-update-item-quantity.js +19 -3
  133. package/dist/order/workflows/order-edit/order-edit-update-item-quantity.js.map +1 -1
  134. package/dist/order/workflows/order-edit/remove-order-edit-item-action.d.ts.map +1 -1
  135. package/dist/order/workflows/order-edit/remove-order-edit-item-action.js +8 -1
  136. package/dist/order/workflows/order-edit/remove-order-edit-item-action.js.map +1 -1
  137. package/dist/order/workflows/order-edit/update-order-edit-add-item.d.ts.map +1 -1
  138. package/dist/order/workflows/order-edit/update-order-edit-add-item.js +8 -1
  139. package/dist/order/workflows/order-edit/update-order-edit-add-item.js.map +1 -1
  140. package/dist/order/workflows/order-edit/update-order-edit-item-quantity.d.ts +3 -0
  141. package/dist/order/workflows/order-edit/update-order-edit-item-quantity.d.ts.map +1 -1
  142. package/dist/order/workflows/order-edit/update-order-edit-item-quantity.js +10 -0
  143. package/dist/order/workflows/order-edit/update-order-edit-item-quantity.js.map +1 -1
  144. package/dist/order/workflows/order-edit/utils/fields.d.ts.map +1 -1
  145. package/dist/order/workflows/order-edit/utils/fields.js +6 -1
  146. package/dist/order/workflows/order-edit/utils/fields.js.map +1 -1
  147. package/dist/order/workflows/update-order-change.d.ts +27 -0
  148. package/dist/order/workflows/update-order-change.d.ts.map +1 -0
  149. package/dist/order/workflows/update-order-change.js +43 -0
  150. package/dist/order/workflows/update-order-change.js.map +1 -0
  151. package/dist/order/workflows/update-tax-lines.d.ts +5 -1
  152. package/dist/order/workflows/update-tax-lines.d.ts.map +1 -1
  153. package/dist/order/workflows/update-tax-lines.js +4 -0
  154. package/dist/order/workflows/update-tax-lines.js.map +1 -1
  155. package/dist/payment/workflows/process-payment.d.ts.map +1 -1
  156. package/dist/payment/workflows/process-payment.js +15 -3
  157. package/dist/payment/workflows/process-payment.js.map +1 -1
  158. package/dist/product/steps/create-product-options.d.ts +1 -6
  159. package/dist/product/steps/create-product-options.d.ts.map +1 -1
  160. package/dist/product/steps/create-product-options.js +1 -6
  161. package/dist/product/steps/create-product-options.js.map +1 -1
  162. package/dist/product/steps/index.d.ts +0 -2
  163. package/dist/product/steps/index.d.ts.map +1 -1
  164. package/dist/product/steps/index.js +0 -2
  165. package/dist/product/steps/index.js.map +1 -1
  166. package/dist/product/steps/update-product-options.d.ts.map +1 -1
  167. package/dist/product/steps/update-product-options.js +6 -6
  168. package/dist/product/steps/update-product-options.js.map +1 -1
  169. package/dist/product/workflows/batch-products.d.ts.map +1 -1
  170. package/dist/product/workflows/batch-products.js +4 -10
  171. package/dist/product/workflows/batch-products.js.map +1 -1
  172. package/dist/product/workflows/create-product-options.d.ts +0 -6
  173. package/dist/product/workflows/create-product-options.d.ts.map +1 -1
  174. package/dist/product/workflows/create-product-options.js +0 -6
  175. package/dist/product/workflows/create-product-options.js.map +1 -1
  176. package/dist/product/workflows/index.d.ts +0 -1
  177. package/dist/product/workflows/index.d.ts.map +1 -1
  178. package/dist/product/workflows/index.js +0 -1
  179. package/dist/product/workflows/index.js.map +1 -1
  180. package/dist/tsconfig.tsbuildinfo +1 -1
  181. package/package.json +3 -3
  182. package/dist/product/steps/link-product-options-to-product.d.ts +0 -30
  183. package/dist/product/steps/link-product-options-to-product.d.ts.map +0 -1
  184. package/dist/product/steps/link-product-options-to-product.js +0 -58
  185. package/dist/product/steps/link-product-options-to-product.js.map +0 -1
  186. package/dist/product/steps/process-product-options-for-import.d.ts +0 -15
  187. package/dist/product/steps/process-product-options-for-import.d.ts.map +0 -1
  188. package/dist/product/steps/process-product-options-for-import.js +0 -61
  189. package/dist/product/steps/process-product-options-for-import.js.map +0 -1
  190. package/dist/product/workflows/create-and-link-product-options-to-product.d.ts +0 -50
  191. package/dist/product/workflows/create-and-link-product-options-to-product.d.ts.map +0 -1
  192. package/dist/product/workflows/create-and-link-product-options-to-product.js +0 -85
  193. package/dist/product/workflows/create-and-link-product-options-to-product.js.map +0 -1
@@ -1,33 +1,37 @@
1
- import type { CartDTO } from "@medusajs/framework/types";
1
+ import { ComputeActionContext, ComputeActionOptions } from "@medusajs/framework/types";
2
2
  /**
3
- * The details of the cart and its applied promotions.
3
+ * The details of the items and shipping methods and its applied promotions.
4
4
  */
5
5
  export interface GetActionsToComputeFromPromotionsStepInput {
6
6
  /**
7
- * The cart to compute the actions for.
7
+ * The items and shipping methods to compute the actions for.
8
8
  */
9
- cart: CartDTO;
9
+ computeActionContext: ComputeActionContext;
10
10
  /**
11
- * The promotion codes applied on the cart.
11
+ * The promotion codes applied on the items and shipping methods.
12
12
  */
13
13
  promotionCodesToApply: string[];
14
+ /**
15
+ * The options to configure how the actions are computed.
16
+ */
17
+ options?: ComputeActionOptions;
14
18
  }
15
19
  export declare const getActionsToComputeFromPromotionsStepId = "get-actions-to-compute-from-promotions";
16
20
  /**
17
21
  * This step retrieves the actions to compute based on the promotions
18
- * applied on a cart.
22
+ * applied on items and shipping methods.
19
23
  *
20
24
  * :::tip
21
25
  *
22
- * You can use the {@link retrieveCartStep} to retrieve a cart's details.
26
+ * You can use the {@link retrieveCartStep} to retrieve items and shipping methods' details.
23
27
  *
24
28
  * :::
25
29
  *
26
30
  * @example
27
31
  * const data = getActionsToComputeFromPromotionsStep({
28
- * // retrieve the details of the cart from another workflow
32
+ * // retrieve the details of the items and shipping methods from another workflow
29
33
  * // or in another step using the Cart Module's service
30
- * cart,
34
+ * computeActionContext,
31
35
  * promotionCodesToApply: ["10OFF"]
32
36
  * })
33
37
  */
@@ -1 +1 @@
1
- {"version":3,"file":"get-actions-to-compute-from-promotions.d.ts","sourceRoot":"","sources":["../../../src/cart/steps/get-actions-to-compute-from-promotions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EAER,MAAM,2BAA2B,CAAA;AAIlC;;GAEG;AACH,MAAM,WAAW,0CAA0C;IACzD;;OAEG;IACH,IAAI,EAAE,OAAO,CAAA;IACb;;OAEG;IACH,qBAAqB,EAAE,MAAM,EAAE,CAAA;CAChC;AAED,eAAO,MAAM,uCAAuC,2CACV,CAAA;AAC1C;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,qCAAqC,4JAgBjD,CAAA"}
1
+ {"version":3,"file":"get-actions-to-compute-from-promotions.d.ts","sourceRoot":"","sources":["../../../src/cart/steps/get-actions-to-compute-from-promotions.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EAErB,MAAM,2BAA2B,CAAA;AAIlC;;GAEG;AACH,MAAM,WAAW,0CAA0C;IACzD;;OAEG;IACH,oBAAoB,EAAE,oBAAoB,CAAA;IAC1C;;OAEG;IACH,qBAAqB,EAAE,MAAM,EAAE,CAAA;IAC/B;;OAEG;IACH,OAAO,CAAC,EAAE,oBAAoB,CAAA;CAC/B;AAED,eAAO,MAAM,uCAAuC,2CACV,CAAA;AAC1C;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,qCAAqC,4JAkBjD,CAAA"}
@@ -6,26 +6,26 @@ const workflows_sdk_1 = require("@medusajs/framework/workflows-sdk");
6
6
  exports.getActionsToComputeFromPromotionsStepId = "get-actions-to-compute-from-promotions";
7
7
  /**
8
8
  * This step retrieves the actions to compute based on the promotions
9
- * applied on a cart.
9
+ * applied on items and shipping methods.
10
10
  *
11
11
  * :::tip
12
12
  *
13
- * You can use the {@link retrieveCartStep} to retrieve a cart's details.
13
+ * You can use the {@link retrieveCartStep} to retrieve items and shipping methods' details.
14
14
  *
15
15
  * :::
16
16
  *
17
17
  * @example
18
18
  * const data = getActionsToComputeFromPromotionsStep({
19
- * // retrieve the details of the cart from another workflow
19
+ * // retrieve the details of the items and shipping methods from another workflow
20
20
  * // or in another step using the Cart Module's service
21
- * cart,
21
+ * computeActionContext,
22
22
  * promotionCodesToApply: ["10OFF"]
23
23
  * })
24
24
  */
25
25
  exports.getActionsToComputeFromPromotionsStep = (0, workflows_sdk_1.createStep)(exports.getActionsToComputeFromPromotionsStepId, async (data, { container }) => {
26
- const { cart, promotionCodesToApply = [] } = data;
26
+ const { computeActionContext, promotionCodesToApply = [], options } = data;
27
27
  const promotionService = container.resolve(utils_1.Modules.PROMOTION);
28
- const actionsToCompute = await promotionService.computeActions(promotionCodesToApply, cart);
28
+ const actionsToCompute = await promotionService.computeActions(promotionCodesToApply, computeActionContext, options);
29
29
  return new workflows_sdk_1.StepResponse(actionsToCompute);
30
30
  });
31
31
  //# sourceMappingURL=get-actions-to-compute-from-promotions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-actions-to-compute-from-promotions.js","sourceRoot":"","sources":["../../../src/cart/steps/get-actions-to-compute-from-promotions.ts"],"names":[],"mappings":";;;AAIA,qDAAmD;AACnD,qEAA4E;AAgB/D,QAAA,uCAAuC,GAClD,wCAAwC,CAAA;AAC1C;;;;;;;;;;;;;;;;;GAiBG;AACU,QAAA,qCAAqC,GAAG,IAAA,0BAAU,EAC7D,+CAAuC,EACvC,KAAK,EAAE,IAAgD,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;IACxE,MAAM,EAAE,IAAI,EAAE,qBAAqB,GAAG,EAAE,EAAE,GAAG,IAAI,CAAA;IAEjD,MAAM,gBAAgB,GAAG,SAAS,CAAC,OAAO,CACxC,eAAO,CAAC,SAAS,CAClB,CAAA;IAED,MAAM,gBAAgB,GAAG,MAAM,gBAAgB,CAAC,cAAc,CAC5D,qBAAqB,EACrB,IAAW,CACZ,CAAA;IAED,OAAO,IAAI,4BAAY,CAAC,gBAAgB,CAAC,CAAA;AAC3C,CAAC,CACF,CAAA"}
1
+ {"version":3,"file":"get-actions-to-compute-from-promotions.js","sourceRoot":"","sources":["../../../src/cart/steps/get-actions-to-compute-from-promotions.ts"],"names":[],"mappings":";;;AAKA,qDAAmD;AACnD,qEAA4E;AAoB/D,QAAA,uCAAuC,GAClD,wCAAwC,CAAA;AAC1C;;;;;;;;;;;;;;;;;GAiBG;AACU,QAAA,qCAAqC,GAAG,IAAA,0BAAU,EAC7D,+CAAuC,EACvC,KAAK,EAAE,IAAgD,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;IACxE,MAAM,EAAE,oBAAoB,EAAE,qBAAqB,GAAG,EAAE,EAAE,OAAO,EAAE,GAAG,IAAI,CAAA;IAG1E,MAAM,gBAAgB,GAAG,SAAS,CAAC,OAAO,CACxC,eAAO,CAAC,SAAS,CAClB,CAAA;IAED,MAAM,gBAAgB,GAAG,MAAM,gBAAgB,CAAC,cAAc,CAC5D,qBAAqB,EACrB,oBAAoB,EACpB,OAAO,CACR,CAAA;IAED,OAAO,IAAI,4BAAY,CAAC,gBAAgB,CAAC,CAAA;AAC3C,CAAC,CACF,CAAA"}
@@ -23,6 +23,214 @@ export declare const completeCartWorkflowId = "complete-cart";
23
23
  * For example, in the [Subscriptions recipe](https://docs.medusajs.com/resources/recipes/subscriptions/examples/standard#create-workflow),
24
24
  * this workflow is used within another workflow that creates a subscription order.
25
25
  *
26
+ * ## Cart Completion Idempotency
27
+ *
28
+ * This workflow's logic is idempotent, meaning that if it is executed multiple times with the same input, it will not create duplicate orders. The
29
+ * same order will be returned for subsequent executions with the same cart ID. This is necessary to avoid rolling back payments or causing
30
+ * other side effects if the workflow is retried or fails due to transient errors.
31
+ *
32
+ * So, if you use this workflow within your own, make sure your workflow's steps are idempotent as well to avoid unintended side effects.
33
+ * Your workflow must also acquire and release locks around this workflow to prevent concurrent executions for the same cart.
34
+ *
35
+ * The following sections cover some common scenarios and how to handle them.
36
+ *
37
+ * ### Creating Links and Linked Records
38
+ *
39
+ * In some cases, you might want to create custom links or linked records to the order. For example, you might want to create a link from the order to a
40
+ * digital order.
41
+ *
42
+ * In such cases, ensure that your workflow's logic checks for existing links or records before creating new ones. You can query the
43
+ * [entry point of the link](https://docs.medusajs.com/learn/fundamentals/module-links/custom-columns#method-2-using-entry-point)
44
+ * to check for existing links before creating new ones.
45
+ *
46
+ * For example:
47
+ *
48
+ * ```ts
49
+ * import {
50
+ * createWorkflow,
51
+ * when,
52
+ * WorkflowResponse
53
+ * } from "@medusajs/framework/workflows-sdk"
54
+ * import {
55
+ * useQueryGraphStep,
56
+ * completeCartWorkflow,
57
+ * acquireLockStep,
58
+ * releaseLockStep
59
+ * } from "@medusajs/framework/workflows-sdk"
60
+ * import digitalProductOrderOrderLink from "../../links/digital-product-order"
61
+ *
62
+ * type WorkflowInput = {
63
+ * cart_id: string
64
+ * }
65
+ *
66
+ * const createDigitalProductOrderWorkflow = createWorkflow(
67
+ * "create-digital-product-order",
68
+ * (input: WorkflowInput) => {
69
+ * acquireLockStep({
70
+ * key: input.cart_id,
71
+ * timeout: 30,
72
+ * ttl: 120,
73
+ * });
74
+ * const { id } = completeCartWorkflow.runAsStep({
75
+ * input: {
76
+ * id: input.cart_id
77
+ * }
78
+ * })
79
+ *
80
+ * const { data: existingLinks } = useQueryGraphStep({
81
+ * entity: digitalProductOrderOrderLink.entryPoint,
82
+ * fields: ["digital_product_order.id"],
83
+ * filters: { order_id: id },
84
+ * }).config({ name: "retrieve-existing-links" });
85
+ *
86
+ *
87
+ * const digital_product_order = when(
88
+ * "create-digital-product-order-condition",
89
+ * { existingLinks },
90
+ * (data) => {
91
+ * return (
92
+ * data.existingLinks.length === 0
93
+ * );
94
+ * }
95
+ * )
96
+ * .then(() => {
97
+ * // create digital product order logic...
98
+ * })
99
+ *
100
+ * // other workflow logic...
101
+ *
102
+ * releaseLockStep({
103
+ * key: input.cart_id,
104
+ * })
105
+ *
106
+ * return new WorkflowResponse({
107
+ * // workflow output...
108
+ * })
109
+ * }
110
+ * )
111
+ * ```
112
+ *
113
+ * ### Custom Validation with Conflicts
114
+ *
115
+ * Some use cases require custom validation that may cause conflicts on subsequent executions of the workflow.
116
+ * For example, if you're selling tickets to an event, you might want to validate that the tickets are available
117
+ * on selected dates.
118
+ *
119
+ * In this scenario, if the workflow is retried after the first execution, the validation
120
+ * will fail since the tickets would have already been reserved in the first execution. This makes the cart
121
+ * completion non-idempotent.
122
+ *
123
+ * To handle these cases, you can create a step that throws an error if the validation fails. Then, in the compensation function,
124
+ * you can cancel the order if the validation fails. For example:
125
+ *
126
+ * ```ts
127
+ * import { createStep, StepResponse } from "@medusajs/framework/workflows-sdk"
128
+ * import { MedusaError } from "@medusajs/framework/utils"
129
+ * import { cancelOrderWorkflow } from "@medusajs/medusa/core-flows"
130
+ *
131
+ * type StepInput = {
132
+ * order_id: string
133
+ * // other input fields...
134
+ * }
135
+ *
136
+ * export const customCartValidationStep = createStep(
137
+ * "custom-cart-validation",
138
+ * async (input, { container }) => {
139
+ * const isValid = true // replace with actual validation logic
140
+ *
141
+ * if (!isValid) {
142
+ * throw new MedusaError(
143
+ * MedusaError.Types.INVALID_DATA,
144
+ * "Custom cart validation failed"
145
+ * )
146
+ * }
147
+ *
148
+ * return new StepResponse(void 0, input.order_id)
149
+ * },
150
+ * async (order_id, { container, context }) => {
151
+ * if (!order_id) return
152
+ *
153
+ * cancelOrderWorkflow(container).run({
154
+ * input: {
155
+ * id: order_id,
156
+ * },
157
+ * context,
158
+ * container
159
+ * })
160
+ * }
161
+ * )
162
+ * ```
163
+ *
164
+ * Then, in your custom workflow, only run the validation step if the order is being created for the first time. For example,
165
+ * only run the validation if the link from the order to your custom data does not exist yet:
166
+ *
167
+ * ```ts
168
+ * import {
169
+ * createWorkflow,
170
+ * when,
171
+ * WorkflowResponse
172
+ * } from "@medusajs/framework/workflows-sdk"
173
+ * import { useQueryGraphStep } from "@medusajs/framework/workflows-sdk"
174
+ * import ticketOrderLink from "../../links/ticket-order"
175
+ *
176
+ * type WorkflowInput = {
177
+ * cart_id: string
178
+ * }
179
+ *
180
+ * const createTicketOrderWorkflow = createWorkflow(
181
+ * "create-ticket-order",
182
+ * (input: WorkflowInput) => {
183
+ * acquireLockStep({
184
+ * key: input.cart_id,
185
+ * timeout: 30,
186
+ * ttl: 120,
187
+ * });
188
+ * const { id } = completeCartWorkflow.runAsStep({
189
+ * input: {
190
+ * id: input.cart_id
191
+ * }
192
+ * })
193
+ *
194
+ * const { data: existingLinks } = useQueryGraphStep({
195
+ * entity: ticketOrderLink.entryPoint,
196
+ * fields: ["ticket.id"],
197
+ * filters: { order_id: id },
198
+ * }).config({ name: "retrieve-existing-links" });
199
+ *
200
+ *
201
+ * const ticket_order = when(
202
+ * "create-ticket-order-condition",
203
+ * { existingLinks },
204
+ * (data) => {
205
+ * return (
206
+ * data.existingLinks.length === 0
207
+ * );
208
+ * }
209
+ * )
210
+ * .then(() => {
211
+ * customCartValidationStep({ order_id: id })
212
+ * // create ticket order logic...
213
+ * })
214
+ *
215
+ * // other workflow logic...
216
+ *
217
+ * releaseLockStep({
218
+ * key: input.cart_id,
219
+ * })
220
+ *
221
+ * return new WorkflowResponse({
222
+ * // workflow output...
223
+ * })
224
+ * }
225
+ * )
226
+ * ```
227
+ *
228
+ * The first time this workflow is executed for a cart, the validation step will run and validate the cart. If the validation fails,
229
+ * the order will be canceled in the compensation function.
230
+ *
231
+ * If the validation is successful and the workflow is retried, the validation step will be skipped since the link from the order to the
232
+ * ticket order already exists. This ensures that the workflow remains idempotent.
233
+ *
26
234
  * @example
27
235
  * const { result } = await completeCartWorkflow(container)
28
236
  * .run({
@@ -1 +1 @@
1
- {"version":3,"file":"complete-cart.d.ts","sourceRoot":"","sources":["../../../src/cart/workflows/complete-cart.ts"],"names":[],"mappings":"AAaA,OAAO,EAML,YAAY,EAEb,MAAM,mCAAmC,CAAA;AA2B1C;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;CACX,CAAA;AAED,MAAM,MAAM,0BAA0B,GAAG;IACvC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;CACX,CAAA;AAMD,eAAO,MAAM,sBAAsB,kBAAkB,CAAA;AACrD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,oBAAoB;;;aA2WhC,CAAA"}
1
+ {"version":3,"file":"complete-cart.d.ts","sourceRoot":"","sources":["../../../src/cart/workflows/complete-cart.ts"],"names":[],"mappings":"AAaA,OAAO,EAML,YAAY,EAEb,MAAM,mCAAmC,CAAA;AA2B1C;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;CACX,CAAA;AAED,MAAM,MAAM,0BAA0B,GAAG;IACvC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;CACX,CAAA;AAMD,eAAO,MAAM,sBAAsB,kBAAkB,CAAA;AACrD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqOG;AACH,eAAO,MAAM,oBAAoB;;;aA2WhC,CAAA"}
@@ -28,6 +28,214 @@ exports.completeCartWorkflowId = "complete-cart";
28
28
  * For example, in the [Subscriptions recipe](https://docs.medusajs.com/resources/recipes/subscriptions/examples/standard#create-workflow),
29
29
  * this workflow is used within another workflow that creates a subscription order.
30
30
  *
31
+ * ## Cart Completion Idempotency
32
+ *
33
+ * This workflow's logic is idempotent, meaning that if it is executed multiple times with the same input, it will not create duplicate orders. The
34
+ * same order will be returned for subsequent executions with the same cart ID. This is necessary to avoid rolling back payments or causing
35
+ * other side effects if the workflow is retried or fails due to transient errors.
36
+ *
37
+ * So, if you use this workflow within your own, make sure your workflow's steps are idempotent as well to avoid unintended side effects.
38
+ * Your workflow must also acquire and release locks around this workflow to prevent concurrent executions for the same cart.
39
+ *
40
+ * The following sections cover some common scenarios and how to handle them.
41
+ *
42
+ * ### Creating Links and Linked Records
43
+ *
44
+ * In some cases, you might want to create custom links or linked records to the order. For example, you might want to create a link from the order to a
45
+ * digital order.
46
+ *
47
+ * In such cases, ensure that your workflow's logic checks for existing links or records before creating new ones. You can query the
48
+ * [entry point of the link](https://docs.medusajs.com/learn/fundamentals/module-links/custom-columns#method-2-using-entry-point)
49
+ * to check for existing links before creating new ones.
50
+ *
51
+ * For example:
52
+ *
53
+ * ```ts
54
+ * import {
55
+ * createWorkflow,
56
+ * when,
57
+ * WorkflowResponse
58
+ * } from "@medusajs/framework/workflows-sdk"
59
+ * import {
60
+ * useQueryGraphStep,
61
+ * completeCartWorkflow,
62
+ * acquireLockStep,
63
+ * releaseLockStep
64
+ * } from "@medusajs/framework/workflows-sdk"
65
+ * import digitalProductOrderOrderLink from "../../links/digital-product-order"
66
+ *
67
+ * type WorkflowInput = {
68
+ * cart_id: string
69
+ * }
70
+ *
71
+ * const createDigitalProductOrderWorkflow = createWorkflow(
72
+ * "create-digital-product-order",
73
+ * (input: WorkflowInput) => {
74
+ * acquireLockStep({
75
+ * key: input.cart_id,
76
+ * timeout: 30,
77
+ * ttl: 120,
78
+ * });
79
+ * const { id } = completeCartWorkflow.runAsStep({
80
+ * input: {
81
+ * id: input.cart_id
82
+ * }
83
+ * })
84
+ *
85
+ * const { data: existingLinks } = useQueryGraphStep({
86
+ * entity: digitalProductOrderOrderLink.entryPoint,
87
+ * fields: ["digital_product_order.id"],
88
+ * filters: { order_id: id },
89
+ * }).config({ name: "retrieve-existing-links" });
90
+ *
91
+ *
92
+ * const digital_product_order = when(
93
+ * "create-digital-product-order-condition",
94
+ * { existingLinks },
95
+ * (data) => {
96
+ * return (
97
+ * data.existingLinks.length === 0
98
+ * );
99
+ * }
100
+ * )
101
+ * .then(() => {
102
+ * // create digital product order logic...
103
+ * })
104
+ *
105
+ * // other workflow logic...
106
+ *
107
+ * releaseLockStep({
108
+ * key: input.cart_id,
109
+ * })
110
+ *
111
+ * return new WorkflowResponse({
112
+ * // workflow output...
113
+ * })
114
+ * }
115
+ * )
116
+ * ```
117
+ *
118
+ * ### Custom Validation with Conflicts
119
+ *
120
+ * Some use cases require custom validation that may cause conflicts on subsequent executions of the workflow.
121
+ * For example, if you're selling tickets to an event, you might want to validate that the tickets are available
122
+ * on selected dates.
123
+ *
124
+ * In this scenario, if the workflow is retried after the first execution, the validation
125
+ * will fail since the tickets would have already been reserved in the first execution. This makes the cart
126
+ * completion non-idempotent.
127
+ *
128
+ * To handle these cases, you can create a step that throws an error if the validation fails. Then, in the compensation function,
129
+ * you can cancel the order if the validation fails. For example:
130
+ *
131
+ * ```ts
132
+ * import { createStep, StepResponse } from "@medusajs/framework/workflows-sdk"
133
+ * import { MedusaError } from "@medusajs/framework/utils"
134
+ * import { cancelOrderWorkflow } from "@medusajs/medusa/core-flows"
135
+ *
136
+ * type StepInput = {
137
+ * order_id: string
138
+ * // other input fields...
139
+ * }
140
+ *
141
+ * export const customCartValidationStep = createStep(
142
+ * "custom-cart-validation",
143
+ * async (input, { container }) => {
144
+ * const isValid = true // replace with actual validation logic
145
+ *
146
+ * if (!isValid) {
147
+ * throw new MedusaError(
148
+ * MedusaError.Types.INVALID_DATA,
149
+ * "Custom cart validation failed"
150
+ * )
151
+ * }
152
+ *
153
+ * return new StepResponse(void 0, input.order_id)
154
+ * },
155
+ * async (order_id, { container, context }) => {
156
+ * if (!order_id) return
157
+ *
158
+ * cancelOrderWorkflow(container).run({
159
+ * input: {
160
+ * id: order_id,
161
+ * },
162
+ * context,
163
+ * container
164
+ * })
165
+ * }
166
+ * )
167
+ * ```
168
+ *
169
+ * Then, in your custom workflow, only run the validation step if the order is being created for the first time. For example,
170
+ * only run the validation if the link from the order to your custom data does not exist yet:
171
+ *
172
+ * ```ts
173
+ * import {
174
+ * createWorkflow,
175
+ * when,
176
+ * WorkflowResponse
177
+ * } from "@medusajs/framework/workflows-sdk"
178
+ * import { useQueryGraphStep } from "@medusajs/framework/workflows-sdk"
179
+ * import ticketOrderLink from "../../links/ticket-order"
180
+ *
181
+ * type WorkflowInput = {
182
+ * cart_id: string
183
+ * }
184
+ *
185
+ * const createTicketOrderWorkflow = createWorkflow(
186
+ * "create-ticket-order",
187
+ * (input: WorkflowInput) => {
188
+ * acquireLockStep({
189
+ * key: input.cart_id,
190
+ * timeout: 30,
191
+ * ttl: 120,
192
+ * });
193
+ * const { id } = completeCartWorkflow.runAsStep({
194
+ * input: {
195
+ * id: input.cart_id
196
+ * }
197
+ * })
198
+ *
199
+ * const { data: existingLinks } = useQueryGraphStep({
200
+ * entity: ticketOrderLink.entryPoint,
201
+ * fields: ["ticket.id"],
202
+ * filters: { order_id: id },
203
+ * }).config({ name: "retrieve-existing-links" });
204
+ *
205
+ *
206
+ * const ticket_order = when(
207
+ * "create-ticket-order-condition",
208
+ * { existingLinks },
209
+ * (data) => {
210
+ * return (
211
+ * data.existingLinks.length === 0
212
+ * );
213
+ * }
214
+ * )
215
+ * .then(() => {
216
+ * customCartValidationStep({ order_id: id })
217
+ * // create ticket order logic...
218
+ * })
219
+ *
220
+ * // other workflow logic...
221
+ *
222
+ * releaseLockStep({
223
+ * key: input.cart_id,
224
+ * })
225
+ *
226
+ * return new WorkflowResponse({
227
+ * // workflow output...
228
+ * })
229
+ * }
230
+ * )
231
+ * ```
232
+ *
233
+ * The first time this workflow is executed for a cart, the validation step will run and validate the cart. If the validation fails,
234
+ * the order will be canceled in the compensation function.
235
+ *
236
+ * If the validation is successful and the workflow is retried, the validation step will be skipped since the link from the order to the
237
+ * ticket order already exists. This ensures that the workflow remains idempotent.
238
+ *
31
239
  * @example
32
240
  * const { result } = await completeCartWorkflow(container)
33
241
  * .run({
@@ -1 +1 @@
1
- {"version":3,"file":"complete-cart.js","sourceRoot":"","sources":["../../../src/cart/workflows/complete-cart.ts"],"names":[],"mappings":";;;AAOA,qDAKkC;AAClC,qEAQ0C;AAC1C,yCAIqB;AACrB,mEAAkE;AAClE,mEAAkE;AAClE,mFAAiF;AACjF,mEAAkE;AAClE,6FAA2F;AAC3F,yEAAwE;AACxE,oCAIiB;AACjB,wFAAqF;AACrF,kEAAiE;AACjE,4CAAoD;AACpD,8FAAuF;AACvF,4EAKwC;AAkBxC,MAAM,UAAU,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAA;AACnC,MAAM,cAAc,GAAG,EAAE,CAAA;AACzB,MAAM,WAAW,GAAG,EAAE,GAAG,CAAC,CAAA;AAEb,QAAA,sBAAsB,GAAG,eAAe,CAAA;AACrD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACU,QAAA,oBAAoB,GAAG,IAAA,8BAAc,EAChD;IACE,IAAI,EAAE,8BAAsB;IAC5B,KAAK,EAAE,IAAI;IACX,UAAU,EAAE,KAAK;IACjB,aAAa,EAAE,UAAU;CAC1B,EACD,CAAC,KAA8C,EAAE,EAA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QAE1C;;WAEG;QACH,IAAA,0BAAU,EAAC,cAAc,EAAE;YACzB,QAAQ,EAAE,YAAY,CAAC,EAAE;YACzB,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC,EAAE;SAC1B,CAAC,CAAA;QAEF,OAAO,YAAY,CAAA;IACrB,CAAC,CAAC,CAAA;IAEF,IAAA,8BAAe,EAAC;QACd,GAAG,EAAE,KAAK,CAAC,EAAE;KACd,CAAC,CAAA;IAEF,MAAM,MAAM,GAAG,IAAA,yBAAS,EAAC,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE;QAClE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,OAAO,EAAgC,CAAA;IACnE,CAAC,CAAC,CAAA;IAEF,OAAO,IAAI,gCAAgB,CAAC,MAAM,EAAE;QAClC,KAAK,EAAE,CAAC,QAAQ,CAAC;KAClB,CAAC,CAAA;AACJ,CAAC,CACF,CAAA"}
@@ -23,12 +23,12 @@ exports.getVariantsAndItemsWithPrices = (0, workflows_sdk_1.createWorkflow)(expo
23
23
  const cart = data.cart;
24
24
  const baseContext = {
25
25
  ...(0, utils_1.filterObjectByKeys)(cart, fields_1.cartFieldsForPricingContext),
26
+ customer: cart.customer,
27
+ region: cart.region,
26
28
  ...(data.setPricingContextResult ? data.setPricingContextResult : {}),
27
29
  currency_code: cart.currency_code ?? cart.region?.currency_code,
28
30
  region_id: cart.region_id,
29
- region: cart.region,
30
31
  customer_id: cart.customer_id,
31
- customer: cart.customer,
32
32
  };
33
33
  return (data.items ?? cart.items ?? [])
34
34
  .filter((i) => i.variant_id)
@@ -1 +1 @@
1
- {"version":3,"file":"get-variants-and-items-with-prices.js","sourceRoot":"","sources":["../../../src/cart/workflows/get-variants-and-items-with-prices.ts"],"names":[],"mappings":";;;AAWA,qDAMkC;AAClC,qEAK0C;AAC1C,yCAAgD;AAChD,oCAAkD;AAClD,4CAGwB;AACx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Aa,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC7B,MAAM,IAAI,mBAAW,CACnB,mBAAW,CAAC,KAAK,CAAC,YAAY,EAC9B,qBAAqB,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,sBAAsB,CACpE,CAAA;QACH,CAAC;QAED,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,SAAS,EAAE,KAAK,EAAE,CAAA;IACrD,CAAC,CACF,CAAA;IAED,OAAO,IAAI,gCAAgB,CAAC,uBAAuB,CAAC,CAAA;AACtD,CAAC,CACF,CAAA"}
1
+ {"version":3,"file":"get-variants-and-items-with-prices.js","sourceRoot":"","sources":["../../../src/cart/workflows/get-variants-and-items-with-prices.ts"],"names":[],"mappings":";;;AAWA,qDAMkC;AAClC,qEAK0C;AAC1C,yCAAgD;AAChD,oCAAkD;AAClD,4CAGwB;AACxB,4EAGwC;AAoC3B,QAAA,+BAA+B,GAC1C,wCAAwC,CAAA;AAC7B,QAAA,6BAA6B,GAAG,IAAA,8BAAc,EACzD,uCAA+B,EAC/B,CACE,KAA+D,EACA,EAAE;IACjE,MAAM,UAAU,GAAG,IAAA,yBAAS,EAC1B,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,CAAC,QAAQ,EAAE,EAAE,EAAE,EACxE,CAAC,IAAI,EAAY,EAAE;QACjB,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YACpB,OAAO,IAAI,CAAC,UAAU,CAAA;QACxB,CAAC;QAED,OAAO,KAAK,CAAC,IAAI,CACf,IAAI,GAAG,CACL,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAC/D,CACF,CAAC,MAAM,CAAC,CAAC,CAAC,EAAe,EAAE,CAAC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,CAAC,SAAS,GAAG,kBAAkB,CAAC,iBAAiB,CAAA;gBACtD,KAAK,CAAC,cAAc;oBAClB,kBAAkB,CAAC,iCAAiC,CAAA;YACxD,CAAC;YAED,MAAM,YAAY,GAAG,IAAA,4CAAmB,EAAC,KAAK,CAAC,CAAA;YAE/C,OAAO;gBACL,QAAQ,EAAE,EAAE,EAAE,EAAG,KAAyB,CAAC,EAAE,EAAE;gBAC/C,IAAI,EAAE,YAA0C;aACjD,CAAA;QACH,CAAC,CAAC,CAAA;QAEF,IAAI,0BAA0B,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC1C,MAAM,IAAI,mBAAW,CACnB,mBAAW,CAAC,KAAK,CAAC,YAAY,EAC9B,YAAY,0BAA0B,CAAC,IAAI,CAAC,IAAI,CAAC,4DAA4D,CAC9G,CAAA;QACH,CAAC;QACD,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC7B,MAAM,IAAI,mBAAW,CACnB,mBAAW,CAAC,KAAK,CAAC,YAAY,EAC9B,qBAAqB,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,sBAAsB,CACpE,CAAA;QACH,CAAC;QAED,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,SAAS,EAAE,KAAK,EAAE,CAAA;IACrD,CAAC,CACF,CAAA;IAED,OAAO,IAAI,gCAAgB,CAAC,uBAAuB,CAAC,CAAA;AACtD,CAAC,CACF,CAAA"}
@@ -73,7 +73,7 @@ exports.updateCartPromotionsWorkflow = (0, workflows_sdk_1.createWorkflow)({
73
73
  action: action,
74
74
  });
75
75
  const actions = (0, steps_1.getActionsToComputeFromPromotionsStep)({
76
- cart,
76
+ computeActionContext: cart,
77
77
  promotionCodesToApply,
78
78
  });
79
79
  const { lineItemAdjustmentsToCreate, lineItemAdjustmentIdsToRemove, shippingMethodAdjustmentsToCreate, shippingMethodAdjustmentIdsToRemove, computedPromotionCodes, } = (0, steps_1.prepareAdjustmentsFromPromotionActionsStep)({ actions });
@@ -1 +1 @@
1
- {"version":3,"file":"update-cart-promotions.js","sourceRoot":"","sources":["../../../src/cart/workflows/update-cart-promotions.ts"],"names":[],"mappings":";;;AAAA,qDAA4D;AAC5D,qEAQ0C;AAC1C,yCAAgD;AAChD,2CAAgE;AAChE,oCASiB;AACjB,4EAA0E;AAC1E,4CAA2D;AA4B9C,QAAA,8BAA8B,GAAG,wBAAwB,CAAA;AACtE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACU,QAAA,4BAA4B,GAAG,IAAA,8BAAc,EACxD;IACE,IAAI,EAAE,sCAA8B;IACpC,UAAU,EAAE,KAAK;CAClB,EACD,CAAC,KAAsD,EAAE,EAAE;IACzD,MAAM,SAAS,GAAG,IAAA,oBAAI,EAAC,mBAAmB,EAAE,EAAE,KAAK,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;QACnE,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA;IACpB,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE;QACX,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,IAAA,0BAAiB,EAAC;YACvC,MAAM,EAAE,MAAM;YACd,MAAM,EAAE,kCAAyB;YACjC,OAAO,EAAE,EAAE,EAAE,EAAE,KAAK,CAAC,OAAO,EAAE;YAC9B,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;SAC3B,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,CAAA;QAEjC,OAAO,IAAI,CAAA;IACb,CAAC,CAAC,CAAA;IAEF,MAAM,IAAI,GAAG,IAAA,yBAAS,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,EAAE;QACpE,OAAO,KAAK,CAAC,IAAI,IAAI,SAAS,CAAA;IAChC,CAAC,CAAC,CAAA;IAEF,IAAA,wBAAgB,EAAC,EAAE,IAAI,EAAE,CAAC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EAAE,EAAE,IAAI,CAAC,EAAE;QACX,WAAW,EAAE,sBAAsB;QACnC,MAAM,EAAE,wBAAgB,CAAC,OAAO;KACjC,CAAC,CACH,CAAA;IAED,IAAA,yBAAe,EAAC;QACd,GAAG,EAAE,IAAI,CAAC,EAAE;KACb,CAAC,CAAA;IAEF,OAAO,IAAI,gCAAgB,CAAC,KAAK,CAAC,EAAE;QAClC,KAAK,EAAE,CAAC,QAAQ,CAAC;KAClB,CAAC,CAAA;AACJ,CAAC,CACF,CAAA"}
1
+ {"version":3,"file":"update-cart-promotions.js","sourceRoot":"","sources":["../../../src/cart/workflows/update-cart-promotions.ts"],"names":[],"mappings":";;;AAAA,qDAA4D;AAC5D,qEAQ0C;AAC1C,yCAAgD;AAChD,2CAAgE;AAChE,oCASiB;AACjB,4EAA0E;AAC1E,4CAA2D;AA4B9C,QAAA,8BAA8B,GAAG,wBAAwB,CAAA;AACtE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACU,QAAA,4BAA4B,GAAG,IAAA,8BAAc,EACxD;IACE,IAAI,EAAE,sCAA8B;IACpC,UAAU,EAAE,KAAK;CAClB,EACD,CAAC,KAAsD,EAAE,EAAE;IACzD,MAAM,SAAS,GAAG,IAAA,oBAAI,EAAC,mBAAmB,EAAE,EAAE,KAAK,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;QACnE,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA;IACpB,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE;QACX,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,IAAA,0BAAiB,EAAC;YACvC,MAAM,EAAE,MAAM;YACd,MAAM,EAAE,kCAAyB;YACjC,OAAO,EAAE,EAAE,EAAE,EAAE,KAAK,CAAC,OAAO,EAAE;YAC9B,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;SAC3B,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAA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