@medusajs/order 0.1.3-snapshot-20240718073308 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (331) hide show
  1. package/dist/index.d.ts +8 -6
  2. package/dist/index.js +26 -4
  3. package/dist/index.js.map +1 -1
  4. package/dist/joiner-config.d.ts +5 -0
  5. package/dist/joiner-config.js +36 -0
  6. package/dist/joiner-config.js.map +1 -0
  7. package/dist/migrations/Migration20240219102530.d.ts +0 -1
  8. package/dist/migrations/Migration20240219102530.js +4 -38
  9. package/dist/migrations/Migration20240219102530.js.map +1 -1
  10. package/dist/models/address.d.ts +1 -2
  11. package/dist/models/adjustment-line.d.ts +1 -3
  12. package/dist/models/adjustment-line.js +0 -5
  13. package/dist/models/adjustment-line.js.map +1 -1
  14. package/dist/models/index.d.ts +0 -9
  15. package/dist/models/index.js +1 -17
  16. package/dist/models/index.js.map +1 -1
  17. package/dist/models/line-item-adjustment.d.ts +1 -3
  18. package/dist/models/line-item-adjustment.js +3 -3
  19. package/dist/models/line-item-adjustment.js.map +1 -1
  20. package/dist/models/line-item-tax-line.d.ts +1 -3
  21. package/dist/models/line-item-tax-line.js +3 -3
  22. package/dist/models/line-item-tax-line.js.map +1 -1
  23. package/dist/models/line-item.d.ts +1 -3
  24. package/dist/models/line-item.js +4 -18
  25. package/dist/models/line-item.js.map +1 -1
  26. package/dist/models/order-change-action.d.ts +4 -15
  27. package/dist/models/order-change-action.js +7 -102
  28. package/dist/models/order-change-action.js.map +1 -1
  29. package/dist/models/order-change.d.ts +5 -17
  30. package/dist/models/order-change.js +4 -109
  31. package/dist/models/order-change.js.map +1 -1
  32. package/dist/models/order-item.d.ts +4 -5
  33. package/dist/models/order-item.js +13 -13
  34. package/dist/models/order-item.js.map +1 -1
  35. package/dist/models/order-shipping-method.d.ts +4 -14
  36. package/dist/models/order-shipping-method.js +13 -89
  37. package/dist/models/order-shipping-method.js.map +1 -1
  38. package/dist/models/order-summary.d.ts +2 -6
  39. package/dist/models/order-summary.js +6 -9
  40. package/dist/models/order-summary.js.map +1 -1
  41. package/dist/models/order.d.ts +4 -6
  42. package/dist/models/order.js +1 -11
  43. package/dist/models/order.js.map +1 -1
  44. package/dist/models/shipping-method-adjustment.d.ts +1 -3
  45. package/dist/models/shipping-method-adjustment.js +3 -3
  46. package/dist/models/shipping-method-adjustment.js.map +1 -1
  47. package/dist/models/shipping-method-tax-line.d.ts +1 -3
  48. package/dist/models/shipping-method-tax-line.js +3 -3
  49. package/dist/models/shipping-method-tax-line.js.map +1 -1
  50. package/dist/models/shipping-method.d.ts +0 -2
  51. package/dist/models/shipping-method.js +4 -17
  52. package/dist/models/shipping-method.js.map +1 -1
  53. package/dist/models/tax-line.d.ts +0 -2
  54. package/dist/models/tax-line.js +0 -7
  55. package/dist/models/tax-line.js.map +1 -1
  56. package/dist/models/transaction.d.ts +3 -15
  57. package/dist/models/transaction.js +4 -109
  58. package/dist/models/transaction.js.map +1 -1
  59. package/dist/module-definition.d.ts +2 -0
  60. package/dist/module-definition.js +59 -0
  61. package/dist/module-definition.js.map +1 -0
  62. package/dist/repositories/index.d.ts +1 -4
  63. package/dist/repositories/index.js +16 -7
  64. package/dist/repositories/index.js.map +1 -1
  65. package/dist/repositories/order.d.ts +3 -1
  66. package/dist/repositories/order.js +85 -2
  67. package/dist/repositories/order.js.map +1 -1
  68. package/dist/scripts/bin/run-seed.d.ts +3 -0
  69. package/dist/scripts/bin/run-seed.js +49 -0
  70. package/dist/scripts/bin/run-seed.js.map +1 -0
  71. package/dist/services/index.d.ts +1 -1
  72. package/dist/services/index.js +3 -1
  73. package/dist/services/index.js.map +1 -1
  74. package/dist/services/order-change-service.d.ts +15 -0
  75. package/dist/services/order-change-service.js +96 -0
  76. package/dist/services/order-change-service.js.map +1 -0
  77. package/dist/services/order-module-service.d.ts +67 -138
  78. package/dist/services/order-module-service.js +240 -990
  79. package/dist/services/order-module-service.js.map +1 -1
  80. package/dist/services/order-service.d.ts +4 -5
  81. package/dist/services/order-service.js +1 -1
  82. package/dist/services/order-service.js.map +1 -1
  83. package/dist/types/address.d.ts +0 -1
  84. package/dist/types/index.d.ts +1 -3
  85. package/dist/types/index.js +0 -1
  86. package/dist/types/index.js.map +1 -1
  87. package/dist/types/line-item-adjustment.d.ts +0 -1
  88. package/dist/types/line-item-tax-line.d.ts +0 -1
  89. package/dist/types/line-item.d.ts +0 -1
  90. package/dist/types/order-detail.d.ts +1 -2
  91. package/dist/types/order.d.ts +2 -3
  92. package/dist/types/shipping-method-adjustment.d.ts +0 -1
  93. package/dist/types/shipping-method-tax-line.d.ts +0 -1
  94. package/dist/types/shipping-method.d.ts +0 -4
  95. package/dist/types/tax-line.d.ts +0 -1
  96. package/dist/types/transaction.d.ts +0 -1
  97. package/dist/types/utils/index.d.ts +11 -43
  98. package/dist/types/utils/index.js.map +1 -1
  99. package/dist/utils/action-key.d.ts +13 -0
  100. package/dist/utils/action-key.js +18 -0
  101. package/dist/utils/action-key.js.map +1 -0
  102. package/dist/utils/actions/cancel-return.d.ts +0 -1
  103. package/dist/utils/actions/cancel-return.js +6 -7
  104. package/dist/utils/actions/cancel-return.js.map +1 -1
  105. package/dist/utils/actions/cancel.d.ts +0 -1
  106. package/dist/utils/actions/cancel.js +2 -2
  107. package/dist/utils/actions/cancel.js.map +1 -1
  108. package/dist/utils/actions/fulfill-item.d.ts +0 -1
  109. package/dist/utils/actions/fulfill-item.js +6 -7
  110. package/dist/utils/actions/fulfill-item.js.map +1 -1
  111. package/dist/utils/actions/index.d.ts +0 -4
  112. package/dist/utils/actions/index.js +0 -3
  113. package/dist/utils/actions/index.js.map +1 -1
  114. package/dist/utils/actions/item-add.d.ts +0 -1
  115. package/dist/utils/actions/item-add.js +14 -17
  116. package/dist/utils/actions/item-add.js.map +1 -1
  117. package/dist/utils/actions/item-remove.d.ts +0 -1
  118. package/dist/utils/actions/item-remove.js +10 -11
  119. package/dist/utils/actions/item-remove.js.map +1 -1
  120. package/dist/utils/actions/receive-damaged-return-item.d.ts +0 -1
  121. package/dist/utils/actions/receive-damaged-return-item.js +7 -8
  122. package/dist/utils/actions/receive-damaged-return-item.js.map +1 -1
  123. package/dist/utils/actions/receive-return-item.d.ts +0 -1
  124. package/dist/utils/actions/receive-return-item.js +7 -8
  125. package/dist/utils/actions/receive-return-item.js.map +1 -1
  126. package/dist/utils/actions/return-item.d.ts +0 -1
  127. package/dist/utils/actions/return-item.js +8 -9
  128. package/dist/utils/actions/return-item.js.map +1 -1
  129. package/dist/utils/actions/ship-item.d.ts +0 -1
  130. package/dist/utils/actions/ship-item.js +6 -7
  131. package/dist/utils/actions/ship-item.js.map +1 -1
  132. package/dist/utils/actions/shipping-add.d.ts +0 -1
  133. package/dist/utils/actions/shipping-add.js +7 -16
  134. package/dist/utils/actions/shipping-add.js.map +1 -1
  135. package/dist/utils/actions/write-off-item.d.ts +0 -1
  136. package/dist/utils/actions/write-off-item.js +6 -7
  137. package/dist/utils/actions/write-off-item.js.map +1 -1
  138. package/dist/utils/calculate-order-change.d.ts +2 -11
  139. package/dist/utils/calculate-order-change.js +70 -68
  140. package/dist/utils/calculate-order-change.js.map +1 -1
  141. package/dist/utils/index.d.ts +1 -4
  142. package/dist/utils/index.js +1 -3
  143. package/dist/utils/index.js.map +1 -1
  144. package/dist/utils/transform-order.d.ts +2 -4
  145. package/dist/utils/transform-order.js +17 -131
  146. package/dist/utils/transform-order.js.map +1 -1
  147. package/package.json +14 -8
  148. package/dist/index.d.ts.map +0 -1
  149. package/dist/migrations/Migration20240219102530.d.ts.map +0 -1
  150. package/dist/migrations/Migration20240604100512.d.ts +0 -5
  151. package/dist/migrations/Migration20240604100512.d.ts.map +0 -1
  152. package/dist/migrations/Migration20240604100512.js +0 -364
  153. package/dist/migrations/Migration20240604100512.js.map +0 -1
  154. package/dist/migrations/Migration20240715102100.d.ts +0 -5
  155. package/dist/migrations/Migration20240715102100.d.ts.map +0 -1
  156. package/dist/migrations/Migration20240715102100.js +0 -15
  157. package/dist/migrations/Migration20240715102100.js.map +0 -1
  158. package/dist/migrations/Migration20240715174100.d.ts +0 -5
  159. package/dist/migrations/Migration20240715174100.d.ts.map +0 -1
  160. package/dist/migrations/Migration20240715174100.js +0 -21
  161. package/dist/migrations/Migration20240715174100.js.map +0 -1
  162. package/dist/migrations/Migration20240716081800.d.ts +0 -5
  163. package/dist/migrations/Migration20240716081800.d.ts.map +0 -1
  164. package/dist/migrations/Migration20240716081800.js +0 -67
  165. package/dist/migrations/Migration20240716081800.js.map +0 -1
  166. package/dist/models/address.d.ts.map +0 -1
  167. package/dist/models/adjustment-line.d.ts.map +0 -1
  168. package/dist/models/claim-item-image.d.ts +0 -19
  169. package/dist/models/claim-item-image.d.ts.map +0 -1
  170. package/dist/models/claim-item-image.js +0 -109
  171. package/dist/models/claim-item-image.js.map +0 -1
  172. package/dist/models/claim-item.d.ts +0 -29
  173. package/dist/models/claim-item.d.ts.map +0 -1
  174. package/dist/models/claim-item.js +0 -156
  175. package/dist/models/claim-item.js.map +0 -1
  176. package/dist/models/claim.d.ts +0 -36
  177. package/dist/models/claim.d.ts.map +0 -1
  178. package/dist/models/claim.js +0 -195
  179. package/dist/models/claim.js.map +0 -1
  180. package/dist/models/exchange-item.d.ts +0 -24
  181. package/dist/models/exchange-item.d.ts.map +0 -1
  182. package/dist/models/exchange-item.js +0 -138
  183. package/dist/models/exchange-item.js.map +0 -1
  184. package/dist/models/exchange.d.ts +0 -34
  185. package/dist/models/exchange.d.ts.map +0 -1
  186. package/dist/models/exchange.js +0 -188
  187. package/dist/models/exchange.js.map +0 -1
  188. package/dist/models/index.d.ts.map +0 -1
  189. package/dist/models/line-item-adjustment.d.ts.map +0 -1
  190. package/dist/models/line-item-tax-line.d.ts.map +0 -1
  191. package/dist/models/line-item.d.ts.map +0 -1
  192. package/dist/models/order-change-action.d.ts.map +0 -1
  193. package/dist/models/order-change.d.ts.map +0 -1
  194. package/dist/models/order-item.d.ts.map +0 -1
  195. package/dist/models/order-shipping-method.d.ts.map +0 -1
  196. package/dist/models/order-summary.d.ts.map +0 -1
  197. package/dist/models/order.d.ts.map +0 -1
  198. package/dist/models/return-item.d.ts +0 -29
  199. package/dist/models/return-item.d.ts.map +0 -1
  200. package/dist/models/return-item.js +0 -170
  201. package/dist/models/return-item.js.map +0 -1
  202. package/dist/models/return-reason.d.ts +0 -21
  203. package/dist/models/return-reason.d.ts.map +0 -1
  204. package/dist/models/return-reason.js +0 -120
  205. package/dist/models/return-reason.js.map +0 -1
  206. package/dist/models/return.d.ts +0 -39
  207. package/dist/models/return.d.ts.map +0 -1
  208. package/dist/models/return.js +0 -216
  209. package/dist/models/return.js.map +0 -1
  210. package/dist/models/shipping-method-adjustment.d.ts.map +0 -1
  211. package/dist/models/shipping-method-tax-line.d.ts.map +0 -1
  212. package/dist/models/shipping-method.d.ts.map +0 -1
  213. package/dist/models/tax-line.d.ts.map +0 -1
  214. package/dist/models/transaction.d.ts.map +0 -1
  215. package/dist/repositories/claim.d.ts +0 -9
  216. package/dist/repositories/claim.d.ts.map +0 -1
  217. package/dist/repositories/claim.js +0 -11
  218. package/dist/repositories/claim.js.map +0 -1
  219. package/dist/repositories/exchange.d.ts +0 -9
  220. package/dist/repositories/exchange.d.ts.map +0 -1
  221. package/dist/repositories/exchange.js +0 -11
  222. package/dist/repositories/exchange.js.map +0 -1
  223. package/dist/repositories/index.d.ts.map +0 -1
  224. package/dist/repositories/order.d.ts.map +0 -1
  225. package/dist/repositories/return.d.ts +0 -9
  226. package/dist/repositories/return.d.ts.map +0 -1
  227. package/dist/repositories/return.js +0 -11
  228. package/dist/repositories/return.js.map +0 -1
  229. package/dist/services/actions/cancel-claim.d.ts +0 -3
  230. package/dist/services/actions/cancel-claim.d.ts.map +0 -1
  231. package/dist/services/actions/cancel-claim.js +0 -107
  232. package/dist/services/actions/cancel-claim.js.map +0 -1
  233. package/dist/services/actions/cancel-exchange.d.ts +0 -3
  234. package/dist/services/actions/cancel-exchange.d.ts.map +0 -1
  235. package/dist/services/actions/cancel-exchange.js +0 -92
  236. package/dist/services/actions/cancel-exchange.js.map +0 -1
  237. package/dist/services/actions/cancel-fulfillment.d.ts +0 -3
  238. package/dist/services/actions/cancel-fulfillment.d.ts.map +0 -1
  239. package/dist/services/actions/cancel-fulfillment.js +0 -32
  240. package/dist/services/actions/cancel-fulfillment.js.map +0 -1
  241. package/dist/services/actions/cancel-return.d.ts +0 -3
  242. package/dist/services/actions/cancel-return.d.ts.map +0 -1
  243. package/dist/services/actions/cancel-return.js +0 -72
  244. package/dist/services/actions/cancel-return.js.map +0 -1
  245. package/dist/services/actions/create-claim.d.ts +0 -3
  246. package/dist/services/actions/create-claim.d.ts.map +0 -1
  247. package/dist/services/actions/create-claim.js +0 -228
  248. package/dist/services/actions/create-claim.js.map +0 -1
  249. package/dist/services/actions/create-exchange.d.ts +0 -3
  250. package/dist/services/actions/create-exchange.d.ts.map +0 -1
  251. package/dist/services/actions/create-exchange.js +0 -193
  252. package/dist/services/actions/create-exchange.js.map +0 -1
  253. package/dist/services/actions/create-return.d.ts +0 -3
  254. package/dist/services/actions/create-return.d.ts.map +0 -1
  255. package/dist/services/actions/create-return.js +0 -102
  256. package/dist/services/actions/create-return.js.map +0 -1
  257. package/dist/services/actions/index.d.ts +0 -11
  258. package/dist/services/actions/index.d.ts.map +0 -1
  259. package/dist/services/actions/index.js +0 -27
  260. package/dist/services/actions/index.js.map +0 -1
  261. package/dist/services/actions/receive-return.d.ts +0 -3
  262. package/dist/services/actions/receive-return.d.ts.map +0 -1
  263. package/dist/services/actions/receive-return.js +0 -73
  264. package/dist/services/actions/receive-return.js.map +0 -1
  265. package/dist/services/actions/register-fulfillment.d.ts +0 -3
  266. package/dist/services/actions/register-fulfillment.d.ts.map +0 -1
  267. package/dist/services/actions/register-fulfillment.js +0 -30
  268. package/dist/services/actions/register-fulfillment.js.map +0 -1
  269. package/dist/services/actions/register-shipment.d.ts +0 -3
  270. package/dist/services/actions/register-shipment.d.ts.map +0 -1
  271. package/dist/services/actions/register-shipment.js +0 -38
  272. package/dist/services/actions/register-shipment.js.map +0 -1
  273. package/dist/services/index.d.ts.map +0 -1
  274. package/dist/services/order-module-service.d.ts.map +0 -1
  275. package/dist/services/order-service.d.ts.map +0 -1
  276. package/dist/types/address.d.ts.map +0 -1
  277. package/dist/types/index.d.ts.map +0 -1
  278. package/dist/types/line-item-adjustment.d.ts.map +0 -1
  279. package/dist/types/line-item-tax-line.d.ts.map +0 -1
  280. package/dist/types/line-item.d.ts.map +0 -1
  281. package/dist/types/order-change.d.ts +0 -6
  282. package/dist/types/order-change.d.ts.map +0 -1
  283. package/dist/types/order-change.js +0 -3
  284. package/dist/types/order-change.js.map +0 -1
  285. package/dist/types/order-detail.d.ts.map +0 -1
  286. package/dist/types/order.d.ts.map +0 -1
  287. package/dist/types/shipping-method-adjustment.d.ts.map +0 -1
  288. package/dist/types/shipping-method-tax-line.d.ts.map +0 -1
  289. package/dist/types/shipping-method.d.ts.map +0 -1
  290. package/dist/types/tax-line.d.ts.map +0 -1
  291. package/dist/types/transaction.d.ts.map +0 -1
  292. package/dist/types/utils/index.d.ts.map +0 -1
  293. package/dist/utils/actions/cancel-item-fulfillment.d.ts +0 -2
  294. package/dist/utils/actions/cancel-item-fulfillment.d.ts.map +0 -1
  295. package/dist/utils/actions/cancel-item-fulfillment.js +0 -39
  296. package/dist/utils/actions/cancel-item-fulfillment.js.map +0 -1
  297. package/dist/utils/actions/cancel-return.d.ts.map +0 -1
  298. package/dist/utils/actions/cancel.d.ts.map +0 -1
  299. package/dist/utils/actions/fulfill-item.d.ts.map +0 -1
  300. package/dist/utils/actions/index.d.ts.map +0 -1
  301. package/dist/utils/actions/item-add.d.ts.map +0 -1
  302. package/dist/utils/actions/item-remove.d.ts.map +0 -1
  303. package/dist/utils/actions/receive-damaged-return-item.d.ts.map +0 -1
  304. package/dist/utils/actions/receive-return-item.d.ts.map +0 -1
  305. package/dist/utils/actions/reinstate-item.d.ts +0 -2
  306. package/dist/utils/actions/reinstate-item.d.ts.map +0 -1
  307. package/dist/utils/actions/reinstate-item.js +0 -37
  308. package/dist/utils/actions/reinstate-item.js.map +0 -1
  309. package/dist/utils/actions/return-item.d.ts.map +0 -1
  310. package/dist/utils/actions/ship-item.d.ts.map +0 -1
  311. package/dist/utils/actions/shipping-add.d.ts.map +0 -1
  312. package/dist/utils/actions/shipping-remove.d.ts +0 -2
  313. package/dist/utils/actions/shipping-remove.d.ts.map +0 -1
  314. package/dist/utils/actions/shipping-remove.js +0 -41
  315. package/dist/utils/actions/shipping-remove.js.map +0 -1
  316. package/dist/utils/actions/write-off-item.d.ts.map +0 -1
  317. package/dist/utils/apply-order-changes.d.ts +0 -18
  318. package/dist/utils/apply-order-changes.d.ts.map +0 -1
  319. package/dist/utils/apply-order-changes.js +0 -95
  320. package/dist/utils/apply-order-changes.js.map +0 -1
  321. package/dist/utils/base-repository-find.d.ts +0 -3
  322. package/dist/utils/base-repository-find.d.ts.map +0 -1
  323. package/dist/utils/base-repository-find.js +0 -142
  324. package/dist/utils/base-repository-find.js.map +0 -1
  325. package/dist/utils/calculate-order-change.d.ts.map +0 -1
  326. package/dist/utils/index.d.ts.map +0 -1
  327. package/dist/utils/set-action-reference.d.ts +0 -3
  328. package/dist/utils/set-action-reference.d.ts.map +0 -1
  329. package/dist/utils/set-action-reference.js +0 -17
  330. package/dist/utils/set-action-reference.js.map +0 -1
  331. package/dist/utils/transform-order.d.ts.map +0 -1
