@mercurjs/core 2.2.0-canary.9 → 2.2.0-rc.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 (685) hide show
  1. package/.medusa/server/src/api/admin/claims/[id]/outbound/items/route.d.ts +13 -0
  2. package/.medusa/server/src/api/admin/claims/[id]/outbound/items/route.js +59 -0
  3. package/.medusa/server/src/api/admin/claims/[id]/request/route.d.ts +4 -0
  4. package/.medusa/server/src/api/admin/claims/[id]/request/route.js +74 -0
  5. package/.medusa/server/src/api/admin/collections/[id]/route.d.ts +7 -0
  6. package/.medusa/server/src/api/admin/collections/[id]/route.js +48 -0
  7. package/.medusa/server/src/api/admin/collections/middlewares.d.ts +2 -0
  8. package/.medusa/server/src/api/admin/collections/middlewares.js +49 -0
  9. package/.medusa/server/src/api/admin/collections/query-config.d.ts +12 -0
  10. package/.medusa/server/src/api/admin/collections/query-config.js +29 -0
  11. package/.medusa/server/src/api/admin/collections/route.d.ts +6 -0
  12. package/.medusa/server/src/api/admin/collections/route.js +36 -0
  13. package/.medusa/server/src/api/admin/collections/validators.d.ts +262 -0
  14. package/.medusa/server/src/api/admin/collections/validators.js +42 -0
  15. package/.medusa/server/src/api/admin/commission-rates/query-config.js +6 -4
  16. package/.medusa/server/src/api/admin/commission-rates/route.js +4 -1
  17. package/.medusa/server/src/api/admin/commission-rates/validators.d.ts +89 -58
  18. package/.medusa/server/src/api/admin/commission-rates/validators.js +16 -9
  19. package/.medusa/server/src/api/admin/customer-groups/middlewares.d.ts +2 -0
  20. package/.medusa/server/src/api/admin/customer-groups/middlewares.js +43 -0
  21. package/.medusa/server/src/api/admin/customer-groups/validators.d.ts +257 -0
  22. package/.medusa/server/src/api/admin/customer-groups/validators.js +12 -0
  23. package/.medusa/server/src/api/admin/exchanges/[id]/outbound/items/route.d.ts +14 -0
  24. package/.medusa/server/src/api/admin/exchanges/[id]/outbound/items/route.js +60 -0
  25. package/.medusa/server/src/api/admin/exchanges/[id]/request/route.d.ts +4 -0
  26. package/.medusa/server/src/api/admin/exchanges/[id]/request/route.js +75 -0
  27. package/.medusa/server/src/api/admin/members/validators.d.ts +14 -15
  28. package/.medusa/server/src/api/admin/middlewares.js +31 -36
  29. package/.medusa/server/src/api/admin/offers/batch/route.js +3 -3
  30. package/.medusa/server/src/api/admin/offers/middlewares.js +3 -1
  31. package/.medusa/server/src/api/admin/offers/query-config.js +3 -1
  32. package/.medusa/server/src/api/admin/offers/validators.d.ts +79 -57
  33. package/.medusa/server/src/api/admin/offers/validators.js +10 -2
  34. package/.medusa/server/src/api/admin/order-edits/[id]/confirm/route.d.ts +3 -0
  35. package/.medusa/server/src/api/admin/order-edits/[id]/confirm/route.js +18 -0
  36. package/.medusa/server/src/api/admin/order-edits/[id]/items/route.d.ts +15 -0
  37. package/.medusa/server/src/api/admin/order-edits/[id]/items/route.js +46 -0
  38. package/.medusa/server/src/api/admin/order-groups/helpers.d.ts +2 -0
  39. package/.medusa/server/src/api/admin/order-groups/helpers.js +53 -0
  40. package/.medusa/server/src/api/admin/order-groups/middlewares.js +3 -1
  41. package/.medusa/server/src/api/admin/order-groups/route.js +4 -2
  42. package/.medusa/server/src/api/admin/order-groups/validators.d.ts +20 -21
  43. package/.medusa/server/src/api/admin/orders/[id]/commission-lines/route.d.ts +7 -0
  44. package/.medusa/server/src/api/admin/orders/[id]/commission-lines/route.js +17 -0
  45. package/.medusa/server/src/api/admin/orders/middlewares.d.ts +2 -0
  46. package/.medusa/server/src/api/admin/orders/middlewares.js +42 -0
  47. package/.medusa/server/src/api/admin/orders/resolve-order-seller-id.d.ts +2 -0
  48. package/.medusa/server/src/api/admin/orders/resolve-order-seller-id.js +15 -0
  49. package/.medusa/server/src/api/admin/orders/validators.d.ts +1 -287
  50. package/.medusa/server/src/api/admin/orders/validators.js +9 -29
  51. package/.medusa/server/src/api/admin/payouts/validators.d.ts +18 -19
  52. package/.medusa/server/src/api/admin/product-attributes/[id]/route.js +2 -2
  53. package/.medusa/server/src/api/admin/product-attributes/[id]/values/[value_id]/route.js +2 -2
  54. package/.medusa/server/src/api/admin/product-attributes/middlewares.js +1 -3
  55. package/.medusa/server/src/api/admin/product-attributes/query-config.js +4 -1
  56. package/.medusa/server/src/api/admin/product-attributes/route.d.ts +2 -2
  57. package/.medusa/server/src/api/admin/product-attributes/route.js +2 -5
  58. package/.medusa/server/src/api/admin/product-attributes/validators.d.ts +129 -140
  59. package/.medusa/server/src/api/admin/product-attributes/validators.js +1 -3
  60. package/.medusa/server/src/api/admin/product-categories/[id]/products/route.js +3 -3
  61. package/.medusa/server/src/api/admin/product-categories/[id]/route.js +8 -11
  62. package/.medusa/server/src/api/admin/product-categories/query-config.js +7 -1
  63. package/.medusa/server/src/api/admin/product-categories/route.js +5 -8
  64. package/.medusa/server/src/api/admin/product-categories/validators.d.ts +153 -93
  65. package/.medusa/server/src/api/admin/product-categories/validators.js +11 -1
  66. package/.medusa/server/src/api/admin/product-changes/[id]/cancel/route.d.ts +0 -7
  67. package/.medusa/server/src/api/admin/product-changes/[id]/cancel/route.js +2 -8
  68. package/.medusa/server/src/api/admin/product-changes/[id]/confirm/route.d.ts +0 -7
  69. package/.medusa/server/src/api/admin/product-changes/[id]/confirm/route.js +2 -8
  70. package/.medusa/server/src/api/admin/product-changes/validators.d.ts +8 -4
  71. package/.medusa/server/src/api/admin/product-changes/validators.js +6 -3
  72. package/.medusa/server/src/api/admin/products/[id]/attributes/batch/route.js +6 -9
  73. package/.medusa/server/src/api/admin/products/[id]/confirm/route.d.ts +0 -12
  74. package/.medusa/server/src/api/admin/products/[id]/confirm/route.js +2 -13
  75. package/.medusa/server/src/api/admin/products/[id]/preview/route.d.ts +0 -7
  76. package/.medusa/server/src/api/admin/products/[id]/preview/route.js +1 -8
  77. package/.medusa/server/src/api/admin/products/[id]/reject/route.d.ts +0 -8
  78. package/.medusa/server/src/api/admin/products/[id]/reject/route.js +2 -9
  79. package/.medusa/server/src/api/admin/products/[id]/request-changes/route.d.ts +0 -9
  80. package/.medusa/server/src/api/admin/products/[id]/request-changes/route.js +2 -10
  81. package/.medusa/server/src/api/admin/products/[id]/route.js +9 -3
  82. package/.medusa/server/src/api/admin/products/[id]/sellers/route.d.ts +3 -0
  83. package/.medusa/server/src/api/admin/products/[id]/sellers/route.js +13 -0
  84. package/.medusa/server/src/api/admin/products/middlewares.js +6 -42
  85. package/.medusa/server/src/api/admin/products/query-config.js +41 -16
  86. package/.medusa/server/src/api/admin/products/route.js +9 -1
  87. package/.medusa/server/src/api/admin/products/validators.d.ts +570 -1332
  88. package/.medusa/server/src/api/admin/products/validators.js +66 -96
  89. package/.medusa/server/src/api/admin/returns/[id]/receive/confirm/route.d.ts +3 -0
  90. package/.medusa/server/src/api/admin/returns/[id]/receive/confirm/route.js +29 -0
  91. package/.medusa/server/src/api/admin/sellers/[id]/address/route.js +4 -2
  92. package/.medusa/server/src/api/admin/sellers/[id]/approve/route.d.ts +2 -1
  93. package/.medusa/server/src/api/admin/sellers/[id]/approve/route.js +2 -1
  94. package/.medusa/server/src/api/admin/sellers/[id]/payment-details/route.js +4 -2
  95. package/.medusa/server/src/api/admin/sellers/[id]/professional-details/route.js +4 -2
  96. package/.medusa/server/src/api/admin/sellers/[id]/route.js +4 -2
  97. package/.medusa/server/src/api/admin/sellers/[id]/suspend/route.js +2 -1
  98. package/.medusa/server/src/api/admin/sellers/[id]/terminate/route.js +2 -1
  99. package/.medusa/server/src/api/admin/sellers/[id]/unsuspend/route.d.ts +2 -1
  100. package/.medusa/server/src/api/admin/sellers/[id]/unsuspend/route.js +2 -1
  101. package/.medusa/server/src/api/admin/sellers/[id]/unterminate/route.d.ts +2 -1
  102. package/.medusa/server/src/api/admin/sellers/[id]/unterminate/route.js +2 -1
  103. package/.medusa/server/src/api/admin/sellers/middlewares.js +4 -20
  104. package/.medusa/server/src/api/admin/sellers/route.js +4 -2
  105. package/.medusa/server/src/api/admin/sellers/validators.d.ts +89 -100
  106. package/.medusa/server/src/api/admin/sellers/validators.js +12 -7
  107. package/.medusa/server/src/api/admin/shipping-options/middlewares.d.ts +2 -0
  108. package/.medusa/server/src/api/admin/shipping-options/middlewares.js +46 -0
  109. package/.medusa/server/src/api/admin/shipping-profiles/middlewares.d.ts +2 -0
  110. package/.medusa/server/src/api/admin/shipping-profiles/middlewares.js +46 -0
  111. package/.medusa/server/src/api/admin/stock-locations/middlewares.d.ts +2 -0
  112. package/.medusa/server/src/api/admin/stock-locations/middlewares.js +46 -0
  113. package/.medusa/server/src/api/store/carts/[id]/complete/route.js +1 -5
  114. package/.medusa/server/src/api/store/carts/[id]/complete/validators.d.ts +1 -1
  115. package/.medusa/server/src/api/store/carts/[id]/line-items/route.js +13 -1
  116. package/.medusa/server/src/api/store/carts/[id]/line-items/validators.d.ts +0 -3
  117. package/.medusa/server/src/api/store/carts/[id]/line-items/validators.js +1 -2
  118. package/.medusa/server/src/api/store/carts/[id]/shipping-methods/route.js +6 -2
  119. package/.medusa/server/src/api/store/middlewares.js +15 -11
  120. package/.medusa/server/src/api/store/offers/[id]/route.d.ts +3 -0
  121. package/.medusa/server/src/api/store/offers/[id]/route.js +28 -0
  122. package/.medusa/server/src/api/store/offers/helpers.d.ts +43 -0
  123. package/.medusa/server/src/api/store/offers/helpers.js +191 -0
  124. package/.medusa/server/src/api/store/offers/middlewares.d.ts +2 -0
  125. package/.medusa/server/src/api/store/offers/middlewares.js +64 -0
  126. package/.medusa/server/src/api/store/offers/query-config.d.ts +12 -0
  127. package/.medusa/server/src/api/store/offers/query-config.js +50 -0
  128. package/.medusa/server/src/api/store/offers/route.d.ts +3 -0
  129. package/.medusa/server/src/api/store/offers/route.js +30 -0
  130. package/.medusa/server/src/api/store/offers/validators.d.ts +158 -0
  131. package/.medusa/server/src/api/store/offers/validators.js +29 -0
  132. package/.medusa/server/src/api/store/order-groups/validators.d.ts +16 -17
  133. package/.medusa/server/src/api/store/product-attributes/validators.d.ts +50 -46
  134. package/.medusa/server/src/api/store/product-categories/validators.d.ts +59 -53
  135. package/.medusa/server/src/api/store/products/[id]/route.js +9 -5
  136. package/.medusa/server/src/api/store/products/helpers.d.ts +10 -0
  137. package/.medusa/server/src/api/store/products/helpers.js +20 -0
  138. package/.medusa/server/src/api/store/products/middlewares.js +37 -24
  139. package/.medusa/server/src/api/store/products/query-config.js +23 -7
  140. package/.medusa/server/src/api/store/products/route.js +9 -1
  141. package/.medusa/server/src/api/store/products/validators.d.ts +69 -65
  142. package/.medusa/server/src/api/store/search/middlewares.d.ts +2 -0
  143. package/.medusa/server/src/api/store/search/middlewares.js +73 -0
  144. package/.medusa/server/src/api/store/search/route.d.ts +8 -0
  145. package/.medusa/server/src/api/store/search/route.js +25 -0
  146. package/.medusa/server/src/api/store/search/validators.d.ts +27 -0
  147. package/.medusa/server/src/api/store/search/validators.js +17 -0
  148. package/.medusa/server/src/api/store/sellers/validators.d.ts +35 -34
  149. package/.medusa/server/src/api/utils/filter-attributes-by-category-link.d.ts +0 -15
  150. package/.medusa/server/src/api/utils/filter-attributes-by-category-link.js +22 -26
  151. package/.medusa/server/src/api/utils/format-product-attributes.d.ts +5 -50
  152. package/.medusa/server/src/api/utils/format-product-attributes.js +90 -166
  153. package/.medusa/server/src/api/utils/index.d.ts +2 -0
  154. package/.medusa/server/src/api/utils/index.js +3 -1
  155. package/.medusa/server/src/api/utils/offers.d.ts +50 -0
  156. package/.medusa/server/src/api/utils/offers.js +286 -0
  157. package/.medusa/server/src/api/utils/order-commission-lines.d.ts +11 -0
  158. package/.medusa/server/src/api/utils/order-commission-lines.js +71 -0
  159. package/.medusa/server/src/api/utils/product-attribute-fields.d.ts +5 -0
  160. package/.medusa/server/src/api/utils/product-attribute-fields.js +35 -0
  161. package/.medusa/server/src/api/utils/sellers.d.ts +2 -0
  162. package/.medusa/server/src/api/utils/sellers.js +23 -0
  163. package/.medusa/server/src/api/vendor/campaigns/validators.d.ts +14 -15
  164. package/.medusa/server/src/api/vendor/claims/[id]/outbound/items/route.d.ts +0 -6
  165. package/.medusa/server/src/api/vendor/claims/[id]/outbound/items/route.js +1 -7
  166. package/.medusa/server/src/api/vendor/claims/[id]/request/route.js +1 -4
  167. package/.medusa/server/src/api/vendor/claims/validators.d.ts +32 -33
  168. package/.medusa/server/src/api/vendor/collections/query-config.js +7 -1
  169. package/.medusa/server/src/api/vendor/collections/validators.d.ts +22 -23
  170. package/.medusa/server/src/api/vendor/currencies/validators.d.ts +14 -15
  171. package/.medusa/server/src/api/vendor/customer-groups/[id]/customers/route.d.ts +4 -0
  172. package/.medusa/server/src/api/vendor/customer-groups/[id]/customers/route.js +20 -0
  173. package/.medusa/server/src/api/vendor/customer-groups/[id]/route.d.ts +6 -0
  174. package/.medusa/server/src/api/vendor/customer-groups/[id]/route.js +43 -0
  175. package/.medusa/server/src/api/vendor/customer-groups/helpers.d.ts +3 -0
  176. package/.medusa/server/src/api/vendor/customer-groups/helpers.js +38 -0
  177. package/.medusa/server/src/api/vendor/customer-groups/middlewares.d.ts +2 -0
  178. package/.medusa/server/src/api/vendor/customer-groups/middlewares.js +62 -0
  179. package/.medusa/server/src/api/vendor/customer-groups/query-config.d.ts +11 -0
  180. package/.medusa/server/src/api/vendor/customer-groups/query-config.js +22 -0
  181. package/.medusa/server/src/api/vendor/customer-groups/route.d.ts +5 -0
  182. package/.medusa/server/src/api/vendor/customer-groups/route.js +35 -0
  183. package/.medusa/server/src/api/vendor/customer-groups/validators.d.ts +156 -0
  184. package/.medusa/server/src/api/vendor/customer-groups/validators.js +35 -0
  185. package/.medusa/server/src/api/vendor/customers/[id]/customer-groups/route.d.ts +4 -0
  186. package/.medusa/server/src/api/vendor/customers/[id]/customer-groups/route.js +27 -0
  187. package/.medusa/server/src/api/vendor/customers/[id]/route.js +13 -1
  188. package/.medusa/server/src/api/vendor/customers/middlewares.js +9 -1
  189. package/.medusa/server/src/api/vendor/customers/validators.d.ts +47 -32
  190. package/.medusa/server/src/api/vendor/customers/validators.js +9 -2
  191. package/.medusa/server/src/api/vendor/exchanges/[id]/outbound/items/route.d.ts +0 -6
  192. package/.medusa/server/src/api/vendor/exchanges/[id]/outbound/items/route.js +1 -7
  193. package/.medusa/server/src/api/vendor/exchanges/[id]/request/route.js +1 -4
  194. package/.medusa/server/src/api/vendor/exchanges/validators.d.ts +29 -30
  195. package/.medusa/server/src/api/vendor/fulfillment-providers/validators.d.ts +24 -23
  196. package/.medusa/server/src/api/vendor/fulfillment-sets/validators.d.ts +18 -18
  197. package/.medusa/server/src/api/vendor/inventory-items/validators.d.ts +104 -110
  198. package/.medusa/server/src/api/vendor/members/me/route.js +3 -2
  199. package/.medusa/server/src/api/vendor/members/validators.d.ts +4 -2
  200. package/.medusa/server/src/api/vendor/members/validators.js +5 -3
  201. package/.medusa/server/src/api/vendor/middlewares.js +17 -17
  202. package/.medusa/server/src/api/vendor/offers/[id]/route.js +4 -2
  203. package/.medusa/server/src/api/vendor/offers/batch/route.js +3 -2
  204. package/.medusa/server/src/api/vendor/offers/query-config.js +2 -1
  205. package/.medusa/server/src/api/vendor/offers/route.js +4 -2
  206. package/.medusa/server/src/api/vendor/offers/validators.d.ts +68 -67
  207. package/.medusa/server/src/api/vendor/offers/validators.js +12 -12
  208. package/.medusa/server/src/api/vendor/order-edits/[id]/confirm/route.d.ts +0 -6
  209. package/.medusa/server/src/api/vendor/order-edits/[id]/confirm/route.js +3 -9
  210. package/.medusa/server/src/api/vendor/order-edits/[id]/items/[action_id]/route.d.ts +0 -9
  211. package/.medusa/server/src/api/vendor/order-edits/[id]/items/[action_id]/route.js +1 -10
  212. package/.medusa/server/src/api/vendor/order-edits/[id]/items/item/[item_id]/route.d.ts +0 -6
  213. package/.medusa/server/src/api/vendor/order-edits/[id]/items/item/[item_id]/route.js +1 -7
  214. package/.medusa/server/src/api/vendor/order-edits/[id]/items/route.d.ts +0 -12
  215. package/.medusa/server/src/api/vendor/order-edits/[id]/items/route.js +1 -13
  216. package/.medusa/server/src/api/vendor/order-edits/[id]/request/route.d.ts +0 -7
  217. package/.medusa/server/src/api/vendor/order-edits/[id]/request/route.js +1 -8
  218. package/.medusa/server/src/api/vendor/order-edits/[id]/route.d.ts +0 -7
  219. package/.medusa/server/src/api/vendor/order-edits/[id]/route.js +1 -8
  220. package/.medusa/server/src/api/vendor/order-edits/[id]/shipping-method/[action_id]/route.d.ts +0 -9
  221. package/.medusa/server/src/api/vendor/order-edits/[id]/shipping-method/[action_id]/route.js +1 -10
  222. package/.medusa/server/src/api/vendor/order-edits/[id]/shipping-method/route.d.ts +0 -5
  223. package/.medusa/server/src/api/vendor/order-edits/[id]/shipping-method/route.js +1 -6
  224. package/.medusa/server/src/api/vendor/order-edits/middlewares.js +1 -13
  225. package/.medusa/server/src/api/vendor/order-edits/route.d.ts +0 -6
  226. package/.medusa/server/src/api/vendor/order-edits/route.js +1 -7
  227. package/.medusa/server/src/api/vendor/order-edits/validators.d.ts +12 -18
  228. package/.medusa/server/src/api/vendor/order-edits/validators.js +1 -1
  229. package/.medusa/server/src/api/vendor/orders/[id]/commission-lines/route.d.ts +7 -0
  230. package/.medusa/server/src/api/vendor/orders/[id]/commission-lines/route.js +18 -0
  231. package/.medusa/server/src/api/vendor/orders/[id]/fulfillments/[fulfillment_id]/cancel/route.d.ts +2 -1
  232. package/.medusa/server/src/api/vendor/orders/[id]/fulfillments/[fulfillment_id]/cancel/route.js +4 -1
  233. package/.medusa/server/src/api/vendor/orders/middlewares.js +2 -3
  234. package/.medusa/server/src/api/vendor/orders/resolve-offer-items.d.ts +2 -13
  235. package/.medusa/server/src/api/vendor/orders/resolve-offer-items.js +11 -2
  236. package/.medusa/server/src/api/vendor/orders/validators.d.ts +35 -27
  237. package/.medusa/server/src/api/vendor/orders/validators.js +10 -9
  238. package/.medusa/server/src/api/vendor/payments/helpers.d.ts +0 -9
  239. package/.medusa/server/src/api/vendor/payments/helpers.js +1 -10
  240. package/.medusa/server/src/api/vendor/payments/validators.d.ts +38 -38
  241. package/.medusa/server/src/api/vendor/payout-accounts/validators.d.ts +11 -12
  242. package/.medusa/server/src/api/vendor/payouts/validators.d.ts +18 -19
  243. package/.medusa/server/src/api/vendor/price-lists/validators.d.ts +38 -40
  244. package/.medusa/server/src/api/vendor/price-preferences/validators.d.ts +14 -15
  245. package/.medusa/server/src/api/vendor/product-attributes/query-config.js +4 -2
  246. package/.medusa/server/src/api/vendor/product-attributes/route.js +1 -3
  247. package/.medusa/server/src/api/vendor/product-attributes/validators.d.ts +92 -104
  248. package/.medusa/server/src/api/vendor/product-attributes/validators.js +1 -1
  249. package/.medusa/server/src/api/vendor/product-categories/[id]/products/route.js +4 -4
  250. package/.medusa/server/src/api/vendor/product-categories/query-config.js +7 -1
  251. package/.medusa/server/src/api/vendor/product-categories/validators.d.ts +89 -83
  252. package/.medusa/server/src/api/vendor/product-tags/validators.d.ts +2 -2
  253. package/.medusa/server/src/api/vendor/product-types/validators.d.ts +14 -15
  254. package/.medusa/server/src/api/vendor/product-variants/middlewares.js +11 -19
  255. package/.medusa/server/src/api/vendor/product-variants/query-config.js +1 -3
  256. package/.medusa/server/src/api/vendor/product-variants/validators.d.ts +103 -97
  257. package/.medusa/server/src/api/vendor/products/[id]/attributes/batch/route.d.ts +2 -9
  258. package/.medusa/server/src/api/vendor/products/[id]/attributes/batch/route.js +3 -27
  259. package/.medusa/server/src/api/vendor/products/[id]/cancel/route.d.ts +2 -7
  260. package/.medusa/server/src/api/vendor/products/[id]/cancel/route.js +2 -7
  261. package/.medusa/server/src/api/vendor/products/[id]/preview/route.d.ts +0 -9
  262. package/.medusa/server/src/api/vendor/products/[id]/preview/route.js +1 -10
  263. package/.medusa/server/src/api/vendor/products/[id]/route.d.ts +0 -14
  264. package/.medusa/server/src/api/vendor/products/[id]/route.js +12 -18
  265. package/.medusa/server/src/api/vendor/products/[id]/variants/[variant_id]/route.d.ts +0 -8
  266. package/.medusa/server/src/api/vendor/products/[id]/variants/[variant_id]/route.js +3 -11
  267. package/.medusa/server/src/api/vendor/products/[id]/variants/route.d.ts +0 -7
  268. package/.medusa/server/src/api/vendor/products/[id]/variants/route.js +2 -9
  269. package/.medusa/server/src/api/vendor/products/helpers.d.ts +6 -5
  270. package/.medusa/server/src/api/vendor/products/helpers.js +54 -10
  271. package/.medusa/server/src/api/vendor/products/middlewares.js +14 -63
  272. package/.medusa/server/src/api/vendor/products/query-config.js +52 -15
  273. package/.medusa/server/src/api/vendor/products/route.d.ts +0 -9
  274. package/.medusa/server/src/api/vendor/products/route.js +14 -17
  275. package/.medusa/server/src/api/vendor/products/validators.d.ts +439 -840
  276. package/.medusa/server/src/api/vendor/products/validators.js +67 -104
  277. package/.medusa/server/src/api/vendor/promotions/validators.d.ts +47 -49
  278. package/.medusa/server/src/api/vendor/refund-reasons/validators.d.ts +18 -19
  279. package/.medusa/server/src/api/vendor/regions/validators.d.ts +20 -21
  280. package/.medusa/server/src/api/vendor/reservations/[id]/route.js +1 -1
  281. package/.medusa/server/src/api/vendor/reservations/helpers.js +1 -4
  282. package/.medusa/server/src/api/vendor/reservations/middlewares.js +1 -18
  283. package/.medusa/server/src/api/vendor/reservations/query-config.js +1 -4
  284. package/.medusa/server/src/api/vendor/reservations/route.js +1 -1
  285. package/.medusa/server/src/api/vendor/reservations/validators.d.ts +24 -25
  286. package/.medusa/server/src/api/vendor/reservations/validators.js +1 -1
  287. package/.medusa/server/src/api/vendor/return-reasons/validators.d.ts +18 -19
  288. package/.medusa/server/src/api/vendor/returns/validators.d.ts +25 -26
  289. package/.medusa/server/src/api/vendor/sales-channels/[id]/products/route.js +2 -1
  290. package/.medusa/server/src/api/vendor/sales-channels/helpers.d.ts +1 -0
  291. package/.medusa/server/src/api/vendor/sales-channels/helpers.js +25 -2
  292. package/.medusa/server/src/api/vendor/sales-channels/validators.d.ts +25 -24
  293. package/.medusa/server/src/api/vendor/sellers/[id]/address/route.js +4 -2
  294. package/.medusa/server/src/api/vendor/sellers/[id]/payment-details/route.js +4 -2
  295. package/.medusa/server/src/api/vendor/sellers/[id]/professional-details/route.js +4 -2
  296. package/.medusa/server/src/api/vendor/sellers/[id]/route.js +4 -2
  297. package/.medusa/server/src/api/vendor/sellers/me/route.js +10 -1
  298. package/.medusa/server/src/api/vendor/sellers/middlewares.js +1 -18
  299. package/.medusa/server/src/api/vendor/sellers/route.js +8 -3
  300. package/.medusa/server/src/api/vendor/sellers/validators.d.ts +25 -46
  301. package/.medusa/server/src/api/vendor/sellers/validators.js +2 -2
  302. package/.medusa/server/src/api/vendor/shipping-option-types/validators.d.ts +18 -19
  303. package/.medusa/server/src/api/vendor/shipping-options/validators.d.ts +97 -98
  304. package/.medusa/server/src/api/vendor/shipping-profiles/validators.d.ts +20 -21
  305. package/.medusa/server/src/api/vendor/stock-locations/validators.d.ts +18 -19
  306. package/.medusa/server/src/api/vendor/stores/validators.d.ts +14 -15
  307. package/.medusa/server/src/links/media-product-category-link.d.ts +20 -0
  308. package/.medusa/server/src/links/media-product-category-link.js +34 -0
  309. package/.medusa/server/src/links/media-product-collection-link.d.ts +18 -0
  310. package/.medusa/server/src/links/media-product-collection-link.js +32 -0
  311. package/.medusa/server/src/links/offer-product-link.js +15 -0
  312. package/.medusa/server/src/links/product-attribute-category-link.d.ts +0 -14
  313. package/.medusa/server/src/links/product-attribute-category-link.js +4 -21
  314. package/.medusa/server/src/links/product-attribute-option-mirror-link.d.ts +6 -0
  315. package/.medusa/server/src/links/product-attribute-option-mirror-link.js +24 -0
  316. package/.medusa/server/src/links/product-attribute-product-link.d.ts +0 -5
  317. package/.medusa/server/src/links/product-attribute-product-link.js +2 -7
  318. package/.medusa/server/src/links/product-attribute-value-option-value-mirror-link.d.ts +6 -0
  319. package/.medusa/server/src/links/product-attribute-value-option-value-mirror-link.js +24 -0
  320. package/.medusa/server/src/links/{product-variant-attribute-value-link.d.ts → product-attribute-value-pivot-link.d.ts} +3 -0
  321. package/.medusa/server/src/links/product-attribute-value-pivot-link.js +23 -0
  322. package/.medusa/server/src/links/seller-customer-group-link.js +15 -0
  323. package/.medusa/server/src/migration-scripts/drop-fulfillment-global-unique-indexes.js +6 -1
  324. package/.medusa/server/src/migration-scripts/rename-default-store.d.ts +2 -0
  325. package/.medusa/server/src/migration-scripts/rename-default-store.js +12 -0
  326. package/.medusa/server/src/modules/commission/index.d.ts +14 -0
  327. package/.medusa/server/src/modules/commission/index.js +3 -1
  328. package/.medusa/server/src/modules/commission/loaders/seed-default-commission-rate.d.ts +11 -0
  329. package/.medusa/server/src/modules/commission/loaders/seed-default-commission-rate.js +35 -0
  330. package/.medusa/server/src/modules/commission/migrations/Migration20260615120000.d.ts +5 -0
  331. package/.medusa/server/src/modules/commission/migrations/Migration20260615120000.js +46 -0
  332. package/.medusa/server/src/modules/commission/models/commission-line.d.ts +2 -1
  333. package/.medusa/server/src/modules/commission/models/commission-line.js +3 -2
  334. package/.medusa/server/src/modules/commission/models/commission-rate-value.d.ts +25 -0
  335. package/.medusa/server/src/modules/commission/models/commission-rate-value.js +17 -0
  336. package/.medusa/server/src/modules/commission/models/commission-rate.d.ts +9 -4
  337. package/.medusa/server/src/modules/commission/models/commission-rate.js +9 -6
  338. package/.medusa/server/src/modules/commission/models/commission-rule.d.ts +8 -3
  339. package/.medusa/server/src/modules/commission/models/index.d.ts +1 -0
  340. package/.medusa/server/src/modules/commission/models/index.js +4 -2
  341. package/.medusa/server/src/modules/commission/service.d.ts +170 -10
  342. package/.medusa/server/src/modules/commission/service.js +270 -114
  343. package/.medusa/server/src/modules/media/index.d.ts +21 -0
  344. package/.medusa/server/src/modules/media/index.js +12 -0
  345. package/.medusa/server/src/modules/media/migrations/Migration20260616000000.d.ts +5 -0
  346. package/.medusa/server/src/modules/media/migrations/Migration20260616000000.js +16 -0
  347. package/.medusa/server/src/modules/media/models/index.d.ts +1 -0
  348. package/.medusa/server/src/modules/media/models/index.js +9 -0
  349. package/.medusa/server/src/modules/media/models/media-image.d.ts +32 -0
  350. package/.medusa/server/src/modules/media/models/media-image.js +41 -0
  351. package/.medusa/server/src/modules/media/service.d.ts +17 -0
  352. package/.medusa/server/src/modules/media/service.js +10 -0
  353. package/.medusa/server/src/modules/offer/migrations/Migration20260622000000.d.ts +5 -0
  354. package/.medusa/server/src/modules/offer/migrations/Migration20260622000000.js +16 -0
  355. package/.medusa/server/src/modules/offer/models/offer.d.ts +2 -0
  356. package/.medusa/server/src/modules/offer/models/offer.js +8 -1
  357. package/.medusa/server/src/modules/offer/service.d.ts +10 -0
  358. package/.medusa/server/src/modules/offer/service.js +100 -1
  359. package/.medusa/server/src/modules/product-attribute/migrations/Migration20260601000002.d.ts +14 -0
  360. package/.medusa/server/src/modules/product-attribute/migrations/Migration20260601000002.js +31 -0
  361. package/.medusa/server/src/modules/product-attribute/models/product-attribute-value.d.ts +2 -0
  362. package/.medusa/server/src/modules/product-attribute/models/product-attribute-value.js +2 -1
  363. package/.medusa/server/src/modules/product-attribute/models/product-attribute.d.ts +2 -0
  364. package/.medusa/server/src/modules/product-attribute/models/product-attribute.js +2 -1
  365. package/.medusa/server/src/modules/product-attribute/service.d.ts +18 -3
  366. package/.medusa/server/src/modules/product-attribute/service.js +213 -1
  367. package/.medusa/server/src/modules/search/abstract-search-provider.d.ts +9 -0
  368. package/.medusa/server/src/modules/search/abstract-search-provider.js +20 -0
  369. package/.medusa/server/src/modules/search/index.d.ts +10 -0
  370. package/.medusa/server/src/modules/search/index.js +31 -0
  371. package/.medusa/server/src/modules/search/lib/build-docs.d.ts +84 -0
  372. package/.medusa/server/src/modules/search/lib/build-docs.js +207 -0
  373. package/.medusa/server/src/modules/search/lib/reindex.d.ts +7 -0
  374. package/.medusa/server/src/modules/search/lib/reindex.js +61 -0
  375. package/.medusa/server/src/modules/search/lib/sync.d.ts +9 -0
  376. package/.medusa/server/src/modules/search/lib/sync.js +73 -0
  377. package/.medusa/server/src/modules/search/loaders/providers.d.ts +5 -0
  378. package/.medusa/server/src/modules/search/loaders/providers.js +26 -0
  379. package/.medusa/server/src/modules/search/providers/index.d.ts +1 -0
  380. package/.medusa/server/src/modules/search/providers/index.js +6 -0
  381. package/.medusa/server/src/modules/search/providers/orama/index.d.ts +4 -0
  382. package/.medusa/server/src/modules/search/providers/orama/index.js +12 -0
  383. package/.medusa/server/src/modules/search/providers/orama/service.d.ts +19 -0
  384. package/.medusa/server/src/modules/search/providers/orama/service.js +148 -0
  385. package/.medusa/server/src/modules/search/providers/orama/types.d.ts +10 -0
  386. package/.medusa/server/src/modules/search/providers/orama/types.js +3 -0
  387. package/.medusa/server/src/modules/search/services/index.d.ts +2 -0
  388. package/.medusa/server/src/modules/search/services/index.js +24 -0
  389. package/.medusa/server/src/modules/search/services/search-module-service.d.ts +25 -0
  390. package/.medusa/server/src/modules/search/services/search-module-service.js +60 -0
  391. package/.medusa/server/src/modules/search/services/search-provider-service.d.ts +15 -0
  392. package/.medusa/server/src/modules/search/services/search-provider-service.js +30 -0
  393. package/.medusa/server/src/modules/seller/migrations/Migration20260616120000.d.ts +5 -0
  394. package/.medusa/server/src/modules/seller/migrations/Migration20260616120000.js +16 -0
  395. package/.medusa/server/src/modules/seller/models/address.d.ts +2 -2
  396. package/.medusa/server/src/modules/seller/models/member-invite.d.ts +2 -2
  397. package/.medusa/server/src/modules/seller/models/member.d.ts +2 -2
  398. package/.medusa/server/src/modules/seller/models/payment-details.d.ts +2 -2
  399. package/.medusa/server/src/modules/seller/models/payment-details.js +3 -3
  400. package/.medusa/server/src/modules/seller/models/professional-details.d.ts +2 -2
  401. package/.medusa/server/src/modules/seller/models/seller-member.d.ts +4 -4
  402. package/.medusa/server/src/modules/seller/models/seller.d.ts +2 -2
  403. package/.medusa/server/src/modules/seller/repositories/order-group.js +1 -11
  404. package/.medusa/server/src/modules/seller/service.d.ts +16 -16
  405. package/.medusa/server/src/modules/seller/service.js +1 -2
  406. package/.medusa/server/src/subscribers/order-edit-confirmed.d.ts +9 -2
  407. package/.medusa/server/src/subscribers/order-edit-confirmed.js +18 -6
  408. package/.medusa/server/src/subscribers/search-offer-changed.d.ts +6 -0
  409. package/.medusa/server/src/subscribers/search-offer-changed.js +34 -0
  410. package/.medusa/server/src/subscribers/search-product-changed.d.ts +5 -0
  411. package/.medusa/server/src/subscribers/search-product-changed.js +29 -0
  412. package/.medusa/server/src/subscribers/search-product-deleted.d.ts +5 -0
  413. package/.medusa/server/src/subscribers/search-product-deleted.js +23 -0
  414. package/.medusa/server/src/subscribers/search-reindex.d.ts +3 -0
  415. package/.medusa/server/src/subscribers/search-reindex.js +23 -0
  416. package/.medusa/server/src/subscribers/search-seller-changed.d.ts +5 -0
  417. package/.medusa/server/src/subscribers/search-seller-changed.js +44 -0
  418. package/.medusa/server/src/utils/dashboard/dashboard-base.js +6 -2
  419. package/.medusa/server/src/utils/disable-medusa-middlewares.js +7 -1
  420. package/.medusa/server/src/workflows/cart/hooks/validate.js +1 -12
  421. package/.medusa/server/src/workflows/cart/steps/prepare-adjustments-from-promotion-actions.js +3 -5
  422. package/.medusa/server/src/workflows/cart/utils/fields.js +1 -13
  423. package/.medusa/server/src/workflows/cart/utils/prepare-line-item-data.js +1 -3
  424. package/.medusa/server/src/workflows/cart/workflows/add-seller-shipping-method-to-cart.js +1 -2
  425. package/.medusa/server/src/workflows/cart/workflows/complete-cart-with-split-orders.js +1 -24
  426. package/.medusa/server/src/workflows/cart/workflows/list-seller-shipping-options-for-cart.d.ts +2 -2
  427. package/.medusa/server/src/workflows/cart/workflows/list-seller-shipping-options-for-cart.js +1 -2
  428. package/.medusa/server/src/workflows/commission/steps/create-commission-rates.d.ts +1 -28
  429. package/.medusa/server/src/workflows/commission/steps/create-commission-rules.d.ts +13 -4
  430. package/.medusa/server/src/workflows/commission/steps/index.d.ts +1 -0
  431. package/.medusa/server/src/workflows/commission/steps/index.js +2 -1
  432. package/.medusa/server/src/workflows/commission/steps/update-commission-rates.d.ts +13 -4
  433. package/.medusa/server/src/workflows/commission/steps/update-commission-rules.d.ts +13 -4
  434. package/.medusa/server/src/workflows/commission/steps/upsert-commission-lines.d.ts +2 -2
  435. package/.medusa/server/src/workflows/commission/steps/upsert-commission-lines.js +1 -1
  436. package/.medusa/server/src/workflows/commission/steps/validate-commission-rates-deletable.d.ts +2 -0
  437. package/.medusa/server/src/workflows/commission/steps/validate-commission-rates-deletable.js +19 -0
  438. package/.medusa/server/src/workflows/commission/workflows/create-commission-rates.d.ts +1 -28
  439. package/.medusa/server/src/workflows/commission/workflows/delete-commission-rates.d.ts +1 -2
  440. package/.medusa/server/src/workflows/commission/workflows/delete-commission-rates.js +3 -1
  441. package/.medusa/server/src/workflows/commission/workflows/refresh-order-commission-lines.js +2 -1
  442. package/.medusa/server/src/workflows/commission/workflows/update-commission-rates.d.ts +13 -4
  443. package/.medusa/server/src/workflows/customer-group/index.d.ts +2 -0
  444. package/.medusa/server/src/workflows/customer-group/index.js +19 -0
  445. package/.medusa/server/src/workflows/customer-group/steps/index.d.ts +1 -0
  446. package/.medusa/server/src/workflows/customer-group/steps/index.js +18 -0
  447. package/.medusa/server/src/workflows/customer-group/steps/link-seller-customer-group.d.ts +6 -0
  448. package/.medusa/server/src/workflows/customer-group/steps/link-seller-customer-group.js +38 -0
  449. package/.medusa/server/src/workflows/customer-group/workflows/create-seller-customer-groups.d.ts +7 -0
  450. package/.medusa/server/src/workflows/customer-group/workflows/create-seller-customer-groups.js +20 -0
  451. package/.medusa/server/src/workflows/customer-group/workflows/index.d.ts +1 -0
  452. package/.medusa/server/src/workflows/customer-group/workflows/index.js +18 -0
  453. package/.medusa/server/src/workflows/index.d.ts +2 -0
  454. package/.medusa/server/src/workflows/index.js +3 -1
  455. package/.medusa/server/src/workflows/media/index.d.ts +2 -0
  456. package/.medusa/server/src/workflows/media/index.js +19 -0
  457. package/.medusa/server/src/workflows/media/steps/create-images.d.ts +20 -0
  458. package/.medusa/server/src/workflows/media/steps/create-images.js +21 -0
  459. package/.medusa/server/src/workflows/media/steps/delete-images.d.ts +3 -0
  460. package/.medusa/server/src/workflows/media/steps/delete-images.js +21 -0
  461. package/.medusa/server/src/workflows/media/steps/index.d.ts +2 -0
  462. package/.medusa/server/src/workflows/media/steps/index.js +19 -0
  463. package/.medusa/server/src/workflows/media/workflows/create-product-category-with-images.d.ts +8 -0
  464. package/.medusa/server/src/workflows/media/workflows/create-product-category-with-images.js +23 -0
  465. package/.medusa/server/src/workflows/media/workflows/create-product-collection-with-images.d.ts +8 -0
  466. package/.medusa/server/src/workflows/media/workflows/create-product-collection-with-images.js +23 -0
  467. package/.medusa/server/src/workflows/media/workflows/delete-product-category-with-images.d.ts +5 -0
  468. package/.medusa/server/src/workflows/media/workflows/delete-product-category-with-images.js +21 -0
  469. package/.medusa/server/src/workflows/media/workflows/delete-product-collection-with-images.d.ts +5 -0
  470. package/.medusa/server/src/workflows/media/workflows/delete-product-collection-with-images.js +21 -0
  471. package/.medusa/server/src/workflows/media/workflows/index.d.ts +8 -0
  472. package/.medusa/server/src/workflows/media/workflows/index.js +25 -0
  473. package/.medusa/server/src/workflows/media/workflows/set-category-images.d.ts +13 -0
  474. package/.medusa/server/src/workflows/media/workflows/set-category-images.js +71 -0
  475. package/.medusa/server/src/workflows/media/workflows/set-collection-images.d.ts +13 -0
  476. package/.medusa/server/src/workflows/media/workflows/set-collection-images.js +71 -0
  477. package/.medusa/server/src/workflows/media/workflows/update-product-category-with-images.d.ts +9 -0
  478. package/.medusa/server/src/workflows/media/workflows/update-product-category-with-images.js +22 -0
  479. package/.medusa/server/src/workflows/media/workflows/update-product-collection-with-images.d.ts +9 -0
  480. package/.medusa/server/src/workflows/media/workflows/update-product-collection-with-images.js +22 -0
  481. package/.medusa/server/src/workflows/offer/steps/add-offer-prices.d.ts +0 -12
  482. package/.medusa/server/src/workflows/offer/steps/add-offer-prices.js +1 -16
  483. package/.medusa/server/src/workflows/offer/steps/create-offers.d.ts +2 -0
  484. package/.medusa/server/src/workflows/offer/steps/ensure-variant-price-sets.d.ts +0 -9
  485. package/.medusa/server/src/workflows/offer/steps/ensure-variant-price-sets.js +1 -10
  486. package/.medusa/server/src/workflows/offer/steps/update-offers.d.ts +2 -5
  487. package/.medusa/server/src/workflows/offer/steps/update-offers.js +1 -1
  488. package/.medusa/server/src/workflows/offer/utils/assert-offer-price-ownership.d.ts +0 -11
  489. package/.medusa/server/src/workflows/offer/utils/assert-offer-price-ownership.js +1 -12
  490. package/.medusa/server/src/workflows/offer/utils/prepare-offer-inventory-input.d.ts +0 -10
  491. package/.medusa/server/src/workflows/offer/utils/prepare-offer-inventory-input.js +1 -19
  492. package/.medusa/server/src/workflows/offer/workflows/create-offers.js +4 -16
  493. package/.medusa/server/src/workflows/offer/workflows/delete-offers.js +7 -2
  494. package/.medusa/server/src/workflows/offer/workflows/update-offers.d.ts +0 -11
  495. package/.medusa/server/src/workflows/offer/workflows/update-offers.js +2 -23
  496. package/.medusa/server/src/workflows/order/workflows/cancel-order-fulfillment.d.ts +1 -2
  497. package/.medusa/server/src/workflows/order/workflows/cancel-order-fulfillment.js +1 -2
  498. package/.medusa/server/src/workflows/order/workflows/confirm-claim-request.js +1 -3
  499. package/.medusa/server/src/workflows/order/workflows/confirm-exchange-request.js +1 -8
  500. package/.medusa/server/src/workflows/order/workflows/confirm-order-edit-request.d.ts +7 -0
  501. package/.medusa/server/src/workflows/order/workflows/confirm-order-edit-request.js +165 -0
  502. package/.medusa/server/src/workflows/order/workflows/confirm-return-receive.js +2 -10
  503. package/.medusa/server/src/workflows/order/workflows/create-order-fulfillment.js +2 -3
  504. package/.medusa/server/src/workflows/order/workflows/index.d.ts +1 -0
  505. package/.medusa/server/src/workflows/order/workflows/index.js +2 -1
  506. package/.medusa/server/src/workflows/order-group/utils/aggregate-status.js +1 -7
  507. package/.medusa/server/src/workflows/order-group/workflows/get-order-groups-list.d.ts +1 -0
  508. package/.medusa/server/src/workflows/order-group/workflows/get-order-groups-list.js +11 -2
  509. package/.medusa/server/src/workflows/payout/workflows/create-payout.js +34 -21
  510. package/.medusa/server/src/workflows/product/events.d.ts +0 -6
  511. package/.medusa/server/src/workflows/product/events.js +1 -7
  512. package/.medusa/server/src/workflows/product/steps/index.d.ts +0 -2
  513. package/.medusa/server/src/workflows/product/steps/index.js +1 -3
  514. package/.medusa/server/src/workflows/product/steps/validate-products-status.d.ts +0 -8
  515. package/.medusa/server/src/workflows/product/steps/validate-products-status.js +1 -9
  516. package/.medusa/server/src/workflows/product/steps/validate-seller-product-permissions.js +1 -3
  517. package/.medusa/server/src/workflows/product/workflows/assign-products-to-category.d.ts +12 -0
  518. package/.medusa/server/src/workflows/product/workflows/assign-products-to-category.js +23 -0
  519. package/.medusa/server/src/workflows/product/workflows/confirm-products.d.ts +4 -20
  520. package/.medusa/server/src/workflows/product/workflows/confirm-products.js +2 -13
  521. package/.medusa/server/src/workflows/product/workflows/create-products.d.ts +4 -52
  522. package/.medusa/server/src/workflows/product/workflows/create-products.js +69 -158
  523. package/.medusa/server/src/workflows/product/workflows/index.d.ts +1 -1
  524. package/.medusa/server/src/workflows/product/workflows/index.js +2 -2
  525. package/.medusa/server/src/workflows/product/workflows/link-sellers-to-product-category.d.ts +0 -7
  526. package/.medusa/server/src/workflows/product/workflows/link-sellers-to-product-category.js +1 -1
  527. package/.medusa/server/src/workflows/product/workflows/link-sellers-to-product.d.ts +0 -7
  528. package/.medusa/server/src/workflows/product/workflows/link-sellers-to-product.js +1 -1
  529. package/.medusa/server/src/workflows/product/workflows/reject-product.d.ts +4 -11
  530. package/.medusa/server/src/workflows/product/workflows/reject-product.js +2 -8
  531. package/.medusa/server/src/workflows/product/workflows/request-product-change.d.ts +4 -18
  532. package/.medusa/server/src/workflows/product/workflows/request-product-change.js +2 -15
  533. package/.medusa/server/src/workflows/product-attribute/events.d.ts +0 -9
  534. package/.medusa/server/src/workflows/product-attribute/events.js +1 -10
  535. package/.medusa/server/src/workflows/product-attribute/steps/create-product-attribute-values.d.ts +1 -31
  536. package/.medusa/server/src/workflows/product-attribute/steps/create-product-attributes.d.ts +1 -41
  537. package/.medusa/server/src/workflows/product-attribute/steps/create-product-attributes.js +1 -1
  538. package/.medusa/server/src/workflows/product-attribute/steps/detach-product-option-values-from-product.d.ts +14 -0
  539. package/.medusa/server/src/workflows/product-attribute/steps/detach-product-option-values-from-product.js +40 -0
  540. package/.medusa/server/src/workflows/product-attribute/steps/index.d.ts +3 -4
  541. package/.medusa/server/src/workflows/product-attribute/steps/index.js +4 -5
  542. package/.medusa/server/src/workflows/product-attribute/steps/update-product-attribute-values.d.ts +6 -3
  543. package/.medusa/server/src/workflows/product-attribute/steps/update-product-attribute-values.js +17 -2
  544. package/.medusa/server/src/workflows/product-attribute/steps/update-product-attributes.d.ts +1 -31
  545. package/.medusa/server/src/workflows/product-attribute/steps/validate-product-attributes-not-linked.d.ts +2 -0
  546. package/.medusa/server/src/workflows/product-attribute/steps/validate-product-attributes-not-linked.js +28 -0
  547. package/.medusa/server/src/workflows/product-attribute/steps/validate-product-attributes-not-required.d.ts +7 -0
  548. package/.medusa/server/src/workflows/product-attribute/steps/validate-product-attributes-not-required.js +16 -0
  549. package/.medusa/server/src/workflows/product-attribute/workflows/add-product-attributes-to-product.d.ts +9 -0
  550. package/.medusa/server/src/workflows/product-attribute/workflows/add-product-attributes-to-product.js +242 -0
  551. package/.medusa/server/src/workflows/product-attribute/workflows/create-and-link-product-attributes.d.ts +15 -0
  552. package/.medusa/server/src/workflows/product-attribute/workflows/create-and-link-product-attributes.js +28 -0
  553. package/.medusa/server/src/workflows/product-attribute/workflows/create-product-attribute-values.js +44 -3
  554. package/.medusa/server/src/workflows/product-attribute/workflows/create-product-attributes.js +41 -17
  555. package/.medusa/server/src/workflows/product-attribute/workflows/delete-product-attribute-values.js +36 -15
  556. package/.medusa/server/src/workflows/product-attribute/workflows/delete-product-attributes.d.ts +0 -7
  557. package/.medusa/server/src/workflows/product-attribute/workflows/delete-product-attributes.js +11 -8
  558. package/.medusa/server/src/workflows/product-attribute/workflows/index.d.ts +4 -6
  559. package/.medusa/server/src/workflows/product-attribute/workflows/index.js +5 -7
  560. package/.medusa/server/src/workflows/product-attribute/workflows/remove-product-attributes-from-product.d.ts +10 -0
  561. package/.medusa/server/src/workflows/product-attribute/workflows/remove-product-attributes-from-product.js +83 -0
  562. package/.medusa/server/src/workflows/product-attribute/workflows/update-product-attribute-values.js +34 -1
  563. package/.medusa/server/src/workflows/product-attribute/workflows/update-product-attributes-on-product.d.ts +11 -0
  564. package/.medusa/server/src/workflows/product-attribute/workflows/update-product-attributes-on-product.js +285 -0
  565. package/.medusa/server/src/workflows/product-attribute/workflows/update-product-attributes.js +15 -1
  566. package/.medusa/server/src/workflows/product-attribute/workflows/upsert-product-attribute-values.d.ts +4 -11
  567. package/.medusa/server/src/workflows/product-attribute/workflows/upsert-product-attribute-values.js +19 -19
  568. package/.medusa/server/src/workflows/product-edit/events.d.ts +0 -7
  569. package/.medusa/server/src/workflows/product-edit/events.js +1 -8
  570. package/.medusa/server/src/workflows/product-edit/steps/apply-variant-image-links.d.ts +16 -0
  571. package/.medusa/server/src/workflows/product-edit/steps/apply-variant-image-links.js +35 -0
  572. package/.medusa/server/src/workflows/product-edit/steps/confirm-product-change-validation.d.ts +0 -4
  573. package/.medusa/server/src/workflows/product-edit/steps/confirm-product-change-validation.js +1 -5
  574. package/.medusa/server/src/workflows/product-edit/steps/confirm-product-changes.d.ts +0 -6
  575. package/.medusa/server/src/workflows/product-edit/steps/confirm-product-changes.js +1 -7
  576. package/.medusa/server/src/workflows/product-edit/steps/create-product-change-actions.d.ts +0 -5
  577. package/.medusa/server/src/workflows/product-edit/steps/create-product-change-actions.js +1 -6
  578. package/.medusa/server/src/workflows/product-edit/steps/create-product-changes.d.ts +0 -6
  579. package/.medusa/server/src/workflows/product-edit/steps/create-product-changes.js +1 -1
  580. package/.medusa/server/src/workflows/product-edit/steps/decline-product-change.d.ts +0 -5
  581. package/.medusa/server/src/workflows/product-edit/steps/decline-product-change.js +1 -6
  582. package/.medusa/server/src/workflows/product-edit/steps/index.d.ts +1 -0
  583. package/.medusa/server/src/workflows/product-edit/steps/index.js +2 -1
  584. package/.medusa/server/src/workflows/product-edit/steps/update-product-change-actions.d.ts +0 -5
  585. package/.medusa/server/src/workflows/product-edit/steps/update-product-change-actions.js +1 -6
  586. package/.medusa/server/src/workflows/product-edit/steps/validate-no-pending-product-change.d.ts +0 -6
  587. package/.medusa/server/src/workflows/product-edit/steps/validate-no-pending-product-change.js +2 -8
  588. package/.medusa/server/src/workflows/product-edit/workflows/apply-product-attribute-change-actions.d.ts +5 -19
  589. package/.medusa/server/src/workflows/product-edit/workflows/apply-product-attribute-change-actions.js +11 -128
  590. package/.medusa/server/src/workflows/product-edit/workflows/apply-product-change-actions.d.ts +0 -31
  591. package/.medusa/server/src/workflows/product-edit/workflows/apply-product-change-actions.js +43 -50
  592. package/.medusa/server/src/workflows/product-edit/workflows/auto-confirm-product-change.d.ts +1 -9
  593. package/.medusa/server/src/workflows/product-edit/workflows/auto-confirm-product-change.js +3 -11
  594. package/.medusa/server/src/workflows/product-edit/workflows/confirm-product-change.d.ts +0 -11
  595. package/.medusa/server/src/workflows/product-edit/workflows/confirm-product-change.js +1 -12
  596. package/.medusa/server/src/workflows/product-edit/workflows/index.d.ts +1 -1
  597. package/.medusa/server/src/workflows/product-edit/workflows/index.js +2 -2
  598. package/.medusa/server/src/workflows/product-edit/workflows/product-edit-delete-product.d.ts +0 -7
  599. package/.medusa/server/src/workflows/product-edit/workflows/product-edit-delete-product.js +10 -9
  600. package/.medusa/server/src/workflows/product-edit/workflows/product-edit-update-attributes.d.ts +4 -46
  601. package/.medusa/server/src/workflows/product-edit/workflows/product-edit-update-attributes.js +11 -162
  602. package/.medusa/server/src/workflows/product-edit/workflows/product-edit-update-product.d.ts +16 -0
  603. package/.medusa/server/src/workflows/product-edit/workflows/product-edit-update-product.js +139 -0
  604. package/.medusa/server/src/workflows/product-edit/workflows/product-edit-update-variants.d.ts +0 -10
  605. package/.medusa/server/src/workflows/product-edit/workflows/product-edit-update-variants.js +71 -17
  606. package/.medusa/server/src/workflows/product-edit/workflows/record-product-audit-change.d.ts +0 -24
  607. package/.medusa/server/src/workflows/product-edit/workflows/record-product-audit-change.js +1 -15
  608. package/.medusa/server/src/workflows/product-edit/workflows/stage-product-change.d.ts +1 -25
  609. package/.medusa/server/src/workflows/product-edit/workflows/stage-product-change.js +2 -15
  610. package/.medusa/server/src/workflows/promotion/steps/register-usage.d.ts +0 -3
  611. package/.medusa/server/src/workflows/promotion/steps/register-usage.js +1 -4
  612. package/.medusa/server/src/workflows/seller/steps/create-seller-member.d.ts +4 -4
  613. package/.medusa/server/src/workflows/seller/steps/update-member.d.ts +2 -2
  614. package/.medusa/server/src/workflows/seller/steps/update-seller-member.d.ts +4 -4
  615. package/.medusa/server/src/workflows/seller/workflows/accept-member-invite.js +1 -2
  616. package/.medusa/server/src/workflows/seller/workflows/add-seller-member.d.ts +4 -4
  617. package/.medusa/server/src/workflows/seller/workflows/approve-seller.d.ts +4 -4
  618. package/.medusa/server/src/workflows/seller/workflows/approve-seller.js +2 -1
  619. package/.medusa/server/src/workflows/seller/workflows/create-sellers.js +1 -2
  620. package/.medusa/server/src/workflows/seller/workflows/suspend-seller.d.ts +4 -4
  621. package/.medusa/server/src/workflows/seller/workflows/suspend-seller.js +2 -1
  622. package/.medusa/server/src/workflows/seller/workflows/terminate-seller.d.ts +4 -4
  623. package/.medusa/server/src/workflows/seller/workflows/terminate-seller.js +2 -1
  624. package/.medusa/server/src/workflows/seller/workflows/unsuspend-seller.d.ts +4 -4
  625. package/.medusa/server/src/workflows/seller/workflows/unsuspend-seller.js +2 -1
  626. package/.medusa/server/src/workflows/seller/workflows/unterminate-seller.d.ts +4 -4
  627. package/.medusa/server/src/workflows/seller/workflows/unterminate-seller.js +2 -1
  628. package/.medusa/server/src/workflows/seller/workflows/update-member.d.ts +12 -101
  629. package/.medusa/server/src/workflows/seller/workflows/update-member.js +6 -2
  630. package/package.json +22 -21
  631. package/.medusa/server/src/api/admin/products/[id]/attributes/[attribute_id]/route.d.ts +0 -13
  632. package/.medusa/server/src/api/admin/products/[id]/attributes/[attribute_id]/route.js +0 -90
  633. package/.medusa/server/src/api/admin/products/[id]/attributes/route.d.ts +0 -5
  634. package/.medusa/server/src/api/admin/products/[id]/attributes/route.js +0 -63
  635. package/.medusa/server/src/api/vendor/orders/apply-request-filter.d.ts +0 -2
  636. package/.medusa/server/src/api/vendor/orders/apply-request-filter.js +0 -99
  637. package/.medusa/server/src/api/vendor/payment-collections/[id]/mark-as-paid/route.d.ts +0 -3
  638. package/.medusa/server/src/api/vendor/payment-collections/[id]/mark-as-paid/route.js +0 -25
  639. package/.medusa/server/src/api/vendor/payment-collections/helpers.d.ts +0 -3
  640. package/.medusa/server/src/api/vendor/payment-collections/helpers.js +0 -30
  641. package/.medusa/server/src/api/vendor/payment-collections/middlewares.d.ts +0 -2
  642. package/.medusa/server/src/api/vendor/payment-collections/middlewares.js +0 -17
  643. package/.medusa/server/src/api/vendor/payment-collections/query-config.d.ts +0 -7
  644. package/.medusa/server/src/api/vendor/payment-collections/query-config.js +0 -26
  645. package/.medusa/server/src/api/vendor/payment-collections/validators.d.ts +0 -17
  646. package/.medusa/server/src/api/vendor/payment-collections/validators.js +0 -12
  647. package/.medusa/server/src/api/vendor/products/[id]/attributes/[attribute_id]/route.d.ts +0 -22
  648. package/.medusa/server/src/api/vendor/products/[id]/attributes/[attribute_id]/route.js +0 -97
  649. package/.medusa/server/src/api/vendor/products/[id]/attributes/route.d.ts +0 -15
  650. package/.medusa/server/src/api/vendor/products/[id]/attributes/route.js +0 -80
  651. package/.medusa/server/src/links/line-item-commission-line-link.js +0 -21
  652. package/.medusa/server/src/links/product-attribute-value-link.d.ts +0 -22
  653. package/.medusa/server/src/links/product-attribute-value-link.js +0 -46
  654. package/.medusa/server/src/links/product-variant-attribute-link.js +0 -21
  655. package/.medusa/server/src/links/product-variant-attribute-value-link.js +0 -21
  656. package/.medusa/server/src/workflows/product/steps/replace-product-attribute-value-links.d.ts +0 -28
  657. package/.medusa/server/src/workflows/product/steps/replace-product-attribute-value-links.js +0 -72
  658. package/.medusa/server/src/workflows/product/steps/resolve-attribute-refs.d.ts +0 -90
  659. package/.medusa/server/src/workflows/product/steps/resolve-attribute-refs.js +0 -185
  660. package/.medusa/server/src/workflows/product/workflows/update-products.d.ts +0 -39
  661. package/.medusa/server/src/workflows/product/workflows/update-products.js +0 -161
  662. package/.medusa/server/src/workflows/product-attribute/steps/upsert-product-attribute-values.d.ts +0 -43
  663. package/.medusa/server/src/workflows/product-attribute/steps/upsert-product-attribute-values.js +0 -51
  664. package/.medusa/server/src/workflows/product-attribute/steps/upsert-product-options-for-axis.d.ts +0 -7
  665. package/.medusa/server/src/workflows/product-attribute/steps/upsert-product-options-for-axis.js +0 -59
  666. package/.medusa/server/src/workflows/product-attribute/steps/validate-attribute-accepts-values.d.ts +0 -6
  667. package/.medusa/server/src/workflows/product-attribute/steps/validate-attribute-accepts-values.js +0 -20
  668. package/.medusa/server/src/workflows/product-attribute/steps/validate-product-attribute-input.d.ts +0 -7
  669. package/.medusa/server/src/workflows/product-attribute/steps/validate-product-attribute-input.js +0 -20
  670. package/.medusa/server/src/workflows/product-attribute/workflows/add-product-attribute.d.ts +0 -52
  671. package/.medusa/server/src/workflows/product-attribute/workflows/add-product-attribute.js +0 -120
  672. package/.medusa/server/src/workflows/product-attribute/workflows/batch-product-attribute-values.d.ts +0 -23
  673. package/.medusa/server/src/workflows/product-attribute/workflows/batch-product-attribute-values.js +0 -252
  674. package/.medusa/server/src/workflows/product-attribute/workflows/detach-product-attribute.d.ts +0 -17
  675. package/.medusa/server/src/workflows/product-attribute/workflows/detach-product-attribute.js +0 -62
  676. package/.medusa/server/src/workflows/product-attribute/workflows/materialize-product-attributes.d.ts +0 -135
  677. package/.medusa/server/src/workflows/product-attribute/workflows/materialize-product-attributes.js +0 -43
  678. package/.medusa/server/src/workflows/product-attribute/workflows/sync-product-attribute-options.d.ts +0 -24
  679. package/.medusa/server/src/workflows/product-attribute/workflows/sync-product-attribute-options.js +0 -27
  680. package/.medusa/server/src/workflows/product-attribute/workflows/update-product-attribute.d.ts +0 -23
  681. package/.medusa/server/src/workflows/product-attribute/workflows/update-product-attribute.js +0 -67
  682. package/.medusa/server/src/workflows/product-edit/workflows/product-edit-update-fields.d.ts +0 -25
  683. package/.medusa/server/src/workflows/product-edit/workflows/product-edit-update-fields.js +0 -148
  684. /package/.medusa/server/src/links/{line-item-commission-line-link.d.ts → offer-product-link.d.ts} +0 -0
  685. /package/.medusa/server/src/links/{product-variant-attribute-link.d.ts → seller-customer-group-link.d.ts} +0 -0
