@medusajs/order 0.1.3 → 1.0.0-rc-20241001083650

Sign up to get free protection for your applications and to get access to all the features.
Files changed (379) hide show
  1. package/dist/index.d.ts +6 -8
  2. package/dist/index.d.ts.map +1 -0
  3. package/dist/index.js +4 -26
  4. package/dist/index.js.map +1 -1
  5. package/dist/joiner-config.d.ts +2 -5
  6. package/dist/joiner-config.d.ts.map +1 -0
  7. package/dist/joiner-config.js +21 -28
  8. package/dist/joiner-config.js.map +1 -1
  9. package/dist/migrations/Migration20240219102530.d.ts +1 -0
  10. package/dist/migrations/Migration20240219102530.d.ts.map +1 -0
  11. package/dist/migrations/Migration20240219102530.js +53 -19
  12. package/dist/migrations/Migration20240219102530.js.map +1 -1
  13. package/dist/migrations/Migration20240604100512.d.ts +5 -0
  14. package/dist/migrations/Migration20240604100512.d.ts.map +1 -0
  15. package/dist/migrations/Migration20240604100512.js +371 -0
  16. package/dist/migrations/Migration20240604100512.js.map +1 -0
  17. package/dist/migrations/Migration20240715102100.d.ts +5 -0
  18. package/dist/migrations/Migration20240715102100.d.ts.map +1 -0
  19. package/dist/migrations/Migration20240715102100.js +15 -0
  20. package/dist/migrations/Migration20240715102100.js.map +1 -0
  21. package/dist/migrations/Migration20240715174100.d.ts +5 -0
  22. package/dist/migrations/Migration20240715174100.d.ts.map +1 -0
  23. package/dist/migrations/Migration20240715174100.js +21 -0
  24. package/dist/migrations/Migration20240715174100.js.map +1 -0
  25. package/dist/migrations/Migration20240716081800.d.ts +5 -0
  26. package/dist/migrations/Migration20240716081800.d.ts.map +1 -0
  27. package/dist/migrations/Migration20240716081800.js +67 -0
  28. package/dist/migrations/Migration20240716081800.js.map +1 -0
  29. package/dist/migrations/Migration20240801085921.d.ts +5 -0
  30. package/dist/migrations/Migration20240801085921.d.ts.map +1 -0
  31. package/dist/migrations/Migration20240801085921.js +30 -0
  32. package/dist/migrations/Migration20240801085921.js.map +1 -0
  33. package/dist/migrations/Migration20240821164505.d.ts +6 -0
  34. package/dist/migrations/Migration20240821164505.d.ts.map +1 -0
  35. package/dist/migrations/Migration20240821164505.js +26 -0
  36. package/dist/migrations/Migration20240821164505.js.map +1 -0
  37. package/dist/migrations/Migration20240821170920.d.ts +6 -0
  38. package/dist/migrations/Migration20240821170920.d.ts.map +1 -0
  39. package/dist/migrations/Migration20240821170920.js +18 -0
  40. package/dist/migrations/Migration20240821170920.js.map +1 -0
  41. package/dist/migrations/Migration20240827133639.d.ts +6 -0
  42. package/dist/migrations/Migration20240827133639.d.ts.map +1 -0
  43. package/dist/migrations/Migration20240827133639.js +17 -0
  44. package/dist/migrations/Migration20240827133639.js.map +1 -0
  45. package/dist/migrations/Migration20240902195921.d.ts +6 -0
  46. package/dist/migrations/Migration20240902195921.d.ts.map +1 -0
  47. package/dist/migrations/Migration20240902195921.js +16 -0
  48. package/dist/migrations/Migration20240902195921.js.map +1 -0
  49. package/dist/migrations/Migration20240913092514.d.ts +6 -0
  50. package/dist/migrations/Migration20240913092514.d.ts.map +1 -0
  51. package/dist/migrations/Migration20240913092514.js +17 -0
  52. package/dist/migrations/Migration20240913092514.js.map +1 -0
  53. package/dist/models/address.d.ts +4 -3
  54. package/dist/models/address.d.ts.map +1 -0
  55. package/dist/models/address.js +22 -22
  56. package/dist/models/address.js.map +1 -1
  57. package/dist/models/adjustment-line.d.ts +5 -3
  58. package/dist/models/adjustment-line.d.ts.map +1 -0
  59. package/dist/models/adjustment-line.js +6 -1
  60. package/dist/models/adjustment-line.js.map +1 -1
  61. package/dist/models/claim-item-image.d.ts +19 -0
  62. package/dist/models/claim-item-image.d.ts.map +1 -0
  63. package/dist/models/claim-item-image.js +109 -0
  64. package/dist/models/claim-item-image.js.map +1 -0
  65. package/dist/models/claim-item.d.ts +29 -0
  66. package/dist/models/claim-item.d.ts.map +1 -0
  67. package/dist/models/claim-item.js +157 -0
  68. package/dist/models/claim-item.js.map +1 -0
  69. package/dist/models/claim.d.ts +37 -0
  70. package/dist/models/claim.d.ts.map +1 -0
  71. package/dist/models/claim.js +201 -0
  72. package/dist/models/claim.js.map +1 -0
  73. package/dist/models/exchange-item.d.ts +24 -0
  74. package/dist/models/exchange-item.d.ts.map +1 -0
  75. package/dist/models/exchange-item.js +138 -0
  76. package/dist/models/exchange-item.js.map +1 -0
  77. package/dist/models/exchange.d.ts +35 -0
  78. package/dist/models/exchange.d.ts.map +1 -0
  79. package/dist/models/exchange.js +194 -0
  80. package/dist/models/exchange.js.map +1 -0
  81. package/dist/models/index.d.ts +18 -9
  82. package/dist/models/index.d.ts.map +1 -0
  83. package/dist/models/index.js +26 -10
  84. package/dist/models/index.js.map +1 -1
  85. package/dist/models/line-item-adjustment.d.ts +5 -3
  86. package/dist/models/line-item-adjustment.d.ts.map +1 -0
  87. package/dist/models/line-item-adjustment.js +12 -12
  88. package/dist/models/line-item-adjustment.js.map +1 -1
  89. package/dist/models/line-item-tax-line.d.ts +5 -3
  90. package/dist/models/line-item-tax-line.d.ts.map +1 -0
  91. package/dist/models/line-item-tax-line.js +12 -12
  92. package/dist/models/line-item-tax-line.js.map +1 -1
  93. package/dist/models/line-item.d.ts +11 -8
  94. package/dist/models/line-item.d.ts.map +1 -0
  95. package/dist/models/line-item.js +58 -39
  96. package/dist/models/line-item.js.map +1 -1
  97. package/dist/models/order-change-action.d.ts +17 -6
  98. package/dist/models/order-change-action.d.ts.map +1 -0
  99. package/dist/models/order-change-action.js +110 -8
  100. package/dist/models/order-change-action.js.map +1 -1
  101. package/dist/models/order-change.d.ts +18 -6
  102. package/dist/models/order-change.d.ts.map +1 -0
  103. package/dist/models/order-change.js +108 -6
  104. package/dist/models/order-change.js.map +1 -1
  105. package/dist/models/order-item.d.ts +10 -7
  106. package/dist/models/order-item.d.ts.map +1 -0
  107. package/dist/models/order-item.js +29 -19
  108. package/dist/models/order-item.js.map +1 -1
  109. package/dist/models/order-shipping-method.d.ts +17 -7
  110. package/dist/models/order-shipping-method.d.ts.map +1 -0
  111. package/dist/models/order-shipping-method.js +113 -33
  112. package/dist/models/order-shipping-method.js.map +1 -1
  113. package/dist/models/order-summary.d.ts +7 -8
  114. package/dist/models/order-summary.d.ts.map +1 -0
  115. package/dist/models/order-summary.js +14 -10
  116. package/dist/models/order-summary.js.map +1 -1
  117. package/dist/models/order.d.ts +13 -11
  118. package/dist/models/order.d.ts.map +1 -0
  119. package/dist/models/order.js +12 -2
  120. package/dist/models/order.js.map +1 -1
  121. package/dist/models/return-item.d.ts +31 -0
  122. package/dist/models/return-item.d.ts.map +1 -0
  123. package/dist/models/return-item.js +180 -0
  124. package/dist/models/return-item.js.map +1 -0
  125. package/dist/models/return-reason.d.ts +22 -0
  126. package/dist/models/return-reason.d.ts.map +1 -0
  127. package/dist/models/return-reason.js +122 -0
  128. package/dist/models/return-reason.js.map +1 -0
  129. package/dist/models/return.d.ts +41 -0
  130. package/dist/models/return.d.ts.map +1 -0
  131. package/dist/models/return.js +227 -0
  132. package/dist/models/return.js.map +1 -0
  133. package/dist/models/shipping-method-adjustment.d.ts +5 -3
  134. package/dist/models/shipping-method-adjustment.d.ts.map +1 -0
  135. package/dist/models/shipping-method-adjustment.js +12 -12
  136. package/dist/models/shipping-method-adjustment.js.map +1 -1
  137. package/dist/models/shipping-method-tax-line.d.ts +5 -3
  138. package/dist/models/shipping-method-tax-line.d.ts.map +1 -0
  139. package/dist/models/shipping-method-tax-line.js +12 -12
  140. package/dist/models/shipping-method-tax-line.js.map +1 -1
  141. package/dist/models/shipping-method.d.ts +10 -7
  142. package/dist/models/shipping-method.d.ts.map +1 -0
  143. package/dist/models/shipping-method.js +42 -24
  144. package/dist/models/shipping-method.js.map +1 -1
  145. package/dist/models/tax-line.d.ts +4 -2
  146. package/dist/models/tax-line.d.ts.map +1 -0
  147. package/dist/models/tax-line.js +8 -1
  148. package/dist/models/tax-line.js.map +1 -1
  149. package/dist/models/transaction.d.ts +18 -6
  150. package/dist/models/transaction.d.ts.map +1 -0
  151. package/dist/models/transaction.js +133 -24
  152. package/dist/models/transaction.js.map +1 -1
  153. package/dist/repositories/claim.d.ts +9 -0
  154. package/dist/repositories/claim.d.ts.map +1 -0
  155. package/dist/repositories/claim.js +11 -0
  156. package/dist/repositories/claim.js.map +1 -0
  157. package/dist/repositories/exchange.d.ts +9 -0
  158. package/dist/repositories/exchange.d.ts.map +1 -0
  159. package/dist/repositories/exchange.js +11 -0
  160. package/dist/repositories/exchange.js.map +1 -0
  161. package/dist/repositories/index.d.ts +5 -2
  162. package/dist/repositories/index.d.ts.map +1 -0
  163. package/dist/repositories/index.js +8 -17
  164. package/dist/repositories/index.js.map +1 -1
  165. package/dist/repositories/order.d.ts +2 -4
  166. package/dist/repositories/order.d.ts.map +1 -0
  167. package/dist/repositories/order.js +3 -86
  168. package/dist/repositories/order.js.map +1 -1
  169. package/dist/repositories/return.d.ts +9 -0
  170. package/dist/repositories/return.d.ts.map +1 -0
  171. package/dist/repositories/return.js +11 -0
  172. package/dist/repositories/return.js.map +1 -0
  173. package/dist/schema/index.d.ts +3 -0
  174. package/dist/schema/index.d.ts.map +1 -0
  175. package/dist/schema/index.js +556 -0
  176. package/dist/schema/index.js.map +1 -0
  177. package/dist/services/actions/cancel-claim.d.ts +3 -0
  178. package/dist/services/actions/cancel-claim.d.ts.map +1 -0
  179. package/dist/services/actions/cancel-claim.js +85 -0
  180. package/dist/services/actions/cancel-claim.js.map +1 -0
  181. package/dist/services/actions/cancel-exchange.d.ts +3 -0
  182. package/dist/services/actions/cancel-exchange.d.ts.map +1 -0
  183. package/dist/services/actions/cancel-exchange.js +71 -0
  184. package/dist/services/actions/cancel-exchange.js.map +1 -0
  185. package/dist/services/actions/cancel-fulfillment.d.ts +3 -0
  186. package/dist/services/actions/cancel-fulfillment.d.ts.map +1 -0
  187. package/dist/services/actions/cancel-fulfillment.js +31 -0
  188. package/dist/services/actions/cancel-fulfillment.js.map +1 -0
  189. package/dist/services/actions/cancel-return.d.ts +3 -0
  190. package/dist/services/actions/cancel-return.d.ts.map +1 -0
  191. package/dist/services/actions/cancel-return.js +69 -0
  192. package/dist/services/actions/cancel-return.js.map +1 -0
  193. package/dist/services/actions/create-claim.d.ts +3 -0
  194. package/dist/services/actions/create-claim.d.ts.map +1 -0
  195. package/dist/services/actions/create-claim.js +225 -0
  196. package/dist/services/actions/create-claim.js.map +1 -0
  197. package/dist/services/actions/create-exchange.d.ts +3 -0
  198. package/dist/services/actions/create-exchange.d.ts.map +1 -0
  199. package/dist/services/actions/create-exchange.js +191 -0
  200. package/dist/services/actions/create-exchange.js.map +1 -0
  201. package/dist/services/actions/create-return.d.ts +3 -0
  202. package/dist/services/actions/create-return.d.ts.map +1 -0
  203. package/dist/services/actions/create-return.js +100 -0
  204. package/dist/services/actions/create-return.js.map +1 -0
  205. package/dist/services/actions/index.d.ts +12 -0
  206. package/dist/services/actions/index.d.ts.map +1 -0
  207. package/dist/services/actions/index.js +28 -0
  208. package/dist/services/actions/index.js.map +1 -0
  209. package/dist/services/actions/receive-return.d.ts +3 -0
  210. package/dist/services/actions/receive-return.d.ts.map +1 -0
  211. package/dist/services/actions/receive-return.js +71 -0
  212. package/dist/services/actions/receive-return.js.map +1 -0
  213. package/dist/services/actions/register-delivery.d.ts +3 -0
  214. package/dist/services/actions/register-delivery.d.ts.map +1 -0
  215. package/dist/services/actions/register-delivery.js +29 -0
  216. package/dist/services/actions/register-delivery.js.map +1 -0
  217. package/dist/services/actions/register-fulfillment.d.ts +3 -0
  218. package/dist/services/actions/register-fulfillment.d.ts.map +1 -0
  219. package/dist/services/actions/register-fulfillment.js +29 -0
  220. package/dist/services/actions/register-fulfillment.js.map +1 -0
  221. package/dist/services/actions/register-shipment.d.ts +3 -0
  222. package/dist/services/actions/register-shipment.d.ts.map +1 -0
  223. package/dist/services/actions/register-shipment.js +37 -0
  224. package/dist/services/actions/register-shipment.js.map +1 -0
  225. package/dist/services/index.d.ts +1 -1
  226. package/dist/services/index.d.ts.map +1 -0
  227. package/dist/services/index.js +1 -3
  228. package/dist/services/index.js.map +1 -1
  229. package/dist/services/order-module-service.d.ts +191 -109
  230. package/dist/services/order-module-service.d.ts.map +1 -0
  231. package/dist/services/order-module-service.js +1165 -425
  232. package/dist/services/order-module-service.js.map +1 -1
  233. package/dist/services/order-service.d.ts +6 -5
  234. package/dist/services/order-service.d.ts.map +1 -0
  235. package/dist/services/order-service.js +2 -2
  236. package/dist/services/order-service.js.map +1 -1
  237. package/dist/tsconfig.tsbuildinfo +1 -0
  238. package/dist/types/address.d.ts +2 -1
  239. package/dist/types/address.d.ts.map +1 -0
  240. package/dist/types/index.d.ts +5 -2
  241. package/dist/types/index.d.ts.map +1 -0
  242. package/dist/types/index.js +2 -0
  243. package/dist/types/index.js.map +1 -1
  244. package/dist/types/line-item-adjustment.d.ts +2 -1
  245. package/dist/types/line-item-adjustment.d.ts.map +1 -0
  246. package/dist/types/line-item-tax-line.d.ts +1 -0
  247. package/dist/types/line-item-tax-line.d.ts.map +1 -0
  248. package/dist/types/line-item.d.ts +2 -1
  249. package/dist/types/line-item.d.ts.map +1 -0
  250. package/dist/types/order-change.d.ts +4 -0
  251. package/dist/types/order-change.d.ts.map +1 -0
  252. package/dist/types/order-change.js +3 -0
  253. package/dist/types/order-change.js.map +1 -0
  254. package/dist/types/order-detail.d.ts +3 -2
  255. package/dist/types/order-detail.d.ts.map +1 -0
  256. package/dist/types/order.d.ts +4 -3
  257. package/dist/types/order.d.ts.map +1 -0
  258. package/dist/types/return-reason.d.ts +5 -0
  259. package/dist/types/return-reason.d.ts.map +1 -0
  260. package/dist/types/return-reason.js +3 -0
  261. package/dist/types/return-reason.js.map +1 -0
  262. package/dist/types/shipping-method-adjustment.d.ts +2 -1
  263. package/dist/types/shipping-method-adjustment.d.ts.map +1 -0
  264. package/dist/types/shipping-method-tax-line.d.ts +1 -0
  265. package/dist/types/shipping-method-tax-line.d.ts.map +1 -0
  266. package/dist/types/shipping-method.d.ts +5 -1
  267. package/dist/types/shipping-method.d.ts.map +1 -0
  268. package/dist/types/tax-line.d.ts +2 -1
  269. package/dist/types/tax-line.d.ts.map +1 -0
  270. package/dist/types/transaction.d.ts +2 -1
  271. package/dist/types/transaction.d.ts.map +1 -0
  272. package/dist/types/utils/index.d.ts +41 -23
  273. package/dist/types/utils/index.d.ts.map +1 -0
  274. package/dist/types/utils/index.js +0 -1
  275. package/dist/types/utils/index.js.map +1 -1
  276. package/dist/utils/actions/cancel-item-fulfillment.d.ts +2 -0
  277. package/dist/utils/actions/cancel-item-fulfillment.d.ts.map +1 -0
  278. package/dist/utils/actions/cancel-item-fulfillment.js +34 -0
  279. package/dist/utils/actions/cancel-item-fulfillment.js.map +1 -0
  280. package/dist/utils/actions/cancel-return.d.ts +1 -0
  281. package/dist/utils/actions/cancel-return.d.ts.map +1 -0
  282. package/dist/utils/actions/cancel-return.js +9 -16
  283. package/dist/utils/actions/cancel-return.js.map +1 -1
  284. package/dist/utils/actions/deliver-item.d.ts +2 -0
  285. package/dist/utils/actions/deliver-item.d.ts.map +1 -0
  286. package/dist/utils/actions/deliver-item.js +38 -0
  287. package/dist/utils/actions/deliver-item.js.map +1 -0
  288. package/dist/utils/actions/fulfill-item.d.ts +1 -0
  289. package/dist/utils/actions/fulfill-item.d.ts.map +1 -0
  290. package/dist/utils/actions/fulfill-item.js +8 -12
  291. package/dist/utils/actions/fulfill-item.js.map +1 -1
  292. package/dist/utils/actions/index.d.ts +7 -1
  293. package/dist/utils/actions/index.d.ts.map +1 -0
  294. package/dist/utils/actions/index.js +6 -1
  295. package/dist/utils/actions/index.js.map +1 -1
  296. package/dist/utils/actions/item-add.d.ts +1 -0
  297. package/dist/utils/actions/item-add.d.ts.map +1 -0
  298. package/dist/utils/actions/item-add.js +17 -26
  299. package/dist/utils/actions/item-add.js.map +1 -1
  300. package/dist/utils/actions/item-remove.d.ts +1 -0
  301. package/dist/utils/actions/item-remove.d.ts.map +1 -0
  302. package/dist/utils/actions/item-remove.js +10 -30
  303. package/dist/utils/actions/item-remove.js.map +1 -1
  304. package/dist/utils/actions/item-update.d.ts +2 -0
  305. package/dist/utils/actions/item-update.d.ts.map +1 -0
  306. package/dist/utils/actions/item-update.js +37 -0
  307. package/dist/utils/actions/item-update.js.map +1 -0
  308. package/dist/utils/actions/receive-damaged-return-item.d.ts +1 -0
  309. package/dist/utils/actions/receive-damaged-return-item.d.ts.map +1 -0
  310. package/dist/utils/actions/receive-damaged-return-item.js +11 -37
  311. package/dist/utils/actions/receive-damaged-return-item.js.map +1 -1
  312. package/dist/utils/actions/receive-return-item.d.ts +1 -0
  313. package/dist/utils/actions/receive-return-item.d.ts.map +1 -0
  314. package/dist/utils/actions/receive-return-item.js +9 -38
  315. package/dist/utils/actions/receive-return-item.js.map +1 -1
  316. package/dist/utils/actions/reinstate-item.d.ts +2 -0
  317. package/dist/utils/actions/reinstate-item.d.ts.map +1 -0
  318. package/dist/utils/actions/reinstate-item.js +32 -0
  319. package/dist/utils/actions/reinstate-item.js.map +1 -0
  320. package/dist/utils/actions/return-item.d.ts +1 -0
  321. package/dist/utils/actions/return-item.d.ts.map +1 -0
  322. package/dist/utils/actions/return-item.js +10 -15
  323. package/dist/utils/actions/return-item.js.map +1 -1
  324. package/dist/utils/actions/ship-item.d.ts +1 -0
  325. package/dist/utils/actions/ship-item.d.ts.map +1 -0
  326. package/dist/utils/actions/ship-item.js +8 -12
  327. package/dist/utils/actions/ship-item.js.map +1 -1
  328. package/dist/utils/actions/shipping-add.d.ts +1 -0
  329. package/dist/utils/actions/shipping-add.d.ts.map +1 -0
  330. package/dist/utils/actions/shipping-add.js +18 -18
  331. package/dist/utils/actions/shipping-add.js.map +1 -1
  332. package/dist/utils/actions/shipping-remove.d.ts +2 -0
  333. package/dist/utils/actions/shipping-remove.d.ts.map +1 -0
  334. package/dist/utils/actions/shipping-remove.js +22 -0
  335. package/dist/utils/actions/shipping-remove.js.map +1 -0
  336. package/dist/utils/actions/write-off-item.d.ts +1 -0
  337. package/dist/utils/actions/write-off-item.d.ts.map +1 -0
  338. package/dist/utils/actions/write-off-item.js +8 -12
  339. package/dist/utils/actions/write-off-item.js.map +1 -1
  340. package/dist/utils/apply-order-changes.d.ts +18 -0
  341. package/dist/utils/apply-order-changes.d.ts.map +1 -0
  342. package/dist/utils/apply-order-changes.js +98 -0
  343. package/dist/utils/apply-order-changes.js.map +1 -0
  344. package/dist/utils/base-repository-find.d.ts +3 -0
  345. package/dist/utils/base-repository-find.d.ts.map +1 -0
  346. package/dist/utils/base-repository-find.js +154 -0
  347. package/dist/utils/base-repository-find.js.map +1 -0
  348. package/dist/utils/calculate-order-change.d.ts +12 -6
  349. package/dist/utils/calculate-order-change.d.ts.map +1 -0
  350. package/dist/utils/calculate-order-change.js +56 -187
  351. package/dist/utils/calculate-order-change.js.map +1 -1
  352. package/dist/utils/index.d.ts +4 -1
  353. package/dist/utils/index.d.ts.map +1 -0
  354. package/dist/utils/index.js +3 -1
  355. package/dist/utils/index.js.map +1 -1
  356. package/dist/utils/set-action-reference.d.ts +2 -0
  357. package/dist/utils/set-action-reference.d.ts.map +1 -0
  358. package/dist/utils/set-action-reference.js +10 -0
  359. package/dist/utils/set-action-reference.js.map +1 -0
  360. package/dist/utils/transform-order.d.ts +5 -4
  361. package/dist/utils/transform-order.d.ts.map +1 -0
  362. package/dist/utils/transform-order.js +138 -21
  363. package/dist/utils/transform-order.js.map +1 -1
  364. package/package.json +20 -21
  365. package/dist/module-definition.d.ts +0 -2
  366. package/dist/module-definition.js +0 -59
  367. package/dist/module-definition.js.map +0 -1
  368. package/dist/scripts/bin/run-seed.d.ts +0 -3
  369. package/dist/scripts/bin/run-seed.js +0 -49
  370. package/dist/scripts/bin/run-seed.js.map +0 -1
  371. package/dist/services/order-change-service.d.ts +0 -15
  372. package/dist/services/order-change-service.js +0 -96
  373. package/dist/services/order-change-service.js.map +0 -1
  374. package/dist/utils/action-key.d.ts +0 -13
  375. package/dist/utils/action-key.js +0 -18
  376. package/dist/utils/action-key.js.map +0 -1
  377. package/dist/utils/actions/cancel.d.ts +0 -1
  378. package/dist/utils/actions/cancel.js +0 -8
  379. package/dist/utils/actions/cancel.js.map +0 -1
