@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
package/dist/models/order.js
CHANGED
@@ -12,13 +12,18 @@ 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 address_1 = __importDefault(require("./address"));
|
18
18
|
const order_item_1 = __importDefault(require("./order-item"));
|
19
19
|
const order_shipping_method_1 = __importDefault(require("./order-shipping-method"));
|
20
20
|
const order_summary_1 = __importDefault(require("./order-summary"));
|
21
21
|
const transaction_1 = __importDefault(require("./transaction"));
|
22
|
+
const DisplayIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
23
|
+
tableName: "order",
|
24
|
+
columns: "display_id",
|
25
|
+
where: "deleted_at IS NOT NULL",
|
26
|
+
});
|
22
27
|
const RegionIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
23
28
|
tableName: "order",
|
24
29
|
columns: "region_id",
|
@@ -87,6 +92,11 @@ __decorate([
|
|
87
92
|
(0, core_1.PrimaryKey)({ columnType: "text" }),
|
88
93
|
__metadata("design:type", String)
|
89
94
|
], Order.prototype, "id", void 0);
|
95
|
+
__decorate([
|
96
|
+
(0, core_1.Property)({ autoincrement: true, primary: false }),
|
97
|
+
DisplayIdIndex.MikroORMIndex(),
|
98
|
+
__metadata("design:type", Number)
|
99
|
+
], Order.prototype, "display_id", void 0);
|
90
100
|
__decorate([
|
91
101
|
(0, core_1.Property)({
|
92
102
|
columnType: "text",
|
@@ -127,7 +137,7 @@ __decorate([
|
|
127
137
|
columnType: "boolean",
|
128
138
|
}),
|
129
139
|
IsDraftOrderIndex.MikroORMIndex(),
|
130
|
-
__metadata("design:type",
|
140
|
+
__metadata("design:type", Boolean)
|
131
141
|
], Order.prototype, "is_draft_order", void 0);
|
132
142
|
__decorate([
|
133
143
|
(0, core_1.Property)({ columnType: "text", nullable: true }),
|
package/dist/models/order.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"order.js","sourceRoot":"","sources":["../../src/models/order.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,
|
1
|
+
{"version":3,"file":"order.js","sourceRoot":"","sources":["../../src/models/order.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,qDAIkC;AAClC,0CAawB;AACxB,wDAAoC;AACpC,8DAAoC;AACpC,oFAAmD;AACnD,oEAA0C;AAC1C,gEAA4C;AAO5C,MAAM,cAAc,GAAG,IAAA,sCAA8B,EAAC;IACpD,SAAS,EAAE,OAAO;IAClB,OAAO,EAAE,YAAY;IACrB,KAAK,EAAE,wBAAwB;CAChC,CAAC,CAAA;AAEF,MAAM,aAAa,GAAG,IAAA,sCAA8B,EAAC;IACnD,SAAS,EAAE,OAAO;IAClB,OAAO,EAAE,WAAW;IACpB,KAAK,EAAE,wBAAwB;CAChC,CAAC,CAAA;AAEF,MAAM,eAAe,GAAG,IAAA,sCAA8B,EAAC;IACrD,SAAS,EAAE,OAAO;IAClB,OAAO,EAAE,aAAa;IACtB,KAAK,EAAE,wBAAwB;CAChC,CAAC,CAAA;AAEF,MAAM,mBAAmB,GAAG,IAAA,sCAA8B,EAAC;IACzD,SAAS,EAAE,OAAO;IAClB,OAAO,EAAE,aAAa;IACtB,KAAK,EAAE,wBAAwB;CAChC,CAAC,CAAA;AAEF,MAAM,mBAAmB,GAAG,IAA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C,IAAA,mBAAY,GAAE;;;;qCAGd;AAGD;IADC,IAAA,aAAM,GAAE;;;;mCAGR;AArIkB,KAAK;IADzB,IAAA,aAAM,EAAC,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC;GACV,KAAK,CAsIzB;kBAtIoB,KAAK"}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import { BigNumberRawValue, DAL } from "@medusajs/framework/types";
|
2
|
+
import { OptionalProps } from "@mikro-orm/core";
|
3
|
+
import OrderLineItem from "./line-item";
|
4
|
+
import Return from "./return";
|
5
|
+
import ReturnReason from "./return-reason";
|
6
|
+
type OptionalLineItemProps = DAL.ModelDateColumns;
|
7
|
+
export default class ReturnItem {
|
8
|
+
[OptionalProps]?: OptionalLineItemProps;
|
9
|
+
id: string;
|
10
|
+
reason_id: string | null;
|
11
|
+
reason: ReturnReason;
|
12
|
+
quantity: Number | number;
|
13
|
+
raw_quantity: BigNumberRawValue;
|
14
|
+
received_quantity: Number | number;
|
15
|
+
raw_received_quantity: BigNumberRawValue;
|
16
|
+
damaged_quantity: Number | number;
|
17
|
+
raw_damaged_quantity: BigNumberRawValue;
|
18
|
+
return_id: string;
|
19
|
+
return: Return;
|
20
|
+
item_id: string;
|
21
|
+
item: OrderLineItem;
|
22
|
+
note: string;
|
23
|
+
metadata: Record<string, unknown> | null;
|
24
|
+
created_at: Date;
|
25
|
+
updated_at: Date;
|
26
|
+
deleted_at: Date | null;
|
27
|
+
onCreate(): void;
|
28
|
+
onInit(): void;
|
29
|
+
}
|
30
|
+
export {};
|
31
|
+
//# sourceMappingURL=return-item.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"return-item.d.ts","sourceRoot":"","sources":["../../src/models/return-item.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAA;AAMlE,OAAO,EAKL,aAAa,EAGd,MAAM,iBAAiB,CAAA;AACxB,OAAO,aAAa,MAAM,aAAa,CAAA;AACvC,OAAO,MAAM,MAAM,UAAU,CAAA;AAC7B,OAAO,YAAY,MAAM,iBAAiB,CAAA;AAE1C,KAAK,qBAAqB,GAAG,GAAG,CAAC,gBAAgB,CAAA;AA4BjD,MAAM,CAAC,OAAO,OAAO,UAAU;IAC7B,CAAC,aAAa,CAAC,CAAC,EAAE,qBAAqB,CAAA;IAGvC,EAAE,EAAE,MAAM,CAAA;IASV,SAAS,EAAE,MAAM,GAAG,IAAI,CAAO;IAK/B,MAAM,EAAE,YAAY,CAAA;IAGpB,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAA;IAGzB,YAAY,EAAE,iBAAiB,CAAA;IAG/B,iBAAiB,EAAE,MAAM,GAAG,MAAM,CAAI;IAGtC,qBAAqB,EAAE,iBAAiB,CAAA;IAGxC,gBAAgB,EAAE,MAAM,GAAG,MAAM,CAAI;IAGrC,oBAAoB,EAAE,iBAAiB,CAAA;IASvC,SAAS,EAAE,MAAM,CAAA;IAKjB,MAAM,EAAE,MAAM,CAAA;IASd,OAAO,EAAE,MAAM,CAAA;IAKf,IAAI,EAAE,aAAa,CAAA;IAGnB,IAAI,EAAE,MAAM,CAAA;IAGZ,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;IAMR,MAAM;CAIP"}
|
@@ -0,0 +1,180 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
|
+
};
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
10
|
+
};
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
13
|
+
};
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
15
|
+
const utils_1 = require("@medusajs/framework/utils");
|
16
|
+
const core_1 = require("@mikro-orm/core");
|
17
|
+
const line_item_1 = __importDefault(require("./line-item"));
|
18
|
+
const return_1 = __importDefault(require("./return"));
|
19
|
+
const return_reason_1 = __importDefault(require("./return-reason"));
|
20
|
+
const tableName = "return_item";
|
21
|
+
const ReturnIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
22
|
+
tableName,
|
23
|
+
columns: "return_id",
|
24
|
+
where: "deleted_at IS NOT NULL",
|
25
|
+
});
|
26
|
+
const ReturnReasonIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
27
|
+
tableName,
|
28
|
+
columns: "reason_id",
|
29
|
+
where: "deleted_at IS NOT NULL",
|
30
|
+
});
|
31
|
+
const ItemIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
32
|
+
tableName,
|
33
|
+
columns: "item_id",
|
34
|
+
where: "deleted_at IS NOT NULL",
|
35
|
+
});
|
36
|
+
const DeletedAtIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
37
|
+
tableName,
|
38
|
+
columns: "deleted_at",
|
39
|
+
where: "deleted_at IS NOT NULL",
|
40
|
+
});
|
41
|
+
let ReturnItem = class ReturnItem {
|
42
|
+
constructor() {
|
43
|
+
this.reason_id = null;
|
44
|
+
this.received_quantity = 0;
|
45
|
+
this.damaged_quantity = 0;
|
46
|
+
this.metadata = null;
|
47
|
+
this.deleted_at = null;
|
48
|
+
}
|
49
|
+
onCreate() {
|
50
|
+
this.id = (0, utils_1.generateEntityId)(this.id, "retitem");
|
51
|
+
this.return_id ??= this.return?.id;
|
52
|
+
}
|
53
|
+
onInit() {
|
54
|
+
this.id = (0, utils_1.generateEntityId)(this.id, "retitem");
|
55
|
+
this.return_id ??= this.return?.id;
|
56
|
+
}
|
57
|
+
};
|
58
|
+
__decorate([
|
59
|
+
(0, core_1.PrimaryKey)({ columnType: "text" }),
|
60
|
+
__metadata("design:type", String)
|
61
|
+
], ReturnItem.prototype, "id", void 0);
|
62
|
+
__decorate([
|
63
|
+
(0, core_1.ManyToOne)(() => return_reason_1.default, {
|
64
|
+
columnType: "text",
|
65
|
+
fieldName: "reason_id",
|
66
|
+
mapToPk: true,
|
67
|
+
nullable: true,
|
68
|
+
}),
|
69
|
+
ReturnReasonIdIndex.MikroORMIndex(),
|
70
|
+
__metadata("design:type", Object)
|
71
|
+
], ReturnItem.prototype, "reason_id", void 0);
|
72
|
+
__decorate([
|
73
|
+
(0, core_1.ManyToOne)(() => return_reason_1.default, {
|
74
|
+
persist: false,
|
75
|
+
}),
|
76
|
+
__metadata("design:type", return_reason_1.default)
|
77
|
+
], ReturnItem.prototype, "reason", void 0);
|
78
|
+
__decorate([
|
79
|
+
(0, utils_1.MikroOrmBigNumberProperty)(),
|
80
|
+
__metadata("design:type", Number)
|
81
|
+
], ReturnItem.prototype, "quantity", void 0);
|
82
|
+
__decorate([
|
83
|
+
(0, core_1.Property)({ columnType: "jsonb" }),
|
84
|
+
__metadata("design:type", Object)
|
85
|
+
], ReturnItem.prototype, "raw_quantity", void 0);
|
86
|
+
__decorate([
|
87
|
+
(0, utils_1.MikroOrmBigNumberProperty)(),
|
88
|
+
__metadata("design:type", Number)
|
89
|
+
], ReturnItem.prototype, "received_quantity", void 0);
|
90
|
+
__decorate([
|
91
|
+
(0, core_1.Property)({ columnType: "jsonb" }),
|
92
|
+
__metadata("design:type", Object)
|
93
|
+
], ReturnItem.prototype, "raw_received_quantity", void 0);
|
94
|
+
__decorate([
|
95
|
+
(0, utils_1.MikroOrmBigNumberProperty)(),
|
96
|
+
__metadata("design:type", Number)
|
97
|
+
], ReturnItem.prototype, "damaged_quantity", void 0);
|
98
|
+
__decorate([
|
99
|
+
(0, core_1.Property)({ columnType: "jsonb" }),
|
100
|
+
__metadata("design:type", Object)
|
101
|
+
], ReturnItem.prototype, "raw_damaged_quantity", void 0);
|
102
|
+
__decorate([
|
103
|
+
(0, core_1.ManyToOne)(() => return_1.default, {
|
104
|
+
columnType: "text",
|
105
|
+
fieldName: "return_id",
|
106
|
+
mapToPk: true,
|
107
|
+
onDelete: "cascade",
|
108
|
+
}),
|
109
|
+
ReturnIdIndex.MikroORMIndex(),
|
110
|
+
__metadata("design:type", String)
|
111
|
+
], ReturnItem.prototype, "return_id", void 0);
|
112
|
+
__decorate([
|
113
|
+
(0, core_1.ManyToOne)(() => return_1.default, {
|
114
|
+
persist: false,
|
115
|
+
}),
|
116
|
+
__metadata("design:type", return_1.default)
|
117
|
+
], ReturnItem.prototype, "return", void 0);
|
118
|
+
__decorate([
|
119
|
+
(0, core_1.ManyToOne)({
|
120
|
+
entity: () => line_item_1.default,
|
121
|
+
fieldName: "item_id",
|
122
|
+
mapToPk: true,
|
123
|
+
columnType: "text",
|
124
|
+
}),
|
125
|
+
ItemIdIndex.MikroORMIndex(),
|
126
|
+
__metadata("design:type", String)
|
127
|
+
], ReturnItem.prototype, "item_id", void 0);
|
128
|
+
__decorate([
|
129
|
+
(0, core_1.ManyToOne)(() => line_item_1.default, {
|
130
|
+
persist: false,
|
131
|
+
}),
|
132
|
+
__metadata("design:type", line_item_1.default)
|
133
|
+
], ReturnItem.prototype, "item", void 0);
|
134
|
+
__decorate([
|
135
|
+
(0, core_1.Property)({ columnType: "text", nullable: true }),
|
136
|
+
__metadata("design:type", String)
|
137
|
+
], ReturnItem.prototype, "note", void 0);
|
138
|
+
__decorate([
|
139
|
+
(0, core_1.Property)({ columnType: "jsonb", nullable: true }),
|
140
|
+
__metadata("design:type", Object)
|
141
|
+
], ReturnItem.prototype, "metadata", void 0);
|
142
|
+
__decorate([
|
143
|
+
(0, core_1.Property)({
|
144
|
+
onCreate: () => new Date(),
|
145
|
+
columnType: "timestamptz",
|
146
|
+
defaultRaw: "now()",
|
147
|
+
}),
|
148
|
+
__metadata("design:type", Date)
|
149
|
+
], ReturnItem.prototype, "created_at", void 0);
|
150
|
+
__decorate([
|
151
|
+
(0, core_1.Property)({
|
152
|
+
onCreate: () => new Date(),
|
153
|
+
onUpdate: () => new Date(),
|
154
|
+
columnType: "timestamptz",
|
155
|
+
defaultRaw: "now()",
|
156
|
+
}),
|
157
|
+
__metadata("design:type", Date)
|
158
|
+
], ReturnItem.prototype, "updated_at", void 0);
|
159
|
+
__decorate([
|
160
|
+
(0, core_1.Property)({ columnType: "timestamptz", nullable: true }),
|
161
|
+
DeletedAtIndex.MikroORMIndex(),
|
162
|
+
__metadata("design:type", Object)
|
163
|
+
], ReturnItem.prototype, "deleted_at", void 0);
|
164
|
+
__decorate([
|
165
|
+
(0, core_1.BeforeCreate)(),
|
166
|
+
__metadata("design:type", Function),
|
167
|
+
__metadata("design:paramtypes", []),
|
168
|
+
__metadata("design:returntype", void 0)
|
169
|
+
], ReturnItem.prototype, "onCreate", null);
|
170
|
+
__decorate([
|
171
|
+
(0, core_1.OnInit)(),
|
172
|
+
__metadata("design:type", Function),
|
173
|
+
__metadata("design:paramtypes", []),
|
174
|
+
__metadata("design:returntype", void 0)
|
175
|
+
], ReturnItem.prototype, "onInit", null);
|
176
|
+
ReturnItem = __decorate([
|
177
|
+
(0, core_1.Entity)({ tableName })
|
178
|
+
], ReturnItem);
|
179
|
+
exports.default = ReturnItem;
|
180
|
+
//# sourceMappingURL=return-item.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"return-item.js","sourceRoot":"","sources":["../../src/models/return-item.ts"],"names":[],"mappings":";;;;;;;;;;;;;;A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M;KACnB,CAAC;IACD,WAAW,CAAC,aAAa,EAAE;;2CACb;AAKf;IAHC,IAAA,gBAAS,EAAC,GAAG,EAAE,CAAC,mBAAa,EAAE;QAC9B,OAAO,EAAE,KAAK;KACf,CAAC;8BACI,mBAAa;wCAAA;AAGnB;IADC,IAAA,eAAQ,EAAC,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wCACrC;AAGZ;IADC,IAAA,eAAQ,EAAC,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACH;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;8CAAA;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;8CAAA;AAIhB;IAFC,IAAA,eAAQ,EAAC,EAAE,UAAU,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACvD,cAAc,CAAC,aAAa,EAAE;;8CACD;AAG9B;IADC,IAAA,mBAAY,GAAE;;;;0CAId;AAGD;IADC,IAAA,aAAM,GAAE;;;;wCAIR;AArGkB,UAAU;IAD9B,IAAA,aAAM,EAAC,EAAE,SAAS,EAAE,CAAC;GACD,UAAU,CAsG9B;kBAtGoB,UAAU"}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { DAL } from "@medusajs/framework/types";
|
2
|
+
import { OptionalProps, Rel } from "@mikro-orm/core";
|
3
|
+
type OptionalOrderProps = "parent_return_reason" | DAL.ModelDateColumns;
|
4
|
+
export default class ReturnReason {
|
5
|
+
[OptionalProps]?: OptionalOrderProps;
|
6
|
+
id: string;
|
7
|
+
value: string;
|
8
|
+
label: string;
|
9
|
+
description: string | null;
|
10
|
+
parent_return_reason_id?: string | null;
|
11
|
+
parent_return_reason?: Rel<ReturnReason> | null;
|
12
|
+
Searchable: any;
|
13
|
+
return_reason_children: Rel<ReturnReason>[];
|
14
|
+
metadata: Record<string, unknown> | null;
|
15
|
+
created_at: Date;
|
16
|
+
updated_at: Date;
|
17
|
+
deleted_at: Date | null;
|
18
|
+
onCreate(): void;
|
19
|
+
onInit(): void;
|
20
|
+
}
|
21
|
+
export {};
|
22
|
+
//# sourceMappingURL=return-reason.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"return-reason.d.ts","sourceRoot":"","sources":["../../src/models/return-reason.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAA;AAO/C,OAAO,EAQL,aAAa,EAGb,GAAG,EACJ,MAAM,iBAAiB,CAAA;AAoBxB,KAAK,kBAAkB,GAAG,sBAAsB,GAAG,GAAG,CAAC,gBAAgB,CAAA;AAIvE,MAAM,CAAC,OAAO,OAAO,YAAY;IAC/B,CAAC,aAAa,CAAC,CAAC,EAAE,kBAAkB,CAAA;IAGpC,EAAE,EAAE,MAAM,CAAA;IAKV,KAAK,EAAE,MAAM,CAAA;IAIb,KAAK,EAAE,MAAM,CAAA;IAGb,WAAW,EAAE,MAAM,GAAG,IAAI,CAAO;IAIjC,uBAAuB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAQvC,oBAAoB,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,GAAG,IAAI,CAAA;IAC/C,UAAU,MAAA;IAMV,sBAAsB,EAAE,GAAG,CAAC,YAAY,CAAC,EAAE,CAAA;IAG3C,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"}
|
@@ -0,0 +1,122 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
|
+
};
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
const utils_1 = require("@medusajs/framework/utils");
|
13
|
+
const core_1 = require("@mikro-orm/core");
|
14
|
+
const DeletedAtIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
15
|
+
tableName: "return_reason",
|
16
|
+
columns: "deleted_at",
|
17
|
+
where: "deleted_at IS NOT NULL",
|
18
|
+
});
|
19
|
+
const ValueIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
20
|
+
tableName: "return_reason",
|
21
|
+
columns: "value",
|
22
|
+
where: "deleted_at IS NOT NULL",
|
23
|
+
});
|
24
|
+
const ParentIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
25
|
+
tableName: "return_reason",
|
26
|
+
columns: "parent_return_reason_id",
|
27
|
+
where: "deleted_at IS NOT NULL",
|
28
|
+
});
|
29
|
+
let ReturnReason = class ReturnReason {
|
30
|
+
constructor() {
|
31
|
+
this.description = null;
|
32
|
+
this.metadata = null;
|
33
|
+
this.deleted_at = null;
|
34
|
+
}
|
35
|
+
onCreate() {
|
36
|
+
this.id = (0, utils_1.generateEntityId)(this.id, "rr");
|
37
|
+
}
|
38
|
+
onInit() {
|
39
|
+
this.id = (0, utils_1.generateEntityId)(this.id, "rr");
|
40
|
+
}
|
41
|
+
};
|
42
|
+
__decorate([
|
43
|
+
(0, core_1.PrimaryKey)({ columnType: "text" }),
|
44
|
+
__metadata("design:type", String)
|
45
|
+
], ReturnReason.prototype, "id", void 0);
|
46
|
+
__decorate([
|
47
|
+
(0, utils_1.Searchable)(),
|
48
|
+
(0, core_1.Property)({ columnType: "text" }),
|
49
|
+
ValueIndex.MikroORMIndex(),
|
50
|
+
__metadata("design:type", String)
|
51
|
+
], ReturnReason.prototype, "value", void 0);
|
52
|
+
__decorate([
|
53
|
+
(0, utils_1.Searchable)(),
|
54
|
+
(0, core_1.Property)({ columnType: "text" }),
|
55
|
+
__metadata("design:type", String)
|
56
|
+
], ReturnReason.prototype, "label", void 0);
|
57
|
+
__decorate([
|
58
|
+
(0, core_1.Property)({ columnType: "text", nullable: true }),
|
59
|
+
__metadata("design:type", Object)
|
60
|
+
], ReturnReason.prototype, "description", void 0);
|
61
|
+
__decorate([
|
62
|
+
(0, core_1.Property)({ columnType: "text", nullable: true }),
|
63
|
+
ParentIndex.MikroORMIndex(),
|
64
|
+
__metadata("design:type", Object)
|
65
|
+
], ReturnReason.prototype, "parent_return_reason_id", void 0);
|
66
|
+
__decorate([
|
67
|
+
(0, core_1.ManyToOne)({
|
68
|
+
entity: () => ReturnReason,
|
69
|
+
fieldName: "parent_return_reason_id",
|
70
|
+
nullable: true,
|
71
|
+
cascade: [core_1.Cascade.PERSIST],
|
72
|
+
}),
|
73
|
+
__metadata("design:type", Object)
|
74
|
+
], ReturnReason.prototype, "parent_return_reason", void 0);
|
75
|
+
__decorate([
|
76
|
+
(0, core_1.OneToMany)(() => ReturnReason, (return_reason) => return_reason.parent_return_reason, { cascade: [core_1.Cascade.PERSIST] }),
|
77
|
+
__metadata("design:type", Array)
|
78
|
+
], ReturnReason.prototype, "return_reason_children", void 0);
|
79
|
+
__decorate([
|
80
|
+
(0, core_1.Property)({ columnType: "jsonb", nullable: true }),
|
81
|
+
__metadata("design:type", Object)
|
82
|
+
], ReturnReason.prototype, "metadata", void 0);
|
83
|
+
__decorate([
|
84
|
+
(0, core_1.Property)({
|
85
|
+
onCreate: () => new Date(),
|
86
|
+
columnType: "timestamptz",
|
87
|
+
defaultRaw: "now()",
|
88
|
+
}),
|
89
|
+
__metadata("design:type", Date)
|
90
|
+
], ReturnReason.prototype, "created_at", void 0);
|
91
|
+
__decorate([
|
92
|
+
(0, core_1.Property)({
|
93
|
+
onCreate: () => new Date(),
|
94
|
+
onUpdate: () => new Date(),
|
95
|
+
columnType: "timestamptz",
|
96
|
+
defaultRaw: "now()",
|
97
|
+
}),
|
98
|
+
__metadata("design:type", Date)
|
99
|
+
], ReturnReason.prototype, "updated_at", void 0);
|
100
|
+
__decorate([
|
101
|
+
(0, core_1.Property)({ columnType: "timestamptz", nullable: true }),
|
102
|
+
DeletedAtIndex.MikroORMIndex(),
|
103
|
+
__metadata("design:type", Object)
|
104
|
+
], ReturnReason.prototype, "deleted_at", void 0);
|
105
|
+
__decorate([
|
106
|
+
(0, core_1.BeforeCreate)(),
|
107
|
+
__metadata("design:type", Function),
|
108
|
+
__metadata("design:paramtypes", []),
|
109
|
+
__metadata("design:returntype", void 0)
|
110
|
+
], ReturnReason.prototype, "onCreate", null);
|
111
|
+
__decorate([
|
112
|
+
(0, core_1.OnInit)(),
|
113
|
+
__metadata("design:type", Function),
|
114
|
+
__metadata("design:paramtypes", []),
|
115
|
+
__metadata("design:returntype", void 0)
|
116
|
+
], ReturnReason.prototype, "onInit", null);
|
117
|
+
ReturnReason = __decorate([
|
118
|
+
(0, core_1.Entity)({ tableName: "return_reason" }),
|
119
|
+
(0, core_1.Filter)(utils_1.DALUtils.mikroOrmSoftDeletableFilterOptions)
|
120
|
+
], ReturnReason);
|
121
|
+
exports.default = ReturnReason;
|
122
|
+
//# sourceMappingURL=return-reason.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"return-reason.js","sourceRoot":"","sources":["../../src/models/return-reason.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,qDAKkC;AAClC,0CAYwB;AAExB,MAAM,cAAc,GAAG,IAAA,sCAA8B,EAAC;IACpD,SAAS,EAAE,eAAe;IAC1B,OAAO,EAAE,YAAY;IACrB,KAAK,EAAE,wBAAwB;CAChC,CAAC,CAAA;AAEF,MAAM,UAAU,GAAG,IAAA,sCAA8B,EAAC;IAChD,SAAS,EAAE,eAAe;IAC1B,OAAO,EAAE,OAAO;IAChB,KAAK,EAAE,wBAAwB;CAChC,CAAC,CAAA;AAEF,MAAM,WAAW,GAAG,IAAA,sCAA8B,EAAC;IACjD,SAAS,EAAE,eAAe;IAC1B,OAAO,EAAE,yBAAyB;IAClC,KAAK,EAAE,wBAAwB;CAChC,CAAC,CAAA;AAMa,IAAM,YAAY,GAAlB,MAAM,YAAY;IAAlB;QAgBb,gBAAW,GAAkB,IAAI,CAAA;QAsBjC,aAAQ,GAAmC,IAAI,CAAA;QAmB/C,eAAU,GAAgB,IAAI,CAAA;IAWhC,CAAC;IARC,QAAQ;QACN,IAAI,CAAC,EAAE,GAAG,IAAA,wBAAgB,EAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAA;IAC3C,CAAC;IAGD,MAAM;QACJ,IAAI,CAAC,EAAE,GAAG,IAAA,wBAAgB,EAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAA;IAC3C,CAAC;CACF,CAAA;AAhEC;IADC,IAAA,iBAAU,EAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC;;wCACzB;AAKV;IAHC,IAAA,kBAAU,GAAE;IACZ,IAAA,eAAQ,EAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC;IAChC,UAAU,CAAC,aAAa,E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A,eAAQ,EAAC,EAAE,UAAU,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACvD,cAAc,CAAC,aAAa,EAAE;;gDACD;AAG9B;IADC,IAAA,mBAAY,GAAE;;;;4CAGd;AAGD;IADC,IAAA,aAAM,GAAE;;;;0CAGR;AAnEkB,YAAY;IAFhC,IAAA,aAAM,EAAC,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;IACtC,IAAA,aAAM,EAAC,gBAAQ,CAAC,kCAAkC,CAAC;GAC/B,YAAY,CAoEhC;kBApEoB,YAAY"}
|
@@ -0,0 +1,41 @@
|
|
1
|
+
import { BigNumberRawValue, DAL } from "@medusajs/framework/types";
|
2
|
+
import { BigNumber, ReturnStatus } from "@medusajs/framework/utils";
|
3
|
+
import { Collection, OptionalProps, Rel } from "@mikro-orm/core";
|
4
|
+
import { OrderTransaction, ReturnItem } from ".";
|
5
|
+
import Claim from "./claim";
|
6
|
+
import Exchange from "./exchange";
|
7
|
+
import Order from "./order";
|
8
|
+
import OrderShipping from "./order-shipping-method";
|
9
|
+
type OptionalReturnProps = DAL.ModelDateColumns;
|
10
|
+
export default class Return {
|
11
|
+
[OptionalProps]?: OptionalReturnProps;
|
12
|
+
id: string;
|
13
|
+
order_id: string;
|
14
|
+
order: Rel<Order>;
|
15
|
+
exchange: Rel<Exchange>;
|
16
|
+
exchange_id: string | null;
|
17
|
+
claim: Rel<Claim>;
|
18
|
+
claim_id: string | null;
|
19
|
+
order_version: number;
|
20
|
+
display_id: number;
|
21
|
+
status: ReturnStatus;
|
22
|
+
location_id: string | null;
|
23
|
+
no_notification: boolean | null;
|
24
|
+
refund_amount: BigNumber | number;
|
25
|
+
raw_refund_amount: BigNumberRawValue;
|
26
|
+
items: Collection<ReturnItem, object>;
|
27
|
+
shipping_methods: Collection<OrderShipping, object>;
|
28
|
+
transactions: Collection<OrderTransaction, object>;
|
29
|
+
created_by: string | null;
|
30
|
+
metadata: Record<string, unknown> | null;
|
31
|
+
created_at: Date;
|
32
|
+
updated_at: Date;
|
33
|
+
deleted_at: Date | null;
|
34
|
+
requested_at: Date | null;
|
35
|
+
received_at: Date | null;
|
36
|
+
canceled_at: Date | null;
|
37
|
+
onCreate(): void;
|
38
|
+
onInit(): void;
|
39
|
+
}
|
40
|
+
export {};
|
41
|
+
//# sourceMappingURL=return.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"return.d.ts","sourceRoot":"","sources":["../../src/models/return.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAA;AAClE,OAAO,EACL,SAAS,EAGT,YAAY,EAGb,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAGL,UAAU,EAQV,aAAa,EAGb,GAAG,EACJ,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACtD,OAAO,KAAK,MAAM,SAAS,CAAA;AAC3B,OAAO,QAAQ,MAAM,YAAY,CAAA;AACjC,OAAO,KAAK,MAAM,SAAS,CAAA;AAC3B,OAAO,aAAa,MAAM,yBAAyB,CAAA;AAEnD,KAAK,mBAAmB,GAAG,GAAG,CAAC,gBAAgB,CAAA;AAkC/C,MAAM,CAAC,OAAO,OAAO,MAAM;IACzB,CAAC,aAAa,CAAC,CAAC,EAAE,mBAAmB,CAAA;IAGrC,EAAE,EAAE,MAAM,CAAA;IASV,QAAQ,EAAE,MAAM,CAAA;IAKhB,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,CAAA;IAOjB,QAAQ,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAA;IAIvB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAO;IAOjC,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,CAAA;IAIjB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAO;IAK9B,aAAa,EAAE,MAAM,CAAA;IAIrB,UAAU,EAAE,MAAM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