@medusajs/types 1.12.0-snapshot-20240531102054 → 1.12.0-snapshot-20240701122250

Sign up to get free protection for your applications and to get access to all the features.
Files changed (764) hide show
  1. package/dist/api-key/service.d.ts +24 -24
  2. package/dist/api-key/service.d.ts.map +1 -1
  3. package/dist/auth/common/auth-identity.d.ts +77 -21
  4. package/dist/auth/common/auth-identity.d.ts.map +1 -1
  5. package/dist/auth/common/provider.d.ts +2 -1
  6. package/dist/auth/common/provider.d.ts.map +1 -1
  7. package/dist/auth/provider.d.ts +6 -3
  8. package/dist/auth/provider.d.ts.map +1 -1
  9. package/dist/auth/service.d.ts +30 -30
  10. package/dist/auth/service.d.ts.map +1 -1
  11. package/dist/bundles.d.ts +2 -1
  12. package/dist/bundles.d.ts.map +1 -1
  13. package/dist/bundles.js +3 -2
  14. package/dist/bundles.js.map +1 -1
  15. package/dist/cart/mutations.d.ts +8 -0
  16. package/dist/cart/mutations.d.ts.map +1 -1
  17. package/dist/cart/mutations.js.map +1 -1
  18. package/dist/cart/service.d.ts +30 -52
  19. package/dist/cart/service.d.ts.map +1 -1
  20. package/dist/common/batch.d.ts +3 -3
  21. package/dist/common/batch.d.ts.map +1 -1
  22. package/dist/common/common.d.ts +6 -1
  23. package/dist/common/common.d.ts.map +1 -1
  24. package/dist/currency/service.d.ts +9 -9
  25. package/dist/currency/service.d.ts.map +1 -1
  26. package/dist/customer/mutations.d.ts +27 -26
  27. package/dist/customer/mutations.d.ts.map +1 -1
  28. package/dist/customer/service.d.ts +40 -43
  29. package/dist/customer/service.d.ts.map +1 -1
  30. package/dist/dal/repository-service.d.ts +15 -3
  31. package/dist/dal/repository-service.d.ts.map +1 -1
  32. package/dist/dml/index.d.ts +161 -0
  33. package/dist/dml/index.d.ts.map +1 -0
  34. package/dist/dml/index.js +5 -0
  35. package/dist/dml/index.js.map +1 -0
  36. package/dist/event-bus/common.d.ts +17 -25
  37. package/dist/event-bus/common.d.ts.map +1 -1
  38. package/dist/event-bus/event-bus-module.d.ts +4 -4
  39. package/dist/event-bus/event-bus-module.d.ts.map +1 -1
  40. package/dist/event-bus/event-bus.d.ts +2 -4
  41. package/dist/event-bus/event-bus.d.ts.map +1 -1
  42. package/dist/file/provider.d.ts +1 -8
  43. package/dist/file/provider.d.ts.map +1 -1
  44. package/dist/file/service.d.ts +12 -12
  45. package/dist/file/service.d.ts.map +1 -1
  46. package/dist/fulfillment/mutations/fulfillment.d.ts +3 -1
  47. package/dist/fulfillment/mutations/fulfillment.d.ts.map +1 -1
  48. package/dist/fulfillment/mutations/service-zone.d.ts +3 -3
  49. package/dist/fulfillment/mutations/service-zone.d.ts.map +1 -1
  50. package/dist/fulfillment/mutations/shipping-option.d.ts +0 -22
  51. package/dist/fulfillment/mutations/shipping-option.d.ts.map +1 -1
  52. package/dist/fulfillment/mutations/shipping-profile.d.ts +20 -2
  53. package/dist/fulfillment/mutations/shipping-profile.d.ts.map +1 -1
  54. package/dist/fulfillment/service.d.ts +71 -32
  55. package/dist/fulfillment/service.d.ts.map +1 -1
  56. package/dist/http/currency/admin/entities.d.ts +14 -0
  57. package/dist/http/currency/admin/entities.d.ts.map +1 -0
  58. package/dist/http/{fulfillment/admin/geo-zone.js → currency/admin/entities.js} +1 -1
  59. package/dist/http/currency/admin/entities.js.map +1 -0
  60. package/dist/http/currency/admin/index.d.ts +2 -0
  61. package/dist/http/currency/admin/index.d.ts.map +1 -0
  62. package/dist/http/{tax → currency}/admin/index.js +1 -2
  63. package/dist/http/currency/admin/index.js.map +1 -0
  64. package/dist/http/currency/index.d.ts.map +1 -0
  65. package/dist/http/currency/index.js.map +1 -0
  66. package/dist/http/file/admin.d.ts +5 -0
  67. package/dist/http/file/admin.d.ts.map +1 -0
  68. package/dist/http/{product → file}/admin.js.map +1 -1
  69. package/dist/http/file/common.d.ts +11 -0
  70. package/dist/http/file/common.d.ts.map +1 -0
  71. package/dist/{inventory → http/file}/common.js.map +1 -1
  72. package/dist/http/file/index.d.ts +3 -0
  73. package/dist/http/file/index.d.ts.map +1 -0
  74. package/dist/{inventory/bundle.js → http/file/index.js} +3 -3
  75. package/dist/http/file/index.js.map +1 -0
  76. package/dist/http/file/store.d.ts +4 -0
  77. package/dist/http/file/store.d.ts.map +1 -0
  78. package/dist/http/{product → file}/store.js.map +1 -1
  79. package/dist/http/fulfillment/admin/entitites.d.ts +62 -0
  80. package/dist/http/fulfillment/admin/entitites.d.ts.map +1 -0
  81. package/dist/http/fulfillment/admin/entitites.js +3 -0
  82. package/dist/http/fulfillment/admin/entitites.js.map +1 -0
  83. package/dist/http/fulfillment/admin/index.d.ts +3 -12
  84. package/dist/http/fulfillment/admin/index.d.ts.map +1 -1
  85. package/dist/http/fulfillment/admin/index.js +3 -12
  86. package/dist/http/fulfillment/admin/index.js.map +1 -1
  87. package/dist/http/fulfillment/admin/payloads.d.ts +41 -0
  88. package/dist/http/fulfillment/admin/payloads.d.ts.map +1 -0
  89. package/dist/http/fulfillment/admin/payloads.js +3 -0
  90. package/dist/http/fulfillment/admin/payloads.js.map +1 -0
  91. package/dist/http/fulfillment/admin/responses.d.ts +5 -0
  92. package/dist/http/fulfillment/admin/responses.d.ts.map +1 -0
  93. package/dist/http/fulfillment/admin/responses.js +3 -0
  94. package/dist/http/fulfillment/admin/responses.js.map +1 -0
  95. package/dist/http/fulfillment-provider/admin/entities.d.ts +5 -0
  96. package/dist/http/fulfillment-provider/admin/entities.d.ts.map +1 -0
  97. package/dist/http/fulfillment-provider/admin/entities.js +3 -0
  98. package/dist/http/fulfillment-provider/admin/entities.js.map +1 -0
  99. package/dist/http/fulfillment-provider/admin/index.d.ts +4 -0
  100. package/dist/http/fulfillment-provider/admin/index.d.ts.map +1 -0
  101. package/dist/http/fulfillment-provider/admin/index.js +20 -0
  102. package/dist/http/fulfillment-provider/admin/index.js.map +1 -0
  103. package/dist/http/fulfillment-provider/admin/queries.d.ts +7 -0
  104. package/dist/http/fulfillment-provider/admin/queries.d.ts.map +1 -0
  105. package/dist/http/{pricing/price.js → fulfillment-provider/admin/queries.js} +1 -1
  106. package/dist/http/fulfillment-provider/admin/queries.js.map +1 -0
  107. package/dist/http/fulfillment-provider/admin/responses.d.ts +7 -0
  108. package/dist/http/fulfillment-provider/admin/responses.d.ts.map +1 -0
  109. package/dist/http/{inventory/inventory.js → fulfillment-provider/admin/responses.js} +1 -1
  110. package/dist/http/fulfillment-provider/admin/responses.js.map +1 -0
  111. package/dist/http/fulfillment-provider/index.d.ts +2 -0
  112. package/dist/http/fulfillment-provider/index.d.ts.map +1 -0
  113. package/dist/{region__legacy → http/fulfillment-provider}/index.js +1 -1
  114. package/dist/http/fulfillment-provider/index.js.map +1 -0
  115. package/dist/http/fulfillment-set/admin/entities.d.ts +33 -0
  116. package/dist/http/fulfillment-set/admin/entities.d.ts.map +1 -0
  117. package/dist/http/fulfillment-set/admin/entities.js +3 -0
  118. package/dist/http/fulfillment-set/admin/entities.js.map +1 -0
  119. package/dist/http/fulfillment-set/admin/index.d.ts +4 -0
  120. package/dist/http/fulfillment-set/admin/index.d.ts.map +1 -0
  121. package/dist/http/fulfillment-set/admin/index.js +20 -0
  122. package/dist/http/fulfillment-set/admin/index.js.map +1 -0
  123. package/dist/http/fulfillment-set/admin/payloads.d.ts +56 -0
  124. package/dist/http/fulfillment-set/admin/payloads.d.ts.map +1 -0
  125. package/dist/http/fulfillment-set/admin/payloads.js +3 -0
  126. package/dist/http/fulfillment-set/admin/payloads.js.map +1 -0
  127. package/dist/http/fulfillment-set/admin/queries.d.ts +12 -0
  128. package/dist/http/fulfillment-set/admin/queries.d.ts.map +1 -0
  129. package/dist/http/{product/admin.js → fulfillment-set/admin/queries.js} +1 -1
  130. package/dist/http/fulfillment-set/admin/queries.js.map +1 -0
  131. package/dist/http/fulfillment-set/admin/responses.d.ts +13 -0
  132. package/dist/http/fulfillment-set/admin/responses.d.ts.map +1 -0
  133. package/dist/http/fulfillment-set/admin/responses.js +3 -0
  134. package/dist/http/fulfillment-set/admin/responses.js.map +1 -0
  135. package/dist/http/fulfillment-set/index.d.ts +2 -0
  136. package/dist/http/fulfillment-set/index.d.ts.map +1 -0
  137. package/dist/http/fulfillment-set/index.js +18 -0
  138. package/dist/http/fulfillment-set/index.js.map +1 -0
  139. package/dist/http/index.d.ts +12 -1
  140. package/dist/http/index.d.ts.map +1 -1
  141. package/dist/http/index.js +12 -1
  142. package/dist/http/index.js.map +1 -1
  143. package/dist/http/inventory/{inventory.d.ts → admin/entities.d.ts} +2 -10
  144. package/dist/http/inventory/admin/entities.d.ts.map +1 -0
  145. package/dist/http/inventory/admin/entities.js +3 -0
  146. package/dist/http/inventory/admin/entities.js.map +1 -0
  147. package/dist/http/inventory/admin/index.d.ts +5 -0
  148. package/dist/http/inventory/admin/index.d.ts.map +1 -0
  149. package/dist/http/inventory/admin/index.js +21 -0
  150. package/dist/http/inventory/admin/index.js.map +1 -0
  151. package/dist/http/inventory/admin/payloads.d.ts +19 -0
  152. package/dist/http/inventory/admin/payloads.d.ts.map +1 -0
  153. package/dist/http/inventory/admin/payloads.js +3 -0
  154. package/dist/http/inventory/admin/payloads.js.map +1 -0
  155. package/dist/http/inventory/admin/queries.d.ts +18 -0
  156. package/dist/http/inventory/admin/queries.d.ts.map +1 -0
  157. package/dist/http/inventory/admin/queries.js +3 -0
  158. package/dist/http/inventory/admin/queries.js.map +1 -0
  159. package/dist/http/inventory/admin/responses.d.ts +10 -0
  160. package/dist/http/inventory/admin/responses.d.ts.map +1 -0
  161. package/dist/http/inventory/admin/responses.js +3 -0
  162. package/dist/http/inventory/admin/responses.js.map +1 -0
  163. package/dist/http/inventory/index.d.ts +1 -2
  164. package/dist/http/inventory/index.d.ts.map +1 -1
  165. package/dist/http/inventory/index.js +1 -2
  166. package/dist/http/inventory/index.js.map +1 -1
  167. package/dist/http/inventory-level/admin/entities.d.ts +11 -0
  168. package/dist/http/inventory-level/admin/entities.d.ts.map +1 -0
  169. package/dist/http/inventory-level/admin/entities.js +3 -0
  170. package/dist/http/inventory-level/admin/entities.js.map +1 -0
  171. package/dist/http/inventory-level/admin/index.d.ts +5 -0
  172. package/dist/http/inventory-level/admin/index.d.ts.map +1 -0
  173. package/dist/http/inventory-level/admin/index.js +21 -0
  174. package/dist/http/inventory-level/admin/index.js.map +1 -0
  175. package/dist/http/inventory-level/admin/payloads.d.ts +15 -0
  176. package/dist/http/inventory-level/admin/payloads.d.ts.map +1 -0
  177. package/dist/http/inventory-level/admin/payloads.js +3 -0
  178. package/dist/http/inventory-level/admin/payloads.js.map +1 -0
  179. package/dist/http/inventory-level/admin/queries.d.ts +5 -0
  180. package/dist/http/inventory-level/admin/queries.d.ts.map +1 -0
  181. package/dist/http/inventory-level/admin/queries.js +3 -0
  182. package/dist/http/inventory-level/admin/queries.js.map +1 -0
  183. package/dist/http/inventory-level/admin/responses.d.ts +9 -0
  184. package/dist/http/inventory-level/admin/responses.d.ts.map +1 -0
  185. package/dist/http/inventory-level/admin/responses.js +3 -0
  186. package/dist/http/inventory-level/admin/responses.js.map +1 -0
  187. package/dist/http/inventory-level/index.d.ts +2 -0
  188. package/dist/http/inventory-level/index.d.ts.map +1 -0
  189. package/dist/http/inventory-level/index.js +18 -0
  190. package/dist/http/inventory-level/index.js.map +1 -0
  191. package/dist/http/order/admin.d.ts +15 -1
  192. package/dist/http/order/admin.d.ts.map +1 -1
  193. package/dist/http/order/common.d.ts +2 -0
  194. package/dist/http/order/common.d.ts.map +1 -1
  195. package/dist/http/price-list/admin/entities.d.ts +21 -0
  196. package/dist/http/price-list/admin/entities.d.ts.map +1 -0
  197. package/dist/http/price-list/admin/entities.js +3 -0
  198. package/dist/http/price-list/admin/entities.js.map +1 -0
  199. package/dist/http/price-list/admin/index.d.ts +5 -0
  200. package/dist/http/price-list/admin/index.d.ts.map +1 -0
  201. package/dist/http/price-list/admin/index.js +21 -0
  202. package/dist/http/price-list/admin/index.js.map +1 -0
  203. package/dist/http/price-list/admin/payloads.d.ts +46 -0
  204. package/dist/http/price-list/admin/payloads.d.ts.map +1 -0
  205. package/dist/http/price-list/admin/payloads.js +3 -0
  206. package/dist/http/price-list/admin/payloads.js.map +1 -0
  207. package/dist/http/price-list/admin/queries.d.ts +14 -0
  208. package/dist/http/price-list/admin/queries.d.ts.map +1 -0
  209. package/dist/http/price-list/admin/queries.js +3 -0
  210. package/dist/http/price-list/admin/queries.js.map +1 -0
  211. package/dist/http/price-list/admin/responses.d.ts +12 -0
  212. package/dist/http/price-list/admin/responses.d.ts.map +1 -0
  213. package/dist/http/price-list/admin/responses.js +3 -0
  214. package/dist/http/price-list/admin/responses.js.map +1 -0
  215. package/dist/http/price-list/index.d.ts +2 -0
  216. package/dist/http/price-list/index.d.ts.map +1 -0
  217. package/dist/http/price-list/index.js +18 -0
  218. package/dist/http/price-list/index.js.map +1 -0
  219. package/dist/http/pricing/admin/entities.d.ts +32 -0
  220. package/dist/http/pricing/admin/entities.d.ts.map +1 -0
  221. package/dist/http/pricing/admin/entities.js +3 -0
  222. package/dist/http/pricing/admin/entities.js.map +1 -0
  223. package/dist/http/pricing/admin/index.d.ts +2 -0
  224. package/dist/http/pricing/admin/index.d.ts.map +1 -0
  225. package/dist/http/pricing/admin/index.js +18 -0
  226. package/dist/http/pricing/admin/index.js.map +1 -0
  227. package/dist/http/pricing/index.d.ts +1 -1
  228. package/dist/http/pricing/index.js +1 -1
  229. package/dist/http/product/admin/entitites.d.ts +26 -0
  230. package/dist/http/product/admin/entitites.d.ts.map +1 -0
  231. package/dist/http/product/admin/entitites.js +3 -0
  232. package/dist/http/product/admin/entitites.js.map +1 -0
  233. package/dist/http/product/admin/index.d.ts +5 -0
  234. package/dist/http/product/admin/index.d.ts.map +1 -0
  235. package/dist/http/product/admin/index.js +21 -0
  236. package/dist/http/product/admin/index.js.map +1 -0
  237. package/dist/http/product/admin/payloads.d.ts +152 -0
  238. package/dist/http/product/admin/payloads.d.ts.map +1 -0
  239. package/dist/http/product/admin/payloads.js +3 -0
  240. package/dist/http/product/admin/payloads.js.map +1 -0
  241. package/dist/http/product/admin/queries.d.ts +12 -0
  242. package/dist/http/product/admin/queries.d.ts.map +1 -0
  243. package/dist/http/product/admin/queries.js +3 -0
  244. package/dist/http/product/admin/queries.js.map +1 -0
  245. package/dist/http/product/admin/responses.d.ts +35 -0
  246. package/dist/http/product/admin/responses.d.ts.map +1 -0
  247. package/dist/http/product/admin/responses.js +3 -0
  248. package/dist/http/product/admin/responses.js.map +1 -0
  249. package/dist/http/product/common.d.ts +72 -106
  250. package/dist/http/product/common.d.ts.map +1 -1
  251. package/dist/http/product/store/entitites.d.ts +19 -0
  252. package/dist/http/product/store/entitites.d.ts.map +1 -0
  253. package/dist/http/product/store/entitites.js +3 -0
  254. package/dist/http/product/store/entitites.js.map +1 -0
  255. package/dist/http/product/store/index.d.ts +4 -0
  256. package/dist/http/product/store/index.d.ts.map +1 -0
  257. package/dist/http/product/store/index.js +20 -0
  258. package/dist/http/product/store/index.js.map +1 -0
  259. package/dist/http/product/store/queries.d.ts +13 -0
  260. package/dist/http/product/store/queries.d.ts.map +1 -0
  261. package/dist/http/product/store/queries.js +3 -0
  262. package/dist/http/product/store/queries.js.map +1 -0
  263. package/dist/http/product/store/responses.d.ts +9 -0
  264. package/dist/http/product/store/responses.d.ts.map +1 -0
  265. package/dist/http/product/store/responses.js +3 -0
  266. package/dist/http/product/store/responses.js.map +1 -0
  267. package/dist/http/product-category/admin/entities.d.ts +8 -0
  268. package/dist/http/product-category/admin/entities.d.ts.map +1 -0
  269. package/dist/http/product-category/admin/entities.js +3 -0
  270. package/dist/http/product-category/admin/entities.js.map +1 -0
  271. package/dist/http/product-category/admin/index.d.ts +5 -0
  272. package/dist/http/product-category/admin/index.d.ts.map +1 -0
  273. package/dist/http/product-category/admin/index.js +21 -0
  274. package/dist/http/product-category/admin/index.js.map +1 -0
  275. package/dist/http/product-category/admin/payloads.d.ts +25 -0
  276. package/dist/http/product-category/admin/payloads.d.ts.map +1 -0
  277. package/dist/http/product-category/admin/payloads.js +3 -0
  278. package/dist/http/product-category/admin/payloads.js.map +1 -0
  279. package/dist/http/product-category/admin/queries.d.ts +8 -0
  280. package/dist/http/product-category/admin/queries.d.ts.map +1 -0
  281. package/dist/http/product-category/admin/queries.js +3 -0
  282. package/dist/http/product-category/admin/queries.js.map +1 -0
  283. package/dist/http/product-category/admin/responses.d.ts +12 -0
  284. package/dist/http/product-category/admin/responses.d.ts.map +1 -0
  285. package/dist/http/product-category/admin/responses.js +3 -0
  286. package/dist/http/product-category/admin/responses.js.map +1 -0
  287. package/dist/http/product-category/common.d.ts +31 -7
  288. package/dist/http/product-category/common.d.ts.map +1 -1
  289. package/dist/http/product-category/store/entities.d.ts +6 -0
  290. package/dist/http/product-category/store/entities.d.ts.map +1 -0
  291. package/dist/http/product-category/store/entities.js +3 -0
  292. package/dist/http/product-category/store/entities.js.map +1 -0
  293. package/dist/http/product-category/store/index.d.ts +4 -0
  294. package/dist/http/product-category/store/index.d.ts.map +1 -0
  295. package/dist/http/product-category/store/index.js +20 -0
  296. package/dist/http/product-category/store/index.js.map +1 -0
  297. package/dist/http/product-category/store/queries.d.ts +6 -0
  298. package/dist/http/product-category/store/queries.d.ts.map +1 -0
  299. package/dist/http/product-category/store/queries.js +3 -0
  300. package/dist/http/product-category/store/queries.js.map +1 -0
  301. package/dist/http/product-category/store/responses.d.ts +10 -0
  302. package/dist/http/product-category/store/responses.d.ts.map +1 -0
  303. package/dist/http/product-category/store/responses.js +3 -0
  304. package/dist/http/product-category/store/responses.js.map +1 -0
  305. package/dist/http/product-type/admin/entities.d.ts +4 -0
  306. package/dist/http/product-type/admin/entities.d.ts.map +1 -0
  307. package/dist/http/product-type/admin/entities.js +3 -0
  308. package/dist/http/product-type/admin/entities.js.map +1 -0
  309. package/dist/http/product-type/admin/index.d.ts +5 -0
  310. package/dist/http/product-type/admin/index.d.ts.map +1 -0
  311. package/dist/http/product-type/admin/index.js +21 -0
  312. package/dist/http/product-type/admin/index.js.map +1 -0
  313. package/dist/http/product-type/admin/payloads.d.ts +9 -0
  314. package/dist/http/product-type/admin/payloads.d.ts.map +1 -0
  315. package/dist/http/product-type/admin/payloads.js +3 -0
  316. package/dist/http/product-type/admin/payloads.js.map +1 -0
  317. package/dist/http/product-type/admin/queries.d.ts +13 -0
  318. package/dist/http/product-type/admin/queries.d.ts.map +1 -0
  319. package/dist/http/product-type/admin/queries.js +3 -0
  320. package/dist/http/product-type/admin/queries.js.map +1 -0
  321. package/dist/http/product-type/admin/responses.d.ts +12 -0
  322. package/dist/http/product-type/admin/responses.d.ts.map +1 -0
  323. package/dist/http/product-type/admin/responses.js +3 -0
  324. package/dist/http/product-type/admin/responses.js.map +1 -0
  325. package/dist/http/product-type/common.d.ts +9 -0
  326. package/dist/http/product-type/common.d.ts.map +1 -0
  327. package/dist/{region__legacy → http/product-type}/common.js.map +1 -1
  328. package/dist/http/product-type/index.d.ts +3 -0
  329. package/dist/http/product-type/index.d.ts.map +1 -0
  330. package/dist/http/product-type/index.js +19 -0
  331. package/dist/http/product-type/index.js.map +1 -0
  332. package/dist/http/product-type/store/entities.d.ts +4 -0
  333. package/dist/http/product-type/store/entities.d.ts.map +1 -0
  334. package/dist/http/product-type/store/entities.js +3 -0
  335. package/dist/http/product-type/store/entities.js.map +1 -0
  336. package/dist/http/product-type/store/index.d.ts +2 -0
  337. package/dist/http/product-type/store/index.d.ts.map +1 -0
  338. package/dist/http/product-type/store/index.js +18 -0
  339. package/dist/http/product-type/store/index.js.map +1 -0
  340. package/dist/http/promotion/admin/promotion-rule.d.ts +1 -1
  341. package/dist/http/promotion/admin/promotion-rule.d.ts.map +1 -1
  342. package/dist/http/promotion/admin/rule-attribute-options.d.ts +5 -0
  343. package/dist/http/promotion/admin/rule-attribute-options.d.ts.map +1 -1
  344. package/dist/http/sales-channel/admin/entities.d.ts +11 -0
  345. package/dist/http/sales-channel/admin/entities.d.ts.map +1 -0
  346. package/dist/http/sales-channel/admin/entities.js +3 -0
  347. package/dist/http/sales-channel/admin/entities.js.map +1 -0
  348. package/dist/http/sales-channel/admin/index.d.ts +4 -1
  349. package/dist/http/sales-channel/admin/index.d.ts.map +1 -1
  350. package/dist/http/sales-channel/admin/index.js +4 -1
  351. package/dist/http/sales-channel/admin/index.js.map +1 -1
  352. package/dist/http/sales-channel/admin/payloads.d.ts +17 -0
  353. package/dist/http/sales-channel/admin/payloads.d.ts.map +1 -0
  354. package/dist/http/sales-channel/admin/payloads.js +3 -0
  355. package/dist/http/sales-channel/admin/payloads.js.map +1 -0
  356. package/dist/http/sales-channel/admin/queries.d.ts +15 -0
  357. package/dist/http/sales-channel/admin/queries.d.ts.map +1 -0
  358. package/dist/http/sales-channel/admin/queries.js +3 -0
  359. package/dist/http/sales-channel/admin/queries.js.map +1 -0
  360. package/dist/http/sales-channel/admin/responses.d.ts +11 -0
  361. package/dist/http/sales-channel/admin/responses.d.ts.map +1 -0
  362. package/dist/http/sales-channel/admin/responses.js +3 -0
  363. package/dist/http/sales-channel/admin/responses.js.map +1 -0
  364. package/dist/http/shipping-option/admin/entities.d.ts +54 -0
  365. package/dist/http/shipping-option/admin/entities.d.ts.map +1 -0
  366. package/dist/http/shipping-option/admin/entities.js +3 -0
  367. package/dist/http/shipping-option/admin/entities.js.map +1 -0
  368. package/dist/http/shipping-option/admin/index.d.ts +5 -0
  369. package/dist/http/shipping-option/admin/index.d.ts.map +1 -0
  370. package/dist/http/shipping-option/admin/index.js +21 -0
  371. package/dist/http/shipping-option/admin/index.js.map +1 -0
  372. package/dist/http/shipping-option/admin/payloads.d.ts +60 -0
  373. package/dist/http/shipping-option/admin/payloads.d.ts.map +1 -0
  374. package/dist/http/shipping-option/admin/payloads.js +3 -0
  375. package/dist/http/shipping-option/admin/payloads.js.map +1 -0
  376. package/dist/http/shipping-option/admin/queries.d.ts +14 -0
  377. package/dist/http/shipping-option/admin/queries.d.ts.map +1 -0
  378. package/dist/http/shipping-option/admin/queries.js +3 -0
  379. package/dist/http/shipping-option/admin/queries.js.map +1 -0
  380. package/dist/http/shipping-option/admin/responses.d.ts +20 -0
  381. package/dist/http/shipping-option/admin/responses.d.ts.map +1 -0
  382. package/dist/http/shipping-option/admin/responses.js +3 -0
  383. package/dist/http/shipping-option/admin/responses.js.map +1 -0
  384. package/dist/http/shipping-option/index.d.ts +2 -0
  385. package/dist/http/shipping-option/index.d.ts.map +1 -0
  386. package/dist/http/shipping-option/index.js +18 -0
  387. package/dist/http/shipping-option/index.js.map +1 -0
  388. package/dist/http/shipping-profile/admin/entities.d.ts +10 -0
  389. package/dist/http/shipping-profile/admin/entities.d.ts.map +1 -0
  390. package/dist/http/shipping-profile/admin/entities.js +3 -0
  391. package/dist/http/shipping-profile/admin/entities.js.map +1 -0
  392. package/dist/http/shipping-profile/admin/index.d.ts +5 -0
  393. package/dist/http/shipping-profile/admin/index.d.ts.map +1 -0
  394. package/dist/http/shipping-profile/admin/index.js +21 -0
  395. package/dist/http/shipping-profile/admin/index.js.map +1 -0
  396. package/dist/http/shipping-profile/admin/payloads.d.ts +11 -0
  397. package/dist/http/shipping-profile/admin/payloads.d.ts.map +1 -0
  398. package/dist/http/shipping-profile/admin/payloads.js +3 -0
  399. package/dist/http/shipping-profile/admin/payloads.js.map +1 -0
  400. package/dist/http/shipping-profile/admin/queries.d.ts +14 -0
  401. package/dist/http/shipping-profile/admin/queries.d.ts.map +1 -0
  402. package/dist/http/shipping-profile/admin/queries.js +3 -0
  403. package/dist/http/shipping-profile/admin/queries.js.map +1 -0
  404. package/dist/http/shipping-profile/admin/responses.d.ts +11 -0
  405. package/dist/http/shipping-profile/admin/responses.d.ts.map +1 -0
  406. package/dist/http/shipping-profile/admin/responses.js +3 -0
  407. package/dist/http/shipping-profile/admin/responses.js.map +1 -0
  408. package/dist/http/shipping-profile/index.d.ts +2 -0
  409. package/dist/http/shipping-profile/index.d.ts.map +1 -0
  410. package/dist/http/shipping-profile/index.js +18 -0
  411. package/dist/http/shipping-profile/index.js.map +1 -0
  412. package/dist/http/stock-locations/admin/entities.d.ts +22 -0
  413. package/dist/http/stock-locations/admin/entities.d.ts.map +1 -0
  414. package/dist/http/stock-locations/admin/entities.js +3 -0
  415. package/dist/http/stock-locations/admin/entities.js.map +1 -0
  416. package/dist/http/stock-locations/admin/index.d.ts +5 -0
  417. package/dist/http/stock-locations/admin/index.d.ts.map +1 -0
  418. package/dist/http/stock-locations/admin/index.js +21 -0
  419. package/dist/http/stock-locations/admin/index.js.map +1 -0
  420. package/dist/http/stock-locations/admin/payloads.d.ts +32 -0
  421. package/dist/http/stock-locations/admin/payloads.d.ts.map +1 -0
  422. package/dist/http/stock-locations/admin/payloads.js +3 -0
  423. package/dist/http/stock-locations/admin/payloads.js.map +1 -0
  424. package/dist/http/stock-locations/admin/queries.d.ts +11 -0
  425. package/dist/http/stock-locations/admin/queries.d.ts.map +1 -0
  426. package/dist/http/stock-locations/admin/queries.js +3 -0
  427. package/dist/http/stock-locations/admin/queries.js.map +1 -0
  428. package/dist/http/stock-locations/admin/responses.d.ts +12 -0
  429. package/dist/http/stock-locations/admin/responses.d.ts.map +1 -0
  430. package/dist/http/stock-locations/admin/responses.js +3 -0
  431. package/dist/http/stock-locations/admin/responses.js.map +1 -0
  432. package/dist/http/stock-locations/index.d.ts +1 -1
  433. package/dist/http/stock-locations/index.d.ts.map +1 -1
  434. package/dist/http/stock-locations/index.js +1 -1
  435. package/dist/http/stock-locations/index.js.map +1 -1
  436. package/dist/http/store/admin/entities.d.ts +23 -0
  437. package/dist/http/store/admin/entities.d.ts.map +1 -0
  438. package/dist/http/store/admin/entities.js +3 -0
  439. package/dist/http/store/admin/entities.js.map +1 -0
  440. package/dist/http/store/admin/index.d.ts +5 -0
  441. package/dist/http/store/admin/index.d.ts.map +1 -0
  442. package/dist/http/store/admin/index.js +21 -0
  443. package/dist/http/store/admin/index.js.map +1 -0
  444. package/dist/http/store/admin/payloads.d.ts +14 -0
  445. package/dist/http/store/admin/payloads.d.ts.map +1 -0
  446. package/dist/http/store/admin/payloads.js +3 -0
  447. package/dist/http/store/admin/payloads.js.map +1 -0
  448. package/dist/http/store/admin/queries.d.ts +10 -0
  449. package/dist/http/store/admin/queries.d.ts.map +1 -0
  450. package/dist/http/store/admin/queries.js +3 -0
  451. package/dist/http/store/admin/queries.js.map +1 -0
  452. package/dist/http/store/admin/responses.d.ts +10 -0
  453. package/dist/http/store/admin/responses.d.ts.map +1 -0
  454. package/dist/http/store/admin/responses.js +3 -0
  455. package/dist/http/store/admin/responses.js.map +1 -0
  456. package/dist/http/store/index.d.ts +2 -0
  457. package/dist/http/store/index.d.ts.map +1 -0
  458. package/dist/http/store/index.js +18 -0
  459. package/dist/http/store/index.js.map +1 -0
  460. package/dist/http/tax-rate/admin/entities.d.ts +22 -0
  461. package/dist/http/tax-rate/admin/entities.d.ts.map +1 -0
  462. package/dist/http/tax-rate/admin/entities.js +3 -0
  463. package/dist/http/tax-rate/admin/entities.js.map +1 -0
  464. package/dist/http/tax-rate/admin/index.d.ts +5 -0
  465. package/dist/http/tax-rate/admin/index.d.ts.map +1 -0
  466. package/dist/http/tax-rate/admin/index.js +21 -0
  467. package/dist/http/tax-rate/admin/index.js.map +1 -0
  468. package/dist/http/tax-rate/admin/payloads.d.ts +25 -0
  469. package/dist/http/tax-rate/admin/payloads.d.ts.map +1 -0
  470. package/dist/http/tax-rate/admin/payloads.js +3 -0
  471. package/dist/http/tax-rate/admin/payloads.js.map +1 -0
  472. package/dist/http/tax-rate/admin/queries.d.ts +16 -0
  473. package/dist/http/tax-rate/admin/queries.d.ts.map +1 -0
  474. package/dist/http/tax-rate/admin/queries.js +3 -0
  475. package/dist/http/tax-rate/admin/queries.js.map +1 -0
  476. package/dist/http/tax-rate/admin/responses.d.ts +11 -0
  477. package/dist/http/tax-rate/admin/responses.d.ts.map +1 -0
  478. package/dist/http/tax-rate/admin/responses.js +3 -0
  479. package/dist/http/tax-rate/admin/responses.js.map +1 -0
  480. package/dist/http/tax-rate/index.d.ts +2 -0
  481. package/dist/http/tax-rate/index.d.ts.map +1 -0
  482. package/dist/http/tax-rate/index.js +18 -0
  483. package/dist/http/tax-rate/index.js.map +1 -0
  484. package/dist/http/tax-region/admin/entities.d.ts +21 -0
  485. package/dist/http/tax-region/admin/entities.d.ts.map +1 -0
  486. package/dist/http/tax-region/admin/entities.js +3 -0
  487. package/dist/http/tax-region/admin/entities.js.map +1 -0
  488. package/dist/http/tax-region/admin/index.d.ts +5 -0
  489. package/dist/http/tax-region/admin/index.d.ts.map +1 -0
  490. package/dist/http/tax-region/admin/index.js +21 -0
  491. package/dist/http/tax-region/admin/index.js.map +1 -0
  492. package/dist/http/tax-region/admin/payloads.d.ts +14 -0
  493. package/dist/http/tax-region/admin/payloads.d.ts.map +1 -0
  494. package/dist/http/tax-region/admin/payloads.js +3 -0
  495. package/dist/http/tax-region/admin/payloads.js.map +1 -0
  496. package/dist/http/tax-region/admin/queries.d.ts +14 -0
  497. package/dist/http/tax-region/admin/queries.d.ts.map +1 -0
  498. package/dist/http/tax-region/admin/queries.js +3 -0
  499. package/dist/http/tax-region/admin/queries.js.map +1 -0
  500. package/dist/http/tax-region/admin/responses.d.ts +11 -0
  501. package/dist/http/tax-region/admin/responses.d.ts.map +1 -0
  502. package/dist/http/tax-region/admin/responses.js +3 -0
  503. package/dist/http/tax-region/admin/responses.js.map +1 -0
  504. package/dist/http/tax-region/index.d.ts +2 -0
  505. package/dist/http/tax-region/index.d.ts.map +1 -0
  506. package/dist/http/tax-region/index.js +18 -0
  507. package/dist/http/tax-region/index.js.map +1 -0
  508. package/dist/index.d.ts +1 -1
  509. package/dist/index.d.ts.map +1 -1
  510. package/dist/index.js +1 -1
  511. package/dist/index.js.map +1 -1
  512. package/dist/inventory/common/reservation-item.d.ts +5 -1
  513. package/dist/inventory/common/reservation-item.d.ts.map +1 -1
  514. package/dist/inventory/index.d.ts +1 -2
  515. package/dist/inventory/index.d.ts.map +1 -1
  516. package/dist/inventory/index.js +1 -15
  517. package/dist/inventory/index.js.map +1 -1
  518. package/dist/inventory/mutations/inventory-level.d.ts +0 -4
  519. package/dist/inventory/mutations/inventory-level.d.ts.map +1 -1
  520. package/dist/inventory/mutations/reservation-item.d.ts +11 -7
  521. package/dist/inventory/mutations/reservation-item.d.ts.map +1 -1
  522. package/dist/inventory/service.d.ts +671 -640
  523. package/dist/inventory/service.d.ts.map +1 -1
  524. package/dist/joiner/index.d.ts +5 -2
  525. package/dist/joiner/index.d.ts.map +1 -1
  526. package/dist/modules-sdk/index.d.ts +17 -11
  527. package/dist/modules-sdk/index.d.ts.map +1 -1
  528. package/dist/modules-sdk/index.js +1 -1
  529. package/dist/modules-sdk/index.js.map +1 -1
  530. package/dist/modules-sdk/{internal-module-service.d.ts → medusa-internal-service.d.ts} +22 -18
  531. package/dist/modules-sdk/medusa-internal-service.d.ts.map +1 -0
  532. package/dist/{http/fulfillment/admin/fulfillment-label.js → modules-sdk/medusa-internal-service.js} +1 -1
  533. package/dist/modules-sdk/medusa-internal-service.js.map +1 -0
  534. package/dist/notification/provider.d.ts +0 -6
  535. package/dist/notification/provider.d.ts.map +1 -1
  536. package/dist/notification/service.d.ts +15 -15
  537. package/dist/notification/service.d.ts.map +1 -1
  538. package/dist/order/common.d.ts +57 -4
  539. package/dist/order/common.d.ts.map +1 -1
  540. package/dist/order/mutations.d.ts +74 -53
  541. package/dist/order/mutations.d.ts.map +1 -1
  542. package/dist/order/service.d.ts +44 -30
  543. package/dist/order/service.d.ts.map +1 -1
  544. package/dist/payment/common.d.ts +2 -2
  545. package/dist/payment/common.d.ts.map +1 -1
  546. package/dist/pricing/common/index.d.ts +0 -2
  547. package/dist/pricing/common/index.d.ts.map +1 -1
  548. package/dist/pricing/common/index.js +0 -2
  549. package/dist/pricing/common/index.js.map +1 -1
  550. package/dist/pricing/common/money-amount.d.ts +2 -2
  551. package/dist/pricing/common/money-amount.d.ts.map +1 -1
  552. package/dist/pricing/common/price-list.d.ts +25 -125
  553. package/dist/pricing/common/price-list.d.ts.map +1 -1
  554. package/dist/pricing/common/price-rule.d.ts +8 -16
  555. package/dist/pricing/common/price-rule.d.ts.map +1 -1
  556. package/dist/pricing/common/price-set.d.ts +6 -55
  557. package/dist/pricing/common/price-set.d.ts.map +1 -1
  558. package/dist/pricing/service.d.ts +31 -324
  559. package/dist/pricing/service.d.ts.map +1 -1
  560. package/dist/pricing/workflows.d.ts +5 -5
  561. package/dist/pricing/workflows.d.ts.map +1 -1
  562. package/dist/product/common.d.ts +99 -79
  563. package/dist/product/common.d.ts.map +1 -1
  564. package/dist/product/service.d.ts +429 -207
  565. package/dist/product/service.d.ts.map +1 -1
  566. package/dist/promotion/common/application-method.d.ts +1 -1
  567. package/dist/promotion/common/application-method.d.ts.map +1 -1
  568. package/dist/promotion/common/promotion.d.ts +4 -0
  569. package/dist/promotion/common/promotion.d.ts.map +1 -1
  570. package/dist/promotion/mutations.d.ts +6 -6
  571. package/dist/promotion/mutations.d.ts.map +1 -1
  572. package/dist/promotion/service.d.ts +29 -29
  573. package/dist/promotion/service.d.ts.map +1 -1
  574. package/dist/region/common.d.ts.map +1 -1
  575. package/dist/region/mutations.d.ts +4 -3
  576. package/dist/region/mutations.d.ts.map +1 -1
  577. package/dist/region/service.d.ts +31 -31
  578. package/dist/region/service.d.ts.map +1 -1
  579. package/dist/sales-channel/mutations.d.ts +5 -4
  580. package/dist/sales-channel/mutations.d.ts.map +1 -1
  581. package/dist/sales-channel/service.d.ts +28 -28
  582. package/dist/sales-channel/service.d.ts.map +1 -1
  583. package/dist/shared-context.d.ts +3 -4
  584. package/dist/shared-context.d.ts.map +1 -1
  585. package/dist/stock-location/common.d.ts +12 -17
  586. package/dist/stock-location/common.d.ts.map +1 -1
  587. package/dist/stock-location/index.d.ts +0 -1
  588. package/dist/stock-location/index.d.ts.map +1 -1
  589. package/dist/stock-location/index.js +0 -1
  590. package/dist/stock-location/index.js.map +1 -1
  591. package/dist/stock-location/service.d.ts +193 -180
  592. package/dist/stock-location/service.d.ts.map +1 -1
  593. package/dist/store/common/store.d.ts +31 -5
  594. package/dist/store/common/store.d.ts.map +1 -1
  595. package/dist/store/mutations/store.d.ts +14 -40
  596. package/dist/store/mutations/store.d.ts.map +1 -1
  597. package/dist/store/service.d.ts +32 -37
  598. package/dist/store/service.d.ts.map +1 -1
  599. package/dist/tax/mutations.d.ts +7 -6
  600. package/dist/tax/mutations.d.ts.map +1 -1
  601. package/dist/tax/service.d.ts +35 -35
  602. package/dist/tax/service.d.ts.map +1 -1
  603. package/dist/user/service.d.ts +22 -22
  604. package/dist/user/service.d.ts.map +1 -1
  605. package/dist/workflow/fulfillment/service-zones.d.ts +1 -1
  606. package/dist/workflow/fulfillment/service-zones.d.ts.map +1 -1
  607. package/dist/workflow/order/cancel-fulfillment.d.ts +6 -0
  608. package/dist/workflow/order/cancel-fulfillment.d.ts.map +1 -0
  609. package/dist/{http/fulfillment/admin/fulfillment-item.js → workflow/order/cancel-fulfillment.js} +1 -1
  610. package/dist/workflow/order/cancel-fulfillment.js.map +1 -0
  611. package/dist/workflow/order/cancel-order.d.ts +5 -0
  612. package/dist/workflow/order/cancel-order.d.ts.map +1 -0
  613. package/dist/{http/fulfillment/admin/service-zone.js → workflow/order/cancel-order.js} +1 -1
  614. package/dist/workflow/order/cancel-order.js.map +1 -0
  615. package/dist/workflow/order/create-fulfillment.d.ts +2 -2
  616. package/dist/workflow/order/create-fulfillment.d.ts.map +1 -1
  617. package/dist/workflow/order/create-return-order.d.ts +8 -7
  618. package/dist/workflow/order/create-return-order.d.ts.map +1 -1
  619. package/dist/workflow/order/create-shipment.d.ts +2 -1
  620. package/dist/workflow/order/create-shipment.d.ts.map +1 -1
  621. package/dist/workflow/order/index.d.ts +3 -0
  622. package/dist/workflow/order/index.d.ts.map +1 -1
  623. package/dist/workflow/order/index.js +3 -0
  624. package/dist/workflow/order/index.js.map +1 -1
  625. package/dist/workflow/order/receive-return.d.ts +17 -0
  626. package/dist/workflow/order/receive-return.d.ts.map +1 -0
  627. package/dist/{http/fulfillment/admin/fulfillment.js → workflow/order/receive-return.js} +1 -1
  628. package/dist/workflow/order/receive-return.js.map +1 -0
  629. package/dist/workflow/price-list/create-price-list.d.ts +1 -2
  630. package/dist/workflow/price-list/create-price-list.d.ts.map +1 -1
  631. package/dist/workflow/product-category/index.d.ts +6 -6
  632. package/dist/workflow/product-category/index.d.ts.map +1 -1
  633. package/dist/workflow/reservation/create-reservations.d.ts +3 -3
  634. package/dist/workflow/reservation/create-reservations.d.ts.map +1 -1
  635. package/dist/workflow/reservation/update-reservations.d.ts +3 -3
  636. package/dist/workflow/reservation/update-reservations.d.ts.map +1 -1
  637. package/dist/workflows/products/mutations.d.ts +2 -2
  638. package/dist/workflows/products/mutations.d.ts.map +1 -1
  639. package/dist/workflows-sdk/service.d.ts +2 -2
  640. package/dist/workflows-sdk/service.d.ts.map +1 -1
  641. package/package.json +1 -2
  642. package/dist/http/fulfillment/admin/fulfillment-address.d.ts +0 -19
  643. package/dist/http/fulfillment/admin/fulfillment-address.d.ts.map +0 -1
  644. package/dist/http/fulfillment/admin/fulfillment-address.js +0 -3
  645. package/dist/http/fulfillment/admin/fulfillment-address.js.map +0 -1
  646. package/dist/http/fulfillment/admin/fulfillment-item.d.ts +0 -14
  647. package/dist/http/fulfillment/admin/fulfillment-item.d.ts.map +0 -1
  648. package/dist/http/fulfillment/admin/fulfillment-item.js.map +0 -1
  649. package/dist/http/fulfillment/admin/fulfillment-label.d.ts +0 -11
  650. package/dist/http/fulfillment/admin/fulfillment-label.d.ts.map +0 -1
  651. package/dist/http/fulfillment/admin/fulfillment-label.js.map +0 -1
  652. package/dist/http/fulfillment/admin/fulfillment-provider.d.ts +0 -9
  653. package/dist/http/fulfillment/admin/fulfillment-provider.d.ts.map +0 -1
  654. package/dist/http/fulfillment/admin/fulfillment-provider.js +0 -3
  655. package/dist/http/fulfillment/admin/fulfillment-provider.js.map +0 -1
  656. package/dist/http/fulfillment/admin/fulfillment-set.d.ts +0 -15
  657. package/dist/http/fulfillment/admin/fulfillment-set.d.ts.map +0 -1
  658. package/dist/http/fulfillment/admin/fulfillment-set.js +0 -3
  659. package/dist/http/fulfillment/admin/fulfillment-set.js.map +0 -1
  660. package/dist/http/fulfillment/admin/fulfillment.d.ts +0 -27
  661. package/dist/http/fulfillment/admin/fulfillment.d.ts.map +0 -1
  662. package/dist/http/fulfillment/admin/fulfillment.js.map +0 -1
  663. package/dist/http/fulfillment/admin/geo-zone.d.ts +0 -14
  664. package/dist/http/fulfillment/admin/geo-zone.d.ts.map +0 -1
  665. package/dist/http/fulfillment/admin/geo-zone.js.map +0 -1
  666. package/dist/http/fulfillment/admin/service-zone.d.ts +0 -21
  667. package/dist/http/fulfillment/admin/service-zone.d.ts.map +0 -1
  668. package/dist/http/fulfillment/admin/service-zone.js.map +0 -1
  669. package/dist/http/fulfillment/admin/shipping-option-rule.d.ts +0 -13
  670. package/dist/http/fulfillment/admin/shipping-option-rule.d.ts.map +0 -1
  671. package/dist/http/fulfillment/admin/shipping-option-rule.js +0 -3
  672. package/dist/http/fulfillment/admin/shipping-option-rule.js.map +0 -1
  673. package/dist/http/fulfillment/admin/shipping-option-type.d.ts +0 -11
  674. package/dist/http/fulfillment/admin/shipping-option-type.d.ts.map +0 -1
  675. package/dist/http/fulfillment/admin/shipping-option-type.js +0 -3
  676. package/dist/http/fulfillment/admin/shipping-option-type.js.map +0 -1
  677. package/dist/http/fulfillment/admin/shipping-option.d.ts +0 -38
  678. package/dist/http/fulfillment/admin/shipping-option.d.ts.map +0 -1
  679. package/dist/http/fulfillment/admin/shipping-option.js +0 -3
  680. package/dist/http/fulfillment/admin/shipping-option.js.map +0 -1
  681. package/dist/http/fulfillment/admin/shipping-profile.d.ts +0 -19
  682. package/dist/http/fulfillment/admin/shipping-profile.d.ts.map +0 -1
  683. package/dist/http/fulfillment/admin/shipping-profile.js +0 -3
  684. package/dist/http/fulfillment/admin/shipping-profile.js.map +0 -1
  685. package/dist/http/inventory/inventory-level.d.ts +0 -20
  686. package/dist/http/inventory/inventory-level.d.ts.map +0 -1
  687. package/dist/http/inventory/inventory-level.js +0 -3
  688. package/dist/http/inventory/inventory-level.js.map +0 -1
  689. package/dist/http/inventory/inventory.d.ts.map +0 -1
  690. package/dist/http/inventory/inventory.js.map +0 -1
  691. package/dist/http/pricing/price.d.ts +0 -8
  692. package/dist/http/pricing/price.d.ts.map +0 -1
  693. package/dist/http/pricing/price.js.map +0 -1
  694. package/dist/http/product/admin.d.ts +0 -99
  695. package/dist/http/product/admin.d.ts.map +0 -1
  696. package/dist/http/product/store.d.ts +0 -33
  697. package/dist/http/product/store.d.ts.map +0 -1
  698. package/dist/http/product/store.js +0 -3
  699. package/dist/http/product-category/admin.d.ts +0 -9
  700. package/dist/http/product-category/admin.d.ts.map +0 -1
  701. package/dist/http/product-category/admin.js.map +0 -1
  702. package/dist/http/product-category/store.d.ts +0 -9
  703. package/dist/http/product-category/store.d.ts.map +0 -1
  704. package/dist/http/product-category/store.js.map +0 -1
  705. package/dist/http/sales-channel/admin/sales-channel.d.ts +0 -16
  706. package/dist/http/sales-channel/admin/sales-channel.d.ts.map +0 -1
  707. package/dist/http/sales-channel/admin/sales-channel.js +0 -3
  708. package/dist/http/sales-channel/admin/sales-channel.js.map +0 -1
  709. package/dist/http/stock-locations/common.d.ts +0 -28
  710. package/dist/http/stock-locations/common.d.ts.map +0 -1
  711. package/dist/http/stock-locations/common.js.map +0 -1
  712. package/dist/http/tax/admin/index.d.ts +0 -3
  713. package/dist/http/tax/admin/index.d.ts.map +0 -1
  714. package/dist/http/tax/admin/index.js.map +0 -1
  715. package/dist/http/tax/admin/tax-rates.d.ts +0 -28
  716. package/dist/http/tax/admin/tax-rates.d.ts.map +0 -1
  717. package/dist/http/tax/admin/tax-rates.js +0 -3
  718. package/dist/http/tax/admin/tax-rates.js.map +0 -1
  719. package/dist/http/tax/admin/tax-regions.d.ts +0 -28
  720. package/dist/http/tax/admin/tax-regions.d.ts.map +0 -1
  721. package/dist/http/tax/admin/tax-regions.js +0 -3
  722. package/dist/http/tax/admin/tax-regions.js.map +0 -1
  723. package/dist/http/tax/index.d.ts.map +0 -1
  724. package/dist/http/tax/index.js.map +0 -1
  725. package/dist/inventory/bundle.d.ts +0 -3
  726. package/dist/inventory/bundle.d.ts.map +0 -1
  727. package/dist/inventory/bundle.js.map +0 -1
  728. package/dist/inventory/common.d.ts +0 -494
  729. package/dist/inventory/common.d.ts.map +0 -1
  730. package/dist/inventory/service-next.d.ts +0 -914
  731. package/dist/inventory/service-next.d.ts.map +0 -1
  732. package/dist/inventory/service-next.js +0 -3
  733. package/dist/inventory/service-next.js.map +0 -1
  734. package/dist/modules-sdk/internal-module-service.d.ts.map +0 -1
  735. package/dist/modules-sdk/internal-module-service.js +0 -3
  736. package/dist/modules-sdk/internal-module-service.js.map +0 -1
  737. package/dist/modules-sdk/module-service.d.ts +0 -1
  738. package/dist/modules-sdk/module-service.d.ts.map +0 -1
  739. package/dist/modules-sdk/module-service.js +0 -1
  740. package/dist/modules-sdk/module-service.js.map +0 -1
  741. package/dist/pricing/common/price-set-rule-type.d.ts +0 -24
  742. package/dist/pricing/common/price-set-rule-type.d.ts.map +0 -1
  743. package/dist/pricing/common/price-set-rule-type.js +0 -3
  744. package/dist/pricing/common/price-set-rule-type.js.map +0 -1
  745. package/dist/pricing/common/rule-type.d.ts +0 -102
  746. package/dist/pricing/common/rule-type.d.ts.map +0 -1
  747. package/dist/pricing/common/rule-type.js +0 -3
  748. package/dist/pricing/common/rule-type.js.map +0 -1
  749. package/dist/region__legacy/common.d.ts +0 -44
  750. package/dist/region__legacy/common.d.ts.map +0 -1
  751. package/dist/region__legacy/common.js +0 -3
  752. package/dist/region__legacy/index.d.ts +0 -2
  753. package/dist/region__legacy/index.d.ts.map +0 -1
  754. package/dist/region__legacy/index.js.map +0 -1
  755. package/dist/stock-location/service-next.d.ts +0 -279
  756. package/dist/stock-location/service-next.d.ts.map +0 -1
  757. package/dist/stock-location/service-next.js +0 -3
  758. package/dist/stock-location/service-next.js.map +0 -1
  759. /package/dist/http/{tax → currency}/index.d.ts +0 -0
  760. /package/dist/http/{tax → currency}/index.js +0 -0
  761. /package/dist/http/{product-category → file}/admin.js +0 -0
  762. /package/dist/http/{stock-locations → file}/common.js +0 -0
  763. /package/dist/http/{product-category → file}/store.js +0 -0
  764. /package/dist/{inventory → http/product-type}/common.js +0 -0