@@ -1,18 +1,27 @@
1
- import { BigNumberRawValue, DAL } from "@medusajs/types";
2
- import { BigNumber } from "@medusajs/utils";
3
- import { OptionalProps } from "@mikro-orm/core";
1
+ import { BigNumberRawValue, DAL } from "@medusajs/framework/types";
2
+ import { BigNumber } from "@medusajs/framework/utils";
3
+ import { OptionalProps, Rel } from "@mikro-orm/core";
4
+ import OrderClaim from "./claim";
5
+ import OrderExchange from "./exchange";
4
6
  import Order from "./order";
5
7
  import OrderChange from "./order-change";
6
- type OptionalLineItemProps = DAL.EntityDateColumns;
8
+ import Return from "./return";
9
+ type OptionalLineItemProps = DAL.ModelDateColumns;
7
10
  export default class OrderChangeAction {
8
11
  [OptionalProps]?: OptionalLineItemProps;
9
12
  id: string;
10
13
  ordering: number;
11
14
  order_id: string | null;
12
- order: Order | null;
15
+ order: Rel<Order> | null;
16
+ return_id: string | null;
17
+ return: Return;
18
+ claim_id: string | null;
19
+ claim: OrderClaim;
20
+ exchange_id: string | null;
21
+ exchange: OrderExchange;
13
22
  version: number | null;
14
23
  order_change_id: string | null;
15
- order_change: OrderChange | null;
24
+ order_change: Rel<OrderChange> | null;
16
25
  reference: string | null;
17
26
  reference_id: string | null;
18
27
  action: string;
@@ -23,7 +32,9 @@ export default class OrderChangeAction {
23
32
  applied: boolean;
24
33
  created_at: Date;
25
34
  updated_at: Date;
35
+ deleted_at: Date | null;
26
36
  onCreate(): void;
27
37
  onInit(): void;
28
38
  }
29
39
  export {};
40
+ //# sourceMappingURL=order-change-action.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"order-change-action.d.ts","sourceRoot":"","sources":["../../src/models/order-change-action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAA;AAClE,OAAO,EACL,SAAS,EAKV,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAML,aAAa,EAGb,GAAG,EACJ,MAAM,iBAAiB,CAAA;AACxB,OAAO,UAAU,MAAM,SAAS,CAAA;AA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EAAE,IAAI,CAAA;IAIhB,UAAU,EAAE,IAAI,GAAG,IAAI,CAAO;IAG9B,QAAQ;IAeR,MAAM;CAaP"}
@@ -12,26 +12,55 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
12
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
- const utils_1 = require("@medusajs/utils");
15
+ const utils_1 = require("@medusajs/framework/utils");
16
16
  const core_1 = require("@mikro-orm/core");
17
+ const claim_1 = __importDefault(require("./claim"));
18
+ const exchange_1 = __importDefault(require("./exchange"));
17
19
  const order_1 = __importDefault(require("./order"));
18
20
  const order_change_1 = __importDefault(require("./order-change"));
21
+ const return_1 = __importDefault(require("./return"));
19
22
  const OrderChangeIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
20
23
  tableName: "order_change_action",
21
24
  columns: "order_change_id",
25
+ where: "deleted_at IS NOT NULL",
22
26
  });
