@medusajs/core-flows 0.0.2-next-20231124140416

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 (241) hide show
  1. package/dist/definition/cart/create-cart.d.ts +9 -0
  2. package/dist/definition/cart/create-cart.js +148 -0
  3. package/dist/definition/cart/create-cart.js.map +1 -0
  4. package/dist/definition/cart/index.d.ts +1 -0
  5. package/dist/definition/cart/index.js +18 -0
  6. package/dist/definition/cart/index.js.map +1 -0
  7. package/dist/definition/index.d.ts +4 -0
  8. package/dist/definition/index.js +21 -0
  9. package/dist/definition/index.js.map +1 -0
  10. package/dist/definition/inventory/create-inventory-item.d.ts +14 -0
  11. package/dist/definition/inventory/create-inventory-item.js +41 -0
  12. package/dist/definition/inventory/create-inventory-item.js.map +1 -0
  13. package/dist/definition/inventory/index.d.ts +1 -0
  14. package/dist/definition/inventory/index.js +18 -0
  15. package/dist/definition/inventory/index.js.map +1 -0
  16. package/dist/definition/price-list/create-price-lists.d.ts +13 -0
  17. package/dist/definition/price-list/create-price-lists.js +55 -0
  18. package/dist/definition/price-list/create-price-lists.js.map +1 -0
  19. package/dist/definition/price-list/index.d.ts +6 -0
  20. package/dist/definition/price-list/index.js +23 -0
  21. package/dist/definition/price-list/index.js.map +1 -0
  22. package/dist/definition/price-list/remove-price-list-prices.d.ts +11 -0
  23. package/dist/definition/price-list/remove-price-list-prices.js +50 -0
  24. package/dist/definition/price-list/remove-price-list-prices.js.map +1 -0
  25. package/dist/definition/price-list/remove-price-lists.d.ts +12 -0
  26. package/dist/definition/price-list/remove-price-lists.js +40 -0
  27. package/dist/definition/price-list/remove-price-lists.js.map +1 -0
  28. package/dist/definition/price-list/remove-product-prices.d.ts +11 -0
  29. package/dist/definition/price-list/remove-product-prices.js +51 -0
  30. package/dist/definition/price-list/remove-product-prices.js.map +1 -0
  31. package/dist/definition/price-list/remove-variant-prices.d.ts +11 -0
  32. package/dist/definition/price-list/remove-variant-prices.js +51 -0
  33. package/dist/definition/price-list/remove-variant-prices.js.map +1 -0
  34. package/dist/definition/price-list/update-price-lists.d.ts +13 -0
  35. package/dist/definition/price-list/update-price-lists.js +51 -0
  36. package/dist/definition/price-list/update-price-lists.js.map +1 -0
  37. package/dist/definition/product/create-product-variants.d.ts +15 -0
  38. package/dist/definition/product/create-product-variants.js +91 -0
  39. package/dist/definition/product/create-product-variants.js.map +1 -0
  40. package/dist/definition/product/create-products.d.ts +18 -0
  41. package/dist/definition/product/create-products.js +211 -0
  42. package/dist/definition/product/create-products.js.map +1 -0
  43. package/dist/definition/product/index.d.ts +4 -0
  44. package/dist/definition/product/index.js +34 -0
  45. package/dist/definition/product/index.js.map +1 -0
  46. package/dist/definition/product/prepare-create-inventory-items.d.ts +23 -0
  47. package/dist/definition/product/prepare-create-inventory-items.js +28 -0
  48. package/dist/definition/product/prepare-create-inventory-items.js.map +1 -0
  49. package/dist/definition/product/update-product-variants.d.ts +15 -0
  50. package/dist/definition/product/update-product-variants.js +81 -0
  51. package/dist/definition/product/update-product-variants.js.map +1 -0
  52. package/dist/definition/product/update-products.d.ts +19 -0
  53. package/dist/definition/product/update-products.js +328 -0
  54. package/dist/definition/product/update-products.js.map +1 -0
  55. package/dist/definitions.d.ts +27 -0
  56. package/dist/definitions.js +37 -0
  57. package/dist/definitions.js.map +1 -0
  58. package/dist/handlers/address/find-or-create-addresses.d.ts +24 -0
  59. package/dist/handlers/address/find-or-create-addresses.js +66 -0
  60. package/dist/handlers/address/find-or-create-addresses.js.map +1 -0
  61. package/dist/handlers/address/index.d.ts +1 -0
  62. package/dist/handlers/address/index.js +18 -0
  63. package/dist/handlers/address/index.js.map +1 -0
  64. package/dist/handlers/cart/attach-line-items-to-cart.d.ts +21 -0
  65. package/dist/handlers/cart/attach-line-items-to-cart.js +35 -0
  66. package/dist/handlers/cart/attach-line-items-to-cart.js.map +1 -0
  67. package/dist/handlers/cart/create-cart.d.ts +36 -0
  68. package/dist/handlers/cart/create-cart.js +27 -0
  69. package/dist/handlers/cart/create-cart.js.map +1 -0
  70. package/dist/handlers/cart/index.d.ts +4 -0
  71. package/dist/handlers/cart/index.js +21 -0
  72. package/dist/handlers/cart/index.js.map +1 -0
  73. package/dist/handlers/cart/remove-cart.d.ts +14 -0
  74. package/dist/handlers/cart/remove-cart.js +17 -0
  75. package/dist/handlers/cart/remove-cart.js.map +1 -0
  76. package/dist/handlers/cart/retrieve-cart.d.ts +22 -0
  77. package/dist/handlers/cart/retrieve-cart.js +18 -0
  78. package/dist/handlers/cart/retrieve-cart.js.map +1 -0
  79. package/dist/handlers/common/index.d.ts +1 -0
  80. package/dist/handlers/common/index.js +18 -0
  81. package/dist/handlers/common/index.js.map +1 -0
  82. package/dist/handlers/common/set-context.d.ts +17 -0
  83. package/dist/handlers/common/set-context.js +16 -0
  84. package/dist/handlers/common/set-context.js.map +1 -0
  85. package/dist/handlers/customer/find-or-create-customer.d.ts +19 -0
  86. package/dist/handlers/customer/find-or-create-customer.js +38 -0
  87. package/dist/handlers/customer/find-or-create-customer.js.map +1 -0
  88. package/dist/handlers/customer/index.d.ts +1 -0
  89. package/dist/handlers/customer/index.js +18 -0
  90. package/dist/handlers/customer/index.js.map +1 -0
  91. package/dist/handlers/index.d.ts +10 -0
  92. package/dist/handlers/index.js +37 -0
  93. package/dist/handlers/index.js.map +1 -0
  94. package/dist/handlers/inventory/attach-inventory-items.d.ts +16 -0
  95. package/dist/handlers/inventory/attach-inventory-items.js +23 -0
  96. package/dist/handlers/inventory/attach-inventory-items.js.map +1 -0
  97. package/dist/handlers/inventory/create-inventory-items.d.ts +17 -0
  98. package/dist/handlers/inventory/create-inventory-items.js +31 -0
  99. package/dist/handlers/inventory/create-inventory-items.js.map +1 -0
  100. package/dist/handlers/inventory/detach-inventory-items.d.ts +16 -0
  101. package/dist/handlers/inventory/detach-inventory-items.js +22 -0
  102. package/dist/handlers/inventory/detach-inventory-items.js.map +1 -0
  103. package/dist/handlers/inventory/index.d.ts +5 -0
  104. package/dist/handlers/inventory/index.js +22 -0
  105. package/dist/handlers/inventory/index.js.map +1 -0
  106. package/dist/handlers/inventory/remove-inventory-items.d.ts +14 -0
  107. package/dist/handlers/inventory/remove-inventory-items.js +18 -0
  108. package/dist/handlers/inventory/remove-inventory-items.js.map +1 -0
  109. package/dist/handlers/inventory/restore-inventory-items.d.ts +12 -0
  110. package/dist/handlers/inventory/restore-inventory-items.js +18 -0
  111. package/dist/handlers/inventory/restore-inventory-items.js.map +1 -0
  112. package/dist/handlers/middlewares/create-products-prepare-create-prices-compensation.d.ts +26 -0
  113. package/dist/handlers/middlewares/create-products-prepare-create-prices-compensation.js +31 -0
  114. package/dist/handlers/middlewares/create-products-prepare-create-prices-compensation.js.map +1 -0
  115. package/dist/handlers/middlewares/extract-variants.d.ts +18 -0
  116. package/dist/handlers/middlewares/extract-variants.js +23 -0
  117. package/dist/handlers/middlewares/extract-variants.js.map +1 -0
  118. package/dist/handlers/middlewares/index.d.ts +6 -0
  119. package/dist/handlers/middlewares/index.js +23 -0
  120. package/dist/handlers/middlewares/index.js.map +1 -0
  121. package/dist/handlers/middlewares/map-data.d.ts +11 -0
  122. package/dist/handlers/middlewares/map-data.js +19 -0
  123. package/dist/handlers/middlewares/map-data.js.map +1 -0
  124. package/dist/handlers/middlewares/update-products-extract-created-variants.d.ts +19 -0
  125. package/dist/handlers/middlewares/update-products-extract-created-variants.js +27 -0
  126. package/dist/handlers/middlewares/update-products-extract-created-variants.js.map +1 -0
  127. package/dist/handlers/middlewares/update-products-extract-deleted-variants.d.ts +19 -0
  128. package/dist/handlers/middlewares/update-products-extract-deleted-variants.js +29 -0
  129. package/dist/handlers/middlewares/update-products-extract-deleted-variants.js.map +1 -0
  130. package/dist/handlers/middlewares/use-variants-inventory-items.d.ts +24 -0
  131. package/dist/handlers/middlewares/use-variants-inventory-items.js +31 -0
  132. package/dist/handlers/middlewares/use-variants-inventory-items.js.map +1 -0
  133. package/dist/handlers/price-list/create-price-list.d.ts +18 -0
  134. package/dist/handlers/price-list/create-price-list.js +18 -0
  135. package/dist/handlers/price-list/create-price-list.js.map +1 -0
  136. package/dist/handlers/price-list/index.d.ts +10 -0
  137. package/dist/handlers/price-list/index.js +27 -0
  138. package/dist/handlers/price-list/index.js.map +1 -0
  139. package/dist/handlers/price-list/prepare-create-price-list.d.ts +17 -0
  140. package/dist/handlers/price-list/prepare-create-price-list.js +57 -0
  141. package/dist/handlers/price-list/prepare-create-price-list.js.map +1 -0
  142. package/dist/handlers/price-list/prepare-remove-price-list-prices.d.ts +15 -0
  143. package/dist/handlers/price-list/prepare-remove-price-list-prices.js +23 -0
  144. package/dist/handlers/price-list/prepare-remove-price-list-prices.js.map +1 -0
  145. package/dist/handlers/price-list/prepare-remove-product-prices.d.ts +10 -0
  146. package/dist/handlers/price-list/prepare-remove-product-prices.js +35 -0
  147. package/dist/handlers/price-list/prepare-remove-product-prices.js.map +1 -0
  148. package/dist/handlers/price-list/prepare-remove-variant-prices.d.ts +10 -0
  149. package/dist/handlers/price-list/prepare-remove-variant-prices.js +33 -0
  150. package/dist/handlers/price-list/prepare-remove-variant-prices.js.map +1 -0
  151. package/dist/handlers/price-list/prepare-update-price-lists.d.ts +15 -0
  152. package/dist/handlers/price-list/prepare-update-price-lists.js +58 -0
  153. package/dist/handlers/price-list/prepare-update-price-lists.js.map +1 -0
  154. package/dist/handlers/price-list/remove-price-list.d.ts +14 -0
  155. package/dist/handlers/price-list/remove-price-list.js +14 -0
  156. package/dist/handlers/price-list/remove-price-list.js.map +1 -0
  157. package/dist/handlers/price-list/remove-price-set-price-list-prices.d.ts +5 -0
  158. package/dist/handlers/price-list/remove-price-set-price-list-prices.js +25 -0
  159. package/dist/handlers/price-list/remove-price-set-price-list-prices.js.map +1 -0
  160. package/dist/handlers/price-list/remove-prices.d.ts +13 -0
  161. package/dist/handlers/price-list/remove-prices.js +17 -0
  162. package/dist/handlers/price-list/remove-prices.js.map +1 -0
  163. package/dist/handlers/price-list/update-price-lists.d.ts +15 -0
  164. package/dist/handlers/price-list/update-price-lists.js +38 -0
  165. package/dist/handlers/price-list/update-price-lists.js.map +1 -0
  166. package/dist/handlers/product/attach-sales-channel-to-products.d.ts +18 -0
  167. package/dist/handlers/product/attach-sales-channel-to-products.js +30 -0
  168. package/dist/handlers/product/attach-sales-channel-to-products.js.map +1 -0
  169. package/dist/handlers/product/attach-shipping-profile-to-products.d.ts +18 -0
  170. package/dist/handlers/product/attach-shipping-profile-to-products.js +28 -0
  171. package/dist/handlers/product/attach-shipping-profile-to-products.js.map +1 -0
  172. package/dist/handlers/product/create-product-variants-prepare-data.d.ts +21 -0
  173. package/dist/handlers/product/create-product-variants-prepare-data.js +35 -0
  174. package/dist/handlers/product/create-product-variants-prepare-data.js.map +1 -0
  175. package/dist/handlers/product/create-product-variants.d.ts +23 -0
  176. package/dist/handlers/product/create-product-variants.js +22 -0
  177. package/dist/handlers/product/create-product-variants.js.map +1 -0
  178. package/dist/handlers/product/create-products-prepare-data.d.ts +28 -0
  179. package/dist/handlers/product/create-products-prepare-data.js +77 -0
  180. package/dist/handlers/product/create-products-prepare-data.js.map +1 -0
  181. package/dist/handlers/product/create-products.d.ts +12 -0
  182. package/dist/handlers/product/create-products.js +14 -0
  183. package/dist/handlers/product/create-products.js.map +1 -0
  184. package/dist/handlers/product/detach-sales-channel-from-products.d.ts +18 -0
  185. package/dist/handlers/product/detach-sales-channel-from-products.js +30 -0
  186. package/dist/handlers/product/detach-sales-channel-from-products.js.map +1 -0
  187. package/dist/handlers/product/detach-shipping-profile-from-products.d.ts +18 -0
  188. package/dist/handlers/product/detach-shipping-profile-from-products.js +28 -0
  189. package/dist/handlers/product/detach-shipping-profile-from-products.js.map +1 -0
  190. package/dist/handlers/product/index.d.ts +19 -0
  191. package/dist/handlers/product/index.js +36 -0
  192. package/dist/handlers/product/index.js.map +1 -0
  193. package/dist/handlers/product/list-products.d.ts +13 -0
  194. package/dist/handlers/product/list-products.js +31 -0
  195. package/dist/handlers/product/list-products.js.map +1 -0
  196. package/dist/handlers/product/remove-product-variants.d.ts +13 -0
  197. package/dist/handlers/product/remove-product-variants.js +16 -0
  198. package/dist/handlers/product/remove-product-variants.js.map +1 -0
  199. package/dist/handlers/product/remove-products.d.ts +13 -0
  200. package/dist/handlers/product/remove-products.js +16 -0
  201. package/dist/handlers/product/remove-products.js.map +1 -0
  202. package/dist/handlers/product/revert-update-products.d.ts +14 -0
  203. package/dist/handlers/product/revert-update-products.js +20 -0
  204. package/dist/handlers/product/revert-update-products.js.map +1 -0
  205. package/dist/handlers/product/revert-variant-prices.d.ts +14 -0
  206. package/dist/handlers/product/revert-variant-prices.js +28 -0
  207. package/dist/handlers/product/revert-variant-prices.js.map +1 -0
  208. package/dist/handlers/product/update-product-variants-prepare-data.d.ts +21 -0
  209. package/dist/handlers/product/update-product-variants-prepare-data.js +48 -0
  210. package/dist/handlers/product/update-product-variants-prepare-data.js.map +1 -0
  211. package/dist/handlers/product/update-product-variants.d.ts +12 -0
  212. package/dist/handlers/product/update-product-variants.js +23 -0
  213. package/dist/handlers/product/update-product-variants.js.map +1 -0
  214. package/dist/handlers/product/update-products-prepare-data.d.ts +25 -0
  215. package/dist/handlers/product/update-products-prepare-data.js +65 -0
  216. package/dist/handlers/product/update-products-prepare-data.js.map +1 -0
  217. package/dist/handlers/product/update-products-variants-prices.d.ts +18 -0
  218. package/dist/handlers/product/update-products-variants-prices.js +90 -0
  219. package/dist/handlers/product/update-products-variants-prices.js.map +1 -0
  220. package/dist/handlers/product/update-products.d.ts +12 -0
  221. package/dist/handlers/product/update-products.js +29 -0
  222. package/dist/handlers/product/update-products.js.map +1 -0
  223. package/dist/handlers/product/upsert-variant-prices.d.ts +25 -0
  224. package/dist/handlers/product/upsert-variant-prices.js +122 -0
  225. package/dist/handlers/product/upsert-variant-prices.js.map +1 -0
  226. package/dist/handlers/region/find-region.d.ts +17 -0
  227. package/dist/handlers/region/find-region.js +29 -0
  228. package/dist/handlers/region/find-region.js.map +1 -0
  229. package/dist/handlers/region/index.d.ts +1 -0
  230. package/dist/handlers/region/index.js +18 -0
  231. package/dist/handlers/region/index.js.map +1 -0
  232. package/dist/handlers/sales-channel/find-sales-channel.d.ts +20 -0
  233. package/dist/handlers/sales-channel/find-sales-channel.js +41 -0
  234. package/dist/handlers/sales-channel/find-sales-channel.js.map +1 -0
  235. package/dist/handlers/sales-channel/index.d.ts +1 -0
  236. package/dist/handlers/sales-channel/index.js +18 -0
  237. package/dist/handlers/sales-channel/index.js.map +1 -0
  238. package/dist/index.d.ts +3 -0
  239. package/dist/index.js +33 -0
  240. package/dist/index.js.map +1 -0
  241. package/package.json +42 -0
