@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,31 +14,13 @@ 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
- const return_1 = __importDefault(require("./return"));
21
18
  const shipping_method_1 = __importDefault(require("./shipping-method"));
22
19
  const OrderIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
23
20
  tableName: "order_shipping",
24
21
  columns: ["order_id"],
25
22
  where: "deleted_at IS NOT NULL",
26
23
  });
27
- const ReturnIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
28
- tableName: "order_shipping",
29
- columns: "return_id",
30
- where: "return_id IS NOT NULL AND deleted_at IS NOT NULL",
31
- });
32
- const ExchangeIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
33
- tableName: "order_shipping",
34
- columns: ["exchange_id"],
35
- where: "exchange_id IS NOT NULL AND deleted_at IS NOT NULL",
36
- });
37
- const ClaimIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
38
- tableName: "order_shipping",
39
- columns: ["claim_id"],
40
- where: "claim_id IS NOT NULL AND deleted_at IS NOT NULL",
41
- });
42
24
  const OrderVersionIndex = (0, utils_1.createPsqlIndexStatementHelper)({
43
25
  tableName: "order_shipping",
44
26
  columns: ["version"],
@@ -56,26 +38,19 @@ const DeletedAtIndex = (0, utils_1.createPsqlIndexStatementHelper)({
56
38
  });
57
39
  let OrderShippingMethod = class OrderShippingMethod {
58
40
  constructor() {
59
- this.return_id = null;
60
41
  this.deleted_at = null;
61
42
  }
62
43
  onCreate() {
63
44
  this.id = (0, utils_1.generateEntityId)(this.id, "ordspmv");
64
- this.order_id ??= this.order?.id;
65
- this.return_id ??= this.return?.id;
66
- this.claim_id ??= this.claim?.id;
67
- this.exchange_id ??= this.exchange?.id;
68
- this.shipping_method_id ??= this.shipping_method?.id;
69
- this.version ??= this.order?.version;
45
+ this.order_id ?? (this.order_id = this.order?.id);
46
+ this.shipping_method_id ?? (this.shipping_method_id = this.shipping_method?.id);
47
+ this.version ?? (this.version = this.order?.version);
70
48
  }
71
49
  onInit() {
72
50
  this.id = (0, utils_1.generateEntityId)(this.id, "ordspmv");
73
- this.order_id ??= this.order?.id;
74
- this.return_id ??= this.return?.id;
75
- this.claim_id ??= this.claim?.id;
76
- this.exchange_id ??= this.exchange?.id;
77
- this.shipping_method_id ??= this.shipping_method?.id;
78
- this.version ??= this.order?.version;
51
+ this.order_id ?? (this.order_id = this.order?.id);
52
+ this.shipping_method_id ?? (this.shipping_method_id = this.shipping_method?.id);
53
+ this.version ?? (this.version = this.order?.version);
79
54
  }
80
55
  };
81
56
  __decorate([
@@ -92,68 +67,17 @@ __decorate([
92
67
  OrderIdIndex.MikroORMIndex(),
93
68
  __metadata("design:type", String)
94
69
  ], OrderShippingMethod.prototype, "order_id", void 0);
95
- __decorate([
96
- (0, core_1.ManyToOne)(() => order_1.default, {
97
- persist: false,
98
- }),
99
- __metadata("design:type", Object)
100
- ], OrderShippingMethod.prototype, "order", void 0);
101
- __decorate([
102
- (0, core_1.ManyToOne)({
103
- entity: () => return_1.default,
104
- mapToPk: true,
105
- fieldName: "return_id",
106
- columnType: "text",
107
- nullable: true,
108
- }),
109
- ReturnIdIndex.MikroORMIndex(),
110
- __metadata("design:type", Object)
111
- ], OrderShippingMethod.prototype, "return_id", void 0);
112
- __decorate([
113
- (0, core_1.ManyToOne)(() => return_1.default, {
114
- persist: false,
115
- }),
116
- __metadata("design:type", Object)
117
- ], OrderShippingMethod.prototype, "return", void 0);
118
- __decorate([
119
- (0, core_1.ManyToOne)({
120
- entity: () => exchange_1.default,
121
- mapToPk: true,
122
- fieldName: "exchange_id",
123
- columnType: "text",
124
- nullable: true,
125
- }),
126
- ExchangeIdIndex.MikroORMIndex(),
127
- __metadata("design:type", Object)
128
- ], OrderShippingMethod.prototype, "exchange_id", void 0);
129
- __decorate([
130
- (0, core_1.ManyToOne)(() => exchange_1.default, {
131
- persist: false,
132
- }),
133
- __metadata("design:type", Object)
134
- ], OrderShippingMethod.prototype, "exchange", void 0);
135
- __decorate([
136
- (0, core_1.ManyToOne)({
137
- entity: () => claim_1.default,
138
- mapToPk: true,
139
- fieldName: "claim_id",
140
- columnType: "text",
141
- nullable: true,
142
- }),
143
- ClaimIdIndex.MikroORMIndex(),
144
- __metadata("design:type", Object)
145
- ], OrderShippingMethod.prototype, "claim_id", void 0);
146
- __decorate([
147
- (0, core_1.ManyToOne)(() => claim_1.default, {
148
- persist: false,
149
- }),
150
- __metadata("design:type", Object)
151
- ], OrderShippingMethod.prototype, "claim", void 0);
152
70
  __decorate([
153
71
  (0, core_1.Property)({ columnType: "integer" }),
154
72
  OrderVersionIndex.MikroORMIndex(),
155
73
  __metadata("design:type", Number)
156
74
  ], OrderShippingMethod.prototype, "version", void 0);
75
+ __decorate([
76
+ (0, core_1.ManyToOne)(() => order_1.default, {
77
+ persist: false,
78
+ }),
79
+ __metadata("design:type", order_1.default)
80
+ ], OrderShippingMethod.prototype, "order", void 0);
157
81
  __decorate([
158
82
  (0, core_1.ManyToOne)({
159
83
  entity: () => shipping_method_1.default,
@@ -168,7 +92,7 @@ __decorate([
168
92
  (0, core_1.ManyToOne)(() => shipping_method_1.default, {
169
93
  persist: false,
170
94
  }),
171
- __metadata("design:type", Object)
95
+ __metadata("design:type", shipping_method_1.default)
172
96
  ], OrderShippingMethod.prototype, "shipping_method", void 0);
173
97
  __decorate([
174
98
  (0, core_1.Property)({
@@ -1 +1 @@
1
- {"version":3,"file":"order-shipping-method.js","sourceRoot":"","sources":["../../src/models/order-shipping-method.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,2CAGwB;AACxB,0CASwB;AACxB,oDAA2B;AAC3B,0DAAiC;AACjC,oDAA2B;AAC3B,sDAA6B;AAC7B,wEAA8C;AAI9C,MAAM,YAAY,GAAG,IAAA,sCAA8B,EAAC;IAClD,SAAS,EAAE,gBAAgB;IAC3B,OAAO,EAAE,CAAC,UAAU,CAAC;IACrB,KAAK,EAAE,wBAAwB;CAChC,CAAC,CAAA;AAEF,MAAM,aAAa,GAAG,IAAA,sCAA8B,EAAC;IACnD,SAAS,EAAE,gBAAgB;IAC3B,OAAO,EAAE,WAAW;IACpB,KAAK,EAAE,kDAAkD;CAC1D,CAAC,CAAA;AAEF,MAAM,eAAe,GAAG,IAAA,sCAA8B,EAAC;IACrD,SAAS,EAAE,gBAAgB;IAC3B,OAAO,EAAE,CAAC,aAAa,CAAC;IACxB,KAAK,EAAE,oDAAoD;CAC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SAAS,EAAE,gBAAgB,EAAE,CAAC;GACnB,mBAAmB,CAwEvC;kBAxEoB,mBAAmB"}
@@ -1,6 +1,5 @@
1
1
  import { BigNumber } from "@medusajs/utils";
2
- import { Rel } from "@mikro-orm/core";
3
- import Order from "./order";
2
+ import { Order } from ".";
4
3
  type OrderSummaryTotals = {
5
4
  total: BigNumber;
6
5
  subtotal: BigNumber;
@@ -20,13 +19,11 @@ type OrderSummaryTotals = {
20
19
  future_projected_total: BigNumber;
21
20
  balance: BigNumber;
22
21
  future_balance: BigNumber;
23
- paid_total: BigNumber;
24
- refunded_total: BigNumber;
25
22
  };
26
23
  export default class OrderSummary {
27
24
  id: string;
28
25
  order_id: string;
29
- order: Rel<Order>;
26
+ order: Order;
30
27
  version: number;
31
28
  totals: OrderSummaryTotals | null;
32
29
  created_at: Date;
@@ -36,4 +33,3 @@ export default class OrderSummary {
36
33
  onInit(): void;
37
34
  }
38
35
  export {};
39
- //# sourceMappingURL=order-summary.d.ts.map
@@ -8,13 +8,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
8
8
  var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
11
  Object.defineProperty(exports, "__esModule", { value: true });
15
12
  const utils_1 = require("@medusajs/utils");
16
13
  const core_1 = require("@mikro-orm/core");
17
- const order_1 = __importDefault(require("./order"));
14
+ const _models_1 = require(".");
18
15
  const OrderIdVersionIndex = (0, utils_1.createPsqlIndexStatementHelper)({
19
16
  tableName: "order_summary",
20
17
  columns: ["order_id", "version"],
@@ -33,11 +30,11 @@ let OrderSummary = class OrderSummary {
33
30
  }
34
31
  onCreate() {
35
32
  this.id = (0, utils_1.generateEntityId)(this.id, "ordsum");
36
- this.order_id ??= this.order?.id;
33
+ this.order_id ?? (this.order_id = this.order?.id);
37
34
  }
38
35
  onInit() {
39
36
  this.id = (0, utils_1.generateEntityId)(this.id, "ordsum");
40
- this.order_id ??= this.order?.id;
37
+ this.order_id ?? (this.order_id = this.order?.id);
41
38
  }
42
39
  };
43
40
  __decorate([
@@ -46,7 +43,7 @@ __decorate([
46
43
  ], OrderSummary.prototype, "id", void 0);
47
44
  __decorate([
48
45
  (0, core_1.ManyToOne)({
49
- entity: () => order_1.default,
46
+ entity: () => _models_1.Order,
50
47
  columnType: "text",
51
48
  fieldName: "order_id",
52
49
  mapToPk: true,
@@ -55,10 +52,10 @@ __decorate([
55
52
  __metadata("design:type", String)
56
53
  ], OrderSummary.prototype, "order_id", void 0);
57
54
  __decorate([
58
- (0, core_1.ManyToOne)(() => order_1.default, {
55
+ (0, core_1.ManyToOne)(() => _models_1.Order, {
59
56
  persist: false,
60
57
  }),
61
- __metadata("design:type", Object)
58
+ __metadata("design:type", _models_1.Order)
62
59
  ], OrderSummary.prototype, "order", void 0);
63
60
  __decorate([
64
61
  (0, core_1.Property)({
@@ -1 +1 @@
1
- {"version":3,"file":"order-summary.js","sourceRoot":"","sources":["../../src/models/order-summary.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,2CAIwB;AACxB,0CAQwB;AACxB,oDAA2B;AA8B3B,MAAM,mBAAmB,GAAG,IAAA,sCAA8B,EAAC;IACzD,SAAS,EAAE,eAAe;IAC1B,OAAO,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC;IAChC,KAAK,EAAE,wBAAwB;CAChC,CAAC,CAAA;AAEF,MAAM,cAAc,GAAG,IAAA,sCAA8B,EAAC;IACpD,SAAS,EAAE,OAAO;IAClB,OAAO,EAAE,YAAY;IACrB,KAAK,EAAE,wBAAwB;CAChC,CAAC,CAAA;AAIa,IAAM,YAAY,GAAlB,MAAM,YAAY;IAAlB;QAsBb,YAAO,GAAW,CAAC,CAAA;QAGnB,WAAM,GAA8B,EAAwB,CAAA;QAmB5D,eAAU,GAAgB,IAAI,CA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AU,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACvD,cAAc,CAAC,aAAa,EAAE;;gDACD;AAG9B;IADC,IAAA,mBAAY,GAAE;;;;4CAId;AAGD;IADC,IAAA,aAAM,GAAE;;;;0CAIR;AAxDkB,YAAY;IAFhC,IAAA,aAAM,EAAC,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;IACtC,mBAAmB,CAAC,aAAa,EAAE;GACf,YAAY,CAyDhC;kBAzDoB,YAAY"}
@@ -1,16 +1,15 @@
1
1
  import { DAL } from "@medusajs/types";
2
2
  import { OrderStatus } from "@medusajs/utils";
3
- import { Collection, OptionalProps, Rel } from "@mikro-orm/core";
3
+ import { Collection, OptionalProps } from "@mikro-orm/core";
4
4
  import Address from "./address";
5
5
  import OrderItem from "./order-item";
6
6
  import OrderShippingMethod from "./order-shipping-method";
7
7
  import OrderSummary from "./order-summary";
8
8
  import Transaction from "./transaction";
9
- type OptionalOrderProps = "shipping_address" | "billing_address" | DAL.ModelDateColumns;
9
+ type OptionalOrderProps = "shipping_address" | "billing_address" | DAL.EntityDateColumns;
10
10
  export default class Order {
11
11
  [OptionalProps]?: OptionalOrderProps;
12
12
  id: string;
13
- display_id: number;
14
13
  region_id: string | null;
15
14
  customer_id: string | null;
16
15
  version: number;
@@ -20,9 +19,9 @@ export default class Order {
20
19
  email: string | null;
21
20
  currency_code: string;
22
21
  shipping_address_id?: string | null;
23
- shipping_address?: Rel<Address> | null;
22
+ shipping_address?: Address | null;
24
23
  billing_address_id?: string | null;
25
- billing_address?: Rel<Address> | null;
24
+ billing_address?: Address | null;
26
25
  no_notification: boolean | null;
27
26
  summary: Collection<OrderSummary, object>;
28
27
  metadata: Record<string, unknown> | null;
@@ -37,4 +36,3 @@ export default class Order {
37
36
  onInit(): void;
38
37
  }
39
38
  export {};
40
- //# sourceMappingURL=order.d.ts.map
@@ -19,11 +19,6 @@ const order_item_1 = __importDefault(require("./order-item"));
19
19
  const order_shipping_method_1 = __importDefault(require("./order-shipping-method"));
20
20
  const order_summary_1 = __importDefault(require("./order-summary"));
21
21
  const transaction_1 = __importDefault(require("./transaction"));
22
- const DisplayIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
23
- tableName: "order",
24
- columns: "display_id",
25
- where: "deleted_at IS NOT NULL",
26
- });
27
22
  const RegionIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
28
23
  tableName: "order",
29
24
  columns: "region_id",
@@ -92,11 +87,6 @@ __decorate([
92
87
  (0, core_1.PrimaryKey)({ columnType: "text" }),
93
88
  __metadata("design:type", String)
94
89
  ], Order.prototype, "id", void 0);
95
- __decorate([
96
- (0, core_1.Property)({ autoincrement: true, primary: false }),
97
- DisplayIdIndex.MikroORMIndex(),
98
- __metadata("design:type", Number)
99
- ], Order.prototype, "display_id", void 0);
100
90
  __decorate([
101
91
  (0, core_1.Property)({
102
92
  columnType: "text",
@@ -137,7 +127,7 @@ __decorate([
137
127
  columnType: "boolean",
138
128
  }),
139
129
  IsDraftOrderIndex.MikroORMIndex(),
140
- __metadata("design:type", Boolean)
130
+ __metadata("design:type", Object)
141
131
  ], Order.prototype, "is_draft_order", void 0);
142
132
  __decorate([
143
133
  (0, core_1.Property)({ columnType: "text", nullable: true }),
@@ -1 +1 @@
1
- {"version":3,"file":"order.js","sourceRoot":"","sources":["../../src/models/order.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,2CAIwB;AACxB,0CAawB;AACxB,wDAA+B;AAC/B,8DAAoC;AACpC,oFAAyD;AACzD,oEAA0C;AAC1C,gEAAuC;AAOvC,MAAM,cAAc,GAAG,IAAA,sCAA8B,EAAC;IACpD,SAAS,EAAE,OAAO;IAClB,OAAO,EAAE,YAAY;IACrB,KAAK,EAAE,wBAAwB;CAChC,CAAC,CAAA;AAEF,MAAM,aAAa,GAAG,IAAA,sCAA8B,EAAC;IACnD,SAAS,EAAE,OAAO;IAClB,OAAO,EAAE,WAAW;IACpB,KAAK,EAAE,wBAAwB;CA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entLine from "./adjustment-line";
3
2
  import ShippingMethod from "./shipping-method";
4
3
  export default class ShippingMethodAdjustment extends AdjustmentLine {
5
- shipping_method: Rel<ShippingMethod>;
4
+ shipping_method: ShippingMethod;
6
5
  shipping_method_id: string;
7
6
  onCreate(): void;
8
7
  onInit(): void;
9
8
  }
10
- //# sourceMappingURL=shipping-method-adjustment.d.ts.map
@@ -23,18 +23,18 @@ const ShippingMethodIdIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
23
23
  let ShippingMethodAdjustment = class ShippingMethodAdjustment extends adjustment_line_1.default {
24
24
  onCreate() {
25
25
  this.id = (0, utils_1.generateEntityId)(this.id, "ordsmadj");
26
- this.shipping_method_id ??= this.shipping_method?.id;
26
+ this.shipping_method_id ?? (this.shipping_method_id = this.shipping_method?.id);
27
27
  }
28
28
  onInit() {
29
29
  this.id = (0, utils_1.generateEntityId)(this.id, "ordsmadj");
30
- this.shipping_method_id ??= this.shipping_method?.id;
30
+ this.shipping_method_id ?? (this.shipping_method_id = this.shipping_method?.id);
31
31
  }
32
32
  };
33
33
  __decorate([
34
34
  (0, core_1.ManyToOne)(() => shipping_method_1.default, {
35
35
  persist: false,
36
36
  }),
37
- __metadata("design:type", Object)
37
+ __metadata("design:type", shipping_method_1.default)
38
38
  ], ShippingMethodAdjustment.prototype, "shipping_method", void 0);
39
39
  __decorate([
40
40
  (0, core_1.ManyToOne)({
@@ -1 +1 @@
1
- {"version":3,"file":"shipping-method-adjustment.js","sourceRoot":"","sources":["../../src/models/shipping-method-adjustment.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,2CAGwB;AACxB,0CAA8E;AAC9E,wEAA8C;AAC9C,wEAA8C;AAE9C,MAAM,uBAAuB,GAAG,IAAA,sCAA8B,EAAC;IAC7D,SAAS,EAAE,kCAAkC;IAC7C,OAAO,EAAE,oBAAoB;CAC9B,CAAC,CAAA;AAGa,IAAM,wBAAwB,GAA9B,MAAM,wBAAyB,SAAQ,yBAAc;IAiBlE,QA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BAAyB,SAAQ,yBAAc;IAiBlE,QAAQ;QACN,IAAI,CAAC,EAAE,GAAG,IAAA,wBAAgB,EAAC,IAAI,CAAC,EAAE,EAAE,UAAU,CAAC,CAAA;QAC/C,IAAI,CAAC,kBAAkB,KAAvB,IAAI,CAAC,kBAAkB,GAAK,IAAI,CAAC,eAAe,EAAE,EAAE,EAAA;IACtD,CAAC;IAGD,MAAM;QACJ,IAAI,CAAC,EAAE,GAAG,IAAA,wBAAgB,EAAC,IAAI,CAAC,EAAE,EAAE,UAAU,CAAC,CAAA;QAC/C,IAAI,CAAC,kBAAkB,KAAvB,IAAI,CAAC,kBAAkB,GAAK,IAAI,CAAC,eAAe,EAAE,EAAE,EAAA;IACtD,CAAC;CACF,CAAA;AAvBC;IAHC,IAAA,gBAAS,EAAC,GAAG,EAAE,CAAC,yBAAc,EAAE;QAC/B,OAAO,EAAE,KAAK;KACf,CAAC;8BACe,yBAAc;iEAAA;AAU/B;IARC,IAAA,gBAAS,EAAC;QACT,MAAM,EAAE,GAAG,EAAE,CAAC,yBAAc;QAC5B,UAAU,EAAE,MAAM;QAClB,SAAS,EAAE,oBAAoB;QAC/B,OAAO,EAAE,IAAI;QACb,QAAQ,EAAE,SAAS;KACpB,CAAC;IACD,uBAAuB,CAAC,aAAa,EAAE;;oEACd;AAG1B;IADC,IAAA,mBAAY,GAAE;;;;wDAId;AAGD;IADC,IAAA,aAAM,GAAE;;;;sDAIR;AA1BkB,wBAAwB;IAD5C,IAAA,aAAM,EAAC,EAAE,SAAS,EAAE,kCAAkC,EAAE,CAAC;GACrC,wBAAwB,CA2B5C;kBA3BoB,wBAAwB"}
@@ -1,10 +1,8 @@
1
- import { Rel } from "@mikro-orm/core";
2
1
  import ShippingMethod from "./shipping-method";
3
2
  import TaxLine from "./tax-line";
4
3
  export default class ShippingMethodTaxLine extends TaxLine {
5
- shipping_method: Rel<ShippingMethod>;
4
+ shipping_method: ShippingMethod;
6
5
  shipping_method_id: string;
7
6
  onCreate(): void;
8
7
  onInit(): void;
9
8
  }
10
- //# sourceMappingURL=shipping-method-tax-line.d.ts.map
@@ -23,18 +23,18 @@ const ShippingMethodIdIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
23
23
  let ShippingMethodTaxLine = class ShippingMethodTaxLine extends tax_line_1.default {
24
24
  onCreate() {
25
25
  this.id = (0, utils_1.generateEntityId)(this.id, "ordsmtxl");
26
- this.shipping_method_id ??= this.shipping_method?.id;
26
+ this.shipping_method_id ?? (this.shipping_method_id = this.shipping_method?.id);
27
27
  }
28
28
  onInit() {
29
29
  this.id = (0, utils_1.generateEntityId)(this.id, "ordsmtxl");
30
- this.shipping_method_id ??= this.shipping_method?.id;
30
+ this.shipping_method_id ?? (this.shipping_method_id = this.shipping_method?.id);
31
31
  }
32
32
  };
33
33
  __decorate([
34
34
  (0, core_1.ManyToOne)(() => shipping_method_1.default, {
35
35
  persist: false,
36
36
  }),
37
- __metadata("design:type", Object)
37
+ __metadata("design:type", shipping_method_1.default)
38
38
  ], ShippingMethodTaxLine.prototype, "shipping_method", void 0);
39
39
  __decorate([
40
40
  (0, core_1.ManyToOne)({
@@ -1 +1 @@
1
- {"version":3,"file":"shipping-method-tax-line.js","sourceRoot":"","sources":["../../src/models/shipping-method-tax-line.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,2CAGwB;AACxB,0CAA8E;AAC9E,wEAA8C;AAC9C,0DAAgC;AAEhC,MAAM,uBAAuB,GAAG,IAAA,sCAA8B,EAAC;IAC7D,SAAS,EAAE,gCAAgC;IAC3C,OAAO,EAAE,oBAAoB;CAC9B,CAAC,CAAA;AAGa,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,kBAAO;IAiBxD,QAAQ;QACN,IAAI,CAAC,EAAE,GAAG,IAAA,wBAAgB,EAAC,IAAI,CAAC,EAAE,EAAE,UAAU,CAAC,CAAA;QAC/C,IAAI,CAAC,kBAAkB,KAAK,IAAI,CAAC,eAAe,EAAE,EAAE,CAAA;IACt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AAC,kBAAkB,GAAK,IAAI,CAAC,eAAe,EAAE,EAAE,EAAA;IACtD,CAAC;IAGD,MAAM;QACJ,IAAI,CAAC,EAAE,GAAG,IAAA,wBAAgB,EAAC,IAAI,CAAC,EAAE,EAAE,UAAU,CAAC,CAAA;QAC/C,IAAI,CAAC,kBAAkB,KAAvB,IAAI,CAAC,kBAAkB,GAAK,IAAI,CAAC,eAAe,EAAE,EAAE,EAAA;IACtD,CAAC;CACF,CAAA;AAvBC;IAHC,IAAA,gBAAS,EAAC,GAAG,EAAE,CAAC,yBAAc,EAAE;QAC/B,OAAO,EAAE,KAAK;KACf,CAAC;8BACe,yBAAc;8DAAA;AAU/B;IARC,IAAA,gBAAS,EAAC;QACT,MAAM,EAAE,GAAG,EAAE,CAAC,yBAAc;QAC5B,SAAS,EAAE,oBAAoB;QAC/B,UAAU,EAAE,MAAM;QAClB,OAAO,EAAE,IAAI;QACb,QAAQ,EAAE,SAAS;KACpB,CAAC;IACD,uBAAuB,CAAC,aAAa,EAAE;;iEACd;AAG1B;IADC,IAAA,mBAAY,GAAE;;;;qDAId;AAGD;IADC,IAAA,aAAM,GAAE;;;;mDAIR;AA1BkB,qBAAqB;IADzC,IAAA,aAAM,EAAC,EAAE,SAAS,EAAE,gCAAgC,EAAE,CAAC;GACnC,qBAAqB,CA2BzC;kBA3BoB,qBAAqB"}
@@ -17,8 +17,6 @@ export default class ShippingMethod {
17
17
  adjustments: Collection<ShippingMethodAdjustment, object>;
18
18
  created_at: Date;
19
19
  updated_at: Date;
20
- deleted_at: Date | null;
21
20
  onCreate(): void;
22
21
  onInit(): void;
23
22
  }
24
- //# sourceMappingURL=shipping-method.d.ts.map
@@ -16,15 +16,9 @@ const utils_1 = require("@medusajs/utils");
16
16
  const core_1 = require("@mikro-orm/core");
17
17
  const shipping_method_adjustment_1 = __importDefault(require("./shipping-method-adjustment"));
18
18
  const shipping_method_tax_line_1 = __importDefault(require("./shipping-method-tax-line"));
19
- const DeletedAtIndex = (0, utils_1.createPsqlIndexStatementHelper)({
20
- tableName: "order_shipping_method",
21
- columns: "deleted_at",
22
- where: "deleted_at IS NOT NULL",
23
- });
24
19
  const ShippingOptionIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
25
20
  tableName: "order_shipping_method",
26
21
  columns: "shipping_option_id",
27
- where: "deleted_at IS NOT NULL",
28
22
  });
29
23
  let ShippingMethod = class ShippingMethod {
30
24
  constructor() {
@@ -35,7 +29,6 @@ let ShippingMethod = class ShippingMethod {
35
29
  this.metadata = null;
36
30
  this.tax_lines = new core_1.Collection(this);
37
31
  this.adjustments = new core_1.Collection(this);
38
- this.deleted_at = null;
39
32
  }
40
33
  onCreate() {
41
34
  this.id = (0, utils_1.generateEntityId)(this.id, "ordsm");
@@ -66,7 +59,7 @@ __decorate([
66
59
  ], ShippingMethod.prototype, "raw_amount", void 0);
67
60
  __decorate([
68
61
  (0, core_1.Property)({ columnType: "boolean" }),
69
- __metadata("design:type", Boolean)
62
+ __metadata("design:type", Object)
70
63
  ], ShippingMethod.prototype, "is_tax_inclusive", void 0);
71
64
  __decorate([
72
65
  (0, core_1.Property)({
@@ -86,13 +79,13 @@ __decorate([
86
79
  ], ShippingMethod.prototype, "metadata", void 0);
87
80
  __decorate([
88
81
  (0, core_1.OneToMany)(() => shipping_method_tax_line_1.default, (taxLine) => taxLine.shipping_method, {
89
- cascade: [core_1.Cascade.PERSIST, "soft-remove"],
82
+ cascade: [core_1.Cascade.PERSIST],
90
83
  }),
91
84
  __metadata("design:type", Object)
92
85
  ], ShippingMethod.prototype, "tax_lines", void 0);
93
86
  __decorate([
94
87
  (0, core_1.OneToMany)(() => shipping_method_adjustment_1.default, (adjustment) => adjustment.shipping_method, {
95
- cascade: [core_1.Cascade.PERSIST, "soft-remove"],
88
+ cascade: [core_1.Cascade.PERSIST],
96
89
  }),
97
90
  __metadata("design:type", Object)
98
91
  ], ShippingMethod.prototype, "adjustments", void 0);
@@ -113,11 +106,6 @@ __decorate([
113
106
  }),
114
107
  __metadata("design:type", Date)
115
108
  ], ShippingMethod.prototype, "updated_at", void 0);
116
- __decorate([
117
- (0, core_1.Property)({ columnType: "timestamptz", nullable: true }),
118
- DeletedAtIndex.MikroORMIndex(),
119
- __metadata("design:type", Object)
120
- ], ShippingMethod.prototype, "deleted_at", void 0);
121
109
  __decorate([
122
110
  (0, core_1.BeforeCreate)(),
123
111
  __metadata("design:type", Function),
@@ -131,8 +119,7 @@ __decorate([
131
119
  __metadata("design:returntype", void 0)
132
120
  ], ShippingMethod.prototype, "onInit", null);
133
121
  ShippingMethod = __decorate([
134
- (0, core_1.Entity)({ tableName: "order_shipping_method" }),
135
- (0, core_1.Filter)(utils_1.DALUtils.mikroOrmSoftDeletableFilterOptions)
122
+ (0, core_1.Entity)({ tableName: "order_shipping_method" })
136
123
  ], ShippingMethod);
137
124
  exports.default = ShippingMethod;
138
125
  //# sourceMappingURL=shipping-method.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"shipping-method.js","sourceRoot":"","sources":["../../src/models/shipping-method.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,2CAMwB;AACxB,0CAWwB;AACxB,8FAAmE;AACnE,0FAA8D;AAE9D,MAAM,cAAc,GAAG,IAAA,sCAA8B,EAAC;IACpD,SAAS,EAAE,uBAAuB;IAClC,OAAO,EAAE,YAAY;IACrB,KAAK,EAAE,wBAAwB;CAChC,CAAC,CAAA;AAEF,MAAM,qBAAqB,GAAG,IAAA,sCAA8B,EAAC;IAC3D,SAAS,EAAE,uBAAuB;IAClC,OAAO,EAAE,oBAAoB;IAC7B,KAAK,EAAE,wBAAwB;CAChC,CAAC,CAAA;AAIa,IAAM,cAAc,GAApB,MAAM,cAAc;IAApB;QAQb,gBAAW,GAAkB,IAAI,CAAA;QASjC,qBAAgB,GAAY,KAAK,CAAA;QAOjC,uBAAkB,GAAkB,IAAI,CAAA;QAGxC,SAAI,GAAmC,IAAI,CAAA;QAG3C,aAAQ,GAAmC,IAAI,CAAA;QAS/C,cAAS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14,4 @@ export default abstract class TaxLine {
14
14
  provider_id?: string | null;
15
15
  created_at: Date;
16
16
  updated_at: Date;
17
- deleted_at: Date | null;
18
17
  }
19
- //# sourceMappingURL=tax-line.d.ts.map
@@ -16,9 +16,6 @@ const core_1 = require("@mikro-orm/core");
16
16
  * Source: https://mikro-orm.io/docs/inheritance-mapping
17
17
  */
18
18
  class TaxLine {
19
- constructor() {
20
- this.deleted_at = null;
21
- }
22
19
  }
23
20
  exports.default = TaxLine;
24
21
  __decorate([
@@ -69,8 +66,4 @@ __decorate([
69
66
  }),
70
67
  __metadata("design:type", Date)
71
68
  ], TaxLine.prototype, "updated_at", void 0);
72
- __decorate([
73
- (0, core_1.Property)({ columnType: "timestamptz", nullable: true }),
74
- __metadata("design:type", Object)
75
- ], TaxLine.prototype, "deleted_at", void 0);
76
69
  //# sourceMappingURL=tax-line.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tax-line.js","sourceRoot":"","sources":["../../src/models/tax-line.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,2CAAsE;AACtE,0CAAsD;AAEtD;;;GAGG;AACH,MAA8B,OAAO;IAArC;QAyCE,eAAU,GAAgB,IAAI,CAAA;IAChC,CAAC;CAAA;AA1CD,0BA0CC;AAxCC;IADC,IAAA,iBAAU,EAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC;;mCACzB;AAGV;IADC,IAAA,eAAQ,EAAC,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACtB;AAM3B;IAJC,IAAA,eAAQ,EAAC;QACR,UAAU,EAAE,MAAM;QAClB,QAAQ,EAAE,IAAI;KACf,CAAC;;4CACyB;AAG3B;IADC,IAAA,eAAQ,EAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC;;qCACrB;AAGZ;IADC,IAAA,iCAAyB,GAAE;;qCACJ;AAGxB;IADC,IAAA,eAAQ,EAAC,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC;;y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P;AAG3B;IADC,IAAA,eAAQ,EAAC,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACtB;AAO3B;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;2CAAA;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;2CAAA"}
@@ -1,23 +1,13 @@
1
1
  import { BigNumberRawValue, DAL } from "@medusajs/types";
2
2
  import { BigNumber } from "@medusajs/utils";
3
- import { OptionalProps, Rel } from "@mikro-orm/core";
4
- import Claim from "./claim";
5
- import Exchange from "./exchange";
3
+ import { OptionalProps } from "@mikro-orm/core";
6
4
  import Order from "./order";
7
- import Return from "./return";
8
- type OptionalLineItemProps = DAL.ModelDateColumns;
5
+ type OptionalLineItemProps = DAL.EntityDateColumns;
9
6
  export default class Transaction {
10
7
  [OptionalProps]?: OptionalLineItemProps;
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
- version: number;
10
+ order: Order;
21
11
  amount: BigNumber | number;
22
12
  raw_amount: BigNumberRawValue;
23
13
  currency_code: string;
@@ -25,9 +15,7 @@ export default class Transaction {
25
15
  reference_id: string | null;
26
16
  created_at: Date;
27
17
  updated_at: Date;
28
- deleted_at: Date | null;
29
18
  onCreate(): void;
30
19
  onInit(): void;
31
20
  }
32
21
  export {};
33
- //# sourceMappingURL=transaction.d.ts.map