23
27
  const OrderIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
24
28
  tableName: "order_change_action",
25
29
  columns: "order_id",
30
+ where: "deleted_at IS NOT NULL",
31
+ });
32
+ const ReturnIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
33
+ tableName: "order_change_action",
34
+ columns: "return_id",
35
+ where: "return_id IS NOT NULL AND deleted_at IS NOT NULL",
36
+ });
37
+ const OrderClaimIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
38
+ tableName: "order_change_action",
39
+ columns: "claim_id",
40
+ where: "claim_id IS NOT NULL AND deleted_at IS NOT NULL",
41
+ });
42
+ const OrderExchangeIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
43
+ tableName: "order_change_action",
44
+ columns: "exchange_id",
45
+ where: "exchange_id IS NOT NULL AND deleted_at IS NOT NULL",
46
+ });
47
+ const DeletedAtIndex = (0, utils_1.createPsqlIndexStatementHelper)({
48
+ tableName: "order_change_action",
49
+ columns: "deleted_at",
50
+ where: "deleted_at IS NOT NULL",
26
51
  });
27
52
  const ActionOrderingIndex = (0, utils_1.createPsqlIndexStatementHelper)({
28
53
  tableName: "order_change_action",
29
54
  columns: "ordering",
55
+ where: "deleted_at IS NOT NULL",
30
56
  });
