@mercurjs/core 2.1.2 → 2.2.0-canary.1

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 (725) hide show
  1. package/.medusa/server/src/api/admin/commission-rates/validators.d.ts +8 -8
  2. package/.medusa/server/src/api/admin/middlewares.js +20 -30
  3. package/.medusa/server/src/api/admin/offers/[id]/route.d.ts +3 -0
  4. package/.medusa/server/src/api/admin/offers/[id]/route.js +37 -0
  5. package/.medusa/server/src/api/admin/offers/batch/route.d.ts +3 -0
  6. package/.medusa/server/src/api/admin/offers/batch/route.js +37 -0
  7. package/.medusa/server/src/api/admin/offers/middlewares.d.ts +2 -0
  8. package/.medusa/server/src/api/admin/offers/middlewares.js +31 -0
  9. package/.medusa/server/src/api/admin/offers/query-config.d.ts +11 -0
  10. package/.medusa/server/src/api/admin/offers/query-config.js +47 -0
  11. package/.medusa/server/src/api/admin/offers/route.d.ts +3 -0
  12. package/.medusa/server/src/api/admin/offers/route.js +21 -0
  13. package/.medusa/server/src/api/admin/offers/validators.d.ts +299 -0
  14. package/.medusa/server/src/api/admin/offers/validators.js +65 -0
  15. package/.medusa/server/src/api/admin/product-attributes/[id]/route.d.ts +7 -0
  16. package/.medusa/server/src/api/admin/product-attributes/[id]/route.js +51 -0
  17. package/.medusa/server/src/api/admin/product-attributes/[id]/values/[value_id]/route.d.ts +6 -0
  18. package/.medusa/server/src/api/admin/product-attributes/[id]/values/[value_id]/route.js +37 -0
  19. package/.medusa/server/src/api/admin/product-attributes/[id]/values/route.d.ts +4 -0
  20. package/.medusa/server/src/api/admin/product-attributes/[id]/values/route.js +22 -0
  21. package/.medusa/server/src/api/admin/product-attributes/middlewares.d.ts +2 -0
  22. package/.medusa/server/src/api/admin/product-attributes/middlewares.js +75 -0
  23. package/.medusa/server/src/api/admin/product-attributes/query-config.d.ts +12 -0
  24. package/.medusa/server/src/api/admin/product-attributes/query-config.js +34 -0
  25. package/.medusa/server/src/api/admin/product-attributes/route.d.ts +6 -0
  26. package/.medusa/server/src/api/admin/product-attributes/route.js +38 -0
  27. package/.medusa/server/src/api/admin/product-attributes/validators.d.ts +548 -0
  28. package/.medusa/server/src/api/admin/product-attributes/validators.js +128 -0
  29. package/.medusa/server/src/api/admin/product-brands/[id]/route.d.ts +7 -0
  30. package/.medusa/server/src/api/admin/product-brands/[id]/route.js +51 -0
  31. package/.medusa/server/src/api/admin/product-brands/[id]/sellers/route.d.ts +3 -0
  32. package/.medusa/server/src/api/admin/product-brands/[id]/sellers/route.js +20 -0
  33. package/.medusa/server/src/api/admin/product-brands/middlewares.d.ts +2 -0
  34. package/.medusa/server/src/api/admin/product-brands/middlewares.js +49 -0
  35. package/.medusa/server/src/api/admin/product-brands/query-config.d.ts +12 -0
  36. package/.medusa/server/src/api/admin/product-brands/query-config.js +24 -0
  37. package/.medusa/server/src/api/admin/product-brands/route.d.ts +6 -0
  38. package/.medusa/server/src/api/admin/product-brands/route.js +38 -0
  39. package/.medusa/server/src/api/admin/product-brands/validators.d.ts +284 -0
  40. package/.medusa/server/src/api/admin/product-brands/validators.js +41 -0
  41. package/.medusa/server/src/api/admin/product-categories/[id]/products/route.d.ts +3 -0
  42. package/.medusa/server/src/api/admin/product-categories/[id]/products/route.js +20 -0
  43. package/.medusa/server/src/api/admin/product-categories/[id]/route.d.ts +7 -0
  44. package/.medusa/server/src/api/admin/product-categories/[id]/route.js +50 -0
  45. package/.medusa/server/src/api/admin/product-categories/[id]/sellers/route.d.ts +3 -0
  46. package/.medusa/server/src/api/admin/product-categories/[id]/sellers/route.js +20 -0
  47. package/.medusa/server/src/api/admin/product-categories/middlewares.d.ts +2 -0
  48. package/.medusa/server/src/api/admin/product-categories/middlewares.js +54 -0
  49. package/.medusa/server/src/api/admin/product-categories/query-config.d.ts +12 -0
  50. package/.medusa/server/src/api/admin/product-categories/query-config.js +32 -0
  51. package/.medusa/server/src/api/admin/product-categories/route.d.ts +6 -0
  52. package/.medusa/server/src/api/admin/product-categories/route.js +39 -0
  53. package/.medusa/server/src/api/admin/product-categories/validators.d.ts +446 -0
  54. package/.medusa/server/src/api/admin/product-categories/validators.js +65 -0
  55. package/.medusa/server/src/api/admin/product-changes/[id]/cancel/route.d.ts +10 -0
  56. package/.medusa/server/src/api/admin/product-changes/[id]/cancel/route.js +33 -0
  57. package/.medusa/server/src/api/admin/product-changes/[id]/confirm/route.d.ts +10 -0
  58. package/.medusa/server/src/api/admin/product-changes/[id]/confirm/route.js +27 -0
  59. package/.medusa/server/src/api/admin/product-changes/middlewares.d.ts +2 -0
  60. package/.medusa/server/src/api/admin/product-changes/middlewares.js +18 -0
  61. package/.medusa/server/src/api/admin/product-changes/validators.d.ts +17 -0
  62. package/.medusa/server/src/api/admin/product-changes/validators.js +15 -0
  63. package/.medusa/server/src/api/admin/products/[id]/attributes/[attribute_id]/route.d.ts +7 -0
  64. package/.medusa/server/src/api/admin/products/[id]/attributes/[attribute_id]/route.js +53 -0
  65. package/.medusa/server/src/api/admin/products/[id]/attributes/batch/route.d.ts +3 -0
  66. package/.medusa/server/src/api/admin/products/[id]/attributes/batch/route.js +36 -0
  67. package/.medusa/server/src/api/admin/products/[id]/attributes/route.d.ts +6 -0
  68. package/.medusa/server/src/api/admin/products/[id]/attributes/route.js +48 -0
  69. package/.medusa/server/src/api/admin/products/[id]/confirm/route.d.ts +4 -0
  70. package/.medusa/server/src/api/admin/products/[id]/confirm/route.js +26 -0
  71. package/.medusa/server/src/api/admin/products/[id]/preview/route.d.ts +5 -0
  72. package/.medusa/server/src/api/admin/products/[id]/preview/route.js +14 -0
  73. package/.medusa/server/src/api/admin/products/[id]/reject/route.d.ts +4 -0
  74. package/.medusa/server/src/api/admin/products/[id]/reject/route.js +27 -0
  75. package/.medusa/server/src/api/admin/products/[id]/request-changes/route.d.ts +4 -0
  76. package/.medusa/server/src/api/admin/products/[id]/request-changes/route.js +27 -0
  77. package/.medusa/server/src/api/admin/products/[id]/route.d.ts +7 -0
  78. package/.medusa/server/src/api/admin/products/[id]/route.js +55 -0
  79. package/.medusa/server/src/api/admin/products/[id]/variants/[variant_id]/route.d.ts +7 -0
  80. package/.medusa/server/src/api/admin/products/[id]/variants/[variant_id]/route.js +60 -0
  81. package/.medusa/server/src/api/admin/products/[id]/variants/route.d.ts +6 -0
  82. package/.medusa/server/src/api/admin/products/[id]/variants/route.js +41 -0
  83. package/.medusa/server/src/api/admin/products/batch/route.d.ts +4 -0
  84. package/.medusa/server/src/api/admin/products/batch/route.js +36 -0
  85. package/.medusa/server/src/api/admin/products/middlewares.d.ts +2 -0
  86. package/.medusa/server/src/api/admin/products/middlewares.js +161 -0
  87. package/.medusa/server/src/api/admin/products/query-config.d.ts +25 -0
  88. package/.medusa/server/src/api/admin/products/query-config.js +101 -0
  89. package/.medusa/server/src/api/admin/products/route.d.ts +4 -2
  90. package/.medusa/server/src/api/admin/products/route.js +48 -1
  91. package/.medusa/server/src/api/admin/products/validators.d.ts +2076 -799
  92. package/.medusa/server/src/api/admin/products/validators.js +254 -4
  93. package/.medusa/server/src/api/admin/sellers/validators.d.ts +12 -12
  94. package/.medusa/server/src/api/store/carts/[id]/line-items/route.d.ts +3 -0
  95. package/.medusa/server/src/api/store/carts/[id]/line-items/route.js +20 -0
  96. package/.medusa/server/src/api/store/carts/[id]/line-items/validators.d.ts +27 -0
  97. package/.medusa/server/src/api/store/carts/[id]/line-items/validators.js +16 -0
  98. package/.medusa/server/src/api/store/carts/middlewares.js +26 -1
  99. package/.medusa/server/src/api/store/middlewares.js +11 -5
  100. package/.medusa/server/src/api/store/product-attributes/[id]/route.d.ts +2 -0
  101. package/.medusa/server/src/api/store/product-attributes/[id]/route.js +18 -0
  102. package/.medusa/server/src/api/store/product-attributes/middlewares.d.ts +2 -0
  103. package/.medusa/server/src/api/store/product-attributes/middlewares.js +31 -0
  104. package/.medusa/server/src/api/store/product-attributes/query-config.d.ts +12 -0
  105. package/.medusa/server/src/api/store/product-attributes/query-config.js +31 -0
  106. package/.medusa/server/src/api/store/product-attributes/route.d.ts +2 -0
  107. package/.medusa/server/src/api/store/product-attributes/route.js +21 -0
  108. package/.medusa/server/src/api/store/product-attributes/validators.d.ts +234 -0
  109. package/.medusa/server/src/api/store/product-attributes/validators.js +26 -0
  110. package/.medusa/server/src/api/store/product-brands/[id]/route.d.ts +2 -0
  111. package/.medusa/server/src/api/store/product-brands/[id]/route.js +18 -0
  112. package/.medusa/server/src/api/store/product-brands/middlewares.d.ts +2 -0
  113. package/.medusa/server/src/api/store/product-brands/middlewares.js +23 -0
  114. package/.medusa/server/src/api/store/product-brands/query-config.d.ts +12 -0
  115. package/.medusa/server/src/api/store/product-brands/query-config.js +23 -0
  116. package/.medusa/server/src/api/store/product-brands/route.d.ts +2 -0
  117. package/.medusa/server/src/api/store/product-brands/route.js +21 -0
  118. package/.medusa/server/src/api/store/product-brands/validators.d.ts +215 -0
  119. package/.medusa/server/src/api/store/product-brands/validators.js +21 -0
  120. package/.medusa/server/src/api/store/product-categories/[id]/route.d.ts +2 -0
  121. package/.medusa/server/src/api/store/product-categories/[id]/route.js +18 -0
  122. package/.medusa/server/src/api/store/product-categories/middlewares.d.ts +2 -0
  123. package/.medusa/server/src/api/store/product-categories/middlewares.js +31 -0
  124. package/.medusa/server/src/api/store/product-categories/query-config.d.ts +12 -0
  125. package/.medusa/server/src/api/store/product-categories/query-config.js +28 -0
  126. package/.medusa/server/src/api/store/product-categories/route.d.ts +2 -0
  127. package/.medusa/server/src/api/store/product-categories/route.js +21 -0
  128. package/.medusa/server/src/api/store/product-categories/validators.d.ts +240 -0
  129. package/.medusa/server/src/api/store/product-categories/validators.js +27 -0
  130. package/.medusa/server/src/api/store/products/[id]/route.d.ts +2 -0
  131. package/.medusa/server/src/api/store/products/[id]/route.js +47 -0
  132. package/.medusa/server/src/api/store/products/middlewares.d.ts +1 -1
  133. package/.medusa/server/src/api/store/products/middlewares.js +29 -5
  134. package/.medusa/server/src/api/store/products/query-config.d.ts +14 -0
  135. package/.medusa/server/src/api/store/products/query-config.js +58 -0
  136. package/.medusa/server/src/api/store/products/route.d.ts +2 -0
  137. package/.medusa/server/src/api/store/products/route.js +44 -0
  138. package/.medusa/server/src/api/store/products/validators.d.ts +276 -0
  139. package/.medusa/server/src/api/store/products/validators.js +33 -0
  140. package/.medusa/server/src/api/utils/format-product-attributes.d.ts +8 -0
  141. package/.medusa/server/src/api/utils/format-product-attributes.js +44 -0
  142. package/.medusa/server/src/api/utils/index.d.ts +1 -0
  143. package/.medusa/server/src/api/utils/index.js +2 -1
  144. package/.medusa/server/src/api/utils/wrap-variants-with-offers-inventory.d.ts +12 -0
  145. package/.medusa/server/src/api/utils/wrap-variants-with-offers-inventory.js +165 -0
  146. package/.medusa/server/src/api/utils/wrap-variants-with-offers-prices.d.ts +12 -0
  147. package/.medusa/server/src/api/utils/wrap-variants-with-offers-prices.js +64 -0
  148. package/.medusa/server/src/api/vendor/collections/validators.d.ts +4 -4
  149. package/.medusa/server/src/api/vendor/inventory-items/route.js +1 -1
  150. package/.medusa/server/src/api/vendor/inventory-items/validators.d.ts +56 -56
  151. package/.medusa/server/src/api/vendor/middlewares.js +55 -51
  152. package/.medusa/server/src/api/vendor/offers/[id]/inventory-items/batch/route.d.ts +3 -0
  153. package/.medusa/server/src/api/vendor/offers/[id]/inventory-items/batch/route.js +24 -0
  154. package/.medusa/server/src/api/vendor/offers/[id]/route.d.ts +5 -0
  155. package/.medusa/server/src/api/vendor/offers/[id]/route.js +38 -0
  156. package/.medusa/server/src/api/vendor/{products/[id]/variants/[variant_id]/media → offers/batch}/route.d.ts +2 -2
  157. package/.medusa/server/src/api/vendor/offers/batch/route.js +34 -0
  158. package/.medusa/server/src/api/vendor/offers/helpers.d.ts +3 -0
  159. package/.medusa/server/src/api/vendor/offers/helpers.js +27 -0
  160. package/.medusa/server/src/api/vendor/offers/middlewares.d.ts +2 -0
  161. package/.medusa/server/src/api/vendor/offers/middlewares.js +65 -0
  162. package/.medusa/server/src/api/vendor/offers/query-config.d.ts +11 -0
  163. package/.medusa/server/src/api/vendor/offers/query-config.js +47 -0
  164. package/.medusa/server/src/api/vendor/offers/route.d.ts +4 -0
  165. package/.medusa/server/src/api/vendor/offers/route.js +41 -0
  166. package/.medusa/server/src/api/vendor/offers/validators.d.ts +607 -0
  167. package/.medusa/server/src/api/vendor/offers/validators.js +119 -0
  168. package/.medusa/server/src/api/vendor/price-lists/validators.d.ts +24 -24
  169. package/.medusa/server/src/api/vendor/product-attributes/[id]/route.d.ts +3 -0
  170. package/.medusa/server/src/api/vendor/product-attributes/[id]/route.js +18 -0
  171. package/.medusa/server/src/api/vendor/product-attributes/middlewares.d.ts +2 -0
  172. package/.medusa/server/src/api/vendor/product-attributes/middlewares.js +23 -0
  173. package/.medusa/server/src/api/vendor/product-attributes/query-config.d.ts +12 -0
  174. package/.medusa/server/src/api/vendor/product-attributes/query-config.js +34 -0
  175. package/.medusa/server/src/api/vendor/product-attributes/route.d.ts +3 -0
  176. package/.medusa/server/src/api/vendor/product-attributes/route.js +23 -0
  177. package/.medusa/server/src/api/vendor/product-attributes/validators.d.ts +394 -0
  178. package/.medusa/server/src/api/vendor/product-attributes/validators.js +85 -0
  179. package/.medusa/server/src/api/vendor/{attributes → product-brands/[id]}/route.d.ts +2 -1
  180. package/.medusa/server/src/api/vendor/product-brands/[id]/route.js +18 -0
  181. package/.medusa/server/src/api/vendor/product-brands/middlewares.d.ts +2 -0
  182. package/.medusa/server/src/api/vendor/product-brands/middlewares.js +23 -0
  183. package/.medusa/server/src/api/vendor/product-brands/query-config.d.ts +12 -0
  184. package/.medusa/server/src/api/vendor/product-brands/query-config.js +24 -0
  185. package/.medusa/server/src/api/vendor/product-brands/route.d.ts +3 -0
  186. package/.medusa/server/src/api/vendor/product-brands/route.js +21 -0
  187. package/.medusa/server/src/api/vendor/product-brands/validators.d.ts +221 -0
  188. package/.medusa/server/src/api/vendor/product-brands/validators.js +22 -0
  189. package/.medusa/server/src/api/vendor/product-categories/[id]/route.js +2 -4
  190. package/.medusa/server/src/api/vendor/product-categories/middlewares.js +5 -47
  191. package/.medusa/server/src/api/vendor/product-categories/query-config.d.ts +11 -8
  192. package/.medusa/server/src/api/vendor/product-categories/query-config.js +17 -12
  193. package/.medusa/server/src/api/vendor/product-categories/validators.d.ts +328 -44
  194. package/.medusa/server/src/api/vendor/product-categories/validators.js +20 -11
  195. package/.medusa/server/src/api/vendor/product-variants/middlewares.js +34 -11
  196. package/.medusa/server/src/api/vendor/product-variants/query-config.d.ts +2 -2
  197. package/.medusa/server/src/api/vendor/product-variants/query-config.js +16 -13
  198. package/.medusa/server/src/api/vendor/product-variants/route.d.ts +2 -1
  199. package/.medusa/server/src/api/vendor/product-variants/route.js +1 -1
  200. package/.medusa/server/src/api/vendor/product-variants/validators.d.ts +377 -21
  201. package/.medusa/server/src/api/vendor/product-variants/validators.js +14 -8
  202. package/.medusa/server/src/api/vendor/products/[id]/attributes/[attribute_id]/route.d.ts +7 -2
  203. package/.medusa/server/src/api/vendor/products/[id]/attributes/[attribute_id]/route.js +25 -137
  204. package/.medusa/server/src/api/vendor/products/[id]/attributes/route.d.ts +8 -0
  205. package/.medusa/server/src/api/vendor/products/[id]/attributes/route.js +39 -103
  206. package/.medusa/server/src/api/vendor/products/[id]/cancel/route.d.ts +13 -0
  207. package/.medusa/server/src/api/vendor/products/[id]/cancel/route.js +46 -0
  208. package/.medusa/server/src/api/vendor/products/[id]/preview/route.d.ts +14 -0
  209. package/.medusa/server/src/api/vendor/products/[id]/preview/route.js +31 -0
  210. package/.medusa/server/src/api/vendor/products/[id]/route.d.ts +12 -2
  211. package/.medusa/server/src/api/vendor/products/[id]/route.js +28 -34
  212. package/.medusa/server/src/api/vendor/products/[id]/variants/[variant_id]/route.d.ts +13 -3
  213. package/.medusa/server/src/api/vendor/products/[id]/variants/[variant_id]/route.js +34 -36
  214. package/.medusa/server/src/api/vendor/products/[id]/variants/route.d.ts +7 -2
  215. package/.medusa/server/src/api/vendor/products/[id]/variants/route.js +15 -30
  216. package/.medusa/server/src/api/vendor/products/middlewares.js +54 -56
  217. package/.medusa/server/src/api/vendor/products/query-config.d.ts +4 -1
  218. package/.medusa/server/src/api/vendor/products/query-config.js +46 -13
  219. package/.medusa/server/src/api/vendor/products/route.js +11 -8
  220. package/.medusa/server/src/api/vendor/products/validators.d.ts +886 -1820
  221. package/.medusa/server/src/api/vendor/products/validators.js +182 -117
  222. package/.medusa/server/src/api/vendor/promotions/validators.d.ts +16 -16
  223. package/.medusa/server/src/api/vendor/returns/validators.d.ts +18 -18
  224. package/.medusa/server/src/api/vendor/sales-channels/[id]/products/route.js +1 -5
  225. package/.medusa/server/src/api/vendor/sellers/validators.d.ts +10 -10
  226. package/.medusa/server/src/api/vendor/shipping-options/validators.d.ts +32 -32
  227. package/.medusa/server/src/api/vendor/shipping-profiles/validators.d.ts +2 -2
  228. package/.medusa/server/src/api/vendor/stock-locations/validators.d.ts +3 -3
  229. package/.medusa/server/src/feature-flags/product-request.d.ts +3 -0
  230. package/.medusa/server/src/feature-flags/product-request.js +10 -0
  231. package/.medusa/server/src/links/brand-seller-link.js +16 -0
  232. package/.medusa/server/src/links/cart-line-item-offer-link.js +10 -0
  233. package/.medusa/server/src/links/category-seller-link.js +16 -0
  234. package/.medusa/server/src/links/offer-inventory-item-link.js +26 -0
  235. package/.medusa/server/src/links/offer-price-set-link.js +15 -0
  236. package/.medusa/server/src/links/offer-seller-link.js +15 -0
  237. package/.medusa/server/src/links/offer-shipping-profile-link.d.ts +2 -0
  238. package/.medusa/server/src/links/offer-shipping-profile-link.js +15 -0
  239. package/.medusa/server/src/links/offer-variant-link.d.ts +2 -0
  240. package/.medusa/server/src/links/offer-variant-link.js +15 -0
  241. package/.medusa/server/src/links/order-line-item-offer-link.d.ts +2 -0
  242. package/.medusa/server/src/links/order-line-item-offer-link.js +10 -0
  243. package/.medusa/server/src/links/product-seller-link.js +13 -3
  244. package/.medusa/server/src/modules/offer/index.d.ts +21 -0
  245. package/.medusa/server/src/modules/offer/index.js +12 -0
  246. package/.medusa/server/src/modules/{attribute/migrations/Migration20260325000000.d.ts → offer/migrations/Migration20260520104835.d.ts} +1 -1
  247. package/.medusa/server/src/modules/offer/migrations/Migration20260520104835.js +22 -0
  248. package/.medusa/server/src/modules/offer/models/index.d.ts +1 -0
  249. package/.medusa/server/src/modules/offer/models/index.js +9 -0
  250. package/.medusa/server/src/modules/offer/models/offer.d.ts +13 -0
  251. package/.medusa/server/src/modules/offer/models/offer.js +56 -0
  252. package/.medusa/server/src/modules/offer/service.d.ts +17 -0
  253. package/.medusa/server/src/modules/offer/service.js +10 -0
  254. package/.medusa/server/src/modules/product/index.d.ts +7 -0
  255. package/.medusa/server/src/modules/product/index.js +14 -0
  256. package/.medusa/server/src/modules/{vendor-product-attribute/migrations/Migration20260325000000.d.ts → product/migrations/Migration20260414141012.d.ts} +1 -1
  257. package/.medusa/server/src/modules/product/migrations/Migration20260414141012.js +169 -0
  258. package/.medusa/server/src/modules/product/migrations/Migration20260415151424.d.ts +5 -0
  259. package/.medusa/server/src/modules/product/migrations/Migration20260415151424.js +14 -0
  260. package/.medusa/server/src/modules/product/migrations/Migration20260416104248.d.ts +5 -0
  261. package/.medusa/server/src/modules/product/migrations/Migration20260416104248.js +14 -0
  262. package/.medusa/server/src/modules/product/migrations/Migration20260416105443.d.ts +5 -0
  263. package/.medusa/server/src/modules/product/migrations/Migration20260416105443.js +16 -0
  264. package/.medusa/server/src/modules/product/migrations/Migration20260421093258.d.ts +5 -0
  265. package/.medusa/server/src/modules/product/migrations/Migration20260421093258.js +22 -0
  266. package/.medusa/server/src/modules/product/migrations/Migration20260422105949.d.ts +5 -0
  267. package/.medusa/server/src/modules/product/migrations/Migration20260422105949.js +32 -0
  268. package/.medusa/server/src/modules/product/migrations/Migration20260422112250.d.ts +5 -0
  269. package/.medusa/server/src/modules/product/migrations/Migration20260422112250.js +16 -0
  270. package/.medusa/server/src/modules/product/migrations/Migration20260424120000.d.ts +5 -0
  271. package/.medusa/server/src/modules/product/migrations/Migration20260424120000.js +16 -0
  272. package/.medusa/server/src/modules/product/migrations/Migration20260427140959.d.ts +5 -0
  273. package/.medusa/server/src/modules/product/migrations/Migration20260427140959.js +20 -0
  274. package/.medusa/server/src/modules/product/migrations/Migration20260427141021.d.ts +5 -0
  275. package/.medusa/server/src/modules/product/migrations/Migration20260427141021.js +16 -0
  276. package/.medusa/server/src/modules/product/migrations/Migration20260428115720.d.ts +5 -0
  277. package/.medusa/server/src/modules/product/migrations/Migration20260428115720.js +16 -0
  278. package/.medusa/server/src/modules/product/migrations/Migration20260430143600.d.ts +5 -0
  279. package/.medusa/server/src/modules/product/migrations/Migration20260430143600.js +15 -0
  280. package/.medusa/server/src/modules/product/migrations/Migration20260430144500.d.ts +5 -0
  281. package/.medusa/server/src/modules/product/migrations/Migration20260430144500.js +23 -0
  282. package/.medusa/server/src/modules/product/migrations/Migration20260430150000.d.ts +5 -0
  283. package/.medusa/server/src/modules/product/migrations/Migration20260430150000.js +14 -0
  284. package/.medusa/server/src/modules/product/migrations/Migration20260520120000.d.ts +5 -0
  285. package/.medusa/server/src/modules/product/migrations/Migration20260520120000.js +16 -0
  286. package/.medusa/server/src/modules/product/models/index.d.ts +13 -0
  287. package/.medusa/server/src/modules/product/models/index.js +33 -0
  288. package/.medusa/server/src/modules/product/models/product-attribute-value.d.ts +1676 -0
  289. package/.medusa/server/src/modules/product/models/product-attribute-value.js +38 -0
  290. package/.medusa/server/src/modules/product/models/product-attribute.d.ts +1597 -0
  291. package/.medusa/server/src/modules/product/models/product-attribute.js +57 -0
  292. package/.medusa/server/src/modules/product/models/product-brand.d.ts +539 -0
  293. package/.medusa/server/src/modules/product/models/product-brand.js +34 -0
  294. package/.medusa/server/src/modules/product/models/product-category.d.ts +1658 -0
  295. package/.medusa/server/src/modules/product/models/product-category.js +55 -0
  296. package/.medusa/server/src/modules/product/models/product-change-action.d.ts +1081 -0
  297. package/.medusa/server/src/modules/product/models/product-change-action.js +42 -0
  298. package/.medusa/server/src/modules/product/models/product-change.d.ts +547 -0
  299. package/.medusa/server/src/modules/product/models/product-change.js +50 -0
  300. package/.medusa/server/src/modules/product/models/product-collection.d.ts +540 -0
  301. package/.medusa/server/src/modules/product/models/product-collection.js +27 -0
  302. package/.medusa/server/src/modules/product/models/product-image.d.ts +1733 -0
  303. package/.medusa/server/src/modules/product/models/product-image.js +51 -0
  304. package/.medusa/server/src/modules/product/models/product-tag.d.ts +549 -0
  305. package/.medusa/server/src/modules/product/models/product-tag.js +26 -0
  306. package/.medusa/server/src/modules/product/models/product-type.d.ts +541 -0
  307. package/.medusa/server/src/modules/product/models/product-type.js +26 -0
  308. package/.medusa/server/src/modules/product/models/product-variant-product-image.d.ts +3352 -0
  309. package/.medusa/server/src/modules/product/models/product-variant-product-image.js +19 -0
  310. package/.medusa/server/src/modules/product/models/product-variant.d.ts +1617 -0
  311. package/.medusa/server/src/modules/product/models/product-variant.js +84 -0
  312. package/.medusa/server/src/modules/product/models/product.d.ts +547 -0
  313. package/.medusa/server/src/modules/product/models/product.js +137 -0
  314. package/.medusa/server/src/modules/product/repositories/product-category.d.ts +53 -0
  315. package/.medusa/server/src/modules/product/repositories/product-category.js +381 -0
  316. package/.medusa/server/src/modules/product/service.d.ts +11013 -0
  317. package/.medusa/server/src/modules/product/service.js +1471 -0
  318. package/.medusa/server/src/modules/product/services/product-category.d.ts +37 -0
  319. package/.medusa/server/src/modules/product/services/product-category.js +166 -0
  320. package/.medusa/server/src/modules/seller/loaders/register-feature-flags.js +7 -1
  321. package/.medusa/server/src/modules/seller/migrations/Migration20260414123048.d.ts +5 -0
  322. package/.medusa/server/src/modules/seller/migrations/Migration20260414123048.js +16 -0
  323. package/.medusa/server/src/types/cart-line-item.d.ts +15 -0
  324. package/.medusa/server/src/types/cart-line-item.js +3 -0
  325. package/.medusa/server/src/utils/disable-medusa-middlewares.d.ts +2 -0
  326. package/.medusa/server/src/utils/disable-medusa-middlewares.js +90 -0
  327. package/.medusa/server/src/with-mercur.js +9 -2
  328. package/.medusa/server/src/workflows/cart/hooks/index.d.ts +2 -0
  329. package/.medusa/server/src/workflows/cart/hooks/index.js +5 -0
  330. package/.medusa/server/src/workflows/cart/hooks/validate-add-to-cart-stock.js +52 -0
  331. package/.medusa/server/src/workflows/cart/hooks/validate-update-line-item-stock.js +60 -0
  332. package/.medusa/server/src/workflows/cart/index.d.ts +1 -0
  333. package/.medusa/server/src/workflows/cart/index.js +2 -1
  334. package/.medusa/server/src/workflows/cart/steps/calculate-offer-prices.d.ts +19 -0
  335. package/.medusa/server/src/workflows/cart/steps/calculate-offer-prices.js +39 -0
  336. package/.medusa/server/src/workflows/cart/steps/decorate-line-item-with-offer.d.ts +8 -0
  337. package/.medusa/server/src/workflows/cart/steps/decorate-line-item-with-offer.js +45 -0
  338. package/.medusa/server/src/workflows/cart/steps/get-line-item-actions.d.ts +21 -0
  339. package/.medusa/server/src/workflows/cart/steps/get-line-item-actions.js +85 -0
  340. package/.medusa/server/src/workflows/cart/steps/index.d.ts +5 -0
  341. package/.medusa/server/src/workflows/cart/steps/index.js +6 -1
  342. package/.medusa/server/src/workflows/cart/steps/link-line-item-to-offer.d.ts +13 -0
  343. package/.medusa/server/src/workflows/cart/steps/link-line-item-to-offer.js +31 -0
  344. package/.medusa/server/src/workflows/cart/steps/mirror-line-item-offer-links-to-order.d.ts +16 -0
  345. package/.medusa/server/src/workflows/cart/steps/mirror-line-item-offer-links-to-order.js +32 -0
  346. package/.medusa/server/src/workflows/cart/steps/validate-seller-cart-items.d.ts +5 -7
  347. package/.medusa/server/src/workflows/cart/steps/validate-seller-cart-items.js +6 -4
  348. package/.medusa/server/src/workflows/cart/steps/validate-seller-cart-shipping.d.ts +5 -6
  349. package/.medusa/server/src/workflows/cart/steps/validate-seller-cart-shipping.js +5 -4
  350. package/.medusa/server/src/workflows/cart/utils/fields.js +11 -20
  351. package/.medusa/server/src/workflows/cart/utils/index.d.ts +0 -1
  352. package/.medusa/server/src/workflows/cart/utils/index.js +1 -2
  353. package/.medusa/server/src/workflows/cart/utils/prepare-line-item-data.d.ts +1 -0
  354. package/.medusa/server/src/workflows/cart/utils/prepare-line-item-data.js +2 -2
  355. package/.medusa/server/src/workflows/cart/workflows/add-to-cart.d.ts +12 -0
  356. package/.medusa/server/src/workflows/cart/workflows/add-to-cart.js +235 -0
  357. package/.medusa/server/src/workflows/cart/workflows/complete-cart-with-split-orders.js +76 -24
  358. package/.medusa/server/src/workflows/cart/workflows/index.d.ts +2 -0
  359. package/.medusa/server/src/workflows/cart/workflows/index.js +3 -1
  360. package/.medusa/server/src/workflows/cart/workflows/list-seller-shipping-options-for-cart.js +18 -15
  361. package/.medusa/server/src/workflows/cart/workflows/update-line-item-in-cart.d.ts +16 -0
  362. package/.medusa/server/src/workflows/cart/workflows/update-line-item-in-cart.js +87 -0
  363. package/.medusa/server/src/workflows/commission/workflows/refresh-order-commission-lines.js +5 -3
  364. package/.medusa/server/src/workflows/events.d.ts +5 -0
  365. package/.medusa/server/src/workflows/events.js +7 -2
  366. package/.medusa/server/src/workflows/index.d.ts +4 -0
  367. package/.medusa/server/src/workflows/index.js +5 -1
  368. package/.medusa/server/src/workflows/offer/index.d.ts +3 -0
  369. package/.medusa/server/src/workflows/{attribute/workflows → offer}/index.js +4 -6
  370. package/.medusa/server/src/workflows/offer/steps/create-offers.d.ts +17 -0
  371. package/.medusa/server/src/workflows/offer/steps/create-offers.js +17 -0
  372. package/.medusa/server/src/workflows/offer/steps/delete-offers.d.ts +1 -0
  373. package/.medusa/server/src/workflows/offer/steps/delete-offers.js +17 -0
  374. package/.medusa/server/src/workflows/offer/steps/index.d.ts +3 -0
  375. package/.medusa/server/src/workflows/{product-attribute → offer}/steps/index.js +4 -8
  376. package/.medusa/server/src/workflows/offer/steps/update-offers.d.ts +26 -0
  377. package/.medusa/server/src/workflows/offer/steps/update-offers.js +35 -0
  378. package/.medusa/server/src/workflows/offer/utils/index.d.ts +1 -0
  379. package/.medusa/server/src/workflows/offer/utils/index.js +18 -0
  380. package/.medusa/server/src/workflows/offer/utils/prepare-offer-inventory-input.d.ts +59 -0
  381. package/.medusa/server/src/workflows/offer/utils/prepare-offer-inventory-input.js +128 -0
  382. package/.medusa/server/src/workflows/offer/workflows/batch-offer-inventory-items.d.ts +35 -0
  383. package/.medusa/server/src/workflows/offer/workflows/batch-offer-inventory-items.js +118 -0
  384. package/.medusa/server/src/workflows/offer/workflows/create-offers.d.ts +116 -0
  385. package/.medusa/server/src/workflows/offer/workflows/create-offers.js +117 -0
  386. package/.medusa/server/src/workflows/offer/workflows/delete-offers.d.ts +11 -0
  387. package/.medusa/server/src/workflows/offer/workflows/delete-offers.js +22 -0
  388. package/.medusa/server/src/workflows/offer/workflows/index.d.ts +4 -0
  389. package/.medusa/server/src/workflows/{attribute/steps → offer/workflows}/index.js +5 -8
  390. package/.medusa/server/src/workflows/offer/workflows/update-offers.d.ts +123 -0
  391. package/.medusa/server/src/workflows/offer/workflows/update-offers.js +66 -0
  392. package/.medusa/server/src/workflows/order/index.d.ts +1 -0
  393. package/.medusa/server/src/workflows/order/index.js +18 -0
  394. package/.medusa/server/src/workflows/order/workflows/cancel-order-fulfillment.d.ts +15 -0
  395. package/.medusa/server/src/workflows/order/workflows/cancel-order-fulfillment.js +187 -0
  396. package/.medusa/server/src/workflows/order/workflows/confirm-return-receive.d.ts +7 -0
  397. package/.medusa/server/src/workflows/order/workflows/confirm-return-receive.js +221 -0
  398. package/.medusa/server/src/workflows/order/workflows/create-order-fulfillment.d.ts +39 -0
  399. package/.medusa/server/src/workflows/order/workflows/create-order-fulfillment.js +367 -0
  400. package/.medusa/server/src/workflows/order/workflows/index.d.ts +3 -0
  401. package/.medusa/server/src/workflows/order/workflows/index.js +20 -0
  402. package/.medusa/server/src/workflows/product/events.d.ts +54 -0
  403. package/.medusa/server/src/workflows/product/events.js +58 -0
  404. package/.medusa/server/src/workflows/product/index.d.ts +3 -0
  405. package/.medusa/server/src/workflows/product/index.js +20 -0
  406. package/.medusa/server/src/workflows/product/steps/associate-sellers-with-product-brand.d.ts +8 -0
  407. package/.medusa/server/src/workflows/product/steps/associate-sellers-with-product-brand.js +26 -0
  408. package/.medusa/server/src/workflows/product/steps/associate-sellers-with-product-category.d.ts +8 -0
  409. package/.medusa/server/src/workflows/product/steps/associate-sellers-with-product-category.js +26 -0
  410. package/.medusa/server/src/workflows/product/steps/associate-sellers-with-product.d.ts +8 -0
  411. package/.medusa/server/src/workflows/product/steps/associate-sellers-with-product.js +26 -0
  412. package/.medusa/server/src/workflows/product/steps/batch-link-products-in-category.d.ts +7 -0
  413. package/.medusa/server/src/workflows/product/steps/batch-link-products-in-category.js +61 -0
  414. package/.medusa/server/src/workflows/product/steps/batch-product-attributes.d.ts +11 -0
  415. package/.medusa/server/src/workflows/product/steps/batch-product-attributes.js +16 -0
  416. package/.medusa/server/src/workflows/product/steps/create-product-attribute-values.d.ts +6 -0
  417. package/.medusa/server/src/workflows/product/steps/create-product-attribute-values.js +17 -0
  418. package/.medusa/server/src/workflows/product/steps/create-product-attributes.d.ts +2 -0
  419. package/.medusa/server/src/workflows/product/steps/create-product-attributes.js +17 -0
  420. package/.medusa/server/src/workflows/product/steps/create-product-brands.d.ts +2 -0
  421. package/.medusa/server/src/workflows/product/steps/create-product-brands.js +17 -0
  422. package/.medusa/server/src/workflows/product/steps/create-product-categories.d.ts +1548 -0
  423. package/.medusa/server/src/workflows/product/steps/create-product-categories.js +18 -0
  424. package/.medusa/server/src/workflows/product/steps/create-product-variants.d.ts +2 -0
  425. package/.medusa/server/src/workflows/product/steps/create-product-variants.js +18 -0
  426. package/.medusa/server/src/workflows/product/steps/create-products.d.ts +2 -0
  427. package/.medusa/server/src/workflows/product/steps/create-products.js +17 -0
  428. package/.medusa/server/src/workflows/product/steps/delete-product-attribute-values.d.ts +1 -0
  429. package/.medusa/server/src/workflows/product/steps/delete-product-attribute-values.js +17 -0
  430. package/.medusa/server/src/workflows/product/steps/delete-product-attributes.d.ts +1 -0
  431. package/.medusa/server/src/workflows/product/steps/delete-product-attributes.js +17 -0
  432. package/.medusa/server/src/workflows/product/steps/delete-product-brands.d.ts +1 -0
  433. package/.medusa/server/src/workflows/product/steps/delete-product-brands.js +17 -0
  434. package/.medusa/server/src/workflows/product/steps/delete-product-categories.d.ts +1 -0
  435. package/.medusa/server/src/workflows/product/steps/delete-product-categories.js +17 -0
  436. package/.medusa/server/src/workflows/product/steps/delete-product-variants.d.ts +1 -0
  437. package/.medusa/server/src/workflows/product/steps/delete-product-variants.js +17 -0
  438. package/.medusa/server/src/workflows/product/steps/delete-products.d.ts +1 -0
  439. package/.medusa/server/src/workflows/product/steps/delete-products.js +17 -0
  440. package/.medusa/server/src/workflows/product/steps/detach-sellers-from-product-brand.d.ts +8 -0
  441. package/.medusa/server/src/workflows/product/steps/detach-sellers-from-product-brand.js +26 -0
  442. package/.medusa/server/src/workflows/product/steps/detach-sellers-from-product-category.d.ts +8 -0
  443. package/.medusa/server/src/workflows/product/steps/detach-sellers-from-product-category.js +26 -0
  444. package/.medusa/server/src/workflows/product/steps/detach-sellers-from-product.d.ts +8 -0
  445. package/.medusa/server/src/workflows/product/steps/detach-sellers-from-product.js +26 -0
  446. package/.medusa/server/src/workflows/product/steps/index.d.ts +33 -0
  447. package/.medusa/server/src/workflows/product/steps/index.js +50 -0
  448. package/.medusa/server/src/workflows/product/steps/remove-attribute-from-product.d.ts +6 -0
  449. package/.medusa/server/src/workflows/product/steps/remove-attribute-from-product.js +11 -0
  450. package/.medusa/server/src/workflows/product/steps/update-product-attribute-values.d.ts +7 -0
  451. package/.medusa/server/src/workflows/product/steps/update-product-attribute-values.js +22 -0
  452. package/.medusa/server/src/workflows/product/steps/update-product-attributes.d.ts +7 -0
  453. package/.medusa/server/src/workflows/product/steps/update-product-attributes.js +22 -0
  454. package/.medusa/server/src/workflows/product/steps/update-product-brands.d.ts +7 -0
  455. package/.medusa/server/src/workflows/product/steps/update-product-brands.js +28 -0
  456. package/.medusa/server/src/workflows/product/steps/update-product-categories.d.ts +1552 -0
  457. package/.medusa/server/src/workflows/product/steps/update-product-categories.js +20 -0
  458. package/.medusa/server/src/workflows/product/steps/update-product-variants.d.ts +10 -0
  459. package/.medusa/server/src/workflows/product/steps/update-product-variants.js +32 -0
  460. package/.medusa/server/src/workflows/product/steps/update-products.d.ts +10 -0
  461. package/.medusa/server/src/workflows/product/steps/update-products.js +33 -0
  462. package/.medusa/server/src/workflows/product/steps/upsert-product-attribute-values.d.ts +5 -0
  463. package/.medusa/server/src/workflows/product/steps/upsert-product-attribute-values.js +30 -0
  464. package/.medusa/server/src/workflows/product/steps/validate-attribute-accepts-values.d.ts +5 -0
  465. package/.medusa/server/src/workflows/product/steps/validate-attribute-accepts-values.js +19 -0
  466. package/.medusa/server/src/workflows/product/steps/validate-confirm-products.d.ts +3 -0
  467. package/.medusa/server/src/workflows/product/steps/validate-confirm-products.js +14 -0
  468. package/.medusa/server/src/workflows/product/steps/validate-delete-product-attribute-values.d.ts +5 -0
  469. package/.medusa/server/src/workflows/product/steps/validate-delete-product-attribute-values.js +19 -0
  470. package/.medusa/server/src/workflows/product/steps/validate-delete-product-attributes.d.ts +5 -0
  471. package/.medusa/server/src/workflows/product/steps/validate-delete-product-attributes.js +30 -0
  472. package/.medusa/server/src/workflows/product/steps/validate-reject-product.d.ts +3 -0
  473. package/.medusa/server/src/workflows/product/steps/validate-reject-product.js +12 -0
  474. package/.medusa/server/src/workflows/product/steps/validate-request-changes.d.ts +3 -0
  475. package/.medusa/server/src/workflows/product/steps/validate-request-changes.js +12 -0
  476. package/.medusa/server/src/workflows/product/steps/validate-resubmit-product.d.ts +3 -0
  477. package/.medusa/server/src/workflows/product/steps/validate-resubmit-product.js +12 -0
  478. package/.medusa/server/src/workflows/product/steps/validate-seller-product-permissions.d.ts +7 -0
  479. package/.medusa/server/src/workflows/product/steps/validate-seller-product-permissions.js +45 -0
  480. package/.medusa/server/src/workflows/product/workflows/batch-link-products-in-category.d.ts +8 -0
  481. package/.medusa/server/src/workflows/product/workflows/batch-link-products-in-category.js +10 -0
  482. package/.medusa/server/src/workflows/product/workflows/batch-product-attributes.d.ts +12 -0
  483. package/.medusa/server/src/workflows/product/workflows/batch-product-attributes.js +23 -0
  484. package/.medusa/server/src/workflows/product/workflows/batch-products.d.ts +3 -0
  485. package/.medusa/server/src/workflows/product/workflows/batch-products.js +86 -0
  486. package/.medusa/server/src/workflows/product/workflows/confirm-products.d.ts +15 -0
  487. package/.medusa/server/src/workflows/product/workflows/confirm-products.js +57 -0
  488. package/.medusa/server/src/workflows/product/workflows/create-product-attribute-values.d.ts +8 -0
  489. package/.medusa/server/src/workflows/product/workflows/create-product-attribute-values.js +21 -0
  490. package/.medusa/server/src/workflows/product/workflows/create-product-attributes.d.ts +7 -0
  491. package/.medusa/server/src/workflows/product/workflows/create-product-attributes.js +18 -0
  492. package/.medusa/server/src/workflows/product/workflows/create-product-brands.d.ts +7 -0
  493. package/.medusa/server/src/workflows/product/workflows/create-product-brands.js +19 -0
  494. package/.medusa/server/src/workflows/product/workflows/create-product-categories.d.ts +1553 -0
  495. package/.medusa/server/src/workflows/product/workflows/create-product-categories.js +18 -0
  496. package/.medusa/server/src/workflows/product/workflows/create-product-variants.d.ts +3 -0
  497. package/.medusa/server/src/workflows/product/workflows/create-product-variants.js +25 -0
  498. package/.medusa/server/src/workflows/product/workflows/create-products.d.ts +3 -0
  499. package/.medusa/server/src/workflows/product/workflows/create-products.js +35 -0
  500. package/.medusa/server/src/workflows/product/workflows/delete-product-attribute-values.d.ts +6 -0
  501. package/.medusa/server/src/workflows/product/workflows/delete-product-attribute-values.js +20 -0
  502. package/.medusa/server/src/workflows/product/workflows/delete-product-attributes.d.ts +6 -0
  503. package/.medusa/server/src/workflows/product/workflows/delete-product-attributes.js +20 -0
  504. package/.medusa/server/src/workflows/product/workflows/delete-product-brands.d.ts +6 -0
  505. package/.medusa/server/src/workflows/product/workflows/delete-product-brands.js +19 -0
  506. package/.medusa/server/src/workflows/product/workflows/delete-product-categories.d.ts +6 -0
  507. package/.medusa/server/src/workflows/product/workflows/delete-product-categories.js +18 -0
  508. package/.medusa/server/src/workflows/product/workflows/delete-product-variants.d.ts +8 -0
  509. package/.medusa/server/src/workflows/product/workflows/delete-product-variants.js +24 -0
  510. package/.medusa/server/src/workflows/product/workflows/delete-products.d.ts +6 -0
  511. package/.medusa/server/src/workflows/product/workflows/delete-products.js +19 -0
  512. package/.medusa/server/src/workflows/product/workflows/index.d.ts +30 -0
  513. package/.medusa/server/src/workflows/product/workflows/index.js +47 -0
  514. package/.medusa/server/src/workflows/product/workflows/link-sellers-to-product-brand.d.ts +14 -0
  515. package/.medusa/server/src/workflows/product/workflows/link-sellers-to-product-brand.js +21 -0
  516. package/.medusa/server/src/workflows/product/workflows/link-sellers-to-product-category.d.ts +14 -0
  517. package/.medusa/server/src/workflows/product/workflows/link-sellers-to-product-category.js +21 -0
  518. package/.medusa/server/src/workflows/product/workflows/link-sellers-to-product.d.ts +14 -0
  519. package/.medusa/server/src/workflows/product/workflows/link-sellers-to-product.js +21 -0
  520. package/.medusa/server/src/workflows/product/workflows/reject-product.d.ts +11 -0
  521. package/.medusa/server/src/workflows/product/workflows/reject-product.js +61 -0
  522. package/.medusa/server/src/workflows/product/workflows/remove-attribute-from-product.d.ts +7 -0
  523. package/.medusa/server/src/workflows/product/workflows/remove-attribute-from-product.js +20 -0
  524. package/.medusa/server/src/workflows/product/workflows/request-product-changes.d.ts +11 -0
  525. package/.medusa/server/src/workflows/product/workflows/request-product-changes.js +61 -0
  526. package/.medusa/server/src/workflows/product/workflows/resubmit-product.d.ts +8 -0
  527. package/.medusa/server/src/workflows/product/workflows/resubmit-product.js +48 -0
  528. package/.medusa/server/src/workflows/product/workflows/submit-seller-products.d.ts +3 -0
  529. package/.medusa/server/src/workflows/product/workflows/submit-seller-products.js +76 -0
  530. package/.medusa/server/src/workflows/product/workflows/update-product-attribute-values.d.ts +8 -0
  531. package/.medusa/server/src/workflows/product/workflows/update-product-attribute-values.js +18 -0
  532. package/.medusa/server/src/workflows/product/workflows/update-product-attributes.d.ts +8 -0
  533. package/.medusa/server/src/workflows/product/workflows/update-product-attributes.js +18 -0
  534. package/.medusa/server/src/workflows/product/workflows/update-product-brands.d.ts +8 -0
  535. package/.medusa/server/src/workflows/product/workflows/update-product-brands.js +19 -0
  536. package/.medusa/server/src/workflows/product/workflows/update-product-categories.d.ts +1555 -0
  537. package/.medusa/server/src/workflows/product/workflows/update-product-categories.js +18 -0
  538. package/.medusa/server/src/workflows/product/workflows/update-product-variants.d.ts +3 -0
  539. package/.medusa/server/src/workflows/product/workflows/update-product-variants.js +36 -0
  540. package/.medusa/server/src/workflows/product/workflows/update-products.d.ts +3 -0
  541. package/.medusa/server/src/workflows/product/workflows/update-products.js +23 -0
  542. package/.medusa/server/src/workflows/product/workflows/upsert-product-attribute-values.d.ts +8 -0
  543. package/.medusa/server/src/workflows/product/workflows/upsert-product-attribute-values.js +21 -0
  544. package/.medusa/server/src/workflows/{attribute → product-edit}/index.js +2 -2
  545. package/.medusa/server/src/workflows/product-edit/steps/cancel-product-change.d.ts +7 -0
  546. package/.medusa/server/src/workflows/product-edit/steps/cancel-product-change.js +14 -0
  547. package/.medusa/server/src/workflows/product-edit/steps/confirm-product-changes.d.ts +8 -0
  548. package/.medusa/server/src/workflows/product-edit/steps/confirm-product-changes.js +11 -0
  549. package/.medusa/server/src/workflows/product-edit/steps/create-product-change-actions.d.ts +16 -0
  550. package/.medusa/server/src/workflows/product-edit/steps/create-product-change-actions.js +17 -0
  551. package/.medusa/server/src/workflows/product-edit/steps/create-product-changes.d.ts +17 -0
  552. package/.medusa/server/src/workflows/product-edit/steps/create-product-changes.js +25 -0
  553. package/.medusa/server/src/workflows/product-edit/steps/decline-product-change.d.ts +8 -0
  554. package/.medusa/server/src/workflows/product-edit/steps/decline-product-change.js +14 -0
  555. package/.medusa/server/src/workflows/product-edit/steps/index.d.ts +8 -0
  556. package/.medusa/server/src/workflows/{product-attribute/workflows → product-edit/steps}/index.js +9 -9
  557. package/.medusa/server/src/workflows/product-edit/steps/retrieve-product-with-change.d.ts +5 -0
  558. package/.medusa/server/src/workflows/product-edit/steps/retrieve-product-with-change.js +11 -0
  559. package/.medusa/server/src/workflows/product-edit/steps/validate-no-pending-product-change.d.ts +12 -0
  560. package/.medusa/server/src/workflows/product-edit/steps/validate-no-pending-product-change.js +21 -0
  561. package/.medusa/server/src/workflows/product-edit/steps/validate-product-change-pending.d.ts +11 -0
  562. package/.medusa/server/src/workflows/product-edit/steps/validate-product-change-pending.js +21 -0
  563. package/.medusa/server/src/workflows/product-edit/workflows/auto-confirm-product-change.d.ts +16 -0
  564. package/.medusa/server/src/workflows/product-edit/workflows/auto-confirm-product-change.js +37 -0
  565. package/.medusa/server/src/workflows/product-edit/workflows/cancel-product-edit.d.ts +19 -0
  566. package/.medusa/server/src/workflows/product-edit/workflows/cancel-product-edit.js +40 -0
  567. package/.medusa/server/src/workflows/product-edit/workflows/confirm-product-edit.d.ts +21 -0
  568. package/.medusa/server/src/workflows/product-edit/workflows/confirm-product-edit.js +44 -0
  569. package/.medusa/server/src/workflows/product-edit/workflows/decline-product-edit.d.ts +16 -0
  570. package/.medusa/server/src/workflows/product-edit/workflows/decline-product-edit.js +42 -0
  571. package/.medusa/server/src/workflows/product-edit/workflows/index.d.ts +11 -0
  572. package/.medusa/server/src/workflows/product-edit/workflows/index.js +28 -0
  573. package/.medusa/server/src/workflows/product-edit/workflows/product-edit-add-attribute.d.ts +19 -0
  574. package/.medusa/server/src/workflows/product-edit/workflows/product-edit-add-attribute.js +66 -0
  575. package/.medusa/server/src/workflows/product-edit/workflows/product-edit-add-variant.d.ts +17 -0
  576. package/.medusa/server/src/workflows/product-edit/workflows/product-edit-add-variant.js +58 -0
  577. package/.medusa/server/src/workflows/product-edit/workflows/product-edit-delete-product.d.ts +20 -0
  578. package/.medusa/server/src/workflows/product-edit/workflows/product-edit-delete-product.js +60 -0
  579. package/.medusa/server/src/workflows/product-edit/workflows/product-edit-remove-attribute.d.ts +17 -0
  580. package/.medusa/server/src/workflows/product-edit/workflows/product-edit-remove-attribute.js +62 -0
  581. package/.medusa/server/src/workflows/product-edit/workflows/product-edit-remove-variant.d.ts +16 -0
  582. package/.medusa/server/src/workflows/product-edit/workflows/product-edit-remove-variant.js +68 -0
  583. package/.medusa/server/src/workflows/product-edit/workflows/product-edit-update-fields.d.ts +18 -0
  584. package/.medusa/server/src/workflows/product-edit/workflows/product-edit-update-fields.js +72 -0
  585. package/.medusa/server/src/workflows/product-edit/workflows/product-edit-update-variant.d.ts +21 -0
  586. package/.medusa/server/src/workflows/product-edit/workflows/product-edit-update-variant.js +89 -0
  587. package/.medusa/server/src/workflows/seller/workflows/create-sellers.js +5 -2
  588. package/.medusa/server/src/workflows/utils/override-workflow.d.ts +12 -0
  589. package/.medusa/server/src/workflows/utils/override-workflow.js +21 -0
  590. package/package.json +8 -4
  591. package/.medusa/server/src/api/admin/attributes/[id]/route.d.ts +0 -5
  592. package/.medusa/server/src/api/admin/attributes/[id]/route.js +0 -68
  593. package/.medusa/server/src/api/admin/attributes/[id]/values/[value_id]/route.d.ts +0 -4
  594. package/.medusa/server/src/api/admin/attributes/[id]/values/[value_id]/route.js +0 -40
  595. package/.medusa/server/src/api/admin/attributes/[id]/values/route.d.ts +0 -4
  596. package/.medusa/server/src/api/admin/attributes/[id]/values/route.js +0 -44
  597. package/.medusa/server/src/api/admin/attributes/middlewares.d.ts +0 -2
  598. package/.medusa/server/src/api/admin/attributes/middlewares.js +0 -102
  599. package/.medusa/server/src/api/admin/attributes/query-config.d.ts +0 -20
  600. package/.medusa/server/src/api/admin/attributes/query-config.js +0 -41
  601. package/.medusa/server/src/api/admin/attributes/route.d.ts +0 -4
  602. package/.medusa/server/src/api/admin/attributes/route.js +0 -51
  603. package/.medusa/server/src/api/admin/attributes/validators.d.ts +0 -793
  604. package/.medusa/server/src/api/admin/attributes/validators.js +0 -92
  605. package/.medusa/server/src/api/vendor/attributes/middlewares.d.ts +0 -2
  606. package/.medusa/server/src/api/vendor/attributes/middlewares.js +0 -32
  607. package/.medusa/server/src/api/vendor/attributes/route.js +0 -20
  608. package/.medusa/server/src/api/vendor/product-categories/[id]/products/route.d.ts +0 -3
  609. package/.medusa/server/src/api/vendor/product-categories/[id]/products/route.js +0 -27
  610. package/.medusa/server/src/api/vendor/product-categories/helpers.d.ts +0 -2
  611. package/.medusa/server/src/api/vendor/product-categories/helpers.js +0 -24
  612. package/.medusa/server/src/api/vendor/products/[id]/attributes/utils.d.ts +0 -7
  613. package/.medusa/server/src/api/vendor/products/[id]/attributes/utils.js +0 -16
  614. package/.medusa/server/src/api/vendor/products/[id]/options/[option_id]/route.d.ts +0 -5
  615. package/.medusa/server/src/api/vendor/products/[id]/options/[option_id]/route.js +0 -74
  616. package/.medusa/server/src/api/vendor/products/[id]/options/route.d.ts +0 -4
  617. package/.medusa/server/src/api/vendor/products/[id]/options/route.js +0 -34
  618. package/.medusa/server/src/api/vendor/products/[id]/variants/[variant_id]/media/route.js +0 -20
  619. package/.medusa/server/src/api/vendor/products/helpers.d.ts +0 -2
  620. package/.medusa/server/src/api/vendor/products/helpers.js +0 -20
  621. package/.medusa/server/src/api/vendor/products/utils/transform-product-attributes.d.ts +0 -34
  622. package/.medusa/server/src/api/vendor/products/utils/transform-product-attributes.js +0 -71
  623. package/.medusa/server/src/links/category-attribute-link.js +0 -16
  624. package/.medusa/server/src/links/product-attribute-value-link.js +0 -16
  625. package/.medusa/server/src/links/product-vendor-product-attribute-link.js +0 -16
  626. package/.medusa/server/src/links/seller-attribute-link.js +0 -13
  627. package/.medusa/server/src/links/seller-attribute-value-link.js +0 -13
  628. package/.medusa/server/src/links/seller-vendor-product-attribute-link.js +0 -13
  629. package/.medusa/server/src/modules/attribute/index.d.ts +0 -51
  630. package/.medusa/server/src/modules/attribute/index.js +0 -15
  631. package/.medusa/server/src/modules/attribute/migrations/Migration20260325000000.js +0 -32
  632. package/.medusa/server/src/modules/attribute/models/attribute-possible-value.d.ts +0 -27
  633. package/.medusa/server/src/modules/attribute/models/attribute-possible-value.js +0 -26
  634. package/.medusa/server/src/modules/attribute/models/attribute-value.d.ts +0 -27
  635. package/.medusa/server/src/modules/attribute/models/attribute-value.js +0 -26
  636. package/.medusa/server/src/modules/attribute/models/attribute.d.ts +0 -28
  637. package/.medusa/server/src/modules/attribute/models/attribute.js +0 -36
  638. package/.medusa/server/src/modules/attribute/models/index.d.ts +0 -3
  639. package/.medusa/server/src/modules/attribute/models/index.js +0 -13
  640. package/.medusa/server/src/modules/attribute/service.d.ts +0 -105
  641. package/.medusa/server/src/modules/attribute/service.js +0 -74
  642. package/.medusa/server/src/modules/vendor-product-attribute/index.d.ts +0 -23
  643. package/.medusa/server/src/modules/vendor-product-attribute/index.js +0 -15
  644. package/.medusa/server/src/modules/vendor-product-attribute/migrations/Migration20260325000000.js +0 -16
  645. package/.medusa/server/src/modules/vendor-product-attribute/models/vendor-product-attribute.d.ts +0 -11
  646. package/.medusa/server/src/modules/vendor-product-attribute/models/vendor-product-attribute.js +0 -24
  647. package/.medusa/server/src/modules/vendor-product-attribute/service.d.ts +0 -14
  648. package/.medusa/server/src/modules/vendor-product-attribute/service.js +0 -13
  649. package/.medusa/server/src/workflows/attribute/steps/create-attribute-possible-values.d.ts +0 -40
  650. package/.medusa/server/src/workflows/attribute/steps/create-attribute-possible-values.js +0 -18
  651. package/.medusa/server/src/workflows/attribute/steps/create-attributes.d.ts +0 -5
  652. package/.medusa/server/src/workflows/attribute/steps/create-attributes.js +0 -32
  653. package/.medusa/server/src/workflows/attribute/steps/delete-attribute.d.ts +0 -6
  654. package/.medusa/server/src/workflows/attribute/steps/delete-attribute.js +0 -31
  655. package/.medusa/server/src/workflows/attribute/steps/index.d.ts +0 -7
  656. package/.medusa/server/src/workflows/attribute/steps/update-attribute-possible-value.d.ts +0 -39
  657. package/.medusa/server/src/workflows/attribute/steps/update-attribute-possible-value.js +0 -18
  658. package/.medusa/server/src/workflows/attribute/steps/update-attributes.d.ts +0 -21
  659. package/.medusa/server/src/workflows/attribute/steps/update-attributes.js +0 -37
  660. package/.medusa/server/src/workflows/attribute/steps/validate-attribute-delete.d.ts +0 -6
  661. package/.medusa/server/src/workflows/attribute/steps/validate-attribute-delete.js +0 -50
  662. package/.medusa/server/src/workflows/attribute/steps/validate-possible-values-removal.d.ts +0 -7
  663. package/.medusa/server/src/workflows/attribute/steps/validate-possible-values-removal.js +0 -70
  664. package/.medusa/server/src/workflows/attribute/workflows/create-attribute-possible-values.d.ts +0 -39
  665. package/.medusa/server/src/workflows/attribute/workflows/create-attribute-possible-values.js +0 -11
  666. package/.medusa/server/src/workflows/attribute/workflows/create-attributes.d.ts +0 -7
  667. package/.medusa/server/src/workflows/attribute/workflows/create-attributes.js +0 -40
  668. package/.medusa/server/src/workflows/attribute/workflows/delete-attribute.d.ts +0 -6
  669. package/.medusa/server/src/workflows/attribute/workflows/delete-attribute.js +0 -11
  670. package/.medusa/server/src/workflows/attribute/workflows/index.d.ts +0 -5
  671. package/.medusa/server/src/workflows/attribute/workflows/update-attribute-possible-value.d.ts +0 -39
  672. package/.medusa/server/src/workflows/attribute/workflows/update-attribute-possible-value.js +0 -11
  673. package/.medusa/server/src/workflows/attribute/workflows/update-attributes.d.ts +0 -24
  674. package/.medusa/server/src/workflows/attribute/workflows/update-attributes.js +0 -69
  675. package/.medusa/server/src/workflows/cart/utils/prepare-confirm-inventory-input.d.ts +0 -28
  676. package/.medusa/server/src/workflows/cart/utils/prepare-confirm-inventory-input.js +0 -165
  677. package/.medusa/server/src/workflows/hooks/product-created.js +0 -75
  678. package/.medusa/server/src/workflows/hooks/product-variant-created.js +0 -50
  679. package/.medusa/server/src/workflows/product-attribute/steps/create-attribute-value.d.ts +0 -39
  680. package/.medusa/server/src/workflows/product-attribute/steps/create-attribute-value.js +0 -21
  681. package/.medusa/server/src/workflows/product-attribute/steps/create-attribute-values.d.ts +0 -12
  682. package/.medusa/server/src/workflows/product-attribute/steps/create-attribute-values.js +0 -24
  683. package/.medusa/server/src/workflows/product-attribute/steps/create-vendor-product-attribute.d.ts +0 -14
  684. package/.medusa/server/src/workflows/product-attribute/steps/create-vendor-product-attribute.js +0 -18
  685. package/.medusa/server/src/workflows/product-attribute/steps/delete-attribute-value.d.ts +0 -2
  686. package/.medusa/server/src/workflows/product-attribute/steps/delete-attribute-value.js +0 -18
  687. package/.medusa/server/src/workflows/product-attribute/steps/index.d.ts +0 -7
  688. package/.medusa/server/src/workflows/product-attribute/steps/restore-variant-image-associations.d.ts +0 -10
  689. package/.medusa/server/src/workflows/product-attribute/steps/restore-variant-image-associations.js +0 -49
  690. package/.medusa/server/src/workflows/product-attribute/steps/save-variant-image-associations.d.ts +0 -8
  691. package/.medusa/server/src/workflows/product-attribute/steps/save-variant-image-associations.js +0 -29
  692. package/.medusa/server/src/workflows/product-attribute/steps/validate-attribute-value.d.ts +0 -3
  693. package/.medusa/server/src/workflows/product-attribute/steps/validate-attribute-value.js +0 -59
  694. package/.medusa/server/src/workflows/product-attribute/utils/find-or-create-vendor-attribute.d.ts +0 -13
  695. package/.medusa/server/src/workflows/product-attribute/utils/find-or-create-vendor-attribute.js +0 -56
  696. package/.medusa/server/src/workflows/product-attribute/utils/get-applicable-attributes.d.ts +0 -2
  697. package/.medusa/server/src/workflows/product-attribute/utils/get-applicable-attributes.js +0 -58
  698. package/.medusa/server/src/workflows/product-attribute/utils/products-created-handler.d.ts +0 -8
  699. package/.medusa/server/src/workflows/product-attribute/utils/products-created-handler.js +0 -100
  700. package/.medusa/server/src/workflows/product-attribute/workflows/convert-attribute-to-option.d.ts +0 -3
  701. package/.medusa/server/src/workflows/product-attribute/workflows/convert-attribute-to-option.js +0 -46
  702. package/.medusa/server/src/workflows/product-attribute/workflows/convert-option-to-attribute.d.ts +0 -3
  703. package/.medusa/server/src/workflows/product-attribute/workflows/convert-option-to-attribute.js +0 -29
  704. package/.medusa/server/src/workflows/product-attribute/workflows/create-and-link-attribute-values.d.ts +0 -16
  705. package/.medusa/server/src/workflows/product-attribute/workflows/create-and-link-attribute-values.js +0 -72
  706. package/.medusa/server/src/workflows/product-attribute/workflows/create-attribute-value.d.ts +0 -39
  707. package/.medusa/server/src/workflows/product-attribute/workflows/create-attribute-value.js +0 -35
  708. package/.medusa/server/src/workflows/product-attribute/workflows/create-vendor-product-attribute.d.ts +0 -24
  709. package/.medusa/server/src/workflows/product-attribute/workflows/create-vendor-product-attribute.js +0 -42
  710. package/.medusa/server/src/workflows/product-attribute/workflows/delete-attribute-value.d.ts +0 -3
  711. package/.medusa/server/src/workflows/product-attribute/workflows/delete-attribute-value.js +0 -59
  712. package/.medusa/server/src/workflows/product-attribute/workflows/index.d.ts +0 -8
  713. package/.medusa/server/src/workflows/product-attribute/workflows/sync-product-attribute-values.d.ts +0 -20
  714. package/.medusa/server/src/workflows/product-attribute/workflows/sync-product-attribute-values.js +0 -67
  715. package/.medusa/server/src/workflows/product-attribute/workflows/update-product-with-variant-images.d.ts +0 -11
  716. package/.medusa/server/src/workflows/product-attribute/workflows/update-product-with-variant-images.js +0 -34
  717. package/.medusa/server/src/links/{category-attribute-link.d.ts → brand-seller-link.d.ts} +0 -0
  718. package/.medusa/server/src/links/{product-attribute-value-link.d.ts → cart-line-item-offer-link.d.ts} +0 -0
  719. package/.medusa/server/src/links/{product-vendor-product-attribute-link.d.ts → category-seller-link.d.ts} +0 -0
  720. package/.medusa/server/src/links/{seller-attribute-link.d.ts → offer-inventory-item-link.d.ts} +0 -0
  721. package/.medusa/server/src/links/{seller-attribute-value-link.d.ts → offer-price-set-link.d.ts} +0 -0
  722. package/.medusa/server/src/links/{seller-vendor-product-attribute-link.d.ts → offer-seller-link.d.ts} +0 -0
  723. package/.medusa/server/src/workflows/{hooks/product-created.d.ts → cart/hooks/validate-add-to-cart-stock.d.ts} +0 -0
  724. package/.medusa/server/src/workflows/{hooks/product-variant-created.d.ts → cart/hooks/validate-update-line-item-stock.d.ts} +0 -0
  725. package/.medusa/server/src/workflows/{attribute → product-edit}/index.d.ts +1 -1