@@ -1,601 +1,637 @@
1
- import { BulkUpdateInventoryLevelInput, CreateInventoryItemInput, CreateInventoryLevelInput, CreateReservationItemInput, FilterableInventoryItemProps, FilterableInventoryLevelProps, FilterableReservationItemProps, InventoryItemDTO, InventoryLevelDTO, ReservationItemDTO, UpdateInventoryLevelInput, UpdateReservationItemInput } from "./common";
1
+ import { RestoreReturn, SoftDeleteReturn } from "../dal";
2
2
  import { FindConfig } from "../common";
3
3
  import { IModuleService } from "../modules-sdk";
4
- import { SharedContext } from "../shared-context";
4
+ import { Context } from "../shared-context";
5
+ import { FilterableInventoryItemProps, FilterableInventoryLevelProps, FilterableReservationItemProps, InventoryItemDTO, InventoryLevelDTO, ReservationItemDTO } from "./common";
6
+ import { BulkUpdateInventoryLevelInput, CreateInventoryItemInput, CreateInventoryLevelInput, CreateReservationItemInput, UpdateInventoryItemInput, UpdateReservationItemInput } from "./mutations";
5
7
  /**
6
- * The main service interface for the inventory module.
8
+ * The main service interface for the Inventory Module.
7
9
  */
