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

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 (34) hide show
  1. package/dist/file/steps/upload-files.d.ts +2 -2
  2. package/dist/file/steps/upload-files.js +1 -1
  3. package/dist/file/workflows/upload-files.d.ts +2 -2
  4. package/dist/file/workflows/upload-files.js +1 -1
  5. package/dist/payment/steps/authorize-payment-session.d.ts.map +1 -1
  6. package/dist/payment/steps/authorize-payment-session.js +4 -0
  7. package/dist/payment/steps/authorize-payment-session.js.map +1 -1
  8. package/dist/payment/workflows/process-payment.d.ts.map +1 -1
  9. package/dist/payment/workflows/process-payment.js +23 -0
  10. package/dist/payment/workflows/process-payment.js.map +1 -1
  11. package/dist/product/steps/link-product-options-to-product.d.ts +3 -2
  12. package/dist/product/steps/link-product-options-to-product.d.ts.map +1 -1
  13. package/dist/product/steps/link-product-options-to-product.js +10 -3
  14. package/dist/product/steps/link-product-options-to-product.js.map +1 -1
  15. package/dist/product/steps/process-product-options-for-import.d.ts +1 -1
  16. package/dist/product/steps/process-product-options-for-import.d.ts.map +1 -1
  17. package/dist/product/steps/process-product-options-for-import.js +28 -11
  18. package/dist/product/steps/process-product-options-for-import.js.map +1 -1
  19. package/dist/product/steps/update-product-options.d.ts.map +1 -1
  20. package/dist/product/steps/update-product-options.js +3 -0
  21. package/dist/product/steps/update-product-options.js.map +1 -1
  22. package/dist/product/workflows/{link-product-options-to-product.d.ts → create-and-link-product-options-to-product.d.ts} +8 -5
  23. package/dist/product/workflows/create-and-link-product-options-to-product.d.ts.map +1 -0
  24. package/dist/product/workflows/create-and-link-product-options-to-product.js +85 -0
  25. package/dist/product/workflows/create-and-link-product-options-to-product.js.map +1 -0
  26. package/dist/product/workflows/index.d.ts +1 -1
  27. package/dist/product/workflows/index.d.ts.map +1 -1
  28. package/dist/product/workflows/index.js +1 -1
  29. package/dist/product/workflows/index.js.map +1 -1
  30. package/dist/tsconfig.tsbuildinfo +1 -1
  31. package/package.json +3 -3
  32. package/dist/product/workflows/link-product-options-to-product.d.ts.map +0 -1
  33. package/dist/product/workflows/link-product-options-to-product.js +0 -55
  34. package/dist/product/workflows/link-product-options-to-product.js.map +0 -1