@@ -14,53 +14,24 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  const utils_1 = require("@medusajs/utils");
16
16
  const core_1 = require("@mikro-orm/core");
17
- const claim_1 = __importDefault(require("./claim"));
18
- const exchange_1 = __importDefault(require("./exchange"));
19
17
  const order_1 = __importDefault(require("./order"));
20
18
  const order_change_1 = __importDefault(require("./order-change"));
21
- const return_1 = __importDefault(require("./return"));
22
19
  const OrderChangeIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
23
20
  tableName: "order_change_action",
24
21
  columns: "order_change_id",
25
- where: "deleted_at IS NOT NULL",
26
22
  });
27
23
  const OrderIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
28
24
  tableName: "order_change_action",
29
25
  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",
51
26
  });
52
27
  const ActionOrderingIndex = (0, utils_1.createPsqlIndexStatementHelper)({
53
28
  tableName: "order_change_action",
54
29
  columns: "ordering",
55
- where: "deleted_at IS NOT NULL",
56
30
  });
57
31
  let OrderChangeAction = class OrderChangeAction {
58
32
  constructor() {
59
33
  this.order_id = null;
60
34
  this.order = null;
61
- this.return_id = null;
62
- this.claim_id = null;
63
- this.exchange_id = null;
64
35
  this.version = null;
65
36
  this.order_change = null;
66
37
  this.reference = null;
@@ -70,27 +41,18 @@ let OrderChangeAction = class OrderChangeAction {
70
41
  this.raw_amount = null;
71
42
  this.internal_note = null;
72
43
  this.applied = false;
73
- this.deleted_at = null;
74
44
  }
75
45
  onCreate() {
76
46
  this.id = (0, utils_1.generateEntityId)(this.id, "ordchact");
77
- this.order_id ??= this.order?.id ?? this.order_change?.order_id ?? null;
78
- this.return_id ??= this.return?.id ?? this.order_change?.return_id ?? null;
79
- this.claim_id ??= this.claim?.id ?? this.order_change?.claim_id ?? null;
80
- this.exchange_id ??=
81
- this.exchange?.id ?? this.order_change?.exchange_id ?? null;
82
- this.order_change_id ??= this.order_change?.id ?? null;
83
- this.version ??= this.order_change?.version ?? null;
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);
84
50
  }
85
51
  onInit() {
86
52
  this.id = (0, utils_1.generateEntityId)(this.id, "ordchact");
87
- this.order_id ??= this.order?.id ?? this.order_change?.order_id ?? null;
88
- this.return_id ??= this.return?.id ?? this.order_change?.return_id ?? null;
89
- this.claim_id ??= this.claim?.id ?? this.order_change?.claim_id ?? null;
90
- this.exchange_id ??=
91
- this.exchange?.id ?? this.order_change?.exchange_id ?? null;
92
- this.order_change_id ??= this.order_change?.id ?? null;
93
- this.version ??= this.order_change?.version ?? null;
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);
94
56
  }