@@ -1,13 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const utils_1 = require("@medusajs/framework/utils");
7
- const seller_1 = __importDefault(require("../modules/seller"));
8
- const vendor_product_attribute_1 = __importDefault(require("../modules/vendor-product-attribute"));
9
- exports.default = (0, utils_1.defineLink)(seller_1.default.linkable.seller, {
10
- linkable: vendor_product_attribute_1.default.linkable.vendorProductAttribute,
11
- isList: true,
12
- });
13
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VsbGVyLXZlbmRvci1wcm9kdWN0LWF0dHJpYnV0ZS1saW5rLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2xpbmtzL3NlbGxlci12ZW5kb3ItcHJvZHVjdC1hdHRyaWJ1dGUtbGluay50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLHFEQUFzRDtBQUV0RCwrREFBNEM7QUFDNUMsbUdBQThFO0FBRTlFLGtCQUFlLElBQUEsa0JBQVUsRUFBQyxnQkFBWSxDQUFDLFFBQVEsQ0FBQyxNQUFNLEVBQUU7SUFDdEQsUUFBUSxFQUNOLGtDQUE0QixDQUFDLFFBQVEsQ0FBQyxzQkFBc0I7SUFDOUQsTUFBTSxFQUFFLElBQUk7Q0FDYixDQUFDLENBQUEifQ==
@@ -1,51 +0,0 @@
1
- import { MercurModules } from "@mercurjs/types";
2
- import AttributeModuleService from "./service";
3
- export declare const ATTRIBUTE_MODULE = MercurModules.ATTRIBUTE;
4
- export { AttributeModuleService };
5
- declare const _default: import("@mercurjs/types").ModuleExports<typeof AttributeModuleService> & {
6
- linkable: {
7
- readonly attribute: {
8
- id: {
9
- serviceName: MercurModules.ATTRIBUTE;
10
- field: "attribute";
11
- linkable: "attribute_id";
12
- primaryKey: "id";
13
- };
14
- toJSON: () => {
15
- serviceName: MercurModules.ATTRIBUTE;
16
- field: "attribute";
17
- linkable: "attribute_id";
18
- primaryKey: "id";
19
- };
20
- };
21
- readonly attributeValue: {
22
- id: {
23
- serviceName: MercurModules.ATTRIBUTE;
24
- field: "attributeValue";
25
- linkable: "attribute_value_id";
26
- primaryKey: "id";
27
- };
28
- toJSON: () => {
29
- serviceName: MercurModules.ATTRIBUTE;
30
- field: "attributeValue";
31
- linkable: "attribute_value_id";
32
- primaryKey: "id";
33
- };
34
- };
35
- readonly attributePossibleValue: {
36
- id: {
37
- serviceName: MercurModules.ATTRIBUTE;
38
- field: "attributePossibleValue";
39
- linkable: "attribute_possible_value_id";
40
- primaryKey: "id";
41
- };
42
- toJSON: () => {
43
- serviceName: MercurModules.ATTRIBUTE;
44
- field: "attributePossibleValue";
45
- linkable: "attribute_possible_value_id";
46
- primaryKey: "id";
47
- };
48
- };
49
- };
50
- };
51
- export default _default;
@@ -1,15 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.AttributeModuleService = exports.ATTRIBUTE_MODULE = void 0;
7
- const utils_1 = require("@medusajs/framework/utils");
8
- const types_1 = require("@mercurjs/types");
9
- const service_1 = __importDefault(require("./service"));
10
- exports.AttributeModuleService = service_1.default;
11
- exports.ATTRIBUTE_MODULE = types_1.MercurModules.ATTRIBUTE;
12
- exports.default = (0, utils_1.Module)(exports.ATTRIBUTE_MODULE, {
13
- service: service_1.default,
14
- });
15
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvbW9kdWxlcy9hdHRyaWJ1dGUvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBQUEscURBQWtEO0FBQ2xELDJDQUErQztBQUUvQyx3REFBOEM7QUFHckMsaUNBSEYsaUJBQXNCLENBR0U7QUFEbEIsUUFBQSxnQkFBZ0IsR0FBRyxxQkFBYSxDQUFDLFNBQVMsQ0FBQTtBQUd2RCxrQkFBZSxJQUFBLGNBQU0sRUFBQyx3QkFBZ0IsRUFBRTtJQUN0QyxPQUFPLEVBQUUsaUJBQXNCO0NBQ2hDLENBQUMsQ0FBQSJ9
@@ -1,32 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Migration20260325000000 = void 0;
4
- const migrations_1 = require("@medusajs/framework/mikro-orm/migrations");
5
- class Migration20260325000000 extends migrations_1.Migration {
6
- async up() {
7
- this.addSql(`alter table if exists "attribute" drop constraint if exists "attribute_handle_unique";`);
8
- this.addSql(`create table if not exists "attribute" ("id" text not null, "name" text not null, "description" text null, "handle" text not null, "metadata" jsonb null, "ui_component" text check ("ui_component" in ('select', 'multivalue', 'unit', 'toggle', 'text_area', 'color_picker')) not null default 'select', "is_filterable" boolean not null default false, "is_required" boolean not null default false, "source" text not null default 'admin', "created_at" timestamptz not null default now(), "updated_at" timestamptz not null default now(), "deleted_at" timestamptz null, constraint "attribute_pkey" primary key ("id"));`);
9
- this.addSql(`CREATE UNIQUE INDEX IF NOT EXISTS "IDX_attribute_handle_unique" ON "attribute" (handle) WHERE deleted_at IS NULL;`);
10
- this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_attribute_deleted_at" ON "attribute" (deleted_at) WHERE deleted_at IS NULL;`);
11
- this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_attribute_source_name" ON "attribute" ("source", "name") WHERE deleted_at IS NULL;`);
12
- this.addSql(`create table if not exists "attribute_possible_value" ("id" text not null, "value" text not null, "rank" integer not null, "metadata" jsonb null, "attribute_id" text not null, "created_at" timestamptz not null default now(), "updated_at" timestamptz not null default now(), "deleted_at" timestamptz null, constraint "attribute_possible_value_pkey" primary key ("id"));`);
13
- this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_attribute_possible_value_attribute_id" ON "attribute_possible_value" (attribute_id) WHERE deleted_at IS NULL;`);
14
- this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_attribute_possible_value_deleted_at" ON "attribute_possible_value" (deleted_at) WHERE deleted_at IS NULL;`);
15
- this.addSql(`CREATE UNIQUE INDEX IF NOT EXISTS "UQ_attribute_id_value" ON "attribute_possible_value" (attribute_id, value) WHERE deleted_at IS NULL;`);
16
- this.addSql(`create table if not exists "attribute_value" ("id" text not null, "value" text not null, "rank" integer not null, "metadata" jsonb null, "source" text not null default 'admin', "attribute_id" text not null, "created_at" timestamptz not null default now(), "updated_at" timestamptz not null default now(), "deleted_at" timestamptz null, constraint "attribute_value_pkey" primary key ("id"));`);
17
- this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_attribute_value_attribute_id" ON "attribute_value" (attribute_id) WHERE deleted_at IS NULL;`);
18
- this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_attribute_value_deleted_at" ON "attribute_value" (deleted_at) WHERE deleted_at IS NULL;`);
19
- this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_attribute_value_attribute_source" ON "attribute_value" ("attribute_id", "source") WHERE deleted_at IS NULL;`);
20
- this.addSql(`alter table if exists "attribute_possible_value" add constraint "attribute_possible_value_attribute_id_foreign" foreign key ("attribute_id") references "attribute" ("id") on update cascade on delete cascade;`);
21
- this.addSql(`alter table if exists "attribute_value" add constraint "attribute_value_attribute_id_foreign" foreign key ("attribute_id") references "attribute" ("id") on update cascade on delete cascade;`);
22
- }
23
- async down() {
24
- this.addSql(`alter table if exists "attribute_possible_value" drop constraint if exists "attribute_possible_value_attribute_id_foreign";`);
25
- this.addSql(`alter table if exists "attribute_value" drop constraint if exists "attribute_value_attribute_id_foreign";`);
26
- this.addSql(`drop table if exists "attribute" cascade;`);
27
- this.addSql(`drop table if exists "attribute_possible_value" cascade;`);
28
- this.addSql(`drop table if exists "attribute_value" cascade;`);
29
- }
30
- }
31
- exports.Migration20260325000000 = Migration20260325000000;
32
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWlncmF0aW9uMjAyNjAzMjUwMDAwMDAuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbW9kdWxlcy9hdHRyaWJ1dGUvbWlncmF0aW9ucy9NaWdyYXRpb24yMDI2MDMyNTAwMDAwMC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSx5RUFBb0U7QUFFcEUsTUFBYSx1QkFBd0IsU0FBUSxzQkFBUztJQUMzQyxLQUFLLENBQUMsRUFBRTtRQUNmLElBQUksQ0FBQyxNQUFNLENBQ1Qsd0ZBQXdGLENBQ3pGLENBQUE7UUFDRCxJQUFJLENBQUMsTUFBTSxDQUNULG9tQkFBb21CLENBQ3JtQixDQUFBO1FBQ0QsSUFBSSxDQUFDLE1BQU0sQ0FDVCxtSEFBbUgsQ0FDcEgsQ0FBQTtRQUNELElBQUksQ0FBQyxNQUFNLENBQ1QsNkdBQTZHLENBQzlHLENBQUE7UUFDRCxJQUFJLENBQUMsTUFBTSxDQUNULG9IQUFvSCxDQUNySCxDQUFBO1FBRUQsSUFBSSxDQUFDLE1BQU0sQ0FDVCxrWEFBa1gsQ0FDblgsQ0FBQTtRQUNELElBQUksQ0FBQyxNQUFNLENBQ1QsK0lBQStJLENBQ2hKLENBQUE7UUFDRCxJQUFJLENBQUMsTUFBTSxDQUNULDJJQUEySSxDQUM1SSxDQUFBO1FBQ0QsSUFBSSxDQUFDLE1BQU0sQ0FDVCx5SUFBeUksQ0FDMUksQ0FBQTtRQUVELElBQUksQ0FBQyxNQUFNLENBQ1Qsd1lBQXdZLENBQ3pZLENBQUE7UUFDRCxJQUFJLENBQUMsTUFBTSxDQUNULDZIQUE2SCxDQUM5SCxDQUFBO1FBQ0QsSUFBSSxDQUFDLE1BQU0sQ0FDVCx5SEFBeUgsQ0FDMUgsQ0FBQTtRQUNELElBQUksQ0FBQyxNQUFNLENBQ1QsNklBQTZJLENBQzlJLENBQUE7UUFFRCxJQUFJLENBQUMsTUFBTSxDQUNULGlOQUFpTixDQUNsTixDQUFBO1FBQ0QsSUFBSSxDQUFDLE1BQU0sQ0FDVCwrTEFBK0wsQ0FDaE0sQ0FBQTtJQUNILENBQUM7SUFFUSxLQUFLLENBQUMsSUFBSTtRQUNqQixJQUFJLENBQUMsTUFBTSxDQUNULDZIQUE2SCxDQUM5SCxDQUFBO1FBQ0QsSUFBSSxDQUFDLE1BQU0sQ0FDVCwyR0FBMkcsQ0FDNUcsQ0FBQTtRQUNELElBQUksQ0FBQyxNQUFNLENBQUMsMkNBQTJDLENBQUMsQ0FBQTtRQUN4RCxJQUFJLENBQUMsTUFBTSxDQUFDLDBEQUEwRCxDQUFDLENBQUE7UUFDdkUsSUFBSSxDQUFDLE1BQU0sQ0FBQyxpREFBaUQsQ0FBQyxDQUFBO0lBQ2hFLENBQUM7Q0FDRjtBQS9ERCwwREErREMifQ==
@@ -1,27 +0,0 @@
1
- declare const AttributePossibleValue: import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
2
- id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
3
- value: import("@medusajs/framework/utils").TextProperty;
4
- rank: import("@medusajs/framework/utils").NumberProperty;
5
- metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
6
- attribute: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
7
- id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
8
- name: import("@medusajs/framework/utils").TextProperty;
9
- description: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
10
- is_required: import("@medusajs/framework/utils").BooleanProperty;
11
- is_filterable: import("@medusajs/framework/utils").BooleanProperty;
12
- handle: import("@medusajs/framework/utils").TextProperty;
13
- metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
14
- ui_component: import("@medusajs/framework/utils").EnumProperty<import("@mercurjs/types").AttributeUIComponent[]>;
15
- source: import("@medusajs/framework/utils").TextProperty;
16
- values: import("@medusajs/framework/utils").HasMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
17
- id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
18
- value: import("@medusajs/framework/utils").TextProperty;
19
- rank: import("@medusajs/framework/utils").NumberProperty;
20
- metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
21
- source: import("@medusajs/framework/utils").TextProperty;
22
- attribute: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "attribute">, undefined>;
23
- }>, "attribute_value">>;
24
- possible_values: import("@medusajs/framework/utils").HasMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "attribute_possible_value">>;
25
- }>, "attribute">, undefined>;
26
- }>, "attribute_possible_value">;
27
- export default AttributePossibleValue;
@@ -1,26 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const utils_1 = require("@medusajs/framework/utils");
7
- const attribute_1 = __importDefault(require("./attribute"));
8
- const AttributePossibleValue = utils_1.model
9
- .define("attribute_possible_value", {
10
- id: utils_1.model.id({ prefix: "attr_pos_val" }).primaryKey(),
11
- value: utils_1.model.text(),
12
- rank: utils_1.model.number(),
13
- metadata: utils_1.model.json().nullable(),
14
- attribute: utils_1.model.belongsTo(() => attribute_1.default, {
15
- mappedBy: "possible_values",
16
- }),
17
- })
18
- .indexes([
19
- {
20
- on: ["attribute_id", "value"],
21
- name: "UQ_attribute_id_value",
22
- unique: true,
23
- },
24
- ]);
25
- exports.default = AttributePossibleValue;
26
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXR0cmlidXRlLXBvc3NpYmxlLXZhbHVlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21vZHVsZXMvYXR0cmlidXRlL21vZGVscy9hdHRyaWJ1dGUtcG9zc2libGUtdmFsdWUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxxREFBaUQ7QUFFakQsNERBQW1DO0FBRW5DLE1BQU0sc0JBQXNCLEdBQUcsYUFBSztLQUNqQyxNQUFNLENBQUMsMEJBQTBCLEVBQUU7SUFDbEMsRUFBRSxFQUFFLGFBQUssQ0FBQyxFQUFFLENBQUMsRUFBRSxNQUFNLEVBQUUsY0FBYyxFQUFFLENBQUMsQ0FBQyxVQUFVLEVBQUU7SUFDckQsS0FBSyxFQUFFLGFBQUssQ0FBQyxJQUFJLEVBQUU7SUFDbkIsSUFBSSxFQUFFLGFBQUssQ0FBQyxNQUFNLEVBQUU7SUFDcEIsUUFBUSxFQUFFLGFBQUssQ0FBQyxJQUFJLEVBQUUsQ0FBQyxRQUFRLEVBQUU7SUFDakMsU0FBUyxFQUFFLGFBQUssQ0FBQyxTQUFTLENBQUMsR0FBRyxFQUFFLENBQUMsbUJBQVMsRUFBRTtRQUMxQyxRQUFRLEVBQUUsaUJBQWlCO0tBQzVCLENBQUM7Q0FDSCxDQUFDO0tBQ0QsT0FBTyxDQUFDO0lBQ1A7UUFDRSxFQUFFLEVBQUUsQ0FBQyxjQUFjLEVBQUUsT0FBTyxDQUFDO1FBQzdCLElBQUksRUFBRSx1QkFBdUI7UUFDN0IsTUFBTSxFQUFFLElBQUk7S0FDYjtDQUNGLENBQUMsQ0FBQTtBQUVKLGtCQUFlLHNCQUFzQixDQUFBIn0=
@@ -1,27 +0,0 @@
1
- declare const AttributeValue: import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
2
- id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
3
- value: import("@medusajs/framework/utils").TextProperty;
4
- rank: import("@medusajs/framework/utils").NumberProperty;
5
- metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
6
- source: import("@medusajs/framework/utils").TextProperty;
7
- attribute: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
8
- id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
9
- name: import("@medusajs/framework/utils").TextProperty;
10
- description: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
11
- is_required: import("@medusajs/framework/utils").BooleanProperty;
12
- is_filterable: import("@medusajs/framework/utils").BooleanProperty;
13
- handle: import("@medusajs/framework/utils").TextProperty;
14
- metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
15
- ui_component: import("@medusajs/framework/utils").EnumProperty<import("@mercurjs/types").AttributeUIComponent[]>;
16
- source: import("@medusajs/framework/utils").TextProperty;
17
- values: import("@medusajs/framework/utils").HasMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "attribute_value">>;
18
- possible_values: import("@medusajs/framework/utils").HasMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
19
- id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
20
- value: import("@medusajs/framework/utils").TextProperty;
21
- rank: import("@medusajs/framework/utils").NumberProperty;
22
- metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
23
- attribute: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "attribute">, undefined>;
24
- }>, "attribute_possible_value">>;
25
- }>, "attribute">, undefined>;
26
- }>, "attribute_value">;
27
- export default AttributeValue;
@@ -1,26 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const utils_1 = require("@medusajs/framework/utils");
7
- const attribute_1 = __importDefault(require("./attribute"));
8
- const AttributeValue = utils_1.model
9
- .define("attribute_value", {
10
- id: utils_1.model.id({ prefix: "attr_val" }).primaryKey(),
11
- value: utils_1.model.text(),
12
- rank: utils_1.model.number(),
13
- metadata: utils_1.model.json().nullable(),
14
- source: utils_1.model.text().default("admin"),
15
- attribute: utils_1.model.belongsTo(() => attribute_1.default, {
16
- mappedBy: "values",
17
- }),
18
- })
19
- .indexes([
20
- {
21
- on: ["attribute_id", "source"],
22
- name: "IDX_attribute_value_attribute_source",
23
- },
24
- ]);
25
- exports.default = AttributeValue;
26
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXR0cmlidXRlLXZhbHVlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21vZHVsZXMvYXR0cmlidXRlL21vZGVscy9hdHRyaWJ1dGUtdmFsdWUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxxREFBaUQ7QUFFakQsNERBQW1DO0FBRW5DLE1BQU0sY0FBYyxHQUFHLGFBQUs7S0FDekIsTUFBTSxDQUFDLGlCQUFpQixFQUFFO0lBQ3pCLEVBQUUsRUFBRSxhQUFLLENBQUMsRUFBRSxDQUFDLEVBQUUsTUFBTSxFQUFFLFVBQVUsRUFBRSxDQUFDLENBQUMsVUFBVSxFQUFFO0lBQ2pELEtBQUssRUFBRSxhQUFLLENBQUMsSUFBSSxFQUFFO0lBQ25CLElBQUksRUFBRSxhQUFLLENBQUMsTUFBTSxFQUFFO0lBQ3BCLFFBQVEsRUFBRSxhQUFLLENBQUMsSUFBSSxFQUFFLENBQUMsUUFBUSxFQUFFO0lBQ2pDLE1BQU0sRUFBRSxhQUFLLENBQUMsSUFBSSxFQUFFLENBQUMsT0FBTyxDQUFDLE9BQU8sQ0FBQztJQUNyQyxTQUFTLEVBQUUsYUFBSyxDQUFDLFNBQVMsQ0FBQyxHQUFHLEVBQUUsQ0FBQyxtQkFBUyxFQUFFO1FBQzFDLFFBQVEsRUFBRSxRQUFRO0tBQ25CLENBQUM7Q0FDSCxDQUFDO0tBQ0QsT0FBTyxDQUFDO0lBQ1A7UUFDRSxFQUFFLEVBQUUsQ0FBQyxjQUFjLEVBQUUsUUFBUSxDQUFDO1FBQzlCLElBQUksRUFBRSxzQ0FBc0M7S0FDN0M7Q0FDRixDQUFDLENBQUE7QUFFSixrQkFBZSxjQUFjLENBQUEifQ==
@@ -1,28 +0,0 @@
1
- import { AttributeUIComponent } from "@mercurjs/types";
2
- declare const Attribute: import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
3
- id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
4
- name: import("@medusajs/framework/utils").TextProperty;
5
- description: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
6
- is_required: import("@medusajs/framework/utils").BooleanProperty;
7
- is_filterable: import("@medusajs/framework/utils").BooleanProperty;
8
- handle: import("@medusajs/framework/utils").TextProperty;
9
- metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
10
- ui_component: import("@medusajs/framework/utils").EnumProperty<AttributeUIComponent[]>;
11
- source: import("@medusajs/framework/utils").TextProperty;
12
- values: import("@medusajs/framework/utils").HasMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
13
- id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
14
- value: import("@medusajs/framework/utils").TextProperty;
15
- rank: import("@medusajs/framework/utils").NumberProperty;
16
- metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
17
- source: import("@medusajs/framework/utils").TextProperty;
18
- attribute: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "attribute">, undefined>;
19
- }>, "attribute_value">>;
20
- possible_values: import("@medusajs/framework/utils").HasMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
21
- id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
22
- value: import("@medusajs/framework/utils").TextProperty;
23
- rank: import("@medusajs/framework/utils").NumberProperty;
24
- metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
25
- attribute: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "attribute">, undefined>;
26
- }>, "attribute_possible_value">>;
27
- }>, "attribute">;
28
- export default Attribute;
@@ -1,36 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const utils_1 = require("@medusajs/framework/utils");
7
- const types_1 = require("@mercurjs/types");
8
- const attribute_possible_value_1 = __importDefault(require("./attribute-possible-value"));
9
- const attribute_value_1 = __importDefault(require("./attribute-value"));
10
- const Attribute = utils_1.model
11
- .define("attribute", {
12
- id: utils_1.model.id({ prefix: "attr" }).primaryKey(),
13
- name: utils_1.model.text().searchable(),
14
- description: utils_1.model.text().nullable(),
15
- is_required: utils_1.model.boolean().default(false),
16
- is_filterable: utils_1.model.boolean().default(false),
17
- handle: utils_1.model.text().unique(),
18
- metadata: utils_1.model.json().nullable(),
19
- ui_component: utils_1.model
20
- .enum(Object.values(types_1.AttributeUIComponent))
21
- .default(types_1.AttributeUIComponent.SELECT),
22
- source: utils_1.model.text().default("admin"),
23
- values: utils_1.model.hasMany(() => attribute_value_1.default),
24
- possible_values: utils_1.model.hasMany(() => attribute_possible_value_1.default),
25
- })
26
- .indexes([
27
- {
28
- on: ["source", "name"],
29
- name: "IDX_attribute_source_name",
30
- },
31
- ])
32
- .cascades({
33
- delete: ["values", "possible_values"],
34
- });
35
- exports.default = Attribute;
36
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXR0cmlidXRlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21vZHVsZXMvYXR0cmlidXRlL21vZGVscy9hdHRyaWJ1dGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxxREFBaUQ7QUFFakQsMkNBQXNEO0FBQ3RELDBGQUErRDtBQUMvRCx3RUFBOEM7QUFFOUMsTUFBTSxTQUFTLEdBQUcsYUFBSztLQUNwQixNQUFNLENBQUMsV0FBVyxFQUFFO0lBQ25CLEVBQUUsRUFBRSxhQUFLLENBQUMsRUFBRSxDQUFDLEVBQUUsTUFBTSxFQUFFLE1BQU0sRUFBRSxDQUFDLENBQUMsVUFBVSxFQUFFO0lBQzdDLElBQUksRUFBRSxhQUFLLENBQUMsSUFBSSxFQUFFLENBQUMsVUFBVSxFQUFFO0lBQy9CLFdBQVcsRUFBRSxhQUFLLENBQUMsSUFBSSxFQUFFLENBQUMsUUFBUSxFQUFFO0lBQ3BDLFdBQVcsRUFBRSxhQUFLLENBQUMsT0FBTyxFQUFFLENBQUMsT0FBTyxDQUFDLEtBQUssQ0FBQztJQUMzQyxhQUFhLEVBQUUsYUFBSyxDQUFDLE9BQU8sRUFBRSxDQUFDLE9BQU8sQ0FBQyxLQUFLLENBQUM7SUFDN0MsTUFBTSxFQUFFLGFBQUssQ0FBQyxJQUFJLEVBQUUsQ0FBQyxNQUFNLEVBQUU7SUFDN0IsUUFBUSxFQUFFLGFBQUssQ0FBQyxJQUFJLEVBQUUsQ0FBQyxRQUFRLEVBQUU7SUFDakMsWUFBWSxFQUFFLGFBQUs7U0FDaEIsSUFBSSxDQUFDLE1BQU0sQ0FBQyxNQUFNLENBQUMsNEJBQW9CLENBQUMsQ0FBQztTQUN6QyxPQUFPLENBQUMsNEJBQW9CLENBQUMsTUFBTSxDQUFDO0lBQ3ZDLE1BQU0sRUFBRSxhQUFLLENBQUMsSUFBSSxFQUFFLENBQUMsT0FBTyxDQUFDLE9BQU8sQ0FBQztJQUNyQyxNQUFNLEVBQUUsYUFBSyxDQUFDLE9BQU8sQ0FBQyxHQUFHLEVBQUUsQ0FBQyx5QkFBYyxDQUFDO0lBQzNDLGVBQWUsRUFBRSxhQUFLLENBQUMsT0FBTyxDQUFDLEdBQUcsRUFBRSxDQUFDLGtDQUFzQixDQUFDO0NBQzdELENBQUM7S0FDRCxPQUFPLENBQUM7SUFDUDtRQUNFLEVBQUUsRUFBRSxDQUFDLFFBQVEsRUFBRSxNQUFNLENBQUM7UUFDdEIsSUFBSSxFQUFFLDJCQUEyQjtLQUNsQztDQUNGLENBQUM7S0FDRCxRQUFRLENBQUM7SUFDUixNQUFNLEVBQUUsQ0FBQyxRQUFRLEVBQUUsaUJBQWlCLENBQUM7Q0FDdEMsQ0FBQyxDQUFBO0FBRUosa0JBQWUsU0FBUyxDQUFBIn0=
@@ -1,3 +0,0 @@
1
- export { default as Attribute } from "./attribute";
2
- export { default as AttributeValue } from "./attribute-value";
3
- export { default as AttributePossibleValue } from "./attribute-possible-value";
@@ -1,13 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.AttributePossibleValue = exports.AttributeValue = exports.Attribute = void 0;
7
- var attribute_1 = require("./attribute");
8
- Object.defineProperty(exports, "Attribute", { enumerable: true, get: function () { return __importDefault(attribute_1).default; } });
9
- var attribute_value_1 = require("./attribute-value");
10
- Object.defineProperty(exports, "AttributeValue", { enumerable: true, get: function () { return __importDefault(attribute_value_1).default; } });
11
- var attribute_possible_value_1 = require("./attribute-possible-value");
12
- Object.defineProperty(exports, "AttributePossibleValue", { enumerable: true, get: function () { return __importDefault(attribute_possible_value_1).default; } });
13
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbW9kdWxlcy9hdHRyaWJ1dGUvbW9kZWxzL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7OztBQUFBLHlDQUFrRDtBQUF6Qyx1SEFBQSxPQUFPLE9BQWE7QUFDN0IscURBQTZEO0FBQXBELGtJQUFBLE9BQU8sT0FBa0I7QUFDbEMsdUVBQThFO0FBQXJFLG1KQUFBLE9BQU8sT0FBMEIifQ==
@@ -1,105 +0,0 @@
1
- import { EntityManager } from "@medusajs/framework/mikro-orm/knex";
2
- import { Context, DAL, InferTypeOf } from "@medusajs/framework/types";
3
- import { UpdateAttributeDTO } from "@mercurjs/types";
4
- import Attribute from "./models/attribute";
5
- import AttributePossibleValue from "./models/attribute-possible-value";
6
- type IAttribute = InferTypeOf<typeof Attribute>;
7
- type IAttributePossibleValue = InferTypeOf<typeof AttributePossibleValue>;
8
- type InjectedDependencies = {
9
- attributeRepository: DAL.RepositoryService<IAttribute>;
10
- attributePossibleValueRepository: DAL.RepositoryService<IAttributePossibleValue>;
11
- };
12
- declare const AttributeModuleService_base: import("@medusajs/framework/utils").MedusaServiceReturnType<import("@medusajs/framework/utils").ModelConfigurationsToConfigTemplate<{
13
- readonly Attribute: import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
14
- id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
15
- name: import("@medusajs/framework/utils").TextProperty;
16
- description: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
17
- is_required: import("@medusajs/framework/utils").BooleanProperty;
18
- is_filterable: import("@medusajs/framework/utils").BooleanProperty;
19
- handle: import("@medusajs/framework/utils").TextProperty;
20
- metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
21
- ui_component: import("@medusajs/framework/utils").EnumProperty<import("@mercurjs/types").AttributeUIComponent[]>;
22
- source: import("@medusajs/framework/utils").TextProperty;
23
- values: import("@medusajs/framework/utils").HasMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
24
- id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
25
- value: import("@medusajs/framework/utils").TextProperty;
26
- rank: import("@medusajs/framework/utils").NumberProperty;
27
- metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
28
- source: import("@medusajs/framework/utils").TextProperty;
29
- attribute: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "attribute">, undefined>;
30
- }>, "attribute_value">>;
31
- possible_values: import("@medusajs/framework/utils").HasMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
32
- id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
33
- value: import("@medusajs/framework/utils").TextProperty;
34
- rank: import("@medusajs/framework/utils").NumberProperty;
35
- metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
36
- attribute: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "attribute">, undefined>;
37
- }>, "attribute_possible_value">>;
38
- }>, "attribute">;
39
- readonly AttributeValue: import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
40
- id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
41
- value: import("@medusajs/framework/utils").TextProperty;
42
- rank: import("@medusajs/framework/utils").NumberProperty;
43
- metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
44
- source: import("@medusajs/framework/utils").TextProperty;
45
- attribute: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
46
- id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
47
- name: import("@medusajs/framework/utils").TextProperty;
48
- description: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
49
- is_required: import("@medusajs/framework/utils").BooleanProperty;
50
- is_filterable: import("@medusajs/framework/utils").BooleanProperty;
51
- handle: import("@medusajs/framework/utils").TextProperty;
52
- metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
53
- ui_component: import("@medusajs/framework/utils").EnumProperty<import("@mercurjs/types").AttributeUIComponent[]>;
54
- source: import("@medusajs/framework/utils").TextProperty;
55
- values: import("@medusajs/framework/utils").HasMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "attribute_value">>;
56
- possible_values: import("@medusajs/framework/utils").HasMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
57
- id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
58
- value: import("@medusajs/framework/utils").TextProperty;
59
- rank: import("@medusajs/framework/utils").NumberProperty;
60
- metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
61
- attribute: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "attribute">, undefined>;
62
- }>, "attribute_possible_value">>;
63
- }>, "attribute">, undefined>;
64
- }>, "attribute_value">;
65
- readonly AttributePossibleValue: import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
66
- id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
67
- value: import("@medusajs/framework/utils").TextProperty;
68
- rank: import("@medusajs/framework/utils").NumberProperty;
69
- metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
70
- attribute: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
71
- id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
72
- name: import("@medusajs/framework/utils").TextProperty;
73
- description: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
74
- is_required: import("@medusajs/framework/utils").BooleanProperty;
75
- is_filterable: import("@medusajs/framework/utils").BooleanProperty;
76
- handle: import("@medusajs/framework/utils").TextProperty;
77
- metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
78
- ui_component: import("@medusajs/framework/utils").EnumProperty<import("@mercurjs/types").AttributeUIComponent[]>;
79
- source: import("@medusajs/framework/utils").TextProperty;
80
- values: import("@medusajs/framework/utils").HasMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
81
- id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
82
- value: import("@medusajs/framework/utils").TextProperty;
83
- rank: import("@medusajs/framework/utils").NumberProperty;
84
- metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
85
- source: import("@medusajs/framework/utils").TextProperty;
86
- attribute: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "attribute">, undefined>;
87
- }>, "attribute_value">>;
88
- possible_values: import("@medusajs/framework/utils").HasMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "attribute_possible_value">>;
89
- }>, "attribute">, undefined>;
90
- }>, "attribute_possible_value">;
91
- }>>;
92
- declare class AttributeModuleService extends AttributeModuleService_base {
93
- protected attributeRepository_: DAL.RepositoryService<IAttribute>;
94
- protected attributePossibleValueRepository_: DAL.RepositoryService<IAttributePossibleValue>;
95
- constructor({ attributeRepository, attributePossibleValueRepository, }: InjectedDependencies);
96
- updateAttributeWithUpsertOrReplacePossibleValues(input: UpdateAttributeDTO | UpdateAttributeDTO[], sharedContext?: Context<EntityManager>): Promise<{
97
- entities: any[];
98
- performedActions: DAL.PerformedActions;
99
- }>;
100
- protected updateAttributeWithUpsertOrReplacePossibleValues_(input: UpdateAttributeDTO[], sharedContext?: Context<EntityManager>): Promise<{
101
- entities: any[];
102
- performedActions: DAL.PerformedActions;
103
- }>;
104
- }
105
- export default AttributeModuleService;
@@ -1,74 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- var __param = (this && this.__param) || function (paramIndex, decorator) {
12
- return function (target, key) { decorator(target, key, paramIndex); }
13
- };
14
- var __importDefault = (this && this.__importDefault) || function (mod) {
15
- return (mod && mod.__esModule) ? mod : { "default": mod };
16
- };
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- const utils_1 = require("@medusajs/framework/utils");
19
- const attribute_1 = __importDefault(require("./models/attribute"));
20
- const attribute_possible_value_1 = __importDefault(require("./models/attribute-possible-value"));
21
- const attribute_value_1 = __importDefault(require("./models/attribute-value"));
22
- class AttributeModuleService extends (0, utils_1.MedusaService)({
23
- Attribute: attribute_1.default,
24
- AttributeValue: attribute_value_1.default,
25
- AttributePossibleValue: attribute_possible_value_1.default,
26
- }) {
27
- constructor({ attributeRepository, attributePossibleValueRepository, }) {
28
- super(...arguments);
29
- this.attributeRepository_ = attributeRepository;
30
- this.attributePossibleValueRepository_ =
31
- attributePossibleValueRepository;
32
- }
33
- async updateAttributeWithUpsertOrReplacePossibleValues(input, sharedContext) {
34
- const normalizedInput = Array.isArray(input) ? input : [input];
35
- return this.updateAttributeWithUpsertOrReplacePossibleValues_(normalizedInput, sharedContext);
36
- }
37
- async updateAttributeWithUpsertOrReplacePossibleValues_(input, sharedContext) {
38
- const inputsWithValues = input.filter((element) => element.possible_values !== undefined);
39
- const allPossibleValues = inputsWithValues.flatMap((element) => element.possible_values);
40
- const upsertedValues = allPossibleValues.length
41
- ? await this.attributePossibleValueRepository_.upsert(allPossibleValues, sharedContext)
42
- : [];
43
- const attributesInput = input.map((toUpdate) => {
44
- const { possible_values, ...rest } = toUpdate;
45
- if (possible_values === undefined) {
46
- return rest;
47
- }
48
- return {
49
- ...rest,
50
- possible_values: upsertedValues
51
- .filter((val) => val.attribute_id === rest.id)
52
- .map((upserted) => ({ id: upserted.id })),
53
- };
54
- });
55
- const hasRelationUpdates = inputsWithValues.length > 0;
56
- return this.attributeRepository_.upsertWithReplace(attributesInput, { relations: hasRelationUpdates ? ["possible_values"] : [] }, sharedContext);
57
- }
58
- }
59
- __decorate([
60
- (0, utils_1.InjectManager)(),
61
- __param(1, (0, utils_1.MedusaContext)()),
62
- __metadata("design:type", Function),
63
- __metadata("design:paramtypes", [Object, Object]),
64
- __metadata("design:returntype", Promise)
65
- ], AttributeModuleService.prototype, "updateAttributeWithUpsertOrReplacePossibleValues", null);
66
- __decorate([
67
- (0, utils_1.InjectTransactionManager)(),
68
- __param(1, (0, utils_1.MedusaContext)()),
69
- __metadata("design:type", Function),
70
- __metadata("design:paramtypes", [Array, Object]),
71
- __metadata("design:returntype", Promise)
72
- ], AttributeModuleService.prototype, "updateAttributeWithUpsertOrReplacePossibleValues_", null);
73
- exports.default = AttributeModuleService;
74
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9tb2R1bGVzL2F0dHJpYnV0ZS9zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBRUEscURBS2tDO0FBR2xDLG1FQUEwQztBQUMxQyxpR0FBc0U7QUFDdEUsK0VBQXFEO0FBVXJELE1BQU0sc0JBQXVCLFNBQVEsSUFBQSxxQkFBYSxFQUFDO0lBQ2pELFNBQVMsRUFBVCxtQkFBUztJQUNULGNBQWMsRUFBZCx5QkFBYztJQUNkLHNCQUFzQixFQUF0QixrQ0FBc0I7Q0FDdkIsQ0FBQztJQUlBLFlBQVksRUFDVixtQkFBbUIsRUFDbkIsZ0NBQWdDLEdBQ1g7UUFDckIsS0FBSyxDQUFDLEdBQUcsU0FBUyxDQUFDLENBQUE7UUFDbkIsSUFBSSxDQUFDLG9CQUFvQixHQUFHLG1CQUFtQixDQUFBO1FBQy9DLElBQUksQ0FBQyxpQ0FBaUM7WUFDcEMsZ0NBQWdDLENBQUE7SUFDcEMsQ0FBQztJQUdLLEFBQU4sS0FBSyxDQUFDLGdEQUFnRCxDQUNwRCxLQUFnRCxFQUMvQixhQUFzQztRQUV2RCxNQUFNLGVBQWUsR0FBRyxLQUFLLENBQUMsT0FBTyxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQyxLQUFLLENBQUMsQ0FBQyxDQUFDLENBQUMsS0FBSyxDQUFDLENBQUE7UUFFOUQsT0FBTyxJQUFJLENBQUMsaURBQWlELENBQzNELGVBQWUsRUFDZixhQUFhLENBQ2QsQ0FBQTtJQUNILENBQUM7SUFHZSxBQUFOLEtBQUssQ0FBQyxpREFBaUQsQ0FDL0QsS0FBMkIsRUFDVixhQUFzQztRQUV2RCxNQUFNLGdCQUFnQixHQUFHLEtBQUssQ0FBQyxNQUFNLENBQ25DLENBQUMsT0FBTyxFQUFFLEVBQUUsQ0FBQyxPQUFPLENBQUMsZUFBZSxLQUFLLFNBQVMsQ0FDbkQsQ0FBQTtRQUVELE1BQU0saUJBQWlCLEdBQUcsZ0JBQWdCLENBQUMsT0FBTyxDQUNoRCxDQUFDLE9BQU8sRUFBRSxFQUFFLENBQUMsT0FBTyxDQUFDLGVBQWdCLENBQ3RDLENBQUE7UUFFRCxNQUFNLGNBQWMsR0FBRyxpQkFBaUIsQ0FBQyxNQUFNO1lBQzdDLENBQUMsQ0FBQyxNQUFNLElBQUksQ0FBQyxpQ0FBaUMsQ0FBQyxNQUFNLENBQ2pELGlCQUFpQixFQUNqQixhQUFhLENBQ2Q7WUFDSCxDQUFDLENBQUMsRUFBRSxDQUFBO1FBRU4sTUFBTSxlQUFlLEdBQUcsS0FBSyxDQUFDLEdBQUcsQ0FBQyxDQUFDLFFBQVEsRUFBRSxFQUFFO1lBQzdDLE1BQU0sRUFBRSxlQUFlLEVBQUUsR0FBRyxJQUFJLEVBQUUsR0FBRyxRQUFRLENBQUE7WUFFN0MsSUFBSSxlQUFlLEtBQUssU0FBUyxFQUFFLENBQUM7Z0JBQ2xDLE9BQU8sSUFBSSxDQUFBO1lBQ2IsQ0FBQztZQUVELE9BQU87Z0JBQ0wsR0FBRyxJQUFJO2dCQUNQLGVBQWUsRUFBRSxjQUFjO3FCQUM1QixNQUFNLENBQUMsQ0FBQyxHQUFHLEVBQUUsRUFBRSxDQUFDLEdBQUcsQ0FBQyxZQUFZLEtBQUssSUFBSSxDQUFDLEVBQUUsQ0FBQztxQkFDN0MsR0FBRyxDQUFDLENBQUMsUUFBUSxFQUFFLEVBQUUsQ0FBQyxDQUFDLEVBQUUsRUFBRSxFQUFFLFFBQVEsQ0FBQyxFQUFFLEVBQUUsQ0FBQyxDQUFDO2FBQzVDLENBQUE7UUFDSCxDQUFDLENBQUMsQ0FBQTtRQUVGLE1BQU0sa0JBQWtCLEdBQUcsZ0JBQWdCLENBQUMsTUFBTSxHQUFHLENBQUMsQ0FBQTtRQUV0RCxPQUFPLElBQUksQ0FBQyxvQkFBb0IsQ0FBQyxpQkFBaUIsQ0FDaEQsZUFBZSxFQUNmLEVBQUUsU0FBUyxFQUFFLGtCQUFrQixDQUFDLENBQUMsQ0FBQyxDQUFDLGlCQUFpQixDQUFDLENBQUMsQ0FBQyxDQUFDLEVBQUUsRUFBRSxFQUM1RCxhQUFhLENBQ2QsQ0FBQTtJQUNILENBQUM7Q0FDRjtBQXZETztJQURMLElBQUEscUJBQWEsR0FBRTtJQUdiLFdBQUEsSUFBQSxxQkFBYSxHQUFFLENBQUE7Ozs7OEZBUWpCO0FBR2U7SUFEZixJQUFBLGdDQUF3QixHQUFFO0lBR3hCLFdBQUEsSUFBQSxxQkFBYSxHQUFFLENBQUE7Ozs7K0ZBdUNqQjtBQUdILGtCQUFlLHNCQUFzQixDQUFBIn0=
@@ -1,23 +0,0 @@
1
- import { MercurModules } from "@mercurjs/types";
2
- import VendorProductAttributeModuleService from "./service";
3
- export declare const VENDOR_PRODUCT_ATTRIBUTE_MODULE = MercurModules.VENDOR_PRODUCT_ATTRIBUTE;
4
- export { VendorProductAttributeModuleService };
5
- declare const _default: import("@mercurjs/types").ModuleExports<typeof VendorProductAttributeModuleService> & {
6
- linkable: {
7
- readonly vendorProductAttribute: {
8
- id: {
9
- serviceName: MercurModules.VENDOR_PRODUCT_ATTRIBUTE;
10
- field: "vendorProductAttribute";
11
- linkable: "vendor_product_attribute_id";
12
- primaryKey: "id";
13
- };
14
- toJSON: () => {
15
- serviceName: MercurModules.VENDOR_PRODUCT_ATTRIBUTE;
16
- field: "vendorProductAttribute";
17
- linkable: "vendor_product_attribute_id";
18
- primaryKey: "id";
19
- };
20
- };
21
- };
22
- };
23
- export default _default;
@@ -1,15 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.VendorProductAttributeModuleService = exports.VENDOR_PRODUCT_ATTRIBUTE_MODULE = void 0;
7
- const utils_1 = require("@medusajs/framework/utils");
8
- const types_1 = require("@mercurjs/types");
9
- const service_1 = __importDefault(require("./service"));
10
- exports.VendorProductAttributeModuleService = service_1.default;
11
- exports.VENDOR_PRODUCT_ATTRIBUTE_MODULE = types_1.MercurModules.VENDOR_PRODUCT_ATTRIBUTE;
12
- exports.default = (0, utils_1.Module)(exports.VENDOR_PRODUCT_ATTRIBUTE_MODULE, {
13
- service: service_1.default,
14
- });
15
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvbW9kdWxlcy92ZW5kb3ItcHJvZHVjdC1hdHRyaWJ1dGUvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBQUEscURBQWtEO0FBQ2xELDJDQUErQztBQUUvQyx3REFBMkQ7QUFJbEQsOENBSkYsaUJBQW1DLENBSUU7QUFGL0IsUUFBQSwrQkFBK0IsR0FDMUMscUJBQWEsQ0FBQyx3QkFBd0IsQ0FBQTtBQUd4QyxrQkFBZSxJQUFBLGNBQU0sRUFBQyx1Q0FBK0IsRUFBRTtJQUNyRCxPQUFPLEVBQUUsaUJBQW1DO0NBQzdDLENBQUMsQ0FBQSJ9
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Migration20260325000000 = void 0;
4
- const migrations_1 = require("@medusajs/framework/mikro-orm/migrations");
5
- class Migration20260325000000 extends migrations_1.Migration {
6
- async up() {
7
- this.addSql(`create table if not exists "vendor_product_attribute" ("id" text not null, "name" text not null, "value" text not null, "ui_component" text check ("ui_component" in ('select', 'multivalue', 'unit', 'toggle', 'text_area', 'color_picker')) not null default 'text_area', "extends_attribute_id" text null, "rank" integer not null default 0, "metadata" jsonb null, "created_at" timestamptz not null default now(), "updated_at" timestamptz not null default now(), "deleted_at" timestamptz null, constraint "vendor_product_attribute_pkey" primary key ("id"));`);
8
- this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_vendor_product_attribute_deleted_at" ON "vendor_product_attribute" ("deleted_at") WHERE deleted_at IS NULL;`);
9
- this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_vendor_product_attribute_name" ON "vendor_product_attribute" ("name") WHERE deleted_at IS NULL;`);
10
- }
11
- async down() {
12
- this.addSql(`drop table if exists "vendor_product_attribute" cascade;`);
13
- }
14
- }
15
- exports.Migration20260325000000 = Migration20260325000000;
16
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWlncmF0aW9uMjAyNjAzMjUwMDAwMDAuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbW9kdWxlcy92ZW5kb3ItcHJvZHVjdC1hdHRyaWJ1dGUvbWlncmF0aW9ucy9NaWdyYXRpb24yMDI2MDMyNTAwMDAwMC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSx5RUFBb0U7QUFFcEUsTUFBYSx1QkFBd0IsU0FBUSxzQkFBUztJQUMzQyxLQUFLLENBQUMsRUFBRTtRQUNmLElBQUksQ0FBQyxNQUFNLENBQ1QsMGlCQUEwaUIsQ0FDM2lCLENBQUE7UUFDRCxJQUFJLENBQUMsTUFBTSxDQUNULDZJQUE2SSxDQUM5SSxDQUFBO1FBQ0QsSUFBSSxDQUFDLE1BQU0sQ0FDVCxpSUFBaUksQ0FDbEksQ0FBQTtJQUNILENBQUM7SUFFUSxLQUFLLENBQUMsSUFBSTtRQUNqQixJQUFJLENBQUMsTUFBTSxDQUFDLDBEQUEwRCxDQUFDLENBQUE7SUFDekUsQ0FBQztDQUNGO0FBaEJELDBEQWdCQyJ9
@@ -1,11 +0,0 @@
1
- import { AttributeUIComponent } from "@mercurjs/types";
2
- declare const VendorProductAttribute: import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
3
- id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
4
- name: import("@medusajs/framework/utils").TextProperty;
5
- value: import("@medusajs/framework/utils").TextProperty;
6
- ui_component: import("@medusajs/framework/utils").EnumProperty<AttributeUIComponent[]>;
7
- extends_attribute_id: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
8
- rank: import("@medusajs/framework/utils").NumberProperty;
9
- metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
10
- }>, "vendor_product_attribute">;
11
- export default VendorProductAttribute;