31
57
  let OrderChangeAction = class OrderChangeAction {
32
58
  constructor() {
33
59
  this.order_id = null;
34
60
  this.order = null;
61
+ this.return_id = null;
62
+ this.claim_id = null;
63
+ this.exchange_id = null;
35
64
  this.version = null;
36
65
  this.order_change = null;
37
66
  this.reference = null;
@@ -41,18 +70,31 @@ let OrderChangeAction = class OrderChangeAction {
41
70
  this.raw_amount = null;
42
71
  this.internal_note = null;
43
72
  this.applied = false;
73
+ this.deleted_at = null;
44
74
  }
45
75
  onCreate() {
46
76
  this.id = (0, utils_1.generateEntityId)(this.id, "ordchact");
47
- this.order_id ?? (this.order_id = this.order?.id ?? this.order_change?.order_id ?? null);
48
- this.order_change_id ?? (this.order_change_id = this.order_change?.id ?? null);
49
- this.version ?? (this.version = this.order_change?.version ?? null);
77
+ this.order_id ??= this.order?.id ?? this.order_change?.order_id ?? null;
78
+ this.claim_id ??= this.claim?.id ?? this.order_change?.claim_id ?? null;
79
+ this.exchange_id ??=
80
+ this.exchange?.id ?? this.order_change?.exchange_id ?? null;
81
+ this.order_change_id ??= this.order_change?.id ?? null;
82
+ this.version ??= this.order_change?.version ?? null;
83
+ if (!this.claim_id && !this.exchange_id) {
84
+ this.return_id ??= this.return?.id ?? this.order_change?.return_id ?? null;
85
+ }
50
86
  }
51
87
  onInit() {
52
88
  this.id = (0, utils_1.generateEntityId)(this.id, "ordchact");
53
- this.order_id ?? (this.order_id = this.order?.id ?? this.order_change?.order_id ?? null);
54
- this.order_change_id ?? (this.order_change_id = this.order_change?.id ?? null);
55
- this.version ?? (this.version = this.order_change?.version ?? null);
89
+ this.order_id ??= this.order?.id ?? this.order_change?.order_id ?? null;
90
+ this.claim_id ??= this.claim?.id ?? this.order_change?.claim_id ?? null;
91
+ this.exchange_id ??=
92
+ this.exchange?.id ?? this.order_change?.exchange_id ?? null;
93
+ this.order_change_id ??= this.order_change?.id ?? null;
94
+ this.version ??= this.order_change?.version ?? null;
95
+ if (!this.claim_id && !this.exchange_id) {
96
+ this.return_id ??= this.return?.id ?? this.order_change?.return_id ?? null;
97
+ }
56
98
  }
57
99
  };
58
100
  __decorate([
@@ -83,6 +125,60 @@ __decorate([
83
125
  }),
84
126
  __metadata("design:type", Object)
85
127
  ], OrderChangeAction.prototype, "order", void 0);
128
+ __decorate([
129
+ (0, core_1.ManyToOne)({
130
+ entity: () => return_1.default,
131
+ mapToPk: true,
132
+ fieldName: "return_id",
133
+ columnType: "text",
134
+ nullable: true,
135
+ }),
136
+ ReturnIdIndex.MikroORMIndex(),
137
+ __metadata("design:type", Object)
138
+ ], OrderChangeAction.prototype, "return_id", void 0);
139
+ __decorate([
140
+ (0, core_1.ManyToOne)(() => return_1.default, {
141
+ persist: false,
142
+ nullable: true,
143
+ }),
144
+ __metadata("design:type", return_1.default)
145
+ ], OrderChangeAction.prototype, "return", void 0);
146
+ __decorate([
147
+ (0, core_1.ManyToOne)({
148
+ entity: () => claim_1.default,
149
+ mapToPk: true,
150
+ fieldName: "claim_id",
151
+ columnType: "text",
152
+ nullable: true,
153
+ }),
154
+ OrderClaimIdIndex.MikroORMIndex(),
155
+ __metadata("design:type", Object)
156
+ ], OrderChangeAction.prototype, "claim_id", void 0);
157
+ __decorate([
158
+ (0, core_1.ManyToOne)(() => claim_1.default, {
159
+ persist: false,
160
+ nullable: true,
161
+ }),
162
+ __metadata("design:type", claim_1.default)
163
+ ], OrderChangeAction.prototype, "claim", void 0);
164
+ __decorate([
165
+ (0, core_1.ManyToOne)({
166
+ entity: () => exchange_1.default,
167
+ mapToPk: true,
168
+ fieldName: "exchange_id",
169
+ columnType: "text",
170
+ nullable: true,
171
+ }),
172
+ OrderExchangeIdIndex.MikroORMIndex(),
173
+ __metadata("design:type", Object)
174
+ ], OrderChangeAction.prototype, "exchange_id", void 0);
175
+ __decorate([
176
+ (0, core_1.ManyToOne)(() => exchange_1.default, {
177
+ persist: false,
178
+ nullable: true,
179
+ }),
180
+ __metadata("design:type", exchange_1.default)
181
+ ], OrderChangeAction.prototype, "exchange", void 0);
86
182
  __decorate([
87
183
  (0, core_1.Property)({ columnType: "integer", nullable: true }),
88
184
  __metadata("design:type", Object)
@@ -167,6 +263,11 @@ __decorate([
167
263
  }),
168
264
  __metadata("design:type", Date)
169
265
  ], OrderChangeAction.prototype, "updated_at", void 0);
266
+ __decorate([
267
+ (0, core_1.Property)({ columnType: "timestamptz", nullable: true }),
268
+ DeletedAtIndex.MikroORMIndex(),
269
+ __metadata("design:type", Object)
270
+ ], OrderChangeAction.prototype, "deleted_at", void 0);
170
271
  __decorate([
171
272
  (0, core_1.BeforeCreate)(),
172
273
  __metadata("design:type", Function),
@@ -180,7 +281,8 @@ __decorate([
180
281
  __metadata("design:returntype", void 0)
181
282
  ], OrderChangeAction.prototype, "onInit", null);
182
283
  OrderChangeAction = __decorate([
183
- (0, core_1.Entity)({ tableName: "order_change_action" })
284
+ (0, core_1.Entity)({ tableName: "order_change_action" }),
285
+ (0, core_1.Filter)(utils_1.DALUtils.mikroOrmSoftDeletableFilterOptions)
184
286
  ], OrderChangeAction);
185
287
  exports.default = OrderChangeAction;
186
288
  //# sourceMappingURL=order-change-action.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"order-change-action.js","sourceRoot":"","sources":["../../src/models/order-change-action.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,2CAKwB;AACxB,0CAQwB;AACxB,oDAA2B;AAC3B,kEAAwC;AAIxC,MAAM,kBAAkB,GAAG,IAAA,sCAA8B,EAAC;IACxD,SAAS,EAAE,qBAAqB;IAChC,OAAO,EAAE,iBAAiB;CAC3B,CAAC,CAAA;AAEF,MAAM,YAAY,GAAG,IAAA,sCAA8B,EAAC;IAClD,SAAS,EAAE,qBAAqB;IAChC,OAAO,EAAE,UAAU;CACpB,CAAC,CAAA;AAEF,MAAM,mBAAmB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A,aAAM,GAAE;;;;+CAMR;AAhHkB,iBAAiB;IADrC,IAAA,aAAM,EAAC,EAAE,SAAS,EAAE,qBAAqB,EAAE,CAAC;GACxB,iBAAiB,CAiHrC;kBAjHoB,iBAAiB"}
1
+ {"version":3,"file":"order-change-action.js","sourceRoot":"","sources":["../../src/models/order-change-action.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,qDAMkC;AAClC,0CAUwB;AACxB,oDAAgC;AAChC,0DAAsC;AACtC,oDAA2B;AAC3B,kEAAwC;AACxC,sDAA6B;AAI7B,MAAM,kBAAkB,GAAG,IAAA,sCAA8B,EAAC;IACxD,SAAS,EAAE,qBAAqB;IAChC,OAAO,EAAE,iBAAiB;IAC1B,KAAK,EAAE,wBAAwB;CAChC,CAAC,CAAA;AAEF,MAAM,YAAY,GAAG,IAAA,sCAA8B,EAAC;IAClD,SAAS,EAAE,qBAAqB;IAChC,OAAO,EAAE,UAAU;IACnB,KAAK,EAAE,wBAAwB;CAChC,CAAC,CAAA;AAEF,MAAM,aAAa,GAAG,IAAA,sCAA8B,EAAC;IACnD,SAAS,EAAE,qBAAqB;IAChC,OAAO,EAAE,WAAW;IACpB,KAAK,EAAE,kDAAkD;CAC1D,CAAC,CAAA;AAEF,MAAM,iBAAiB,GAAG,IAAA,sCAA8B,EAAC;IACvD,SAAS,EAAE,qBAAqB;IAChC,OAAO,EAAE,UAAU;IACnB,KAAK,EAAE,iDAAiD;CACzD,CAAC,CAAA;AAEF,MAAM,oBAAoB,GAAG,IAAA,sCAA8B,EAAC;IAC1D,SAAS,EAAE,qBAAqB;IAChC,OAAO,EAAE,aAAa;IACtB,KAAK,EAAE,oDAAoD;CAC5D,CAAC,CAAA;AAEF,MAAM,cAAc,GAAG,IAAA,sCAA8B,EAAC;IACpD,SAAS,EAAE,qBAAqB;IAChC,OAAO,EAAE,YAAY;IACrB,KAAK,EAAE,wBAAwB;CAChC,CAAC,CAAA;AAEF,MAAM,mBAAmB,GAAG,IAAA,sCAA8B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,eAAQ,EAAC,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDACP;AAM3C;IAJC,IAAA,eAAQ,EAAC;QACR,UAAU,EAAE,MAAM;QAClB,QAAQ,EAAE,IAAI;KACf,CAAC;;wDACiC;AAMnC;IAJC,IAAA,eAAQ,EAAC;QACR,UAAU,EAAE,SAAS;QACrB,UAAU,EAAE,OAAO;KACpB,CAAC;;kDACsB;AAOxB;IALC,IAAA,eAAQ,EAAC;QACR,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE;QAC1B,UAAU,EAAE,aAAa;QACzB,UAAU,EAAE,OAAO;KACpB,CAAC;8BACU,IAAI;qDAAA;AAQhB;IANC,IAAA,eAAQ,EAAC;QACR,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE;QAC1B,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE;QAC1B,UAAU,EAAE,aAAa;QACzB,UAAU,EAAE,OAAO;KACpB,CAAC;8BACU,IAAI;qDAAA;AAIhB;IAFC,IAAA,eAAQ,EAAC,EAAE,UAAU,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACvD,cAAc,CAAC,aAAa,EAAE;;qDACD;AAG9B;IADC,IAAA,mBAAY,GAAE;;;;iDAad;AAGD;IADC,IAAA,aAAM,GAAE;;;;+CAaR;AAlLkB,iBAAiB;IAFrC,IAAA,aAAM,EAAC,EAAE,SAAS,EAAE,qBAAqB,EAAE,CAAC;IAC5C,IAAA,aAAM,EAAC,gBAAQ,CAAC,kCAAkC,CAAC;GAC/B,iBAAiB,CAmLrC;kBAnLoB,iBAAiB"}
@@ -1,15 +1,25 @@
1
- import { DAL } from "@medusajs/types";
2
- import { OrderChangeStatus } from "@medusajs/utils";
3
- import { Collection, OptionalProps } from "@mikro-orm/core";
1
+ import { DAL } from "@medusajs/framework/types";
2
+ import { OrderChangeStatus } from "@medusajs/framework/utils";
3
+ import { Collection, OptionalProps, Rel } from "@mikro-orm/core";
4
+ import OrderClaim from "./claim";
5
+ import OrderExchange from "./exchange";
4
6
  import Order from "./order";
5
7
  import OrderChangeAction from "./order-change-action";
6
- type OptionalLineItemProps = DAL.EntityDateColumns;
8
+ import Return from "./return";
9
+ type OptionalLineItemProps = DAL.ModelDateColumns;
7
10
  export default class OrderChange {
8
11
  [OptionalProps]?: OptionalLineItemProps;
9
12
  id: string;
10
13
  order_id: string;
11
- order: Order;
14
+ order: Rel<Order>;
15
+ return_id: string | null;
16
+ return: Rel<Return>;
17
+ claim_id: string | null;
18
+ claim: OrderClaim;
19
+ exchange_id: string | null;
20
+ exchange: OrderExchange;
12
21
  version: number;
22
+ change_type: string | null;
13
23
  actions: Collection<OrderChangeAction, object>;
14
24
  description: string | null;
15
25
  status: OrderChangeStatus;
@@ -24,10 +34,12 @@ export default class OrderChange {
24
34
  metadata: Record<string, unknown> | null;
25
35
  declined_at?: Date;
26
36
  canceled_by: string | null;
27
- canceled_at?: Date;
37
+ canceled_at?: Date | null;
28
38
  created_at: Date;
29
39
  updated_at: Date;
40
+ deleted_at: Date | null;
30
41
  onCreate(): void;
31
42
  onInit(): void;
32
43
  }
33
44
  export {};
45
+ //# sourceMappingURL=order-change.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"order-change.d.ts","sourceRoot":"","sources":["../../src/models/order-change.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAA;AAC/C,OAAO,EAIL,iBAAiB,EAClB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAGL,UAAU,EAOV,aAAa,EAGb,GAAG,EACJ,MAAM,iBAAiB,CAAA;AAExB,OAAO,UAAU,MAAM,SAAS,CAAA;AAChC,OAAO,aAAa,MAAM,YAAY,CAAA;AACtC,OAAO,KAAK,MAAM,SAAS,CAAA;AAC3B,OAAO,iBAAiB,MAAM,uBAAuB,CAAA;AACrD,OAAO,MA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O;IAOhC,UAAU,EAAE,IAAI,CAAA;IAQhB,UAAU,EAAE,IAAI,CAAA;IAIhB,UAAU,EAAE,IAAI,GAAG,IAAI,CAAO;IAG9B,QAAQ;IASR,MAAM;CAOP"}
@@ -12,24 +12,54 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
12
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
- const utils_1 = require("@medusajs/utils");
15
+ const utils_1 = require("@medusajs/framework/utils");
16
16
  const core_1 = require("@mikro-orm/core");
17
+ const claim_1 = __importDefault(require("./claim"));
18
+ const exchange_1 = __importDefault(require("./exchange"));
17
19
  const order_1 = __importDefault(require("./order"));
18
20
  const order_change_action_1 = __importDefault(require("./order-change-action"));
21
+ const return_1 = __importDefault(require("./return"));
19
22
  const OrderIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
20
23
  tableName: "order_change",
21
24
  columns: "order_id",
25
+ where: "deleted_at IS NOT NULL",
26
+ });
27
+ const ReturnIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
28
+ tableName: "order_change",
29
+ columns: "return_id",
30
+ where: "return_id IS NOT NULL AND deleted_at IS NOT NULL",
31
+ });
32
+ const OrderClaimIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
33
+ tableName: "order_change",
34
+ columns: "claim_id",
35
+ where: "claim_id IS NOT NULL AND deleted_at IS NOT NULL",
36
+ });
37
+ const OrderExchangeIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
38
+ tableName: "order_change",
39
+ columns: "exchange_id",
40
+ where: "exchange_id IS NOT NULL AND deleted_at IS NOT NULL",
22
41
  });
