@medusajs/order 0.1.3 → 1.0.0-rc-20241003153304
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.ts +6 -8
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -26
- package/dist/index.js.map +1 -1
- package/dist/joiner-config.d.ts +2 -5
- package/dist/joiner-config.d.ts.map +1 -0
- package/dist/joiner-config.js +21 -28
- package/dist/joiner-config.js.map +1 -1
- package/dist/migrations/Migration20240219102530.d.ts +1 -0
- package/dist/migrations/Migration20240219102530.d.ts.map +1 -0
- package/dist/migrations/Migration20240219102530.js +53 -19
- package/dist/migrations/Migration20240219102530.js.map +1 -1
- package/dist/migrations/Migration20240604100512.d.ts +5 -0
- package/dist/migrations/Migration20240604100512.d.ts.map +1 -0
- package/dist/migrations/Migration20240604100512.js +371 -0
- package/dist/migrations/Migration20240604100512.js.map +1 -0
- package/dist/migrations/Migration20240715102100.d.ts +5 -0
- package/dist/migrations/Migration20240715102100.d.ts.map +1 -0
- package/dist/migrations/Migration20240715102100.js +15 -0
- package/dist/migrations/Migration20240715102100.js.map +1 -0
- package/dist/migrations/Migration20240715174100.d.ts +5 -0
- package/dist/migrations/Migration20240715174100.d.ts.map +1 -0
- package/dist/migrations/Migration20240715174100.js +21 -0
- package/dist/migrations/Migration20240715174100.js.map +1 -0
- package/dist/migrations/Migration20240716081800.d.ts +5 -0
- package/dist/migrations/Migration20240716081800.d.ts.map +1 -0
- package/dist/migrations/Migration20240716081800.js +67 -0
- package/dist/migrations/Migration20240716081800.js.map +1 -0
- package/dist/migrations/Migration20240801085921.d.ts +5 -0
- package/dist/migrations/Migration20240801085921.d.ts.map +1 -0
- package/dist/migrations/Migration20240801085921.js +30 -0
- package/dist/migrations/Migration20240801085921.js.map +1 -0
- package/dist/migrations/Migration20240821164505.d.ts +6 -0
- package/dist/migrations/Migration20240821164505.d.ts.map +1 -0
- package/dist/migrations/Migration20240821164505.js +26 -0
- package/dist/migrations/Migration20240821164505.js.map +1 -0
- package/dist/migrations/Migration20240821170920.d.ts +6 -0
- package/dist/migrations/Migration20240821170920.d.ts.map +1 -0
- package/dist/migrations/Migration20240821170920.js +18 -0
- package/dist/migrations/Migration20240821170920.js.map +1 -0
- package/dist/migrations/Migration20240827133639.d.ts +6 -0
- package/dist/migrations/Migration20240827133639.d.ts.map +1 -0
- package/dist/migrations/Migration20240827133639.js +17 -0
- package/dist/migrations/Migration20240827133639.js.map +1 -0
- package/dist/migrations/Migration20240902195921.d.ts +6 -0
- package/dist/migrations/Migration20240902195921.d.ts.map +1 -0
- package/dist/migrations/Migration20240902195921.js +16 -0
- package/dist/migrations/Migration20240902195921.js.map +1 -0
- package/dist/migrations/Migration20240913092514.d.ts +6 -0
- package/dist/migrations/Migration20240913092514.d.ts.map +1 -0
- package/dist/migrations/Migration20240913092514.js +17 -0
- package/dist/migrations/Migration20240913092514.js.map +1 -0
- package/dist/models/address.d.ts +4 -3
- package/dist/models/address.d.ts.map +1 -0
- package/dist/models/address.js +22 -22
- package/dist/models/address.js.map +1 -1
- package/dist/models/adjustment-line.d.ts +5 -3
- package/dist/models/adjustment-line.d.ts.map +1 -0
- package/dist/models/adjustment-line.js +6 -1
- package/dist/models/adjustment-line.js.map +1 -1
- package/dist/models/claim-item-image.d.ts +19 -0
- package/dist/models/claim-item-image.d.ts.map +1 -0
- package/dist/models/claim-item-image.js +109 -0
- package/dist/models/claim-item-image.js.map +1 -0
- package/dist/models/claim-item.d.ts +29 -0
- package/dist/models/claim-item.d.ts.map +1 -0
- package/dist/models/claim-item.js +157 -0
- package/dist/models/claim-item.js.map +1 -0
- package/dist/models/claim.d.ts +37 -0
- package/dist/models/claim.d.ts.map +1 -0
- package/dist/models/claim.js +201 -0
- package/dist/models/claim.js.map +1 -0
- package/dist/models/exchange-item.d.ts +24 -0
- package/dist/models/exchange-item.d.ts.map +1 -0
- package/dist/models/exchange-item.js +138 -0
- package/dist/models/exchange-item.js.map +1 -0
- package/dist/models/exchange.d.ts +35 -0
- package/dist/models/exchange.d.ts.map +1 -0
- package/dist/models/exchange.js +194 -0
- package/dist/models/exchange.js.map +1 -0
- package/dist/models/index.d.ts +18 -9
- package/dist/models/index.d.ts.map +1 -0
- package/dist/models/index.js +26 -10
- package/dist/models/index.js.map +1 -1
- package/dist/models/line-item-adjustment.d.ts +5 -3
- package/dist/models/line-item-adjustment.d.ts.map +1 -0
- package/dist/models/line-item-adjustment.js +12 -12
- package/dist/models/line-item-adjustment.js.map +1 -1
- package/dist/models/line-item-tax-line.d.ts +5 -3
- package/dist/models/line-item-tax-line.d.ts.map +1 -0
- package/dist/models/line-item-tax-line.js +12 -12
- package/dist/models/line-item-tax-line.js.map +1 -1
- package/dist/models/line-item.d.ts +11 -8
- package/dist/models/line-item.d.ts.map +1 -0
- package/dist/models/line-item.js +58 -39
- package/dist/models/line-item.js.map +1 -1
- package/dist/models/order-change-action.d.ts +17 -6
- package/dist/models/order-change-action.d.ts.map +1 -0
- package/dist/models/order-change-action.js +110 -8
- package/dist/models/order-change-action.js.map +1 -1
- package/dist/models/order-change.d.ts +18 -6
- package/dist/models/order-change.d.ts.map +1 -0
- package/dist/models/order-change.js +108 -6
- package/dist/models/order-change.js.map +1 -1
- package/dist/models/order-item.d.ts +10 -7
- package/dist/models/order-item.d.ts.map +1 -0
- package/dist/models/order-item.js +29 -19
- package/dist/models/order-item.js.map +1 -1
- package/dist/models/order-shipping-method.d.ts +17 -7
- package/dist/models/order-shipping-method.d.ts.map +1 -0
- package/dist/models/order-shipping-method.js +113 -33
- package/dist/models/order-shipping-method.js.map +1 -1
- package/dist/models/order-summary.d.ts +7 -8
- package/dist/models/order-summary.d.ts.map +1 -0
- package/dist/models/order-summary.js +14 -10
- package/dist/models/order-summary.js.map +1 -1
- package/dist/models/order.d.ts +13 -11
- package/dist/models/order.d.ts.map +1 -0
- package/dist/models/order.js +12 -2
- package/dist/models/order.js.map +1 -1
- package/dist/models/return-item.d.ts +31 -0
- package/dist/models/return-item.d.ts.map +1 -0
- package/dist/models/return-item.js +180 -0
- package/dist/models/return-item.js.map +1 -0
- package/dist/models/return-reason.d.ts +22 -0
- package/dist/models/return-reason.d.ts.map +1 -0
- package/dist/models/return-reason.js +122 -0
- package/dist/models/return-reason.js.map +1 -0
- package/dist/models/return.d.ts +41 -0
- package/dist/models/return.d.ts.map +1 -0
- package/dist/models/return.js +227 -0
- package/dist/models/return.js.map +1 -0
- package/dist/models/shipping-method-adjustment.d.ts +5 -3
- package/dist/models/shipping-method-adjustment.d.ts.map +1 -0
- package/dist/models/shipping-method-adjustment.js +12 -12
- package/dist/models/shipping-method-adjustment.js.map +1 -1
- package/dist/models/shipping-method-tax-line.d.ts +5 -3
- package/dist/models/shipping-method-tax-line.d.ts.map +1 -0
- package/dist/models/shipping-method-tax-line.js +12 -12
- package/dist/models/shipping-method-tax-line.js.map +1 -1
- package/dist/models/shipping-method.d.ts +10 -7
- package/dist/models/shipping-method.d.ts.map +1 -0
- package/dist/models/shipping-method.js +42 -24
- package/dist/models/shipping-method.js.map +1 -1
- package/dist/models/tax-line.d.ts +4 -2
- package/dist/models/tax-line.d.ts.map +1 -0
- package/dist/models/tax-line.js +8 -1
- package/dist/models/tax-line.js.map +1 -1
- package/dist/models/transaction.d.ts +18 -6
- package/dist/models/transaction.d.ts.map +1 -0
- package/dist/models/transaction.js +133 -24
- package/dist/models/transaction.js.map +1 -1
- package/dist/repositories/claim.d.ts +9 -0
- package/dist/repositories/claim.d.ts.map +1 -0
- package/dist/repositories/claim.js +11 -0
- package/dist/repositories/claim.js.map +1 -0
- package/dist/repositories/exchange.d.ts +9 -0
- package/dist/repositories/exchange.d.ts.map +1 -0
- package/dist/repositories/exchange.js +11 -0
- package/dist/repositories/exchange.js.map +1 -0
- package/dist/repositories/index.d.ts +5 -2
- package/dist/repositories/index.d.ts.map +1 -0
- package/dist/repositories/index.js +8 -17
- package/dist/repositories/index.js.map +1 -1
- package/dist/repositories/order.d.ts +2 -4
- package/dist/repositories/order.d.ts.map +1 -0
- package/dist/repositories/order.js +3 -86
- package/dist/repositories/order.js.map +1 -1
- package/dist/repositories/return.d.ts +9 -0
- package/dist/repositories/return.d.ts.map +1 -0
- package/dist/repositories/return.js +11 -0
- package/dist/repositories/return.js.map +1 -0
- package/dist/schema/index.d.ts +3 -0
- package/dist/schema/index.d.ts.map +1 -0
- package/dist/schema/index.js +556 -0
- package/dist/schema/index.js.map +1 -0
- package/dist/services/actions/cancel-claim.d.ts +3 -0
- package/dist/services/actions/cancel-claim.d.ts.map +1 -0
- package/dist/services/actions/cancel-claim.js +85 -0
- package/dist/services/actions/cancel-claim.js.map +1 -0
- package/dist/services/actions/cancel-exchange.d.ts +3 -0
- package/dist/services/actions/cancel-exchange.d.ts.map +1 -0
- package/dist/services/actions/cancel-exchange.js +71 -0
- package/dist/services/actions/cancel-exchange.js.map +1 -0
- package/dist/services/actions/cancel-fulfillment.d.ts +3 -0
- package/dist/services/actions/cancel-fulfillment.d.ts.map +1 -0
- package/dist/services/actions/cancel-fulfillment.js +31 -0
- package/dist/services/actions/cancel-fulfillment.js.map +1 -0
- package/dist/services/actions/cancel-return.d.ts +3 -0
- package/dist/services/actions/cancel-return.d.ts.map +1 -0
- package/dist/services/actions/cancel-return.js +69 -0
- package/dist/services/actions/cancel-return.js.map +1 -0
- package/dist/services/actions/create-claim.d.ts +3 -0
- package/dist/services/actions/create-claim.d.ts.map +1 -0
- package/dist/services/actions/create-claim.js +225 -0
- package/dist/services/actions/create-claim.js.map +1 -0
- package/dist/services/actions/create-exchange.d.ts +3 -0
- package/dist/services/actions/create-exchange.d.ts.map +1 -0
- package/dist/services/actions/create-exchange.js +191 -0
- package/dist/services/actions/create-exchange.js.map +1 -0
- package/dist/services/actions/create-return.d.ts +3 -0
- package/dist/services/actions/create-return.d.ts.map +1 -0
- package/dist/services/actions/create-return.js +100 -0
- package/dist/services/actions/create-return.js.map +1 -0
- package/dist/services/actions/index.d.ts +12 -0
- package/dist/services/actions/index.d.ts.map +1 -0
- package/dist/services/actions/index.js +28 -0
- package/dist/services/actions/index.js.map +1 -0
- package/dist/services/actions/receive-return.d.ts +3 -0
- package/dist/services/actions/receive-return.d.ts.map +1 -0
- package/dist/services/actions/receive-return.js +71 -0
- package/dist/services/actions/receive-return.js.map +1 -0
- package/dist/services/actions/register-delivery.d.ts +3 -0
- package/dist/services/actions/register-delivery.d.ts.map +1 -0
- package/dist/services/actions/register-delivery.js +29 -0
- package/dist/services/actions/register-delivery.js.map +1 -0
- package/dist/services/actions/register-fulfillment.d.ts +3 -0
- package/dist/services/actions/register-fulfillment.d.ts.map +1 -0
- package/dist/services/actions/register-fulfillment.js +29 -0
- package/dist/services/actions/register-fulfillment.js.map +1 -0
- package/dist/services/actions/register-shipment.d.ts +3 -0
- package/dist/services/actions/register-shipment.d.ts.map +1 -0
- package/dist/services/actions/register-shipment.js +37 -0
- package/dist/services/actions/register-shipment.js.map +1 -0
- package/dist/services/index.d.ts +1 -1
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/index.js +1 -3
- package/dist/services/index.js.map +1 -1
- package/dist/services/order-module-service.d.ts +191 -109
- package/dist/services/order-module-service.d.ts.map +1 -0
- package/dist/services/order-module-service.js +1165 -425
- package/dist/services/order-module-service.js.map +1 -1
- package/dist/services/order-service.d.ts +6 -5
- package/dist/services/order-service.d.ts.map +1 -0
- package/dist/services/order-service.js +2 -2
- package/dist/services/order-service.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types/address.d.ts +2 -1
- package/dist/types/address.d.ts.map +1 -0
- package/dist/types/index.d.ts +5 -2
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/line-item-adjustment.d.ts +2 -1
- package/dist/types/line-item-adjustment.d.ts.map +1 -0
- package/dist/types/line-item-tax-line.d.ts +1 -0
- package/dist/types/line-item-tax-line.d.ts.map +1 -0
- package/dist/types/line-item.d.ts +2 -1
- package/dist/types/line-item.d.ts.map +1 -0
- package/dist/types/order-change.d.ts +4 -0
- package/dist/types/order-change.d.ts.map +1 -0
- package/dist/types/order-change.js +3 -0
- package/dist/types/order-change.js.map +1 -0
- package/dist/types/order-detail.d.ts +3 -2
- package/dist/types/order-detail.d.ts.map +1 -0
- package/dist/types/order.d.ts +4 -3
- package/dist/types/order.d.ts.map +1 -0
- package/dist/types/return-reason.d.ts +5 -0
- package/dist/types/return-reason.d.ts.map +1 -0
- package/dist/types/return-reason.js +3 -0
- package/dist/types/return-reason.js.map +1 -0
- package/dist/types/shipping-method-adjustment.d.ts +2 -1
- package/dist/types/shipping-method-adjustment.d.ts.map +1 -0
- package/dist/types/shipping-method-tax-line.d.ts +1 -0
- package/dist/types/shipping-method-tax-line.d.ts.map +1 -0
- package/dist/types/shipping-method.d.ts +5 -1
- package/dist/types/shipping-method.d.ts.map +1 -0
- package/dist/types/tax-line.d.ts +2 -1
- package/dist/types/tax-line.d.ts.map +1 -0
- package/dist/types/transaction.d.ts +2 -1
- package/dist/types/transaction.d.ts.map +1 -0
- package/dist/types/utils/index.d.ts +41 -23
- package/dist/types/utils/index.d.ts.map +1 -0
- package/dist/types/utils/index.js +0 -1
- package/dist/types/utils/index.js.map +1 -1
- package/dist/utils/actions/cancel-item-fulfillment.d.ts +2 -0
- package/dist/utils/actions/cancel-item-fulfillment.d.ts.map +1 -0
- package/dist/utils/actions/cancel-item-fulfillment.js +34 -0
- package/dist/utils/actions/cancel-item-fulfillment.js.map +1 -0
- package/dist/utils/actions/cancel-return.d.ts +1 -0
- package/dist/utils/actions/cancel-return.d.ts.map +1 -0
- package/dist/utils/actions/cancel-return.js +9 -16
- package/dist/utils/actions/cancel-return.js.map +1 -1
- package/dist/utils/actions/deliver-item.d.ts +2 -0
- package/dist/utils/actions/deliver-item.d.ts.map +1 -0
- package/dist/utils/actions/deliver-item.js +38 -0
- package/dist/utils/actions/deliver-item.js.map +1 -0
- package/dist/utils/actions/fulfill-item.d.ts +1 -0
- package/dist/utils/actions/fulfill-item.d.ts.map +1 -0
- package/dist/utils/actions/fulfill-item.js +8 -12
- package/dist/utils/actions/fulfill-item.js.map +1 -1
- package/dist/utils/actions/index.d.ts +7 -1
- package/dist/utils/actions/index.d.ts.map +1 -0
- package/dist/utils/actions/index.js +6 -1
- package/dist/utils/actions/index.js.map +1 -1
- package/dist/utils/actions/item-add.d.ts +1 -0
- package/dist/utils/actions/item-add.d.ts.map +1 -0
- package/dist/utils/actions/item-add.js +17 -26
- package/dist/utils/actions/item-add.js.map +1 -1
- package/dist/utils/actions/item-remove.d.ts +1 -0
- package/dist/utils/actions/item-remove.d.ts.map +1 -0
- package/dist/utils/actions/item-remove.js +10 -30
- package/dist/utils/actions/item-remove.js.map +1 -1
- package/dist/utils/actions/item-update.d.ts +2 -0
- package/dist/utils/actions/item-update.d.ts.map +1 -0
- package/dist/utils/actions/item-update.js +37 -0
- package/dist/utils/actions/item-update.js.map +1 -0
- package/dist/utils/actions/receive-damaged-return-item.d.ts +1 -0
- package/dist/utils/actions/receive-damaged-return-item.d.ts.map +1 -0
- package/dist/utils/actions/receive-damaged-return-item.js +11 -37
- package/dist/utils/actions/receive-damaged-return-item.js.map +1 -1
- package/dist/utils/actions/receive-return-item.d.ts +1 -0
- package/dist/utils/actions/receive-return-item.d.ts.map +1 -0
- package/dist/utils/actions/receive-return-item.js +9 -38
- package/dist/utils/actions/receive-return-item.js.map +1 -1
- package/dist/utils/actions/reinstate-item.d.ts +2 -0
- package/dist/utils/actions/reinstate-item.d.ts.map +1 -0
- package/dist/utils/actions/reinstate-item.js +32 -0
- package/dist/utils/actions/reinstate-item.js.map +1 -0
- package/dist/utils/actions/return-item.d.ts +1 -0
- package/dist/utils/actions/return-item.d.ts.map +1 -0
- package/dist/utils/actions/return-item.js +10 -15
- package/dist/utils/actions/return-item.js.map +1 -1
- package/dist/utils/actions/ship-item.d.ts +1 -0
- package/dist/utils/actions/ship-item.d.ts.map +1 -0
- package/dist/utils/actions/ship-item.js +8 -12
- package/dist/utils/actions/ship-item.js.map +1 -1
- package/dist/utils/actions/shipping-add.d.ts +1 -0
- package/dist/utils/actions/shipping-add.d.ts.map +1 -0
- package/dist/utils/actions/shipping-add.js +18 -18
- package/dist/utils/actions/shipping-add.js.map +1 -1
- package/dist/utils/actions/shipping-remove.d.ts +2 -0
- package/dist/utils/actions/shipping-remove.d.ts.map +1 -0
- package/dist/utils/actions/shipping-remove.js +22 -0
- package/dist/utils/actions/shipping-remove.js.map +1 -0
- package/dist/utils/actions/write-off-item.d.ts +1 -0
- package/dist/utils/actions/write-off-item.d.ts.map +1 -0
- package/dist/utils/actions/write-off-item.js +8 -12
- package/dist/utils/actions/write-off-item.js.map +1 -1
- package/dist/utils/apply-order-changes.d.ts +18 -0
- package/dist/utils/apply-order-changes.d.ts.map +1 -0
- package/dist/utils/apply-order-changes.js +98 -0
- package/dist/utils/apply-order-changes.js.map +1 -0
- package/dist/utils/base-repository-find.d.ts +3 -0
- package/dist/utils/base-repository-find.d.ts.map +1 -0
- package/dist/utils/base-repository-find.js +154 -0
- package/dist/utils/base-repository-find.js.map +1 -0
- package/dist/utils/calculate-order-change.d.ts +12 -6
- package/dist/utils/calculate-order-change.d.ts.map +1 -0
- package/dist/utils/calculate-order-change.js +56 -187
- package/dist/utils/calculate-order-change.js.map +1 -1
- package/dist/utils/index.d.ts +4 -1
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +3 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/set-action-reference.d.ts +2 -0
- package/dist/utils/set-action-reference.d.ts.map +1 -0
- package/dist/utils/set-action-reference.js +10 -0
- package/dist/utils/set-action-reference.js.map +1 -0
- package/dist/utils/transform-order.d.ts +5 -4
- package/dist/utils/transform-order.d.ts.map +1 -0
- package/dist/utils/transform-order.js +138 -21
- package/dist/utils/transform-order.js.map +1 -1
- package/package.json +25 -26
- package/dist/module-definition.d.ts +0 -2
- package/dist/module-definition.js +0 -59
- package/dist/module-definition.js.map +0 -1
- package/dist/scripts/bin/run-seed.d.ts +0 -3
- package/dist/scripts/bin/run-seed.js +0 -49
- package/dist/scripts/bin/run-seed.js.map +0 -1
- package/dist/services/order-change-service.d.ts +0 -15
- package/dist/services/order-change-service.js +0 -96
- package/dist/services/order-change-service.js.map +0 -1
- package/dist/utils/action-key.d.ts +0 -13
- package/dist/utils/action-key.js +0 -18
- package/dist/utils/action-key.js.map +0 -1
- package/dist/utils/actions/cancel.d.ts +0 -1
- package/dist/utils/actions/cancel.js +0 -8
- package/dist/utils/actions/cancel.js.map +0 -1
@@ -1,18 +1,27 @@
|
|
1
|
-
import { BigNumberRawValue, DAL } from "@medusajs/types";
|
2
|
-
import { BigNumber } from "@medusajs/utils";
|
3
|
-
import { OptionalProps } from "@mikro-orm/core";
|
1
|
+
import { BigNumberRawValue, DAL } from "@medusajs/framework/types";
|
2
|
+
import { BigNumber } from "@medusajs/framework/utils";
|
3
|
+
import { OptionalProps, Rel } from "@mikro-orm/core";
|
4
|
+
import OrderClaim from "./claim";
|
5
|
+
import OrderExchange from "./exchange";
|
4
6
|
import Order from "./order";
|
5
7
|
import OrderChange from "./order-change";
|
6
|
-
|
8
|
+
import Return from "./return";
|
9
|
+
type OptionalLineItemProps = DAL.ModelDateColumns;
|
7
10
|
export default class OrderChangeAction {
|
8
11
|
[OptionalProps]?: OptionalLineItemProps;
|
9
12
|
id: string;
|
10
13
|
ordering: number;
|
11
14
|
order_id: string | null;
|
12
|
-
order: Order | null;
|
15
|
+
order: Rel<Order> | null;
|
16
|
+
return_id: string | null;
|
17
|
+
return: Return;
|
18
|
+
claim_id: string | null;
|
19
|
+
claim: OrderClaim;
|
20
|
+
exchange_id: string | null;
|
21
|
+
exchange: OrderExchange;
|
13
22
|
version: number | null;
|
14
23
|
order_change_id: string | null;
|
15
|
-
order_change: OrderChange | null;
|
24
|
+
order_change: Rel<OrderChange> | null;
|
16
25
|
reference: string | null;
|
17
26
|
reference_id: string | null;
|
18
27
|
action: string;
|
@@ -23,7 +32,9 @@ export default class OrderChangeAction {
|
|
23
32
|
applied: boolean;
|
24
33
|
created_at: Date;
|
25
34
|
updated_at: Date;
|
35
|
+
deleted_at: Date | null;
|
26
36
|
onCreate(): void;
|
27
37
|
onInit(): void;
|
28
38
|
}
|
29
39
|
export {};
|
40
|
+
//# sourceMappingURL=order-change-action.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"order-change-action.d.ts","sourceRoot":"","sources":["../../src/models/order-change-action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAA;AAClE,OAAO,EACL,SAAS,EAKV,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAML,aAAa,EAGb,GAAG,EACJ,MAAM,iBAAiB,CAAA;AACxB,OAAO,UAAU,MAAM,SAAS,CAAA;AAChC,OAAO,aAAa,MAAM,YAAY,CAAA;AACtC,OAAO,KAAK,MAAM,SAAS,CAAA;AAC3B,OAAO,WAAW,MAAM,gBAAgB,CAAA;AACxC,OAAO,MAAM,MAAM,UAAU,CAAA;AAE7B,KAAK,qBAAqB,GAAG,GAAG,CAAC,gBAAgB,CAAA;AA8CjD,MAAM,CAAC,OAAO,OAAO,iBAAiB;IACpC,CAAC,aAAa,CAAC,CAAC,EAAE,qBAAqB,CAAA;IAGvC,EAAE,EAAE,MAAM,CAAA;IAIV,QAAQ,EAAE,MAAM,CAAA;IAWhB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAO;IAM9B,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,GAAG,IAAI,CAAO;IAU/B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAO;IAM/B,MAAM,EAAE,MAAM,CAAA;IAUd,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAO;IAM9B,KAAK,EAAE,UAAU,CAAA;IAUjB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAO;IAMjC,QAAQ,EAAE,aAAa,CAAA;IAGvB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAO;IAW7B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAA;IAM9B,YAAY,EAAE,GAAG,CAAC,WAAW,CAAC,GAAG,IAAI,CAAO;IAM5C,SAAS,EAAE,MAAM,GAAG,IAAI,CAAO;IAM/B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAO;IAGlC,MAAM,EAAE,MAAM,CAAA;IAGd,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAK;IAGrC,MAAM,EAAE,SAAS,GAAG,MAAM,GAAG,IAAI,CAAO;IAGxC,UAAU,EAAE,iBAAiB,GAAG,IAAI,CAAO;IAM3C,aAAa,EAAE,MAAM,GAAG,IAAI,CAAO;IAMnC,OAAO,EAAE,OAAO,CAAQ;IAOxB,UAAU,EAAE,IAAI,CAAA;IAQhB,UAAU,EAAE,IAAI,CAAA;IAIhB,UAAU,EAAE,IAAI,GAAG,IAAI,CAAO;IAG9B,QAAQ;IAeR,MAAM;CAaP"}
|
@@ -12,26 +12,55 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
13
13
|
};
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
15
|
-
const utils_1 = require("@medusajs/utils");
|
15
|
+
const utils_1 = require("@medusajs/framework/utils");
|
16
16
|
const core_1 = require("@mikro-orm/core");
|
17
|
+
const claim_1 = __importDefault(require("./claim"));
|
18
|
+
const exchange_1 = __importDefault(require("./exchange"));
|
17
19
|
const order_1 = __importDefault(require("./order"));
|
18
20
|
const order_change_1 = __importDefault(require("./order-change"));
|
21
|
+
const return_1 = __importDefault(require("./return"));
|
19
22
|
const OrderChangeIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
20
23
|
tableName: "order_change_action",
|
21
24
|
columns: "order_change_id",
|
25
|
+
where: "deleted_at IS NOT NULL",
|
22
26
|
});
|
23
27
|
const OrderIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
24
28
|
tableName: "order_change_action",
|
25
29
|
columns: "order_id",
|
30
|
+
where: "deleted_at IS NOT NULL",
|
31
|
+
});
|
32
|
+
const ReturnIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
33
|
+
tableName: "order_change_action",
|
34
|
+
columns: "return_id",
|
35
|
+
where: "return_id IS NOT NULL AND deleted_at IS NOT NULL",
|
36
|
+
});
|
37
|
+
const OrderClaimIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
38
|
+
tableName: "order_change_action",
|
39
|
+
columns: "claim_id",
|
40
|
+
where: "claim_id IS NOT NULL AND deleted_at IS NOT NULL",
|
41
|
+
});
|
42
|
+
const OrderExchangeIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
43
|
+
tableName: "order_change_action",
|
44
|
+
columns: "exchange_id",
|
45
|
+
where: "exchange_id IS NOT NULL AND deleted_at IS NOT NULL",
|
46
|
+
});
|
47
|
+
const DeletedAtIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
48
|
+
tableName: "order_change_action",
|
49
|
+
columns: "deleted_at",
|
50
|
+
where: "deleted_at IS NOT NULL",
|
26
51
|
});
|
27
52
|
const ActionOrderingIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
28
53
|
tableName: "order_change_action",
|
29
54
|
columns: "ordering",
|
55
|
+
where: "deleted_at IS NOT NULL",
|
30
56
|
});
|
31
57
|
let OrderChangeAction = class OrderChangeAction {
|
32
58
|
constructor() {
|
33
59
|
this.order_id = null;
|
34
60
|
this.order = null;
|
61
|
+
this.return_id = null;
|
62
|
+
this.claim_id = null;
|
63
|
+
this.exchange_id = null;
|
35
64
|
this.version = null;
|
36
65
|
this.order_change = null;
|
37
66
|
this.reference = null;
|
@@ -41,18 +70,31 @@ let OrderChangeAction = class OrderChangeAction {
|
|
41
70
|
this.raw_amount = null;
|
42
71
|
this.internal_note = null;
|
43
72
|
this.applied = false;
|
73
|
+
this.deleted_at = null;
|
44
74
|
}
|
45
75
|
onCreate() {
|
46
76
|
this.id = (0, utils_1.generateEntityId)(this.id, "ordchact");
|
47
|
-
this.order_id
|
48
|
-
this.
|
49
|
-
this.
|
77
|
+
this.order_id ??= this.order?.id ?? this.order_change?.order_id ?? null;
|
78
|
+
this.claim_id ??= this.claim?.id ?? this.order_change?.claim_id ?? null;
|
79
|
+
this.exchange_id ??=
|
80
|
+
this.exchange?.id ?? this.order_change?.exchange_id ?? null;
|
81
|
+
this.order_change_id ??= this.order_change?.id ?? null;
|
82
|
+
this.version ??= this.order_change?.version ?? null;
|
83
|
+
if (!this.claim_id && !this.exchange_id) {
|
84
|
+
this.return_id ??= this.return?.id ?? this.order_change?.return_id ?? null;
|
85
|
+
}
|
50
86
|
}
|
51
87
|
onInit() {
|
52
88
|
this.id = (0, utils_1.generateEntityId)(this.id, "ordchact");
|
53
|
-
this.order_id
|
54
|
-
this.
|
55
|
-
this.
|
89
|
+
this.order_id ??= this.order?.id ?? this.order_change?.order_id ?? null;
|
90
|
+
this.claim_id ??= this.claim?.id ?? this.order_change?.claim_id ?? null;
|
91
|
+
this.exchange_id ??=
|
92
|
+
this.exchange?.id ?? this.order_change?.exchange_id ?? null;
|
93
|
+
this.order_change_id ??= this.order_change?.id ?? null;
|
94
|
+
this.version ??= this.order_change?.version ?? null;
|
95
|
+
if (!this.claim_id && !this.exchange_id) {
|
96
|
+
this.return_id ??= this.return?.id ?? this.order_change?.return_id ?? null;
|
97
|
+
}
|
56
98
|
}
|
57
99
|
};
|
58
100
|
__decorate([
|
@@ -83,6 +125,60 @@ __decorate([
|
|
83
125
|
}),
|
84
126
|
__metadata("design:type", Object)
|
85
127
|
], OrderChangeAction.prototype, "order", void 0);
|
128
|
+
__decorate([
|
129
|
+
(0, core_1.ManyToOne)({
|
130
|
+
entity: () => return_1.default,
|
131
|
+
mapToPk: true,
|
132
|
+
fieldName: "return_id",
|
133
|
+
columnType: "text",
|
134
|
+
nullable: true,
|
135
|
+
}),
|
136
|
+
ReturnIdIndex.MikroORMIndex(),
|
137
|
+
__metadata("design:type", Object)
|
138
|
+
], OrderChangeAction.prototype, "return_id", void 0);
|
139
|
+
__decorate([
|
140
|
+
(0, core_1.ManyToOne)(() => return_1.default, {
|
141
|
+
persist: false,
|
142
|
+
nullable: true,
|
143
|
+
}),
|
144
|
+
__metadata("design:type", return_1.default)
|
145
|
+
], OrderChangeAction.prototype, "return", void 0);
|
146
|
+
__decorate([
|
147
|
+
(0, core_1.ManyToOne)({
|
148
|
+
entity: () => claim_1.default,
|
149
|
+
mapToPk: true,
|
150
|
+
fieldName: "claim_id",
|
151
|
+
columnType: "text",
|
152
|
+
nullable: true,
|
153
|
+
}),
|
154
|
+
OrderClaimIdIndex.MikroORMIndex(),
|
155
|
+
__metadata("design:type", Object)
|
156
|
+
], OrderChangeAction.prototype, "claim_id", void 0);
|
157
|
+
__decorate([
|
158
|
+
(0, core_1.ManyToOne)(() => claim_1.default, {
|
159
|
+
persist: false,
|
160
|
+
nullable: true,
|
161
|
+
}),
|
162
|
+
__metadata("design:type", claim_1.default)
|
163
|
+
], OrderChangeAction.prototype, "claim", void 0);
|
164
|
+
__decorate([
|
165
|
+
(0, core_1.ManyToOne)({
|
166
|
+
entity: () => exchange_1.default,
|
167
|
+
mapToPk: true,
|
168
|
+
fieldName: "exchange_id",
|
169
|
+
columnType: "text",
|
170
|
+
nullable: true,
|
171
|
+
}),
|
172
|
+
OrderExchangeIdIndex.MikroORMIndex(),
|
173
|
+
__metadata("design:type", Object)
|
174
|
+
], OrderChangeAction.prototype, "exchange_id", void 0);
|
175
|
+
__decorate([
|
176
|
+
(0, core_1.ManyToOne)(() => exchange_1.default, {
|
177
|
+
persist: false,
|
178
|
+
nullable: true,
|
179
|
+
}),
|
180
|
+
__metadata("design:type", exchange_1.default)
|
181
|
+
], OrderChangeAction.prototype, "exchange", void 0);
|
86
182
|
__decorate([
|
87
183
|
(0, core_1.Property)({ columnType: "integer", nullable: true }),
|
88
184
|
__metadata("design:type", Object)
|
@@ -167,6 +263,11 @@ __decorate([
|
|
167
263
|
}),
|
168
264
|
__metadata("design:type", Date)
|
169
265
|
], OrderChangeAction.prototype, "updated_at", void 0);
|
266
|
+
__decorate([
|
267
|
+
(0, core_1.Property)({ columnType: "timestamptz", nullable: true }),
|
268
|
+
DeletedAtIndex.MikroORMIndex(),
|
269
|
+
__metadata("design:type", Object)
|
270
|
+
], OrderChangeAction.prototype, "deleted_at", void 0);
|
170
271
|
__decorate([
|
171
272
|
(0, core_1.BeforeCreate)(),
|
172
273
|
__metadata("design:type", Function),
|
@@ -180,7 +281,8 @@ __decorate([
|
|
180
281
|
__metadata("design:returntype", void 0)
|
181
282
|
], OrderChangeAction.prototype, "onInit", null);
|
182
283
|
OrderChangeAction = __decorate([
|
183
|
-
(0, core_1.Entity)({ tableName: "order_change_action" })
|
284
|
+
(0, core_1.Entity)({ tableName: "order_change_action" }),
|
285
|
+
(0, core_1.Filter)(utils_1.DALUtils.mikroOrmSoftDeletableFilterOptions)
|
184
286
|
], OrderChangeAction);
|
185
287
|
exports.default = OrderChangeAction;
|
186
288
|
//# sourceMappingURL=order-change-action.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"order-change-action.js","sourceRoot":"","sources":["../../src/models/order-change-action.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,
|
1
|
+
{"version":3,"file":"order-change-action.js","sourceRoot":"","sources":["../../src/models/order-change-action.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,qDAMkC;AAClC,0CAUwB;AACxB,oDAAgC;AAChC,0DAAsC;AACtC,oDAA2B;AAC3B,kEAAwC;AACxC,sDAA6B;AAI7B,MAAM,kBAAkB,GAAG,IAAA,sCAA8B,EAAC;IACxD,SAAS,EAAE,qBAAqB;IAChC,OAAO,EAAE,iBAAiB;IAC1B,KAAK,EAAE,wBAAwB;CAChC,CAAC,CAAA;AAEF,MAAM,YAAY,GAAG,IAAA,sCAA8B,EAAC;IAClD,SAAS,EAAE,qBAAqB;IAChC,OAAO,EAAE,UAAU;IACnB,KAAK,EAAE,wBAAwB;CA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aAAa;QACzB,UAAU,EAAE,OAAO;KACpB,CAAC;8BACU,IAAI;qDAAA;AAIhB;IAFC,IAAA,eAAQ,EAAC,EAAE,UAAU,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACvD,cAAc,CAAC,aAAa,EAAE;;qDACD;AAG9B;IADC,IAAA,mBAAY,GAAE;;;;iDAad;AAGD;IADC,IAAA,aAAM,GAAE;;;;+CAaR;AAlLkB,iBAAiB;IAFrC,IAAA,aAAM,EAAC,EAAE,SAAS,EAAE,qBAAqB,EAAE,CAAC;IAC5C,IAAA,aAAM,EAAC,gBAAQ,CAAC,kCAAkC,CAAC;GAC/B,iBAAiB,CAmLrC;kBAnLoB,iBAAiB"}
|
@@ -1,15 +1,25 @@
|
|
1
|
-
import { DAL } from "@medusajs/types";
|
2
|
-
import { OrderChangeStatus } from "@medusajs/utils";
|
3
|
-
import { Collection, OptionalProps } from "@mikro-orm/core";
|
1
|
+
import { DAL } from "@medusajs/framework/types";
|
2
|
+
import { OrderChangeStatus } from "@medusajs/framework/utils";
|
3
|
+
import { Collection, OptionalProps, Rel } from "@mikro-orm/core";
|
4
|
+
import OrderClaim from "./claim";
|
5
|
+
import OrderExchange from "./exchange";
|
4
6
|
import Order from "./order";
|
5
7
|
import OrderChangeAction from "./order-change-action";
|
6
|
-
|
8
|
+
import Return from "./return";
|
9
|
+
type OptionalLineItemProps = DAL.ModelDateColumns;
|
7
10
|
export default class OrderChange {
|
8
11
|
[OptionalProps]?: OptionalLineItemProps;
|
9
12
|
id: string;
|
10
13
|
order_id: string;
|
11
|
-
order: Order
|
14
|
+
order: Rel<Order>;
|
15
|
+
return_id: string | null;
|
16
|
+
return: Rel<Return>;
|
17
|
+
claim_id: string | null;
|
18
|
+
claim: OrderClaim;
|
19
|
+
exchange_id: string | null;
|
20
|
+
exchange: OrderExchange;
|
12
21
|
version: number;
|
22
|
+
change_type: string | null;
|
13
23
|
actions: Collection<OrderChangeAction, object>;
|
14
24
|
description: string | null;
|
15
25
|
status: OrderChangeStatus;
|
@@ -24,10 +34,12 @@ export default class OrderChange {
|
|
24
34
|
metadata: Record<string, unknown> | null;
|
25
35
|
declined_at?: Date;
|
26
36
|
canceled_by: string | null;
|
27
|
-
canceled_at?: Date;
|
37
|
+
canceled_at?: Date | null;
|
28
38
|
created_at: Date;
|
29
39
|
updated_at: Date;
|
40
|
+
deleted_at: Date | null;
|
30
41
|
onCreate(): void;
|
31
42
|
onInit(): void;
|
32
43
|
}
|
33
44
|
export {};
|
45
|
+
//# sourceMappingURL=order-change.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"order-change.d.ts","sourceRoot":"","sources":["../../src/models/order-change.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAA;AAC/C,OAAO,EAIL,iBAAiB,EAClB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAGL,UAAU,EAOV,aAAa,EAGb,GAAG,EACJ,MAAM,iBAAiB,CAAA;AAExB,OAAO,UAAU,MAAM,SAAS,CAAA;AAChC,OAAO,aAAa,MAAM,YAAY,CAAA;AACtC,OAAO,KAAK,MAAM,SAAS,CAAA;AAC3B,OAAO,iBAAiB,MAAM,uBAAuB,CAAA;AACrD,OAAO,MAAM,MAAM,UAAU,CAAA;AAE7B,KAAK,qBAAqB,GAAG,GAAG,CAAC,gBAAgB,CAAA;AA+CjD,MAAM,CAAC,OAAO,OAAO,WAAW;IAC9B,CAAC,aAAa,CAAC,CAAC,EAAE,qBAAqB,CAAA;IAGvC,EAAE,EAAE,MAAM,CAAA;IAUV,QAAQ,EAAE,MAAM,CAAA;IAKhB,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,CAAA;IAUjB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAO;IAM/B,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAUnB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAO;IAM9B,KAAK,EAAE,UAAU,CAAA;IAUjB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAO;IAMjC,QAAQ,EAAE,aAAa,CAAA;IAIvB,OAAO,EAAE,MAAM,CAAA;IAGf,WAAW,EAAE,MAAM,GAAG,IAAI,CAAO;IAKjC,OAAO,wCAA+C;IAMtD,WAAW,EAAE,MAAM,GAAG,IAAI,CAAO;IAIjC,MAAM,EAAE,iBAAiB,CAA4B;IAGrD,aAAa,EAAE,MAAM,GAAG,IAAI,CAAO;IAGnC,UAAU,EAAE,MAAM,CAAA;IAGlB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAO;IAMlC,YAAY,EAAE,IAAI,GAAG,IAAI,CAAO;IAGhC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAO;IAMlC,YAAY,EAAE,IAAI,GAAG,IAAI,CAAO;IAGhC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAO;IAGjC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAO;IAGrC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAO;IAM/C,WAAW,CAAC,EAAE,IAAI,CAAA;IAGlB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAO;IAMjC,WAAW,CAAC,EAAE,IAAI,GAAG,IAAI,CAAO;IAOhC,UAAU,EAAE,IAAI,CAAA;IAQhB,UAAU,EAAE,IAAI,CAAA;IAIhB,UAAU,EAAE,IAAI,GAAG,IAAI,CAAO;IAG9B,QAAQ;IASR,MAAM;CAOP"}
|
@@ -12,24 +12,54 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
13
13
|
};
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
15
|
-
const utils_1 = require("@medusajs/utils");
|
15
|
+
const utils_1 = require("@medusajs/framework/utils");
|
16
16
|
const core_1 = require("@mikro-orm/core");
|
17
|
+
const claim_1 = __importDefault(require("./claim"));
|
18
|
+
const exchange_1 = __importDefault(require("./exchange"));
|
17
19
|
const order_1 = __importDefault(require("./order"));
|
18
20
|
const order_change_action_1 = __importDefault(require("./order-change-action"));
|
21
|
+
const return_1 = __importDefault(require("./return"));
|
19
22
|
const OrderIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
20
23
|
tableName: "order_change",
|
21
24
|
columns: "order_id",
|
25
|
+
where: "deleted_at IS NOT NULL",
|
26
|
+
});
|
27
|
+
const ReturnIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
28
|
+
tableName: "order_change",
|
29
|
+
columns: "return_id",
|
30
|
+
where: "return_id IS NOT NULL AND deleted_at IS NOT NULL",
|
31
|
+
});
|
32
|
+
const OrderClaimIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
33
|
+
tableName: "order_change",
|
34
|
+
columns: "claim_id",
|
35
|
+
where: "claim_id IS NOT NULL AND deleted_at IS NOT NULL",
|
36
|
+
});
|
37
|
+
const OrderExchangeIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
38
|
+
tableName: "order_change",
|
39
|
+
columns: "exchange_id",
|
40
|
+
where: "exchange_id IS NOT NULL AND deleted_at IS NOT NULL",
|
22
41
|
});
|
23
42
|
const OrderChangeStatusIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
24
43
|
tableName: "order_change",
|
25
44
|
columns: "status",
|
45
|
+
where: "deleted_at IS NOT NULL",
|
46
|
+
});
|
47
|
+
const DeletedAtIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
48
|
+
tableName: "order_change",
|
49
|
+
columns: "deleted_at",
|
50
|
+
where: "deleted_at IS NOT NULL",
|
26
51
|
});
|
27
52
|
const VersionIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
28
53
|
tableName: "order_change",
|
29
54
|
columns: ["order_id", "version"],
|
55
|
+
where: "deleted_at IS NOT NULL",
|
30
56
|
});
|
31
57
|
let OrderChange = class OrderChange {
|
32
58
|
constructor() {
|
59
|
+
this.return_id = null;
|
60
|
+
this.claim_id = null;
|
61
|
+
this.exchange_id = null;
|
62
|
+
this.change_type = null;
|
33
63
|
this.actions = new core_1.Collection(this);
|
34
64
|
this.description = null;
|
35
65
|
this.status = utils_1.OrderChangeStatus.PENDING;
|
@@ -42,14 +72,22 @@ let OrderChange = class OrderChange {
|
|
42
72
|
this.declined_reason = null;
|
43
73
|
this.metadata = null;
|
44
74
|
this.canceled_by = null;
|
75
|
+
this.canceled_at = null;
|
76
|
+
this.deleted_at = null;
|
45
77
|
}
|
46
78
|
onCreate() {
|
47
79
|
this.id = (0, utils_1.generateEntityId)(this.id, "ordch");
|
48
|
-
this.order_id
|
80
|
+
this.order_id ??= this.order?.id;
|
81
|
+
this.return_id ??= this.return?.id;
|
82
|
+
this.claim_id ??= this.claim?.id;
|
83
|
+
this.exchange_id ??= this.exchange?.id;
|
49
84
|
}
|
50
85
|
onInit() {
|
51
86
|
this.id = (0, utils_1.generateEntityId)(this.id, "ordch");
|
52
|
-
this.order_id
|
87
|
+
this.order_id ??= this.order?.id;
|
88
|
+
this.return_id ??= this.return?.id;
|
89
|
+
this.claim_id ??= this.claim?.id;
|
90
|
+
this.exchange_id ??= this.exchange?.id;
|
53
91
|
}
|
54
92
|
};
|
55
93
|
__decorate([
|
@@ -71,16 +109,74 @@ __decorate([
|
|
71
109
|
(0, core_1.ManyToOne)(() => order_1.default, {
|
72
110
|
persist: false,
|
73
111
|
}),
|
74
|
-
__metadata("design:type",
|
112
|
+
__metadata("design:type", Object)
|
75
113
|
], OrderChange.prototype, "order", void 0);
|
114
|
+
__decorate([
|
115
|
+
(0, core_1.ManyToOne)({
|
116
|
+
entity: () => return_1.default,
|
117
|
+
mapToPk: true,
|
118
|
+
fieldName: "return_id",
|
119
|
+
columnType: "text",
|
120
|
+
nullable: true,
|
121
|
+
}),
|
122
|
+
ReturnIdIndex.MikroORMIndex(),
|
123
|
+
__metadata("design:type", Object)
|
124
|
+
], OrderChange.prototype, "return_id", void 0);
|
125
|
+
__decorate([
|
126
|
+
(0, core_1.ManyToOne)(() => return_1.default, {
|
127
|
+
persist: false,
|
128
|
+
nullable: true,
|
129
|
+
}),
|
130
|
+
__metadata("design:type", Object)
|
131
|
+
], OrderChange.prototype, "return", void 0);
|
132
|
+
__decorate([
|
133
|
+
(0, core_1.ManyToOne)({
|
134
|
+
entity: () => claim_1.default,
|
135
|
+
mapToPk: true,
|
136
|
+
fieldName: "claim_id",
|
137
|
+
columnType: "text",
|
138
|
+
nullable: true,
|
139
|
+
}),
|
140
|
+
OrderClaimIdIndex.MikroORMIndex(),
|
141
|
+
__metadata("design:type", Object)
|
142
|
+
], OrderChange.prototype, "claim_id", void 0);
|
143
|
+
__decorate([
|
144
|
+
(0, core_1.ManyToOne)(() => claim_1.default, {
|
145
|
+
persist: false,
|
146
|
+
nullable: true,
|
147
|
+
}),
|
148
|
+
__metadata("design:type", claim_1.default)
|
149
|
+
], OrderChange.prototype, "claim", void 0);
|
150
|
+
__decorate([
|
151
|
+
(0, core_1.ManyToOne)({
|
152
|
+
entity: () => exchange_1.default,
|
153
|
+
mapToPk: true,
|
154
|
+
fieldName: "exchange_id",
|
155
|
+
columnType: "text",
|
156
|
+
nullable: true,
|
157
|
+
}),
|
158
|
+
OrderExchangeIdIndex.MikroORMIndex(),
|
159
|
+
__metadata("design:type", Object)
|
160
|
+
], OrderChange.prototype, "exchange_id", void 0);
|
161
|
+
__decorate([
|
162
|
+
(0, core_1.ManyToOne)(() => exchange_1.default, {
|
163
|
+
persist: false,
|
164
|
+
nullable: true,
|
165
|
+
}),
|
166
|
+
__metadata("design:type", exchange_1.default)
|
167
|
+
], OrderChange.prototype, "exchange", void 0);
|
76
168
|
__decorate([
|
77
169
|
(0, core_1.Property)({ columnType: "integer" }),
|
78
170
|
VersionIndex.MikroORMIndex(),
|
79
171
|
__metadata("design:type", Number)
|
80
172
|
], OrderChange.prototype, "version", void 0);
|
173
|
+
__decorate([
|
174
|
+
(0, core_1.Property)({ columnType: "text", nullable: true }),
|
175
|
+
__metadata("design:type", Object)
|
176
|
+
], OrderChange.prototype, "change_type", void 0);
|
81
177
|
__decorate([
|
82
178
|
(0, core_1.OneToMany)(() => order_change_action_1.default, (action) => action.order_change, {
|
83
|
-
cascade: [core_1.Cascade.PERSIST, "
|
179
|
+
cascade: [core_1.Cascade.PERSIST, "soft-remove"],
|
84
180
|
}),
|
85
181
|
__metadata("design:type", Object)
|
86
182
|
], OrderChange.prototype, "actions", void 0);
|
@@ -154,7 +250,7 @@ __decorate([
|
|
154
250
|
columnType: "timestamptz",
|
155
251
|
nullable: true,
|
156
252
|
}),
|
157
|
-
__metadata("design:type",
|
253
|
+
__metadata("design:type", Object)
|
158
254
|
], OrderChange.prototype, "canceled_at", void 0);
|
159
255
|
__decorate([
|
160
256
|
(0, core_1.Property)({
|
@@ -173,6 +269,11 @@ __decorate([
|
|
173
269
|
}),
|
174
270
|
__metadata("design:type", Date)
|
175
271
|
], OrderChange.prototype, "updated_at", void 0);
|
272
|
+
__decorate([
|
273
|
+
(0, core_1.Property)({ columnType: "timestamptz", nullable: true }),
|
274
|
+
DeletedAtIndex.MikroORMIndex(),
|
275
|
+
__metadata("design:type", Object)
|
276
|
+
], OrderChange.prototype, "deleted_at", void 0);
|
176
277
|
__decorate([
|
177
278
|
(0, core_1.BeforeCreate)(),
|
178
279
|
__metadata("design:type", Function),
|
@@ -187,6 +288,7 @@ __decorate([
|
|
187
288
|
], OrderChange.prototype, "onInit", null);
|
188
289
|
OrderChange = __decorate([
|
189
290
|
(0, core_1.Entity)({ tableName: "order_change" }),
|
291
|
+
(0, core_1.Filter)(utils_1.DALUtils.mikroOrmSoftDeletableFilterOptions),
|
190
292
|
VersionIndex.MikroORMIndex()
|
191
293
|
], OrderChange);
|
192
294
|
exports.default = OrderChange;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"order-change.js","sourceRoot":"","sources":["../../src/models/order-change.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,
|
1
|
+
{"version":3,"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,UAAU,EAAE,aAAa;QACzB,UAAU,EAAE,OAAO;KACpB,CAAC;8BACU,IAAI;+CAAA;AAQhB;IANC,IAAA,eAAQ,EAAC;QACR,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE;QAC1B,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE;QAC1B,UAAU,EAAE,aAAa;QACzB,UAAU,EAAE,OAAO;KACpB,CAAC;8BACU,IAAI;+CAAA;AAIhB;IAFC,IAAA,eAAQ,EAAC,EAAE,UAAU,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACvD,cAAc,CAAC,aAAa,EAAE;;+CACD;AAG9B;IADC,IAAA,mBAAY,GAAE;;;;2CAOd;AAGD;IADC,IAAA,aAAM,GAAE;;;;yCAOR;AA9KkB,WAAW;IAH/B,IAAA,aAAM,EAAC,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;IACrC,IAAA,aAAM,EAAC,gBAAQ,CAAC,kCAAkC,CAAC;IACnD,YAAY,CAAC,aAAa,EAAE;GACR,WAAW,CA+K/B;kBA/KoB,WAAW"}
|
@@ -1,21 +1,23 @@
|
|
1
|
-
import { BigNumberRawValue, DAL } from "@medusajs/types";
|
2
|
-
import { BigNumber } from "@medusajs/utils";
|
3
|
-
import { OptionalProps } from "@mikro-orm/core";
|
4
|
-
import
|
1
|
+
import { BigNumberRawValue, DAL } from "@medusajs/framework/types";
|
2
|
+
import { BigNumber } from "@medusajs/framework/utils";
|
3
|
+
import { OptionalProps, Rel } from "@mikro-orm/core";
|
4
|
+
import OrderLineItem from "./line-item";
|
5
5
|
import Order from "./order";
|
6
|
-
type OptionalLineItemProps = DAL.
|
6
|
+
type OptionalLineItemProps = DAL.ModelDateColumns;
|
7
7
|
export default class OrderItem {
|
8
8
|
[OptionalProps]?: OptionalLineItemProps;
|
9
9
|
id: string;
|
10
10
|
order_id: string;
|
11
|
+
order: Rel<Order>;
|
11
12
|
version: number;
|
12
|
-
order: Order;
|
13
13
|
item_id: string;
|
14
|
-
item:
|
14
|
+
item: Rel<OrderLineItem>;
|
15
15
|
quantity: BigNumber | number;
|
16
16
|
raw_quantity: BigNumberRawValue;
|
17
17
|
fulfilled_quantity: BigNumber | number;
|
18
18
|
raw_fulfilled_quantity: BigNumberRawValue;
|
19
|
+
delivered_quantity: BigNumber | number;
|
20
|
+
raw_delivered_quantity: BigNumberRawValue;
|
19
21
|
shipped_quantity: BigNumber | number;
|
20
22
|
raw_shipped_quantity: BigNumberRawValue;
|
21
23
|
return_requested_quantity: BigNumber | number;
|
@@ -34,3 +36,4 @@ export default class OrderItem {
|
|
34
36
|
onInit(): void;
|
35
37
|
}
|
36
38
|
export {};
|
39
|
+
//# sourceMappingURL=order-item.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"order-item.d.ts","sourceRoot":"","sources":["../../src/models/order-item.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAA;AAClE,OAAO,EACL,SAAS,EAIV,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAKL,aAAa,EAGb,GAAG,EACJ,MAAM,iBAAiB,CAAA;AACxB,OAAO,aAAa,MAAM,aAAa,CAAA;AACvC,OAAO,KAAK,MAAM,SAAS,CAAA;AAE3B,KAAK,qBAAqB,GAAG,GAAG,CAAC,gBAAgB,CAAA;AA4BjD,MAAM,CAAC,OAAO,OAAO,SAAS;IAC5B,CAAC,aAAa,CAAC,CAAC,EAAE,qBAAqB,CAAA;IAGvC,EAAE,EAAE,MAAM,CAAA;IASV,QAAQ,EAAE,MAAM,CAAA;IAKhB,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,CAAA;IAIjB,OAAO,EAAE,MAAM,CAAA;IASf,OAAO,EAAE,MAAM,CAAA;IAKf,IAAI,EAAE,GAAG,CAAC,aAAa,CAAC,CAAA;IAGxB,QAAQ,EAAE,SAAS,GAAG,MAAM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