@@ -2,7 +2,7 @@ import { z } from "zod";
2
2
  export type VendorGetShippingProfileParamsType = z.infer<typeof VendorGetShippingProfileParams>;
3
3
  export declare const VendorGetShippingProfileParams: z.ZodObject<{
4
4
  fields: z.ZodOptional<z.ZodString>;
5
- }, "strip", z.ZodTypeAny, {
5
+ }, z.core.$strip, z.ZodTypeAny, {
6
6
  fields?: string | undefined;
7
7
  }, {
8
8
  fields?: string | undefined;
@@ -10,17 +10,16 @@ export declare const VendorGetShippingProfileParams: z.ZodObject<{
10
10
  export type VendorGetShippingProfilesParamsType = z.infer<typeof VendorGetShippingProfilesParams>;
11
11
  export declare const VendorGetShippingProfilesParams: z.ZodObject<{
12
12
  fields: z.ZodOptional<z.ZodString>;
13
- } & {
14
- offset: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
15
- limit: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
13
+ offset: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodNumber>>>;
14
+ limit: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodNumber>>>;
16
15
  order: z.ZodOptional<z.ZodString> | z.ZodDefault<z.ZodOptional<z.ZodString>>;
17
- with_deleted: z.ZodEffects<z.ZodOptional<z.ZodBoolean>, boolean | undefined, unknown>;
16
+ with_deleted: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodBoolean>>;
18
17
  } & {
19
18
  id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
20
19
  q: z.ZodOptional<z.ZodString>;
21
20
  type: z.ZodOptional<z.ZodString>;
22
21
  name: z.ZodOptional<z.ZodString>;
23
- created_at: z.ZodOptional<z.ZodUnion<[any, z.ZodObject<{
22
+ created_at: z.ZodOptional<z.ZodUnion<readonly [any, z.ZodObject<{
24
23
  $eq: any;
25
24
  $ne: any;
26
25
  $in: any;
@@ -33,7 +32,7 @@ export declare const VendorGetShippingProfilesParams: z.ZodObject<{
33
32
  $gte: any;
34
33
  $lt: any;
35
34
  $lte: any;
36
- }, "strip", z.ZodTypeAny, {
35
+ }, z.core.$strip, z.ZodTypeAny, {
37
36
  $eq?: any;
38
37
  $ne?: any;
39
38
  $in?: any;
@@ -60,7 +59,7 @@ export declare const VendorGetShippingProfilesParams: z.ZodObject<{
60
59
  $lt?: any;
61
60
  $lte?: any;
62
61
  }>]>>;
63
- updated_at: z.ZodOptional<z.ZodUnion<[any, z.ZodObject<{
62
+ updated_at: z.ZodOptional<z.ZodUnion<readonly [any, z.ZodObject<{
64
63
  $eq: any;
65
64
  $ne: any;
66
65
  $in: any;
@@ -73,7 +72,7 @@ export declare const VendorGetShippingProfilesParams: z.ZodObject<{
73
72
  $gte: any;
74
73
  $lt: any;
75
74
  $lte: any;
76
- }, "strip", z.ZodTypeAny, {
75
+ }, z.core.$strip, z.ZodTypeAny, {
77
76
  $eq?: any;
78
77
  $ne?: any;
79
78
  $in?: any;
@@ -101,28 +100,28 @@ export declare const VendorGetShippingProfilesParams: z.ZodObject<{
101
100
  $lte?: any;
102
101
  }>]>>;
103
102
  }, "strip", z.ZodTypeAny, {
104
- offset: number;
105
- limit: number;
103
+ order?: string | undefined;
106
104
  id?: string | string[] | undefined;
107
105
  created_at?: any;
108
106
  updated_at?: any;
107
+ fields?: string | undefined;
109
108
  type?: string | undefined;
109
+ offset?: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodNumber>>>;
110
+ limit?: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodNumber>>>;
111
+ with_deleted?: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodBoolean>>;
110
112
  q?: string | undefined;
111
- fields?: string | undefined;
112
- order?: string | undefined;
113
- with_deleted?: boolean | undefined;
114
113
  name?: string | undefined;
115
114
  }, {
115
+ order?: string | undefined;
116
116
  id?: string | string[] | undefined;
117
117
  created_at?: any;
118
118
  updated_at?: any;
119
+ fields?: string | undefined;
119
120
  type?: string | undefined;
120
- offset?: unknown;
121
- limit?: unknown;
121
+ offset?: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodNumber>>>;
122
+ limit?: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodNumber>>>;
123
+ with_deleted?: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodBoolean>>;
122
124
  q?: string | undefined;
123
- fields?: string | undefined;
124
- order?: string | undefined;
125
- with_deleted?: unknown;
126
125
  name?: string | undefined;
127
126
  }>;
128
127
  export type VendorCreateShippingProfileType = z.infer<typeof VendorCreateShippingProfile>;
@@ -145,11 +144,11 @@ export declare const VendorUpdateShippingProfile: z.ZodObject<{
145
144
  type: z.ZodOptional<z.ZodString>;
146
145
  metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
147
146
  }, "strict", z.ZodTypeAny, {
148
- type?: string | undefined;
149
147
  metadata?: Record<string, unknown> | null | undefined;
148
+ type?: string | undefined;
150
149
  name?: string | undefined;
151
150
  }, {
152
- type?: string | undefined;
153
151
  metadata?: Record<string, unknown> | null | undefined;
152
+ type?: string | undefined;
154
153
  name?: string | undefined;
155
154
  }>;
@@ -2,7 +2,7 @@ import { z } from "zod";
2
2
  export type VendorGetStockLocationParamsType = z.infer<typeof VendorGetStockLocationParams>;
3
3
  export declare const VendorGetStockLocationParams: z.ZodObject<{
4
4
  fields: z.ZodOptional<z.ZodString>;
5
- }, "strip", z.ZodTypeAny, {
5
+ }, z.core.$strip, z.ZodTypeAny, {
6
6
  fields?: string | undefined;
7
7
  }, {
8
8
  fields?: string | undefined;
@@ -10,16 +10,15 @@ export declare const VendorGetStockLocationParams: z.ZodObject<{
10
10
  export type VendorGetStockLocationsParamsType = z.infer<typeof VendorGetStockLocationsParams>;
11
11
  export declare const VendorGetStockLocationsParams: z.ZodObject<{
12
12
  fields: z.ZodOptional<z.ZodString>;
13
- } & {
14
- offset: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
15
- limit: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
13
+ offset: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodNumber>>>;
14
+ limit: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodNumber>>>;
16
15
  order: z.ZodOptional<z.ZodString> | z.ZodDefault<z.ZodOptional<z.ZodString>>;
17
- with_deleted: z.ZodEffects<z.ZodOptional<z.ZodBoolean>, boolean | undefined, unknown>;
16
+ with_deleted: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodBoolean>>;
18
17
  } & {
19
18
  q: z.ZodOptional<z.ZodString>;
20
19
  id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
21
20
  name: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
22
- created_at: z.ZodOptional<z.ZodUnion<[any, z.ZodObject<{
21
+ created_at: z.ZodOptional<z.ZodUnion<readonly [any, z.ZodObject<{
23
22
  $eq: any;
24
23
  $ne: any;
25
24
  $in: any;
@@ -32,7 +31,7 @@ export declare const VendorGetStockLocationsParams: z.ZodObject<{
32
31
  $gte: any;
33
32
  $lt: any;
34
33
  $lte: any;
35
- }, "strip", z.ZodTypeAny, {
34
+ }, z.core.$strip, z.ZodTypeAny, {
36
35
  $eq?: any;
37
36
  $ne?: any;
38
37
  $in?: any;
@@ -59,7 +58,7 @@ export declare const VendorGetStockLocationsParams: z.ZodObject<{
59
58
  $lt?: any;
60
59
  $lte?: any;
61
60
  }>]>>;
62
- updated_at: z.ZodOptional<z.ZodUnion<[any, z.ZodObject<{
61
+ updated_at: z.ZodOptional<z.ZodUnion<readonly [any, z.ZodObject<{
63
62
  $eq: any;
64
63
  $ne: any;
65
64
  $in: any;
@@ -72,7 +71,7 @@ export declare const VendorGetStockLocationsParams: z.ZodObject<{
72
71
  $gte: any;
73
72
  $lt: any;
74
73
  $lte: any;
75
- }, "strip", z.ZodTypeAny, {
74
+ }, z.core.$strip, z.ZodTypeAny, {
76
75
  $eq?: any;
77
76
  $ne?: any;
78
77
  $in?: any;
@@ -100,26 +99,26 @@ export declare const VendorGetStockLocationsParams: z.ZodObject<{
100
99
  $lte?: any;
101
100
  }>]>>;
102
101
  }, "strip", z.ZodTypeAny, {
103
- offset: number;
104
- limit: number;
102
+ order?: string | undefined;
105
103
  id?: string | string[] | undefined;
106
104
  created_at?: any;
107
105
  updated_at?: any;
108
- q?: string | undefined;
109
106
  fields?: string | undefined;
110
- order?: string | undefined;
111
- with_deleted?: boolean | undefined;
107
+ offset?: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodNumber>>>;
108
+ limit?: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodNumber>>>;
109
+ with_deleted?: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodBoolean>>;
110
+ q?: string | undefined;
112
111
  name?: string | string[] | undefined;
113
112
  }, {
113
+ order?: string | undefined;
114
114
  id?: string | string[] | undefined;
115
115
  created_at?: any;
116
116
  updated_at?: any;
117
- offset?: unknown;
118
- limit?: unknown;
119
- q?: string | undefined;
120
117
  fields?: string | undefined;
121
- order?: string | undefined;
122
- with_deleted?: unknown;
118
+ offset?: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodNumber>>>;
119
+ limit?: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodNumber>>>;
120
+ with_deleted?: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodBoolean>>;
121
+ q?: string | undefined;
123
122
  name?: string | string[] | undefined;
124
123
  }>;
125
124
  export declare const VendorUpsertStockLocationAddress: z.ZodObject<{
@@ -2,7 +2,7 @@ import { z } from "zod";
2
2
  export type VendorGetStoreParamsType = z.infer<typeof VendorGetStoreParams>;
3
3
  export declare const VendorGetStoreParams: z.ZodObject<{
4
4
  fields: z.ZodOptional<z.ZodString>;
5
- }, "strip", z.ZodTypeAny, {
5
+ }, z.core.$strip, z.ZodTypeAny, {
6
6
  fields?: string | undefined;
7
7
  }, {
8
8
  fields?: string | undefined;
@@ -10,31 +10,30 @@ export declare const VendorGetStoreParams: z.ZodObject<{
10
10
  export type VendorGetStoresParamsType = z.infer<typeof VendorGetStoresParams>;
11
11
  export declare const VendorGetStoresParams: z.ZodObject<{
12
12
  fields: z.ZodOptional<z.ZodString>;
13
- } & {
14
- offset: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
15
- limit: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
13
+ offset: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodNumber>>>;
14
+ limit: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodNumber>>>;
16
15
  order: z.ZodOptional<z.ZodString> | z.ZodDefault<z.ZodOptional<z.ZodString>>;
17
- with_deleted: z.ZodEffects<z.ZodOptional<z.ZodBoolean>, boolean | undefined, unknown>;
16
+ with_deleted: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodBoolean>>;
18
17
  } & {
19
18
  q: z.ZodOptional<z.ZodString>;
20
19
  id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
21
20
  name: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
22
21
  }, "strip", z.ZodTypeAny, {
23
- offset: number;
24
- limit: number;
22
+ order?: string | undefined;
25
23
  id?: string | string[] | undefined;
26
- q?: string | undefined;
27
24
  fields?: string | undefined;
28
- order?: string | undefined;
29
- with_deleted?: boolean | undefined;
25
+ offset?: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodNumber>>>;
26
+ limit?: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodNumber>>>;
27
+ with_deleted?: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodBoolean>>;
28
+ q?: string | undefined;
30
29
  name?: string | string[] | undefined;
31
30
  }, {
31
+ order?: string | undefined;
32
32
  id?: string | string[] | undefined;
33
- offset?: unknown;
34
- limit?: unknown;
35
- q?: string | undefined;
36
33
  fields?: string | undefined;
37
- order?: string | undefined;
38
- with_deleted?: unknown;
34
+ offset?: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodNumber>>>;
35
+ limit?: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodNumber>>>;
36
+ with_deleted?: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodBoolean>>;
37
+ q?: string | undefined;
39
38
  name?: string | string[] | undefined;
40
39
  }>;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * ProductCategory → Image link.
3
+ *
4
+ * Direction is category → media: the category owns its images, so
5
+ * `productCategory` is the parent linkable and `isList: true` sits on the
6
+ * image side. A category resolves its gallery + icon via
7
+ * `category.media_images`.
8
+ *
9
+ * The reverse alias is `media_images`, NOT the bare `images`: ProductCategory
10
+ * lives in the Medusa product module, whose service config also owns the
11
+ * `Product.images` relation. Registering an `images` link alias on that shared
12
+ * service shadows the native relation and makes the joiner throw
13
+ * `Cannot resolve alias path "" that matches entity Product` on every product
14
+ * query. A distinct alias avoids the collision.
15
+ *
16
+ * The same `Image` model is reused for product collections via a second,
17
+ * analogous link — keep this entity-agnostic.
18
+ */
19
+ declare const _default: import("@medusajs/framework/utils").DefineLinkExport;
20
+ export default _default;
@@ -0,0 +1,34 @@
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 product_1 = __importDefault(require("@medusajs/medusa/product"));
8
+ const media_1 = __importDefault(require("../modules/media"));
9
+ /**
10
+ * ProductCategory → Image link.
11
+ *
12
+ * Direction is category → media: the category owns its images, so
13
+ * `productCategory` is the parent linkable and `isList: true` sits on the
14
+ * image side. A category resolves its gallery + icon via
15
+ * `category.media_images`.
16
+ *
17
+ * The reverse alias is `media_images`, NOT the bare `images`: ProductCategory
18
+ * lives in the Medusa product module, whose service config also owns the
19
+ * `Product.images` relation. Registering an `images` link alias on that shared
20
+ * service shadows the native relation and makes the joiner throw
21
+ * `Cannot resolve alias path "" that matches entity Product` on every product
22
+ * query. A distinct alias avoids the collision.
23
+ *
24
+ * The same `Image` model is reused for product collections via a second,
25
+ * analogous link — keep this entity-agnostic.
26
+ */
27
+ exports.default = (0, utils_1.defineLink)(product_1.default.linkable.productCategory, {
28
+ linkable: {
29
+ ...media_1.default.linkable.mediaImage,
30
+ alias: "media_images",
31
+ },
32
+ isList: true,
33
+ });
34
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVkaWEtcHJvZHVjdC1jYXRlZ29yeS1saW5rLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2xpbmtzL21lZGlhLXByb2R1Y3QtY2F0ZWdvcnktbGluay50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLHFEQUFzRDtBQUN0RCx1RUFBb0Q7QUFFcEQsNkRBQTBDO0FBRTFDOzs7Ozs7Ozs7Ozs7Ozs7OztHQWlCRztBQUNILGtCQUFlLElBQUEsa0JBQVUsRUFDdkIsaUJBQWEsQ0FBQyxRQUFRLENBQUMsZUFBZSxFQUN0QztJQUNFLFFBQVEsRUFBRTtRQUNSLEdBQUcsZUFBVyxDQUFDLFFBQVEsQ0FBQyxVQUFVO1FBQ2xDLEtBQUssRUFBRSxjQUFjO0tBQ3RCO0lBQ0QsTUFBTSxFQUFFLElBQUk7Q0FDYixDQUNGLENBQUEifQ==
@@ -0,0 +1,18 @@
1
+ /**
2
+ * ProductCollection → Image link.
3
+ *
4
+ * Mirrors `media-product-category-link`: the collection owns its images, so
5
+ * `productCollection` is the parent linkable and `isList: true` sits on the
6
+ * image side. A collection resolves its gallery + icon via
7
+ * `collection.media_images`.
8
+ *
9
+ * The reverse alias is `media_images`, NOT the bare `images`: ProductCollection
10
+ * lives in the Medusa product module, whose service config also owns the
11
+ * `Product.images` relation. An `images` link alias there shadows the native
12
+ * relation and breaks every product `query.graph` (see
13
+ * `media-product-category-link`).
14
+ *
15
+ * Reuses the same entity-agnostic `Image` model as categories.
16
+ */
17
+ declare const _default: import("@medusajs/framework/utils").DefineLinkExport;
18
+ export default _default;
@@ -0,0 +1,32 @@
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 product_1 = __importDefault(require("@medusajs/medusa/product"));
8
+ const media_1 = __importDefault(require("../modules/media"));
9
+ /**
10
+ * ProductCollection → Image link.
11
+ *
12
+ * Mirrors `media-product-category-link`: the collection owns its images, so
13
+ * `productCollection` is the parent linkable and `isList: true` sits on the
14
+ * image side. A collection resolves its gallery + icon via
15
+ * `collection.media_images`.
16
+ *
17
+ * The reverse alias is `media_images`, NOT the bare `images`: ProductCollection
18
+ * lives in the Medusa product module, whose service config also owns the
19
+ * `Product.images` relation. An `images` link alias there shadows the native
20
+ * relation and breaks every product `query.graph` (see
21
+ * `media-product-category-link`).
22
+ *
23
+ * Reuses the same entity-agnostic `Image` model as categories.
24
+ */
25
+ exports.default = (0, utils_1.defineLink)(product_1.default.linkable.productCollection, {
26
+ linkable: {
27
+ ...media_1.default.linkable.mediaImage,
28
+ alias: "media_images",
29
+ },
30
+ isList: true,
31
+ });
32
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVkaWEtcHJvZHVjdC1jb2xsZWN0aW9uLWxpbmsuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvbGlua3MvbWVkaWEtcHJvZHVjdC1jb2xsZWN0aW9uLWxpbmsudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxxREFBc0Q7QUFDdEQsdUVBQW9EO0FBRXBELDZEQUEwQztBQUUxQzs7Ozs7Ozs7Ozs7Ozs7O0dBZUc7QUFDSCxrQkFBZSxJQUFBLGtCQUFVLEVBQ3ZCLGlCQUFhLENBQUMsUUFBUSxDQUFDLGlCQUFpQixFQUN4QztJQUNFLFFBQVEsRUFBRTtRQUNSLEdBQUcsZUFBVyxDQUFDLFFBQVEsQ0FBQyxVQUFVO1FBQ2xDLEtBQUssRUFBRSxjQUFjO0tBQ3RCO0lBQ0QsTUFBTSxFQUFFLElBQUk7Q0FDYixDQUNGLENBQUEifQ==
@@ -0,0 +1,15 @@
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 product_1 = __importDefault(require("@medusajs/medusa/product"));
8
+ const offer_1 = __importDefault(require("../modules/offer"));
9
+ exports.default = (0, utils_1.defineLink)({
10
+ linkable: offer_1.default.linkable.offer,
11
+ field: "product_id",
12
+ }, product_1.default.linkable.product, {
13
+ readOnly: true,
14
+ });
15
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib2ZmZXItcHJvZHVjdC1saW5rLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2xpbmtzL29mZmVyLXByb2R1Y3QtbGluay50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLHFEQUFzRDtBQUN0RCx1RUFBb0Q7QUFDcEQsNkRBQTBDO0FBRTFDLGtCQUFlLElBQUEsa0JBQVUsRUFDdkI7SUFDRSxRQUFRLEVBQUUsZUFBVyxDQUFDLFFBQVEsQ0FBQyxLQUFLO0lBQ3BDLEtBQUssRUFBRSxZQUFZO0NBQ3BCLEVBQ0QsaUJBQWEsQ0FBQyxRQUFRLENBQUMsT0FBTyxFQUM5QjtJQUNFLFFBQVEsRUFBRSxJQUFJO0NBQ2YsQ0FDRixDQUFBIn0=
@@ -1,16 +1,2 @@
1
- /**
2
- * ProductCategory ↔ ProductAttribute pivot link.
3
- *
4
- * `defineLink` derives the on-service field-alias from
5
- * `pluralize(aliasB)`. Without an explicit alias, the linkable's
6
- * intrinsic field (`productAttribute`) pluralises to
7
- * `product_attributes` on the category side and the link-service
8
- * composition collides with the productAttribute service's
9
- * auto-registered aliases. We rename both sides so that:
10
- * - `productCategory.categories` is NOT the property added here
11
- * (irrelevant for category service);
12
- * - `productAttribute.categories` IS the property added (queried by
13
- * `/vendor/product-attributes` `*categories` field).
14
- */
15
1
  declare const _default: import("@medusajs/framework/utils").DefineLinkExport;
16
2
  export default _default;
@@ -6,30 +6,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const utils_1 = require("@medusajs/framework/utils");
7
7
  const product_1 = __importDefault(require("@medusajs/medusa/product"));
8
8
  const product_attribute_1 = __importDefault(require("../modules/product-attribute"));
9
- /**
10
- * ProductCategory ↔ ProductAttribute pivot link.
11
- *
12
- * `defineLink` derives the on-service field-alias from
13
- * `pluralize(aliasB)`. Without an explicit alias, the linkable's
14
- * intrinsic field (`productAttribute`) pluralises to
15
- * `product_attributes` on the category side and the link-service
16
- * composition collides with the productAttribute service's
17
- * auto-registered aliases. We rename both sides so that:
18
- * - `productCategory.categories` is NOT the property added here
19
- * (irrelevant for category service);
20
- * - `productAttribute.categories` IS the property added (queried by
21
- * `/vendor/product-attributes` `*categories` field).
22
- */
23
9
  exports.default = (0, utils_1.defineLink)({
24
- linkable: {
25
- ...product_1.default.linkable.productCategory.id,
26
- alias: "category",
27
- },
10
+ linkable: product_attribute_1.default.linkable.productAttribute.id,
28
11
  isList: true,
29
12
  }, {
30
13
  linkable: {
31
- ...product_attribute_1.default.linkable.productAttribute.id,
32
- alias: "owning_attribute",
14
+ ...product_1.default.linkable.productCategory.id,
15
+ alias: "categories",
33
16
  },
34
17
  isList: true,
35
18
  }, {
@@ -37,4 +20,4 @@ exports.default = (0, utils_1.defineLink)({
37
20
  table: "product_category_attribute",
38
21
  },
39
22
  });
40
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvZHVjdC1hdHRyaWJ1dGUtY2F0ZWdvcnktbGluay5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9saW5rcy9wcm9kdWN0LWF0dHJpYnV0ZS1jYXRlZ29yeS1saW5rLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEscURBQXNEO0FBQ3RELHVFQUFvRDtBQUVwRCxxRkFBaUU7QUFFakU7Ozs7Ozs7Ozs7Ozs7R0FhRztBQUNILGtCQUFlLElBQUEsa0JBQVUsRUFDdkI7SUFDRSxRQUFRLEVBQUU7UUFDUixHQUFHLGlCQUFhLENBQUMsUUFBUSxDQUFDLGVBQWUsQ0FBQyxFQUFFO1FBQzVDLEtBQUssRUFBRSxVQUFVO0tBQ2xCO0lBQ0QsTUFBTSxFQUFFLElBQUk7Q0FDYixFQUNEO0lBQ0UsUUFBUSxFQUFFO1FBQ1IsR0FBRywyQkFBc0IsQ0FBQyxRQUFRLENBQUMsZ0JBQWdCLENBQUMsRUFBRTtRQUN0RCxLQUFLLEVBQUUsa0JBQWtCO0tBQzFCO0lBQ0QsTUFBTSxFQUFFLElBQUk7Q0FDYixFQUNEO0lBQ0UsUUFBUSxFQUFFO1FBQ1IsS0FBSyxFQUFFLDRCQUE0QjtLQUNwQztDQUNGLENBQ0YsQ0FBQSJ9
23
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvZHVjdC1hdHRyaWJ1dGUtY2F0ZWdvcnktbGluay5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9saW5rcy9wcm9kdWN0LWF0dHJpYnV0ZS1jYXRlZ29yeS1saW5rLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEscURBQXNEO0FBQ3RELHVFQUFvRDtBQUVwRCxxRkFBaUU7QUFHakUsa0JBQWUsSUFBQSxrQkFBVSxFQUN2QjtJQUNFLFFBQVEsRUFBRSwyQkFBc0IsQ0FBQyxRQUFRLENBQUMsZ0JBQWdCLENBQUMsRUFBRTtJQUM3RCxNQUFNLEVBQUUsSUFBSTtDQUNiLEVBQ0Q7SUFDRSxRQUFRLEVBQUU7UUFDUixHQUFHLGlCQUFhLENBQUMsUUFBUSxDQUFDLGVBQWUsQ0FBQyxFQUFFO1FBQzVDLEtBQUssRUFBRSxZQUFZO0tBQ3BCO0lBQ0QsTUFBTSxFQUFFLElBQUk7Q0FDYixFQUNEO0lBQ0UsUUFBUSxFQUFFO1FBQ1IsS0FBSyxFQUFFLDRCQUE0QjtLQUNwQztDQUNGLENBQ0YsQ0FBQSJ9
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Read-only link ProductAttribute → ProductOption mirror (1:1).
3
+ * `ProductAttribute.product_option_id` is the FK; no pivot table.
4
+ */
5
+ declare const _default: import("@medusajs/framework/utils").DefineLinkExport;
6
+ export default _default;
@@ -0,0 +1,24 @@
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 product_1 = __importDefault(require("@medusajs/medusa/product"));
8
+ const product_attribute_1 = __importDefault(require("../modules/product-attribute"));
9
+ /**
10
+ * Read-only link ProductAttribute → ProductOption mirror (1:1).
11
+ * `ProductAttribute.product_option_id` is the FK; no pivot table.
12
+ */
13
+ exports.default = (0, utils_1.defineLink)({
14
+ ...product_attribute_1.default.linkable.productAttribute.id,
15
+ primaryKey: "product_option_id",
16
+ isList: false,
17
+ }, {
18
+ linkable: product_1.default.linkable.productOption.id,
19
+ field: "id",
20
+ isList: false,
21
+ }, {
22
+ readOnly: true,
23
+ });
24
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvZHVjdC1hdHRyaWJ1dGUtb3B0aW9uLW1pcnJvci1saW5rLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2xpbmtzL3Byb2R1Y3QtYXR0cmlidXRlLW9wdGlvbi1taXJyb3ItbGluay50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLHFEQUFzRDtBQUN0RCx1RUFBb0Q7QUFFcEQscUZBQWlFO0FBRWpFOzs7R0FHRztBQUNILGtCQUFlLElBQUEsa0JBQVUsRUFDdkI7SUFDRSxHQUFHLDJCQUFzQixDQUFDLFFBQVEsQ0FBQyxnQkFBZ0IsQ0FBQyxFQUFFO0lBQ3RELFVBQVUsRUFBRSxtQkFBbUI7SUFDL0IsTUFBTSxFQUFFLEtBQUs7Q0FDZCxFQUNEO0lBQ0UsUUFBUSxFQUFFLGlCQUFhLENBQUMsUUFBUSxDQUFDLGFBQWEsQ0FBQyxFQUFFO0lBQ2pELEtBQUssRUFBRSxJQUFJO0lBQ1gsTUFBTSxFQUFFLEtBQUs7Q0FDZCxFQUNEO0lBQ0UsUUFBUSxFQUFFLElBQUk7Q0FDZixDQUNGLENBQUEifQ==
@@ -1,10 +1,5 @@
1
1
  /**
2
2
  * Read-only link Product → ProductAttribute (product-scoped attributes).
3
- * `ProductAttribute.product_id` is the FK; global attributes have it NULL.
4
- * Exposes the scoped attributes under `product.scoped_attributes`.
5
- *
6
- * Same pattern as `product-change-link.ts`: no pivot table — the FK lives
7
- * directly on the child row, and the link is read-only.
8
3
  */
9
4
  declare const _default: import("@medusajs/framework/utils").DefineLinkExport;
10
5
  export default _default;
@@ -8,11 +8,6 @@ const product_1 = __importDefault(require("@medusajs/medusa/product"));
8
8
  const product_attribute_1 = __importDefault(require("../modules/product-attribute"));
9
9
  /**
10
10
  * Read-only link Product → ProductAttribute (product-scoped attributes).
11
- * `ProductAttribute.product_id` is the FK; global attributes have it NULL.
12
- * Exposes the scoped attributes under `product.scoped_attributes`.
13
- *
14
- * Same pattern as `product-change-link.ts`: no pivot table — the FK lives
15
- * directly on the child row, and the link is read-only.
16
11
  */
17
12
  exports.default = (0, utils_1.defineLink)({
18
13
  linkable: product_1.default.linkable.product,
@@ -20,10 +15,10 @@ exports.default = (0, utils_1.defineLink)({
20
15
  isList: true,
21
16
  }, {
22
17
  ...product_attribute_1.default.linkable.productAttribute.id,
23
- alias: "scoped_attributes",
18
+ alias: 'scoped_attributes',
24
19
  primaryKey: "product_id",
25
20
  isList: true,
26
21
  }, {
27
22
  readOnly: true,
28
23
  });
29
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvZHVjdC1hdHRyaWJ1dGUtcHJvZHVjdC1saW5rLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2xpbmtzL3Byb2R1Y3QtYXR0cmlidXRlLXByb2R1Y3QtbGluay50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLHFEQUFzRDtBQUN0RCx1RUFBb0Q7QUFFcEQscUZBQWlFO0FBRWpFOzs7Ozs7O0dBT0c7QUFDSCxrQkFBZSxJQUFBLGtCQUFVLEVBQ3ZCO0lBQ0UsUUFBUSxFQUFFLGlCQUFhLENBQUMsUUFBUSxDQUFDLE9BQU87SUFDeEMsS0FBSyxFQUFFLElBQUk7SUFDWCxNQUFNLEVBQUUsSUFBSTtDQUNiLEVBQ0Q7SUFDRSxHQUFHLDJCQUFzQixDQUFDLFFBQVEsQ0FBQyxnQkFBZ0IsQ0FBQyxFQUFFO0lBQ3RELEtBQUssRUFBRSxtQkFBbUI7SUFDMUIsVUFBVSxFQUFFLFlBQVk7SUFDeEIsTUFBTSxFQUFFLElBQUk7Q0FDYixFQUNEO0lBQ0UsUUFBUSxFQUFFLElBQUk7Q0FDZixDQUNGLENBQUEifQ==
24
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvZHVjdC1hdHRyaWJ1dGUtcHJvZHVjdC1saW5rLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2xpbmtzL3Byb2R1Y3QtYXR0cmlidXRlLXByb2R1Y3QtbGluay50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLHFEQUFzRDtBQUN0RCx1RUFBb0Q7QUFFcEQscUZBQWlFO0FBRWpFOztHQUVHO0FBQ0gsa0JBQWUsSUFBQSxrQkFBVSxFQUN2QjtJQUNFLFFBQVEsRUFBRSxpQkFBYSxDQUFDLFFBQVEsQ0FBQyxPQUFPO0lBQ3hDLEtBQUssRUFBRSxJQUFJO0lBQ1gsTUFBTSxFQUFFLElBQUk7Q0FDYixFQUNEO0lBQ0UsR0FBRywyQkFBc0IsQ0FBQyxRQUFRLENBQUMsZ0JBQWdCLENBQUMsRUFBRTtJQUN0RCxLQUFLLEVBQUUsbUJBQW1CO0lBQzFCLFVBQVUsRUFBRSxZQUFZO0lBQ3hCLE1BQU0sRUFBRSxJQUFJO0NBQ2IsRUFDRDtJQUNFLFFBQVEsRUFBRSxJQUFJO0NBQ2YsQ0FDRixDQUFBIn0=
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Read-only link ProductAttributeValue → ProductOptionValue mirror (1:1).
3
+ * `ProductAttributeValue.product_option_value_id` is the FK; no pivot table.
4
+ */
5
+ declare const _default: import("@medusajs/framework/utils").DefineLinkExport;
6
+ export default _default;
@@ -0,0 +1,24 @@
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 product_1 = __importDefault(require("@medusajs/medusa/product"));
8
+ const product_attribute_1 = __importDefault(require("../modules/product-attribute"));
9
+ /**
10
+ * Read-only link ProductAttributeValue → ProductOptionValue mirror (1:1).
11
+ * `ProductAttributeValue.product_option_value_id` is the FK; no pivot table.
12
+ */
13
+ exports.default = (0, utils_1.defineLink)({
14
+ ...product_attribute_1.default.linkable.productAttributeValue.id,
15
+ primaryKey: "product_option_value_id",
16
+ isList: false,
17
+ }, {
18
+ linkable: product_1.default.linkable.productOptionValue.id,
19
+ field: "id",
20
+ isList: false,
21
+ }, {
22
+ readOnly: true,
23
+ });
24
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvZHVjdC1hdHRyaWJ1dGUtdmFsdWUtb3B0aW9uLXZhbHVlLW1pcnJvci1saW5rLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2xpbmtzL3Byb2R1Y3QtYXR0cmlidXRlLXZhbHVlLW9wdGlvbi12YWx1ZS1taXJyb3ItbGluay50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLHFEQUFzRDtBQUN0RCx1RUFBb0Q7QUFFcEQscUZBQWlFO0FBRWpFOzs7R0FHRztBQUNILGtCQUFlLElBQUEsa0JBQVUsRUFDdkI7SUFDRSxHQUFHLDJCQUFzQixDQUFDLFFBQVEsQ0FBQyxxQkFBcUIsQ0FBQyxFQUFFO0lBQzNELFVBQVUsRUFBRSx5QkFBeUI7SUFDckMsTUFBTSxFQUFFLEtBQUs7Q0FDZCxFQUNEO0lBQ0UsUUFBUSxFQUFFLGlCQUFhLENBQUMsUUFBUSxDQUFDLGtCQUFrQixDQUFDLEVBQUU7SUFDdEQsS0FBSyxFQUFFLElBQUk7SUFDWCxNQUFNLEVBQUUsS0FBSztDQUNkLEVBQ0Q7SUFDRSxRQUFRLEVBQUUsSUFBSTtDQUNmLENBQ0YsQ0FBQSJ9
@@ -1,2 +1,5 @@
1
+ /**
2
+ * Product ↔ ProductAttributeValue pivot link.
3
+ */
1
4
  declare const _default: import("@medusajs/framework/utils").DefineLinkExport;
2
5
  export default _default;
@@ -0,0 +1,23 @@
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 product_1 = __importDefault(require("@medusajs/medusa/product"));
8
+ const product_attribute_1 = __importDefault(require("../modules/product-attribute"));
9
+ /**
10
+ * Product ↔ ProductAttributeValue pivot link.
11
+ */
12
+ exports.default = (0, utils_1.defineLink)({
13
+ linkable: product_1.default.linkable.product.id,
14
+ isList: true,
15
+ }, {
16
+ linkable: product_attribute_1.default.linkable.productAttributeValue.id,
17
+ isList: true,
18
+ }, {
19
+ database: {
20
+ table: "product_attribute_value_link",
21
+ },
22
+ });
23
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvZHVjdC1hdHRyaWJ1dGUtdmFsdWUtcGl2b3QtbGluay5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9saW5rcy9wcm9kdWN0LWF0dHJpYnV0ZS12YWx1ZS1waXZvdC1saW5rLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEscURBQXNEO0FBQ3RELHVFQUFvRDtBQUVwRCxxRkFBaUU7QUFFakU7O0dBRUc7QUFDSCxrQkFBZSxJQUFBLGtCQUFVLEVBQ3ZCO0lBQ0UsUUFBUSxFQUFFLGlCQUFhLENBQUMsUUFBUSxDQUFDLE9BQU8sQ0FBQyxFQUFFO0lBQzNDLE1BQU0sRUFBRSxJQUFJO0NBQ2IsRUFDRDtJQUNFLFFBQVEsRUFBRSwyQkFBc0IsQ0FBQyxRQUFRLENBQUMscUJBQXFCLENBQUMsRUFBRTtJQUNsRSxNQUFNLEVBQUUsSUFBSTtDQUNiLEVBQ0Q7SUFDRSxRQUFRLEVBQUU7UUFDUixLQUFLLEVBQUUsOEJBQThCO0tBQ3RDO0NBQ0YsQ0FDRixDQUFBIn0=
@@ -0,0 +1,15 @@
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 customer_1 = __importDefault(require("@medusajs/medusa/customer"));
8
+ const seller_1 = __importDefault(require("../modules/seller"));
9
+ // A customer group is owned by exactly one seller, while a seller can own many
10
+ // customer groups. `isList` on the customer group side makes the seller side a
11
+ // list (seller.customer_groups), and the seller side without `isList` resolves
12
+ // to a single owner on the group (customer_group.seller). The generated link
13
+ // entity/table is `customer_group_seller`.
14
+ exports.default = (0, utils_1.defineLink)({ linkable: customer_1.default.linkable.customerGroup, isList: true }, { linkable: seller_1.default.linkable.seller });
15
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VsbGVyLWN1c3RvbWVyLWdyb3VwLWxpbmsuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvbGlua3Mvc2VsbGVyLWN1c3RvbWVyLWdyb3VwLWxpbmsudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxxREFBc0Q7QUFDdEQseUVBQXNEO0FBQ3RELCtEQUE0QztBQUU1QywrRUFBK0U7QUFDL0UsK0VBQStFO0FBQy9FLCtFQUErRTtBQUMvRSw2RUFBNkU7QUFDN0UsMkNBQTJDO0FBQzNDLGtCQUFlLElBQUEsa0JBQVUsRUFDdkIsRUFBRSxRQUFRLEVBQUUsa0JBQWMsQ0FBQyxRQUFRLENBQUMsYUFBYSxFQUFFLE1BQU0sRUFBRSxJQUFJLEVBQUUsRUFDakUsRUFBRSxRQUFRLEVBQUUsZ0JBQVksQ0FBQyxRQUFRLENBQUMsTUFBTSxFQUFFLENBQzNDLENBQUEifQ==
@@ -6,6 +6,11 @@ const INDEXES_TO_DROP = [
6
6
  "IDX_fulfillment_set_name_unique",
7
7
  "IDX_shipping_profile_name_unique",
8
8
  "IDX_service_zone_name_unique",
9
+ // Customer groups are seller-scoped in Mercur, so two sellers may each have a
10
+ // group with the same name. Drop the global unique index on customer_group.name
11
+ // (both historical names Medusa has used across versions).
12
+ "IDX_customer_group_name",
13
+ "IDX_customer_group_name_unique",
9
14
  ];
10
15
  async function dropFulfillmentGlobalUniqueIndexes({ container, }) {
11
16
  const knex = container.resolve(utils_1.ContainerRegistrationKeys.PG_CONNECTION);
@@ -15,4 +20,4 @@ async function dropFulfillmentGlobalUniqueIndexes({ container, }) {
15
20
  }
16
21
  });
17
22
  }
18
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZHJvcC1mdWxmaWxsbWVudC1nbG9iYWwtdW5pcXVlLWluZGV4ZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvbWlncmF0aW9uLXNjcmlwdHMvZHJvcC1mdWxmaWxsbWVudC1nbG9iYWwtdW5pcXVlLWluZGV4ZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFTQSxxREFVQztBQWxCRCxxREFBcUU7QUFFckUsTUFBTSxlQUFlLEdBQUc7SUFDdEIsaUNBQWlDO0lBQ2pDLGtDQUFrQztJQUNsQyw4QkFBOEI7Q0FDdEIsQ0FBQTtBQUVLLEtBQUssVUFBVSxrQ0FBa0MsQ0FBQyxFQUMvRCxTQUFTLEdBQ0E7SUFDVCxNQUFNLElBQUksR0FBRyxTQUFTLENBQUMsT0FBTyxDQUFDLGlDQUF5QixDQUFDLGFBQWEsQ0FBQyxDQUFBO0lBRXZFLE1BQU0sSUFBSSxDQUFDLFdBQVcsQ0FBQyxLQUFLLEVBQUUsR0FBUSxFQUFFLEVBQUU7UUFDeEMsS0FBSyxNQUFNLFNBQVMsSUFBSSxlQUFlLEVBQUUsQ0FBQztZQUN4QyxNQUFNLEdBQUcsQ0FBQyxHQUFHLENBQUMseUJBQXlCLFNBQVMsR0FBRyxDQUFDLENBQUE7UUFDdEQsQ0FBQztJQUNILENBQUMsQ0FBQyxDQUFBO0FBQ0osQ0FBQyJ9
23
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZHJvcC1mdWxmaWxsbWVudC1nbG9iYWwtdW5pcXVlLWluZGV4ZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvbWlncmF0aW9uLXNjcmlwdHMvZHJvcC1mdWxmaWxsbWVudC1nbG9iYWwtdW5pcXVlLWluZGV4ZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFjQSxxREFVQztBQXZCRCxxREFBcUU7QUFFckUsTUFBTSxlQUFlLEdBQUc7SUFDdEIsaUNBQWlDO0lBQ2pDLGtDQUFrQztJQUNsQyw4QkFBOEI7SUFDOUIsOEVBQThFO0lBQzlFLGdGQUFnRjtJQUNoRiwyREFBMkQ7SUFDM0QseUJBQXlCO0lBQ3pCLGdDQUFnQztDQUN4QixDQUFBO0FBRUssS0FBSyxVQUFVLGtDQUFrQyxDQUFDLEVBQy9ELFNBQVMsR0FDQTtJQUNULE1BQU0sSUFBSSxHQUFHLFNBQVMsQ0FBQyxPQUFPLENBQUMsaUNBQXlCLENBQUMsYUFBYSxDQUFDLENBQUE7SUFFdkUsTUFBTSxJQUFJLENBQUMsV0FBVyxDQUFDLEtBQUssRUFBRSxHQUFRLEVBQUUsRUFBRTtRQUN4QyxLQUFLLE1BQU0sU0FBUyxJQUFJLGVBQWUsRUFBRSxDQUFDO1lBQ3hDLE1BQU0sR0FBRyxDQUFDLEdBQUcsQ0FBQyx5QkFBeUIsU0FBUyxHQUFHLENBQUMsQ0FBQTtRQUN0RCxDQUFDO0lBQ0gsQ0FBQyxDQUFDLENBQUE7QUFDSixDQUFDIn0=
@@ -0,0 +1,2 @@
1
+ import { ExecArgs } from "@medusajs/framework/types";
2
+ export default function renameDefaultStore({ container }: ExecArgs): Promise<void>;