95
57
  };
96
58
  __decorate([
@@ -121,57 +83,6 @@ __decorate([
121
83
  }),
122
84
  __metadata("design:type", Object)
123
85
  ], OrderChangeAction.prototype, "order", void 0);
124
- __decorate([
125
- (0, core_1.ManyToOne)({
126
- entity: () => return_1.default,
127
- mapToPk: true,
128
- fieldName: "return_id",
129
- columnType: "text",
130
- nullable: true,
131
- }),
132
- ReturnIdIndex.MikroORMIndex(),
133
- __metadata("design:type", Object)
134
- ], OrderChangeAction.prototype, "return_id", void 0);
135
- __decorate([
136
- (0, core_1.ManyToOne)(() => return_1.default, {
137
- persist: false,
138
- }),
139
- __metadata("design:type", return_1.default)
140
- ], OrderChangeAction.prototype, "return", void 0);
141
- __decorate([
142
- (0, core_1.ManyToOne)({
143
- entity: () => claim_1.default,
144
- mapToPk: true,
145
- fieldName: "claim_id",
146
- columnType: "text",
147
- nullable: true,
148
- }),
149
- OrderClaimIdIndex.MikroORMIndex(),
150
- __metadata("design:type", Object)
151
- ], OrderChangeAction.prototype, "claim_id", void 0);
152
- __decorate([
153
- (0, core_1.ManyToOne)(() => claim_1.default, {
154
- persist: false,
155
- }),
156
- __metadata("design:type", claim_1.default)
157
- ], OrderChangeAction.prototype, "claim", void 0);
158
- __decorate([
159
- (0, core_1.ManyToOne)({
160
- entity: () => exchange_1.default,
161
- mapToPk: true,
162
- fieldName: "exchange_id",
163
- columnType: "text",
164
- nullable: true,
165
- }),
166
- OrderExchangeIdIndex.MikroORMIndex(),
167
- __metadata("design:type", Object)
168
- ], OrderChangeAction.prototype, "exchange_id", void 0);
169
- __decorate([
170
- (0, core_1.ManyToOne)(() => exchange_1.default, {
171
- persist: false,
172
- }),
173
- __metadata("design:type", exchange_1.default)
174
- ], OrderChangeAction.prototype, "exchange", void 0);
175
86
  __decorate([
176
87
  (0, core_1.Property)({ columnType: "integer", nullable: true }),
177
88
  __metadata("design:type", Object)
@@ -256,11 +167,6 @@ __decorate([
256
167
  }),
257
168
  __metadata("design:type", Date)
258
169
  ], OrderChangeAction.prototype, "updated_at", void 0);