8
10
  export interface IInventoryService extends IModuleService {
9
11
  /**
10
- * This method is used to retrieve a paginated list of inventory items along with the total count of available inventory items satisfying the provided filters.
12
+ * This method retrieves a paginated list of inventory items based on optional filters and configuration.
13
+ *
11
14
  * @param {FilterableInventoryItemProps} selector - The filters to apply on the retrieved inventory items.
12
- * @param {FindConfig<InventoryItemDTO>} config -
13
- * The configurations determining how the inventory items are retrieved. Its properties, such as `select` or `relations`, accept the
15
+ * @param {FindConfig<InventoryItemDTO>} config - The configurations determining how the inventory item is retrieved. Its properties, such as `select` or `relations`, accept the
14
16
  * attributes or relations associated with a inventory item.
15
- * @param {SharedContext} context - A context used to share resources, such as transaction manager, between the application and the module.
16
- * @return {Promise<[InventoryItemDTO[], number]>} The list of inventory items along with the total count.
17
+ * @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
18
+ * @returns {Promise<InventoryItemDTO[]>} The list of inventory items.
17
19
  *
18
20
  * @example
19
21
  * To retrieve a list of inventory items using their IDs:
20
22
  *
21
23
  * ```ts
22
- * import {
23
- * initialize as initializeInventoryModule,
24
- * } from "@medusajs/inventory"
25
- *
26
- * async function retrieveInventoryItems (ids: string[]) {
27
- * const inventoryModule = await initializeInventoryModule({})
24
+ * const inventoryItems = await inventoryModuleService.listInventoryItems({
25
+ * id: ["iitem_123", "iitem_321"],
26
+ * })
27
+ * ```
28
28
  *
29
- * const [inventoryItems, count] = await inventoryModule.listInventoryItems({
30
- * id: ids
31
- * })
29
+ * To specify relations that should be retrieved within the inventory items:
32
30
  *
33
- * // do something with the inventory items or return them
34
- * }
31
+ * ```ts
32
+ * const inventoryItems = await inventoryModuleService.listInventoryItems(
33
+ * {
34
+ * id: ["iitem_123", "iitem_321"],
35
+ * },
36
+ * {
37
+ * relations: ["location_levels"],
38
+ * }
39
+ * )
35
40
  * ```
36
41
  *
37
- * To specify relations that should be retrieved within the inventory items:
42
+ * By default, only the first `10` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
38
43
  *
39
44
  * ```ts
40
- * import {
41
- * initialize as initializeInventoryModule,
42
- * } from "@medusajs/inventory"
45
+ * const inventoryItems = await inventoryModuleService.listInventoryItems(
46
+ * {
47
+ * id: ["iitem_123", "iitem_321"],
48
+ * },
49
+ * {
50
+ * relations: ["location_levels"],
51
+ * take: 20,
52
+ * skip: 2,
53
+ * }
54
+ * )
55
+ * ```
56
+ */
57
+ listInventoryItems(selector: FilterableInventoryItemProps, config?: FindConfig<InventoryItemDTO>, context?: Context): Promise<InventoryItemDTO[]>;
58
+ /**
59
+ * This method retrieves a paginated list of inventory items along with the total count of available inventory items satisfying the provided filters.
43
60
  *
44
- * async function retrieveInventoryItems (ids: string[]) {
45
- * const inventoryModule = await initializeInventoryModule({})
61
+ * @param {FilterableInventoryItemProps} selector - The filters to apply on the retrieved inventory items.
62
+ * @param {FindConfig<InventoryItemDTO>} config - The configurations determining how the inventory item is retrieved. Its properties, such as `select` or `relations`, accept the
63
+ * attributes or relations associated with a inventory item.
64
+ * @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
65
+ * @returns {Promise<[InventoryItemDTO[], number]>} The list of inventory items along with their total count.
46
66
  *
47
- * const [inventoryItems, count] = await inventoryModule.listInventoryItems({
48
- * id: ids
49
- * }, {
50
- * relations: ["inventory_level"]
51
- * })
67
+ * @example
68
+ * To retrieve a list of inventory items using their IDs:
52
69
  *
53
- * // do something with the inventory items or return them
54
- * }
70
+ * ```ts
71
+ * const [inventoryItems, count] =
72
+ * await inventoryModuleService.listAndCountInventoryItems({
73
+ * id: ["iitem_123", "iitem_321"],
74
+ * })
55
75
  * ```
56
76
  *
57
- * By default, only the first `10` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
77
+ * To specify relations that should be retrieved within the inventory items:
58
78
  *
59
79
  * ```ts
60
- * import {
61
- * initialize as initializeInventoryModule,
62
- * } from "@medusajs/inventory"
63
- *
64
- * async function retrieveInventoryItems (ids: string[], skip: number, take: number) {
65
- * const inventoryModule = await initializeInventoryModule({})
80
+ * const [inventoryItems, count] =
81
+ * await inventoryModuleService.listAndCountInventoryItems(
82
+ * {
83
+ * id: ["iitem_123", "iitem_321"],
84
+ * },
85
+ * {
86
+ * relations: ["location_levels"],
87
+ * }
88
+ * )
89
+ * ```
66
90
  *
67
- * const [inventoryItems, count] = await inventoryModule.listInventoryItems({
68
- * id: ids
69
- * }, {
70
- * relations: ["inventory_level"],
71
- * skip,
72
- * take
73
- * })
91
+ * By default, only the first `10` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
74
92
  *
75
- * // do something with the inventory items or return them
76
- * }
93
+ * ```ts
94
+ * const [inventoryItems, count] =
95
+ * await inventoryModuleService.listAndCountInventoryItems(
96
+ * {
97
+ * id: ["iitem_123", "iitem_321"],
98
+ * },
99
+ * {
100
+ * relations: ["location_levels"],
101
+ * take: 20,
102
+ * skip: 2,
103
+ * }
104
+ * )
77
105
  * ```
78
106
  */
79
- listInventoryItems(selector: FilterableInventoryItemProps, config?: FindConfig<InventoryItemDTO>, context?: SharedContext): Promise<[InventoryItemDTO[], number]>;
107
+ listAndCountInventoryItems(selector: FilterableInventoryItemProps, config?: FindConfig<InventoryItemDTO>, context?: Context): Promise<[InventoryItemDTO[], number]>;
80
108
  /**
81
- * This method is used to retrieve a paginated list of reservation items along with the total count of available reservation items satisfying the provided filters.
109
+ * This method retrieves a paginated list of reservation items based on optional filters and configuration.
110
+ *
82
111
  * @param {FilterableReservationItemProps} selector - The filters to apply on the retrieved reservation items.
83
- * @param {FindConfig<ReservationItemDTO>} config -
84
- * The configurations determining how the reservation items are retrieved. Its properties, such as `select` or `relations`, accept the
112
+ * @param {FindConfig<ReservationItemDTO>} config - The configurations determining how the reservation item is retrieved. Its properties, such as `select` or `relations`, accept the
85
113
  * attributes or relations associated with a reservation item.
86
- * @param {SharedContext} context - A context used to share resources, such as transaction manager, between the application and the module.
87
- * @return {Promise<[ReservationItemDTO[], number]>} The list of reservation items along with the total count.
114
+ * @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
115
+ * @returns {Promise<ReservationItemDTO[]>} The list of reservation items.
88
116
  *
89
117
  * @example
90
118
  * To retrieve a list of reservation items using their IDs:
91
119
  *
92
120
  * ```ts
93
- * import {
94
- * initialize as initializeInventoryModule,
95
- * } from "@medusajs/inventory"
96
- *
97
- * async function retrieveReservationItems (ids: string[]) {
98
- * const inventoryModule = await initializeInventoryModule({})
99
- *
100
- * const [reservationItems, count] = await inventoryModule.listReservationItems({
101
- * id: ids
121
+ * const reservationItems =
122
+ * await inventoryModuleService.listReservationItems({
123
+ * id: ["resitem_123", "resitem_321"],
102
124
  * })
103
- *
104
- * // do something with the reservation items or return them
105
- * }
106
125
  * ```
107
126
  *
108
127
  * To specify relations that should be retrieved within the reservation items:
109
128
  *
110
129
  * ```ts
111
- * import {
112
- * initialize as initializeInventoryModule,
113
- * } from "@medusajs/inventory"
114
- *
115
- * async function retrieveReservationItems (ids: string[]) {
116
- * const inventoryModule = await initializeInventoryModule({})
117
- *
118
- * const [reservationItems, count] = await inventoryModule.listReservationItems({
119
- * id: ids
120
- * }, {
121
- * relations: ["inventory_item"]
122
- * })
123
- *
124
- * // do something with the reservation items or return them
125
- * }
130
+ * const reservationItems =
131
+ * await inventoryModuleService.listReservationItems(
132
+ * {
133
+ * id: ["resitem_123", "resitem_321"],
134
+ * },
135
+ * {
136
+ * relations: ["inventory_item"],
137
+ * }
138
+ * )
126
139
  * ```
127
140
  *
128
141
  * By default, only the first `10` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
129
142
  *
130
143
  * ```ts
131
- * import {
132
- * initialize as initializeInventoryModule,
133
- * } from "@medusajs/inventory"
144
+ * const reservationItems =
145
+ * await inventoryModuleService.listReservationItems(
146
+ * {
147
+ * id: ["resitem_123", "resitem_321"],
148
+ * },
149
+ * {
150
+ * relations: ["inventory_item"],
151
+ * take: 20,
152
+ * skip: 2,
153
+ * }
154
+ * )
155
+ * ```
156
+ */
157
+ listReservationItems(selector: FilterableReservationItemProps, config?: FindConfig<ReservationItemDTO>, context?: Context): Promise<ReservationItemDTO[]>;
158
+ /**
159
+ * This method retrieves a paginated list of reservation items along with the total count of available reservation items satisfying the provided filters.
134
160
  *
135
- * async function retrieveReservationItems (ids: string[], skip: number, take: number) {
136
- * const inventoryModule = await initializeInventoryModule({})
161
+ * @param {FilterableReservationItemProps} selector - The filters to apply on the retrieved reservation items.
162
+ * @param {FindConfig<ReservationItemDTO>} config - The configurations determining how the reservation item is retrieved. Its properties, such as `select` or `relations`, accept the
163
+ * attributes or relations associated with a reservation item.
164
+ * @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
165
+ * @returns {Promise<[ReservationItemDTO[], number]>} The list of reservation items along with their total count.
137
166
  *
138
- * const [reservationItems, count] = await inventoryModule.listReservationItems({
139
- * id: ids
140
- * }, {
141
- * relations: ["inventory_item"],
142
- * skip,
143
- * take
167
+ * @example
168
+ * To retrieve a list of reservation items using their IDs:
169
+ *
170
+ * ```ts
171
+ * const [reservationItems, count] =
172
+ * await inventoryModuleService.listAndCountReservationItems({
173
+ * id: ["resitem_123", "resitem_321"],
144
174
  * })
175
+ * ```
145
176
  *
146
- * // do something with the reservation items or return them
147
- * }
177
+ * To specify relations that should be retrieved within the reservation items:
178
+ *
179
+ * ```ts
180
+ * const [reservationItems, count] =
181
+ * await inventoryModuleService.listAndCountReservationItems(
182
+ * {
183
+ * id: ["resitem_123", "resitem_321"],
184
+ * },
185
+ * {
186
+ * relations: ["inventory_item"],
187
+ * }
188
+ * )
189
+ * ```
190
+ *
191
+ * By default, only the first `10` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
192
+ *
193
+ * ```ts
194
+ * const [reservationItems, count] =
195
+ * await inventoryModuleService.listAndCountReservationItems(
196
+ * {
197
+ * id: ["resitem_123", "resitem_321"],
198
+ * },
199
+ * {
200
+ * relations: ["inventory_item"],
201
+ * take: 20,
202
+ * skip: 2,
203
+ * }
204
+ * )
148
205
  * ```
149
206
  */
150
- listReservationItems(selector: FilterableReservationItemProps, config?: FindConfig<ReservationItemDTO>, context?: SharedContext): Promise<[ReservationItemDTO[], number]>;
207
+ listAndCountReservationItems(selector: FilterableReservationItemProps, config?: FindConfig<ReservationItemDTO>, context?: Context): Promise<[ReservationItemDTO[], number]>;
151
208
  /**
152
- * This method is used to retrieve a paginated list of inventory levels along with the total count of available inventory levels satisfying the provided filters.
209
+ * This method retrieves a paginated list of inventory levels based on optional filters and configuration.
210
+ *
153
211
  * @param {FilterableInventoryLevelProps} selector - The filters to apply on the retrieved inventory levels.
154
- * @param {FindConfig<InventoryLevelDTO>} config -
155
- * The configurations determining how the inventory levels are retrieved. Its properties, such as `select` or `relations`, accept the
212
+ * @param {FindConfig<InventoryLevelDTO>} config - The configurations determining how the inventory level is retrieved. Its properties, such as `select` or `relations`, accept the
156
213
  * attributes or relations associated with a inventory level.
157
- * @param {SharedContext} context - A context used to share resources, such as transaction manager, between the application and the module.
158
- * @return {Promise<[InventoryLevelDTO[], number]>} The list of inventory levels along with the total count.
214
+ * @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
215
+ * @returns {Promise<InventoryLevelDTO[]>} The list of inventory levels.
159
216
  *
160
217
  * @example
161
- * To retrieve a list of inventory levels using their IDs:
218
+ * To retrieve a list of inventory levels using the IDs of their associated inventory items:
162
219
  *
163
220
  * ```ts
164
- * import {
165
- * initialize as initializeInventoryModule,
166
- * } from "@medusajs/inventory"
167
- *
168
- * async function retrieveInventoryLevels (inventoryItemIds: string[]) {
169
- * const inventoryModule = await initializeInventoryModule({})
170
- *
171
- * const [inventoryLevels, count] = await inventoryModule.listInventoryLevels({
172
- * inventory_item_id: inventoryItemIds
221
+ * const inventoryLevels =
222
+ * await inventoryModuleService.listInventoryLevels({
223
+ * inventory_item_id: ["iitem_123", "iitem_321"],
173
224
  * })
174
- *
175
- * // do something with the inventory levels or return them
176
- * }
177
225
  * ```
178
226
  *
179
227
  * To specify relations that should be retrieved within the inventory levels:
180
228
  *
181
229
  * ```ts
182
- * import {
183
- * initialize as initializeInventoryModule,
184
- * } from "@medusajs/inventory"
230
+ * const inventoryLevels =
231
+ * await inventoryModuleService.listInventoryLevels(
232
+ * {
233
+ * inventory_item_id: ["iitem_123", "iitem_321"],
234
+ * },
235
+ * {
236
+ * relations: ["inventory_item"],
237
+ * }
238
+ * )
239
+ * ```
185
240
  *
186
- * async function retrieveInventoryLevels (inventoryItemIds: string[]) {
187
- * const inventoryModule = await initializeInventoryModule({})
241
+ * By default, only the first `10` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
188
242
  *
189
- * const [inventoryLevels, count] = await inventoryModule.listInventoryLevels({
190
- * inventory_item_id: inventoryItemIds
191
- * }, {
192
- * relations: ["inventory_item"]
193
- * })
243
+ * ```ts
244
+ * const inventoryLevels =
245
+ * await inventoryModuleService.listInventoryLevels(
246
+ * {
247
+ * inventory_item_id: ["iitem_123", "iitem_321"],
248
+ * },
249
+ * {
250
+ * relations: ["inventory_item"],
251
+ * take: 20,
252
+ * skip: 2,
253
+ * }
254
+ * )
255
+ * ```
256
+ */
257
+ listInventoryLevels(selector: FilterableInventoryLevelProps, config?: FindConfig<InventoryLevelDTO>, context?: Context): Promise<InventoryLevelDTO[]>;
258
+ /**
259
+ * This method retrieves a paginated list of inventory levels along with the total count of available inventory levels satisfying the provided filters.
194
260
  *
195
- * // do something with the inventory levels or return them
196
- * }
261
+ * @param {FilterableInventoryLevelProps} selector - The filters to apply on the retrieved inventory levels.
262
+ * @param {FindConfig<InventoryLevelDTO>} config - The configurations determining how the inventory level is retrieved. Its properties, such as `select` or `relations`, accept the
263
+ * attributes or relations associated with a inventory level.
264
+ * @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
265
+ * @returns {Promise<[InventoryLevelDTO[], number]>} The list of inventory levels along with their total count.
266
+ *
267
+ * @example
268
+ * To retrieve a list of inventory levels using the IDs of their associated inventory items:
269
+ *
270
+ * ```ts
271
+ * const [inventoryLevels, count] =
272
+ * await inventoryModuleService.listAndCountInventoryLevels(
273
+ * {
274
+ * inventory_item_id: ["iitem_123", "iitem_321"],
275
+ * },
276
+ * {
277
+ * relations: ["inventory_item"],
278
+ * take: 20,
279
+ * skip: 2,
280
+ * }
281
+ * )
197
282
  * ```
198
283
  *
199
- * By default, only the first `10` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
284
+ * To specify relations that should be retrieved within the inventory levels:
200
285
  *
201
286
  * ```ts
202
- * import {
203
- * initialize as initializeInventoryModule,
204
- * } from "@medusajs/inventory"
287
+ * const [inventoryLevels, count] =
288
+ * await inventoryModuleService.listAndCountInventoryLevels(
289
+ * {
290
+ * inventory_item_id: ["iitem_123", "iitem_321"],
291
+ * },
292
+ * {
293
+ * relations: ["inventory_item"],
294
+ * }
295
+ * )
296
+ * ```
205
297
  *
206
- * async function retrieveInventoryLevels (inventoryItemIds: string[], skip: number, take: number) {
207
- * const inventoryModule = await initializeInventoryModule({})
298
+ * By default, only the first `10` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
208
299
  *
209
- * const [inventoryLevels, count] = await inventoryModule.listInventoryLevels({
210
- * inventory_item_id: inventoryItemIds
211
- * }, {
212
- * relations: ["inventory_item"],
213
- * skip,
214
- * take
300
+ * ```ts
301
+ * const [inventoryLevels, count] =
302
+ * await inventoryModuleService.listAndCountInventoryLevels({
303
+ * inventory_item_id: ["iitem_123", "iitem_321"],
215
304
  * })
216
- *
217
- * // do something with the inventory levels or return them
218
- * }
219
305
  * ```
220
306
  */
221
- listInventoryLevels(selector: FilterableInventoryLevelProps, config?: FindConfig<InventoryLevelDTO>, context?: SharedContext): Promise<[InventoryLevelDTO[], number]>;
307
+ listAndCountInventoryLevels(selector: FilterableInventoryLevelProps, config?: FindConfig<InventoryLevelDTO>, context?: Context): Promise<[InventoryLevelDTO[], number]>;
222
308
  /**
223
- * This method is used to retrieve an inventory item by its ID
309
+ * This method retrieves an inventory item by its ID.
224
310
  *
225
- * @param {string} inventoryItemId - The ID of the inventory item to retrieve.
226
- * @param {FindConfig<InventoryItemDTO>} config -
227
- * The configurations determining how the inventory item is retrieved. Its properties, such as `select` or `relations`, accept the
311
+ * @param {string} inventoryItemId - The inventory item's ID.
312
+ * @param {FindConfig<InventoryItemDTO>} config - The configurations determining how the inventory item is retrieved. Its properties, such as `select` or `relations`, accept the
228
313
  * attributes or relations associated with a inventory item.
229
- * @param {SharedContext} context - A context used to share resources, such as transaction manager, between the application and the module.
314
+ * @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
230
315
  * @returns {Promise<InventoryItemDTO>} The retrieved inventory item.
231
316
  *
232
317
  * @example
233
318
  * A simple example that retrieves a inventory item by its ID:
234
319
  *
235
320
  * ```ts
236
- * import {
237
- * initialize as initializeInventoryModule,
238
- * } from "@medusajs/inventory"
239
- *
240
- * async function retrieveInventoryItem (id: string) {
241
- * const inventoryModule = await initializeInventoryModule({})
242
- *
243
- * const inventoryItem = await inventoryModule.retrieveInventoryItem(id)
244
- *
245
- * // do something with the inventory item or return it
246
- * }
321
+ * const inventoryItem =
322
+ * await inventoryModuleService.retrieveInventoryItem("iitem_123")
247
323
  * ```
248
324
  *
249
325
  * To specify relations that should be retrieved:
250
326
  *
251
327
  * ```ts
252
- * import {
253
- * initialize as initializeInventoryModule,
254
- * } from "@medusajs/inventory"
255
- *
256
- * async function retrieveInventoryItem (id: string) {
257
- * const inventoryModule = await initializeInventoryModule({})
258
- *
259
- * const inventoryItem = await inventoryModule.retrieveInventoryItem(id, {
260
- * relations: ["inventory_level"]
261
- * })
262
- *
263
- * // do something with the inventory item or return it
264
- * }
328
+ * const inventoryItem = await inventoryModuleService.retrieveInventoryItem(
329
+ * "iitem_123",
330
+ * {
331
+ * relations: ["location_levels"],
332
+ * }
333
+ * )
265
334
  * ```
266
335
  */
267
- retrieveInventoryItem(inventoryItemId: string, config?: FindConfig<InventoryItemDTO>, context?: SharedContext): Promise<InventoryItemDTO>;
336
+ retrieveInventoryItem(inventoryItemId: string, config?: FindConfig<InventoryItemDTO>, context?: Context): Promise<InventoryItemDTO>;
268
337
  /**
269
- * This method is used to retrieve an inventory level for an inventory item and a location.
338
+ * This method retrieves an inventory level based on its associated inventory item and location.
270
339
  *
271
- * @param {string} inventoryItemId - The ID of the inventory item.
272
- * @param {string} locationId - The ID of the location.
273
- * @param {SharedContext} context - A context used to share resources, such as transaction manager, between the application and the module.
340
+ * @param {string} inventoryItemId - The inventory item's ID.
341
+ * @param {string} locationId - The location's ID.
342
+ * @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
274
343
  * @returns {Promise<InventoryLevelDTO>} The retrieved inventory level.
275
344
  *
276
345
  * @example
277
- * import {
278
- * initialize as initializeInventoryModule,
279
- * } from "@medusajs/inventory"
280
- *
281
- * async function retrieveInventoryLevel (
282
- * inventoryItemId: string,
283
- * locationId: string
284
- * ) {
285
- * const inventoryModule = await initializeInventoryModule({})
286
- *
287
- * const inventoryLevel = await inventoryModule.retrieveInventoryLevel(
288
- * inventoryItemId,
289
- * locationId
346
+ * const inventoryLevel =
347
+ * await inventoryModuleService.retrieveInventoryLevelByItemAndLocation(
348
+ * "iitem_123",
349
+ * "loc_123"
290
350
  * )
291
- *
292
- * // do something with the inventory level or return it
293
- * }
294
351
  */
295
- retrieveInventoryLevel(inventoryItemId: string, locationId: string, context?: SharedContext): Promise<InventoryLevelDTO>;
352
+ retrieveInventoryLevelByItemAndLocation(inventoryItemId: string, locationId: string, context?: Context): Promise<InventoryLevelDTO>;
296
353
  /**
297
- * This method is used to retrieve a reservation item by its ID.
354
+ * This method retrieves an inventory level by its ID.
298
355
  *
299
- * @param {string} reservationId - The ID of the reservation item.
300
- * @param {SharedContext} context - A context used to share resources, such as transaction manager, between the application and the module.
301
- * @returns {Promise<ReservationItemDTO>} The retrieved reservation item.
356
+ * @param {string} inventoryLevelId - The inventory level's ID.
357
+ * @param {FindConfig<InventoryLevelDTO>} config - The configurations determining how the inventory level is retrieved. Its properties, such as `select` or `relations`, accept the
358
+ * attributes or relations associated with a inventory level.
359
+ * @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
360
+ * @returns {Promise<InventoryLevelDTO>} The retrieved inventory level.
302
361
  *
303
362
  * @example
304
- * import {
305
- * initialize as initializeInventoryModule,
306
- * } from "@medusajs/inventory"
363
+ * A simple example that retrieves a inventory level by its ID:
307
364
  *
308
- * async function retrieveReservationItem (id: string) {
309
- * const inventoryModule = await initializeInventoryModule({})
365
+ * ```ts
366
+ * const inventoryLevel =
367
+ * await inventoryModuleService.retrieveInventoryLevel(
368
+ * "iitem_123"
369
+ * )
370
+ * ```
310
371
  *
311
- * const reservationItem = await inventoryModule.retrieveReservationItem(id)
372
+ * To specify relations that should be retrieved:
312
373
  *
313
- * // do something with the reservation item or return it
314
- * }
374
+ * ```ts
375
+ * const inventoryLevel =
376
+ * await inventoryModuleService.retrieveInventoryLevel(
377
+ * "iitem_123",
378
+ * {
379
+ * relations: ["inventory_item"],
380
+ * }
381
+ * )
382
+ * ```
315
383
  */
316
- retrieveReservationItem(reservationId: string, context?: SharedContext): Promise<ReservationItemDTO>;
384
+ retrieveInventoryLevel(inventoryLevelId: string, config?: FindConfig<InventoryLevelDTO>, context?: Context): Promise<InventoryLevelDTO>;
317
385
  /**
318
- * This method is used to create a reservation item.
386
+ * This method retrieves a reservation item by its ID.
319
387
  *
320
- * @param {CreateReservationItemInput} input - The details of the reservation item to create.
321
- * @param {SharedContext} context - A context used to share resources, such as transaction manager, between the application and the module.
322
- * @returns {Promise<ReservationItemDTO>} The created reservation item's details.
388
+ * @param {string} reservationId - The reservation's ID.
389
+ * @param {FindConfig<ReservationItemDTO>} config - The configurations determining how the reservation item is retrieved. Its properties, such as `select` or `relations`, accept the
390
+ * attributes or relations associated with a reservation item.
391
+ * @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
392
+ * @returns {Promise<ReservationItemDTO>} The retrieved reservation item.
323
393
  *
324
394
  * @example
325
- * import {
326
- * initialize as initializeInventoryModule,
327
- * } from "@medusajs/inventory"
395
+ * A simple example that retrieves a reservation item by its ID:
328
396
  *
329
- * async function createReservationItem (item: {
330
- * inventory_item_id: string,
331
- * location_id: string,
332
- * quantity: number
333
- * }) {
334
- * const inventoryModule = await initializeInventoryModule({})
335
- *
336
- * const reservationItem = await inventoryModule.createReservationItems(
337
- * item
397
+ * ```ts
398
+ * const reservationItem =
399
+ * await inventoryModuleService.retrieveReservationItem(
400
+ * "resitem"
338
401
  * )
402
+ * ```
339
403
  *
340
- * // do something with the reservation item or return them
341
- * }
404
+ * To specify relations that should be retrieved:
405
+ *
406
+ * ```ts
407
+ * const reservationItem =
408
+ * await inventoryModuleService.retrieveReservationItem(
409
+ * "resitem",
410
+ * {
411
+ * relations: ["inventory_item"],
412
+ * }
413
+ * )
414
+ * ```
342
415
  */
343
- createReservationItem(input: CreateReservationItemInput, context?: SharedContext): Promise<ReservationItemDTO>;
416
+ retrieveReservationItem(reservationId: string, config?: FindConfig<ReservationItemDTO>, context?: Context): Promise<ReservationItemDTO>;
344
417
  /**
345
- * This method is used to create reservation items.
418
+ * This method creates reservation items.
346
419
  *
347
- * @param {CreateReservationItemInput[]} input - The details of the reservation items to create.
348
- * @param {SharedContext} context - A context used to share resources, such as transaction manager, between the application and the module.
349
- * @returns { Promise<ReservationItemDTO[]>} The created reservation items' details.
420
+ * @param {CreateReservationItemInput[]} input - The details of the reservation items to be created.
421
+ * @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
422
+ * @returns {Promise<ReservationItemDTO[]>} The created reservation items.
350
423
  *
351
424
  * @example
352
- * import {
353
- * initialize as initializeInventoryModule,
354
- * } from "@medusajs/inventory"
355
- *
356
- * async function createReservationItems (items: {
357
- * inventory_item_id: string,
358
- * location_id: string,
359
- * quantity: number
360
- * }[]) {
361
- * const inventoryModule = await initializeInventoryModule({})
362
- *
363
- * const reservationItems = await inventoryModule.createReservationItems(
364
- * items
365
- * )
366
- *
367
- * // do something with the reservation items or return them
368
- * }
425
+ * const reservationItems =
426
+ * await inventoryModuleService.createReservationItems([
427
+ * {
428
+ * inventory_item_id: "iitem_123",
429
+ * location_id: "loc_123",
430
+ * quantity: 10,
431
+ * },
432
+ * ])
369
433
  */
370
- createReservationItems(input: CreateReservationItemInput[], context?: SharedContext): Promise<ReservationItemDTO[]>;
434
+ createReservationItems(input: CreateReservationItemInput[], context?: Context): Promise<ReservationItemDTO[]>;
371
435
  /**
372
- * This method is used to create an inventory item.
436
+ * This method creates a reservation item.
373
437
  *
374
- * @param {CreateInventoryItemInput} input - The details of the inventory item to create.
375
- * @param {SharedContext} context - A context used to share resources, such as transaction manager, between the application and the module.
376
- * @returns {Promise<InventoryItemDTO>} The created inventory item's details.
438
+ * @param {CreateReservationItemInput} input - The details of the reservation item to be created.
439
+ * @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
440
+ * @returns {Promise<ReservationItemDTO>} The created reservation item.
377
441
  *
378
442
  * @example
379
- * import {
380
- * initialize as initializeInventoryModule,
381
- * } from "@medusajs/inventory"
382
- *
383
- * async function createInventoryItem (item: {
384
- * sku: string,
385
- * requires_shipping: boolean
386
- * }) {
387
- * const inventoryModule = await initializeInventoryModule({})
388
- *
389
- * const inventoryItem = await inventoryModule.createInventoryItem(
390
- * item
391
- * )
392
- *
393
- * // do something with the inventory item or return it
394
- * }
443
+ * const reservationItem =
444
+ * await inventoryModuleService.createReservationItems({
445
+ * inventory_item_id: "iitem_123",
446
+ * location_id: "loc_123",
447
+ * quantity: 10,
448
+ * })
395
449
  */
396
- createInventoryItem(input: CreateInventoryItemInput, context?: SharedContext): Promise<InventoryItemDTO>;
450
+ createReservationItems(input: CreateReservationItemInput, context?: Context): Promise<ReservationItemDTO>;
397
451
  /**
398
- * This method is used to create inventory items.
452
+ * This method creates inventory items.
399
453
  *
400
- * @param {CreateInventoryItemInput[]} input - The details of the inventory items to create.
401
- * @param {SharedContext} context - A context used to share resources, such as transaction manager, between the application and the module.
402
- * @returns {Promise<InventoryItemDTO[]>} The created inventory items' details.
454
+ * @param {CreateInventoryItemInput[]} input - The details of the inventory items to be created.
455
+ * @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
456
+ * @returns {Promise<InventoryItemDTO[]>} The created inventory items.
403
457
  *
404
458
  * @example
405
- * import {
406
- * initialize as initializeInventoryModule,
407
- * } from "@medusajs/inventory"
408
- *
409
- * async function createInventoryItems (items: {
410
- * sku: string,
411
- * requires_shipping: boolean
412
- * }[]) {
413
- * const inventoryModule = await initializeInventoryModule({})
414
- *
415
- * const inventoryItems = await inventoryModule.createInventoryItems(
416
- * items
417
- * )
418
- *
419
- * // do something with the inventory items or return them
420
- * }
459
+ * const inventoryItems = await inventoryModuleService.createInventoryItems([
460
+ * {
461
+ * sku: "SHIRT",
462
+ * },
463
+ * ])
421
464
  */
422
- createInventoryItems(input: CreateInventoryItemInput[], context?: SharedContext): Promise<InventoryItemDTO[]>;
465
+ createInventoryItems(input: CreateInventoryItemInput[], context?: Context): Promise<InventoryItemDTO[]>;
423
466
  /**
424
- * This method is used to create inventory level.
467
+ * This method creates an inventory item.
425
468
  *
426
- * @param {CreateInventoryLevelInput} data - The details of the inventory level to create.
427
- * @param {SharedContext} context - A context used to share resources, such as transaction manager, between the application and the module.
428
- * @returns {Promise<InventoryLevelDTO>} The created inventory level's details.
469
+ * @param {CreateInventoryItemInput} input - The details of the inventory item to be created.
470
+ * @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
471
+ * @returns {Promise<InventoryItemDTO>} The created inventory item.
429
472
  *
430
473
  * @example
431
- * import {
432
- * initialize as initializeInventoryModule,
433
- * } from "@medusajs/inventory"
434
- *
435
- * async function createInventoryLevel (item: {
436
- * inventory_item_id: string
437
- * location_id: string
438
- * stocked_quantity: number
439
- * }) {
440
- * const inventoryModule = await initializeInventoryModule({})
441
- *
442
- * const inventoryLevel = await inventoryModule.createInventoryLevel(
443
- * item
444
- * )
445
- *
446
- * // do something with the inventory level or return it
447
- * }
474
+ * const inventoryItem = await inventoryModuleService.createInventoryItems({
475
+ * sku: "SHIRT",
476
+ * })
448
477
  */
449
- createInventoryLevel(data: CreateInventoryLevelInput, context?: SharedContext): Promise<InventoryLevelDTO>;
478
+ createInventoryItems(input: CreateInventoryItemInput, context?: Context): Promise<InventoryItemDTO>;
450
479
  /**
451
- * This method is used to create inventory levels.
480
+ * This method creates inventory levels.
452
481
  *
453
- * @param {CreateInventoryLevelInput[]} data - The details of the inventory levels to create.
454
- * @param {SharedContext} context - A context used to share resources, such as transaction manager, between the application and the module.
455
- * @returns {Promise<InventoryLevelDTO[]>} The created inventory levels' details.
482
+ * @param {CreateInventoryLevelInput[]} data - The details of the inventory levels to be created.
483
+ * @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
484
+ * @returns {Promise<InventoryLevelDTO[]>} The created inventory levels.
456
485
  *
457
486
  * @example
458
- * import {
459
- * initialize as initializeInventoryModule,
460
- * } from "@medusajs/inventory"
461
- *
462
- * async function createInventoryLevels (items: {
463
- * inventory_item_id: string
464
- * location_id: string
465
- * stocked_quantity: number
466
- * }[]) {
467
- * const inventoryModule = await initializeInventoryModule({})
468
- *
469
- * const inventoryLevels = await inventoryModule.createInventoryLevels(
470
- * items
471
- * )
472
- *
473
- * // do something with the inventory levels or return them
474
- * }
487
+ * const inventoryLevels =
488
+ * await inventoryModuleService.createInventoryLevels([
489
+ * {
490
+ * inventory_item_id: "iitem_123",
491
+ * location_id: "loc_123",
492
+ * stocked_quantity: 10,
493
+ * },
494
+ * {
495
+ * inventory_item_id: "iitem_321",
496
+ * location_id: "loc_321",
497
+ * stocked_quantity: 20,
498
+ * reserved_quantity: 10,
499
+ * },
500
+ * ])
475
501
  */
476
- createInventoryLevels(data: CreateInventoryLevelInput[], context?: SharedContext): Promise<InventoryLevelDTO[]>;
502
+ createInventoryLevels(data: CreateInventoryLevelInput[], context?: Context): Promise<InventoryLevelDTO[]>;
477
503
  /**
478
- * This method is used to update inventory levels. Each inventory level is identified by the IDs of its associated inventory item and location.
504
+ * This method creates an inventory level.
479
505
  *
480
- * @param {BulkUpdateInventoryLevelInput} updates - The attributes to update in each inventory level.
481
- * @param {SharedContext} context - A context used to share resources, such as transaction manager, between the application and the module.
482
- * @returns {Promise<InventoryLevelDTO[]>} The updated inventory levels' details.
506
+ * @param {CreateInventoryLevelInput} data - The details of the inventory level to be created.
507
+ * @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
508
+ * @returns {Promise<InventoryLevelDTO>} The created inventory level.
483
509
  *
484
510
  * @example
485
- * import {
486
- * initialize as initializeInventoryModule,
487
- * } from "@medusajs/inventory"
488
- *
489
- * async function updateInventoryLevels (items: {
490
- * inventory_item_id: string,
491
- * location_id: string,
492
- * stocked_quantity: number
493
- * }[]) {
494
- * const inventoryModule = await initializeInventoryModule({})
495
- *
496
- * const inventoryLevels = await inventoryModule.updateInventoryLevels(
497
- * items
498
- * )
499
- *
500
- * // do something with the inventory levels or return them
501
- * }
511
+ * const inventoryLevels =
512
+ * await inventoryModuleService.createInventoryLevels({
513
+ * inventory_item_id: "iitem_123",
514
+ * location_id: "loc_123",
515
+ * stocked_quantity: 10,
516
+ * })
502
517
  */
503
- updateInventoryLevels(updates: BulkUpdateInventoryLevelInput[], context?: SharedContext): Promise<InventoryLevelDTO[]>;
518
+ createInventoryLevels(data: CreateInventoryLevelInput, context?: Context): Promise<InventoryLevelDTO>;
504
519
  /**
505
- * This method is used to update an inventory level. The inventory level is identified by the IDs of its associated inventory item and location.
520
+ * This method updates existing inventory levels.
506
521
  *
507
- * @param {string} inventoryItemId - The ID of the inventory item.
508
- * @param {string} locationId - The ID of the location.
509
- * @param {UpdateInventoryLevelInput} update - The attributes to update in the location level.
510
- * @param {SharedContext} context - A context used to share resources, such as transaction manager, between the application and the module.
511
- * @returns {Promise<InventoryLevelDTO>} The updated inventory level's details.
522
+ * @param {BulkUpdateInventoryLevelInput[]} updates - The list of The attributes to update in an inventory level. The inventory level is identified by the IDs of its associated inventory item and location.
523
+ * @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
524
+ * @returns {Promise<InventoryLevelDTO[]>} The updated inventory levels.
512
525
  *
513
526
  * @example
514
- * import {
515
- * initialize as initializeInventoryModule,
516
- * } from "@medusajs/inventory"
517
- *
518
- * async function updateInventoryLevel (
519
- * inventoryItemId: string,
520
- * locationId: string,
521
- * stockedQuantity: number
522
- * ) {
523
- * const inventoryModule = await initializeInventoryModule({})
524
- *
525
- * const inventoryLevel = await inventoryModule.updateInventoryLevels(
526
- * inventoryItemId,
527
- * locationId,
527
+ * const inventoryLevels =
528
+ * await inventoryModuleService.updateInventoryLevels([
528
529
  * {
529
- * stocked_quantity: stockedQuantity
530
- * }
531
- * )
532
- *
533
- * // do something with the inventory level or return it
534
- * }
530
+ * inventory_item_id: "iitem_123",
531
+ * location_id: "loc_123",
532
+ * id: "ilev_123",
533
+ * stocked_quantity: 20,
534
+ * },
535
+ * ])
535
536
  */
536
- updateInventoryLevel(inventoryItemId: string, locationId: string, update: UpdateInventoryLevelInput, context?: SharedContext): Promise<InventoryLevelDTO>;
537
+ updateInventoryLevels(updates: BulkUpdateInventoryLevelInput[], context?: Context): Promise<InventoryLevelDTO[]>;
537
538
  /**
538
- * This method is used to update an inventory item.
539
+ * This method updates an existing inventory level.
539
540
  *
540
- * @param {string} inventoryItemId - The ID of the inventory item.
541
- * @param {Partial<CreateInventoryItemInput>} input - The attributes to update in the inventory item.
542
- * @param {SharedContext} context - A context used to share resources, such as transaction manager, between the application and the module.
543
- * @returns {Promise<InventoryItemDTO>} The updated inventory item's details.
541
+ * @param {BulkUpdateInventoryLevelInput} updates - The attributes to update in an inventory level. The inventory level is identified by the IDs of its associated inventory item and location.
542
+ * @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
543
+ * @returns {Promise<InventoryLevelDTO>} The updated inventory level.
544
544
  *
545
545
  * @example
546
- * import {
547
- * initialize as initializeInventoryModule,
548
- * } from "@medusajs/inventory"
546
+ * const inventoryLevel =
547
+ * await inventoryModuleService.updateInventoryLevels({
548
+ * inventory_item_id: "iitem_123",
549
+ * location_id: "loc_123",
550
+ * stocked_quantity: 20,
551
+ * })
552
+ */
553
+ updateInventoryLevels(updates: BulkUpdateInventoryLevelInput, context?: Context): Promise<InventoryLevelDTO>;
554
+ /**
555
+ * This method updates an existing inventory item.
549
556
  *
550
- * async function updateInventoryItem (
551
- * inventoryItemId: string,
552
- * sku: string
553
- * ) {
554
- * const inventoryModule = await initializeInventoryModule({})
557
+ * @param {UpdateInventoryItemInput} input - The attributes to update in the inventory item.
558
+ * @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
559
+ * @returns {Promise<InventoryItemDTO>} The updated inventory item.
555
560
  *
556
- * const inventoryItem = await inventoryModule.updateInventoryItem(
557
- * inventoryItemId,
558
- * {
559
- * sku
560
- * }
561
- * )
561
+ * @example
562
+ * const inventoryItem = await inventoryModuleService.updateInventoryItems({
563
+ * id: "iitem_123",
564
+ * title: "Medusa Shirt Inventory",
565
+ * })
566
+ */
567
+ updateInventoryItems(input: UpdateInventoryItemInput, context?: Context): Promise<InventoryItemDTO>;
568
+ /**
569
+ * This method updates existing inventory items.
562
570
  *
563
- * // do something with the inventory item or return it
564
- * }
571
+ * @param {UpdateInventoryItemInput[]} input - The attributes to update in the inventory items.
572
+ * @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
573
+ * @returns {Promise<InventoryItemDTO[]>} The updated inventory items.
574
+ *
575
+ * @example
576
+ * const inventoryItems = await inventoryModuleService.updateInventoryItems([
577
+ * {
578
+ * id: "iitem_123",
579
+ * title: "Medusa Shirt Inventory",
580
+ * },
581
+ * {
582
+ * id: "iitem_321",
583
+ * description: "The inventory of Medusa pants",
584
+ * },
585
+ * ])
565
586
  */
566
- updateInventoryItem(inventoryItemId: string, input: Partial<CreateInventoryItemInput>, context?: SharedContext): Promise<InventoryItemDTO>;
587
+ updateInventoryItems(input: UpdateInventoryItemInput[], context?: Context): Promise<InventoryItemDTO[]>;
567
588
  /**
568
- * This method is used to update a reservation item.
589
+ * This method updates an existing reservation item.
569
590
  *
570
- * @param {string} reservationItemId - The ID of the reservation item.
571
- * @param {UpdateReservationItemInput} input - The attributes to update in the reservation item.
572
- * @param {SharedContext} context - A context used to share resources, such as transaction manager, between the application and the module.
591
+ * @param {UpdateReservationItemInput} input - The attributes to update in a reservation item.
592
+ * @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
573
593
  * @returns {Promise<ReservationItemDTO>} The updated reservation item.
574
594
  *
575
595
  * @example
576
- * import {
577
- * initialize as initializeInventoryModule,
578
- * } from "@medusajs/inventory"
596
+ * const reservationItem =
597
+ * await inventoryModuleService.updateReservationItems({
598
+ * id: "resitem_123",
599
+ * quantity: 10,
600
+ * })
601
+ */
602
+ updateReservationItems(input: UpdateReservationItemInput, context?: Context): Promise<ReservationItemDTO>;
603
+ /**
604
+ * This method updates existing reservation items.
579
605
  *
580
- * async function updateReservationItem (
581
- * reservationItemId: string,
582
- * quantity: number
583
- * ) {
584
- * const inventoryModule = await initializeInventoryModule({})
606
+ * @param {UpdateReservationItemInput[]} input - The attributes to update in the reservation items.
607
+ * @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
608
+ * @returns {Promise<ReservationItemDTO[]>} The updated reservation items.
585
609
  *
586
- * const reservationItem = await inventoryModule.updateReservationItem(
587
- * reservationItemId,
610
+ * @example
611
+ * const reservationItems =
612
+ * await inventoryModuleService.updateReservationItems([
588
613
  * {
589
- * quantity
590
- * }
591
- * )
614
+ * id: "resitem_123",
615
+ * quantity: 10,
616
+ * },
617
+ * ])
618
+ */
619
+ updateReservationItems(input: UpdateReservationItemInput[], context?: Context): Promise<ReservationItemDTO[]>;
620
+ /**
621
+ * This method deletes a reservation item by its associated line item.
592
622
  *
593
- * // do something with the reservation item or return it
594
- * }
623
+ * @param {string | string[]} lineItemId - The line item's ID.
624
+ * @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
625
+ * @returns {Promise<void>} Resolves when the reservation item is deleted.
626
+ *
627
+ * @example
628
+ * await inventoryModuleService.deleteReservationItemByLocationId(
629
+ * "cali_123"
630
+ * )
595
631
  */
596
- updateReservationItem(reservationItemId: string, input: UpdateReservationItemInput, context?: SharedContext): Promise<ReservationItemDTO>;
632
+ deleteReservationItemsByLineItem(lineItemId: string | string[], context?: Context): Promise<void>;
597
633
  /**
598
- * This method is used to delete the reservation items associated with a line item or multiple line items.
634
+ * This method is used to restore the reservation items associated with a line item or multiple line items that were deleted.
599
635
  *
600
636
  * @param {string | string[]} lineItemId - The ID(s) of the line item(s).
601
637
  * @param {SharedContext} context - A context used to share re9sources, such as transaction manager, between the application and the module.
@@ -606,302 +642,297 @@ export interface IInventoryService extends IModuleService {
606
642
  * initialize as initializeInventoryModule,
607
643
  * } from "@medusajs/inventory"
608
644
  *
609
- * async function deleteReservationItemsByLineItem (
645
+ * async function restoreReservationItemsByLineItem (
610
646
  * lineItemIds: string[]
611
647
  * ) {
612
648
  * const inventoryModule = await initializeInventoryModule({})
613
649
  *
614
- * await inventoryModule.deleteReservationItemsByLineItem(
650
+ * await inventoryModule.restoreReservationItemsByLineItem(
615
651
  * lineItemIds
616
652
  * )
617
653
  * }
618
654
  */
619
- deleteReservationItemsByLineItem(lineItemId: string | string[], context?: SharedContext): Promise<void>;
655
+ restoreReservationItemsByLineItem(lineItemId: string | string[], context?: Context): Promise<void>;
620
656
  /**
621
- * This method is used to delete a reservation item or multiple reservation items by their IDs.
657
+ * This method deletes reservation items by their IDs.
622
658
  *
623
- * @param {string | string[]} reservationItemId - The ID(s) of the reservation item(s) to delete.
624
- * @param {SharedContext} context - A context used to share resources, such as transaction manager, between the application and the module.
625
- * @returns {Promise<void>} Resolves when the reservation item(s) are successfully deleted.
659
+ * @param {string | string[]} reservationItemId - The reservation items' IDs.
660
+ * @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
661
+ * @returns {Promise<void>} Resolves when the reservation item is deleted.
626
662
  *
627
663
  * @example
628
- * import {
629
- * initialize as initializeInventoryModule,
630
- * } from "@medusajs/inventory"
631
- *
632
- * async function deleteReservationItems (
633
- * reservationItemIds: string[]
634
- * ) {
635
- * const inventoryModule = await initializeInventoryModule({})
636
- *
637
- * await inventoryModule.deleteReservationItem(
638
- * reservationItemIds
639
- * )
640
- * }
664
+ * await inventoryModuleService.deleteReservationItems(
665
+ * "resitem_123"
666
+ * )
641
667
  */
642
- deleteReservationItem(reservationItemId: string | string[], context?: SharedContext): Promise<void>;
668
+ deleteReservationItems(reservationItemId: string | string[], context?: Context): Promise<void>;
643
669
  /**
644
- * This method is used to delete an inventory item or multiple inventory items. The inventory items are only soft deleted and can be restored using the
645
- * {@link restoreInventoryItem} method.
670
+ * This method soft deletes reservations by their IDs.
646
671
  *
647
- * @param {string | string[]} inventoryItemId - The ID(s) of the inventory item(s) to delete.
648
- * @param {SharedContext} context - A context used to share resources, such as transaction manager, between the application and the module.
649
- * @returns {Promise<void>} Resolves when the inventory item(s) are successfully deleted.
672
+ * @param {string[]} inventoryLevelIds - The reservations' IDs.
673
+ * @param {SoftDeleteReturn<TReturnableLinkableKeys>} config - An object that is used to specify an entity's related entities that should be soft-deleted when the main entity is soft-deleted.
674
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
675
+ * @returns {Promise<void | Record<string, string[]>>} An object that includes the IDs of related records that were also soft deleted.
676
+ * If there are no related records, the promise resolves to `void`.
650
677
  *
651
678
  * @example
652
- * import {
653
- * initialize as initializeInventoryModule,
654
- * } from "@medusajs/inventory"
679
+ * await inventoryModuleService.softDeleteReservationItems([
680
+ * "ilev_123",
681
+ * ])
682
+ */
683
+ softDeleteReservationItems<TReturnableLinkableKeys extends string = string>(ReservationItemIds: string[], config?: SoftDeleteReturn<TReturnableLinkableKeys>, sharedContext?: Context): Promise<Record<string, string[]> | void>;
684
+ /**
685
+ * This method restores soft deleted reservations by their IDs.
655
686
  *
656
- * async function deleteInventoryItem (
657
- * inventoryItems: string[]
658
- * ) {
659
- * const inventoryModule = await initializeInventoryModule({})
687
+ * @param {string[]} ReservationItemIds - The reservations' IDs.
688
+ * @param {RestoreReturn<TReturnableLinkableKeys>} config - Configurations determining which relations to restore along with each of the reservation. You can pass to its `returnLinkableKeys`
689
+ * property any of the reservation's relation attribute names, such as `{type relation name}`.
690
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
691
+ * @returns {Promise<void | Record<string, string[]>>} An object that includes the IDs of related records that were restored.
692
+ * If there are no related records restored, the promise resolves to `void`.
660
693
  *
661
- * await inventoryModule.deleteInventoryItem(
662
- * inventoryItems
663
- * )
664
- * }
694
+ * @example
695
+ * await inventoryModuleService.restoreReservationItems([
696
+ * "ilev_123",
697
+ * ])
665
698
  */
666
- deleteInventoryItem(inventoryItemId: string | string[], context?: SharedContext): Promise<void>;
699
+ restoreReservationItems<TReturnableLinkableKeys extends string = string>(ReservationItemIds: string[], config?: RestoreReturn<TReturnableLinkableKeys>, sharedContext?: Context): Promise<Record<string, string[]> | void>;
667
700
  /**
668
- * This method is used to restore an inventory item or multiple inventory items that were previously deleted using the {@link deleteInventoryItem} method.
701
+ * This method deletes inventory items by their IDs.
669
702
  *
670
- * @param {string | string[]} inventoryItemId - The ID(s) of the inventory item(s) to restore.
671
- * @param {SharedContext} context - A context used to share resources, such as transaction manager, between the application and the module.
672
- * @returns {Promise<void>} Resolves when the inventory item(s) are successfully restored.
703
+ * @param {string | string[]} inventoryItemId - The inventory item's ID.
704
+ * @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
705
+ * @returns {Promise<void>} Resolves when the inventory items are deleted.
673
706
  *
674
707
  * @example
675
- * import {
676
- * initialize as initializeInventoryModule,
677
- * } from "@medusajs/inventory"
708
+ * await inventoryModuleService.deleteInventoryItems("iitem_123")
709
+ */
710
+ deleteInventoryItems(inventoryItemId: string | string[], context?: Context): Promise<void>;
711
+ /**
712
+ * This method soft deletes inventory items by their IDs.
678
713
  *
679
- * async function restoreInventoryItem (
680
- * inventoryItems: string[]
681
- * ) {
682
- * const inventoryModule = await initializeInventoryModule({})
714
+ * @param {string[]} inventoryItemIds - The inventory items' IDs.
715
+ * @param {SoftDeleteReturn<TReturnableLinkableKeys>} config - An object that is used to specify an entity's related entities that should be soft-deleted when the main entity is soft-deleted.
716
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
717
+ * @returns {Promise<void | Record<string, string[]>>} An object that includes the IDs of related records that were also soft deleted, such as the ID of the associated location levels.
718
+ * The object's keys are the ID attribute names of the inventory service next entity's relations, such as `location_level_id`, and its value is an array of strings, each being the ID of a record associated
719
+ * with the inventory item through this relation, such as the IDs of associated location levels.
683
720
  *
684
- * await inventoryModule.restoreInventoryItem(
685
- * inventoryItems
686
- * )
687
- * }
721
+ * If there are no related records, the promise resolves to `void`.
722
+ *
723
+ * @example
724
+ * await inventoryModuleService.softDeleteInventoryItems(
725
+ * ["iitem_123", "iitem_321"],
726
+ * {
727
+ * returnLinkableKeys: ["location_level"],
728
+ * }
729
+ * )
688
730
  */
689
- restoreInventoryItem(inventoryItemId: string | string[], context?: SharedContext): Promise<void>;
731
+ softDeleteInventoryItems<TReturnableLinkableKeys extends string = string>(inventoryItemIds: string[], config?: SoftDeleteReturn<TReturnableLinkableKeys>, sharedContext?: Context): Promise<Record<string, string[]> | void>;
690
732
  /**
691
- * This method deletes the inventory item level(s) for the ID(s) of associated location(s).
733
+ * This method restores soft deleted inventory items by their IDs.
692
734
  *
693
- * @param {string | string[]} locationId - The ID(s) of the associated location(s).
694
- * @param {SharedContext} context - A context used to share resources, such as transaction manager, between the application and the module.
695
- * @returns {Promise<void>} Resolves when the inventory item level(s) are successfully restored.
735
+ * @param {string[]} inventoryItemIds - The inventory items' IDs.
736
+ * @param {RestoreReturn<TReturnableLinkableKeys>} config - Configurations determining which relations to restore along with each of the inventory items. You can pass to its `returnLinkableKeys`
737
+ * property any of the inventory item's relation attribute names, such as `location_levels`.
738
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
739
+ * @returns {Promise<void | Record<string, string[]>>} An object that includes the IDs of related records that were restored, such as the ID of associated location levels.
740
+ * The object's keys are the ID attribute names of the inventory item entity's relations, such as `location_level_id`,
741
+ * and its value is an array of strings, each being the ID of the record associated with the inventory item through this relation,
742
+ * such as the IDs of associated location levels.
743
+ *
744
+ * If there are no related records restored, the promise resolves to `void`.
696
745
  *
697
746
  * @example
698
- * import {
699
- * initialize as initializeInventoryModule,
700
- * } from "@medusajs/inventory"
747
+ * await inventoryModuleService.restoreInventoryItems(
748
+ * ["iitem_123", "iitem_321"],
749
+ * {
750
+ * returnLinkableKeys: ["location_level"],
751
+ * }
752
+ * )
753
+ */
754
+ restoreInventoryItems<TReturnableLinkableKeys extends string = string>(inventoryItemIds: string[], config?: RestoreReturn<TReturnableLinkableKeys>, sharedContext?: Context): Promise<Record<string, string[]> | void>;
755
+ /**
756
+ * This method soft deletes inventory item's level by the associated location.
701
757
  *
702
- * async function deleteInventoryItemLevelByLocationId (
703
- * locationIds: string[]
704
- * ) {
705
- * const inventoryModule = await initializeInventoryModule({})
758
+ * @param {string | string[]} locationId - The locations' IDs.
759
+ * @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
760
+ * @returns {Promise<[object[], Record<string, unknown[]>]>} An array, where the first item is an array includes the soft-deleted inventory levels,
761
+ * and the second is an object that includes the IDs of related records that were soft-deleted.
706
762
  *
707
- * await inventoryModule.deleteInventoryItemLevelByLocationId(
708
- * locationIds
709
- * )
710
- * }
763
+ * @example
764
+ * await inventoryModuleService.deleteInventoryItemLevelByLocationId(
765
+ * "loc_123"
766
+ * )
711
767
  */
712
- deleteInventoryItemLevelByLocationId(locationId: string | string[], context?: SharedContext): Promise<void>;
768
+ deleteInventoryItemLevelByLocationId(locationId: string | string[], context?: Context): Promise<[object[], Record<string, unknown[]>]>;
713
769
  /**
714
- * This method deletes reservation item(s) by the ID(s) of associated location(s).
770
+ * This method deletes reservation items by their associated location.
715
771
  *
716
- * @param {string | string[]} locationId - The ID(s) of the associated location(s).
717
- * @param {SharedContext} context - A context used to share resources, such as transaction manager, between the application and the module.
718
- * @returns {Promise<void>} Resolves when the reservation item(s) are successfully restored.
772
+ * @param {string | string[]} locationId - The location's ID.
773
+ * @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
774
+ * @returns {Promise<void>} Resolves when then reservation items are deleted successfully.
719
775
  *
720
776
  * @example
721
- * import {
722
- * initialize as initializeInventoryModule,
723
- * } from "@medusajs/inventory"
777
+ * await inventoryModuleService.deleteReservationItemByLocationId(
778
+ * "loc_123"
779
+ * )
780
+ */
781
+ deleteReservationItemByLocationId(locationId: string | string[], context?: Context): Promise<void>;
782
+ /**
783
+ * This method deletes an inventory level by its associated inventory item and location.
724
784
  *
725
- * async function deleteReservationItemByLocationId (
726
- * locationIds: string[]
727
- * ) {
728
- * const inventoryModule = await initializeInventoryModule({})
785
+ * @param {string} inventoryItemId - The inventory item's ID.
786
+ * @param {string} locationId - The location's ID.
787
+ * @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
788
+ * @returns {Promise<void>} Resolves when the inventory level is deleted successfully.
729
789
  *
730
- * await inventoryModule.deleteReservationItemByLocationId(
731
- * locationIds
732
- * )
733
- * }
790
+ * @example
791
+ * await inventoryModuleService.deleteInventoryLevel(
792
+ * "iitem_123",
793
+ * "loc_123"
794
+ * )
734
795
  */
735
- deleteReservationItemByLocationId(locationId: string | string[], context?: SharedContext): Promise<void>;
796
+ deleteInventoryLevel(inventoryItemId: string, locationId: string, context?: Context): Promise<void>;
736
797
  /**
737
- * This method is used to delete an inventory level. The inventory level is identified by the IDs of its associated inventory item and location.
798
+ * This method deletes inventory levels by their IDs.
738
799
  *
739
- * @param {string} inventoryItemId - The ID of the associated inventory item.
740
- * @param {string} locationId - The ID of the associated location.
741
- * @param {SharedContext} context - A context used to share resources, such as transaction manager, between the application and the module.
742
- * @returns {Promise<void>} Resolves when the inventory level(s) are successfully restored.
800
+ * @param {string | string[]} inventoryLevelIds - The inventory levels' IDs.
801
+ * @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
802
+ * @returns {Promise<void>} Resolves when the inventory levels are deleted.
743
803
  *
744
804
  * @example
745
- * import {
746
- * initialize as initializeInventoryModule,
747
- * } from "@medusajs/inventory"
805
+ * await inventoryModuleService.deleteInventoryLevels("ilev_123")
806
+ */
807
+ deleteInventoryLevels(inventoryLevelIds: string | string[], context?: Context): Promise<void>;
808
+ /**
809
+ * This method soft deletes inventory levels by their IDs.
748
810
  *
749
- * async function deleteInventoryLevel (
750
- * inventoryItemId: string,
751
- * locationId: string
752
- * ) {
753
- * const inventoryModule = await initializeInventoryModule({})
811
+ * @param {string[]} inventoryLevelIds - The inventory levels' IDs.
812
+ * @param {SoftDeleteReturn<TReturnableLinkableKeys>} config - An object that is used to specify an entity's related entities that should be soft-deleted when the main entity is soft-deleted.
813
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
814
+ * @returns {Promise<void | Record<string, string[]>>} An object that includes the IDs of related records that were also soft deleted.
815
+ * If there are no related records, the promise resolves to `void`.
754
816
  *
755
- * await inventoryModule.deleteInventoryLevel(
756
- * inventoryItemId,
757
- * locationId
758
- * )
759
- * }
817
+ * @example
818
+ * await inventoryModuleService.softDeleteInventoryLevels([
819
+ * "ilev_123",
820
+ * ])
760
821
  */
761
- deleteInventoryLevel(inventoryItemId: string, locationId: string, context?: SharedContext): Promise<void>;
822
+ softDeleteInventoryLevels<TReturnableLinkableKeys extends string = string>(inventoryLevelIds: string[], config?: SoftDeleteReturn<TReturnableLinkableKeys>, sharedContext?: Context): Promise<Record<string, string[]> | void>;
762
823
  /**
763
- * This method is used to adjust the inventory level's stocked quantity. The inventory level is identified by the IDs of its associated inventory item and location.
824
+ * This method restores soft deleted inventory levels by their IDs.
764
825
  *
765
- * @param {string} inventoryItemId - The ID of the associated inventory item.
766
- * @param {string} locationId - The ID of the associated location.
767
- * @param {number} adjustment - A positive or negative number used to adjust the inventory level's stocked quantity.
768
- * @param {SharedContext} context - A context used to share resources, such as transaction manager, between the application and the module.
769
- * @returns {Promise<InventoryLevelDTO>} The inventory level's details.
826
+ * @param {string[]} inventoryLevelIds - The inventory levels' IDs.
827
+ * @param {RestoreReturn<TReturnableLinkableKeys>} config - Configurations determining which relations to restore along with each of the inventory level. You can pass to its `returnLinkableKeys`
828
+ * property any of the inventory level's relation attribute names, such as `{type relation name}`.
829
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
830
+ * @returns {Promise<void | Record<string, string[]>>} An object that includes the IDs of related records that were restored.
831
+ * If there are no related records restored, the promise resolves to `void`.
770
832
  *
771
833
  * @example
772
- * import {
773
- * initialize as initializeInventoryModule,
774
- * } from "@medusajs/inventory"
834
+ * await inventoryModuleService.restoreInventoryLevels([
835
+ * "ilev_123",
836
+ * ])
837
+ */
838
+ restoreInventoryLevels<TReturnableLinkableKeys extends string = string>(inventoryLevelIds: string[], config?: RestoreReturn<TReturnableLinkableKeys>, sharedContext?: Context): Promise<Record<string, string[]> | void>;
839
+ /**
840
+ * This method adjusts the inventory quantity of an item in a location.
775
841
  *
776
- * async function adjustInventory (
777
- * inventoryItemId: string,
778
- * locationId: string,
779
- * adjustment: number
780
- * ) {
781
- * const inventoryModule = await initializeInventoryModule({})
842
+ * @param {string} inventoryItemId - The inventory item's ID.
843
+ * @param {string} locationId - The location's ID.
844
+ * @param {number} adjustment - the adjustment to make to the quantity.
845
+ * @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
846
+ * @returns {Promise<InventoryLevelDTO>} The updated inventory level.
782
847
  *
783
- * const inventoryLevel = await inventoryModule.adjustInventory(
784
- * inventoryItemId,
785
- * locationId,
786
- * adjustment
848
+ * @example
849
+ * // add to the inventory quantity
850
+ * const inventoryLevel1 =
851
+ * await inventoryModuleService.adjustInventory(
852
+ * "iitem_123",
853
+ * "loc_123",
854
+ * 5
787
855
  * )
788
856
  *
789
- * // do something with the inventory level or return it.
790
- * }
857
+ * // subtract from the inventory quantity
858
+ * const inventoryLevel2 =
859
+ * await inventoryModuleService.adjustInventory(
860
+ * "iitem_123",
861
+ * "loc_123",
862
+ * -5
863
+ * )
791
864
  */
792
- adjustInventory(inventoryItemId: string, locationId: string, adjustment: number, context?: SharedContext): Promise<InventoryLevelDTO>;
865
+ adjustInventory(data: {
866
+ inventoryItemId: string;
867
+ locationId: string;
868
+ adjustment: number;
869
+ }[], context?: Context): Promise<InventoryLevelDTO[]>;
870
+ adjustInventory(inventoryItemId: string, locationId: string, adjustment: number, context?: Context): Promise<InventoryLevelDTO>;
793
871
  /**
794
- * This method is used to confirm whether the specified quantity of an inventory item is available in the specified locations.
872
+ * This method confirms that a quantity is available of an inventory item in the specified locations.
795
873
  *
796
- * @param {string} inventoryItemId - The ID of the inventory item to check its availability.
797
- * @param {string[]} locationIds - The IDs of the locations to check the quantity availability in.
798
- * @param {number} quantity - The quantity to check if available for the inventory item in the specified locations.
799
- * @param {SharedContext} context - A context used to share resources, such as transaction manager, between the application and the module.
800
- * @returns {Promise<boolean>} Whether the specified quantity is available for the inventory item in the specified locations.
874
+ * @param {string} inventoryItemId - The inventory item's ID.
875
+ * @param {string[]} locationIds - The locations' IDs.
876
+ * @param {number} quantity - The quantity to confirm its availability.
877
+ * @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
878
+ * @returns {Promise<boolean>} Whether the quantity is available.
801
879
  *
802
880
  * @example
803
- * import {
804
- * initialize as initializeInventoryModule,
805
- * } from "@medusajs/inventory"
806
- *
807
- * async function confirmInventory (
808
- * inventoryItemId: string,
809
- * locationIds: string[],
810
- * quantity: number
811
- * ) {
812
- * const inventoryModule = await initializeInventoryModule({})
813
- *
814
- * return await inventoryModule.confirmInventory(
815
- * inventoryItemId,
816
- * locationIds,
817
- * quantity
881
+ * const isAvailable =
882
+ * await inventoryModuleService.confirmInventory(
883
+ * "iitem_123",
884
+ * ["loc_123", "loc_321"],
885
+ * 10
818
886
  * )
819
- * }
820
887
  */
821
- confirmInventory(inventoryItemId: string, locationIds: string[], quantity: number, context?: SharedContext): Promise<boolean>;
888
+ confirmInventory(inventoryItemId: string, locationIds: string[], quantity: number, context?: Context): Promise<boolean>;
822
889
  /**
823
- * This method is used to retrieve the available quantity of an inventory item within the specified locations.
890
+ * This method retrieves the available quantity of an inventory item in the specified locations.
824
891
  *
825
- * @param {string} inventoryItemId - The ID of the inventory item to retrieve its quantity.
826
- * @param {string[]} locationIds - The IDs of the locations to retrieve the available quantity from.
827
- * @param {SharedContext} context - A context used to share resources, such as transaction manager, between the application and the module.
828
- * @returns {Promise<number>} The available quantity of the inventory item in the specified locations.
892
+ * @param {string} inventoryItemId - The inventory item's ID.
893
+ * @param {string[]} locationIds - The locations' IDs.
894
+ * @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
895
+ * @returns {Promise<number>} The available quantity of the item.
829
896
  *
830
897
  * @example
831
- * import {
832
- * initialize as initializeInventoryModule,
833
- * } from "@medusajs/inventory"
834
- *
835
- * async function retrieveAvailableQuantity (
836
- * inventoryItemId: string,
837
- * locationIds: string[],
838
- * ) {
839
- * const inventoryModule = await initializeInventoryModule({})
840
- *
841
- * const quantity = await inventoryModule.retrieveAvailableQuantity(
842
- * inventoryItemId,
843
- * locationIds,
898
+ * const availableQuantity =
899
+ * await inventoryModuleService.retrieveAvailableQuantity(
900
+ * "iitem_123",
901
+ * ["loc_123", "loc_321"]
844
902
  * )
845
- *
846
- * // do something with the quantity or return it
847
- * }
848
903
  */
849
- retrieveAvailableQuantity(inventoryItemId: string, locationIds: string[], context?: SharedContext): Promise<number>;
904
+ retrieveAvailableQuantity(inventoryItemId: string, locationIds: string[], context?: Context): Promise<number>;
850
905
  /**
851
- * This method is used to retrieve the stocked quantity of an inventory item within the specified locations.
906
+ * This method retrieves the stocked quantity of an inventory item in the specified location.
852
907
  *
853
- * @param {string} inventoryItemId - The ID of the inventory item to retrieve its stocked quantity.
854
- * @param {string[]} locationIds - The IDs of the locations to retrieve the stocked quantity from.
855
- * @param {SharedContext} context - A context used to share resources, such as transaction manager, between the application and the module.
856
- * @returns {Promise<number>} The stocked quantity of the inventory item in the specified locations.
908
+ * @param {string} inventoryItemId - The inventory item's ID.
909
+ * @param {string[]} locationIds - The locations' IDs.
910
+ * @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
911
+ * @returns {Promise<number>} The stocked quantity of the item.
857
912
  *
858
913
  * @example
859
- * import {
860
- * initialize as initializeInventoryModule,
861
- * } from "@medusajs/inventory"
862
- *
863
- * async function retrieveStockedQuantity (
864
- * inventoryItemId: string,
865
- * locationIds: string[],
866
- * ) {
867
- * const inventoryModule = await initializeInventoryModule({})
868
- *
869
- * const quantity = await inventoryModule.retrieveStockedQuantity(
870
- * inventoryItemId,
871
- * locationIds,
914
+ * const stockedQuantity =
915
+ * await inventoryModuleService.retrieveStockedQuantity(
916
+ * "iitem_123",
917
+ * ["loc_123", "loc_321"]
872
918
  * )
873
- *
874
- * // do something with the quantity or return it
875
- * }
876
919
  */
877
- retrieveStockedQuantity(inventoryItemId: string, locationIds: string[], context?: SharedContext): Promise<number>;
920
+ retrieveStockedQuantity(inventoryItemId: string, locationIds: string[], context?: Context): Promise<number>;
878
921
  /**
879
- * This method is used to retrieve the reserved quantity of an inventory item within the specified locations.
922
+ * This method retrieves the reserved quantity of an inventory item in the specified location.
880
923
  *
881
- * @param {string} inventoryItemId - The ID of the inventory item to retrieve its reserved quantity.
882
- * @param {string[]} locationIds - The IDs of the locations to retrieve the reserved quantity from.
883
- * @param {SharedContext} context - A context used to share resources, such as transaction manager, between the application and the module.
884
- * @returns {Promise<number>} The reserved quantity of the inventory item in the specified locations.
924
+ * @param {string} inventoryItemId - The inventory item's ID.
925
+ * @param {string[]} locationIds - The locations' IDs.
926
+ * @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
927
+ * @returns {Promise<number>} The reserved quantity of the item.
885
928
  *
886
929
  * @example
887
- * import {
888
- * initialize as initializeInventoryModule,
889
- * } from "@medusajs/inventory"
890
- *
891
- * async function retrieveReservedQuantity (
892
- * inventoryItemId: string,
893
- * locationIds: string[],
894
- * ) {
895
- * const inventoryModule = await initializeInventoryModule({})
896
- *
897
- * const quantity = await inventoryModule.retrieveReservedQuantity(
898
- * inventoryItemId,
899
- * locationIds,
930
+ * const reservedQuantity =
931
+ * await inventoryModuleService.retrieveReservedQuantity(
932
+ * "iitem_123",
933
+ * ["loc_123", "loc_321"]
900
934
  * )
901
- *
902
- * // do something with the quantity or return it
903
- * }
904
935
  */
905
- retrieveReservedQuantity(inventoryItemId: string, locationIds: string[], context?: SharedContext): Promise<number>;
936
+ retrieveReservedQuantity(inventoryItemId: string, locationIds: string[], context?: Context): Promise<number>;
906
937
  }
907
938
  //# sourceMappingURL=service.d.ts.map