23
42
  const OrderChangeStatusIndex = (0, utils_1.createPsqlIndexStatementHelper)({
24
43
  tableName: "order_change",
25
44
  columns: "status",
45
+ where: "deleted_at IS NOT NULL",
46
+ });
47
+ const DeletedAtIndex = (0, utils_1.createPsqlIndexStatementHelper)({
48
+ tableName: "order_change",
49
+ columns: "deleted_at",
50
+ where: "deleted_at IS NOT NULL",
26
51
  });
27
52
  const VersionIndex = (0, utils_1.createPsqlIndexStatementHelper)({
28
53
  tableName: "order_change",
29
54
  columns: ["order_id", "version"],
55
+ where: "deleted_at IS NOT NULL",
30
56
  });
31
57
  let OrderChange = class OrderChange {
32
58
  constructor() {
59
+ this.return_id = null;
60
+ this.claim_id = null;
61
+ this.exchange_id = null;
62
+ this.change_type = null;
33
63
  this.actions = new core_1.Collection(this);
34
64
  this.description = null;
35
65
  this.status = utils_1.OrderChangeStatus.PENDING;
@@ -42,14 +72,22 @@ let OrderChange = class OrderChange {
42
72
  this.declined_reason = null;
43
73
  this.metadata = null;
44
74
  this.canceled_by = null;
75
+ this.canceled_at = null;
76
+ this.deleted_at = null;
45
77
  }
46
78
  onCreate() {
47
79
  this.id = (0, utils_1.generateEntityId)(this.id, "ordch");
48
- this.order_id ?? (this.order_id = this.order?.id);
80
+ this.order_id ??= this.order?.id;
81
+ this.return_id ??= this.return?.id;
82
+ this.claim_id ??= this.claim?.id;
83
+ this.exchange_id ??= this.exchange?.id;
49
84
  }
50
85
  onInit() {
51
86
  this.id = (0, utils_1.generateEntityId)(this.id, "ordch");
52
- this.order_id ?? (this.order_id = this.order?.id);
87
+ this.order_id ??= this.order?.id;
88
+ this.return_id ??= this.return?.id;
89
+ this.claim_id ??= this.claim?.id;
90
+ this.exchange_id ??= this.exchange?.id;
53
91
  }
54
92
  };
55
93
  __decorate([
@@ -71,16 +109,74 @@ __decorate([
71
109
  (0, core_1.ManyToOne)(() => order_1.default, {
72
110
  persist: false,
73
111
  }),
74
- __metadata("design:type", order_1.default)
112
+ __metadata("design:type", Object)
75
113
  ], OrderChange.prototype, "order", void 0);
114
+ __decorate([
115
+ (0, core_1.ManyToOne)({
116
+ entity: () => return_1.default,
117
+ mapToPk: true,
118
+ fieldName: "return_id",
119
+ columnType: "text",
120
+ nullable: true,
121
+ }),
122
+ ReturnIdIndex.MikroORMIndex(),
123
+ __metadata("design:type", Object)
124
+ ], OrderChange.prototype, "return_id", void 0);
125
+ __decorate([
126
+ (0, core_1.ManyToOne)(() => return_1.default, {
127
+ persist: false,
128
+ nullable: true,
129
+ }),
130
+ __metadata("design:type", Object)
131
+ ], OrderChange.prototype, "return", void 0);
132
+ __decorate([
133
+ (0, core_1.ManyToOne)({
134
+ entity: () => claim_1.default,
135
+ mapToPk: true,
136
+ fieldName: "claim_id",
137
+ columnType: "text",
138
+ nullable: true,
139
+ }),
140
+ OrderClaimIdIndex.MikroORMIndex(),
141
+ __metadata("design:type", Object)
142
+ ], OrderChange.prototype, "claim_id", void 0);
143
+ __decorate([
144
+ (0, core_1.ManyToOne)(() => claim_1.default, {
145
+ persist: false,
146
+ nullable: true,
147
+ }),
148
+ __metadata("design:type", claim_1.default)
149
+ ], OrderChange.prototype, "claim", void 0);
150
+ __decorate([
151
+ (0, core_1.ManyToOne)({
152
+ entity: () => exchange_1.default,
153
+ mapToPk: true,
154
+ fieldName: "exchange_id",
155
+ columnType: "text",
156
+ nullable: true,
157
+ }),
158
+ OrderExchangeIdIndex.MikroORMIndex(),
159
+ __metadata("design:type", Object)
160
+ ], OrderChange.prototype, "exchange_id", void 0);
161
+ __decorate([
162
+ (0, core_1.ManyToOne)(() => exchange_1.default, {
163
+ persist: false,
164
+ nullable: true,
165
+ }),
166
+ __metadata("design:type", exchange_1.default)
167
+ ], OrderChange.prototype, "exchange", void 0);
76
168
  __decorate([
77
169
  (0, core_1.Property)({ columnType: "integer" }),
78
170
  VersionIndex.MikroORMIndex(),
79
171
  __metadata("design:type", Number)
80
172
  ], OrderChange.prototype, "version", void 0);
173
+ __decorate([
174
+ (0, core_1.Property)({ columnType: "text", nullable: true }),
175
+ __metadata("design:type", Object)
176
+ ], OrderChange.prototype, "change_type", void 0);
81
177
  __decorate([
82
178
  (0, core_1.OneToMany)(() => order_change_action_1.default, (action) => action.order_change, {
83
- cascade: [core_1.Cascade.PERSIST, "sotf-remove"],
179
+ cascade: [core_1.Cascade.PERSIST, "soft-remove"],
84
180
  }),
85
181
  __metadata("design:type", Object)
86
182
  ], OrderChange.prototype, "actions", void 0);
@@ -154,7 +250,7 @@ __decorate([
154
250
  columnType: "timestamptz",
155
251
  nullable: true,
156
252
  }),
157
- __metadata("design:type", Date)
253
+ __metadata("design:type", Object)
158
254
  ], OrderChange.prototype, "canceled_at", void 0);
159
255
  __decorate([
160
256
  (0, core_1.Property)({
@@ -173,6 +269,11 @@ __decorate([
173
269
  }),
174
270
  __metadata("design:type", Date)
175
271
  ], OrderChange.prototype, "updated_at", void 0);
272
+ __decorate([
273
+ (0, core_1.Property)({ columnType: "timestamptz", nullable: true }),
274
+ DeletedAtIndex.MikroORMIndex(),
275
+ __metadata("design:type", Object)
276
+ ], OrderChange.prototype, "deleted_at", void 0);
176
277
  __decorate([
177
278
  (0, core_1.BeforeCreate)(),
178
279
  __metadata("design:type", Function),
@@ -187,6 +288,7 @@ __decorate([
187
288
  ], OrderChange.prototype, "onInit", null);
188
289
  OrderChange = __decorate([
189
290
  (0, core_1.Entity)({ tableName: "order_change" }),
291
+ (0, core_1.Filter)(utils_1.DALUtils.mikroOrmSoftDeletableFilterOptions),
190
292
  VersionIndex.MikroORMIndex()
191
293
  ], OrderChange);
192
294
  exports.default = OrderChange;
@@ -1 +1 @@
1
- {"version":3,"file":"order-change.js","sourceRoot":"","sources":["../../src/models/order-change.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,2CAIwB;AACxB,0CAYwB;AACxB,oDAA2B;AAC3B,gFAAqD;AAIrD,MAAM,YAAY,GAAG,IAAA,sCAA8B,EAAC;IAClD,SAAS,EAAE,cAAc;IACzB,OAAO,EAAE,UAAU;CACpB,CAAC,CAAA;AAEF,MAAM,sBAAsB,GAAG,IAAA,sCAA8B,EAAC;IAC5D,SAAS,EAAE,cAAc;IACzB,OAAO,EAAE,QAAQ;CAClB,CAAC,CAAA;AAEF,MAAM,YAAY,GAAG,IAAA,sCAA8B,EAAC;IAClD,SAAS,EAAE,cA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C;IAJC,IAAA,eAAQ,EAAC;QACR,UAAU,EAAE,aAAa;QACzB,QAAQ,EAAE,IAAI;KACf,CAAC;;gDAC8B;AAOhC;IALC,IAAA,eAAQ,EAAC;QACR,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE;QAC1B,UAAU,EAAE,aAAa;QACzB,UAAU,EAAE,OAAO;KACpB,CAAC;8BACU,IAAI;+CAAA;AAQhB;IANC,IAAA,eAAQ,EAAC;QACR,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE;QAC1B,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE;QAC1B,UAAU,EAAE,aAAa;QACzB,UAAU,EAAE,OAAO;KACpB,CAAC;8BACU,IAAI;+CAAA;AAIhB;IAFC,IAAA,eAAQ,EAAC,EAAE,UAAU,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACvD,cAAc,CAAC,aAAa,EAAE;;+CACD;AAG9B;IADC,IAAA,mBAAY,GAAE;;;;2CAOd;AAGD;IADC,IAAA,aAAM,GAAE;;;;yCAOR;AA9KkB,WAAW;IAH/B,IAAA,aAAM,EAAC,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;IACrC,IAAA,aAAM,EAAC,gBAAQ,CAAC,kCAAkC,CAAC;IACnD,YAAY,CAAC,aAAa,EAAE;GACR,WAAW,CA+K/B;kBA/KoB,WAAW"}
@@ -1,21 +1,23 @@
1
- import { BigNumberRawValue, DAL } from "@medusajs/types";
2
- import { BigNumber } from "@medusajs/utils";
3
- import { OptionalProps } from "@mikro-orm/core";
4
- import LineItem from "./line-item";
1
+ import { BigNumberRawValue, DAL } from "@medusajs/framework/types";
2
+ import { BigNumber } from "@medusajs/framework/utils";
3
+ import { OptionalProps, Rel } from "@mikro-orm/core";
4
+ import OrderLineItem from "./line-item";
5
5
  import Order from "./order";
6
- type OptionalLineItemProps = DAL.EntityDateColumns;
6
+ type OptionalLineItemProps = DAL.ModelDateColumns;
7
7
  export default class OrderItem {
8
8
  [OptionalProps]?: OptionalLineItemProps;
9
9
  id: string;
10
10
  order_id: string;
11
+ order: Rel<Order>;
11
12
  version: number;
12
- order: Order;
13
13
  item_id: string;
14
- item: LineItem;
14
+ item: Rel<OrderLineItem>;
15
15
  quantity: BigNumber | number;
16
16
  raw_quantity: BigNumberRawValue;
17
17
  fulfilled_quantity: BigNumber | number;
18
18
  raw_fulfilled_quantity: BigNumberRawValue;
19
+ delivered_quantity: BigNumber | number;
20
+ raw_delivered_quantity: BigNumberRawValue;
19
21
  shipped_quantity: BigNumber | number;
20
22
  raw_shipped_quantity: BigNumberRawValue;
21
23
  return_requested_quantity: BigNumber | number;
@@ -34,3 +36,4 @@ export default class OrderItem {
34
36
  onInit(): void;
35
37
  }
36
38
  export {};
39
+ //# sourceMappingURL=order-item.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"order-item.d.ts","sourceRoot":"","sources":["../../src/models/order-item.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAA;AAClE,OAAO,EACL,SAAS,EAIV,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAKL,aAAa,EAGb,GAAG,EACJ,MAAM,iBAAiB,CAAA;AACxB,OAAO,aAAa,MAAM,aAAa,CAAA;AACvC,OAAO,KAAK,MAAM,SAAS,CAAA;AAE3B,KAAK,qBAAqB,GAAG,GAAG,CAAC,gBAAgB,CAAA;AA4BjD,MAAM,CAAC,OAAO,OAAO,SAAS;IAC5B,CAAC,aAAa,CAAC,CAAC,EAAE,qBAAqB,CAAA;IAGvC,EAAE,EAAE,MAAM,CAAA;IASV,QAAQ,EAAE,MAAM,CAAA;IAKhB,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,CAAA;IAIjB,OAAO,EAAE,MAAM,CAAA;IASf,OAAO,EAAE,MAAM,CAAA;IAKf,IAAI,EAAE,GAAG,CAAC,aAAa,CA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