@@ -19,7 +19,7 @@ export type UploadFilesStepInput = {
19
19
  mimeType: string;
20
20
  /**
21
21
  * The content of the file. For images, for example,
22
- * use binary string. For CSV files, use the CSV content.
22
+ * use base64 string. For CSV files, use the CSV content.
23
23
  */
24
24
  content: string;
25
25
  /**
@@ -43,7 +43,7 @@ export declare const uploadFilesStepId = "upload-files";
43
43
  * {
44
44
  * filename: "test.jpg",
45
45
  * mimeType: "img/jpg",
46
- * content: "binary-string",
46
+ * content: "base64-string",
47
47
  * access: "public"
48
48
  * }
49
49
  * ]
@@ -14,7 +14,7 @@ exports.uploadFilesStepId = "upload-files";
14
14
  * {
15
15
  * filename: "test.jpg",
16
16
  * mimeType: "img/jpg",
17
- * content: "binary-string",
17
+ * content: "base64-string",
18
18
  * access: "public"
19
19
  * }
20
20
  * ]
@@ -20,7 +20,7 @@ export type UploadFilesWorkflowInput = {
20
20
  mimeType: string;
21
21
  /**
22
22
  * The content of the file. For images, for example,
23
- * use binary string. For CSV files, use the CSV content.
23
+ * use base64 string. For CSV files, use the CSV content.
24
24
  */
25
25
  content: string;
26
26
  /**
@@ -50,7 +50,7 @@ export declare const uploadFilesWorkflowId = "upload-files";
50
50
  * {
51
51
  * filename: "test.jpg",
52
52
  * mimeType: "img/jpg",
53
- * content: "binary-string",
53
+ * content: "base64-string",
54
54
  * access: "public"
55
55
  * }
56
56
  * ]
@@ -20,7 +20,7 @@ exports.uploadFilesWorkflowId = "upload-files";
20
20
  * {
21
21
  * filename: "test.jpg",
22
22
  * mimeType: "img/jpg",
23
- * content: "binary-string",
23
+ * content: "base64-string",
24
24
  * access: "public"
25
25
  * }
26
26
  * ]
@@ -1 +1 @@
1
- {"version":3,"file":"authorize-payment-session.d.ts","sourceRoot":"","sources":["../../../src/payment/steps/authorize-payment-session.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,UAAU,EACX,MAAM,2BAA2B,CAAA;AASlC;;GAEG;AACH,MAAM,MAAM,gCAAgC,GAAG;IAC7C;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;IACV;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAClC,CAAA;AAED,eAAO,MAAM,6BAA6B,mCAAmC,CAAA;AAC7E;;;;;;;;GAQG;AACH,eAAO,MAAM,2BAA2B,+GA+EvC,CAAA"}
1
+ {"version":3,"file":"authorize-payment-session.d.ts","sourceRoot":"","sources":["../../../src/payment/steps/authorize-payment-session.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,UAAU,EACX,MAAM,2BAA2B,CAAA;AASlC;;GAEG;AACH,MAAM,MAAM,gCAAgC,GAAG;IAC7C;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;IACV;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAClC,CAAA;AAED,eAAO,MAAM,6BAA6B,mCAAmC,CAAA;AAC7E;;;;;;;;GAQG;AACH,eAAO,MAAM,2BAA2B,+GAoFvC,CAAA"}
@@ -25,6 +25,10 @@ exports.authorizePaymentSessionStep = (0, workflows_sdk_1.createStep)(exports.au
25
25
  }
26
26
  catch (e) {
27
27
  logger.error(`Error was thrown trying to authorize payment session - ${input.id} - ${e}`);
28
+ // this implies the error is already a MedusaError, so we can throw it safely,
29
+ if (utils_1.MedusaError.isMedusaError(e)) {
30
+ throw e;
31
+ }
28
32
  }
29
33
  const paymentSession = await paymentModule.retrievePaymentSession(input.id, {
30
34
  relations: ["payment", "payment.captures"],
@@ -1 +1 @@
1
- {"version":3,"file":"authorize-payment-session.js","sourceRoot":"","sources":["../../../src/payment/steps/authorize-payment-session.ts"],"names":[],"mappings":";;;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AC;QAC1E,MAAM,IAAI,mBAAW,CACnB,mBAAW,CAAC,KAAK,CAAC,2BAA2B,EAC7C,8BAA8B,CAC/B,CAAA;IACH,CAAC;IAED,OAAO,IAAI,4BAAY,CAAC,cAAc,CAAC,OAAO,CAAC,CAAA;AACjD,CAAC;AACD,qGAAqG;AACrG,KAAK,EAAE,OAAO,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;IAC/B,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAM;IACR,CAAC;IAED,MAAM,MAAM,GAAG,SAAS,CAAC,OAAO,CAAS,iCAAyB,CAAC,MAAM,CAAC,CAAA;IAC1E,MAAM,aAAa,GAAG,SAAS,CAAC,OAAO,CACrC,eAAO,CAAC,OAAO,CAChB,CAAA;IAED,uFAAuF;IACvF,+DAA+D;IAC/D,IACE,OAAO,CAAC,eAAe;QACvB,OAAO,CAAC,eAAe,CAAC,MAAM,KAAK,4BAAoB,CAAC,aAAa,EACrE,CAAC;QACD,OAAM;IACR,CAAC;IAED,IAAI,CAAC;QACH,MAAM,aAAa,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;IAC/C,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,MAAM,CAAC,KAAK,CACV,+CAA+C,OAAO,CAAC,EAAE,MAAM,CAAC,EAAE,CACnE,CAAA;IACH,CAAC;AACH,CAAC,CACF,CAAA"}
1
+ {"version":3,"file":"authorize-payment-session.js","sourceRoot":"","sources":["../../../src/payment/steps/authorize-payment-session.ts"],"names":[],"mappings":";;;AAKA,qDAKkC;AAClC,qEAA4E;AAiB/D,QAAA,6BAA6B,GAAG,gCAAgC,CAAA;AAC7E;;;;;;;;GAQG;AACU,QAAA,2BAA2B,GAAG,IAAA,0BAAU,EACnD,qCAA6B,EAC7B,KAAK,EAAE,KAAuC,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;IAC/D,IAAI,OAA+B,CAAA;IACnC,MAAM,MAAM,GAAG,SAAS,CAAC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AAC,CAAA;AACjD,CAAC;AACD,qGAAqG;AACrG,KAAK,EAAE,OAAO,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;IAC/B,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAM;IACR,CAAC;IAED,MAAM,MAAM,GAAG,SAAS,CAAC,OAAO,CAAS,iCAAyB,CAAC,MAAM,CAAC,CAAA;IAC1E,MAAM,aAAa,GAAG,SAAS,CAAC,OAAO,CACrC,eAAO,CAAC,OAAO,CAChB,CAAA;IAED,uFAAuF;IACvF,+DAA+D;IAC/D,IACE,OAAO,CAAC,eAAe;QACvB,OAAO,CAAC,eAAe,CAAC,MAAM,KAAK,4BAAoB,CAAC,aAAa,EACrE,CAAC;QACD,OAAM;IACR,CAAC;IAED,IAAI,CAAC;QACH,MAAM,aAAa,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;IAC/C,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,MAAM,CAAC,KAAK,CACV,+CAA+C,OAAO,CAAC,EAAE,MAAM,CAAC,EAAE,CACnE,CAAA;IACH,CAAC;AACH,CAAC,CACF,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"process-payment.d.ts","sourceRoot":"","sources":["../../../src/payment/workflows/process-payment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAQpE;;GAEG;AACH,MAAM,WAAW,2BAA4B,SAAQ,mBAAmB;CAAG;AAE3E,eAAO,MAAM,wBAAwB,6BAA6B,CAAA;AAClE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,sBAAsB,+FAsGlC,CAAA"}
1
+ {"version":3,"file":"process-payment.d.ts","sourceRoot":"","sources":["../../../src/payment/workflows/process-payment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAYpE;;GAEG;AACH,MAAM,WAAW,2BAA4B,SAAQ,mBAAmB;CAAG;AAE3E,eAAO,MAAM,wBAAwB,6BAA6B,CAAA;AAClE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,sBAAsB,+FAgIlC,CAAA"}
@@ -7,6 +7,9 @@ const common_1 = require("../../common");
7
7
  const steps_1 = require("../steps");
8
8
  const complete_cart_after_payment_1 = require("../steps/complete-cart-after-payment");
9
9
  const capture_payment_1 = require("./capture-payment");
10
+ const locking_1 = require("../../locking");
11
+ const THIRTY_SECONDS = 30;
12
+ const TWO_MINUTES = 60 * 2;
10
13
  exports.processPaymentWorkflowId = "process-payment-workflow";
11
14
  /**
12
15
  * This workflow processes a payment to either complete its associated cart,
@@ -56,6 +59,18 @@ exports.processPaymentWorkflow = (0, workflows_sdk_1.createWorkflow)(exports.pro
56
59
  }).config({
57
60
  name: "cart-payment-query",
58
61
  });
62
+ const cartId = (0, workflows_sdk_1.transform)({ cartPaymentCollection }, ({ cartPaymentCollection }) => {
63
+ return cartPaymentCollection.data[0].cart_id;
64
+ });
65
+ (0, workflows_sdk_1.when)("lock-cart-when-available", { cartId }, ({ cartId }) => {
66
+ return !!cartId;
67
+ }).then(() => {
68
+ (0, locking_1.acquireLockStep)({
69
+ key: cartId,
70
+ timeout: THIRTY_SECONDS,
71
+ ttl: TWO_MINUTES,
72
+ });
73
+ });
59
74
  (0, workflows_sdk_1.when)({ input, paymentData }, ({ input, paymentData }) => {
60
75
  return (input.action === utils_1.PaymentActions.SUCCESSFUL && !!paymentData.data.length);
61
76
  }).then(() => {
@@ -105,6 +120,14 @@ exports.processPaymentWorkflow = (0, workflows_sdk_1.createWorkflow)(exports.pro
105
120
  name: "authorize-payment-session",
106
121
  });
107
122
  });
123
+ // We release before the completion to prevent dead locks
124
+ (0, workflows_sdk_1.when)("release-lock-cart-when-available", { cartId }, ({ cartId }) => {
125
+ return !!cartId;
126
+ }).then(() => {
127
+ (0, locking_1.releaseLockStep)({
128
+ key: cartId,
129
+ });
130
+ });
108
131
  (0, workflows_sdk_1.when)({ cartPaymentCollection }, ({ cartPaymentCollection }) => {
109
132
  return !!cartPaymentCollection.data.length;
110
133
  }).then(() => {
@@ -1 +1 @@
1
- {"version":3,"file":"process-payment.js","sourceRoot":"","sources":["../../../src/payment/workflows/process-payment.ts"],"names":[],"mappings":";;;AACA,2CAAgD;AAChD,2DAA8D;AAC9D,yCAAgD;AAChD,oCAAsD;AACtD,sFAAmF;AACnF,uDAA0D;AAO7C,QAAA,wBAAwB,GAAG,0BAA0B,CAAA;AAClE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACU,QAAA,sBAAsB,GAAG,IAAA,8BAAc,EAClD,gCAAwB,EACxB,CAAC,KAAkC,EAAE,EAAE;IACrC,MAAM,WAAW,GAAG,IAAA,0BAAiB,EAAC;QACpC,MAAM,EAAE,SAAS;QACjB,MAAM,EAAE,CAAC,IAAI,CAAC;QACd,OAAO,EAAE,EAAE,kBAAkB,EAAE,KAAK,CAAC,IAAI,EAAE,UAAU,EAAE;KACxD,CAAC,CAAC,MAAM,CAAC;QACR,IAAI,EAAE,eAAe;KACtB,CAAC,CAAA;IAEF,MAAM,oBAAoB,GAAG,IAAA,0BAAiB,EAAC;QAC7C,MAAM,EAAE,iBAAiB;QACzB,MAAM,EAAE,CAAC,uBAAuB,CAAC;QACjC,OAAO,EAAE,EAAE,EAAE,EAAE,KAAK,CAAC,IAAI,EAAE,UAAU,EAAE;KACxC,CAAC,CAAC,MAAM,CAAC;QACR,IAAI,EAAE,uBAAuB;KAC9B,CAAC,CAAA;IAEF,MAAM,qBAAqB,GAAG,IAAA,0BAAiB,EAAC;QAC9C,MAAM,EAAE,yBAAyB;QACjC,MAAM,EAAE,CAAC,SAAS,CAAC;QACnB,OAAO,EAAE;YACP,qBAAqB,EACnB,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,qBAAqB;SACrD;KACF,CAAC,CAAC,MAAM,CAAC;QACR,IAAI,EAAE,oBAAoB;KAC3B,C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AAC,CAAA;IACN,CAAC,CAAC,CAAA;IAEF,IAAA,oBAAI,EACF,EAAE,KAAK,EAAE,qBAAqB,EAAE,EAChC,CAAC,EAAE,KAAK,EAAE,qBAAqB,EAAE,EAAE,EAAE;QACnC,gEAAgE;QAChE,wFAAwF;QACxF,OAAO,CACL,CAAC,qBAAqB,CAAC,IAAI,CAAC,MAAM;YAClC,KAAK,CAAC,MAAM,KAAK,sBAAc,CAAC,UAAU;YAC1C,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,UAAU,CACzB,CAAA;IACH,CAAC,CACF,CAAC,IAAI,CAAC,GAAG,EAAE;QACV,IAAA,mCAA2B,EAAC;YAC1B,EAAE,EAAE,KAAK,CAAC,IAAK,CAAC,UAAU;YAC1B,OAAO,EAAE,EAAE;SACZ,CAAC,CAAC,MAAM,CAAC;YACR,IAAI,EAAE,2BAA2B;SAClC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEF,IAAA,oBAAI,EAAC,EAAE,qBAAqB,EAAE,EAAE,CAAC,EAAE,qBAAqB,EAAE,EAAE,EAAE;QAC5D,OAAO,CAAC,CAAC,qBAAqB,CAAC,IAAI,CAAC,MAAM,CAAA;IAC5C,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE;QACX,IAAA,0DAA4B,EAAC;YAC3B,OAAO,EAAE,qBAAqB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO;SAC/C,CAAC,CAAC,MAAM,CAAC;YACR,0BAA0B,EAAE,IAAI,EAAE,4DAA4D;SAC/F,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CACF,CAAA"}
1
+ {"version":3,"file":"process-payment.js","sourceRoot":"","sources":["../../../src/payment/workflows/process-payment.ts"],"names":[],"mappings":";;;AACA,2CAAgD;AAChD,2DAAyE;AACzE,yCAAgD;AAChD,oCAAsD;AACtD,sFAAmF;AACnF,uDAA0D;AAC1D,2CAAgE;AAEhE,MAAM,cAAc,GAAG,E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AqB,EAAE,EAAE,EAAE;QAC5D,OAAO,CAAC,CAAC,qBAAqB,CAAC,IAAI,CAAC,MAAM,CAAA;IAC5C,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE;QACX,IAAA,0DAA4B,EAAC;YAC3B,OAAO,EAAE,qBAAqB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO;SAC/C,CAAC,CAAC,MAAM,CAAC;YACR,0BAA0B,EAAE,IAAI,EAAE,4DAA4D;SAC/F,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CACF,CAAA"}
@@ -1,3 +1,4 @@
1
+ import { ProductTypes } from "@medusajs/framework/types";
1
2
  /**
2
3
  * The data to add/remove one or more product options to/from a product.
3
4
  */
@@ -9,7 +10,7 @@ export type LinkProductOptionsToProductStepInput = {
9
10
  /**
10
11
  * The product options to add to the product.
11
12
  */
12
- add?: string[];
13
+ add?: (string | Omit<ProductTypes.ProductOptionProductPair, "product_id">)[];
13
14
  /**
14
15
  * The product options to remove from the product.
15
16
  */
@@ -22,7 +23,7 @@ export declare const linkProductOptionsToProductStepId = "link-product-options-t
22
23
  * @example
23
24
  * const data = linkProductOptionsToProductStep({
24
25
  * product_id: "prod_123",
25
- * product_option_ids: ["opt_123", "opt_321"]
26
+ * add: ["opt_123", "opt_321"]
26
27
  * })
27
28
  */
28
29
  export declare const linkProductOptionsToProductStep: import("@medusajs/framework/workflows-sdk").StepFunction<LinkProductOptionsToProductStepInput, undefined>;
@@ -1 +1 @@
1
- {"version":3,"file":"link-product-options-to-product.d.ts","sourceRoot":"","sources":["../../../src/product/steps/link-product-options-to-product.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,MAAM,MAAM,oCAAoC,GAAG;IACjD;;OAEG;IACH,UAAU,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,EAAE,CAAA;IACd;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;CAClB,CAAA;AAED,eAAO,MAAM,iCAAiC,oCACX,CAAA;AACnC;;;;;;;;GAQG;AACH,eAAO,MAAM,+BAA+B,2GA2C3C,CAAA"}
1
+ {"version":3,"file":"link-product-options-to-product.d.ts","sourceRoot":"","sources":["../../../src/product/steps/link-product-options-to-product.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAI/E;;GAEG;AACH,MAAM,MAAM,oCAAoC,GAAG;IACjD;;OAEG;IACH,UAAU,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,GAAG,CAAC,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC,wBAAwB,EAAE,YAAY,CAAC,CAAC,EAAE,CAAA;IAC5E;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;CAClB,CAAA;AAED,eAAO,MAAM,iCAAiC,oCACX,CAAA;AACnC;;;;;;;;GAQG;AACH,eAAO,MAAM,+BAA+B,2GAkD3C,CAAA"}
@@ -10,15 +10,22 @@ exports.linkProductOptionsToProductStepId = "link-product-options-to-product";
10
10
  * @example
11
11
  * const data = linkProductOptionsToProductStep({
12
12
  * product_id: "prod_123",
13
- * product_option_ids: ["opt_123", "opt_321"]
13
+ * add: ["opt_123", "opt_321"]
14
14
  * })
15
15
  */
16
16
  exports.linkProductOptionsToProductStep = (0, workflows_sdk_1.createStep)(exports.linkProductOptionsToProductStepId, async (input, { container }) => {
17
17
  const service = container.resolve(utils_1.Modules.PRODUCT);
18
- const toAdd = (input.add ?? []).map((optionId) => {
18
+ const toAdd = (input.add ?? []).map((option) => {
19
+ if (typeof option === "string") {
20
+ return {
21
+ product_option_id: option,
22
+ product_id: input.product_id,
23
+ };
24
+ }
19
25
  return {
20
- product_option_id: optionId,
26
+ product_option_id: option.product_option_id,
21
27
  product_id: input.product_id,
28
+ product_option_value_ids: option.product_option_value_ids,
22
29
  };
23
30
  });
24
31
  const toRemove = (input.remove ?? []).map((optionId) => {
@@ -1 +1 @@
1
- {"version":3,"file":"link-product-options-to-product.js","sourceRoot":"","sources":["../../../src/product/steps/link-product-options-to-product.ts"],"names":[],"mappings":";;;AACA,qDAA+D;AAC/D,qEAA4E;AAoB/D,QAAA,iCAAiC,GAC5C,iCAAiC,CAAA;AACnC;;;;;;;;GAQG;AACU,QAAA,+BAA+B,GAAG,IAAA,0BAAU,EACvD,yCAAiC,EACjC,KAAK,EAAE,KAA2C,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;IACnE,MAAM,OAAO,GAAG,SAAS,CAAC,OAAO,CAAwB,eAAO,CAAC,OAAO,CAAC,CAAA;IAEzE,MAAM,KAAK,GAAG,CAAC,KAAK,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE;QAC/C,OAAO;YACL,iBAAiB,EAAE,QAAQ;YAC3B,UAAU,EAAE,KAAK,CAAC,UAAU;SAC7B,CAAA;IACH,CAAC,CAAC,CAAA;IAEF,MAAM,QAAQ,GAAG,CAAC,KAAK,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE;QACrD,OAAO;YACL,iBAAiB,EAAE,QAAQ;YAC3B,UAAU,EAAE,KAAK,CAAC,UAAU;SAC7B,CAAA;IACH,CAAC,CAAC,CAAA;IAEF,MAAM,QAAQ,GAAmB,EAAE,CAAA;IACnC,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;QACjB,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,yBAAyB,CAAC,KAAK,CAAC,CAAC,CAAA;IACzD,CAAC;IACD,IAAI,QAAQ,CAAC,MAAM,EAAE,CAAC;QACpB,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,8BAA8B,CAAC,QAAQ,CAAC,CAAC,CAAA;IACjE,CAAC;IACD,MAAM,IAAA,kBAAU,EAAC,QAAQ,CAAC,CAAA;IAE1B,OAAO,IAAI,4BAAY,CAAC,KAAK,CAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAA;AACtD,CAAC,EACD,KAAK,EAAE,QAAQ,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;IAChC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,OAAM;IACR,CAAC;IACD,MAAM,OAAO,GAAG,SAAS,CAAC,OAAO,CAAwB,eAAO,CAAC,OAAO,CAAC,CAAA;IAEzE,IAAI,QAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;QAC1B,MAAM,OAAO,CAAC,8BAA8B,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;IAC9D,CAAC;IACD,IAAI,QAAQ,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;QAC7B,MAAM,OAAO,CAAC,yBAAyB,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;IAC5D,CAAC;AACH,CAAC,CACF,CAAA"}
1
+ {"version":3,"file":"link-product-options-to-product.js","sourceRoot":"","sources":["../../../src/product/steps/link-product-options-to-product.ts"],"names":[],"mappings":";;;AACA,qDAA+D;AAC/D,qEAA4E;AAoB/D,QAAA,iCAAiC,GAC5C,iCAAiC,CAAA;AACnC;;;;;;;;GAQG;AACU,QAAA,+BAA+B,GAAG,IAAA,0BAAU,EACvD,yCAAiC,EACjC,KAAK,EAAE,KAA2C,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;IACnE,MAAM,OAAO,GAAG,SAAS,CAAC,OAAO,CAAwB,eAAO,CAAC,OAAO,CAAC,CAAA;IAEzE,MAAM,KAAK,GAAG,CAAC,KAAK,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;QAC7C,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;YAC/B,OAAO;gBACL,iBAAiB,EAAE,MAAM;gBACzB,UAAU,EAAE,KAAK,CAAC,UAAU;aAC7B,CAAA;QACH,CAAC;QACD,OAAO;YACL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C;QAC7B,MAAM,OAAO,CAAC,yBAAyB,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;IAC5D,CAAC;AACH,CAAC,CACF,CAAA"}
@@ -2,7 +2,7 @@ import type { ProductTypes, UpdateProductWorkflowInputDTO } from "@medusajs/fram
2
2
  export declare const processProductOptionsForImportStepId = "process-product-options-for-import";
3
3
  export type ProcessProductOptionsForImportInput = {
4
4
  products: (Omit<UpdateProductWorkflowInputDTO, "option_ids"> & {
5
- options: ProductTypes.CreateProductOptionDTO[];
5
+ options?: ProductTypes.CreateProductOptionDTO[];
6
6
  })[];
7
7
  };
8
8
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"process-product-options-for-import.d.ts","sourceRoot":"","sources":["../../../src/product/steps/process-product-options-for-import.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,YAAY,EACZ,6BAA6B,EAC9B,MAAM,2BAA2B,CAAA;AAKlC,eAAO,MAAM,oCAAoC,uCACX,CAAA;AAEtC,MAAM,MAAM,mCAAmC,GAAG;IAChD,QAAQ,EAAE,CAAC,IAAI,CAAC,6BAA6B,EAAE,YAAY,CAAC,GAAG;QAC7D,OAAO,EAAE,YAAY,CAAC,sBAAsB,EAAE,CAAA;KAC/C,CAAC,EAAE,CAAA;CACL,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,kCAAkC,gIAkD9C,CAAA"}
1
+ {"version":3,"file":"process-product-options-for-import.d.ts","sourceRoot":"","sources":["../../../src/product/steps/process-product-options-for-import.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,YAAY,EACZ,6BAA6B,EAC9B,MAAM,2BAA2B,CAAA;AAKlC,eAAO,MAAM,oCAAoC,uCACX,CAAA;AAEtC,MAAM,MAAM,mCAAmC,GAAG;IAChD,QAAQ,EAAE,CAAC,IAAI,CAAC,6BAA6B,EAAE,YAAY,CAAC,GAAG;QAC7D,OAAO,CAAC,EAAE,YAAY,CAAC,sBAAsB,EAAE,CAAA;KAChD,CAAC,EAAE,CAAA;CACL,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,kCAAkC,gIAyE9C,CAAA"}
@@ -13,26 +13,43 @@ exports.processProductOptionsForImportStepId = "process-product-options-for-impo
13
13
  */
14
14
  exports.processProductOptionsForImportStep = (0, workflows_sdk_1.createStep)(exports.processProductOptionsForImportStepId, async (data, { container }) => {
15
15
  const productService = container.resolve(utils_1.Modules.PRODUCT);
16
- const createdOptionIds = [];
17
16
  const processedProducts = [];
18
- for (const product of data.products) {
19
- if (product.options?.length) {
20
- const createdOptions = await productService.createProductOptions(product.options);
21
- createdOptionIds.push(...createdOptions.map((opt) => opt.id));
22
- const optionTitleToIdMap = new Map();
23
- createdOptions.forEach((option) => {
24
- optionTitleToIdMap.set(option.title, option.id);
25
- });
17
+ const allOptions = [];
18
+ const productIndices = []; // Maps option index to product index
19
+ data.products.forEach((product, index) => {
20
+ (product.options ?? []).forEach((option) => {
21
+ allOptions.push(option);
22
+ productIndices.push(index);
23
+ });
24
+ });
25
+ const createdOptions = allOptions.length > 0
26
+ ? await productService.createProductOptions(allOptions.map(option => ({
27
+ ...option,
28
+ is_exclusive: true // Until we change the CSV logic to pass option id in there, we have to default to exclusive
29
+ })))
30
+ : [];
31
+ const createdOptionIds = createdOptions.map((opt) => opt.id);
32
+ const productOptionsMap = new Map();
33
+ createdOptions.forEach((option, index) => {
34
+ const productIndex = productIndices[index];
35
+ if (!productOptionsMap.has(productIndex)) {
36
+ productOptionsMap.set(productIndex, []);
37
+ }
38
+ productOptionsMap.get(productIndex).push(option);
39
+ });
40
+ data.products.forEach((product, index) => {
41
+ const createdOptionsForProduct = productOptionsMap.get(index);
42
+ if (createdOptionsForProduct && createdOptionsForProduct.length) {
26
43
  // Transform product to use option_ids instead of options
27
44
  const transformedProduct = (0, utils_2.deepCopy)(product);
28
45
  delete transformedProduct.options;
29
- transformedProduct.option_ids = createdOptions.map((opt) => opt.id);
46
+ transformedProduct.option_ids = createdOptionsForProduct.map((opt) => opt.id);
30
47
  processedProducts.push(transformedProduct);
31
48
  }
32
49
  else {
33
50
  processedProducts.push(product);
34
51
  }
35
- }
52
+ });
36
53
  return new workflows_sdk_1.StepResponse(processedProducts, createdOptionIds);
37
54
  }, async (createdOptionIds, { container }) => {
38
55
  if (!createdOptionIds || createdOptionIds.length === 0) {
@@ -1 +1 @@
1
- {"version":3,"file":"process-product-options-for-import.js","sourceRoot":"","sources":["../../../src/product/steps/process-product-options-for-import.ts"],"names":[],"mappings":";;;AAKA,qDAAmD;AACnD,qEAA4E;AAC5E,2CAA0C;AAE7B,QAAA,oCAAoC,GAC/C,oCAAoC,CAAA;AAQtC;;;;;GAKG;AACU,QAAA,kCAAkC,GAAG,IAAA,0BAAU,EAC1D,4CAAoC,EACpC,KAAK,EACH,IAAyC,EACzC,EAAE,SAAS,EAAE,EACqD,EAAE;IACpE,MAAM,cAAc,GAAG,SAAS,CAAC,OAAO,CACtC,eAAO,CAAC,OAAO,CAChB,CAAA;IAED,MAAM,gBAAgB,GAAa,EAAE,CAAA;IACrC,MAAM,iBAAiB,GAAoC,EAAE,CAAA;IAE7D,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;QACpC,IAAI,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC;YAC5B,MAAM,cAAc,GAAG,MAAM,cAAc,CAAC,oBAAoB,CAC9D,OAAO,CAAC,OAAO,CAChB,CAAA;YAED,gBAAgB,CAAC,IAAI,CAAC,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAA;YAE7D,MAAM,kBAAkB,GAAG,IAAI,GAAG,EAAkB,CAAA;YACpD,cAAc,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;gBAChC,kBAAkB,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE,CAAC,CAAA;YACjD,CAAC,CAAC,CAAA;YAEF,yDAAyD;YACzD,MAAM,kBAAkB,GAAQ,IAAA,gBAAQ,EAAC,OAAO,CAAC,CAAA;YACjD,OAAO,kBAAkB,CAAC,OAAO,CAAA;YACjC,kBAAkB,CAAC,UAAU,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;YAEnE,iBAAiB,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAA;QAC5C,CAAC;aAAM,CAAC;YACN,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QACjC,CAAC;IACH,CAAC;IAED,OAAO,IAAI,4BAAY,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,CAAA;AAC9D,CAAC,EACD,KAAK,EAAE,gBAAgB,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;IACxC,IAAI,CAAC,gBAAgB,IAAI,gBAAgB,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvD,OAAM;IACR,CAAC;IAED,MAAM,cAAc,GAAG,SAAS,CAAC,OAAO,CACtC,eAAO,CAAC,OAAO,CAChB,CAAA;IAED,MAAM,cAAc,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,CAAA;AAC7D,CAAC,CACF,CAAA"}
1
+ {"version":3,"file":"process-product-options-for-import.js","sourceRoot":"","sources":["../../../src/product/steps/process-product-options-for-import.ts"],"names":[],"mappings":";;;AAKA,qDAAmD;AACnD,qEAA4E;AAC5E,2CAA0C;AAE7B,QAAA,oCAAoC,GAC/C,oCAAoC,CAAA;AAQtC;;;;;GAKG;AACU,QAAA,kCAAkC,GAAG,IAAA,0BAAU,EAC1D,4CAAoC,EACpC,KAAK,EACH,IAAyC,EACzC,EAAE,SAAS,EAAE,EACqD,EAAE;IACpE,MAAM,cAAc,GAAG,SAAS,CAAC,OAAO,CACtC,eAAO,CAAC,OAAO,CAChB,CAAA;IAED,MAAM,iBAAiB,GAAoC,EAAE,CAAA;IAE7D,MAAM,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C,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE;QACvC,MAAM,wBAAwB,GAAG,iBAAiB,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;QAE7D,IAAI,wBAAwB,IAAI,wBAAwB,CAAC,MAAM,EAAE,CAAC;YAChE,yDAAyD;YACzD,MAAM,kBAAkB,GAAQ,IAAA,gBAAQ,EAAC,OAAO,CAAC,CAAA;YACjD,OAAO,kBAAkB,CAAC,OAAO,CAAA;YACjC,kBAAkB,CAAC,UAAU,GAAG,wBAAwB,CAAC,GAAG,CAC1D,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,CAChB,CAAA;YAED,iBAAiB,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAA;QAC5C,CAAC;aAAM,CAAC;YACN,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QACjC,CAAC;IACH,CAAC,CAAC,CAAA;IAEF,OAAO,IAAI,4BAAY,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,CAAA;AAC9D,CAAC,EACD,KAAK,EAAE,gBAAgB,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;IACxC,IAAI,CAAC,gBAAgB,IAAI,gBAAgB,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvD,OAAM;IACR,CAAC;IAED,MAAM,cAAc,GAAG,SAAS,CAAC,OAAO,CACtC,eAAO,CAAC,OAAO,CAChB,CAAA;IAED,MAAM,cAAc,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,CAAA;AAC7D,CAAC,CACF,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"update-product-options.d.ts","sourceRoot":"","sources":["../../../src/product/steps/update-product-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,YAAY,EACb,MAAM,2BAA2B,CAAA;AAOlC;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG;IAC1C;;OAEG;IACH,QAAQ,EAAE,YAAY,CAAC,4BAA4B,CAAA;IACnD;;OAEG;IACH,MAAM,EAAE,YAAY,CAAC,sBAAsB,CAAA;CAC5C,CAAA;AAED,eAAO,MAAM,0BAA0B,2BAA2B,CAAA;AAClE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,wBAAwB,0HAiCpC,CAAA"}
1
+ {"version":3,"file":"update-product-options.d.ts","sourceRoot":"","sources":["../../../src/product/steps/update-product-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,YAAY,EACb,MAAM,2BAA2B,CAAA;AAQlC;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG;IAC1C;;OAEG;IACH,QAAQ,EAAE,YAAY,CAAC,4BAA4B,CAAA;IACnD;;OAEG;IACH,MAAM,EAAE,YAAY,CAAC,sBAAsB,CAAA;CAC5C,CAAA;AAED,eAAO,MAAM,0BAA0B,2BAA2B,CAAA;AAClE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,wBAAwB,0HAwCpC,CAAA"}
@@ -25,6 +25,9 @@ exports.updateProductOptionsStep = (0, workflows_sdk_1.createStep)(exports.updat
25
25
  select: selects,
26
26
  relations: ["values"],
27
27
  });
28
+ if (!prevData.length) {
29
+ throw new utils_1.MedusaError(utils_1.MedusaError.Types.NOT_FOUND, `Product option with id "${data.selector.id}" not found`);
30
+ }
28
31
  const productOptions = await service.updateProductOptions(data.selector, data.update);
29
32
  return new workflows_sdk_1.StepResponse(productOptions, prevData);
30
33
  }, async (prevData, { container }) => {
@@ -1 +1 @@
1
- {"version":3,"file":"update-product-options.js","sourceRoot":"","sources":["../../../src/product/steps/update-product-options.ts"],"names":[],"mappings":";;;AAIA,qDAGkC;AAClC,qEAA4E;AAgB/D,QAAA,0BAA0B,GAAG,wBAAwB,CAAA;AAClE;;;;;;;;;;;;GAYG;AACU,QAAA,wBAAwB,GAAG,IAAA,0BAAU,EAChD,kCAA0B,EAC1B,KAAK,EAAE,IAAmC,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;IAC3D,MAAM,OAAO,GAAG,SAAS,CAAC,OAAO,CAAwB,eAAO,CAAC,OAAO,CAAC,CAAA;IAEzE,MAAM,EAAE,KAAK,EAAE,GAAG,aAAa,EAAE,GAAG,IAAI,CAAC,MAAM,CAAA;IAC/C,MAAM,EAAE,OAAO,EAAE,GAAG,IAAA,6CAAqC,EAAC,CAAC,aAAa,CAAC,CAAC,CAAA;IAE1E,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,kBAAkB,CAAC,IAAI,CAAC,QAAQ,EAAE;QAC/D,MAAM,EAAE,OAAO;QACf,SAAS,EAAE,CAAC,QAAQ,CAAC;KACtB,CAAC,CAAA;IAEF,MAAM,cAAc,GAAG,MAAM,OAAO,CAAC,oBAAoB,CACvD,IAAI,CAAC,QAAQ,EACb,IAAI,CAAC,MAAM,CACZ,CAAA;IACD,OAAO,IAAI,4BAAY,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAA;AACnD,CAAC,EACD,KAAK,EAAE,QAAQ,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;IAChC,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;QACtB,OAAM;IACR,CAAC;IAED,MAAM,OAAO,GAAG,SAAS,CAAC,OAAO,CAAwB,eAAO,CAAC,OAAO,CAAC,CAAA;IAEzE,MAAM,OAAO,CAAC,oBAAoB,CAChC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACnB,GAAG,CAAC;QACJ,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;KACtC,CAAC,CAAC,CACJ,CAAA;AACH,CAAC,CACF,CAAA"}
1
+ {"version":3,"file":"update-product-options.js","sourceRoot":"","sources":["../../../src/product/steps/update-product-options.ts"],"names":[],"mappings":";;;AAIA,qDAIkC;AAClC,qEAA4E;AAgB/D,QAAA,0BAA0B,GAAG,wBAAwB,CAAA;AAClE;;;;;;;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,CAAC;QACJ,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;KACtC,CAAC,CAAC,CACJ,CAAA;AACH,CAAC,CACF,CAAA"}
@@ -10,13 +10,16 @@ export type LinkProductOptionsToProductWorkflowInput = {
10
10
  /**
11
11
  * The product options to add to the product.
12
12
  */
13
- add?: (string | ProductTypes.CreateProductOptionDTO)[];
13
+ add?: (string | {
14
+ id: string;
15
+ value_ids: string[];
16
+ } | ProductTypes.CreateProductOptionDTO)[];
14
17
  /**
15
18
  * The product options to remove from the product.
16
19
  */
17
20
  remove?: string[];
18
21
  };
19
- export declare const linkProductOptionsToProductWorkflowId = "link-product-options-to-product";
22
+ export declare const createAndLinkProductOptionsToProductWorkflowId = "create-and-link-product-options-to-product";
20
23
  /**
21
24
  * This workflow adds/removes one or more product options to/from a product. It's used by the [TODO](TODO).
22
25
  * This workflow also creates non-existing product options before adding them to the product.
@@ -24,7 +27,7 @@ export declare const linkProductOptionsToProductWorkflowId = "link-product-optio
24
27
  * You can also use this workflow within your customizations or your own custom workflows, allowing you to wrap custom logic around product-option and product association.
25
28
  *
26
29
  * @example
27
- * const { result } = await linkProductOptionsToProductWorkflow(container)
30
+ * const { result } = await createAndLinkProductOptionsToProductWorkflow(container)
28
31
  * .run({
29
32
  * input: {
30
33
  * product_id: "prod_123"
@@ -43,5 +46,5 @@ export declare const linkProductOptionsToProductWorkflowId = "link-product-optio
43
46
  *
44
47
  * Add/remove one or more product options to/from a product.
45
48
  */
46
- export declare const linkProductOptionsToProductWorkflow: import("@medusajs/framework/workflows-sdk").ReturnWorkflow<LinkProductOptionsToProductWorkflowInput, never, []>;
47
- //# sourceMappingURL=link-product-options-to-product.d.ts.map
49
+ export declare const createAndLinkProductOptionsToProductWorkflow: import("@medusajs/framework/workflows-sdk").ReturnWorkflow<LinkProductOptionsToProductWorkflowInput, never, []>;
50
+ //# sourceMappingURL=create-and-link-product-options-to-product.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-and-link-product-options-to-product.d.ts","sourceRoot":"","sources":["../../../src/product/workflows/create-and-link-product-options-to-product.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAc7D;;GAEG;AACH,MAAM,MAAM,wCAAwC,GAAG;IACrD;;OAEG;IACH,UAAU,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,GAAG,CAAC,EAAE,CACF,MAAM,GACN;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,EAAE,CAAA;KAAE,GACnC,YAAY,CAAC,sBAAsB,CACtC,EAAE,CAAA;IACH;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;CAClB,CAAA;AAED,eAAO,MAAM,8CAA8C,+CACb,CAAA;AAC9C;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,4CAA4C,iHA+ExD,CAAA"}
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createAndLinkProductOptionsToProductWorkflow = exports.createAndLinkProductOptionsToProductWorkflowId = void 0;
4
+ const workflows_sdk_1 = require("@medusajs/framework/workflows-sdk");
5
+ const steps_1 = require("../steps");
6
+ const utils_1 = require("@medusajs/framework/utils");
7
+ exports.createAndLinkProductOptionsToProductWorkflowId = "create-and-link-product-options-to-product";
8
+ /**
9
+ * This workflow adds/removes one or more product options to/from a product. It's used by the [TODO](TODO).
10
+ * This workflow also creates non-existing product options before adding them to the product.
11
+ *
12
+ * You can also use this workflow within your customizations or your own custom workflows, allowing you to wrap custom logic around product-option and product association.
13
+ *
14
+ * @example
15
+ * const { result } = await createAndLinkProductOptionsToProductWorkflow(container)
16
+ * .run({
17
+ * input: {
18
+ * product_id: "prod_123"
19
+ * add: [
20
+ * {
21
+ * title: "Size",
22
+ * values: ["S", "M", "L", "XL"]
23
+ * },
24
+ * { id: "opt_123" }
25
+ * ],
26
+ * remove: ["opt_321"]
27
+ * }
28
+ * })
29
+ *
30
+ * @summary
31
+ *
32
+ * Add/remove one or more product options to/from a product.
33
+ */
34
+ exports.createAndLinkProductOptionsToProductWorkflow = (0, workflows_sdk_1.createWorkflow)(exports.createAndLinkProductOptionsToProductWorkflowId, (input) => {
35
+ const { toCreate, toAdd, toAddWithValues } = (0, workflows_sdk_1.transform)({ input }, ({ input }) => {
36
+ const toCreate = [];
37
+ const toAdd = [];
38
+ const toAddWithValues = [];
39
+ for (const option of input.add ?? []) {
40
+ if ((0, utils_1.isString)(option)) {
41
+ toAdd.push(option);
42
+ }
43
+ else if ("id" in option && "value_ids" in option) {
44
+ toAddWithValues.push({
45
+ option_id: option.id,
46
+ value_ids: option.value_ids,
47
+ });
48
+ }
49
+ else {
50
+ toCreate.push(option);
51
+ }
52
+ }
53
+ return { toCreate, toAdd, toAddWithValues };
54
+ });
55
+ const createdIds = (0, workflows_sdk_1.when)("creating-product-options", { toCreate }, ({ toCreate }) => toCreate.length > 0).then(() => {
56
+ const createdOptions = (0, steps_1.createProductOptionsStep)(toCreate);
57
+ return (0, workflows_sdk_1.transform)({ createdOptions }, ({ createdOptions }) => createdOptions.map((option) => option.id));
58
+ });
59
+ const toAddOptions = (0, workflows_sdk_1.transform)({ toAdd, toAddWithValues, createdIds }, ({ toAdd, toAddWithValues, createdIds }) => {
60
+ const options = [];
61
+ // Add simple option IDs (no value filtering)
62
+ for (const optionId of toAdd) {
63
+ options.push(optionId);
64
+ }
65
+ // Add options with specific values
66
+ for (const { option_id, value_ids } of toAddWithValues) {
67
+ options.push({
68
+ product_option_id: option_id,
69
+ product_option_value_ids: value_ids,
70
+ });
71
+ }
72
+ // Add created options (no value filtering)
73
+ for (const optionId of createdIds ?? []) {
74
+ options.push(optionId);
75
+ }
76
+ return options;
77
+ });
78
+ const productOptions = (0, steps_1.linkProductOptionsToProductStep)({
79
+ product_id: input.product_id,
80
+ add: toAddOptions,
81
+ remove: input.remove,
82
+ });
83
+ return new workflows_sdk_1.WorkflowResponse(productOptions);
84
+ });
85
+ //# sourceMappingURL=create-and-link-product-options-to-product.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-and-link-product-options-to-product.js","sourceRoot":"","sources":["../../../src/product/workflows/create-and-link-product-options-to-product.ts"],"names":[],"mappings":";;;AACA,qEAM0C;AAC1C,oCAGiB;AACjB,qDAAoD;AAwBvC,QAAA,8CAA8C,GACzD,4CAA4C,CAAA;AAC9C;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACU,QAAA,4CAA4C,GAAG,IAAA,8BAAc,EACxE,sDAA8C,EAC9C,CAAC,KAA6D,EAAE,EAAE;IAChE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,eAAe,EAAE,GAAG,IAAA,yBAAS,EACpD,EAAE,KAAK,EAAE,EACT,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;QACZ,MAAM,QAAQ,GAA0C,EAAE,CAAA;QAC1D,MAAM,KAAK,GAAa,EAAE,CAAA;QAC1B,MAAM,eAAe,GAGhB,EAAE,CAAA;QAEP,KAAK,MAAM,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,EAAE,EAAE,CAAC;YACrC,IAAI,IAAA,gBAAQ,EAAC,MAAM,CAAC,EAAE,CAAC;gBACrB,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;YACpB,CAAC;iBAAM,IAAI,IAAI,IAAI,MAAM,IAAI,WAAW,IAAI,MAAM,EAAE,CAAC;gBACnD,eAAe,CAAC,IAAI,CAAC;oBACnB,SAAS,EAAE,MAAM,CAAC,EAAE;oBACpB,SAAS,EAAE,MAAM,CAAC,SAAS;iBAC5B,CAAC,CAAA;YACJ,CAAC;iBAAM,CAAC;gBACN,QAAQ,CAAC,IAAI,CAAC,MAA6C,CAAC,CAAA;YAC9D,CAAC;QACH,CAAC;QAED,OAAO,EAAE,QAAQ,EAAE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M,cAAc,GAAG,IAAA,uCAA+B,EAAC;QACrD,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,GAAG,EAAE,YAAY;QACjB,MAAM,EAAE,KAAK,CAAC,MAAM;KACrB,CAAC,CAAA;IAEF,OAAO,IAAI,gCAAgB,CAAC,cAAc,CAAC,CAAA;AAC7C,CAAC,CACF,CAAA"}
@@ -16,7 +16,7 @@ export * from "./delete-product-types";
16
16
  export * from "./delete-product-tags";
17
17
  export * from "./delete-product-variants";
18
18
  export * from "./delete-products";
19
- export * from "./link-product-options-to-product";
19
+ export * from "./create-and-link-product-options-to-product";
20
20
  export * from "./update-collections";
21
21
  export * from "./update-product-options";
22
22
  export * from "./update-product-types";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/product/workflows/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAA;AACtC,cAAc,wBAAwB,CAAA;AACtC,cAAc,kCAAkC,CAAA;AAChD,cAAc,0BAA0B,CAAA;AACxC,cAAc,kBAAkB,CAAA;AAChC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,sBAAsB,CAAA;AACpC,cAAc,0BAA0B,CAAA;AACxC,cAAc,wBAAwB,CAAA;AACtC,cAAc,uBAAuB,CAAA;AACrC,cAAc,2BAA2B,CAAA;AACzC,cAAc,mBAAmB,CAAA;AACjC,cAAc,sBAAsB,CAAA;AACpC,cAAc,0BAA0B,CAAA;AACxC,cAAc,wBAAwB,CAAA;AACtC,cAAc,uBAAuB,CAAA;AACrC,cAAc,2BAA2B,CAAA;AACzC,cAAc,mBAAmB,CAAA;AACjC,cAAc,mCAAmC,CAAA;AACjD,cAAc,sBAAsB,CAAA;AACpC,cAAc,0BAA0B,CAAA;AACxC,cAAc,wBAAwB,CAAA;AACtC,cAAc,uBAAuB,CAAA;AACrC,cAAc,2BAA2B,CAAA;AACzC,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA;AACjC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,yBAAyB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/product/workflows/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAA;AACtC,cAAc,wBAAwB,CAAA;AACtC,cAAc,kCAAkC,CAAA;AAChD,cAAc,0BAA0B,CAAA;AACxC,cAAc,kBAAkB,CAAA;AAChC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,sBAAsB,CAAA;AACpC,cAAc,0BAA0B,CAAA;AACxC,cAAc,wBAAwB,CAAA;AACtC,cAAc,uBAAuB,CAAA;AACrC,cAAc,2BAA2B,CAAA;AACzC,cAAc,mBAAmB,CAAA;AACjC,cAAc,sBAAsB,CAAA;AACpC,cAAc,0BAA0B,CAAA;AACxC,cAAc,wBAAwB,CAAA;AACtC,cAAc,uBAAuB,CAAA;AACrC,cAAc,2BAA2B,CAAA;AACzC,cAAc,mBAAmB,CAAA;AACjC,cAAc,8CAA8C,CAAA;AAC5D,cAAc,sBAAsB,CAAA;AACpC,cAAc,0BAA0B,CAAA;AACxC,cAAc,wBAAwB,CAAA;AACtC,cAAc,uBAAuB,CAAA;AACrC,cAAc,2BAA2B,CAAA;AACzC,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA;AACjC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,yBAAyB,CAAA"}
@@ -32,7 +32,7 @@ __exportStar(require("./delete-product-types"), exports);
32
32
  __exportStar(require("./delete-product-tags"), exports);
33
33
  __exportStar(require("./delete-product-variants"), exports);
34
34
  __exportStar(require("./delete-products"), exports);
35
- __exportStar(require("./link-product-options-to-product"), exports);
35
+ __exportStar(require("./create-and-link-product-options-to-product"), exports);
36
36
  __exportStar(require("./update-collections"), exports);
37
37
  __exportStar(require("./update-product-options"), exports);
38
38
  __exportStar(require("./update-product-types"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/product/workflows/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAsC;AACtC,yDAAsC;AACtC,mEAAgD;AAChD,2DAAwC;AACxC,mDAAgC;AAChC,+DAA4C;AAC5C,uDAAoC;AACpC,2DAAwC;AACxC,yDAAsC;AACtC,wDAAqC;AACrC,4DAAyC;AACzC,oDAAiC;AACjC,uDAAoC;AACpC,2DAAwC;AACxC,yDAAsC;AACtC,wDAAqC;AACrC,4DAAyC;AACzC,oDAAiC;AACjC,oEAAiD;AACjD,uDAAoC;AACpC,2DAAwC;AACxC,yDAAsC;AACtC,wDAAqC;AACrC,4DAAyC;AACzC,oDAAiC;AACjC,oDAAiC;AACjC,oDAAiC;AACjC,8DAA2C;AAC3C,0DAAuC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/product/workflows/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAsC;AACtC,yDAAsC;AACtC,mEAAgD;AAChD,2DAAwC;AACxC,mDAAgC;AAChC,+DAA4C;AAC5C,uDAAoC;AACpC,2DAAwC;AACxC,yDAAsC;AACtC,wDAAqC;AACrC,4DAAyC;AACzC,oDAAiC;AACjC,uDAAoC;AACpC,2DAAwC;AACxC,yDAAsC;AACtC,wDAAqC;AACrC,4DAAyC;AACzC,oDAAiC;AACjC,+EAA4D;AAC5D,uDAAoC;AACpC,2DAAwC;AACxC,yDAAsC;AACtC,wDAAqC;AACrC,4DAAyC;AACzC,oDAAiC;AACjC,oDAAiC;AACjC,oDAAiC;AACjC,8DAA2C;AAC3C,0DAAuC"}
@@ -1 +1 @@
1
- {"root":["../src/index.ts","../src/api-key/index.ts","../src/api-key/steps/create-api-keys.ts","../src/api-key/steps/delete-api-keys.ts","../src/api-key/steps/index.ts","../src/api-key/steps/link-sales-channels-to-publishable-key.ts","../src/api-key/steps/revoke-api-keys.ts","../src/api-key/steps/update-api-keys.ts","../src/api-key/steps/validate-sales-channel-exists.ts","../src/api-key/workflows/create-api-keys.ts","../src/api-key/workflows/delete-api-keys.ts","../src/api-key/workflows/index.ts","../src/api-key/workflows/link-sales-channels-to-publishable-key.ts","../src/api-key/workflows/revoke-api-keys.ts","../src/api-key/workflows/update-api-keys.ts","../src/auth/index.ts","../src/auth/steps/index.ts","../src/auth/steps/set-auth-app-metadata.ts","../src/auth/workflows/generate-reset-password-token.ts","../src/auth/workflows/index.ts","../src/cart/index.ts","../src/cart/steps/add-shipping-method-to-cart.ts","../src/cart/steps/compensate-payment-if-needed.ts","../src/cart/steps/confirm-inventory.ts","../src/cart/steps/create-carts.ts","../src/cart/steps/create-line-item-adjustments.ts","../src/cart/steps/create-line-items.ts","../src/cart/steps/create-payment-collection.ts","../src/cart/steps/create-shipping-method-adjustments.ts","../src/cart/steps/find-one-or-any-region.ts","../src/cart/steps/find-or-create-customer.ts","../src/cart/steps/find-sales-channel.ts","../src/cart/steps/get-actions-to-compute-from-promotions.ts","../src/cart/steps/get-line-item-actions.ts","../src/cart/steps/get-promotion-codes-to-apply.ts","../src/cart/steps/get-variant-price-sets.ts","../src/cart/steps/get-variants.ts","../src/cart/steps/index.ts","../src/cart/steps/prepare-adjustments-from-promotion-actions.ts","../src/cart/steps/remove-line-item-adjustments.ts","../src/cart/steps/remove-shipping-method-adjustments.ts","../src/cart/steps/remove-shipping-method-from-cart.ts","../src/cart/steps/reserve-inventory.ts","../src/cart/steps/retrieve-cart.ts","../src/cart/steps/set-tax-lines-for-items.ts","../src/cart/steps/update-cart-promotions.ts","../src/cart/steps/update-carts.ts","../src/cart/steps/update-line-items.ts","../src/cart/steps/update-shipping-methods.ts","../src/cart/steps/upsert-tax-lines-for-items.ts","../src/cart/steps/validate-cart-payments.ts","../src/cart/steps/validate-cart-shipping-options.ts","../src/cart/steps/validate-cart.ts","../src/cart/steps/validate-line-item-prices.ts","../src/cart/steps/validate-sales-channel.ts","../src/cart/steps/validate-shipping-methods-data.ts","../src/cart/steps/validate-shipping-options-price.ts","../src/cart/steps/validate-shipping.ts","../src/cart/steps/validate-variant-prices.ts","../src/cart/utils/fields.ts","../src/cart/utils/prepare-confirm-inventory-input.ts","../src/cart/utils/prepare-line-item-data.ts","../src/cart/utils/schemas.ts","../src/cart/utils/__tests__/prepare-confirm-inventory-input.spec.ts","../src/cart/workflows/add-shipping-method-to-cart.ts","../src/cart/workflows/add-to-cart.ts","../src/cart/workflows/complete-cart.ts","../src/cart/workflows/confirm-variant-inventory.ts","../src/cart/workflows/create-cart-credit-lines.ts","../src/cart/workflows/create-carts.ts","../src/cart/workflows/create-payment-collection-for-cart.ts","../src/cart/workflows/delete-cart-credit-lines.ts","../src/cart/workflows/get-variants-and-items-with-prices.ts","../src/cart/workflows/index.ts","../src/cart/workflows/list-shipping-options-for-cart-with-pricing.ts","../src/cart/workflows/list-shipping-options-for-cart.ts","../src/cart/workflows/refresh-cart-items.ts","../src/cart/workflows/refresh-cart-shipping-methods.ts","../src/cart/workflows/refresh-payment-collection.ts","../src/cart/workflows/refund-payment-recreate-payment-session.ts","../src/cart/workflows/transfer-cart-customer.ts","../src/cart/workflows/update-cart-promotions.ts","../src/cart/workflows/update-cart.ts","../src/cart/workflows/update-line-item-in-cart.ts","../src/cart/workflows/update-tax-lines.ts","../src/cart/workflows/upsert-tax-lines.ts","../src/common/index.ts","../src/common/steps/create-entities.ts","../src/common/steps/create-remote-links.ts","../src/common/steps/delete-entities.ts","../src/common/steps/dismiss-remote-links.ts","../src/common/steps/emit-event.ts","../src/common/steps/release-event.ts","../src/common/steps/remove-remote-links.ts","../src/common/steps/update-remote-links.ts","../src/common/steps/use-query-graph.ts","../src/common/steps/use-remote-query.ts","../src/common/steps/validate-presence-of.ts","../src/common/steps/__fixtures__/remote-query.ts","../src/common/steps/__tests__/use-query-graph-step.spec.ts","../src/common/workflows/batch-links.ts","../src/common/workflows/create-links.ts","../src/common/workflows/dismiss-links.ts","../src/common/workflows/update-links.ts","../src/customer/index.ts","../src/customer/steps/create-addresses.ts","../src/customer/steps/create-customers.ts","../src/customer/steps/delete-addresses.ts","../src/customer/steps/delete-customers.ts","../src/customer/steps/index.ts","../src/customer/steps/maybe-unset-default-billing-addresses.ts","../src/customer/steps/maybe-unset-default-shipping-addresses.ts","../src/customer/steps/update-addresses.ts","../src/customer/steps/update-customers.ts","../src/customer/steps/validate-customer-account-creation.ts","../src/customer/steps/utils/index.ts","../src/customer/steps/utils/unset-address-for-create.ts","../src/customer/steps/utils/unset-address-for-update.ts","../src/customer/workflows/create-addresses.ts","../src/customer/workflows/create-customer-account.ts","../src/customer/workflows/create-customers.ts","../src/customer/workflows/delete-addresses.ts","../src/customer/workflows/delete-customers.ts","../src/customer/workflows/index.ts","../src/customer/workflows/remove-customer-account.ts","../src/customer/workflows/update-addresses.ts","../src/customer/workflows/update-customers.ts","../src/customer-group/index.ts","../src/customer-group/steps/create-customer-groups.ts","../src/customer-group/steps/delete-customer-group-customers.ts","../src/customer-group/steps/delete-customer-groups.ts","../src/customer-group/steps/index.ts","../src/customer-group/steps/link-customer-groups-customer.ts","../src/customer-group/steps/link-customers-customer-group.ts","../src/customer-group/steps/update-customer-groups.ts","../src/customer-group/workflows/create-customer-groups.ts","../src/customer-group/workflows/delete-customer-groups.ts","../src/customer-group/workflows/index.ts","../src/customer-group/workflows/link-customer-groups-customer.ts","../src/customer-group/workflows/link-customers-customer-group.ts","../src/customer-group/workflows/update-customer-groups.ts","../src/defaults/index.ts","../src/defaults/steps/create-default-store.ts","../src/defaults/steps/index.ts","../src/defaults/workflows/create-defaults.ts","../src/defaults/workflows/index.ts","../src/draft-order/index.ts","../src/draft-order/steps/create-draft-order-line-item-adjustments.ts","../src/draft-order/steps/create-draft-order-shipping-method-adjustments.ts","../src/draft-order/steps/delete-draft-order.ts","../src/draft-order/steps/get-draft-order-promotion-context.ts","../src/draft-order/steps/index.ts","../src/draft-order/steps/remove-draft-order-line-item-adjustments.ts","../src/draft-order/steps/remove-draft-order-shipping-method-adjustments.ts","../src/draft-order/steps/restore-draft-order-shipping-methods.ts","../src/draft-order/steps/update-draft-order-promotions.ts","../src/draft-order/steps/update-draft-order-shipping-metod.ts","../src/draft-order/steps/validate-draft-order-change.ts","../src/draft-order/steps/validate-draft-order-remove-action-item.ts","../src/draft-order/steps/validate-draft-order-shipping-method-action.ts","../src/draft-order/steps/validate-draft-order-update-action-item.ts","../src/draft-order/steps/validate-draft-order.ts","../src/draft-order/steps/validate-promo-codes-to-add.ts","../src/draft-order/steps/validate-promo-codes-to-remove.ts","../src/draft-order/utils/fields.ts","../src/draft-order/utils/validation.ts","../src/draft-order/workflows/add-draft-order-items.ts","../src/draft-order/workflows/add-draft-order-promotions.ts","../src/draft-order/workflows/add-draft-order-shipping-methods.ts","../src/draft-order/workflows/begin-draft-order-edit.ts","../src/draft-order/workflows/cancel-draft-order-edit.ts","../src/draft-order/workflows/confirm-draft-order-edit.ts","../src/draft-order/workflows/convert-draft-order.ts","../src/draft-order/workflows/delete-draft-order.ts","../src/draft-order/workflows/index.ts","../src/draft-order/workflows/refresh-draft-order-adjustments.ts","../src/draft-order/workflows/remove-draft-order-action-item.ts","../src/draft-order/workflows/remove-draft-order-action-shipping-method.ts","../src/draft-order/workflows/remove-draft-order-promotions.ts","../src/draft-order/workflows/remove-draft-order-shipping-method.ts","../src/draft-order/workflows/request-draft-order-edit.ts","../src/draft-order/workflows/update-draft-order-action-item.ts","../src/draft-order/workflows/update-draft-order-action-shipping-method.ts","../src/draft-order/workflows/update-draft-order-item.ts","../src/draft-order/workflows/update-draft-order-shipping-method.ts","../src/draft-order/workflows/update-draft-order.ts","../src/file/index.ts","../src/file/steps/delete-files.ts","../src/file/steps/index.ts","../src/file/steps/upload-files.ts","../src/file/workflows/delete-files.ts","../src/file/workflows/index.ts","../src/file/workflows/upload-files.ts","../src/fulfillment/index.ts","../src/fulfillment/steps/add-shipping-options-prices.ts","../src/fulfillment/steps/calculate-shipping-options-prices.ts","../src/fulfillment/steps/cancel-fulfillment.ts","../src/fulfillment/steps/create-fulfillment-set.ts","../src/fulfillment/steps/create-fulfillment.ts","../src/fulfillment/steps/create-return-fulfillment.ts","../src/fulfillment/steps/create-service-zones.ts","../src/fulfillment/steps/create-shipping-option-rules.ts","../src/fulfillment/steps/create-shipping-profiles.ts","../src/fulfillment/steps/delete-fulfillment-sets.ts","../src/fulfillment/steps/delete-service-zones.ts","../src/fulfillment/steps/delete-shipping-option-rules.ts","../src/fulfillment/steps/delete-shipping-options.ts","../src/fulfillment/steps/index.ts","../src/fulfillment/steps/set-shipping-options-price-sets.ts","../src/fulfillment/steps/set-shipping-options-prices.ts","../src/fulfillment/steps/update-fulfillment.ts","../src/fulfillment/steps/update-service-zones.ts","../src/fulfillment/steps/update-shipping-option-rules.ts","../src/fulfillment/steps/update-shipping-profiles.ts","../src/fulfillment/steps/upsert-shipping-options.ts","../src/fulfillment/steps/validate-fulfillment-providers.ts","../src/fulfillment/steps/validate-shipment.ts","../src/fulfillment/steps/validate-shipping-option-prices.ts","../src/fulfillment/workflows/batch-shipping-option-rules.ts","../src/fulfillment/workflows/calculate-shipping-options-prices.ts","../src/fulfillment/workflows/cancel-fulfillment.ts","../src/fulfillment/workflows/create-fulfillment.ts","../src/fulfillment/workflows/create-return-fulfillment.ts","../src/fulfillment/workflows/create-service-zones.ts","../src/fulfillment/workflows/create-shipment.ts","../src/fulfillment/workflows/create-shipping-options.ts","../src/fulfillment/workflows/create-shipping-profiles.ts","../src/fulfillment/workflows/delete-fulfillment-sets.ts","../src/fulfillment/workflows/delete-service-zones.ts","../src/fulfillment/workflows/delete-shipping-options.ts","../src/fulfillment/workflows/index.ts","../src/fulfillment/workflows/mark-fulfillment-as-delivered.ts","../src/fulfillment/workflows/update-fulfillment.ts","../src/fulfillment/workflows/update-service-zones.ts","../src/fulfillment/workflows/update-shipping-options.ts","../src/fulfillment/workflows/update-shipping-profiles.ts","../src/inventory/index.ts","../src/inventory/steps/adjust-inventory-levels.ts","../src/inventory/steps/attach-inventory-items.ts","../src/inventory/steps/create-inventory-items.ts","../src/inventory/steps/create-inventory-levels.ts","../src/inventory/steps/delete-inventory-items.ts","../src/inventory/steps/delete-inventory-levels.ts","../src/inventory/steps/index.ts","../src/inventory/steps/update-inventory-items.ts","../src/inventory/steps/update-inventory-levels.ts","../src/inventory/steps/validate-inventory-items.ts","../src/inventory/steps/validate-inventory-locations.ts","../src/inventory/steps/validate-singular-inventory-items-for-tags.ts","../src/inventory/workflows/batch-inventory-item-levels.ts","../src/inventory/workflows/bulk-create-delete-levels.ts","../src/inventory/workflows/create-inventory-items.ts","../src/inventory/workflows/create-inventory-levels.ts","../src/inventory/workflows/delete-inventory-items.ts","../src/inventory/workflows/delete-inventory-levels.ts","../src/inventory/workflows/index.ts","../src/inventory/workflows/update-inventory-items.ts","../src/inventory/workflows/update-inventory-levels.ts","../src/invite/index.ts","../src/invite/steps/create-invites.ts","../src/invite/steps/delete-invites.ts","../src/invite/steps/index.ts","../src/invite/steps/refresh-invite-tokens.ts","../src/invite/steps/validate-token.ts","../src/invite/workflows/accept-invite.ts","../src/invite/workflows/create-invites.ts","../src/invite/workflows/delete-invites.ts","../src/invite/workflows/index.ts","../src/invite/workflows/refresh-invite-tokens.ts","../src/line-item/index.ts","../src/line-item/steps/delete-line-items.ts","../src/line-item/steps/index.ts","../src/line-item/steps/list-line-items.ts","../src/line-item/steps/update-line-items.ts","../src/line-item/workflows/delete-line-items.ts","../src/line-item/workflows/index.ts","../src/locking/index.ts","../src/locking/steps/acquire-lock.ts","../src/locking/steps/release-lock.ts","../src/notification/index.ts","../src/notification/steps/index.ts","../src/notification/steps/notify-on-failure.ts","../src/notification/steps/send-notifications.ts","../src/order/index.ts","../src/order/steps/add-order-transaction.ts","../src/order/steps/archive-orders.ts","../src/order/steps/cancel-fulfillment.ts","../src/order/steps/cancel-order-change.ts","../src/order/steps/cancel-orders.ts","../src/order/steps/complete-orders.ts","../src/order/steps/confirm-order-changes.ts","../src/order/steps/create-line-items.ts","../src/order/steps/create-order-change.ts","../src/order/steps/create-order-shipping-methods.ts","../src/order/steps/create-orders.ts","../src/order/steps/decline-order-change.ts","../src/order/steps/delete-line-items.ts","../src/order/steps/delete-order-change-actions.ts","../src/order/steps/delete-order-changes.ts","../src/order/steps/delete-order-shipping-methods.ts","../src/order/steps/index.ts","../src/order/steps/preview-order-change.ts","../src/order/steps/register-delivery.ts","../src/order/steps/register-fulfillment.ts","../src/order/steps/register-order-changes.ts","../src/order/steps/register-shipment.ts","../src/order/steps/set-tax-lines-for-items.ts","../src/order/steps/update-order-change-actions.ts","../src/order/steps/update-order-changes.ts","../src/order/steps/update-orders.ts","../src/order/steps/update-shipping-methods.ts","../src/order/steps/claim/cancel-claim.ts","../src/order/steps/claim/create-claim-items-from-actions.ts","../src/order/steps/claim/create-claims.ts","../src/order/steps/claim/delete-claims.ts","../src/order/steps/claim/update-order-claims.ts","../src/order/steps/exchange/cancel-exchange.ts","../src/order/steps/exchange/create-exchange-items-from-actions.ts","../src/order/steps/exchange/create-exchange.ts","../src/order/steps/exchange/delete-exchanges.ts","../src/order/steps/exchange/update-order-exchanges.ts","../src/order/steps/return/cancel-return.ts","../src/order/steps/return/create-complete-return.ts","../src/order/steps/return/create-return-items-from-actions.ts","../src/order/steps/return/create-returns.ts","../src/order/steps/return/delete-returns.ts","../src/order/steps/return/receive-return.ts","../src/order/steps/return/update-return-items.ts","../src/order/steps/return/update-returns.ts","../src/order/utils/aggregate-status.ts","../src/order/utils/build-reservations-map.ts","../src/order/utils/fields.ts","../src/order/utils/order-validation.ts","../src/order/utils/prepare-shipping-method.ts","../src/order/utils/validate-return-reason.ts","../src/order/utils/__tests__/aggregate-status.spec.ts","../src/order/workflows/add-line-items.ts","../src/order/workflows/archive-orders.ts","../src/order/workflows/cancel-order-change.ts","../src/order/workflows/cancel-order-fulfillment.ts","../src/order/workflows/cancel-order.ts","../src/order/workflows/complete-orders.ts","../src/order/workflows/create-fulfillment.ts","../src/order/workflows/create-or-update-order-payment-collection.ts","../src/order/workflows/create-order-change-actions.ts","../src/order/workflows/create-order-change.ts","../src/order/workflows/create-order-credit-lines.ts","../src/order/workflows/create-order-payment-collection.ts","../src/order/workflows/create-order.ts","../src/order/workflows/create-shipment.ts","../src/order/workflows/decline-order-change.ts","../src/order/workflows/delete-order-change-actions.ts","../src/order/workflows/delete-order-change.ts","../src/order/workflows/delete-order-payment-collection.ts","../src/order/workflows/fetch-shipping-option.ts","../src/order/workflows/get-order-detail.ts","../src/order/workflows/get-orders-list.ts","../src/order/workflows/index.ts","../src/order/workflows/list-shipping-options-for-order.ts","../src/order/workflows/mark-order-fulfillment-as-delivered.ts","../src/order/workflows/mark-payment-collection-as-paid.ts","../src/order/workflows/maybe-refresh-shipping-methods.ts","../src/order/workflows/update-order-change-actions.ts","../src/order/workflows/update-order-changes.ts","../src/order/workflows/update-order.ts","../src/order/workflows/update-tax-lines.ts","../src/order/workflows/claim/begin-order-claim.ts","../src/order/workflows/claim/cancel-begin-order-claim.ts","../src/order/workflows/claim/cancel-claim.ts","../src/order/workflows/claim/claim-add-new-item.ts","../src/order/workflows/claim/claim-item.ts","../src/order/workflows/claim/claim-request-item-return.ts","../src/order/workflows/claim/confirm-claim-request.ts","../src/order/workflows/claim/create-claim-shipping-method.ts","../src/order/workflows/claim/refresh-shipping.ts","../src/order/workflows/claim/remove-claim-add-item-action.ts","../src/order/workflows/claim/remove-claim-item-action.ts","../src/order/workflows/claim/remove-claim-shipping-method.ts","../src/order/workflows/claim/update-claim-add-item.ts","../src/order/workflows/claim/update-claim-item.ts","../src/order/workflows/claim/update-claim-shipping-method.ts","../src/order/workflows/exchange/begin-order-exchange.ts","../src/order/workflows/exchange/cancel-begin-order-exchange.ts","../src/order/workflows/exchange/cancel-exchange.ts","../src/order/workflows/exchange/confirm-exchange-request.ts","../src/order/workflows/exchange/create-exchange-shipping-method.ts","../src/order/workflows/exchange/exchange-add-new-item.ts","../src/order/workflows/exchange/exchange-request-item-return.ts","../src/order/workflows/exchange/refresh-shipping.ts","../src/order/workflows/exchange/remove-exchange-item-action.ts","../src/order/workflows/exchange/remove-exchange-shipping-method.ts","../src/order/workflows/exchange/update-exchange-add-item.ts","../src/order/workflows/exchange/update-exchange-shipping-method.ts","../src/order/workflows/order-edit/begin-order-edit.ts","../src/order/workflows/order-edit/cancel-begin-order-edit.ts","../src/order/workflows/order-edit/confirm-order-edit-request.ts","../src/order/workflows/order-edit/create-order-edit-shipping-method.ts","../src/order/workflows/order-edit/order-edit-add-new-item.ts","../src/order/workflows/order-edit/order-edit-update-item-quantity.ts","../src/order/workflows/order-edit/remove-order-edit-item-action.ts","../src/order/workflows/order-edit/remove-order-edit-shipping-method.ts","../src/order/workflows/order-edit/request-order-edit.ts","../src/order/workflows/order-edit/update-order-edit-add-item.ts","../src/order/workflows/order-edit/update-order-edit-item-quantity.ts","../src/order/workflows/order-edit/update-order-edit-shipping-method.ts","../src/order/workflows/order-edit/utils/fields.ts","../src/order/workflows/payments/create-order-refund-credit-lines.ts","../src/order/workflows/payments/refund-captured-payments.ts","../src/order/workflows/return/begin-receive-return.ts","../src/order/workflows/return/begin-return.ts","../src/order/workflows/return/cancel-receive-return.ts","../src/order/workflows/return/cancel-request-return.ts","../src/order/workflows/return/cancel-return.ts","../src/order/workflows/return/confirm-receive-return-request.ts","../src/order/workflows/return/confirm-return-request.ts","../src/order/workflows/return/create-complete-return.ts","../src/order/workflows/return/create-return-shipping-method.ts","../src/order/workflows/return/dismiss-item-return-request.ts","../src/order/workflows/return/receive-complete-return.ts","../src/order/workflows/return/receive-item-return-request.ts","../src/order/workflows/return/refresh-shipping.ts","../src/order/workflows/return/remove-item-receive-return-action.ts","../src/order/workflows/return/remove-item-return-action.ts","../src/order/workflows/return/remove-return-shipping-method.ts","../src/order/workflows/return/request-item-return.ts","../src/order/workflows/return/update-receive-item-return-request.ts","../src/order/workflows/return/update-request-item-return.ts","../src/order/workflows/return/update-return-shipping-method.ts","../src/order/workflows/return/update-return.ts","../src/order/workflows/transfer/accept-order-transfer.ts","../src/order/workflows/transfer/cancel-order-transfer.ts","../src/order/workflows/transfer/decline-order-transfer.ts","../src/order/workflows/transfer/request-order-transfer.ts","../src/payment/index.ts","../src/payment/steps/authorize-payment-session.ts","../src/payment/steps/cancel-payment.ts","../src/payment/steps/capture-payment.ts","../src/payment/steps/complete-cart-after-payment.ts","../src/payment/steps/index.ts","../src/payment/steps/refund-payment.ts","../src/payment/steps/refund-payments.ts","../src/payment/workflows/capture-payment.ts","../src/payment/workflows/index.ts","../src/payment/workflows/process-payment.ts","../src/payment/workflows/refund-payment.ts","../src/payment/workflows/refund-payments.ts","../src/payment-collection/index.ts","../src/payment-collection/steps/cancel-payment.ts","../src/payment-collection/steps/create-payment-account-holder.ts","../src/payment-collection/steps/create-payment-session.ts","../src/payment-collection/steps/create-refund-reasons.ts","../src/payment-collection/steps/delete-payment-sessions.ts","../src/payment-collection/steps/delete-refund-reasons.ts","../src/payment-collection/steps/index.ts","../src/payment-collection/steps/update-payment-collection.ts","../src/payment-collection/steps/update-refund-reasons.ts","../src/payment-collection/steps/validate-deleted-payment-sessions.ts","../src/payment-collection/workflows/cancel-payment-collection.ts","../src/payment-collection/workflows/create-payment-session.ts","../src/payment-collection/workflows/create-refund-reasons.ts","../src/payment-collection/workflows/delete-payment-sessions.ts","../src/payment-collection/workflows/delete-refund-reasons.ts","../src/payment-collection/workflows/index.ts","../src/payment-collection/workflows/update-refund-reasons.ts","../src/price-list/index.ts","../src/price-list/steps/create-price-list-prices.ts","../src/price-list/steps/create-price-lists.ts","../src/price-list/steps/delete-price-lists.ts","../src/price-list/steps/get-existing-price-lists-price-ids.ts","../src/price-list/steps/index.ts","../src/price-list/steps/remove-price-list-prices.ts","../src/price-list/steps/update-price-list-prices.ts","../src/price-list/steps/update-price-lists.ts","../src/price-list/steps/validate-price-lists.ts","../src/price-list/steps/validate-variant-price-links.ts","../src/price-list/workflows/batch-price-list-prices.ts","../src/price-list/workflows/create-price-list-prices.ts","../src/price-list/workflows/create-price-lists.ts","../src/price-list/workflows/delete-price-lists.ts","../src/price-list/workflows/index.ts","../src/price-list/workflows/remove-price-list-prices.ts","../src/price-list/workflows/update-price-list-prices.ts","../src/price-list/workflows/update-price-lists.ts","../src/pricing/index.ts","../src/pricing/steps/create-price-preferences.ts","../src/pricing/steps/create-price-sets.ts","../src/pricing/steps/delete-price-preferences.ts","../src/pricing/steps/index.ts","../src/pricing/steps/update-price-preferences-as-array.ts","../src/pricing/steps/update-price-preferences.ts","../src/pricing/steps/update-price-sets.ts","../src/pricing/workflows/create-price-preferences.ts","../src/pricing/workflows/delete-price-preferences.ts","../src/pricing/workflows/index.ts","../src/pricing/workflows/update-price-preferences.ts","../src/product/index.ts","../src/product/helpers/normalize-for-export.ts","../src/product/helpers/normalize-for-import.ts","../src/product/helpers/normalize-v1-import.ts","../src/product/steps/add-image-to-variants.ts","../src/product/steps/add-images-to-variant.ts","../src/product/steps/batch-link-products-collection.ts","../src/product/steps/batch-link-products-in-category.ts","../src/product/steps/create-collections.ts","../src/product/steps/create-product-options.ts","../src/product/steps/create-product-tags.ts","../src/product/steps/create-product-types.ts","../src/product/steps/create-product-variants.ts","../src/product/steps/create-products.ts","../src/product/steps/create-variant-pricing-link.ts","../src/product/steps/delete-collections.ts","../src/product/steps/delete-product-options.ts","../src/product/steps/delete-product-tags.ts","../src/product/steps/delete-product-types.ts","../src/product/steps/delete-product-variants.ts","../src/product/steps/delete-products.ts","../src/product/steps/generate-product-csv.ts","../src/product/steps/get-all-products.ts","../src/product/steps/get-products.ts","../src/product/steps/get-variant-availability.ts","../src/product/steps/get-variant-pricing-link.ts","../src/product/steps/index.ts","../src/product/steps/link-product-options-to-product.ts","../src/product/steps/normalize-products-to-chunks.ts","../src/product/steps/normalize-products.ts","../src/product/steps/parse-product-csv.ts","../src/product/steps/process-import-chunks.ts","../src/product/steps/process-product-options-for-import.ts","../src/product/steps/remove-image-from-variants.ts","../src/product/steps/remove-images-from-variant.ts","../src/product/steps/update-collections.ts","../src/product/steps/update-product-options.ts","../src/product/steps/update-product-tags.ts","../src/product/steps/update-product-types.ts","../src/product/steps/update-product-variants.ts","../src/product/steps/update-products.ts","../src/product/steps/wait-confirmation-product-import.ts","../src/product/utils/csvtojson.ts","../src/product/utils/index.ts","../src/product/utils/jsontocsv.ts","../src/product/workflows/batch-image-variants.ts","../src/product/workflows/batch-link-products-collection.ts","../src/product/workflows/batch-product-variants.ts","../src/product/workflows/batch-products-in-category.ts","../src/product/workflows/batch-products.ts","../src/product/workflows/batch-variant-images.ts","../src/product/workflows/create-collections.ts","../src/product/workflows/create-product-options.ts","../src/product/workflows/create-product-tags.ts","../src/product/workflows/create-product-types.ts","../src/product/workflows/create-product-variants.ts","../src/product/workflows/create-products.ts","../src/product/workflows/delete-collections.ts","../src/product/workflows/delete-product-options.ts","../src/product/workflows/delete-product-tags.ts","../src/product/workflows/delete-product-types.ts","../src/product/workflows/delete-product-variants.ts","../src/product/workflows/delete-products.ts","../src/product/workflows/export-products.ts","../src/product/workflows/import-products-as-chunks.ts","../src/product/workflows/import-products.ts","../src/product/workflows/index.ts","../src/product/workflows/link-product-options-to-product.ts","../src/product/workflows/update-collections.ts","../src/product/workflows/update-product-options.ts","../src/product/workflows/update-product-tags.ts","../src/product/workflows/update-product-types.ts","../src/product/workflows/update-product-variants.ts","../src/product/workflows/update-products.ts","../src/product/workflows/upsert-variant-prices.ts","../src/product-category/index.ts","../src/product-category/steps/create-product-categories.ts","../src/product-category/steps/delete-product-categories.ts","../src/product-category/steps/index.ts","../src/product-category/steps/update-product-categories.ts","../src/product-category/workflows/create-product-categories.ts","../src/product-category/workflows/delete-product-categories.ts","../src/product-category/workflows/index.ts","../src/product-category/workflows/update-product-categories.ts","../src/promotion/index.ts","../src/promotion/steps/add-campaign-promotions.ts","../src/promotion/steps/add-or-remove-campaign-promotions.ts","../src/promotion/steps/add-rules-to-promotions.ts","../src/promotion/steps/create-campaigns.ts","../src/promotion/steps/create-promotions.ts","../src/promotion/steps/delete-campaigns.ts","../src/promotion/steps/delete-promotion-rules-workflow.ts","../src/promotion/steps/delete-promotions.ts","../src/promotion/steps/index.ts","../src/promotion/steps/register-usage.ts","../src/promotion/steps/remove-campaign-promotions.ts","../src/promotion/steps/remove-rules-from-promotions.ts","../src/promotion/steps/update-campaigns.ts","../src/promotion/steps/update-promotion-rules.ts","../src/promotion/steps/update-promotions.ts","../src/promotion/workflows/add-or-remove-campaign-promotions.ts","../src/promotion/workflows/batch-promotion-rules.ts","../src/promotion/workflows/create-campaigns.ts","../src/promotion/workflows/create-promotion-rules.ts","../src/promotion/workflows/create-promotions.ts","../src/promotion/workflows/delete-campaigns.ts","../src/promotion/workflows/delete-promotion-rules.ts","../src/promotion/workflows/delete-promotions.ts","../src/promotion/workflows/index.ts","../src/promotion/workflows/update-campaigns.ts","../src/promotion/workflows/update-promotion-rules.ts","../src/promotion/workflows/update-promotions-status.ts","../src/promotion/workflows/update-promotions.ts","../src/region/index.ts","../src/region/steps/create-regions.ts","../src/region/steps/delete-regions.ts","../src/region/steps/index.ts","../src/region/steps/set-regions-payment-providers.ts","../src/region/steps/update-regions.ts","../src/region/workflows/create-regions.ts","../src/region/workflows/delete-regions.ts","../src/region/workflows/index.ts","../src/region/workflows/update-regions.ts","../src/reservation/index.ts","../src/reservation/steps/create-reservations.ts","../src/reservation/steps/delete-reservations-by-line-items.ts","../src/reservation/steps/delete-reservations.ts","../src/reservation/steps/index.ts","../src/reservation/steps/update-reservations.ts","../src/reservation/workflows/create-reservations.ts","../src/reservation/workflows/delete-reservations-by-line-items.ts","../src/reservation/workflows/delete-reservations.ts","../src/reservation/workflows/index.ts","../src/reservation/workflows/update-reservations.ts","../src/return-reason/index.ts","../src/return-reason/steps/create-return-reasons.ts","../src/return-reason/steps/delete-return-reasons.ts","../src/return-reason/steps/index.ts","../src/return-reason/steps/update-return-reasons.ts","../src/return-reason/workflows/create-return-reasons.ts","../src/return-reason/workflows/delete-return-reasons.ts","../src/return-reason/workflows/index.ts","../src/return-reason/workflows/update-return-reasons.ts","../src/sales-channel/index.ts","../src/sales-channel/steps/associate-locations-with-channels.ts","../src/sales-channel/steps/associate-products-with-channels.ts","../src/sales-channel/steps/can-delete-sales-channels.ts","../src/sales-channel/steps/create-default-sales-channel.ts","../src/sales-channel/steps/create-sales-channels.ts","../src/sales-channel/steps/delete-sales-channels.ts","../src/sales-channel/steps/detach-locations-from-channels.ts","../src/sales-channel/steps/detach-products-from-sales-channels.ts","../src/sales-channel/steps/index.ts","../src/sales-channel/steps/update-sales-channels.ts","../src/sales-channel/workflows/create-sales-channels.ts","../src/sales-channel/workflows/delete-sales-channels.ts","../src/sales-channel/workflows/index.ts","../src/sales-channel/workflows/link-products-to-sales-channel.ts","../src/sales-channel/workflows/update-sales-channels.ts","../src/settings/index.ts","../src/settings/steps/create-view-configuration.ts","../src/settings/steps/index.ts","../src/settings/steps/set-active-view-configuration.ts","../src/settings/steps/update-view-configuration.ts","../src/settings/workflows/create-view-configuration.ts","../src/settings/workflows/index.ts","../src/settings/workflows/update-view-configuration.ts","../src/shipping-options/index.ts","../src/shipping-options/steps/create-shipping-option-types.ts","../src/shipping-options/steps/delete-shipping-option-types.ts","../src/shipping-options/steps/index.ts","../src/shipping-options/steps/list-shipping-options-for-context.ts","../src/shipping-options/steps/update-shipping-option-types.ts","../src/shipping-options/workflows/create-shipping-option-types.ts","../src/shipping-options/workflows/delete-shipping-option-types.ts","../src/shipping-options/workflows/index.ts","../src/shipping-options/workflows/update-shipping-option-types.ts","../src/shipping-profile/index.ts","../src/shipping-profile/steps/delete-shipping-profile.ts","../src/shipping-profile/steps/index.ts","../src/shipping-profile/workflows/delete-shipping-profile.ts","../src/shipping-profile/workflows/index.ts","../src/stock-location/index.ts","../src/stock-location/steps/associate-locations-with-fulfillment-sets.ts","../src/stock-location/steps/create-stock-locations.ts","../src/stock-location/steps/delete-stock-locations.ts","../src/stock-location/steps/index.ts","../src/stock-location/steps/update-stock-locations.ts","../src/stock-location/steps/upsert-stock-location-addresses.ts","../src/stock-location/workflows/create-location-fulfillment-set.ts","../src/stock-location/workflows/create-stock-locations.ts","../src/stock-location/workflows/delete-stock-locations.ts","../src/stock-location/workflows/index.ts","../src/stock-location/workflows/link-sales-channels-to-stock-location.ts","../src/stock-location/workflows/update-stock-locations.ts","../src/store/index.ts","../src/store/steps/create-stores.ts","../src/store/steps/delete-stores.ts","../src/store/steps/index.ts","../src/store/steps/update-stores.ts","../src/store/workflows/create-stores.ts","../src/store/workflows/delete-stores.ts","../src/store/workflows/index.ts","../src/store/workflows/update-stores.ts","../src/tax/index.ts","../src/tax/steps/create-tax-rate-rules.ts","../src/tax/steps/create-tax-rates.ts","../src/tax/steps/create-tax-regions.ts","../src/tax/steps/delete-tax-rate-rules.ts","../src/tax/steps/delete-tax-rates.ts","../src/tax/steps/delete-tax-regions.ts","../src/tax/steps/get-item-tax-lines.ts","../src/tax/steps/index.ts","../src/tax/steps/list-tax-rate-ids.ts","../src/tax/steps/list-tax-rate-rule-ids.ts","../src/tax/steps/update-tax-rates.ts","../src/tax/steps/update-tax-regions.ts","../src/tax/workflows/create-tax-rate-rules.ts","../src/tax/workflows/create-tax-rates.ts","../src/tax/workflows/create-tax-regions.ts","../src/tax/workflows/delete-tax-rate-rules.ts","../src/tax/workflows/delete-tax-rates.ts","../src/tax/workflows/delete-tax-regions.ts","../src/tax/workflows/index.ts","../src/tax/workflows/set-tax-rate-rules.ts","../src/tax/workflows/update-tax-rates.ts","../src/tax/workflows/update-tax-regions.ts","../src/user/index.ts","../src/user/steps/create-users.ts","../src/user/steps/delete-users.ts","../src/user/steps/index.ts","../src/user/steps/update-users.ts","../src/user/workflows/create-user-account.ts","../src/user/workflows/create-users.ts","../src/user/workflows/delete-users.ts","../src/user/workflows/index.ts","../src/user/workflows/remove-user-account.ts","../src/user/workflows/update-users.ts"],"version":"5.9.3"}
1
+ {"root":["../src/index.ts","../src/api-key/index.ts","../src/api-key/steps/create-api-keys.ts","../src/api-key/steps/delete-api-keys.ts","../src/api-key/steps/index.ts","../src/api-key/steps/link-sales-channels-to-publishable-key.ts","../src/api-key/steps/revoke-api-keys.ts","../src/api-key/steps/update-api-keys.ts","../src/api-key/steps/validate-sales-channel-exists.ts","../src/api-key/workflows/create-api-keys.ts","../src/api-key/workflows/delete-api-keys.ts","../src/api-key/workflows/index.ts","../src/api-key/workflows/link-sales-channels-to-publishable-key.ts","../src/api-key/workflows/revoke-api-keys.ts","../src/api-key/workflows/update-api-keys.ts","../src/auth/index.ts","../src/auth/steps/index.ts","../src/auth/steps/set-auth-app-metadata.ts","../src/auth/workflows/generate-reset-password-token.ts","../src/auth/workflows/index.ts","../src/cart/index.ts","../src/cart/steps/add-shipping-method-to-cart.ts","../src/cart/steps/compensate-payment-if-needed.ts","../src/cart/steps/confirm-inventory.ts","../src/cart/steps/create-carts.ts","../src/cart/steps/create-line-item-adjustments.ts","../src/cart/steps/create-line-items.ts","../src/cart/steps/create-payment-collection.ts","../src/cart/steps/create-shipping-method-adjustments.ts","../src/cart/steps/find-one-or-any-region.ts","../src/cart/steps/find-or-create-customer.ts","../src/cart/steps/find-sales-channel.ts","../src/cart/steps/get-actions-to-compute-from-promotions.ts","../src/cart/steps/get-line-item-actions.ts","../src/cart/steps/get-promotion-codes-to-apply.ts","../src/cart/steps/get-variant-price-sets.ts","../src/cart/steps/get-variants.ts","../src/cart/steps/index.ts","../src/cart/steps/prepare-adjustments-from-promotion-actions.ts","../src/cart/steps/remove-line-item-adjustments.ts","../src/cart/steps/remove-shipping-method-adjustments.ts","../src/cart/steps/remove-shipping-method-from-cart.ts","../src/cart/steps/reserve-inventory.ts","../src/cart/steps/retrieve-cart.ts","../src/cart/steps/set-tax-lines-for-items.ts","../src/cart/steps/update-cart-promotions.ts","../src/cart/steps/update-carts.ts","../src/cart/steps/update-line-items.ts","../src/cart/steps/update-shipping-methods.ts","../src/cart/steps/upsert-tax-lines-for-items.ts","../src/cart/steps/validate-cart-payments.ts","../src/cart/steps/validate-cart-shipping-options.ts","../src/cart/steps/validate-cart.ts","../src/cart/steps/validate-line-item-prices.ts","../src/cart/steps/validate-sales-channel.ts","../src/cart/steps/validate-shipping-methods-data.ts","../src/cart/steps/validate-shipping-options-price.ts","../src/cart/steps/validate-shipping.ts","../src/cart/steps/validate-variant-prices.ts","../src/cart/utils/fields.ts","../src/cart/utils/prepare-confirm-inventory-input.ts","../src/cart/utils/prepare-line-item-data.ts","../src/cart/utils/schemas.ts","../src/cart/utils/__tests__/prepare-confirm-inventory-input.spec.ts","../src/cart/workflows/add-shipping-method-to-cart.ts","../src/cart/workflows/add-to-cart.ts","../src/cart/workflows/complete-cart.ts","../src/cart/workflows/confirm-variant-inventory.ts","../src/cart/workflows/create-cart-credit-lines.ts","../src/cart/workflows/create-carts.ts","../src/cart/workflows/create-payment-collection-for-cart.ts","../src/cart/workflows/delete-cart-credit-lines.ts","../src/cart/workflows/get-variants-and-items-with-prices.ts","../src/cart/workflows/index.ts","../src/cart/workflows/list-shipping-options-for-cart-with-pricing.ts","../src/cart/workflows/list-shipping-options-for-cart.ts","../src/cart/workflows/refresh-cart-items.ts","../src/cart/workflows/refresh-cart-shipping-methods.ts","../src/cart/workflows/refresh-payment-collection.ts","../src/cart/workflows/refund-payment-recreate-payment-session.ts","../src/cart/workflows/transfer-cart-customer.ts","../src/cart/workflows/update-cart-promotions.ts","../src/cart/workflows/update-cart.ts","../src/cart/workflows/update-line-item-in-cart.ts","../src/cart/workflows/update-tax-lines.ts","../src/cart/workflows/upsert-tax-lines.ts","../src/common/index.ts","../src/common/steps/create-entities.ts","../src/common/steps/create-remote-links.ts","../src/common/steps/delete-entities.ts","../src/common/steps/dismiss-remote-links.ts","../src/common/steps/emit-event.ts","../src/common/steps/release-event.ts","../src/common/steps/remove-remote-links.ts","../src/common/steps/update-remote-links.ts","../src/common/steps/use-query-graph.ts","../src/common/steps/use-remote-query.ts","../src/common/steps/validate-presence-of.ts","../src/common/steps/__fixtures__/remote-query.ts","../src/common/steps/__tests__/use-query-graph-step.spec.ts","../src/common/workflows/batch-links.ts","../src/common/workflows/create-links.ts","../src/common/workflows/dismiss-links.ts","../src/common/workflows/update-links.ts","../src/customer/index.ts","../src/customer/steps/create-addresses.ts","../src/customer/steps/create-customers.ts","../src/customer/steps/delete-addresses.ts","../src/customer/steps/delete-customers.ts","../src/customer/steps/index.ts","../src/customer/steps/maybe-unset-default-billing-addresses.ts","../src/customer/steps/maybe-unset-default-shipping-addresses.ts","../src/customer/steps/update-addresses.ts","../src/customer/steps/update-customers.ts","../src/customer/steps/validate-customer-account-creation.ts","../src/customer/steps/utils/index.ts","../src/customer/steps/utils/unset-address-for-create.ts","../src/customer/steps/utils/unset-address-for-update.ts","../src/customer/workflows/create-addresses.ts","../src/customer/workflows/create-customer-account.ts","../src/customer/workflows/create-customers.ts","../src/customer/workflows/delete-addresses.ts","../src/customer/workflows/delete-customers.ts","../src/customer/workflows/index.ts","../src/customer/workflows/remove-customer-account.ts","../src/customer/workflows/update-addresses.ts","../src/customer/workflows/update-customers.ts","../src/customer-group/index.ts","../src/customer-group/steps/create-customer-groups.ts","../src/customer-group/steps/delete-customer-group-customers.ts","../src/customer-group/steps/delete-customer-groups.ts","../src/customer-group/steps/index.ts","../src/customer-group/steps/link-customer-groups-customer.ts","../src/customer-group/steps/link-customers-customer-group.ts","../src/customer-group/steps/update-customer-groups.ts","../src/customer-group/workflows/create-customer-groups.ts","../src/customer-group/workflows/delete-customer-groups.ts","../src/customer-group/workflows/index.ts","../src/customer-group/workflows/link-customer-groups-customer.ts","../src/customer-group/workflows/link-customers-customer-group.ts","../src/customer-group/workflows/update-customer-groups.ts","../src/defaults/index.ts","../src/defaults/steps/create-default-store.ts","../src/defaults/steps/index.ts","../src/defaults/workflows/create-defaults.ts","../src/defaults/workflows/index.ts","../src/draft-order/index.ts","../src/draft-order/steps/create-draft-order-line-item-adjustments.ts","../src/draft-order/steps/create-draft-order-shipping-method-adjustments.ts","../src/draft-order/steps/delete-draft-order.ts","../src/draft-order/steps/get-draft-order-promotion-context.ts","../src/draft-order/steps/index.ts","../src/draft-order/steps/remove-draft-order-line-item-adjustments.ts","../src/draft-order/steps/remove-draft-order-shipping-method-adjustments.ts","../src/draft-order/steps/restore-draft-order-shipping-methods.ts","../src/draft-order/steps/update-draft-order-promotions.ts","../src/draft-order/steps/update-draft-order-shipping-metod.ts","../src/draft-order/steps/validate-draft-order-change.ts","../src/draft-order/steps/validate-draft-order-remove-action-item.ts","../src/draft-order/steps/validate-draft-order-shipping-method-action.ts","../src/draft-order/steps/validate-draft-order-update-action-item.ts","../src/draft-order/steps/validate-draft-order.ts","../src/draft-order/steps/validate-promo-codes-to-add.ts","../src/draft-order/steps/validate-promo-codes-to-remove.ts","../src/draft-order/utils/fields.ts","../src/draft-order/utils/validation.ts","../src/draft-order/workflows/add-draft-order-items.ts","../src/draft-order/workflows/add-draft-order-promotions.ts","../src/draft-order/workflows/add-draft-order-shipping-methods.ts","../src/draft-order/workflows/begin-draft-order-edit.ts","../src/draft-order/workflows/cancel-draft-order-edit.ts","../src/draft-order/workflows/confirm-draft-order-edit.ts","../src/draft-order/workflows/convert-draft-order.ts","../src/draft-order/workflows/delete-draft-order.ts","../src/draft-order/workflows/index.ts","../src/draft-order/workflows/refresh-draft-order-adjustments.ts","../src/draft-order/workflows/remove-draft-order-action-item.ts","../src/draft-order/workflows/remove-draft-order-action-shipping-method.ts","../src/draft-order/workflows/remove-draft-order-promotions.ts","../src/draft-order/workflows/remove-draft-order-shipping-method.ts","../src/draft-order/workflows/request-draft-order-edit.ts","../src/draft-order/workflows/update-draft-order-action-item.ts","../src/draft-order/workflows/update-draft-order-action-shipping-method.ts","../src/draft-order/workflows/update-draft-order-item.ts","../src/draft-order/workflows/update-draft-order-shipping-method.ts","../src/draft-order/workflows/update-draft-order.ts","../src/file/index.ts","../src/file/steps/delete-files.ts","../src/file/steps/index.ts","../src/file/steps/upload-files.ts","../src/file/workflows/delete-files.ts","../src/file/workflows/index.ts","../src/file/workflows/upload-files.ts","../src/fulfillment/index.ts","../src/fulfillment/steps/add-shipping-options-prices.ts","../src/fulfillment/steps/calculate-shipping-options-prices.ts","../src/fulfillment/steps/cancel-fulfillment.ts","../src/fulfillment/steps/create-fulfillment-set.ts","../src/fulfillment/steps/create-fulfillment.ts","../src/fulfillment/steps/create-return-fulfillment.ts","../src/fulfillment/steps/create-service-zones.ts","../src/fulfillment/steps/create-shipping-option-rules.ts","../src/fulfillment/steps/create-shipping-profiles.ts","../src/fulfillment/steps/delete-fulfillment-sets.ts","../src/fulfillment/steps/delete-service-zones.ts","../src/fulfillment/steps/delete-shipping-option-rules.ts","../src/fulfillment/steps/delete-shipping-options.ts","../src/fulfillment/steps/index.ts","../src/fulfillment/steps/set-shipping-options-price-sets.ts","../src/fulfillment/steps/set-shipping-options-prices.ts","../src/fulfillment/steps/update-fulfillment.ts","../src/fulfillment/steps/update-service-zones.ts","../src/fulfillment/steps/update-shipping-option-rules.ts","../src/fulfillment/steps/update-shipping-profiles.ts","../src/fulfillment/steps/upsert-shipping-options.ts","../src/fulfillment/steps/validate-fulfillment-providers.ts","../src/fulfillment/steps/validate-shipment.ts","../src/fulfillment/steps/validate-shipping-option-prices.ts","../src/fulfillment/workflows/batch-shipping-option-rules.ts","../src/fulfillment/workflows/calculate-shipping-options-prices.ts","../src/fulfillment/workflows/cancel-fulfillment.ts","../src/fulfillment/workflows/create-fulfillment.ts","../src/fulfillment/workflows/create-return-fulfillment.ts","../src/fulfillment/workflows/create-service-zones.ts","../src/fulfillment/workflows/create-shipment.ts","../src/fulfillment/workflows/create-shipping-options.ts","../src/fulfillment/workflows/create-shipping-profiles.ts","../src/fulfillment/workflows/delete-fulfillment-sets.ts","../src/fulfillment/workflows/delete-service-zones.ts","../src/fulfillment/workflows/delete-shipping-options.ts","../src/fulfillment/workflows/index.ts","../src/fulfillment/workflows/mark-fulfillment-as-delivered.ts","../src/fulfillment/workflows/update-fulfillment.ts","../src/fulfillment/workflows/update-service-zones.ts","../src/fulfillment/workflows/update-shipping-options.ts","../src/fulfillment/workflows/update-shipping-profiles.ts","../src/inventory/index.ts","../src/inventory/steps/adjust-inventory-levels.ts","../src/inventory/steps/attach-inventory-items.ts","../src/inventory/steps/create-inventory-items.ts","../src/inventory/steps/create-inventory-levels.ts","../src/inventory/steps/delete-inventory-items.ts","../src/inventory/steps/delete-inventory-levels.ts","../src/inventory/steps/index.ts","../src/inventory/steps/update-inventory-items.ts","../src/inventory/steps/update-inventory-levels.ts","../src/inventory/steps/validate-inventory-items.ts","../src/inventory/steps/validate-inventory-locations.ts","../src/inventory/steps/validate-singular-inventory-items-for-tags.ts","../src/inventory/workflows/batch-inventory-item-levels.ts","../src/inventory/workflows/bulk-create-delete-levels.ts","../src/inventory/workflows/create-inventory-items.ts","../src/inventory/workflows/create-inventory-levels.ts","../src/inventory/workflows/delete-inventory-items.ts","../src/inventory/workflows/delete-inventory-levels.ts","../src/inventory/workflows/index.ts","../src/inventory/workflows/update-inventory-items.ts","../src/inventory/workflows/update-inventory-levels.ts","../src/invite/index.ts","../src/invite/steps/create-invites.ts","../src/invite/steps/delete-invites.ts","../src/invite/steps/index.ts","../src/invite/steps/refresh-invite-tokens.ts","../src/invite/steps/validate-token.ts","../src/invite/workflows/accept-invite.ts","../src/invite/workflows/create-invites.ts","../src/invite/workflows/delete-invites.ts","../src/invite/workflows/index.ts","../src/invite/workflows/refresh-invite-tokens.ts","../src/line-item/index.ts","../src/line-item/steps/delete-line-items.ts","../src/line-item/steps/index.ts","../src/line-item/steps/list-line-items.ts","../src/line-item/steps/update-line-items.ts","../src/line-item/workflows/delete-line-items.ts","../src/line-item/workflows/index.ts","../src/locking/index.ts","../src/locking/steps/acquire-lock.ts","../src/locking/steps/release-lock.ts","../src/notification/index.ts","../src/notification/steps/index.ts","../src/notification/steps/notify-on-failure.ts","../src/notification/steps/send-notifications.ts","../src/order/index.ts","../src/order/steps/add-order-transaction.ts","../src/order/steps/archive-orders.ts","../src/order/steps/cancel-fulfillment.ts","../src/order/steps/cancel-order-change.ts","../src/order/steps/cancel-orders.ts","../src/order/steps/complete-orders.ts","../src/order/steps/confirm-order-changes.ts","../src/order/steps/create-line-items.ts","../src/order/steps/create-order-change.ts","../src/order/steps/create-order-shipping-methods.ts","../src/order/steps/create-orders.ts","../src/order/steps/decline-order-change.ts","../src/order/steps/delete-line-items.ts","../src/order/steps/delete-order-change-actions.ts","../src/order/steps/delete-order-changes.ts","../src/order/steps/delete-order-shipping-methods.ts","../src/order/steps/index.ts","../src/order/steps/preview-order-change.ts","../src/order/steps/register-delivery.ts","../src/order/steps/register-fulfillment.ts","../src/order/steps/register-order-changes.ts","../src/order/steps/register-shipment.ts","../src/order/steps/set-tax-lines-for-items.ts","../src/order/steps/update-order-change-actions.ts","../src/order/steps/update-order-changes.ts","../src/order/steps/update-orders.ts","../src/order/steps/update-shipping-methods.ts","../src/order/steps/claim/cancel-claim.ts","../src/order/steps/claim/create-claim-items-from-actions.ts","../src/order/steps/claim/create-claims.ts","../src/order/steps/claim/delete-claims.ts","../src/order/steps/claim/update-order-claims.ts","../src/order/steps/exchange/cancel-exchange.ts","../src/order/steps/exchange/create-exchange-items-from-actions.ts","../src/order/steps/exchange/create-exchange.ts","../src/order/steps/exchange/delete-exchanges.ts","../src/order/steps/exchange/update-order-exchanges.ts","../src/order/steps/return/cancel-return.ts","../src/order/steps/return/create-complete-return.ts","../src/order/steps/return/create-return-items-from-actions.ts","../src/order/steps/return/create-returns.ts","../src/order/steps/return/delete-returns.ts","../src/order/steps/return/receive-return.ts","../src/order/steps/return/update-return-items.ts","../src/order/steps/return/update-returns.ts","../src/order/utils/aggregate-status.ts","../src/order/utils/build-reservations-map.ts","../src/order/utils/fields.ts","../src/order/utils/order-validation.ts","../src/order/utils/prepare-shipping-method.ts","../src/order/utils/validate-return-reason.ts","../src/order/utils/__tests__/aggregate-status.spec.ts","../src/order/workflows/add-line-items.ts","../src/order/workflows/archive-orders.ts","../src/order/workflows/cancel-order-change.ts","../src/order/workflows/cancel-order-fulfillment.ts","../src/order/workflows/cancel-order.ts","../src/order/workflows/complete-orders.ts","../src/order/workflows/create-fulfillment.ts","../src/order/workflows/create-or-update-order-payment-collection.ts","../src/order/workflows/create-order-change-actions.ts","../src/order/workflows/create-order-change.ts","../src/order/workflows/create-order-credit-lines.ts","../src/order/workflows/create-order-payment-collection.ts","../src/order/workflows/create-order.ts","../src/order/workflows/create-shipment.ts","../src/order/workflows/decline-order-change.ts","../src/order/workflows/delete-order-change-actions.ts","../src/order/workflows/delete-order-change.ts","../src/order/workflows/delete-order-payment-collection.ts","../src/order/workflows/fetch-shipping-option.ts","../src/order/workflows/get-order-detail.ts","../src/order/workflows/get-orders-list.ts","../src/order/workflows/index.ts","../src/order/workflows/list-shipping-options-for-order.ts","../src/order/workflows/mark-order-fulfillment-as-delivered.ts","../src/order/workflows/mark-payment-collection-as-paid.ts","../src/order/workflows/maybe-refresh-shipping-methods.ts","../src/order/workflows/update-order-change-actions.ts","../src/order/workflows/update-order-changes.ts","../src/order/workflows/update-order.ts","../src/order/workflows/update-tax-lines.ts","../src/order/workflows/claim/begin-order-claim.ts","../src/order/workflows/claim/cancel-begin-order-claim.ts","../src/order/workflows/claim/cancel-claim.ts","../src/order/workflows/claim/claim-add-new-item.ts","../src/order/workflows/claim/claim-item.ts","../src/order/workflows/claim/claim-request-item-return.ts","../src/order/workflows/claim/confirm-claim-request.ts","../src/order/workflows/claim/create-claim-shipping-method.ts","../src/order/workflows/claim/refresh-shipping.ts","../src/order/workflows/claim/remove-claim-add-item-action.ts","../src/order/workflows/claim/remove-claim-item-action.ts","../src/order/workflows/claim/remove-claim-shipping-method.ts","../src/order/workflows/claim/update-claim-add-item.ts","../src/order/workflows/claim/update-claim-item.ts","../src/order/workflows/claim/update-claim-shipping-method.ts","../src/order/workflows/exchange/begin-order-exchange.ts","../src/order/workflows/exchange/cancel-begin-order-exchange.ts","../src/order/workflows/exchange/cancel-exchange.ts","../src/order/workflows/exchange/confirm-exchange-request.ts","../src/order/workflows/exchange/create-exchange-shipping-method.ts","../src/order/workflows/exchange/exchange-add-new-item.ts","../src/order/workflows/exchange/exchange-request-item-return.ts","../src/order/workflows/exchange/refresh-shipping.ts","../src/order/workflows/exchange/remove-exchange-item-action.ts","../src/order/workflows/exchange/remove-exchange-shipping-method.ts","../src/order/workflows/exchange/update-exchange-add-item.ts","../src/order/workflows/exchange/update-exchange-shipping-method.ts","../src/order/workflows/order-edit/begin-order-edit.ts","../src/order/workflows/order-edit/cancel-begin-order-edit.ts","../src/order/workflows/order-edit/confirm-order-edit-request.ts","../src/order/workflows/order-edit/create-order-edit-shipping-method.ts","../src/order/workflows/order-edit/order-edit-add-new-item.ts","../src/order/workflows/order-edit/order-edit-update-item-quantity.ts","../src/order/workflows/order-edit/remove-order-edit-item-action.ts","../src/order/workflows/order-edit/remove-order-edit-shipping-method.ts","../src/order/workflows/order-edit/request-order-edit.ts","../src/order/workflows/order-edit/update-order-edit-add-item.ts","../src/order/workflows/order-edit/update-order-edit-item-quantity.ts","../src/order/workflows/order-edit/update-order-edit-shipping-method.ts","../src/order/workflows/order-edit/utils/fields.ts","../src/order/workflows/payments/create-order-refund-credit-lines.ts","../src/order/workflows/payments/refund-captured-payments.ts","../src/order/workflows/return/begin-receive-return.ts","../src/order/workflows/return/begin-return.ts","../src/order/workflows/return/cancel-receive-return.ts","../src/order/workflows/return/cancel-request-return.ts","../src/order/workflows/return/cancel-return.ts","../src/order/workflows/return/confirm-receive-return-request.ts","../src/order/workflows/return/confirm-return-request.ts","../src/order/workflows/return/create-complete-return.ts","../src/order/workflows/return/create-return-shipping-method.ts","../src/order/workflows/return/dismiss-item-return-request.ts","../src/order/workflows/return/receive-complete-return.ts","../src/order/workflows/return/receive-item-return-request.ts","../src/order/workflows/return/refresh-shipping.ts","../src/order/workflows/return/remove-item-receive-return-action.ts","../src/order/workflows/return/remove-item-return-action.ts","../src/order/workflows/return/remove-return-shipping-method.ts","../src/order/workflows/return/request-item-return.ts","../src/order/workflows/return/update-receive-item-return-request.ts","../src/order/workflows/return/update-request-item-return.ts","../src/order/workflows/return/update-return-shipping-method.ts","../src/order/workflows/return/update-return.ts","../src/order/workflows/transfer/accept-order-transfer.ts","../src/order/workflows/transfer/cancel-order-transfer.ts","../src/order/workflows/transfer/decline-order-transfer.ts","../src/order/workflows/transfer/request-order-transfer.ts","../src/payment/index.ts","../src/payment/steps/authorize-payment-session.ts","../src/payment/steps/cancel-payment.ts","../src/payment/steps/capture-payment.ts","../src/payment/steps/complete-cart-after-payment.ts","../src/payment/steps/index.ts","../src/payment/steps/refund-payment.ts","../src/payment/steps/refund-payments.ts","../src/payment/workflows/capture-payment.ts","../src/payment/workflows/index.ts","../src/payment/workflows/process-payment.ts","../src/payment/workflows/refund-payment.ts","../src/payment/workflows/refund-payments.ts","../src/payment-collection/index.ts","../src/payment-collection/steps/cancel-payment.ts","../src/payment-collection/steps/create-payment-account-holder.ts","../src/payment-collection/steps/create-payment-session.ts","../src/payment-collection/steps/create-refund-reasons.ts","../src/payment-collection/steps/delete-payment-sessions.ts","../src/payment-collection/steps/delete-refund-reasons.ts","../src/payment-collection/steps/index.ts","../src/payment-collection/steps/update-payment-collection.ts","../src/payment-collection/steps/update-refund-reasons.ts","../src/payment-collection/steps/validate-deleted-payment-sessions.ts","../src/payment-collection/workflows/cancel-payment-collection.ts","../src/payment-collection/workflows/create-payment-session.ts","../src/payment-collection/workflows/create-refund-reasons.ts","../src/payment-collection/workflows/delete-payment-sessions.ts","../src/payment-collection/workflows/delete-refund-reasons.ts","../src/payment-collection/workflows/index.ts","../src/payment-collection/workflows/update-refund-reasons.ts","../src/price-list/index.ts","../src/price-list/steps/create-price-list-prices.ts","../src/price-list/steps/create-price-lists.ts","../src/price-list/steps/delete-price-lists.ts","../src/price-list/steps/get-existing-price-lists-price-ids.ts","../src/price-list/steps/index.ts","../src/price-list/steps/remove-price-list-prices.ts","../src/price-list/steps/update-price-list-prices.ts","../src/price-list/steps/update-price-lists.ts","../src/price-list/steps/validate-price-lists.ts","../src/price-list/steps/validate-variant-price-links.ts","../src/price-list/workflows/batch-price-list-prices.ts","../src/price-list/workflows/create-price-list-prices.ts","../src/price-list/workflows/create-price-lists.ts","../src/price-list/workflows/delete-price-lists.ts","../src/price-list/workflows/index.ts","../src/price-list/workflows/remove-price-list-prices.ts","../src/price-list/workflows/update-price-list-prices.ts","../src/price-list/workflows/update-price-lists.ts","../src/pricing/index.ts","../src/pricing/steps/create-price-preferences.ts","../src/pricing/steps/create-price-sets.ts","../src/pricing/steps/delete-price-preferences.ts","../src/pricing/steps/index.ts","../src/pricing/steps/update-price-preferences-as-array.ts","../src/pricing/steps/update-price-preferences.ts","../src/pricing/steps/update-price-sets.ts","../src/pricing/workflows/create-price-preferences.ts","../src/pricing/workflows/delete-price-preferences.ts","../src/pricing/workflows/index.ts","../src/pricing/workflows/update-price-preferences.ts","../src/product/index.ts","../src/product/helpers/normalize-for-export.ts","../src/product/helpers/normalize-for-import.ts","../src/product/helpers/normalize-v1-import.ts","../src/product/steps/add-image-to-variants.ts","../src/product/steps/add-images-to-variant.ts","../src/product/steps/batch-link-products-collection.ts","../src/product/steps/batch-link-products-in-category.ts","../src/product/steps/create-collections.ts","../src/product/steps/create-product-options.ts","../src/product/steps/create-product-tags.ts","../src/product/steps/create-product-types.ts","../src/product/steps/create-product-variants.ts","../src/product/steps/create-products.ts","../src/product/steps/create-variant-pricing-link.ts","../src/product/steps/delete-collections.ts","../src/product/steps/delete-product-options.ts","../src/product/steps/delete-product-tags.ts","../src/product/steps/delete-product-types.ts","../src/product/steps/delete-product-variants.ts","../src/product/steps/delete-products.ts","../src/product/steps/generate-product-csv.ts","../src/product/steps/get-all-products.ts","../src/product/steps/get-products.ts","../src/product/steps/get-variant-availability.ts","../src/product/steps/get-variant-pricing-link.ts","../src/product/steps/index.ts","../src/product/steps/link-product-options-to-product.ts","../src/product/steps/normalize-products-to-chunks.ts","../src/product/steps/normalize-products.ts","../src/product/steps/parse-product-csv.ts","../src/product/steps/process-import-chunks.ts","../src/product/steps/process-product-options-for-import.ts","../src/product/steps/remove-image-from-variants.ts","../src/product/steps/remove-images-from-variant.ts","../src/product/steps/update-collections.ts","../src/product/steps/update-product-options.ts","../src/product/steps/update-product-tags.ts","../src/product/steps/update-product-types.ts","../src/product/steps/update-product-variants.ts","../src/product/steps/update-products.ts","../src/product/steps/wait-confirmation-product-import.ts","../src/product/utils/csvtojson.ts","../src/product/utils/index.ts","../src/product/utils/jsontocsv.ts","../src/product/workflows/batch-image-variants.ts","../src/product/workflows/batch-link-products-collection.ts","../src/product/workflows/batch-product-variants.ts","../src/product/workflows/batch-products-in-category.ts","../src/product/workflows/batch-products.ts","../src/product/workflows/batch-variant-images.ts","../src/product/workflows/create-and-link-product-options-to-product.ts","../src/product/workflows/create-collections.ts","../src/product/workflows/create-product-options.ts","../src/product/workflows/create-product-tags.ts","../src/product/workflows/create-product-types.ts","../src/product/workflows/create-product-variants.ts","../src/product/workflows/create-products.ts","../src/product/workflows/delete-collections.ts","../src/product/workflows/delete-product-options.ts","../src/product/workflows/delete-product-tags.ts","../src/product/workflows/delete-product-types.ts","../src/product/workflows/delete-product-variants.ts","../src/product/workflows/delete-products.ts","../src/product/workflows/export-products.ts","../src/product/workflows/import-products-as-chunks.ts","../src/product/workflows/import-products.ts","../src/product/workflows/index.ts","../src/product/workflows/update-collections.ts","../src/product/workflows/update-product-options.ts","../src/product/workflows/update-product-tags.ts","../src/product/workflows/update-product-types.ts","../src/product/workflows/update-product-variants.ts","../src/product/workflows/update-products.ts","../src/product/workflows/upsert-variant-prices.ts","../src/product-category/index.ts","../src/product-category/steps/create-product-categories.ts","../src/product-category/steps/delete-product-categories.ts","../src/product-category/steps/index.ts","../src/product-category/steps/update-product-categories.ts","../src/product-category/workflows/create-product-categories.ts","../src/product-category/workflows/delete-product-categories.ts","../src/product-category/workflows/index.ts","../src/product-category/workflows/update-product-categories.ts","../src/promotion/index.ts","../src/promotion/steps/add-campaign-promotions.ts","../src/promotion/steps/add-or-remove-campaign-promotions.ts","../src/promotion/steps/add-rules-to-promotions.ts","../src/promotion/steps/create-campaigns.ts","../src/promotion/steps/create-promotions.ts","../src/promotion/steps/delete-campaigns.ts","../src/promotion/steps/delete-promotion-rules-workflow.ts","../src/promotion/steps/delete-promotions.ts","../src/promotion/steps/index.ts","../src/promotion/steps/register-usage.ts","../src/promotion/steps/remove-campaign-promotions.ts","../src/promotion/steps/remove-rules-from-promotions.ts","../src/promotion/steps/update-campaigns.ts","../src/promotion/steps/update-promotion-rules.ts","../src/promotion/steps/update-promotions.ts","../src/promotion/workflows/add-or-remove-campaign-promotions.ts","../src/promotion/workflows/batch-promotion-rules.ts","../src/promotion/workflows/create-campaigns.ts","../src/promotion/workflows/create-promotion-rules.ts","../src/promotion/workflows/create-promotions.ts","../src/promotion/workflows/delete-campaigns.ts","../src/promotion/workflows/delete-promotion-rules.ts","../src/promotion/workflows/delete-promotions.ts","../src/promotion/workflows/index.ts","../src/promotion/workflows/update-campaigns.ts","../src/promotion/workflows/update-promotion-rules.ts","../src/promotion/workflows/update-promotions-status.ts","../src/promotion/workflows/update-promotions.ts","../src/region/index.ts","../src/region/steps/create-regions.ts","../src/region/steps/delete-regions.ts","../src/region/steps/index.ts","../src/region/steps/set-regions-payment-providers.ts","../src/region/steps/update-regions.ts","../src/region/workflows/create-regions.ts","../src/region/workflows/delete-regions.ts","../src/region/workflows/index.ts","../src/region/workflows/update-regions.ts","../src/reservation/index.ts","../src/reservation/steps/create-reservations.ts","../src/reservation/steps/delete-reservations-by-line-items.ts","../src/reservation/steps/delete-reservations.ts","../src/reservation/steps/index.ts","../src/reservation/steps/update-reservations.ts","../src/reservation/workflows/create-reservations.ts","../src/reservation/workflows/delete-reservations-by-line-items.ts","../src/reservation/workflows/delete-reservations.ts","../src/reservation/workflows/index.ts","../src/reservation/workflows/update-reservations.ts","../src/return-reason/index.ts","../src/return-reason/steps/create-return-reasons.ts","../src/return-reason/steps/delete-return-reasons.ts","../src/return-reason/steps/index.ts","../src/return-reason/steps/update-return-reasons.ts","../src/return-reason/workflows/create-return-reasons.ts","../src/return-reason/workflows/delete-return-reasons.ts","../src/return-reason/workflows/index.ts","../src/return-reason/workflows/update-return-reasons.ts","../src/sales-channel/index.ts","../src/sales-channel/steps/associate-locations-with-channels.ts","../src/sales-channel/steps/associate-products-with-channels.ts","../src/sales-channel/steps/can-delete-sales-channels.ts","../src/sales-channel/steps/create-default-sales-channel.ts","../src/sales-channel/steps/create-sales-channels.ts","../src/sales-channel/steps/delete-sales-channels.ts","../src/sales-channel/steps/detach-locations-from-channels.ts","../src/sales-channel/steps/detach-products-from-sales-channels.ts","../src/sales-channel/steps/index.ts","../src/sales-channel/steps/update-sales-channels.ts","../src/sales-channel/workflows/create-sales-channels.ts","../src/sales-channel/workflows/delete-sales-channels.ts","../src/sales-channel/workflows/index.ts","../src/sales-channel/workflows/link-products-to-sales-channel.ts","../src/sales-channel/workflows/update-sales-channels.ts","../src/settings/index.ts","../src/settings/steps/create-view-configuration.ts","../src/settings/steps/index.ts","../src/settings/steps/set-active-view-configuration.ts","../src/settings/steps/update-view-configuration.ts","../src/settings/workflows/create-view-configuration.ts","../src/settings/workflows/index.ts","../src/settings/workflows/update-view-configuration.ts","../src/shipping-options/index.ts","../src/shipping-options/steps/create-shipping-option-types.ts","../src/shipping-options/steps/delete-shipping-option-types.ts","../src/shipping-options/steps/index.ts","../src/shipping-options/steps/list-shipping-options-for-context.ts","../src/shipping-options/steps/update-shipping-option-types.ts","../src/shipping-options/workflows/create-shipping-option-types.ts","../src/shipping-options/workflows/delete-shipping-option-types.ts","../src/shipping-options/workflows/index.ts","../src/shipping-options/workflows/update-shipping-option-types.ts","../src/shipping-profile/index.ts","../src/shipping-profile/steps/delete-shipping-profile.ts","../src/shipping-profile/steps/index.ts","../src/shipping-profile/workflows/delete-shipping-profile.ts","../src/shipping-profile/workflows/index.ts","../src/stock-location/index.ts","../src/stock-location/steps/associate-locations-with-fulfillment-sets.ts","../src/stock-location/steps/create-stock-locations.ts","../src/stock-location/steps/delete-stock-locations.ts","../src/stock-location/steps/index.ts","../src/stock-location/steps/update-stock-locations.ts","../src/stock-location/steps/upsert-stock-location-addresses.ts","../src/stock-location/workflows/create-location-fulfillment-set.ts","../src/stock-location/workflows/create-stock-locations.ts","../src/stock-location/workflows/delete-stock-locations.ts","../src/stock-location/workflows/index.ts","../src/stock-location/workflows/link-sales-channels-to-stock-location.ts","../src/stock-location/workflows/update-stock-locations.ts","../src/store/index.ts","../src/store/steps/create-stores.ts","../src/store/steps/delete-stores.ts","../src/store/steps/index.ts","../src/store/steps/update-stores.ts","../src/store/workflows/create-stores.ts","../src/store/workflows/delete-stores.ts","../src/store/workflows/index.ts","../src/store/workflows/update-stores.ts","../src/tax/index.ts","../src/tax/steps/create-tax-rate-rules.ts","../src/tax/steps/create-tax-rates.ts","../src/tax/steps/create-tax-regions.ts","../src/tax/steps/delete-tax-rate-rules.ts","../src/tax/steps/delete-tax-rates.ts","../src/tax/steps/delete-tax-regions.ts","../src/tax/steps/get-item-tax-lines.ts","../src/tax/steps/index.ts","../src/tax/steps/list-tax-rate-ids.ts","../src/tax/steps/list-tax-rate-rule-ids.ts","../src/tax/steps/update-tax-rates.ts","../src/tax/steps/update-tax-regions.ts","../src/tax/workflows/create-tax-rate-rules.ts","../src/tax/workflows/create-tax-rates.ts","../src/tax/workflows/create-tax-regions.ts","../src/tax/workflows/delete-tax-rate-rules.ts","../src/tax/workflows/delete-tax-rates.ts","../src/tax/workflows/delete-tax-regions.ts","../src/tax/workflows/index.ts","../src/tax/workflows/set-tax-rate-rules.ts","../src/tax/workflows/update-tax-rates.ts","../src/tax/workflows/update-tax-regions.ts","../src/user/index.ts","../src/user/steps/create-users.ts","../src/user/steps/delete-users.ts","../src/user/steps/index.ts","../src/user/steps/update-users.ts","../src/user/workflows/create-user-account.ts","../src/user/workflows/create-users.ts","../src/user/workflows/delete-users.ts","../src/user/workflows/index.ts","../src/user/workflows/remove-user-account.ts","../src/user/workflows/update-users.ts"],"version":"5.9.3"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medusajs/core-flows",
3
- "version": "3.0.0-snapshot-20251106143524",
3
+ "version": "3.0.0-snapshot-20251114155958",
4
4
  "description": "Set of workflow definitions for Medusa",
5
5
  "main": "dist/index.js",
6
6
  "exports": {
@@ -26,7 +26,7 @@
26
26
  "author": "Medusa",
27
27
  "license": "MIT",
28
28
  "devDependencies": {
29
- "@medusajs/framework": "3.0.0-snapshot-20251106143524"
29
+ "@medusajs/framework": "3.0.0-snapshot-20251114155958"
30
30
  },
31
31
  "dependencies": {
32
32
  "csv-parse": "^5.6.0",
@@ -34,7 +34,7 @@
34
34
  "zod": "3.25.76"
35
35
  },
36
36
  "peerDependencies": {
37
- "@medusajs/framework": "3.0.0-snapshot-20251106143524"
37
+ "@medusajs/framework": "3.0.0-snapshot-20251114155958"
38
38
  },
39
39
  "scripts": {
40
40
  "build": "yarn run -T rimraf dist && yarn run -T tsc --build",
@@ -1 +0,0 @@
1
- {"version":3,"file":"link-product-options-to-product.d.ts","sourceRoot":"","sources":["../../../src/product/workflows/link-product-options-to-product.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAc7D;;GAEG;AACH,MAAM,MAAM,wCAAwC,GAAG;IACrD;;OAEG;IACH,UAAU,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,GAAG,CAAC,EAAE,CAAC,MAAM,GAAG,YAAY,CAAC,sBAAsB,CAAC,EAAE,CAAA;IACtD;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;CAClB,CAAA;AAED,eAAO,MAAM,qCAAqC,oCACf,CAAA;AACnC;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,mCAAmC,iHAqC/C,CAAA"}
@@ -1,55 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.linkProductOptionsToProductWorkflow = exports.linkProductOptionsToProductWorkflowId = void 0;
4
- const workflows_sdk_1 = require("@medusajs/framework/workflows-sdk");
5
- const steps_1 = require("../steps");
6
- const utils_1 = require("@medusajs/framework/utils");
7
- exports.linkProductOptionsToProductWorkflowId = "link-product-options-to-product";
8
- /**
9
- * This workflow adds/removes one or more product options to/from a product. It's used by the [TODO](TODO).
10
- * This workflow also creates non-existing product options before adding them to the product.
11
- *
12
- * You can also use this workflow within your customizations or your own custom workflows, allowing you to wrap custom logic around product-option and product association.
13
- *
14
- * @example
15
- * const { result } = await linkProductOptionsToProductWorkflow(container)
16
- * .run({
17
- * input: {
18
- * product_id: "prod_123"
19
- * add: [
20
- * {
21
- * title: "Size",
22
- * values: ["S", "M", "L", "XL"]
23
- * },
24
- * { id: "opt_123" }
25
- * ],
26
- * remove: ["opt_321"]
27
- * }
28
- * })
29
- *
30
- * @summary
31
- *
32
- * Add/remove one or more product options to/from a product.
33
- */
34
- exports.linkProductOptionsToProductWorkflow = (0, workflows_sdk_1.createWorkflow)(exports.linkProductOptionsToProductWorkflowId, (input) => {
35
- const { toCreate, toAdd } = (0, workflows_sdk_1.transform)({ input }, ({ input }) => {
36
- const toCreate = [];
37
- const toAdd = [];
38
- for (const option of input.add ?? []) {
39
- (0, utils_1.isString)(option) ? toAdd.push(option) : toCreate.push(option);
40
- }
41
- return { toCreate, toAdd };
42
- });
43
- const createdIds = (0, workflows_sdk_1.when)("creating-product-options", { toCreate }, ({ toCreate }) => toCreate.length > 0).then(() => {
44
- const createdOptions = (0, steps_1.createProductOptionsStep)(toCreate);
45
- return (0, workflows_sdk_1.transform)({ createdOptions }, ({ createdOptions }) => createdOptions.map((option) => option.id));
46
- });
47
- const toAddProductOptionIds = (0, workflows_sdk_1.transform)({ toAdd, createdIds }, ({ toAdd, createdIds }) => toAdd.concat(createdIds ?? []));
48
- const productOptions = (0, steps_1.linkProductOptionsToProductStep)({
49
- product_id: input.product_id,
50
- add: toAddProductOptionIds,
51
- remove: input.remove,
52
- });
53
- return new workflows_sdk_1.WorkflowResponse(productOptions);
54
- });
55
- //# sourceMappingURL=link-product-options-to-product.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"link-product-options-to-product.js","sourceRoot":"","sources":["../../../src/product/workflows/link-product-options-to-product.ts"],"names":[],"mappings":";;;AACA,qEAM0C;AAC1C,oCAGiB;AACjB,qDAAoD;AAoBvC,QAAA,qCAAqC,GAChD,iCAAiC,CAAA;AACnC;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACU,QAAA,mCAAmC,GAAG,IAAA,8BAAc,EAC/D,6CAAqC,EACrC,CAAC,KAA6D,EAAE,EAAE;IAChE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,IAAA,yBAAS,EAAC,EAAE,KAAK,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;QAC7D,MAAM,QAAQ,GAA0C,EAAE,CAAA;QAC1D,MAAM,KAAK,GAAa,EAAE,CAAA;QAC1B,KAAK,MAAM,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,EAAE,EAAE,CAAC;YACrC,IAAA,gBAAQ,EAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QAC/D,CAAC;QAED,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAA;IAC5B,CAAC,CAAC,CAAA;IAEF,MAAM,UAAU,GAAG,IAAA,oBAAI,EACrB,0BAA0B,EAC1B,EAAE,QAAQ,EAAE,EACZ,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CACtC,CAAC,IAAI,CAAC,GAAG,EAAE;QACV,MAAM,cAAc,GAAG,IAAA,gCAAwB,EAAC,QAAQ,CAAC,CAAA;QACzD,OAAO,IAAA,yBAAS,EAAC,EAAE,cAAc,EAAE,EAAE,CAAC,EAAE,cAAc,EAAE,EAAE,EAAE,CAC1D,cAAc,CAAC,GA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