@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
@@ -12,33 +12,35 @@ 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 order_1 = __importDefault(require("./order"));
|
19
|
+
const tableName = "order_item";
|
19
20
|
const OrderIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
20
|
-
tableName
|
21
|
+
tableName,
|
21
22
|
columns: ["order_id"],
|
22
23
|
where: "deleted_at IS NOT NULL",
|
23
24
|
});
|
24
25
|
const OrderVersionIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
25
|
-
tableName
|
26
|
+
tableName,
|
26
27
|
columns: ["version"],
|
27
28
|
where: "deleted_at IS NOT NULL",
|
28
29
|
});
|
29
30
|
const ItemIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
30
|
-
tableName
|
31
|
+
tableName,
|
31
32
|
columns: ["item_id"],
|
32
33
|
where: "deleted_at IS NOT NULL",
|
33
34
|
});
|
34
35
|
const DeletedAtIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
35
|
-
tableName
|
36
|
+
tableName,
|
36
37
|
columns: "deleted_at",
|
37
38
|
where: "deleted_at IS NOT NULL",
|
38
39
|
});
|
39
40
|
let OrderItem = class OrderItem {
|
40
41
|
constructor() {
|
41
42
|
this.fulfilled_quantity = 0;
|
43
|
+
this.delivered_quantity = 0;
|
42
44
|
this.shipped_quantity = 0;
|
43
45
|
this.return_requested_quantity = 0;
|
44
46
|
this.return_received_quantity = 0;
|
@@ -49,15 +51,15 @@ let OrderItem = class OrderItem {
|
|
49
51
|
}
|
50
52
|
onCreate() {
|
51
53
|
this.id = (0, utils_1.generateEntityId)(this.id, "orditem");
|
52
|
-
this.order_id
|
53
|
-
this.item_id
|
54
|
-
this.version
|
54
|
+
this.order_id ??= this.order?.id;
|
55
|
+
this.item_id ??= this.item?.id;
|
56
|
+
this.version ??= this.order?.version;
|
55
57
|
}
|
56
58
|
onInit() {
|
57
59
|
this.id = (0, utils_1.generateEntityId)(this.id, "orditem");
|
58
|
-
this.order_id
|
59
|
-
this.item_id
|
60
|
-
this.version
|
60
|
+
this.order_id ??= this.order?.id;
|
61
|
+
this.item_id ??= this.item?.id;
|
62
|
+
this.version ??= this.order?.version;
|
61
63
|
}
|
62
64
|
};
|
63
65
|
__decorate([
|
@@ -74,17 +76,17 @@ __decorate([
|
|
74
76
|
OrderIdIndex.MikroORMIndex(),
|
75
77
|
__metadata("design:type", String)
|
76
78
|
], OrderItem.prototype, "order_id", void 0);
|
77
|
-
__decorate([
|
78
|
-
(0, core_1.Property)({ columnType: "integer" }),
|
79
|
-
OrderVersionIndex.MikroORMIndex(),
|
80
|
-
__metadata("design:type", Number)
|
81
|
-
], OrderItem.prototype, "version", void 0);
|
82
79
|
__decorate([
|
83
80
|
(0, core_1.ManyToOne)(() => order_1.default, {
|
84
81
|
persist: false,
|
85
82
|
}),
|
86
|
-
__metadata("design:type",
|
83
|
+
__metadata("design:type", Object)
|
87
84
|
], OrderItem.prototype, "order", void 0);
|
85
|
+
__decorate([
|
86
|
+
(0, core_1.Property)({ columnType: "integer" }),
|
87
|
+
OrderVersionIndex.MikroORMIndex(),
|
88
|
+
__metadata("design:type", Number)
|
89
|
+
], OrderItem.prototype, "version", void 0);
|
88
90
|
__decorate([
|
89
91
|
(0, core_1.ManyToOne)({
|
90
92
|
entity: () => line_item_1.default,
|
@@ -99,7 +101,7 @@ __decorate([
|
|
99
101
|
(0, core_1.ManyToOne)(() => line_item_1.default, {
|
100
102
|
persist: false,
|
101
103
|
}),
|
102
|
-
__metadata("design:type",
|
104
|
+
__metadata("design:type", Object)
|
103
105
|
], OrderItem.prototype, "item", void 0);
|
104
106
|
__decorate([
|
105
107
|
(0, utils_1.MikroOrmBigNumberProperty)(),
|
@@ -117,6 +119,14 @@ __decorate([
|
|
117
119
|
(0, core_1.Property)({ columnType: "jsonb" }),
|
118
120
|
__metadata("design:type", Object)
|
119
121
|
], OrderItem.prototype, "raw_fulfilled_quantity", void 0);
|
122
|
+
__decorate([
|
123
|
+
(0, utils_1.MikroOrmBigNumberProperty)(),
|
124
|
+
__metadata("design:type", Object)
|
125
|
+
], OrderItem.prototype, "delivered_quantity", void 0);
|
126
|
+
__decorate([
|
127
|
+
(0, core_1.Property)({ columnType: "jsonb" }),
|
128
|
+
__metadata("design:type", Object)
|
129
|
+
], OrderItem.prototype, "raw_delivered_quantity", void 0);
|
120
130
|
__decorate([
|
121
131
|
(0, utils_1.MikroOrmBigNumberProperty)(),
|
122
132
|
__metadata("design:type", Object)
|
@@ -196,7 +206,7 @@ __decorate([
|
|
196
206
|
__metadata("design:returntype", void 0)
|
197
207
|
], OrderItem.prototype, "onInit", null);
|
198
208
|
OrderItem = __decorate([
|
199
|
-
(0, core_1.Entity)({ tableName
|
209
|
+
(0, core_1.Entity)({ tableName })
|
200
210
|
], OrderItem);
|
201
211
|
exports.default = OrderItem;
|
202
212
|
//# sourceMappingURL=order-item.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"order-item.js","sourceRoot":"","sources":["../../src/models/order-item.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,
|
1
|
+
{"version":3,"file":"order-item.js","sourceRoot":"","sources":["../../src/models/order-item.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AG,EAAE,CAAC,IAAI,IAAI,EAAE;QAC1B,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE;QAC1B,UAAU,EAAE,aAAa;QACzB,UAAU,EAAE,OAAO;KACpB,CAAC;8BACU,IAAI;6CAAA;AAIhB;IAFC,IAAA,eAAQ,EAAC,EAAE,UAAU,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACvD,cAAc,CAAC,aAAa,EAAE;;6CACD;AAG9B;IADC,IAAA,mBAAY,GAAE;;;;yCAMd;AAGD;IADC,IAAA,aAAM,GAAE;;;;uCAMR;AA1HkB,SAAS;IAD7B,IAAA,aAAM,EAAC,EAAE,SAAS,EAAE,CAAC;GACD,SAAS,CA2H7B;kBA3HoB,SAAS"}
|
@@ -1,16 +1,25 @@
|
|
1
|
-
import { DAL } from "@medusajs/types";
|
2
|
-
import { OptionalProps } from "@mikro-orm/core";
|
1
|
+
import { DAL } from "@medusajs/framework/types";
|
2
|
+
import { OptionalProps, Rel } from "@mikro-orm/core";
|
3
|
+
import Claim from "./claim";
|
4
|
+
import Exchange from "./exchange";
|
3
5
|
import Order from "./order";
|
4
|
-
import
|
5
|
-
|
6
|
-
|
6
|
+
import Return from "./return";
|
7
|
+
import OrderShippingMethod from "./shipping-method";
|
8
|
+
type OptionalShippingMethodProps = DAL.ModelDateColumns;
|
9
|
+
export default class OrderShipping {
|
7
10
|
[OptionalProps]?: OptionalShippingMethodProps;
|
8
11
|
id: string;
|
9
12
|
order_id: string;
|
13
|
+
order: Rel<Order>;
|
14
|
+
return_id: string | null;
|
15
|
+
return: Rel<Return>;
|
16
|
+
exchange_id: string | null;
|
17
|
+
exchange: Rel<Exchange>;
|
18
|
+
claim_id: string | null;
|
19
|
+
claim: Rel<Claim>;
|
10
20
|
version: number;
|
11
|
-
order: Order;
|
12
21
|
shipping_method_id: string;
|
13
|
-
shipping_method:
|
22
|
+
shipping_method: Rel<OrderShippingMethod>;
|
14
23
|
created_at: Date;
|
15
24
|
updated_at: Date;
|
16
25
|
deleted_at: Date | null;
|
@@ -18,3 +27,4 @@ export default class OrderShippingMethod {
|
|
18
27
|
onInit(): void;
|
19
28
|
}
|
20
29
|
export {};
|
30
|
+
//# sourceMappingURL=order-shipping-method.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"order-shipping-method.d.ts","sourceRoot":"","sources":["../../src/models/order-shipping-method.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAA;AAK/C,OAAO,EAKL,aAAa,EAGb,GAAG,EACJ,MAAM,iBAAiB,CAAA;AACxB,OAAO,KAAK,MAAM,SAAS,CAAA;AAC3B,OAAO,QAAQ,MAAM,YAAY,CAAA;AACjC,OAAO,KAAK,MAAM,SAAS,CAAA;AAC3B,OAAO,MAAM,MAAM,UAAU,CAAA;AAC7B,OAAO,mBAAmB,MAAM,mBAAmB,CAAA;AAEnD,KAAK,2BAA2B,GAAG,GAAG,CAAC,gBAAgB,CAAA;AA8CvD,MAAM,CAAC,OAAO,OAAO,aAAa;IAChC,CAAC,aAAa,CAAC,CAAC,EAAE,2BAA2B,CAAA;IAG7C,EAAE,EAAE,MAAM,CAAA;IASV,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,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAM1B,QAAQ,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAA;IAUvB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IAMvB,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,CAAA;IAIjB,OAAO,EAAE,MAAM,CAAA;IASf,kBAAkB,EAAE,MAAM,CAAA;IAK1B,eAAe,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAA;IAOzC,UAAU,EAAE,IAAI,CAAA;IAQhB,UAAU,EAAE,IAAI,CAAA;IAIhB,UAAU,EAAE,IAAI,GAAG,IAAI,CAAO;IAG9B,QAAQ;IAWR,MAAM;CASP"}
|
@@ -12,51 +12,77 @@ 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"));
|
20
|
+
const return_1 = __importDefault(require("./return"));
|
18
21
|
const shipping_method_1 = __importDefault(require("./shipping-method"));
|
22
|
+
const tableName = "order_shipping";
|
19
23
|
const OrderIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
20
|
-
tableName
|
24
|
+
tableName,
|
21
25
|
columns: ["order_id"],
|
22
26
|
where: "deleted_at IS NOT NULL",
|
23
27
|
});
|
28
|
+
const ReturnIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
29
|
+
tableName,
|
30
|
+
columns: "return_id",
|
31
|
+
where: "return_id IS NOT NULL AND deleted_at IS NOT NULL",
|
32
|
+
});
|
33
|
+
const ExchangeIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
34
|
+
tableName,
|
35
|
+
columns: ["exchange_id"],
|
36
|
+
where: "exchange_id IS NOT NULL AND deleted_at IS NOT NULL",
|
37
|
+
});
|
38
|
+
const ClaimIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
39
|
+
tableName,
|
40
|
+
columns: ["claim_id"],
|
41
|
+
where: "claim_id IS NOT NULL AND deleted_at IS NOT NULL",
|
42
|
+
});
|
24
43
|
const OrderVersionIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
25
|
-
tableName
|
44
|
+
tableName,
|
26
45
|
columns: ["version"],
|
27
46
|
where: "deleted_at IS NOT NULL",
|
28
47
|
});
|
29
48
|
const ItemIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
30
|
-
tableName
|
49
|
+
tableName,
|
31
50
|
columns: ["shipping_method_id"],
|
32
51
|
where: "deleted_at IS NOT NULL",
|
33
52
|
});
|
34
53
|
const DeletedAtIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
35
|
-
tableName
|
54
|
+
tableName,
|
36
55
|
columns: "deleted_at",
|
37
56
|
where: "deleted_at IS NOT NULL",
|
38
57
|
});
|
39
|
-
let
|
58
|
+
let OrderShipping = class OrderShipping {
|
40
59
|
constructor() {
|
60
|
+
this.return_id = null;
|
41
61
|
this.deleted_at = null;
|
42
62
|
}
|
43
63
|
onCreate() {
|
44
64
|
this.id = (0, utils_1.generateEntityId)(this.id, "ordspmv");
|
45
|
-
this.order_id
|
46
|
-
this.
|
47
|
-
this.
|
65
|
+
this.order_id ??= this.order?.id;
|
66
|
+
this.return_id ??= this.return?.id;
|
67
|
+
this.claim_id ??= this.claim?.id;
|
68
|
+
this.exchange_id ??= this.exchange?.id;
|
69
|
+
this.shipping_method_id ??= this.shipping_method?.id;
|
70
|
+
this.version ??= this.order?.version;
|
48
71
|
}
|
49
72
|
onInit() {
|
50
73
|
this.id = (0, utils_1.generateEntityId)(this.id, "ordspmv");
|
51
|
-
this.order_id
|
52
|
-
this.
|
53
|
-
this.
|
74
|
+
this.order_id ??= this.order?.id;
|
75
|
+
this.return_id ??= this.return?.id;
|
76
|
+
this.claim_id ??= this.claim?.id;
|
77
|
+
this.exchange_id ??= this.exchange?.id;
|
78
|
+
this.shipping_method_id ??= this.shipping_method?.id;
|
79
|
+
this.version ??= this.order?.version;
|
54
80
|
}
|
55
81
|
};
|
56
82
|
__decorate([
|
57
83
|
(0, core_1.PrimaryKey)({ columnType: "text" }),
|
58
84
|
__metadata("design:type", String)
|
59
|
-
],
|
85
|
+
], OrderShipping.prototype, "id", void 0);
|
60
86
|
__decorate([
|
61
87
|
(0, core_1.ManyToOne)({
|
62
88
|
entity: () => order_1.default,
|
@@ -66,18 +92,72 @@ __decorate([
|
|
66
92
|
}),
|
67
93
|
OrderIdIndex.MikroORMIndex(),
|
68
94
|
__metadata("design:type", String)
|
69
|
-
],
|
70
|
-
__decorate([
|
71
|
-
(0, core_1.Property)({ columnType: "integer" }),
|
72
|
-
OrderVersionIndex.MikroORMIndex(),
|
73
|
-
__metadata("design:type", Number)
|
74
|
-
], OrderShippingMethod.prototype, "version", void 0);
|
95
|
+
], OrderShipping.prototype, "order_id", void 0);
|
75
96
|
__decorate([
|
76
97
|
(0, core_1.ManyToOne)(() => order_1.default, {
|
77
98
|
persist: false,
|
78
99
|
}),
|
79
|
-
__metadata("design:type",
|
80
|
-
],
|
100
|
+
__metadata("design:type", Object)
|
101
|
+
], OrderShipping.prototype, "order", void 0);
|
102
|
+
__decorate([
|
103
|
+
(0, core_1.ManyToOne)({
|
104
|
+
entity: () => return_1.default,
|
105
|
+
mapToPk: true,
|
106
|
+
fieldName: "return_id",
|
107
|
+
columnType: "text",
|
108
|
+
nullable: true,
|
109
|
+
}),
|
110
|
+
ReturnIdIndex.MikroORMIndex(),
|
111
|
+
__metadata("design:type", Object)
|
112
|
+
], OrderShipping.prototype, "return_id", void 0);
|
113
|
+
__decorate([
|
114
|
+
(0, core_1.ManyToOne)(() => return_1.default, {
|
115
|
+
persist: false,
|
116
|
+
nullable: true,
|
117
|
+
}),
|
118
|
+
__metadata("design:type", Object)
|
119
|
+
], OrderShipping.prototype, "return", void 0);
|
120
|
+
__decorate([
|
121
|
+
(0, core_1.ManyToOne)({
|
122
|
+
entity: () => exchange_1.default,
|
123
|
+
mapToPk: true,
|
124
|
+
fieldName: "exchange_id",
|
125
|
+
columnType: "text",
|
126
|
+
nullable: true,
|
127
|
+
}),
|
128
|
+
ExchangeIdIndex.MikroORMIndex(),
|
129
|
+
__metadata("design:type", Object)
|
130
|
+
], OrderShipping.prototype, "exchange_id", void 0);
|
131
|
+
__decorate([
|
132
|
+
(0, core_1.ManyToOne)(() => exchange_1.default, {
|
133
|
+
persist: false,
|
134
|
+
nullable: true,
|
135
|
+
}),
|
136
|
+
__metadata("design:type", Object)
|
137
|
+
], OrderShipping.prototype, "exchange", void 0);
|
138
|
+
__decorate([
|
139
|
+
(0, core_1.ManyToOne)({
|
140
|
+
entity: () => claim_1.default,
|
141
|
+
mapToPk: true,
|
142
|
+
fieldName: "claim_id",
|
143
|
+
columnType: "text",
|
144
|
+
nullable: true,
|
145
|
+
}),
|
146
|
+
ClaimIdIndex.MikroORMIndex(),
|
147
|
+
__metadata("design:type", Object)
|
148
|
+
], OrderShipping.prototype, "claim_id", void 0);
|
149
|
+
__decorate([
|
150
|
+
(0, core_1.ManyToOne)(() => claim_1.default, {
|
151
|
+
persist: false,
|
152
|
+
nullable: true,
|
153
|
+
}),
|
154
|
+
__metadata("design:type", Object)
|
155
|
+
], OrderShipping.prototype, "claim", void 0);
|
156
|
+
__decorate([
|
157
|
+
(0, core_1.Property)({ columnType: "integer" }),
|
158
|
+
OrderVersionIndex.MikroORMIndex(),
|
159
|
+
__metadata("design:type", Number)
|
160
|
+
], OrderShipping.prototype, "version", void 0);
|
81
161
|
__decorate([
|
82
162
|
(0, core_1.ManyToOne)({
|
83
163
|
entity: () => shipping_method_1.default,
|
@@ -87,13 +167,13 @@ __decorate([
|
|
87
167
|
}),
|
88
168
|
ItemIdIndex.MikroORMIndex(),
|
89
169
|
__metadata("design:type", String)
|
90
|
-
],
|
170
|
+
], OrderShipping.prototype, "shipping_method_id", void 0);
|
91
171
|
__decorate([
|
92
172
|
(0, core_1.ManyToOne)(() => shipping_method_1.default, {
|
93
173
|
persist: false,
|
94
174
|
}),
|
95
|
-
__metadata("design:type",
|
96
|
-
],
|
175
|
+
__metadata("design:type", Object)
|
176
|
+
], OrderShipping.prototype, "shipping_method", void 0);
|
97
177
|
__decorate([
|
98
178
|
(0, core_1.Property)({
|
99
179
|
onCreate: () => new Date(),
|
@@ -101,7 +181,7 @@ __decorate([
|
|
101
181
|
defaultRaw: "now()",
|
102
182
|
}),
|
103
183
|
__metadata("design:type", Date)
|
104
|
-
],
|
184
|
+
], OrderShipping.prototype, "created_at", void 0);
|
105
185
|
__decorate([
|
106
186
|
(0, core_1.Property)({
|
107
187
|
onCreate: () => new Date(),
|
@@ -110,26 +190,26 @@ __decorate([
|
|
110
190
|
defaultRaw: "now()",
|
111
191
|
}),
|
112
192
|
__metadata("design:type", Date)
|
113
|
-
],
|
193
|
+
], OrderShipping.prototype, "updated_at", void 0);
|
114
194
|
__decorate([
|
115
195
|
(0, core_1.Property)({ columnType: "timestamptz", nullable: true }),
|
116
196
|
DeletedAtIndex.MikroORMIndex(),
|
117
197
|
__metadata("design:type", Object)
|
118
|
-
],
|
198
|
+
], OrderShipping.prototype, "deleted_at", void 0);
|
119
199
|
__decorate([
|
120
200
|
(0, core_1.BeforeCreate)(),
|
121
201
|
__metadata("design:type", Function),
|
122
202
|
__metadata("design:paramtypes", []),
|
123
203
|
__metadata("design:returntype", void 0)
|
124
|
-
],
|
204
|
+
], OrderShipping.prototype, "onCreate", null);
|
125
205
|
__decorate([
|
126
206
|
(0, core_1.OnInit)(),
|
127
207
|
__metadata("design:type", Function),
|
128
208
|
__metadata("design:paramtypes", []),
|
129
209
|
__metadata("design:returntype", void 0)
|
130
|
-
],
|
131
|
-
|
132
|
-
(0, core_1.Entity)({ tableName
|
133
|
-
],
|
134
|
-
exports.default =
|
210
|
+
], OrderShipping.prototype, "onInit", null);
|
211
|
+
OrderShipping = __decorate([
|
212
|
+
(0, core_1.Entity)({ tableName })
|
213
|
+
], OrderShipping);
|
214
|
+
exports.default = OrderShipping;
|
135
215
|
//# sourceMappingURL=order-shipping-method.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"order-shipping-method.js","sourceRoot":"","sources":["../../src/models/order-shipping-method.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,
|
1
|
+
{"version":3,"file":"order-shipping-method.js","sourceRoot":"","sources":["../../src/models/order-shipping-method.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,qDAGkC;AAClC,0CASwB;AACxB,oDAA2B;AAC3B,0DAAiC;AACjC,oDAA2B;AAC3B,sDAA6B;AAC7B,wEAAmD;AAInD,MAAM,SAAS,GAAG,gBAAgB,CAAA;AAClC,MAAM,YAAY,GAAG,IAAA,sCAA8B,EAAC;IAClD,SAAS;IACT,OAAO,EAAE,CAAC,UAAU,CAAC;IACrB,KAAK,EAAE,wBAAwB;CAChC,CAAC,CAAA;AAEF,MAAM,aAAa,GAAG,IAAA,sCAA8B,EAAC;IACnD,SAAS;IACT,OAAO,EAAE,WAAW;IACpB,KAAK,EAAE,kDAAkD;CAC1D,CAAC,CAAA;AAEF,MAAM,eAAe,GAAG,IAAA,sCAA8B,EAAC;IACrD,SAAS;IACT,OAAO,EAAE,CAAC,aAAa,CAAC;IACxB,KAAK,EAAE,oDAAoD;CAC5D,CAAC,CAAA;AAEF,MAAM,YAAY,GAAG,IAAA,sCAA8B,EAAC;IAClD,SAAS;IACT,OAAO,EAAE,CAAC,UAAU,CAAC;IACrB,KAAK,EAAE,iDAAiD;CACzD,CAAC,CAAA;AAEF,MAAM,iBAAiB,GAAG,IAAA,sCAA8B,EAAC;IACvD,SAAS;IACT,OAAO,EAAE,CAAC,SAAS,CAAC;IACpB,KAAK,EAAE,wBAAwB;CAChC,CAAC,CAAA;AAEF,MAAM,WAAW,GAAG,IAAA,sCAA8B,EAAC;IACjD,SAAS;IACT,OAAO,EAAE,CAAC,oBAAoB,CAAC;IAC/B,KAAK,EAAE,wBAAwB;CAChC,CAAC,CAAA;AAEF,MAAM,cAAc,GAAG,IAAA,sCAA8B,EAAC;IACpD,SAAS;IACT,OAAO,EAAE,YAAY;IACrB,KAAK,EAAE,wBAAwB;CAChC,CAAC,CAAA;AAGa,I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
|
@@ -1,5 +1,6 @@
|
|
1
|
-
import { BigNumber } from "@medusajs/utils";
|
2
|
-
import {
|
1
|
+
import { BigNumber } from "@medusajs/framework/utils";
|
2
|
+
import { Rel } from "@mikro-orm/core";
|
3
|
+
import Order from "./order";
|
3
4
|
type OrderSummaryTotals = {
|
4
5
|
total: BigNumber;
|
5
6
|
subtotal: BigNumber;
|
@@ -13,17 +14,14 @@ type OrderSummaryTotals = {
|
|
13
14
|
net_total: BigNumber;
|
14
15
|
net_subtotal: BigNumber;
|
15
16
|
net_total_tax: BigNumber;
|
16
|
-
future_total: BigNumber;
|
17
|
-
future_subtotal: BigNumber;
|
18
|
-
future_total_tax: BigNumber;
|
19
|
-
future_projected_total: BigNumber;
|
20
17
|
balance: BigNumber;
|
21
|
-
|
18
|
+
paid_total: BigNumber;
|
19
|
+
refunded_total: BigNumber;
|
22
20
|
};
|
23
21
|
export default class OrderSummary {
|
24
22
|
id: string;
|
25
23
|
order_id: string;
|
26
|
-
order: Order
|
24
|
+
order: Rel<Order>;
|
27
25
|
version: number;
|
28
26
|
totals: OrderSummaryTotals | null;
|
29
27
|
created_at: Date;
|
@@ -33,3 +31,4 @@ export default class OrderSummary {
|
|
33
31
|
onInit(): void;
|
34
32
|
}
|
35
33
|
export {};
|
34
|
+
//# sourceMappingURL=order-summary.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"order-summary.d.ts","sourceRoot":"","sources":["../../src/models/order-summary.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAGV,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAOL,GAAG,EACJ,MAAM,iBAAiB,CAAA;AACxB,OAAO,KAAK,MAAM,SAAS,CAAA;AAE3B,KAAK,kBAAkB,GAAG;IACxB,KAAK,EAAE,SAAS,CAAA;IAChB,QAAQ,EAAE,SAAS,CAAA;IACnB,SAAS,EAAE,SAAS,CAAA;IAEpB,aAAa,EAAE,SAAS,CAAA;IACxB,eAAe,EAAE,SAAS,CAAA;IAC1B,cAAc,EAAE,SAAS,CAAA;IACzB,oBAAoB,EAAE,SAAS,CAAA;IAC/B,eAAe,EAAE,SAAS,CAAA;IAC1B,eAAe,EAAE,SAAS,CAAA;IAE1B,SAAS,EAAE,SAAS,CAAA;IACpB,YAAY,EAAE,SAAS,CAAA;IACvB,aAAa,EAAE,SAAS,CAAA;IAExB,OAAO,EAAE,SAAS,CAAA;IAElB,UAAU,EAAE,SAAS,CAAA;IACrB,cAAc,EAAE,SAAS,CAAA;CAC1B,CAAA;AAkBD,MAAM,CAAC,OAAO,OAAO,YAAY;IAE/B,EAAE,EAAE,MAAM,CAAA;IASV,QAAQ,EAAE,MAAM,CAAA;IAKhB,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,CAAA;IAMjB,OAAO,EAAE,MAAM,CAAI;IAGnB,MAAM,EAAE,kBAAkB,GAAG,IAAI,CAA2B;IAO5D,UAAU,EAAE,IAAI,CAAA;IAQhB,UAAU,EAAE,IAAI,CAAA;IAIhB,UAAU,EAAE,IAAI,GAAG,IAAI,CAAO;IAG9B,QAAQ;IAMR,MAAM;CAIP"}
|
@@ -8,17 +8,21 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
8
8
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
10
10
|
};
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
13
|
+
};
|
11
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
const utils_1 = require("@medusajs/utils");
|
15
|
+
const utils_1 = require("@medusajs/framework/utils");
|
13
16
|
const core_1 = require("@mikro-orm/core");
|
14
|
-
const
|
17
|
+
const order_1 = __importDefault(require("./order"));
|
18
|
+
const tableName = "order_summary";
|
15
19
|
const OrderIdVersionIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
16
|
-
tableName
|
20
|
+
tableName,
|
17
21
|
columns: ["order_id", "version"],
|
18
22
|
where: "deleted_at IS NOT NULL",
|
19
23
|
});
|
20
24
|
const DeletedAtIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
21
|
-
tableName
|
25
|
+
tableName,
|
22
26
|
columns: "deleted_at",
|
23
27
|
where: "deleted_at IS NOT NULL",
|
24
28
|
});
|
@@ -30,11 +34,11 @@ let OrderSummary = class OrderSummary {
|
|
30
34
|
}
|
31
35
|
onCreate() {
|
32
36
|
this.id = (0, utils_1.generateEntityId)(this.id, "ordsum");
|
33
|
-
this.order_id
|
37
|
+
this.order_id ??= this.order?.id;
|
34
38
|
}
|
35
39
|
onInit() {
|
36
40
|
this.id = (0, utils_1.generateEntityId)(this.id, "ordsum");
|
37
|
-
this.order_id
|
41
|
+
this.order_id ??= this.order?.id;
|
38
42
|
}
|
39
43
|
};
|
40
44
|
__decorate([
|
@@ -43,7 +47,7 @@ __decorate([
|
|
43
47
|
], OrderSummary.prototype, "id", void 0);
|
44
48
|
__decorate([
|
45
49
|
(0, core_1.ManyToOne)({
|
46
|
-
entity: () =>
|
50
|
+
entity: () => order_1.default,
|
47
51
|
columnType: "text",
|
48
52
|
fieldName: "order_id",
|
49
53
|
mapToPk: true,
|
@@ -52,10 +56,10 @@ __decorate([
|
|
52
56
|
__metadata("design:type", String)
|
53
57
|
], OrderSummary.prototype, "order_id", void 0);
|
54
58
|
__decorate([
|
55
|
-
(0, core_1.ManyToOne)(() =>
|
59
|
+
(0, core_1.ManyToOne)(() => order_1.default, {
|
56
60
|
persist: false,
|
57
61
|
}),
|
58
|
-
__metadata("design:type",
|
62
|
+
__metadata("design:type", Object)
|
59
63
|
], OrderSummary.prototype, "order", void 0);
|
60
64
|
__decorate([
|
61
65
|
(0, core_1.Property)({
|
@@ -103,7 +107,7 @@ __decorate([
|
|
103
107
|
__metadata("design:returntype", void 0)
|
104
108
|
], OrderSummary.prototype, "onInit", null);
|
105
109
|
OrderSummary = __decorate([
|
106
|
-
(0, core_1.Entity)({ tableName
|
110
|
+
(0, core_1.Entity)({ tableName }),
|
107
111
|
OrderIdVersionIndex.MikroORMIndex()
|
108
112
|
], OrderSummary);
|
109
113
|
exports.default = OrderSummary;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"order-summary.js","sourceRoot":"","sources":["../../src/models/order-summary.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"order-summary.js","sourceRoot":"","sources":["../../src/models/order-summary.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qDAIkC;AAClC,0CAQwB;AACxB,oDAA2B;AAwB3B,MAAM,SAAS,GAAG,eAAe,CAAA;AAEjC,MAAM,mBAAmB,GAAG,IAAA,sCAA8B,EAAC;IACzD,SAAS;IACT,OAAO,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC;IAChC,KAAK,EAAE,wBAAwB;CAChC,CAAC,CAAA;AAEF,MAAM,cAAc,GAAG,IAAA,sCAA8B,EAAC;IACpD,SAAS;IACT,OAAO,EAAE,YAAY;IACrB,KAAK,EAAE,wBAAwB;CAChC,CAAC,CAAA;AAIa,IAAM,YAAY,GAAlB,MAAM,YAAY;IAAlB;QAsBb,YAAO,GAAW,CAAC,CAAA;QAGnB,WAAM,GAA8B,EAAwB,CAAA;QAmB5D,eAAU,GAAgB,IAAI,CAAA;IAahC,CAAC;IAVC,QAAQ;QACN,IAAI,CAAC,EAAE,GAAG,IAAA,wBAAgB,EAAC,IAAI,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAA;QAC7C,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,KAAK,EAAE,EAAE,CAAA;IAClC,CAAC;IAGD,MAAM;QACJ,IAAI,CAAC,EAAE,GAAG,IAAA,wBAAgB,EAAC,IAAI,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAA;QAC7C,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,KAAK,EAAE,EAAE,CAAA;IAClC,CAAC;C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CAAC,aAAa,EAAE;GACf,YAAY,CAyDhC;kBAzDoB,YAAY"}
|
package/dist/models/order.d.ts
CHANGED
@@ -1,15 +1,16 @@
|
|
1
|
-
import { DAL } from "@medusajs/types";
|
2
|
-
import { OrderStatus } from "@medusajs/utils";
|
3
|
-
import { Collection, OptionalProps } from "@mikro-orm/core";
|
4
|
-
import
|
1
|
+
import { DAL } from "@medusajs/framework/types";
|
2
|
+
import { OrderStatus } from "@medusajs/framework/utils";
|
3
|
+
import { Collection, OptionalProps, Rel } from "@mikro-orm/core";
|
4
|
+
import OrderAddress from "./address";
|
5
5
|
import OrderItem from "./order-item";
|
6
|
-
import
|
6
|
+
import OrderShipping from "./order-shipping-method";
|
7
7
|
import OrderSummary from "./order-summary";
|
8
|
-
import
|
9
|
-
type OptionalOrderProps = "shipping_address" | "billing_address" | DAL.
|
8
|
+
import OrderTransaction from "./transaction";
|
9
|
+
type OptionalOrderProps = "shipping_address" | "billing_address" | DAL.ModelDateColumns;
|
10
10
|
export default class Order {
|
11
11
|
[OptionalProps]?: OptionalOrderProps;
|
12
12
|
id: string;
|
13
|
+
display_id: number;
|
13
14
|
region_id: string | null;
|
14
15
|
customer_id: string | null;
|
15
16
|
version: number;
|
@@ -19,15 +20,15 @@ export default class Order {
|
|
19
20
|
email: string | null;
|
20
21
|
currency_code: string;
|
21
22
|
shipping_address_id?: string | null;
|
22
|
-
shipping_address?:
|
23
|
+
shipping_address?: Rel<OrderAddress> | null;
|
23
24
|
billing_address_id?: string | null;
|
24
|
-
billing_address?:
|
25
|
+
billing_address?: Rel<OrderAddress> | null;
|
25
26
|
no_notification: boolean | null;
|
26
27
|
summary: Collection<OrderSummary, object>;
|
27
28
|
metadata: Record<string, unknown> | null;
|
28
29
|
items: Collection<OrderItem, object>;
|
29
|
-
shipping_methods: Collection<
|
30
|
-
transactions: Collection<
|
30
|
+
shipping_methods: Collection<OrderShipping, object>;
|
31
|
+
transactions: Collection<OrderTransaction, object>;
|
31
32
|
created_at: Date;
|
32
33
|
updated_at: Date;
|
33
34
|
deleted_at: Date | null;
|
@@ -36,3 +37,4 @@ export default class Order {
|
|
36
37
|
onInit(): void;
|
37
38
|
}
|
38
39
|
export {};
|
40
|
+
//# sourceMappingURL=order.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"order.d.ts","sourceRoot":"","sources":["../../src/models/order.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAA;AAC/C,OAAO,EACL,WAAW,EAGZ,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAGL,UAAU,EAMV,aAAa,EAGb,GAAG,EACJ,MAAM,iBAAiB,CAAA;AACxB,OAAO,YAAY,MAAM,WAAW,CAAA;AACpC,OAAO,SAAS,MAAM,cAAc,CAAA;AACpC,OAAO,aAAa,MAAM,yBAAyB,CAAA;AACnD,OAAO,YAAY,MAAM,iBAAiB,CAAA;AAC1C,OAAO,gBAAgB,MAAM,eAAe,CAAA;AAE5C,KAAK,kBAAkB,GACnB,kBAAkB,GAClB,iBAAiB,GACjB,GAAG,CAAC,gBAAgB,CAAA;AAyDxB,MAAM,CAAC,OAAO,OAAO,KAAK;IACxB,CAAC,aAAa,CAAC,CAAC,EAAE,kBAAkB,CAAA;IAGpC,EAAE,EAAE,MAAM,CAAA;IAIV,UAAU,EAAE,MAAM,CAAA;IAOlB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAO;IAO/B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAO;IAMjC,OAAO,EAAE,MAAM,CAAI;IAOnB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAO;IAGtC,MAAM,EAAE,WAAW,CAAA;IAMnB,cAAc,EAAE,OAAO,CAAQ;IAG/B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAO;IAI3B,aAAa,EAAE,MAAM,CAAA;IAIrB,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAQnC,gBAAgB,CAAC,EAAE,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