@medusajs/order 0.1.3 → 1.0.0-rc-20241001083650
Sign up to get free protection for your applications and to get access to all the features.
- 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 +20 -21
- 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
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"exchange.js","sourceRoot":"","sources":["../../src/models/exchange.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,qDAMkC;AAClC,0CAcwB;AACxB,qCAA6D;AAC7D,oDAA2B;AAC3B,oFAAmD;AACnD,sDAA6B;AAI7B,MAAM,cAAc,GAAG,IAAA,sCAA8B,EAAC;IACpD,SAAS,EAAE,gBAAgB;IAC3B,OAAO,EAAE,YAAY;IACrB,KAAK,EAAE,wBAAwB;CAChC,CAAC,CAAA;AAEF,MAAM,2BAA2B,GAAG,IAAA,sCAA8B,EAAC;IACjE,SAAS,EAAE,gBAAgB;IAC3B,OAAO,EAAE,YAAY;IACrB,KAAK,EAAE,wBAAwB;CAChC,CAAC,CAAA;AAEF,MAAM,YAAY,GAAG,IAAA,sCAA8B,EAAC;IAClD,SAAS,EAAE,gBAAgB;IAC3B,OAAO,EAAE,CAAC,UAAU,CAAC;IACrB,KAAK,EAAE,wBAAwB;CAChC,CAAC,CAAA;AAEF,MAAM,aAAa,GAAG,IAAA,sCAA8B,EAAC;IACnD,SAAS,EAAE,gBAAgB;IAC3B,OAAO,EAAE,WAAW;IACpB,KAAK,EAAE,kDAAkD;CAC1D,CAAC,CAAA;AAIa,IAAM,aAAa,GAAnB,MAAM,aAAa;IAAnB;QA+Bb,cAAS,GAAkB,IAAI,CAAA;QAY/B,oBAAe,GAAmB,IAAI,CAAA;QAWtC,oBAAe,GAAY,KAAK,CAAA;QAKhC,qBAAgB,GA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eAAQ,EAAC,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACjB;AAGhC;IADC,IAAA,eAAQ,EAAC,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACH;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;iDAAA;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;iDAAA;AAIhB;IAFC,IAAA,eAAQ,EAAC,EAAE,UAAU,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACvD,2BAA2B,CAAC,aAAa,EAAE;;iDACd;AAG9B;IADC,IAAA,eAAQ,EAAC,EAAE,UAAU,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDACzB;AAG/B;IADC,IAAA,mBAAY,GAAE;;;;6CAGd;AAGD;IADC,IAAA,aAAM,GAAE;;;;2CAGR;AA3GkB,aAAa;IAFjC,IAAA,aAAM,EAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;IACvC,IAAA,aAAM,EAAC,gBAAQ,CAAC,kCAAkC,CAAC;GAC/B,aAAa,CA4GjC;kBA5GoB,aAAa"}
|
package/dist/models/index.d.ts
CHANGED
@@ -1,14 +1,23 @@
|
|
1
|
-
export { default as
|
2
|
-
export { default as
|
3
|
-
export { default as
|
4
|
-
export { default as
|
1
|
+
export { default as OrderAddress } from "./address";
|
2
|
+
export { default as OrderClaim } from "./claim";
|
3
|
+
export { default as OrderClaimItem } from "./claim-item";
|
4
|
+
export { default as OrderClaimItemImage } from "./claim-item-image";
|
5
|
+
export { default as OrderExchange } from "./exchange";
|
6
|
+
export { default as OrderExchangeItem } from "./exchange-item";
|
7
|
+
export { default as OrderLineItem } from "./line-item";
|
8
|
+
export { default as OrderLineItemAdjustment } from "./line-item-adjustment";
|
9
|
+
export { default as OrderLineItemTaxLine } from "./line-item-tax-line";
|
5
10
|
export { default as Order } from "./order";
|
6
11
|
export { default as OrderChange } from "./order-change";
|
7
12
|
export { default as OrderChangeAction } from "./order-change-action";
|
8
13
|
export { default as OrderItem } from "./order-item";
|
9
|
-
export { default as
|
14
|
+
export { default as OrderShipping } from "./order-shipping-method";
|
10
15
|
export { default as OrderSummary } from "./order-summary";
|
11
|
-
export { default as
|
12
|
-
export { default as
|
13
|
-
export { default as
|
14
|
-
export { default as
|
16
|
+
export { default as Return } from "./return";
|
17
|
+
export { default as ReturnItem } from "./return-item";
|
18
|
+
export { default as ReturnReason } from "./return-reason";
|
19
|
+
export { default as OrderShippingMethod } from "./shipping-method";
|
20
|
+
export { default as OrderShippingMethodAdjustment } from "./shipping-method-adjustment";
|
21
|
+
export { default as OrderShippingMethodTaxLine } from "./shipping-method-tax-line";
|
22
|
+
export { default as OrderTransaction } from "./transaction";
|
23
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,WAAW,CAAA;AACnD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,SAAS,CAAA;AAC/C,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AACnE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,YAAY,CAAA;AACrD,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAC9D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,aAAa,CAAA;AACtD,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,wBAAwB,CAAA;AAC3E,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AACtE,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAA;AAC1C,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACvD,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AACpE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,cAAc,CAAA;AACnD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAClE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,iBAAiB,CAAA;AACzD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAA;AAC5C,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,eAAe,CAAA;AACrD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,iBAAiB,CAAA;AACzD,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAClE,OAAO,EAAE,OAAO,IAAI,6BAA6B,EAAE,MAAM,8BAA8B,CAAA;AACvF,OAAO,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,4BAA4B,CAAA;AAClF,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,eAAe,CAAA"}
|
package/dist/models/index.js
CHANGED
@@ -3,15 +3,25 @@ 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.
|
6
|
+
exports.OrderTransaction = exports.OrderShippingMethodTaxLine = exports.OrderShippingMethodAdjustment = exports.OrderShippingMethod = exports.ReturnReason = exports.ReturnItem = exports.Return = exports.OrderSummary = exports.OrderShipping = exports.OrderItem = exports.OrderChangeAction = exports.OrderChange = exports.Order = exports.OrderLineItemTaxLine = exports.OrderLineItemAdjustment = exports.OrderLineItem = exports.OrderExchangeItem = exports.OrderExchange = exports.OrderClaimItemImage = exports.OrderClaimItem = exports.OrderClaim = exports.OrderAddress = void 0;
|
7
7
|
var address_1 = require("./address");
|
8
|
-
Object.defineProperty(exports, "
|
8
|
+
Object.defineProperty(exports, "OrderAddress", { 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, "OrderClaimItem", { enumerable: true, get: function () { return __importDefault(claim_item_1).default; } });
|
13
|
+
var claim_item_image_1 = require("./claim-item-image");
|
14
|
+
Object.defineProperty(exports, "OrderClaimItemImage", { 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, "OrderExchangeItem", { enumerable: true, get: function () { return __importDefault(exchange_item_1).default; } });
|
9
19
|
var line_item_1 = require("./line-item");
|
10
|
-
Object.defineProperty(exports, "
|
20
|
+
Object.defineProperty(exports, "OrderLineItem", { enumerable: true, get: function () { return __importDefault(line_item_1).default; } });
|
11
21
|
var line_item_adjustment_1 = require("./line-item-adjustment");
|
12
|
-
Object.defineProperty(exports, "
|
22
|
+
Object.defineProperty(exports, "OrderLineItemAdjustment", { enumerable: true, get: function () { return __importDefault(line_item_adjustment_1).default; } });
|
13
23
|
var line_item_tax_line_1 = require("./line-item-tax-line");
|
14
|
-
Object.defineProperty(exports, "
|
24
|
+
Object.defineProperty(exports, "OrderLineItemTaxLine", { enumerable: true, get: function () { return __importDefault(line_item_tax_line_1).default; } });
|
15
25
|
var order_1 = require("./order");
|
16
26
|
Object.defineProperty(exports, "Order", { enumerable: true, get: function () { return __importDefault(order_1).default; } });
|
17
27
|
var order_change_1 = require("./order-change");
|
@@ -21,15 +31,21 @@ Object.defineProperty(exports, "OrderChangeAction", { enumerable: true, get: fun
|
|
21
31
|
var order_item_1 = require("./order-item");
|
22
32
|
Object.defineProperty(exports, "OrderItem", { enumerable: true, get: function () { return __importDefault(order_item_1).default; } });
|
23
33
|
var order_shipping_method_1 = require("./order-shipping-method");
|
24
|
-
Object.defineProperty(exports, "
|
34
|
+
Object.defineProperty(exports, "OrderShipping", { enumerable: true, get: function () { return __importDefault(order_shipping_method_1).default; } });
|
25
35
|
var order_summary_1 = require("./order-summary");
|
26
36
|
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; } });
|
27
43
|
var shipping_method_1 = require("./shipping-method");
|
28
|
-
Object.defineProperty(exports, "
|
44
|
+
Object.defineProperty(exports, "OrderShippingMethod", { enumerable: true, get: function () { return __importDefault(shipping_method_1).default; } });
|
29
45
|
var shipping_method_adjustment_1 = require("./shipping-method-adjustment");
|
30
|
-
Object.defineProperty(exports, "
|
46
|
+
Object.defineProperty(exports, "OrderShippingMethodAdjustment", { enumerable: true, get: function () { return __importDefault(shipping_method_adjustment_1).default; } });
|
31
47
|
var shipping_method_tax_line_1 = require("./shipping-method-tax-line");
|
32
|
-
Object.defineProperty(exports, "
|
48
|
+
Object.defineProperty(exports, "OrderShippingMethodTaxLine", { enumerable: true, get: function () { return __importDefault(shipping_method_tax_line_1).default; } });
|
33
49
|
var transaction_1 = require("./transaction");
|
34
|
-
Object.defineProperty(exports, "
|
50
|
+
Object.defineProperty(exports, "OrderTransaction", { enumerable: true, get: function () { return __importDefault(transaction_1).default; } });
|
35
51
|
//# sourceMappingURL=index.js.map
|
package/dist/models/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":";;;;;;AAAA,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":";;;;;;AAAA,qCAAmD;AAA1C,wHAAA,OAAO,OAAgB;AAChC,iCAA+C;AAAtC,oHAAA,OAAO,OAAc;AAC9B,2CAAwD;AAA/C,6HAAA,OAAO,OAAkB;AAClC,uDAAmE;AAA1D,wIAAA,OAAO,OAAuB;AACvC,uCAAqD;AAA5C,0HAAA,OAAO,OAAiB;AACjC,iDAA8D;AAArD,mIAAA,OAAO,OAAqB;AACrC,yCAAsD;AAA7C,2HAAA,OAAO,OAAiB;AACjC,+DAA2E;AAAlE,gJAAA,OAAO,OAA2B;AAC3C,2DAAsE;AAA7D,2IAAA,OAAO,OAAwB;AACxC,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,iEAAkE;AAAzD,uIAAA,OAAO,OAAiB;AACjC,iDAAyD;AAAhD,8HAAA,OAAO,OAAgB;AAChC,mCAA4C;AAAnC,iHAAA,OAAO,OAAU;AAC1B,6CAAqD;AAA5C,0HAAA,OAAO,OAAc;AAC9B,iDAAyD;AAAhD,8HAAA,OAAO,OAAgB;AAChC,qDAAkE;AAAzD,uIAAA,OAAO,OAAuB;AACvC,2EAAuF;AAA9E,4JAAA,OAAO,OAAiC;AACjD,uEAAkF;AAAzE,uJAAA,OAAO,OAA8B;AAC9C,6CAA2D;AAAlD,gIAAA,OAAO,OAAoB"}
|
@@ -1,8 +1,10 @@
|
|
1
|
+
import { Rel } from "@mikro-orm/core";
|
1
2
|
import AdjustmentLine from "./adjustment-line";
|
2
|
-
import
|
3
|
-
export default class
|
4
|
-
item:
|
3
|
+
import OrderLineItem from "./line-item";
|
4
|
+
export default class OrderLineItemAdjustment extends AdjustmentLine {
|
5
|
+
item: Rel<OrderLineItem>;
|
5
6
|
item_id: string;
|
6
7
|
onCreate(): void;
|
7
8
|
onInit(): void;
|
8
9
|
}
|
10
|
+
//# sourceMappingURL=line-item-adjustment.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"line-item-adjustment.d.ts","sourceRoot":"","sources":["../../src/models/line-item-adjustment.ts"],"names":[],"mappings":"AAIA,OAAO,EAA2C,GAAG,EAAE,MAAM,iBAAiB,CAAA;AAC9E,OAAO,cAAc,MAAM,mBAAmB,CAAA;AAC9C,OAAO,aAAa,MAAM,aAAa,CAAA;AAQvC,MAAM,CAAC,OAAO,OAAO,uBAAwB,SAAQ,cAAc;IAIjE,IAAI,EAAE,GAAG,CAAC,aAAa,CAAC,CAAA;IAUxB,OAAO,EAAE,MAAM,CAAA;IAGf,QAAQ;IAMR,MAAM;CAIP"}
|
@@ -12,7 +12,7 @@ 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
17
|
const adjustment_line_1 = __importDefault(require("./adjustment-line"));
|
18
18
|
const line_item_1 = __importDefault(require("./line-item"));
|
@@ -20,22 +20,22 @@ const ItemIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
|
20
20
|
tableName: "order_line_item_adjustment",
|
21
21
|
columns: "item_id",
|
22
22
|
});
|
23
|
-
let
|
23
|
+
let OrderLineItemAdjustment = class OrderLineItemAdjustment extends adjustment_line_1.default {
|
24
24
|
onCreate() {
|
25
25
|
this.id = (0, utils_1.generateEntityId)(this.id, "ordliadj");
|
26
|
-
this.item_id
|
26
|
+
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
|
30
|
+
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",
|
38
|
-
],
|
37
|
+
__metadata("design:type", Object)
|
38
|
+
], OrderLineItemAdjustment.prototype, "item", void 0);
|
39
39
|
__decorate([
|
40
40
|
(0, core_1.ManyToOne)({
|
41
41
|
entity: () => line_item_1.default,
|
@@ -46,21 +46,21 @@ __decorate([
|
|
46
46
|
}),
|
47
47
|
ItemIdIndex.MikroORMIndex(),
|
48
48
|
__metadata("design:type", String)
|
49
|
-
],
|
49
|
+
], OrderLineItemAdjustment.prototype, "item_id", void 0);
|
50
50
|
__decorate([
|
51
51
|
(0, core_1.BeforeCreate)(),
|
52
52
|
__metadata("design:type", Function),
|
53
53
|
__metadata("design:paramtypes", []),
|
54
54
|
__metadata("design:returntype", void 0)
|
55
|
-
],
|
55
|
+
], OrderLineItemAdjustment.prototype, "onCreate", null);
|
56
56
|
__decorate([
|
57
57
|
(0, core_1.OnInit)(),
|
58
58
|
__metadata("design:type", Function),
|
59
59
|
__metadata("design:paramtypes", []),
|
60
60
|
__metadata("design:returntype", void 0)
|
61
|
-
],
|
62
|
-
|
61
|
+
], OrderLineItemAdjustment.prototype, "onInit", null);
|
62
|
+
OrderLineItemAdjustment = __decorate([
|
63
63
|
(0, core_1.Entity)({ tableName: "order_line_item_adjustment" })
|
64
|
-
],
|
65
|
-
exports.default =
|
64
|
+
], OrderLineItemAdjustment);
|
65
|
+
exports.default = OrderLineItemAdjustment;
|
66
66
|
//# sourceMappingURL=line-item-adjustment.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"line-item-adjustment.js","sourceRoot":"","sources":["../../src/models/line-item-adjustment.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,
|
1
|
+
{"version":3,"file":"line-item-adjustment.js","sourceRoot":"","sources":["../../src/models/line-item-adjustment.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qDAGkC;AAClC,0CAA8E;AAC9E,wEAA8C;AAC9C,4DAAuC;AAEvC,MAAM,WAAW,GAAG,IAAA,sCAA8B,EAAC;IACjD,SAAS,EAAE,4BAA4B;IACvC,OAAO,EAAE,SAAS;CACnB,CAAC,CAAA;AAGa,IAAM,uBAAuB,GAA7B,MAAM,uBAAwB,SAAQ,yBAAc;IAiBjE,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,mBAAa,EAAE;QAC9B,OAAO,EAAE,KAAK;KACf,CAAC;;qDACsB;AAUxB;IARC,IAAA,gBAAS,EAAC;QACT,MAAM,EAAE,GAAG,EAAE,CAAC,mBAAa;QAC3B,UAAU,EAAE,MAAM;QAClB,SAAS,EAAE,SAAS;QACpB,QAAQ,EAAE,SAAS;QACnB,OAAO,EAAE,IAAI;KACd,CAAC;IACD,WAAW,CAAC,aAAa,EAAE;;wDACb;AAGf;IADC,IAAA,mBAAY,GAAE;;;;uDAId;AAGD;IADC,IAAA,aAAM,GAAE;;;;qDAIR;AA1BkB,uBAAuB;IAD3C,IAAA,aAAM,EAAC,EAAE,SAAS,EAAE,4BAA4B,EAAE,CAAC;GAC/B,uBAAuB,CA2B3C;kBA3BoB,uBAAuB"}
|
@@ -1,8 +1,10 @@
|
|
1
|
-
import
|
1
|
+
import { Rel } from "@mikro-orm/core";
|
2
|
+
import OrderLineItem from "./line-item";
|
2
3
|
import TaxLine from "./tax-line";
|
3
|
-
export default class
|
4
|
-
item:
|
4
|
+
export default class OrderLineItemTaxLine extends TaxLine {
|
5
|
+
item: Rel<OrderLineItem>;
|
5
6
|
item_id: string;
|
6
7
|
onCreate(): void;
|
7
8
|
onInit(): void;
|
8
9
|
}
|
10
|
+
//# sourceMappingURL=line-item-tax-line.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"line-item-tax-line.d.ts","sourceRoot":"","sources":["../../src/models/line-item-tax-line.ts"],"names":[],"mappings":"AAIA,OAAO,EAML,GAAG,EACJ,MAAM,iBAAiB,CAAA;AACxB,OAAO,aAAa,MAAM,aAAa,CAAA;AACvC,OAAO,OAAO,MAAM,YAAY,CAAA;AAQhC,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,OAAO;IAKvD,IAAI,EAAE,GAAG,CAAC,aAAa,CAAC,CAAA;IAUxB,OAAO,EAAE,MAAM,CAAA;IAGf,QAAQ;IAMR,MAAM;CAIP"}
|
@@ -12,7 +12,7 @@ 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
17
|
const line_item_1 = __importDefault(require("./line-item"));
|
18
18
|
const tax_line_1 = __importDefault(require("./tax-line"));
|
@@ -20,14 +20,14 @@ const ItemIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
|
20
20
|
tableName: "order_line_item_tax_line",
|
21
21
|
columns: "item_id",
|
22
22
|
});
|
23
|
-
let
|
23
|
+
let OrderLineItemTaxLine = class OrderLineItemTaxLine extends tax_line_1.default {
|
24
24
|
onCreate() {
|
25
25
|
this.id = (0, utils_1.generateEntityId)(this.id, "ordlitxl");
|
26
|
-
this.item_id
|
26
|
+
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
|
30
|
+
this.item_id ??= this.item?.id;
|
31
31
|
}
|
32
32
|
};
|
33
33
|
__decorate([
|
@@ -35,8 +35,8 @@ __decorate([
|
|
35
35
|
fieldName: "item_id",
|
36
36
|
persist: false,
|
37
37
|
}),
|
38
|
-
__metadata("design:type",
|
39
|
-
],
|
38
|
+
__metadata("design:type", Object)
|
39
|
+
], OrderLineItemTaxLine.prototype, "item", void 0);
|
40
40
|
__decorate([
|
41
41
|
(0, core_1.ManyToOne)({
|
42
42
|
entity: () => line_item_1.default,
|
@@ -47,21 +47,21 @@ __decorate([
|
|
47
47
|
}),
|
48
48
|
ItemIdIndex.MikroORMIndex(),
|
49
49
|
__metadata("design:type", String)
|
50
|
-
],
|
50
|
+
], OrderLineItemTaxLine.prototype, "item_id", void 0);
|
51
51
|
__decorate([
|
52
52
|
(0, core_1.BeforeCreate)(),
|
53
53
|
__metadata("design:type", Function),
|
54
54
|
__metadata("design:paramtypes", []),
|
55
55
|
__metadata("design:returntype", void 0)
|
56
|
-
],
|
56
|
+
], OrderLineItemTaxLine.prototype, "onCreate", null);
|
57
57
|
__decorate([
|
58
58
|
(0, core_1.OnInit)(),
|
59
59
|
__metadata("design:type", Function),
|
60
60
|
__metadata("design:paramtypes", []),
|
61
61
|
__metadata("design:returntype", void 0)
|
62
|
-
],
|
63
|
-
|
62
|
+
], OrderLineItemTaxLine.prototype, "onInit", null);
|
63
|
+
OrderLineItemTaxLine = __decorate([
|
64
64
|
(0, core_1.Entity)({ tableName: "order_line_item_tax_line" })
|
65
|
-
],
|
66
|
-
exports.default =
|
65
|
+
], OrderLineItemTaxLine);
|
66
|
+
exports.default = OrderLineItemTaxLine;
|
67
67
|
//# sourceMappingURL=line-item-tax-line.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"line-item-tax-line.js","sourceRoot":"","sources":["../../src/models/line-item-tax-line.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,
|
1
|
+
{"version":3,"file":"line-item-tax-line.js","sourceRoot":"","sources":["../../src/models/line-item-tax-line.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qDAGkC;AAClC,0CAOwB;AACxB,4DAAuC;AACvC,0DAAgC;AAEhC,MAAM,WAAW,GAAG,IAAA,sCAA8B,EAAC;IACjD,SAAS,EAAE,0BAA0B;IACrC,OAAO,EAAE,SAAS;CACnB,CAAC,CAAA;AAGa,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,kBAAO;IAkBvD,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;IAJC,IAAA,gBAAS,EAAC,GAAG,EAAE,CAAC,mBAAa,EAAE;QAC9B,SAAS,EAAE,SAAS;QACpB,OAAO,EAAE,KAAK;KACf,CAAC;;kDACsB;AAUxB;IARC,IAAA,gBAAS,EAAC;QACT,MAAM,EAAE,GAAG,EAAE,CAAC,mBAAa;QAC3B,UAAU,EAAE,MAAM;QAClB,SAAS,EAAE,SAAS;QACpB,OAAO,EAAE,CAAC,cAAO,CAAC,OAAO,EAAE,cAAO,CAAC,MAAM,CAAC;QAC1C,OAAO,EAAE,IAAI;KACd,CAAC;IACD,WAAW,CAAC,aAAa,EAAE;;qDACb;AAGf;IADC,IAAA,mBAAY,GAAE;;;;oDAId;AAGD;IADC,IAAA,aAAM,GAAE;;;;kDAIR;AA3BkB,oBAAoB;IADxC,IAAA,aAAM,EAAC,EAAE,SAAS,EAAE,0BAA0B,EAAE,CAAC;GAC7B,oBAAoB,CA4BxC;kBA5BoB,oBAAoB"}
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import { BigNumberRawValue, DAL } from "@medusajs/types";
|
2
|
-
import { BigNumber } from "@medusajs/utils";
|
1
|
+
import { BigNumberRawValue, DAL } from "@medusajs/framework/types";
|
2
|
+
import { BigNumber } from "@medusajs/framework/utils";
|
3
3
|
import { Collection, OptionalProps } from "@mikro-orm/core";
|
4
|
-
import
|
5
|
-
import
|
6
|
-
type OptionalLineItemProps =
|
7
|
-
export default class
|
4
|
+
import OrderLineItemAdjustment from "./line-item-adjustment";
|
5
|
+
import OrderLineItemTaxLine from "./line-item-tax-line";
|
6
|
+
type OptionalLineItemProps = DAL.ModelDateColumns;
|
7
|
+
export default class OrderLineItem {
|
8
8
|
[OptionalProps]?: OptionalLineItemProps;
|
9
9
|
id: string;
|
10
10
|
title: string;
|
@@ -29,12 +29,15 @@ export default class LineItem {
|
|
29
29
|
raw_compare_at_unit_price: BigNumberRawValue | null;
|
30
30
|
unit_price: BigNumber | number;
|
31
31
|
raw_unit_price: BigNumberRawValue;
|
32
|
-
|
33
|
-
|
32
|
+
is_custom_price: boolean;
|
33
|
+
tax_lines: Collection<OrderLineItemTaxLine, object>;
|
34
|
+
adjustments: Collection<OrderLineItemAdjustment, object>;
|
34
35
|
metadata: Record<string, unknown> | null;
|
35
36
|
created_at: Date;
|
36
37
|
updated_at: Date;
|
38
|
+
deleted_at: Date | null;
|
37
39
|
onCreate(): void;
|
38
40
|
onInit(): void;
|
39
41
|
}
|
40
42
|
export {};
|
43
|
+
//# sourceMappingURL=line-item.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"line-item.d.ts","sourceRoot":"","sources":["../../src/models/line-item.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAA;AAClE,OAAO,EACL,SAAS,EAKV,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAGL,UAAU,EAKV,aAAa,EAId,MAAM,iBAAiB,CAAA;AACxB,OAAO,uBAAuB,MAAM,wBAAwB,CAAA;AAC5D,OAAO,oBAAoB,MAAM,sBAAsB,CAAA;AAEvD,KAAK,qBAAqB,GAAG,GAAG,CAAC,gBAAgB,CAAA;AAsBjD,MAAM,CAAC,OAAO,OAAO,aAAa;IAChC,CAAC,aAAa,CAAC,CAAC,EAAE,qBAAqB,CAAA;IAGvC,EAAE,EAAE,MAAM,CAAA;IAGV,KAAK,EAAE,MAAM,CAAA;IAGb,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAO;IAG9B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAO;IAO/B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAO;IAOhC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAO;IAGhC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAO;IAGnC,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAO;IAGzC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAO;IAGtC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAO;IAGlC,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAO;IAGxC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAO;IAGpC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAO;IAGjC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAO;IAGrC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAO;IAGnC,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAO;IAG5D,iBAAiB,EAAE,OAAO,CAAO;IAGjC,eAAe,EAAE,OAAO,CAAO;IAG/B,gBAAgB,EAAE,OAAO,CAAQ;IAKjC,qBAAqB,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,IAAI,CAAO;IAGxD,yBAAyB,EAAE,iBAAiB,GAAG,IAAI,CAAO;IAK1D,UAAU,EAAE,SAAS,GAAG,MAAM,CAAA;IAG9B,cAAc,EAAE,iBAAiB,CAAA;IAGjC,eAAe,EAAE,OAAO,CAAQ;IAKhC,SAAS,2CAAkD;IAK3D,WAAW,8CAAqD;IAGhE,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAO;IAO/C,UAAU,EAAE,IAAI,CAAA;IAQhB,UAAU,EAAE,IAAI,CAAA;IAIhB,UAAU,EAAE,IAAI,GAAG,IAAI,CAAO;IAG9B,QAAQ;IAKR,MAAM;CAGP"}
|
package/dist/models/line-item.js
CHANGED
@@ -12,19 +12,26 @@ 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
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
|
+
});
|
19
24
|
const ProductIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
20
25
|
tableName: "order_line_item",
|
21
26
|
columns: "product_id",
|
27
|
+
where: "deleted_at IS NOT NULL",
|
22
28
|
});
|
23
29
|
const VariantIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
24
30
|
tableName: "order_line_item",
|
25
31
|
columns: "variant_id",
|
32
|
+
where: "deleted_at IS NOT NULL",
|
26
33
|
});
|
27
|
-
let
|
34
|
+
let OrderLineItem = class OrderLineItem {
|
28
35
|
constructor() {
|
29
36
|
this.subtitle = null;
|
30
37
|
this.thumbnail = null;
|
@@ -45,9 +52,11 @@ let LineItem = class LineItem {
|
|
45
52
|
this.is_tax_inclusive = false;
|
46
53
|
this.compare_at_unit_price = null;
|
47
54
|
this.raw_compare_at_unit_price = null;
|
55
|
+
this.is_custom_price = false;
|
48
56
|
this.tax_lines = new core_1.Collection(this);
|
49
57
|
this.adjustments = new core_1.Collection(this);
|
50
58
|
this.metadata = null;
|
59
|
+
this.deleted_at = null;
|
51
60
|
}
|
52
61
|
onCreate() {
|
53
62
|
this.id = (0, utils_1.generateEntityId)(this.id, "ordli");
|
@@ -59,19 +68,19 @@ let LineItem = class LineItem {
|
|
59
68
|
__decorate([
|
60
69
|
(0, core_1.PrimaryKey)({ columnType: "text" }),
|
61
70
|
__metadata("design:type", String)
|
62
|
-
],
|
71
|
+
], OrderLineItem.prototype, "id", void 0);
|
63
72
|
__decorate([
|
64
73
|
(0, core_1.Property)({ columnType: "text" }),
|
65
74
|
__metadata("design:type", String)
|
66
|
-
],
|
75
|
+
], OrderLineItem.prototype, "title", void 0);
|
67
76
|
__decorate([
|
68
77
|
(0, core_1.Property)({ columnType: "text", nullable: true }),
|
69
78
|
__metadata("design:type", Object)
|
70
|
-
],
|
79
|
+
], OrderLineItem.prototype, "subtitle", void 0);
|
71
80
|
__decorate([
|
72
81
|
(0, core_1.Property)({ columnType: "text", nullable: true }),
|
73
82
|
__metadata("design:type", Object)
|
74
|
-
],
|
83
|
+
], OrderLineItem.prototype, "thumbnail", void 0);
|
75
84
|
__decorate([
|
76
85
|
(0, core_1.Property)({
|
77
86
|
columnType: "text",
|
@@ -79,7 +88,7 @@ __decorate([
|
|
79
88
|
}),
|
80
89
|
VariantIdIndex.MikroORMIndex(),
|
81
90
|
__metadata("design:type", Object)
|
82
|
-
],
|
91
|
+
], OrderLineItem.prototype, "variant_id", void 0);
|
83
92
|
__decorate([
|
84
93
|
(0, core_1.Property)({
|
85
94
|
columnType: "text",
|
@@ -87,95 +96,99 @@ __decorate([
|
|
87
96
|
}),
|
88
97
|
ProductIdIndex.MikroORMIndex(),
|
89
98
|
__metadata("design:type", Object)
|
90
|
-
],
|
99
|
+
], OrderLineItem.prototype, "product_id", void 0);
|
91
100
|
__decorate([
|
92
101
|
(0, core_1.Property)({ columnType: "text", nullable: true }),
|
93
102
|
__metadata("design:type", Object)
|
94
|
-
],
|
103
|
+
], OrderLineItem.prototype, "product_title", void 0);
|
95
104
|
__decorate([
|
96
105
|
(0, core_1.Property)({ columnType: "text", nullable: true }),
|
97
106
|
__metadata("design:type", Object)
|
98
|
-
],
|
107
|
+
], OrderLineItem.prototype, "product_description", void 0);
|
99
108
|
__decorate([
|
100
109
|
(0, core_1.Property)({ columnType: "text", nullable: true }),
|
101
110
|
__metadata("design:type", Object)
|
102
|
-
],
|
111
|
+
], OrderLineItem.prototype, "product_subtitle", void 0);
|
103
112
|
__decorate([
|
104
113
|
(0, core_1.Property)({ columnType: "text", nullable: true }),
|
105
114
|
__metadata("design:type", Object)
|
106
|
-
],
|
115
|
+
], OrderLineItem.prototype, "product_type", void 0);
|
107
116
|
__decorate([
|
108
117
|
(0, core_1.Property)({ columnType: "text", nullable: true }),
|
109
118
|
__metadata("design:type", Object)
|
110
|
-
],
|
119
|
+
], OrderLineItem.prototype, "product_collection", void 0);
|
111
120
|
__decorate([
|
112
121
|
(0, core_1.Property)({ columnType: "text", nullable: true }),
|
113
122
|
__metadata("design:type", Object)
|
114
|
-
],
|
123
|
+
], OrderLineItem.prototype, "product_handle", void 0);
|
115
124
|
__decorate([
|
116
125
|
(0, core_1.Property)({ columnType: "text", nullable: true }),
|
117
126
|
__metadata("design:type", Object)
|
118
|
-
],
|
127
|
+
], OrderLineItem.prototype, "variant_sku", void 0);
|
119
128
|
__decorate([
|
120
129
|
(0, core_1.Property)({ columnType: "text", nullable: true }),
|
121
130
|
__metadata("design:type", Object)
|
122
|
-
],
|
131
|
+
], OrderLineItem.prototype, "variant_barcode", void 0);
|
123
132
|
__decorate([
|
124
133
|
(0, core_1.Property)({ columnType: "text", nullable: true }),
|
125
134
|
__metadata("design:type", Object)
|
126
|
-
],
|
135
|
+
], OrderLineItem.prototype, "variant_title", void 0);
|
127
136
|
__decorate([
|
128
137
|
(0, core_1.Property)({ columnType: "jsonb", nullable: true }),
|
129
138
|
__metadata("design:type", Object)
|
130
|
-
],
|
139
|
+
], OrderLineItem.prototype, "variant_option_values", void 0);
|
131
140
|
__decorate([
|
132
141
|
(0, core_1.Property)({ columnType: "boolean" }),
|
133
|
-
__metadata("design:type",
|
134
|
-
],
|
142
|
+
__metadata("design:type", Boolean)
|
143
|
+
], OrderLineItem.prototype, "requires_shipping", void 0);
|
135
144
|
__decorate([
|
136
145
|
(0, core_1.Property)({ columnType: "boolean" }),
|
137
|
-
__metadata("design:type",
|
138
|
-
],
|
146
|
+
__metadata("design:type", Boolean)
|
147
|
+
], OrderLineItem.prototype, "is_discountable", void 0);
|
139
148
|
__decorate([
|
140
149
|
(0, core_1.Property)({ columnType: "boolean" }),
|
141
|
-
__metadata("design:type",
|
142
|
-
],
|
150
|
+
__metadata("design:type", Boolean)
|
151
|
+
], OrderLineItem.prototype, "is_tax_inclusive", void 0);
|
143
152
|
__decorate([
|
144
153
|
(0, utils_1.MikroOrmBigNumberProperty)({
|
145
154
|
nullable: true,
|
146
155
|
}),
|
147
156
|
__metadata("design:type", Object)
|
148
|
-
],
|
157
|
+
], OrderLineItem.prototype, "compare_at_unit_price", void 0);
|
149
158
|
__decorate([
|
150
159
|
(0, core_1.Property)({ columnType: "jsonb", nullable: true }),
|
151
160
|
__metadata("design:type", Object)
|
152
|
-
],
|
161
|
+
], OrderLineItem.prototype, "raw_compare_at_unit_price", void 0);
|
153
162
|
__decorate([
|
154
163
|
(0, utils_1.MikroOrmBigNumberProperty)({
|
155
164
|
nullable: true,
|
156
165
|
}),
|
157
166
|
__metadata("design:type", Object)
|
158
|
-
],
|
167
|
+
], OrderLineItem.prototype, "unit_price", void 0);
|
159
168
|
__decorate([
|
160
169
|
(0, core_1.Property)({ columnType: "jsonb" }),
|
161
170
|
__metadata("design:type", Object)
|
162
|
-
],
|
171
|
+
], OrderLineItem.prototype, "raw_unit_price", void 0);
|
172
|
+
__decorate([
|
173
|
+
(0, core_1.Property)({ columnType: "boolean", default: false }),
|
174
|
+
__metadata("design:type", Boolean)
|
175
|
+
], OrderLineItem.prototype, "is_custom_price", void 0);
|
163
176
|
__decorate([
|
164
177
|
(0, core_1.OneToMany)(() => line_item_tax_line_1.default, (taxLine) => taxLine.item, {
|
165
178
|
cascade: [core_1.Cascade.PERSIST, "soft-remove"],
|
166
179
|
}),
|
167
180
|
__metadata("design:type", Object)
|
168
|
-
],
|
181
|
+
], OrderLineItem.prototype, "tax_lines", void 0);
|
169
182
|
__decorate([
|
170
183
|
(0, core_1.OneToMany)(() => line_item_adjustment_1.default, (adjustment) => adjustment.item, {
|
171
184
|
cascade: [core_1.Cascade.PERSIST, "soft-remove"],
|
172
185
|
}),
|
173
186
|
__metadata("design:type", Object)
|
174
|
-
],
|
187
|
+
], OrderLineItem.prototype, "adjustments", void 0);
|
175
188
|
__decorate([
|
176
189
|
(0, core_1.Property)({ columnType: "jsonb", nullable: true }),
|
177
190
|
__metadata("design:type", Object)
|
178
|
-
],
|
191
|
+
], OrderLineItem.prototype, "metadata", void 0);
|
179
192
|
__decorate([
|
180
193
|
(0, core_1.Property)({
|
181
194
|
onCreate: () => new Date(),
|
@@ -183,7 +196,7 @@ __decorate([
|
|
183
196
|
defaultRaw: "now()",
|
184
197
|
}),
|
185
198
|
__metadata("design:type", Date)
|
186
|
-
],
|
199
|
+
], OrderLineItem.prototype, "created_at", void 0);
|
187
200
|
__decorate([
|
188
201
|
(0, core_1.Property)({
|
189
202
|
onCreate: () => new Date(),
|
@@ -192,21 +205,27 @@ __decorate([
|
|
192
205
|
defaultRaw: "now()",
|
193
206
|
}),
|
194
207
|
__metadata("design:type", Date)
|
195
|
-
],
|
208
|
+
], OrderLineItem.prototype, "updated_at", void 0);
|
209
|
+
__decorate([
|
210
|
+
(0, core_1.Property)({ columnType: "timestamptz", nullable: true }),
|
211
|
+
DeletedAtIndex.MikroORMIndex(),
|
212
|
+
__metadata("design:type", Object)
|
213
|
+
], OrderLineItem.prototype, "deleted_at", void 0);
|
196
214
|
__decorate([
|
197
215
|
(0, core_1.BeforeCreate)(),
|
198
216
|
__metadata("design:type", Function),
|
199
217
|
__metadata("design:paramtypes", []),
|
200
218
|
__metadata("design:returntype", void 0)
|
201
|
-
],
|
219
|
+
], OrderLineItem.prototype, "onCreate", null);
|
202
220
|
__decorate([
|
203
221
|
(0, core_1.OnInit)(),
|
204
222
|
__metadata("design:type", Function),
|
205
223
|
__metadata("design:paramtypes", []),
|
206
224
|
__metadata("design:returntype", void 0)
|
207
|
-
],
|
208
|
-
|
209
|
-
(0, core_1.Entity)({ tableName: "order_line_item" })
|
210
|
-
|
211
|
-
|
225
|
+
], OrderLineItem.prototype, "onInit", null);
|
226
|
+
OrderLineItem = __decorate([
|
227
|
+
(0, core_1.Entity)({ tableName: "order_line_item" }),
|
228
|
+
(0, core_1.Filter)(utils_1.DALUtils.mikroOrmSoftDeletableFilterOptions)
|
229
|
+
], OrderLineItem);
|
230
|
+
exports.default = OrderLineItem;
|
212
231
|
//# sourceMappingURL=line-item.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"line-item.js","sourceRoot":"","sources":["../../src/models/line-item.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,
|
1
|
+
{"version":3,"file":"line-item.js","sourceRoot":"","sources":["../../src/models/line-item.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,qDAMkC;AAClC,0CAYwB;AACxB,kFAA4D;AAC5D,8EAAuD;AAIvD,MAAM,cAAc,GAAG,IAAA,sCAA8B,EAAC;IACpD,SAAS,EAAE,iBAAiB;IAC5B,OAAO,EAAE,YAAY;IACrB,KAAK,EAAE,wBAAwB;CAChC,CAAC,CAAA;AAEF,MAAM,cAAc,GAAG,IAAA,sCAA8B,EAAC;IACpD,SAAS,EAAE,iBAAiB;IAC5B,OAAO,EAAE,YAAY;IACrB,KAAK,EAAE,wBAAwB;CAChC,CAAC,CAAA;AAEF,MAAM,cAAc,GAAG,IAAA,sCAA8B,EAAC;IACpD,SAAS,EAAE,iBAAiB;IAC5B,OAAO,EAAE,YAAY;IACrB,KAAK,EAAE,wBAAwB;CAChC,CAAC,CAAA;AAIa,IAAM,aAAa,GAAnB,MAAM,aAAa;IAAnB;QAUb,aAAQ,GAAkB,IAAI,CAAA;QAG9B,cAAS,GAAkB,IAAI,CAAA;QAO/B,eAAU,GAAkB,IAAI,CAAA;QAOhC,eAAU,GAAkB,IAAI,CAAA;QAGhC,kBAAa,GAAkB,IAAI,CAAA;QAGnC,wBAAmB,GAAkB,IAAI,CAAA;QAGzC,qBAAgB,GAAkB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