package/package.json ADDED
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "@medusajs/core-flows",
3
+ "version": "0.0.2-next-20231124140416",
4
+ "description": "Set of workflow definitions for Medusa",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/medusajs/medusa",
10
+ "directory": "packages/core-flows"
11
+ },
12
+ "publishConfig": {
13
+ "access": "public"
14
+ },
15
+ "files": [
16
+ "dist"
17
+ ],
18
+ "author": "Medusa",
19
+ "license": "MIT",
20
+ "devDependencies": {
21
+ "@medusajs/types": "1.11.8-next-20231124140416",
22
+ "cross-env": "^5.2.1",
23
+ "jest": "^29.6.3",
24
+ "rimraf": "^5.0.1",
25
+ "ts-jest": "^29.1.1",
26
+ "typescript": "^5.1.6"
27
+ },
28
+ "dependencies": {
29
+ "@medusajs/modules-sdk": "1.12.4-next-20231124140416",
30
+ "@medusajs/orchestration": "0.5.0-next-20231124140416",
31
+ "@medusajs/utils": "1.11.1-next-20231124140416",
32
+ "@medusajs/workflows-sdk": "0.2.0-next-20231124140416",
33
+ "awilix": "^8.0.1",
34
+ "ulid": "^2.3.0"
35
+ },
36
+ "scripts": {
37
+ "prepublishOnly": "cross-env NODE_ENV=production tsc --build",
38
+ "build": "rimraf dist && tsc --build",
39
+ "watch": "tsc --build --watch",
40
+ "test": "jest --runInBand --bail --forceExit --passWithNoTests"
41
+ }
42
+ }