259
- __decorate([
260
- (0, core_1.Property)({ columnType: "timestamptz", nullable: true }),
261
- DeletedAtIndex.MikroORMIndex(),
262
- __metadata("design:type", Object)
263
- ], OrderChangeAction.prototype, "deleted_at", void 0);
264
170
  __decorate([
265
171
  (0, core_1.BeforeCreate)(),
266
172
  __metadata("design:type", Function),
@@ -274,8 +180,7 @@ __decorate([
274
180
  __metadata("design:returntype", void 0)
275
181
  ], OrderChangeAction.prototype, "onInit", null);
276
182
  OrderChangeAction = __decorate([
277
- (0, core_1.Entity)({ tableName: "order_change_action" }),
278
- (0, core_1.Filter)(utils_1.DALUtils.mikroOrmSoftDeletableFilterOptions)
183
+ (0, core_1.Entity)({ tableName: "order_change_action" })
279
184
  ], OrderChangeAction);
280
185
  exports.default = OrderChangeAction;
281
186
  //# 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,2CAMwB;AACxB,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,EAAC;IACzD,SAAS,EAAE,qBAAqB;IAChC,OAAO,EAAE,UAAU;IACnB,KAAK,EAAE,wBAAwB;CAChC,CAAC,CAAA;AAIa,IAAM,iBAA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B"}
@@ -1,25 +1,15 @@
1
1
  import { DAL } from "@medusajs/types";
2
- import { OrderChangeStatus, OrderChangeType } from "@medusajs/utils";
3
- import { Collection, OptionalProps, Rel } from "@mikro-orm/core";
4
- import OrderClaim from "./claim";
5
- import OrderExchange from "./exchange";
2
+ import { OrderChangeStatus } from "@medusajs/utils";
3
+ import { Collection, OptionalProps } from "@mikro-orm/core";
6
4
  import Order from "./order";
7
5
  import OrderChangeAction from "./order-change-action";
8
- import Return from "./return";
9
- type OptionalLineItemProps = DAL.ModelDateColumns;
6
+ type OptionalLineItemProps = DAL.EntityDateColumns;
10
7
  export default class OrderChange {
11
8
  [OptionalProps]?: OptionalLineItemProps;
12
9
  id: string;
13
10
  order_id: string;
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;
11
+ order: Order;
21
12
  version: number;
22
- change_type: OrderChangeType | null;
23
13
  actions: Collection<OrderChangeAction, object>;
24
14
  description: string | null;
25
15
  status: OrderChangeStatus;
@@ -34,12 +24,10 @@ export default class OrderChange {
34
24
  metadata: Record<string, unknown> | null;
35
25
  declined_at?: Date;
36
26
  canceled_by: string | null;
37
- canceled_at?: Date | null;
27
+ canceled_at?: Date;
38
28
  created_at: Date;
39
29
  updated_at: Date;
40
- deleted_at: Date | null;
41
30
  onCreate(): void;
42
31
  onInit(): void;
43
32
  }
44
33
  export {};
45
- //# sourceMappingURL=order-change.d.ts.map
@@ -14,57 +14,22 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  const utils_1 = require("@medusajs/utils");
16
16
  const core_1 = require("@mikro-orm/core");
17
- const claim_1 = __importDefault(require("./claim"));
18
- const exchange_1 = __importDefault(require("./exchange"));
19
17
  const order_1 = __importDefault(require("./order"));
20
18
  const order_change_action_1 = __importDefault(require("./order-change-action"));
21
- const return_1 = __importDefault(require("./return"));
22
19
  const OrderIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
23
20
  tableName: "order_change",
24
21
  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",
41
22
  });
42
23
  const OrderChangeStatusIndex = (0, utils_1.createPsqlIndexStatementHelper)({
43
24
  tableName: "order_change",
44
25
  columns: "status",
45
- where: "deleted_at IS NOT NULL",
46
- });
47
- const OrderChangeTypeIndex = (0, utils_1.createPsqlIndexStatementHelper)({
48
- tableName: "order_change",
49
- columns: "change_type",
50
- where: "deleted_at IS NOT NULL",
51
- });
52
- const DeletedAtIndex = (0, utils_1.createPsqlIndexStatementHelper)({
53
- tableName: "order_change",
54
- columns: "deleted_at",
55
- where: "deleted_at IS NOT NULL",
56
26
  });
57
27
  const VersionIndex = (0, utils_1.createPsqlIndexStatementHelper)({
58
28
  tableName: "order_change",
59
29
  columns: ["order_id", "version"],
60
- where: "deleted_at IS NOT NULL",
61
30
  });
62
31
  let OrderChange = class OrderChange {
63
32
  constructor() {
64
- this.return_id = null;
65
- this.claim_id = null;
66
- this.exchange_id = null;
67
- this.change_type = null;
68
33
  this.actions = new core_1.Collection(this);
69
34
  this.description = null;
70
35
  this.status = utils_1.OrderChangeStatus.PENDING;
@@ -77,22 +42,14 @@ let OrderChange = class OrderChange {
77
42
  this.declined_reason = null;
78
43
  this.metadata = null;
79
44
  this.canceled_by = null;
80
- this.canceled_at = null;
81
- this.deleted_at = null;
82
45
  }
83
46
  onCreate() {
84
47
  this.id = (0, utils_1.generateEntityId)(this.id, "ordch");
85
- this.order_id ??= this.order?.id;
86
- this.return_id ??= this.return?.id;
87
- this.claim_id ??= this.claim?.id;
88
- this.exchange_id ??= this.exchange?.id;
48
+ this.order_id ?? (this.order_id = this.order?.id);
89
49
  }
90
50
  onInit() {
91
51
  this.id = (0, utils_1.generateEntityId)(this.id, "ordch");
92
- this.order_id ??= this.order?.id;
93
- this.return_id ??= this.return?.id;
94
- this.claim_id ??= this.claim?.id;
95
- this.exchange_id ??= this.exchange?.id;
52
+ this.order_id ?? (this.order_id = this.order?.id);
96
53
  }
97
54
  };
98
55
  __decorate([
@@ -114,69 +71,13 @@ __decorate([
114
71
  (0, core_1.ManyToOne)(() => order_1.default, {
115
72
  persist: false,
116
73
  }),
117
- __metadata("design:type", Object)
74
+ __metadata("design:type", order_1.default)
118
75
  ], OrderChange.prototype, "order", void 0);
119
- __decorate([
120
- (0, core_1.ManyToOne)({
121
- entity: () => return_1.default,
122
- mapToPk: true,
123
- fieldName: "return_id",
124
- columnType: "text",
125
- nullable: true,
126
- }),
127
- ReturnIdIndex.MikroORMIndex(),
128
- __metadata("design:type", Object)
129
- ], OrderChange.prototype, "return_id", void 0);
130
- __decorate([
131
- (0, core_1.ManyToOne)(() => return_1.default, {
132
- persist: false,
133
- }),
134
- __metadata("design:type", Object)
135
- ], OrderChange.prototype, "return", void 0);
136
- __decorate([
137
- (0, core_1.ManyToOne)({
138
- entity: () => claim_1.default,
139
- mapToPk: true,
140
- fieldName: "claim_id",
141
- columnType: "text",
142
- nullable: true,
143
- }),
144
- OrderClaimIdIndex.MikroORMIndex(),
145
- __metadata("design:type", Object)
146
- ], OrderChange.prototype, "claim_id", void 0);
147
- __decorate([
148
- (0, core_1.ManyToOne)(() => claim_1.default, {
149
- persist: false,
150
- }),
151
- __metadata("design:type", claim_1.default)
152
- ], OrderChange.prototype, "claim", void 0);
153
- __decorate([
154
- (0, core_1.ManyToOne)({
155
- entity: () => exchange_1.default,
156
- mapToPk: true,
157
- fieldName: "exchange_id",
158
- columnType: "text",
159
- nullable: true,
160
- }),
161
- OrderExchangeIdIndex.MikroORMIndex(),
162
- __metadata("design:type", Object)
163
- ], OrderChange.prototype, "exchange_id", void 0);
164
- __decorate([
165
- (0, core_1.ManyToOne)(() => exchange_1.default, {
166
- persist: false,
167
- }),
168
- __metadata("design:type", exchange_1.default)
169
- ], OrderChange.prototype, "exchange", void 0);
170
76
  __decorate([
171
77
  (0, core_1.Property)({ columnType: "integer" }),
172
78
  VersionIndex.MikroORMIndex(),
173
79
  __metadata("design:type", Number)
174
80
  ], OrderChange.prototype, "version", void 0);
175
- __decorate([
176
- (0, core_1.Enum)({ items: () => utils_1.OrderChangeType, nullable: true }),
177
- OrderChangeTypeIndex.MikroORMIndex(),
178
- __metadata("design:type", Object)
179
- ], OrderChange.prototype, "change_type", void 0);
180
81
  __decorate([
181
82
  (0, core_1.OneToMany)(() => order_change_action_1.default, (action) => action.order_change, {
182
83
  cascade: [core_1.Cascade.PERSIST, "sotf-remove"],
@@ -253,7 +154,7 @@ __decorate([
253
154
  columnType: "timestamptz",
254
155
  nullable: true,
255
156
  }),
256
- __metadata("design:type", Object)
157
+ __metadata("design:type", Date)
257
158
  ], OrderChange.prototype, "canceled_at", void 0);
258
159
  __decorate([
259
160
  (0, core_1.Property)({
@@ -272,11 +173,6 @@ __decorate([
272
173
  }),
273
174
  __metadata("design:type", Date)
274
175
  ], OrderChange.prototype, "updated_at", void 0);
275
- __decorate([
276
- (0, core_1.Property)({ columnType: "timestamptz", nullable: true }),
277
- DeletedAtIndex.MikroORMIndex(),
278
- __metadata("design:type", Object)
279
- ], OrderChange.prototype, "deleted_at", void 0);
280
176
  __decorate([
281
177
  (0, core_1.BeforeCreate)(),
282
178
  __metadata("design:type", Function),
@@ -291,7 +187,6 @@ __decorate([
291
187
  ], OrderChange.prototype, "onInit", null);
292
188
  OrderChange = __decorate([
293
189
  (0, core_1.Entity)({ tableName: "order_change" }),
294
- (0, core_1.Filter)(utils_1.DALUtils.mikroOrmSoftDeletableFilterOptions),
295
190
  VersionIndex.MikroORMIndex()
296
191
  ], OrderChange);
297
192
  exports.default = OrderChange;
@@ -1 +1 @@
1
- {"version":3,"file":"order-change.js","sourceRoot":"","sources":["../../src/models/order-change.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,2CAMwB;AACxB,0CAcwB;AAExB,oDAAgC;AAChC,0DAAsC;AACtC,oDAA2B;AAC3B,gFAAqD;AACrD,sDAA6B;AAI7B,MAAM,YAAY,GAAG,IAAA,sCAA8B,EAAC;IAClD,SAAS,EAAE,cAAc;IACzB,OAAO,EAAE,UAAU;IACnB,KAAK,EAAE,wBAAwB;CAChC,CAAC,CAAA;AAEF,MAAM,aAAa,GAAG,IAAA,sCAA8B,EAAC;IACnD,SAAS,EAAE,cAAc;IACzB,OAAO,EAAE,WAAW;IACpB,KAAK,EAAE,kDAAkD;CAC1D,CAAC,CAAA;AAEF,MAAM,iBAAiB,GAAG,IAAA,sCAA8B,EAAC;IACvD,SAAS,EAAE,cAAc;IACzB,OAAO,EAAE,UAAU;IACnB,KAAK,EAAE,iDAAiD;CACzD,CAAC,CAAA;AAEF,MAAM,oBAAoB,GAAG,IAAA,sCAA8B,EAAC;IAC1D,SAAS,EAAE,cAAc;IACzB,OAAO,EAAE,aAAa;IACtB,KAAK,EAAE,oDAAoD;CAC5D,CAAC,CAAA;AAEF,MAAM,sBAAsB,GAAG,IAAA,sCAA8B,EAAC;IAC5D,SAAS,EAAE,cAAc;IACzB,OAAO,EAAE,QAAQ;IACjB,KAAK,EAAE,wBAAwB;CAChC,CAAC,CAAA;AAEF,MAAM,oBAAoB,GAAG,IAAA,sCAA8B,EAAC;IAC1D,SAAS,EAAE,cAAc;IACzB,OAAO,EAAE,aAAa;IACtB,KAAK,EAAE,wBAAwB;CAChC,CAAC,CAAA;AAEF,MAAM,c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,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;AAGhB;IADC,IAAA,mBAAY,GAAE;;;;2CAId;AAGD;IADC,IAAA,aAAM,GAAE;;;;yCAIR;AAjHkB,WAAW;IAF/B,IAAA,aAAM,EAAC,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;IACrC,YAAY,CAAC,aAAa,EAAE;GACR,WAAW,CAkH/B;kBAlHoB,WAAW"}
@@ -1,17 +1,17 @@
1
1
  import { BigNumberRawValue, DAL } from "@medusajs/types";
2
2
  import { BigNumber } from "@medusajs/utils";
3
- import { OptionalProps, Rel } from "@mikro-orm/core";
3
+ import { OptionalProps } from "@mikro-orm/core";
4
4
  import LineItem from "./line-item";
5
5
  import Order from "./order";
6
- type OptionalLineItemProps = DAL.ModelDateColumns;
6
+ type OptionalLineItemProps = DAL.EntityDateColumns;
7
7
  export default class OrderItem {
8
8
  [OptionalProps]?: OptionalLineItemProps;
9
9
  id: string;
10
10
  order_id: string;
11
- order: Rel<Order>;
12
11
  version: number;
12
+ order: Order;
13
13
  item_id: string;
14
- item: Rel<LineItem>;
14
+ item: LineItem;
15
15
  quantity: BigNumber | number;
16
16
  raw_quantity: BigNumberRawValue;
17
17
  fulfilled_quantity: BigNumber | number;
@@ -34,4 +34,3 @@ export default class OrderItem {
34
34
  onInit(): void;
35
35
  }
36
36
  export {};
37
- //# sourceMappingURL=order-item.d.ts.map
@@ -49,15 +49,15 @@ let OrderItem = class OrderItem {
49
49
  }
50
50
  onCreate() {
51
51
  this.id = (0, utils_1.generateEntityId)(this.id, "orditem");
52
- this.order_id ??= this.order?.id;
53
- this.item_id ??= this.item?.id;
54
- this.version ??= this.order?.version;
52
+ this.order_id ?? (this.order_id = this.order?.id);
53
+ this.item_id ?? (this.item_id = this.item?.id);
54
+ this.version ?? (this.version = this.order?.version);
55
55
  }
56
56
  onInit() {
57
57
  this.id = (0, utils_1.generateEntityId)(this.id, "orditem");
58
- this.order_id ??= this.order?.id;
59
- this.item_id ??= this.item?.id;
60
- this.version ??= this.order?.version;
58
+ this.order_id ?? (this.order_id = this.order?.id);
59
+ this.item_id ?? (this.item_id = this.item?.id);
60
+ this.version ?? (this.version = this.order?.version);
61
61
  }
62
62
  };
63
63
  __decorate([
@@ -74,17 +74,17 @@ __decorate([
74
74
  OrderIdIndex.MikroORMIndex(),
75
75
  __metadata("design:type", String)
76
76
  ], OrderItem.prototype, "order_id", void 0);
77
- __decorate([
78
- (0, core_1.ManyToOne)(() => order_1.default, {
79
- persist: false,
80
- }),
81
- __metadata("design:type", Object)
82
- ], OrderItem.prototype, "order", void 0);
83
77
  __decorate([
84
78
  (0, core_1.Property)({ columnType: "integer" }),
85
79
  OrderVersionIndex.MikroORMIndex(),
86
80
  __metadata("design:type", Number)
87
81
  ], OrderItem.prototype, "version", void 0);
82
+ __decorate([
83
+ (0, core_1.ManyToOne)(() => order_1.default, {
84
+ persist: false,
85
+ }),
86
+ __metadata("design:type", order_1.default)
87
+ ], OrderItem.prototype, "order", void 0);
88
88
  __decorate([
89
89
  (0, core_1.ManyToOne)({
90
90
  entity: () => line_item_1.default,
@@ -99,7 +99,7 @@ __decorate([
99
99
  (0, core_1.ManyToOne)(() => line_item_1.default, {
100
100
  persist: false,
101
101
  }),
102
- __metadata("design:type", Object)
102
+ __metadata("design:type", line_item_1.default)
103
103
  ], OrderItem.prototype, "item", void 0);
104
104
  __decorate([
105
105
  (0, utils_1.MikroOrmBigNumberProperty)(),
@@ -1 +1 @@
1
- {"version":3,"file":"order-item.js","sourceRoot":"","sources":["../../src/models/order-item.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,2CAKwB;AACxB,0CASwB;AACxB,4DAAkC;AAClC,oDAA2B;AAI3B,MAAM,YAAY,GAAG,IAAA,sCAA8B,EA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;2DACS;AAG3C;IADC,IAAA,eAAQ,EAAC,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACH;AAO/C;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;6CAAA;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;6CAAA;AAIhB;IAFC,IAAA,eAAQ,EAAC,EAAE,UAAU,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACvD,cAAc,CAAC,aAAa,EAAE;;6CACD;AAG9B;IADC,IAAA,mBAAY,GAAE;;;;yCAMd;AAGD;IADC,IAAA,aAAM,GAAE;;;;uCAMR;AApHkB,SAAS;IAD7B,IAAA,aAAM,EAAC,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;GACf,SAAS,CAqH7B;kBArHoB,SAAS"}
@@ -1,25 +1,16 @@
1
1
  import { DAL } from "@medusajs/types";
2
- import { OptionalProps, Rel } from "@mikro-orm/core";
3
- import Claim from "./claim";
4
- import Exchange from "./exchange";
2
+ import { OptionalProps } from "@mikro-orm/core";
5
3
  import Order from "./order";
6
- import Return from "./return";
7
4
  import ShippingMethod from "./shipping-method";
8
- type OptionalShippingMethodProps = DAL.ModelDateColumns;
5
+ type OptionalShippingMethodProps = DAL.EntityDateColumns;
9
6
  export default class OrderShippingMethod {
10
7
  [OptionalProps]?: OptionalShippingMethodProps;
11
8
  id: string;
12
9
  order_id: string;
13
- order: Rel<Order>;
14
- return_id: string | null;
15
- return: Rel<Return>;
16
- exchange_id: string | null;
17
- exchange: Rel<Exchange>;
18
- claim_id: string | null;
19
- claim: Rel<Claim>;
20
10
  version: number;
11
+ order: Order;
21
12
  shipping_method_id: string;
22
- shipping_method: Rel<ShippingMethod>;
13
+ shipping_method: ShippingMethod;
23
14
  created_at: Date;
24
15
  updated_at: Date;
25
16
  deleted_at: Date | null;
@@ -27,4 +18,3 @@ export default class OrderShippingMethod {
27
18
  onInit(): void;
28
19
  }
29
20
  export {};
30
- //# sourceMappingURL=order-shipping-method.d.ts.map