@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
package/dist/index.d.ts CHANGED
@@ -1,6 +1,8 @@
1
- import { OrderModuleService } from "./services";
2
- declare const _default: import("@medusajs/types").ModuleExports<typeof OrderModuleService> & {
3
- linkable: Record<string, any>;
4
- };
5
- export default _default;
6
- //# sourceMappingURL=index.d.ts.map
1
+ import { moduleDefinition } from "./module-definition";
2
+ export * from "./models";
3
+ export * from "./services";
4
+ export * from "./types";
5
+ export declare const initialize: (options?: import("@medusajs/modules-sdk").InternalModuleDeclaration | import("@medusajs/modules-sdk").ModuleServiceInitializeOptions | import("@medusajs/modules-sdk").ModuleServiceInitializeCustomDataLayerOptions | import("@medusajs/modules-sdk").ExternalModuleDeclaration | undefined, injectedDependencies?: any) => Promise<unknown>;
6
+ export declare const runMigrations: ((options: import("@medusajs/modules-sdk").LoaderOptions<any>, moduleDeclaration?: import("@medusajs/modules-sdk").InternalModuleDeclaration | undefined) => Promise<void>) | undefined;
7
+ export declare const revertMigration: ((options: import("@medusajs/modules-sdk").LoaderOptions<any>, moduleDeclaration?: import("@medusajs/modules-sdk").InternalModuleDeclaration | undefined) => Promise<void>) | undefined;
8
+ export default moduleDefinition;
package/dist/index.js CHANGED
@@ -1,8 +1,30 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
2
16
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const _services_1 = require("./services");
4
- const utils_1 = require("@medusajs/utils");
5
- exports.default = (0, utils_1.Module)(utils_1.Modules.ORDER, {
6
- service: _services_1.OrderModuleService,
17
+ exports.revertMigration = exports.runMigrations = exports.initialize = void 0;
18
+ const modules_sdk_1 = require("@medusajs/modules-sdk");
19
+ const module_definition_1 = require("./module-definition");
20
+ __exportStar(require("./models"), exports);
21
+ __exportStar(require("./services"), exports);
22
+ __exportStar(require("./types"), exports);
23
+ exports.initialize = (0, modules_sdk_1.initializeFactory)({
24
+ moduleName: modules_sdk_1.Modules.ORDER,
25
+ moduleDefinition: module_definition_1.moduleDefinition,
7
26
  });
27
+ exports.runMigrations = module_definition_1.moduleDefinition.runMigrations;
28
+ exports.revertMigration = module_definition_1.moduleDefinition.revertMigration;
29
+ exports.default = module_definition_1.moduleDefinition;
8
30
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,yCAA8C;AAC9C,2CAAiD;AAEjD,kBAAe,IAAA,cAAM,EAAC,eAAO,CAAC,KAAK,EAAE;IACnC,OAAO,EAAE,8BAAkB;CAC5B,CAAC,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,uDAAkE;AAClE,2DAAsD;AAEtD,2CAAwB;AACxB,6CAA0B;AAC1B,0CAAuB;AAEV,QAAA,UAAU,GAAG,IAAA,+BAAiB,EAAC;IAC1C,UAAU,EAAE,qBAAO,CAAC,KAAK;IACzB,gBAAgB,EAAhB,oCAAgB;CACjB,CAAC,CAAA;AACW,QAAA,aAAa,GAAG,oCAAgB,CAAC,aAAa,CAAA;AAC9C,QAAA,eAAe,GAAG,oCAAgB,CAAC,eAAe,CAAA;AAC/D,kBAAe,oCAAgB,CAAA"}
@@ -0,0 +1,5 @@
1
+ import { ModuleJoinerConfig } from "@medusajs/types";
2
+ import { MapToConfig } from "@medusajs/utils";
3
+ export declare const LinkableKeys: Record<string, string>;
4
+ export declare const entityNameToLinkableKeysMap: MapToConfig;
5
+ export declare const joinerConfig: ModuleJoinerConfig;
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.joinerConfig = exports.entityNameToLinkableKeysMap = exports.LinkableKeys = void 0;
7
+ const modules_sdk_1 = require("@medusajs/modules-sdk");
8
+ const _models_1 = require("./models");
9
+ const order_1 = __importDefault(require("./models/order"));
10
+ exports.LinkableKeys = {
11
+ order_id: order_1.default.name,
12
+ order_item_id: _models_1.LineItem.name,
13
+ };
14
+ const entityLinkableKeysMap = {};
15
+ Object.entries(exports.LinkableKeys).forEach(([key, value]) => {
16
+ entityLinkableKeysMap[value] ?? (entityLinkableKeysMap[value] = []);
17
+ entityLinkableKeysMap[value].push({
18
+ mapTo: key,
19
+ valueFrom: key.split("_").pop(),
20
+ });
21
+ });
22
+ exports.entityNameToLinkableKeysMap = entityLinkableKeysMap;
23
+ exports.joinerConfig = {
24
+ serviceName: modules_sdk_1.Modules.ORDER,
25
+ primaryKeys: ["id"],
26
+ linkableKeys: exports.LinkableKeys,
27
+ alias: [
28
+ {
29
+ name: ["order", "orders"],
30
+ args: {
31
+ entity: order_1.default.name,
32
+ },
33
+ },
34
+ ],
35
+ };
36
+ //# sourceMappingURL=joiner-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"joiner-config.js","sourceRoot":"","sources":["../src/joiner-config.ts"],"names":[],"mappings":";;;;;;AAAA,uDAA+C;AAG/C,qCAAkC;AAClC,2DAAkC;AAErB,QAAA,YAAY,GAA2B;IAClD,QAAQ,EAAE,eAAK,CAAC,IAAI;IACpB,aAAa,EAAE,kBAAQ,CAAC,IAAI;CAC7B,CAAA;AAED,MAAM,qBAAqB,GAAgB,EAAE,CAAA;AAC7C,MAAM,CAAC,OAAO,CAAC,oBAAY,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;IACpD,qBAAqB,CAAC,KAAK,MAA3B,qBAAqB,CAAC,KAAK,IAAM,EAAE,EAAA;IACnC,qBAAqB,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC;QAChC,KAAK,EAAE,GAAG;QACV,SAAS,EAAE,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAG;KACjC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA;AAEW,QAAA,2BAA2B,GAAgB,qBAAqB,CAAA;AAEhE,QAAA,YAAY,GAAuB;IAC9C,WAAW,EAAE,qBAAO,CAAC,KAAK;IAC1B,WAAW,EAAE,CAAC,IAAI,CAAC;IACnB,YAAY,EAAE,oBAAY;IAC1B,KAAK,EAAE;QACL;YACE,IAAI,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC;YACzB,IAAI,EAAE;gBACJ,MAAM,EAAE,eAAK,CAAC,IAAI;aACnB;SACF;KACF;CACoB,CAAA"}
@@ -2,4 +2,3 @@ import { Migration } from "@mikro-orm/migrations";
2
2
  export declare class Migration20240219102530 extends Migration {
3
3
  up(): Promise<void>;
4
4
  }
5
- //# sourceMappingURL=Migration20240219102530.d.ts.map
@@ -32,7 +32,6 @@ class Migration20240219102530 extends migrations_1.Migration {
32
32
  CREATE TABLE IF NOT EXISTS "order" (
33
33
  "id" TEXT NOT NULL,
34
34
  "region_id" TEXT NULL,
35
- "display_id" SERIAL,
36
35
  "customer_id" TEXT NULL,
37
36
  "version" INTEGER NOT NULL DEFAULT 1,
38
37
  "sales_channel_id" TEXT NULL,
@@ -110,11 +109,6 @@ class Migration20240219102530 extends migrations_1.Migration {
110
109
 
111
110
  ${(0, utils_1.generatePostgresAlterColummnIfExistStatement)("order", ["fulfillment_status", "payment_status", "display_id"], "DROP NOT NULL")}
112
111
 
113
- CREATE INDEX IF NOT EXISTS "IDX_order_display_id" ON "order" (
114
- display_id
115
- )
116
- WHERE deleted_at IS NOT NULL;
117
-
118
112
  CREATE INDEX IF NOT EXISTS "IDX_order_region_id" ON "order" (
119
113
  region_id
120
114
  )
@@ -443,7 +437,6 @@ class Migration20240219102530 extends migrations_1.Migration {
443
437
  CREATE TABLE IF NOT EXISTS "order_transaction" (
444
438
  "id" TEXT NOT NULL,
445
439
  "order_id" TEXT NOT NULL,
446
- "version" INTEGER NOT NULL DEFAULT 1,
447
440
  "amount" NUMERIC NOT NULL,
448
441
  "raw_amount" JSONB NOT NULL,
449
442
  "currency_code" TEXT NOT NULL,
@@ -451,48 +444,21 @@ class Migration20240219102530 extends migrations_1.Migration {
451
444
  "reference_id" TEXT NULL,
452
445
  "created_at" TIMESTAMPTZ NOT NULL DEFAULT Now(),
453
446
  "updated_at" TIMESTAMPTZ NOT NULL DEFAULT Now(),
454
- "deleted_at" timestamptz NULL,
455
447
  CONSTRAINT "order_transaction_pkey" PRIMARY KEY ("id")
456
448
  );
457
449
 
458
- CREATE INDEX IF NOT EXISTS "IDX_order_transaction_order_id_version" ON "order_transaction" (
459
- order_id,
460
- version
461
- )
462
- WHERE deleted_at IS NOT NULL;
450
+ CREATE INDEX IF NOT EXISTS "IDX_order_transaction_order_id" ON "order_transaction" (
451
+ order_id
452
+ );
463
453
 
464
454
  CREATE INDEX IF NOT EXISTS "IDX_order_transaction_currency_code" ON "order_transaction" (
465
455
  currency_code
466
- )
467
- WHERE deleted_at IS NOT NULL;
456
+ );
468
457
 
469
458
  CREATE INDEX IF NOT EXISTS "IDX_order_transaction_reference_id" ON "order_transaction" (
470
459
  reference_id
471
- )
472
- WHERE deleted_at IS NOT NULL;
473
-
474
- CREATE TABLE IF NOT EXISTS "return_reason"
475
- (
476
- id character varying NOT NULL,
477
- value character varying NOT NULL,
478
- label character varying NOT NULL,
479
- description character varying,
480
- metadata JSONB NULL,
481
- parent_return_reason_id character varying,
482
- created_at timestamp with time zone NOT NULL DEFAULT now(),
483
- updated_at timestamp with time zone NOT NULL DEFAULT now(),
484
- deleted_at timestamp with time zone,
485
- CONSTRAINT "return_reason_pkey" PRIMARY KEY (id),
486
- CONSTRAINT "return_reason_parent_return_reason_id_foreign" FOREIGN KEY (parent_return_reason_id)
487
- REFERENCES "return_reason" (id) MATCH SIMPLE
488
- ON UPDATE NO ACTION
489
- ON DELETE NO ACTION
490
460
  );
491
461
 
492
- CREATE UNIQUE INDEX IF NOT EXISTS "IDX_return_reason_value" ON "return_reason" USING btree (value ASC NULLS LAST)
493
- WHERE deleted_at IS NOT NULL;
494
-
495
-
496
462
  ALTER TABLE if exists "order"
497
463
  ADD CONSTRAINT "order_shipping_address_id_foreign" FOREIGN KEY ("shipping_address_id") REFERENCES "order_address" ("id") ON
498
464
  UPDATE CASCADE ON
@@ -1 +1 @@
1
- {"version":3,"file":"Migration20240219102530.js","sourceRoot":"","sources":["../../src/migrations/Migration20240219102530.ts"],"names":[],"mappings":";;;AAAA,2CAA8E;AAC9E,sDAAiD;AAEjD,MAAa,uBAAwB,SAAQ,sBAAS;IACpD,KAAK,CAAC,EAAE;QACN,MAAM,GAAG,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAuGR,IAAA,oDAA4C,EAC5C,OAAO,EACP,CAAC,oBAAoB,EAAE,gBAAgB,EAAE,YAAY,CAAC,EACtD,eAAe,CAChB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAicF,CAAA;QAED,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;IAClB,CAAC;CACF;AAljBD,0DAkjBC"}
1
+ {"version":3,"file":"Migration20240219102530.js","sourceRoot":"","sources":["../../src/migrations/Migration20240219102530.ts"],"names":[],"mappings":";;;AAAA,2CAA8E;AAC9E,sDAAiD;AAEjD,MAAa,uBAAwB,SAAQ,sBAAS;IACpD,KAAK,CAAC,EAAE;QACN,MAAM,GAAG,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAsGR,IAAA,oDAA4C,EAC5C,OAAO,EACP,CAAC,oBAAoB,EAAE,gBAAgB,EAAE,YAAY,CAAC,EACtD,eAAe,CAChB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgaF,CAAA;QAED,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;IAClB,CAAC;CACF;AAhhBD,0DAghBC"}
@@ -1,6 +1,6 @@
1
1
  import { DAL } from "@medusajs/types";
2
2
  import { OptionalProps } from "@mikro-orm/core";
3
- type OptionalAddressProps = DAL.ModelDateColumns;
3
+ type OptionalAddressProps = DAL.EntityDateColumns;
4
4
  export default class Address {
5
5
  [OptionalProps]: OptionalAddressProps;
6
6
  id: string;
@@ -22,4 +22,3 @@ export default class Address {
22
22
  onInit(): void;
23
23
  }
24
24
  export {};
25
- //# sourceMappingURL=address.d.ts.map
@@ -1,7 +1,7 @@
1
1
  import { BigNumberRawValue, DAL } from "@medusajs/types";
2
2
  import { BigNumber } from "@medusajs/utils";
3
3
  import { OptionalProps } from "@mikro-orm/core";
4
- type OptionalAdjustmentLineProps = DAL.ModelDateColumns;
4
+ type OptionalAdjustmentLineProps = DAL.EntityDateColumns;
5
5
  /**
6
6
  * As per the Mikro ORM docs, superclasses should use the abstract class definition
7
7
  * Source: https://mikro-orm.io/docs/inheritance-mapping
@@ -17,7 +17,5 @@ export default abstract class AdjustmentLine {
17
17
  provider_id: string | null;
18
18
  created_at: Date;
19
19
  updated_at: Date;
20
- deleted_at: Date | null;
21
20
  }
22
21
  export {};
23
- //# sourceMappingURL=adjustment-line.d.ts.map
@@ -21,7 +21,6 @@ class AdjustmentLine {
21
21
  this.promotion_id = null;
22
22
  this.code = null;
23
23
  this.provider_id = null;
24
- this.deleted_at = null;
25
24
  }
26
25
  }
27
26
  exports.default = AdjustmentLine;
@@ -73,8 +72,4 @@ __decorate([
73
72
  }),
74
73
  __metadata("design:type", Date)
75
74
  ], AdjustmentLine.prototype, "updated_at", void 0);
76
- __decorate([
77
- (0, core_1.Property)({ columnType: "timestamptz", nullable: true }),
78
- __metadata("design:type", Object)
79
- ], AdjustmentLine.prototype, "deleted_at", void 0);
80
75
  //# sourceMappingURL=adjustment-line.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"adjustment-line.js","sourceRoot":"","sources":["../../src/models/adjustment-line.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,2CAAsE;AACtE,0CAAqE;AAIrE;;;GAGG;AACH,MAA8B,cAAc;IAA5C;QAOE,gBAAW,GAAkB,IAAI,CAAA;QAMjC,iBAAY,GAAkB,IAAI,CAAA;QAGlC,SAAI,GAAkB,IAAI,CAAA;QAS1B,gBAAW,GAAkB,IAAI,CAAA;QAkBjC,eAAU,GAAgB,IAAI,CAAA;IAChC,CAAC;CAAA;AA5CD,i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";
3
- export { default as ClaimItem } from "./claim-item";
4
- export { default as ClaimItemImage } from "./claim-item-image";
5
- export { default as OrderExchange } from "./exchange";
6
- export { default as ExchangeItem } from "./exchange-item";
7
2
  export { default as LineItem } from "./line-item";
8
3
  export { default as LineItemAdjustment } from "./line-item-adjustment";
9
4
  export { default as LineItemTaxLine } from "./line-item-tax-line";
@@ -13,11 +8,7 @@ export { default as OrderChangeAction } from "./order-change-action";
13
8
  export { default as OrderItem } from "./order-item";
14
9
  export { default as OrderShippingMethod } from "./order-shipping-method";
15
10
  export { default as OrderSummary } from "./order-summary";
16
- export { default as Return } from "./return";
17
- export { default as ReturnItem } from "./return-item";
18
- export { default as ReturnReason } from "./return-reason";
19
11
  export { default as ShippingMethod } from "./shipping-method";
20
12
  export { default as ShippingMethodAdjustment } from "./shipping-method-adjustment";
21
13
  export { default as ShippingMethodTaxLine } from "./shipping-method-tax-line";
22
14
  export { default as Transaction } from "./transaction";
23
- //# sourceMappingURL=index.d.ts.map
@@ -3,19 +3,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.Transaction = exports.ShippingMethodTaxLine = exports.ShippingMethodAdjustment = exports.ShippingMethod = exports.ReturnReason = exports.ReturnItem = exports.Return = exports.OrderSummary = exports.OrderShippingMethod = exports.OrderItem = exports.OrderChangeAction = exports.OrderChange = exports.Order = exports.LineItemTaxLine = exports.LineItemAdjustment = exports.LineItem = exports.ExchangeItem = exports.OrderExchange = exports.ClaimItemImage = exports.ClaimItem = exports.OrderClaim = exports.Address = void 0;
6
+ exports.Transaction = exports.ShippingMethodTaxLine = exports.ShippingMethodAdjustment = exports.ShippingMethod = exports.OrderSummary = exports.OrderShippingMethod = exports.OrderItem = exports.OrderChangeAction = exports.OrderChange = exports.Order = exports.LineItemTaxLine = exports.LineItemAdjustment = exports.LineItem = exports.Address = void 0;
7
7
  var address_1 = require("./address");
8
8
  Object.defineProperty(exports, "Address", { enumerable: true, get: function () { return __importDefault(address_1).default; } });
9
- var claim_1 = require("./claim");
10
- Object.defineProperty(exports, "OrderClaim", { enumerable: true, get: function () { return __importDefault(claim_1).default; } });
11
- var claim_item_1 = require("./claim-item");
12
- Object.defineProperty(exports, "ClaimItem", { enumerable: true, get: function () { return __importDefault(claim_item_1).default; } });
13
- var claim_item_image_1 = require("./claim-item-image");
14
- Object.defineProperty(exports, "ClaimItemImage", { enumerable: true, get: function () { return __importDefault(claim_item_image_1).default; } });
15
- var exchange_1 = require("./exchange");
16
- Object.defineProperty(exports, "OrderExchange", { enumerable: true, get: function () { return __importDefault(exchange_1).default; } });
17
- var exchange_item_1 = require("./exchange-item");
18
- Object.defineProperty(exports, "ExchangeItem", { enumerable: true, get: function () { return __importDefault(exchange_item_1).default; } });
19
9
  var line_item_1 = require("./line-item");
20
10
  Object.defineProperty(exports, "LineItem", { enumerable: true, get: function () { return __importDefault(line_item_1).default; } });
21
11
  var line_item_adjustment_1 = require("./line-item-adjustment");
@@ -34,12 +24,6 @@ var order_shipping_method_1 = require("./order-shipping-method");
34
24
  Object.defineProperty(exports, "OrderShippingMethod", { enumerable: true, get: function () { return __importDefault(order_shipping_method_1).default; } });
35
25
  var order_summary_1 = require("./order-summary");
36
26
  Object.defineProperty(exports, "OrderSummary", { enumerable: true, get: function () { return __importDefault(order_summary_1).default; } });
37
- var return_1 = require("./return");
38
- Object.defineProperty(exports, "Return", { enumerable: true, get: function () { return __importDefault(return_1).default; } });
39
- var return_item_1 = require("./return-item");
40
- Object.defineProperty(exports, "ReturnItem", { enumerable: true, get: function () { return __importDefault(return_item_1).default; } });
41
- var return_reason_1 = require("./return-reason");
42
- Object.defineProperty(exports, "ReturnReason", { enumerable: true, get: function () { return __importDefault(return_reason_1).default; } });
43
27
  var shipping_method_1 = require("./shipping-method");
44
28
  Object.defineProperty(exports, "ShippingMethod", { enumerable: true, get: function () { return __importDefault(shipping_method_1).default; } });
45
29
  var shipping_method_adjustment_1 = require("./shipping-method-adjustment");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":";;;;;;AAAA,qCAA8C;AAArC,mHAAA,OAAO,OAAW;AAC3B,iCAA+C;AAAtC,oHAAA,OAAO,OAAc;AAC9B,2CAAmD;AAA1C,wHAAA,OAAO,OAAa;AAC7B,uDAA8D;AAArD,mIAAA,OAAO,OAAkB;AAClC,uCAAqD;AAA5C,0HAAA,OAAO,OAAiB;AACjC,iDAAyD;AAAhD,8HAAA,OAAO,OAAgB;AAChC,yCAAiD;AAAxC,sHAAA,OAAO,OAAY;AAC5B,+DAAsE;AAA7D,2IAAA,OAAO,OAAsB;AACtC,2DAAiE;AAAxD,sIAAA,OAAO,OAAmB;AACnC,iCAA0C;AAAjC,+GAAA,OAAO,OAAS;AACzB,+CAAuD;AAA9C,4HAAA,OAAO,OAAe;AAC/B,6DAAoE;AAA3D,yIAAA,OAAO,OAAqB;AACrC,2CAAmD;AAA1C,wHAAA,OAAO,OAAa;AAC7B,iEAAwE;AAA/D,6IAAA,OAAO,OAAuB;AACvC,iDAAyD;AAAhD,8HAAA,OAAO,OAAgB;AAChC,mCAA4C;AAAnC,iHAAA,OAAO,OAAU;AAC1B,6CAAqD;AAA5C,0HAAA,OAAO,OAAc;AAC9B,iDAAyD;AAAhD,8HAAA,OAAO,OAAgB;AAChC,qDAA6D;AAApD,kIAAA,OAAO,OAAkB;AAClC,2EAAkF;AAAzE,uJAAA,OAAO,OAA4B;AAC5C,uEAA6E;AAApE,kJAAA,OAAO,OAAyB;AACzC,6CAAsD;AAA7C,2HAAA,OAAO,OAAe"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":";;;;;;AAAA,qCAA8C;AAArC,mHAAA,OAAO,OAAW;AAC3B,yCAAiD;AAAxC,sHAAA,OAAO,OAAY;AAC5B,+DAAsE;AAA7D,2IAAA,OAAO,OAAsB;AACtC,2DAAiE;AAAxD,sIAAA,OAAO,OAAmB;AACnC,iCAA0C;AAAjC,+GAAA,OAAO,OAAS;AACzB,+CAAuD;AAA9C,4HAAA,OAAO,OAAe;AAC/B,6DAAoE;AAA3D,yIAAA,OAAO,OAAqB;AACrC,2CAAmD;AAA1C,wHAAA,OAAO,OAAa;AAC7B,iEAAwE;AAA/D,6IAAA,OAAO,OAAuB;AACvC,iDAAyD;AAAhD,8HAAA,OAAO,OAAgB;AAChC,qDAA6D;AAApD,kIAAA,OAAO,OAAkB;AAClC,2EAAkF;AAAzE,uJAAA,OAAO,OAA4B;AAC5C,uEAA6E;AAApE,kJAAA,OAAO,OAAyB;AACzC,6CAAsD;AAA7C,2HAAA,OAAO,OAAe"}
@@ -1,10 +1,8 @@
1
- import { Rel } from "@mikro-orm/core";
2
1
  import AdjustmentLine from "./adjustment-line";
3
2
  import LineItem from "./line-item";
4
3
  export default class LineItemAdjustment extends AdjustmentLine {
5
- item: Rel<LineItem>;
4
+ item: LineItem;
6
5
  item_id: string;
7
6
  onCreate(): void;
8
7
  onInit(): void;
9
8
  }
10
- //# sourceMappingURL=line-item-adjustment.d.ts.map
@@ -23,18 +23,18 @@ const ItemIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
23
23
  let LineItemAdjustment = class LineItemAdjustment extends adjustment_line_1.default {
24
24
  onCreate() {
25
25
  this.id = (0, utils_1.generateEntityId)(this.id, "ordliadj");
26
- this.item_id ??= this.item?.id;
26
+ this.item_id ?? (this.item_id = this.item?.id);
27
27
  }
28
28
  onInit() {
29
29
  this.id = (0, utils_1.generateEntityId)(this.id, "ordliadj");
30
- this.item_id ??= this.item?.id;
30
+ this.item_id ?? (this.item_id = this.item?.id);
31
31
  }
32
32
  };
33
33
  __decorate([
34
34
  (0, core_1.ManyToOne)(() => line_item_1.default, {
35
35
  persist: false,
36
36
  }),
37
- __metadata("design:type", Object)
37
+ __metadata("design:type", line_item_1.default)
38
38
  ], LineItemAdjustment.prototype, "item", void 0);
39
39
  __decorate([
40
40
  (0, core_1.ManyToOne)({
@@ -1 +1 @@
1
- {"version":3,"file":"line-item-adjustment.js","sourceRoot":"","sources":["../../src/models/line-item-adjustment.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,2CAGwB;AACxB,0CAA8E;AAC9E,wEAA8C;AAC9C,4DAAkC;AAElC,MAAM,WAAW,GAAG,IAAA,sCAA8B,EAAC;IACjD,SAAS,EAAE,4BAA4B;IACvC,OAAO,EAAE,SAAS;CACnB,CAAC,CAAA;AAGa,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,yBAAc;IAiB5D,QAAQ;QACN,IAAI,CAAC,EAAE,GAAG,IAAA,wBAAgB,EAAC,IAAI,CAAC,EAAE,EAAE,UAAU,CAAC,CAAA;QAC/C,IAAI,CAAC,OAAO,KAAK,IAAI,CAAC,IAAI,EAAE,EAAE,CAAA;IAChC,CAAC;IAGD,MAAM;QACJ,IAAI,CAAC,EAAE,GAAG,IAAA,wBAAgB,EAAC,IAAI,CAAC,EAAE,EAAE,UAAU,CAAC,CAAA;QAC/C,IAAI,CAAC,OAAO,KAAK,IAAI,CAAC,IAAI,EAAE,EAAE,CAAA;IAChC,CAAC;CACF,CAAA;AAvBC;IAHC,IAAA,gBAAS,EAAC,GAAG,EAAE,CAAC,mBAAQ,EAAE;QACzB,OAAO,EAAE,KAAK;KACf,CAAC;;gDACiB;AAUnB;IARC,IAAA,gBAAS,EAAC;QACT,MAAM,EAAE,GAAG,EAAE,CAAC,mBAAQ;QACtB,UAAU,EAAE,MAAM;QAClB,SAAS,EAAE,SAAS;QACpB,QAAQ,EAAE,SAAS;QACnB,OAAO,EAAE,IAAI;KACd,CAAC;IACD,WAAW,CAAC,aAAa,EAAE;;mDACb;AAGf;IADC,IAAA,mBAAY,GAAE;;;;kDAId;AAGD;IADC,IAAA,aAAM,GAAE;;;;gDAIR;AA1BkB,kBAAkB;IADtC,IAAA,aAAM,EAAC,EAA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,aAAM,GAAE;;;;gDAIR;AA1BkB,kBAAkB;IADtC,IAAA,aAAM,EAAC,EAAE,SAAS,EAAE,4BAA4B,EAAE,CAAC;GAC/B,kBAAkB,CA2BtC;kBA3BoB,kBAAkB"}
@@ -1,10 +1,8 @@
1
- import { Rel } from "@mikro-orm/core";
2
1
  import LineItem from "./line-item";
3
2
  import TaxLine from "./tax-line";
4
3
  export default class LineItemTaxLine extends TaxLine {
5
- item: Rel<LineItem>;
4
+ item: LineItem;
6
5
  item_id: string;
7
6
  onCreate(): void;
8
7
  onInit(): void;
9
8
  }
10
- //# sourceMappingURL=line-item-tax-line.d.ts.map
@@ -23,11 +23,11 @@ const ItemIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
23
23
  let LineItemTaxLine = class LineItemTaxLine extends tax_line_1.default {
24
24
  onCreate() {
25
25
  this.id = (0, utils_1.generateEntityId)(this.id, "ordlitxl");
26
- this.item_id ??= this.item?.id;
26
+ this.item_id ?? (this.item_id = this.item?.id);
27
27
  }
28
28
  onInit() {
29
29
  this.id = (0, utils_1.generateEntityId)(this.id, "ordlitxl");
30
- this.item_id ??= this.item?.id;
30
+ this.item_id ?? (this.item_id = this.item?.id);
31
31
  }
32
32
  };
33
33
  __decorate([
@@ -35,7 +35,7 @@ __decorate([
35
35
  fieldName: "item_id",
36
36
  persist: false,
37
37
  }),
38
- __metadata("design:type", Object)
38
+ __metadata("design:type", line_item_1.default)
39
39
  ], LineItemTaxLine.prototype, "item", void 0);
40
40
  __decorate([
41
41
  (0, core_1.ManyToOne)({
@@ -1 +1 @@
1
- {"version":3,"file":"line-item-tax-line.js","sourceRoot":"","sources":["../../src/models/line-item-tax-line.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,2CAGwB;AACxB,0CAOwB;AACxB,4DAAkC;AAClC,0DAAgC;AAEhC,MAAM,WAAW,GAAG,IAAA,sCAA8B,EAAC;IACjD,SAAS,EAAE,0BAA0B;IACrC,OAAO,EAAE,SAAS;CACnB,CA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from "@mikro-orm/core";
4
4
  import LineItemAdjustment from "./line-item-adjustment";
5
5
  import LineItemTaxLine from "./line-item-tax-line";
6
- type OptionalLineItemProps = DAL.ModelDateColumns;
6
+ type OptionalLineItemProps = "is_discoutable" | "is_tax_inclusive" | "compare_at_unit_price" | "requires_shipping" | DAL.EntityDateColumns;
7
7
  export default class LineItem {
8
8
  [OptionalProps]?: OptionalLineItemProps;
9
9
  id: string;
@@ -34,9 +34,7 @@ export default class LineItem {
34
34
  metadata: Record<string, unknown> | null;
35
35
  created_at: Date;
36
36
  updated_at: Date;
37
- deleted_at: Date | null;
38
37
  onCreate(): void;
39
38
  onInit(): void;
40
39
  }
41
40
  export {};
42
- //# sourceMappingURL=line-item.d.ts.map
@@ -16,20 +16,13 @@ const utils_1 = require("@medusajs/utils");
16
16
  const core_1 = require("@mikro-orm/core");
17
17
  const line_item_adjustment_1 = __importDefault(require("./line-item-adjustment"));
18
18
  const line_item_tax_line_1 = __importDefault(require("./line-item-tax-line"));
19
- const DeletedAtIndex = (0, utils_1.createPsqlIndexStatementHelper)({
20
- tableName: "order_line_item",
21
- columns: "deleted_at",
22
- where: "deleted_at IS NOT NULL",
23
- });
24
19
  const ProductIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
25
20
  tableName: "order_line_item",
26
21
  columns: "product_id",
27
- where: "deleted_at IS NOT NULL",
28
22
  });
29
23
  const VariantIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
30
24
  tableName: "order_line_item",
31
25
  columns: "variant_id",
32
- where: "deleted_at IS NOT NULL",
33
26
  });
34
27
  let LineItem = class LineItem {
35
28
  constructor() {
@@ -55,7 +48,6 @@ let LineItem = class LineItem {
55
48
  this.tax_lines = new core_1.Collection(this);
56
49
  this.adjustments = new core_1.Collection(this);
57
50
  this.metadata = null;
58
- this.deleted_at = null;
59
51
  }
60
52
  onCreate() {
61
53
  this.id = (0, utils_1.generateEntityId)(this.id, "ordli");
@@ -138,15 +130,15 @@ __decorate([
138
130
  ], LineItem.prototype, "variant_option_values", void 0);
139
131
  __decorate([
140
132
  (0, core_1.Property)({ columnType: "boolean" }),
141
- __metadata("design:type", Boolean)
133
+ __metadata("design:type", Object)
142
134
  ], LineItem.prototype, "requires_shipping", void 0);
143
135
  __decorate([
144
136
  (0, core_1.Property)({ columnType: "boolean" }),
145
- __metadata("design:type", Boolean)
137
+ __metadata("design:type", Object)
146
138
  ], LineItem.prototype, "is_discountable", void 0);
147
139
  __decorate([
148
140
  (0, core_1.Property)({ columnType: "boolean" }),
149
- __metadata("design:type", Boolean)
141
+ __metadata("design:type", Object)
150
142
  ], LineItem.prototype, "is_tax_inclusive", void 0);
151
143
  __decorate([
152
144
  (0, utils_1.MikroOrmBigNumberProperty)({
@@ -201,11 +193,6 @@ __decorate([
201
193
  }),
202
194
  __metadata("design:type", Date)
203
195
  ], LineItem.prototype, "updated_at", void 0);
204
- __decorate([
205
- (0, core_1.Property)({ columnType: "timestamptz", nullable: true }),
206
- DeletedAtIndex.MikroORMIndex(),
207
- __metadata("design:type", Object)
208
- ], LineItem.prototype, "deleted_at", void 0);
209
196
  __decorate([
210
197
  (0, core_1.BeforeCreate)(),
211
198
  __metadata("design:type", Function),
@@ -219,8 +206,7 @@ __decorate([
219
206
  __metadata("design:returntype", void 0)
220
207
  ], LineItem.prototype, "onInit", null);
221
208
  LineItem = __decorate([
222
- (0, core_1.Entity)({ tableName: "order_line_item" }),
223
- (0, core_1.Filter)(utils_1.DALUtils.mikroOrmSoftDeletableFilterOptions)
209
+ (0, core_1.Entity)({ tableName: "order_line_item" })
224
210
  ], LineItem);
225
211
  exports.default = LineItem;
226
212
  //# sourceMappingURL=line-item.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"line-item.js","sourceRoot":"","sources":["../../src/models/line-item.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,2CAMwB;AACxB,0CAYwB;AACxB,kFAAuD;AACvD,8EAAkD;AAIlD,MAAM,cAAc,GAAG,IAAA,sCAA8B,EAAC;I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,4BAAe,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE;QAC3D,OAAO,EAAE,CAAC,cAAO,CAAC,OAAO,EAAE,aAAwB,CAAC;KACrD,CAAC;;2CAC+C;AAKjD;IAHC,IAAA,gBAAS,EAAC,GAAG,EAAE,CAAC,8BAAkB,EAAE,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE;QACpE,OAAO,EAAE,CAAC,cAAO,CAAC,OAAO,EAAE,aAAwB,CAAC;KACrD,CAAC;;6CACoD;AAGtD;IADC,IAAA,eAAQ,EAAC,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACH;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;4CAAA;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;4CAAA;AAGhB;IADC,IAAA,mBAAY,GAAE;;;;wCAGd;AAGD;IADC,IAAA,aAAM,GAAE;;;;sCAGR;AAxHkB,QAAQ;IAD5B,IAAA,aAAM,EAAC,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC;GACpB,QAAQ,CAyH5B;kBAzHoB,QAAQ"}
@@ -1,27 +1,18 @@
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 OrderClaim from "./claim";
5
- import OrderExchange from "./exchange";
3
+ import { OptionalProps } from "@mikro-orm/core";
6
4
  import Order from "./order";
7
5
  import OrderChange from "./order-change";
8
- import Return from "./return";
9
- type OptionalLineItemProps = DAL.ModelDateColumns;
6
+ type OptionalLineItemProps = DAL.EntityDateColumns;
10
7
  export default class OrderChangeAction {
11
8
  [OptionalProps]?: OptionalLineItemProps;
12
9
  id: string;
13
10
  ordering: number;
14
11
  order_id: string | 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;
12
+ order: Order | null;
22
13
  version: number | null;
23
14
  order_change_id: string | null;
24
- order_change: Rel<OrderChange> | null;
15
+ order_change: OrderChange | null;
25
16
  reference: string | null;
26
17
  reference_id: string | null;
27
18
  action: string;
@@ -32,9 +23,7 @@ export default class OrderChangeAction {
32
23
  applied: boolean;
33
24
  created_at: Date;
34
25
  updated_at: Date;
35
- deleted_at: Date | null;
36
26
  onCreate(): void;
37
27
  onInit(): void;
38
28
  }
39
29
  export {};
40
- //# sourceMappingURL=order-change-action.d.ts.map