@medusajs/order 0.1.3 → 1.0.0-rc-20241001083650
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.ts +6 -8
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -26
- package/dist/index.js.map +1 -1
- package/dist/joiner-config.d.ts +2 -5
- package/dist/joiner-config.d.ts.map +1 -0
- package/dist/joiner-config.js +21 -28
- package/dist/joiner-config.js.map +1 -1
- package/dist/migrations/Migration20240219102530.d.ts +1 -0
- package/dist/migrations/Migration20240219102530.d.ts.map +1 -0
- package/dist/migrations/Migration20240219102530.js +53 -19
- package/dist/migrations/Migration20240219102530.js.map +1 -1
- package/dist/migrations/Migration20240604100512.d.ts +5 -0
- package/dist/migrations/Migration20240604100512.d.ts.map +1 -0
- package/dist/migrations/Migration20240604100512.js +371 -0
- package/dist/migrations/Migration20240604100512.js.map +1 -0
- package/dist/migrations/Migration20240715102100.d.ts +5 -0
- package/dist/migrations/Migration20240715102100.d.ts.map +1 -0
- package/dist/migrations/Migration20240715102100.js +15 -0
- package/dist/migrations/Migration20240715102100.js.map +1 -0
- package/dist/migrations/Migration20240715174100.d.ts +5 -0
- package/dist/migrations/Migration20240715174100.d.ts.map +1 -0
- package/dist/migrations/Migration20240715174100.js +21 -0
- package/dist/migrations/Migration20240715174100.js.map +1 -0
- package/dist/migrations/Migration20240716081800.d.ts +5 -0
- package/dist/migrations/Migration20240716081800.d.ts.map +1 -0
- package/dist/migrations/Migration20240716081800.js +67 -0
- package/dist/migrations/Migration20240716081800.js.map +1 -0
- package/dist/migrations/Migration20240801085921.d.ts +5 -0
- package/dist/migrations/Migration20240801085921.d.ts.map +1 -0
- package/dist/migrations/Migration20240801085921.js +30 -0
- package/dist/migrations/Migration20240801085921.js.map +1 -0
- package/dist/migrations/Migration20240821164505.d.ts +6 -0
- package/dist/migrations/Migration20240821164505.d.ts.map +1 -0
- package/dist/migrations/Migration20240821164505.js +26 -0
- package/dist/migrations/Migration20240821164505.js.map +1 -0
- package/dist/migrations/Migration20240821170920.d.ts +6 -0
- package/dist/migrations/Migration20240821170920.d.ts.map +1 -0
- package/dist/migrations/Migration20240821170920.js +18 -0
- package/dist/migrations/Migration20240821170920.js.map +1 -0
- package/dist/migrations/Migration20240827133639.d.ts +6 -0
- package/dist/migrations/Migration20240827133639.d.ts.map +1 -0
- package/dist/migrations/Migration20240827133639.js +17 -0
- package/dist/migrations/Migration20240827133639.js.map +1 -0
- package/dist/migrations/Migration20240902195921.d.ts +6 -0
- package/dist/migrations/Migration20240902195921.d.ts.map +1 -0
- package/dist/migrations/Migration20240902195921.js +16 -0
- package/dist/migrations/Migration20240902195921.js.map +1 -0
- package/dist/migrations/Migration20240913092514.d.ts +6 -0
- package/dist/migrations/Migration20240913092514.d.ts.map +1 -0
- package/dist/migrations/Migration20240913092514.js +17 -0
- package/dist/migrations/Migration20240913092514.js.map +1 -0
- package/dist/models/address.d.ts +4 -3
- package/dist/models/address.d.ts.map +1 -0
- package/dist/models/address.js +22 -22
- package/dist/models/address.js.map +1 -1
- package/dist/models/adjustment-line.d.ts +5 -3
- package/dist/models/adjustment-line.d.ts.map +1 -0
- package/dist/models/adjustment-line.js +6 -1
- package/dist/models/adjustment-line.js.map +1 -1
- package/dist/models/claim-item-image.d.ts +19 -0
- package/dist/models/claim-item-image.d.ts.map +1 -0
- package/dist/models/claim-item-image.js +109 -0
- package/dist/models/claim-item-image.js.map +1 -0
- package/dist/models/claim-item.d.ts +29 -0
- package/dist/models/claim-item.d.ts.map +1 -0
- package/dist/models/claim-item.js +157 -0
- package/dist/models/claim-item.js.map +1 -0
- package/dist/models/claim.d.ts +37 -0
- package/dist/models/claim.d.ts.map +1 -0
- package/dist/models/claim.js +201 -0
- package/dist/models/claim.js.map +1 -0
- package/dist/models/exchange-item.d.ts +24 -0
- package/dist/models/exchange-item.d.ts.map +1 -0
- package/dist/models/exchange-item.js +138 -0
- package/dist/models/exchange-item.js.map +1 -0
- package/dist/models/exchange.d.ts +35 -0
- package/dist/models/exchange.d.ts.map +1 -0
- package/dist/models/exchange.js +194 -0
- package/dist/models/exchange.js.map +1 -0
- package/dist/models/index.d.ts +18 -9
- package/dist/models/index.d.ts.map +1 -0
- package/dist/models/index.js +26 -10
- package/dist/models/index.js.map +1 -1
- package/dist/models/line-item-adjustment.d.ts +5 -3
- package/dist/models/line-item-adjustment.d.ts.map +1 -0
- package/dist/models/line-item-adjustment.js +12 -12
- package/dist/models/line-item-adjustment.js.map +1 -1
- package/dist/models/line-item-tax-line.d.ts +5 -3
- package/dist/models/line-item-tax-line.d.ts.map +1 -0
- package/dist/models/line-item-tax-line.js +12 -12
- package/dist/models/line-item-tax-line.js.map +1 -1
- package/dist/models/line-item.d.ts +11 -8
- package/dist/models/line-item.d.ts.map +1 -0
- package/dist/models/line-item.js +58 -39
- package/dist/models/line-item.js.map +1 -1
- package/dist/models/order-change-action.d.ts +17 -6
- package/dist/models/order-change-action.d.ts.map +1 -0
- package/dist/models/order-change-action.js +110 -8
- package/dist/models/order-change-action.js.map +1 -1
- package/dist/models/order-change.d.ts +18 -6
- package/dist/models/order-change.d.ts.map +1 -0
- package/dist/models/order-change.js +108 -6
- package/dist/models/order-change.js.map +1 -1
- package/dist/models/order-item.d.ts +10 -7
- package/dist/models/order-item.d.ts.map +1 -0
- package/dist/models/order-item.js +29 -19
- package/dist/models/order-item.js.map +1 -1
- package/dist/models/order-shipping-method.d.ts +17 -7
- package/dist/models/order-shipping-method.d.ts.map +1 -0
- package/dist/models/order-shipping-method.js +113 -33
- package/dist/models/order-shipping-method.js.map +1 -1
- package/dist/models/order-summary.d.ts +7 -8
- package/dist/models/order-summary.d.ts.map +1 -0
- package/dist/models/order-summary.js +14 -10
- package/dist/models/order-summary.js.map +1 -1
- package/dist/models/order.d.ts +13 -11
- package/dist/models/order.d.ts.map +1 -0
- package/dist/models/order.js +12 -2
- package/dist/models/order.js.map +1 -1
- package/dist/models/return-item.d.ts +31 -0
- package/dist/models/return-item.d.ts.map +1 -0
- package/dist/models/return-item.js +180 -0
- package/dist/models/return-item.js.map +1 -0
- package/dist/models/return-reason.d.ts +22 -0
- package/dist/models/return-reason.d.ts.map +1 -0
- package/dist/models/return-reason.js +122 -0
- package/dist/models/return-reason.js.map +1 -0
- package/dist/models/return.d.ts +41 -0
- package/dist/models/return.d.ts.map +1 -0
- package/dist/models/return.js +227 -0
- package/dist/models/return.js.map +1 -0
- package/dist/models/shipping-method-adjustment.d.ts +5 -3
- package/dist/models/shipping-method-adjustment.d.ts.map +1 -0
- package/dist/models/shipping-method-adjustment.js +12 -12
- package/dist/models/shipping-method-adjustment.js.map +1 -1
- package/dist/models/shipping-method-tax-line.d.ts +5 -3
- package/dist/models/shipping-method-tax-line.d.ts.map +1 -0
- package/dist/models/shipping-method-tax-line.js +12 -12
- package/dist/models/shipping-method-tax-line.js.map +1 -1
- package/dist/models/shipping-method.d.ts +10 -7
- package/dist/models/shipping-method.d.ts.map +1 -0
- package/dist/models/shipping-method.js +42 -24
- package/dist/models/shipping-method.js.map +1 -1
- package/dist/models/tax-line.d.ts +4 -2
- package/dist/models/tax-line.d.ts.map +1 -0
- package/dist/models/tax-line.js +8 -1
- package/dist/models/tax-line.js.map +1 -1
- package/dist/models/transaction.d.ts +18 -6
- package/dist/models/transaction.d.ts.map +1 -0
- package/dist/models/transaction.js +133 -24
- package/dist/models/transaction.js.map +1 -1
- package/dist/repositories/claim.d.ts +9 -0
- package/dist/repositories/claim.d.ts.map +1 -0
- package/dist/repositories/claim.js +11 -0
- package/dist/repositories/claim.js.map +1 -0
- package/dist/repositories/exchange.d.ts +9 -0
- package/dist/repositories/exchange.d.ts.map +1 -0
- package/dist/repositories/exchange.js +11 -0
- package/dist/repositories/exchange.js.map +1 -0
- package/dist/repositories/index.d.ts +5 -2
- package/dist/repositories/index.d.ts.map +1 -0
- package/dist/repositories/index.js +8 -17
- package/dist/repositories/index.js.map +1 -1
- package/dist/repositories/order.d.ts +2 -4
- package/dist/repositories/order.d.ts.map +1 -0
- package/dist/repositories/order.js +3 -86
- package/dist/repositories/order.js.map +1 -1
- package/dist/repositories/return.d.ts +9 -0
- package/dist/repositories/return.d.ts.map +1 -0
- package/dist/repositories/return.js +11 -0
- package/dist/repositories/return.js.map +1 -0
- package/dist/schema/index.d.ts +3 -0
- package/dist/schema/index.d.ts.map +1 -0
- package/dist/schema/index.js +556 -0
- package/dist/schema/index.js.map +1 -0
- package/dist/services/actions/cancel-claim.d.ts +3 -0
- package/dist/services/actions/cancel-claim.d.ts.map +1 -0
- package/dist/services/actions/cancel-claim.js +85 -0
- package/dist/services/actions/cancel-claim.js.map +1 -0
- package/dist/services/actions/cancel-exchange.d.ts +3 -0
- package/dist/services/actions/cancel-exchange.d.ts.map +1 -0
- package/dist/services/actions/cancel-exchange.js +71 -0
- package/dist/services/actions/cancel-exchange.js.map +1 -0
- package/dist/services/actions/cancel-fulfillment.d.ts +3 -0
- package/dist/services/actions/cancel-fulfillment.d.ts.map +1 -0
- package/dist/services/actions/cancel-fulfillment.js +31 -0
- package/dist/services/actions/cancel-fulfillment.js.map +1 -0
- package/dist/services/actions/cancel-return.d.ts +3 -0
- package/dist/services/actions/cancel-return.d.ts.map +1 -0
- package/dist/services/actions/cancel-return.js +69 -0
- package/dist/services/actions/cancel-return.js.map +1 -0
- package/dist/services/actions/create-claim.d.ts +3 -0
- package/dist/services/actions/create-claim.d.ts.map +1 -0
- package/dist/services/actions/create-claim.js +225 -0
- package/dist/services/actions/create-claim.js.map +1 -0
- package/dist/services/actions/create-exchange.d.ts +3 -0
- package/dist/services/actions/create-exchange.d.ts.map +1 -0
- package/dist/services/actions/create-exchange.js +191 -0
- package/dist/services/actions/create-exchange.js.map +1 -0
- package/dist/services/actions/create-return.d.ts +3 -0
- package/dist/services/actions/create-return.d.ts.map +1 -0
- package/dist/services/actions/create-return.js +100 -0
- package/dist/services/actions/create-return.js.map +1 -0
- package/dist/services/actions/index.d.ts +12 -0
- package/dist/services/actions/index.d.ts.map +1 -0
- package/dist/services/actions/index.js +28 -0
- package/dist/services/actions/index.js.map +1 -0
- package/dist/services/actions/receive-return.d.ts +3 -0
- package/dist/services/actions/receive-return.d.ts.map +1 -0
- package/dist/services/actions/receive-return.js +71 -0
- package/dist/services/actions/receive-return.js.map +1 -0
- package/dist/services/actions/register-delivery.d.ts +3 -0
- package/dist/services/actions/register-delivery.d.ts.map +1 -0
- package/dist/services/actions/register-delivery.js +29 -0
- package/dist/services/actions/register-delivery.js.map +1 -0
- package/dist/services/actions/register-fulfillment.d.ts +3 -0
- package/dist/services/actions/register-fulfillment.d.ts.map +1 -0
- package/dist/services/actions/register-fulfillment.js +29 -0
- package/dist/services/actions/register-fulfillment.js.map +1 -0
- package/dist/services/actions/register-shipment.d.ts +3 -0
- package/dist/services/actions/register-shipment.d.ts.map +1 -0
- package/dist/services/actions/register-shipment.js +37 -0
- package/dist/services/actions/register-shipment.js.map +1 -0
- package/dist/services/index.d.ts +1 -1
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/index.js +1 -3
- package/dist/services/index.js.map +1 -1
- package/dist/services/order-module-service.d.ts +191 -109
- package/dist/services/order-module-service.d.ts.map +1 -0
- package/dist/services/order-module-service.js +1165 -425
- package/dist/services/order-module-service.js.map +1 -1
- package/dist/services/order-service.d.ts +6 -5
- package/dist/services/order-service.d.ts.map +1 -0
- package/dist/services/order-service.js +2 -2
- package/dist/services/order-service.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types/address.d.ts +2 -1
- package/dist/types/address.d.ts.map +1 -0
- package/dist/types/index.d.ts +5 -2
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/line-item-adjustment.d.ts +2 -1
- package/dist/types/line-item-adjustment.d.ts.map +1 -0
- package/dist/types/line-item-tax-line.d.ts +1 -0
- package/dist/types/line-item-tax-line.d.ts.map +1 -0
- package/dist/types/line-item.d.ts +2 -1
- package/dist/types/line-item.d.ts.map +1 -0
- package/dist/types/order-change.d.ts +4 -0
- package/dist/types/order-change.d.ts.map +1 -0
- package/dist/types/order-change.js +3 -0
- package/dist/types/order-change.js.map +1 -0
- package/dist/types/order-detail.d.ts +3 -2
- package/dist/types/order-detail.d.ts.map +1 -0
- package/dist/types/order.d.ts +4 -3
- package/dist/types/order.d.ts.map +1 -0
- package/dist/types/return-reason.d.ts +5 -0
- package/dist/types/return-reason.d.ts.map +1 -0
- package/dist/types/return-reason.js +3 -0
- package/dist/types/return-reason.js.map +1 -0
- package/dist/types/shipping-method-adjustment.d.ts +2 -1
- package/dist/types/shipping-method-adjustment.d.ts.map +1 -0
- package/dist/types/shipping-method-tax-line.d.ts +1 -0
- package/dist/types/shipping-method-tax-line.d.ts.map +1 -0
- package/dist/types/shipping-method.d.ts +5 -1
- package/dist/types/shipping-method.d.ts.map +1 -0
- package/dist/types/tax-line.d.ts +2 -1
- package/dist/types/tax-line.d.ts.map +1 -0
- package/dist/types/transaction.d.ts +2 -1
- package/dist/types/transaction.d.ts.map +1 -0
- package/dist/types/utils/index.d.ts +41 -23
- package/dist/types/utils/index.d.ts.map +1 -0
- package/dist/types/utils/index.js +0 -1
- package/dist/types/utils/index.js.map +1 -1
- package/dist/utils/actions/cancel-item-fulfillment.d.ts +2 -0
- package/dist/utils/actions/cancel-item-fulfillment.d.ts.map +1 -0
- package/dist/utils/actions/cancel-item-fulfillment.js +34 -0
- package/dist/utils/actions/cancel-item-fulfillment.js.map +1 -0
- package/dist/utils/actions/cancel-return.d.ts +1 -0
- package/dist/utils/actions/cancel-return.d.ts.map +1 -0
- package/dist/utils/actions/cancel-return.js +9 -16
- package/dist/utils/actions/cancel-return.js.map +1 -1
- package/dist/utils/actions/deliver-item.d.ts +2 -0
- package/dist/utils/actions/deliver-item.d.ts.map +1 -0
- package/dist/utils/actions/deliver-item.js +38 -0
- package/dist/utils/actions/deliver-item.js.map +1 -0
- package/dist/utils/actions/fulfill-item.d.ts +1 -0
- package/dist/utils/actions/fulfill-item.d.ts.map +1 -0
- package/dist/utils/actions/fulfill-item.js +8 -12
- package/dist/utils/actions/fulfill-item.js.map +1 -1
- package/dist/utils/actions/index.d.ts +7 -1
- package/dist/utils/actions/index.d.ts.map +1 -0
- package/dist/utils/actions/index.js +6 -1
- package/dist/utils/actions/index.js.map +1 -1
- package/dist/utils/actions/item-add.d.ts +1 -0
- package/dist/utils/actions/item-add.d.ts.map +1 -0
- package/dist/utils/actions/item-add.js +17 -26
- package/dist/utils/actions/item-add.js.map +1 -1
- package/dist/utils/actions/item-remove.d.ts +1 -0
- package/dist/utils/actions/item-remove.d.ts.map +1 -0
- package/dist/utils/actions/item-remove.js +10 -30
- package/dist/utils/actions/item-remove.js.map +1 -1
- package/dist/utils/actions/item-update.d.ts +2 -0
- package/dist/utils/actions/item-update.d.ts.map +1 -0
- package/dist/utils/actions/item-update.js +37 -0
- package/dist/utils/actions/item-update.js.map +1 -0
- package/dist/utils/actions/receive-damaged-return-item.d.ts +1 -0
- package/dist/utils/actions/receive-damaged-return-item.d.ts.map +1 -0
- package/dist/utils/actions/receive-damaged-return-item.js +11 -37
- package/dist/utils/actions/receive-damaged-return-item.js.map +1 -1
- package/dist/utils/actions/receive-return-item.d.ts +1 -0
- package/dist/utils/actions/receive-return-item.d.ts.map +1 -0
- package/dist/utils/actions/receive-return-item.js +9 -38
- package/dist/utils/actions/receive-return-item.js.map +1 -1
- package/dist/utils/actions/reinstate-item.d.ts +2 -0
- package/dist/utils/actions/reinstate-item.d.ts.map +1 -0
- package/dist/utils/actions/reinstate-item.js +32 -0
- package/dist/utils/actions/reinstate-item.js.map +1 -0
- package/dist/utils/actions/return-item.d.ts +1 -0
- package/dist/utils/actions/return-item.d.ts.map +1 -0
- package/dist/utils/actions/return-item.js +10 -15
- package/dist/utils/actions/return-item.js.map +1 -1
- package/dist/utils/actions/ship-item.d.ts +1 -0
- package/dist/utils/actions/ship-item.d.ts.map +1 -0
- package/dist/utils/actions/ship-item.js +8 -12
- package/dist/utils/actions/ship-item.js.map +1 -1
- package/dist/utils/actions/shipping-add.d.ts +1 -0
- package/dist/utils/actions/shipping-add.d.ts.map +1 -0
- package/dist/utils/actions/shipping-add.js +18 -18
- package/dist/utils/actions/shipping-add.js.map +1 -1
- package/dist/utils/actions/shipping-remove.d.ts +2 -0
- package/dist/utils/actions/shipping-remove.d.ts.map +1 -0
- package/dist/utils/actions/shipping-remove.js +22 -0
- package/dist/utils/actions/shipping-remove.js.map +1 -0
- package/dist/utils/actions/write-off-item.d.ts +1 -0
- package/dist/utils/actions/write-off-item.d.ts.map +1 -0
- package/dist/utils/actions/write-off-item.js +8 -12
- package/dist/utils/actions/write-off-item.js.map +1 -1
- package/dist/utils/apply-order-changes.d.ts +18 -0
- package/dist/utils/apply-order-changes.d.ts.map +1 -0
- package/dist/utils/apply-order-changes.js +98 -0
- package/dist/utils/apply-order-changes.js.map +1 -0
- package/dist/utils/base-repository-find.d.ts +3 -0
- package/dist/utils/base-repository-find.d.ts.map +1 -0
- package/dist/utils/base-repository-find.js +154 -0
- package/dist/utils/base-repository-find.js.map +1 -0
- package/dist/utils/calculate-order-change.d.ts +12 -6
- package/dist/utils/calculate-order-change.d.ts.map +1 -0
- package/dist/utils/calculate-order-change.js +56 -187
- package/dist/utils/calculate-order-change.js.map +1 -1
- package/dist/utils/index.d.ts +4 -1
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +3 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/set-action-reference.d.ts +2 -0
- package/dist/utils/set-action-reference.d.ts.map +1 -0
- package/dist/utils/set-action-reference.js +10 -0
- package/dist/utils/set-action-reference.js.map +1 -0
- package/dist/utils/transform-order.d.ts +5 -4
- package/dist/utils/transform-order.d.ts.map +1 -0
- package/dist/utils/transform-order.js +138 -21
- package/dist/utils/transform-order.js.map +1 -1
- package/package.json +20 -21
- package/dist/module-definition.d.ts +0 -2
- package/dist/module-definition.js +0 -59
- package/dist/module-definition.js.map +0 -1
- package/dist/scripts/bin/run-seed.d.ts +0 -3
- package/dist/scripts/bin/run-seed.js +0 -49
- package/dist/scripts/bin/run-seed.js.map +0 -1
- package/dist/services/order-change-service.d.ts +0 -15
- package/dist/services/order-change-service.js +0 -96
- package/dist/services/order-change-service.js.map +0 -1
- package/dist/utils/action-key.d.ts +0 -13
- package/dist/utils/action-key.js +0 -18
- package/dist/utils/action-key.js.map +0 -1
- package/dist/utils/actions/cancel.d.ts +0 -1
- package/dist/utils/actions/cancel.js +0 -8
- package/dist/utils/actions/cancel.js.map +0 -1
@@ -0,0 +1,227 @@
|
|
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 _models_1 = require(".");
|
18
|
+
const claim_1 = __importDefault(require("./claim"));
|
19
|
+
const exchange_1 = __importDefault(require("./exchange"));
|
20
|
+
const order_1 = __importDefault(require("./order"));
|
21
|
+
const order_shipping_method_1 = __importDefault(require("./order-shipping-method"));
|
22
|
+
const DisplayIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
23
|
+
tableName: "return",
|
24
|
+
columns: "display_id",
|
25
|
+
where: "deleted_at IS NOT NULL",
|
26
|
+
});
|
27
|
+
const ReturnDeletedAtIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
28
|
+
tableName: "return",
|
29
|
+
columns: "deleted_at",
|
30
|
+
where: "deleted_at IS NOT NULL",
|
31
|
+
});
|
32
|
+
const OrderIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
33
|
+
tableName: "return",
|
34
|
+
columns: ["order_id"],
|
35
|
+
where: "deleted_at IS NOT NULL",
|
36
|
+
});
|
37
|
+
const ExchangeIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
38
|
+
tableName: "return",
|
39
|
+
columns: ["exchange_id"],
|
40
|
+
where: "exchange_id IS NOT NULL AND deleted_at IS NOT NULL",
|
41
|
+
});
|
42
|
+
const ClaimIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
43
|
+
tableName: "return",
|
44
|
+
columns: ["claim_id"],
|
45
|
+
where: "claim_id IS NOT NULL AND deleted_at IS NOT NULL",
|
46
|
+
});
|
47
|
+
let Return = class Return {
|
48
|
+
constructor() {
|
49
|
+
this.exchange_id = null;
|
50
|
+
this.claim_id = null;
|
51
|
+
this.status = utils_1.ReturnStatus.OPEN;
|
52
|
+
this.location_id = null;
|
53
|
+
this.no_notification = null;
|
54
|
+
this.items = new core_1.Collection(this);
|
55
|
+
this.shipping_methods = new core_1.Collection(this);
|
56
|
+
this.transactions = new core_1.Collection(this);
|
57
|
+
this.created_by = null;
|
58
|
+
this.metadata = null;
|
59
|
+
this.deleted_at = null;
|
60
|
+
this.requested_at = null;
|
61
|
+
this.received_at = null;
|
62
|
+
this.canceled_at = null;
|
63
|
+
}
|
64
|
+
onCreate() {
|
65
|
+
this.id = (0, utils_1.generateEntityId)(this.id, "return");
|
66
|
+
}
|
67
|
+
onInit() {
|
68
|
+
this.id = (0, utils_1.generateEntityId)(this.id, "return");
|
69
|
+
}
|
70
|
+
};
|
71
|
+
__decorate([
|
72
|
+
(0, core_1.PrimaryKey)({ columnType: "text" }),
|
73
|
+
__metadata("design:type", String)
|
74
|
+
], Return.prototype, "id", void 0);
|
75
|
+
__decorate([
|
76
|
+
(0, core_1.ManyToOne)({
|
77
|
+
entity: () => order_1.default,
|
78
|
+
mapToPk: true,
|
79
|
+
fieldName: "order_id",
|
80
|
+
columnType: "text",
|
81
|
+
}),
|
82
|
+
OrderIdIndex.MikroORMIndex(),
|
83
|
+
__metadata("design:type", String)
|
84
|
+
], Return.prototype, "order_id", void 0);
|
85
|
+
__decorate([
|
86
|
+
(0, core_1.ManyToOne)(() => order_1.default, {
|
87
|
+
persist: false,
|
88
|
+
}),
|
89
|
+
__metadata("design:type", Object)
|
90
|
+
], Return.prototype, "order", void 0);
|
91
|
+
__decorate([
|
92
|
+
(0, core_1.OneToOne)({
|
93
|
+
entity: () => exchange_1.default,
|
94
|
+
fieldName: "exchange_id",
|
95
|
+
nullable: true,
|
96
|
+
}),
|
97
|
+
__metadata("design:type", Object)
|
98
|
+
], Return.prototype, "exchange", void 0);
|
99
|
+
__decorate([
|
100
|
+
(0, core_1.Property)({ columnType: "text", nullable: true }),
|
101
|
+
ExchangeIdIndex.MikroORMIndex(),
|
102
|
+
__metadata("design:type", Object)
|
103
|
+
], Return.prototype, "exchange_id", void 0);
|
104
|
+
__decorate([
|
105
|
+
(0, core_1.OneToOne)({
|
106
|
+
entity: () => claim_1.default,
|
107
|
+
fieldName: "claim_id",
|
108
|
+
nullable: true,
|
109
|
+
}),
|
110
|
+
__metadata("design:type", Object)
|
111
|
+
], Return.prototype, "claim", void 0);
|
112
|
+
__decorate([
|
113
|
+
(0, core_1.Property)({ columnType: "text", nullable: true }),
|
114
|
+
ClaimIdIndex.MikroORMIndex(),
|
115
|
+
__metadata("design:type", Object)
|
116
|
+
], Return.prototype, "claim_id", void 0);
|
117
|
+
__decorate([
|
118
|
+
(0, core_1.Property)({
|
119
|
+
columnType: "integer",
|
120
|
+
}),
|
121
|
+
__metadata("design:type", Number)
|
122
|
+
], Return.prototype, "order_version", void 0);
|
123
|
+
__decorate([
|
124
|
+
(0, core_1.Property)({ autoincrement: true, primary: false }),
|
125
|
+
DisplayIdIndex.MikroORMIndex(),
|
126
|
+
__metadata("design:type", Number)
|
127
|
+
], Return.prototype, "display_id", void 0);
|
128
|
+
__decorate([
|
129
|
+
(0, core_1.Enum)({ items: () => utils_1.ReturnStatus, default: utils_1.ReturnStatus.OPEN }),
|
130
|
+
__metadata("design:type", String)
|
131
|
+
], Return.prototype, "status", void 0);
|
132
|
+
__decorate([
|
133
|
+
(0, core_1.Property)({ columnType: "text", nullable: true }),
|
134
|
+
__metadata("design:type", Object)
|
135
|
+
], Return.prototype, "location_id", void 0);
|
136
|
+
__decorate([
|
137
|
+
(0, core_1.Property)({ columnType: "boolean", nullable: true }),
|
138
|
+
__metadata("design:type", Object)
|
139
|
+
], Return.prototype, "no_notification", void 0);
|
140
|
+
__decorate([
|
141
|
+
(0, utils_1.MikroOrmBigNumberProperty)({
|
142
|
+
nullable: true,
|
143
|
+
}),
|
144
|
+
__metadata("design:type", Object)
|
145
|
+
], Return.prototype, "refund_amount", void 0);
|
146
|
+
__decorate([
|
147
|
+
(0, core_1.Property)({ columnType: "jsonb", nullable: true }),
|
148
|
+
__metadata("design:type", Object)
|
149
|
+
], Return.prototype, "raw_refund_amount", void 0);
|
150
|
+
__decorate([
|
151
|
+
(0, core_1.OneToMany)(() => _models_1.ReturnItem, (itemDetail) => itemDetail.return, {
|
152
|
+
cascade: [core_1.Cascade.PERSIST],
|
153
|
+
}),
|
154
|
+
__metadata("design:type", Object)
|
155
|
+
], Return.prototype, "items", void 0);
|
156
|
+
__decorate([
|
157
|
+
(0, core_1.OneToMany)(() => order_shipping_method_1.default, (shippingMethod) => shippingMethod.return, {
|
158
|
+
cascade: [core_1.Cascade.PERSIST],
|
159
|
+
}),
|
160
|
+
__metadata("design:type", Object)
|
161
|
+
], Return.prototype, "shipping_methods", void 0);
|
162
|
+
__decorate([
|
163
|
+
(0, core_1.OneToMany)(() => _models_1.OrderTransaction, (transaction) => transaction.return, {
|
164
|
+
cascade: [core_1.Cascade.PERSIST],
|
165
|
+
}),
|
166
|
+
__metadata("design:type", Object)
|
167
|
+
], Return.prototype, "transactions", void 0);
|
168
|
+
__decorate([
|
169
|
+
(0, core_1.Property)({ columnType: "text", nullable: true }),
|
170
|
+
__metadata("design:type", Object)
|
171
|
+
], Return.prototype, "created_by", void 0);
|
172
|
+
__decorate([
|
173
|
+
(0, core_1.Property)({ columnType: "jsonb", nullable: true }),
|
174
|
+
__metadata("design:type", Object)
|
175
|
+
], Return.prototype, "metadata", void 0);
|
176
|
+
__decorate([
|
177
|
+
(0, core_1.Property)({
|
178
|
+
onCreate: () => new Date(),
|
179
|
+
columnType: "timestamptz",
|
180
|
+
defaultRaw: "now()",
|
181
|
+
}),
|
182
|
+
__metadata("design:type", Date)
|
183
|
+
], Return.prototype, "created_at", void 0);
|
184
|
+
__decorate([
|
185
|
+
(0, core_1.Property)({
|
186
|
+
onCreate: () => new Date(),
|
187
|
+
onUpdate: () => new Date(),
|
188
|
+
columnType: "timestamptz",
|
189
|
+
defaultRaw: "now()",
|
190
|
+
}),
|
191
|
+
__metadata("design:type", Date)
|
192
|
+
], Return.prototype, "updated_at", void 0);
|
193
|
+
__decorate([
|
194
|
+
(0, core_1.Property)({ columnType: "timestamptz", nullable: true }),
|
195
|
+
ReturnDeletedAtIndex.MikroORMIndex(),
|
196
|
+
__metadata("design:type", Object)
|
197
|
+
], Return.prototype, "deleted_at", void 0);
|
198
|
+
__decorate([
|
199
|
+
(0, core_1.Property)({ columnType: "timestamptz", nullable: true }),
|
200
|
+
__metadata("design:type", Object)
|
201
|
+
], Return.prototype, "requested_at", void 0);
|
202
|
+
__decorate([
|
203
|
+
(0, core_1.Property)({ columnType: "timestamptz", nullable: true }),
|
204
|
+
__metadata("design:type", Object)
|
205
|
+
], Return.prototype, "received_at", void 0);
|
206
|
+
__decorate([
|
207
|
+
(0, core_1.Property)({ columnType: "timestamptz", nullable: true }),
|
208
|
+
__metadata("design:type", Object)
|
209
|
+
], Return.prototype, "canceled_at", void 0);
|
210
|
+
__decorate([
|
211
|
+
(0, core_1.BeforeCreate)(),
|
212
|
+
__metadata("design:type", Function),
|
213
|
+
__metadata("design:paramtypes", []),
|
214
|
+
__metadata("design:returntype", void 0)
|
215
|
+
], Return.prototype, "onCreate", null);
|
216
|
+
__decorate([
|
217
|
+
(0, core_1.OnInit)(),
|
218
|
+
__metadata("design:type", Function),
|
219
|
+
__metadata("design:paramtypes", []),
|
220
|
+
__metadata("design:returntype", void 0)
|
221
|
+
], Return.prototype, "onInit", null);
|
222
|
+
Return = __decorate([
|
223
|
+
(0, core_1.Entity)({ tableName: "return" }),
|
224
|
+
(0, core_1.Filter)(utils_1.DALUtils.mikroOrmSoftDeletableFilterOptions)
|
225
|
+
], Return);
|
226
|
+
exports.default = Return;
|
227
|
+
//# sourceMappingURL=return.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"return.js","sourceRoot":"","sources":["../../src/models/return.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,qDAOkC;AAClC,0CAewB;AACxB,qCAAsD;AACtD,oDAA2B;AAC3B,0DAAiC;AACjC,oDAA2B;AAC3B,oFAAmD;AAInD,MAAM,cAAc,GAAG,IAAA,sCAA8B,EAAC;IACpD,SAAS,EAAE,QAAQ;IACnB,OAAO,EAAE,YAAY;IACrB,KAAK,EAAE,wBAAwB;CAChC,CAAC,CAAA;AAEF,MAAM,oBAAoB,GAAG,IAAA,sCAA8B,EAAC;IAC1D,SAAS,EAAE,QAAQ;IACnB,OAAO,EAAE,YAAY;IACrB,KAAK,EAAE,wBAAwB;CAChC,CAAC,CAAA;AAEF,MAAM,YAAY,GAAG,IAAA,sCAA8B,EAAC;IAClD,SAAS,EAAE,QAAQ;IACnB,OAAO,EAAE,CAAC,UAAU,CAAC;IACrB,KAAK,EAAE,wBAAwB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QACzB,UAAU,EAAE,OAAO;KACpB,CAAC;8BACU,IAAI;0CAAA;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;0CAAA;AAIhB;IAFC,IAAA,eAAQ,EAAC,EAAE,UAAU,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACvD,oBAAoB,CAAC,aAAa,EAAE;;0CACP;AAG9B;IADC,IAAA,eAAQ,EAAC,EAAE,UAAU,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACxB;AAGhC;IADC,IAAA,eAAQ,EAAC,EAAE,UAAU,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACzB;AAG/B;IADC,IAAA,eAAQ,EAAC,EAAE,UAAU,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACzB;AAG/B;IADC,IAAA,mBAAY,GAAE;;;;sCAGd;AAGD;IADC,IAAA,aAAM,GAAE;;;;oCAGR;AA7HkB,MAAM;IAF1B,IAAA,aAAM,EAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC;IAC/B,IAAA,aAAM,EAAC,gBAAQ,CAAC,kCAAkC,CAAC;GAC/B,MAAM,CA8H1B;kBA9HoB,MAAM"}
|
@@ -1,8 +1,10 @@
|
|
1
|
+
import { Rel } from "@mikro-orm/core";
|
1
2
|
import AdjustmentLine from "./adjustment-line";
|
2
|
-
import
|
3
|
-
export default class
|
4
|
-
shipping_method:
|
3
|
+
import OrderShippingMethod from "./shipping-method";
|
4
|
+
export default class OrderShippingMethodAdjustment extends AdjustmentLine {
|
5
|
+
shipping_method: Rel<OrderShippingMethod>;
|
5
6
|
shipping_method_id: string;
|
6
7
|
onCreate(): void;
|
7
8
|
onInit(): void;
|
8
9
|
}
|
10
|
+
//# sourceMappingURL=shipping-method-adjustment.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"shipping-method-adjustment.d.ts","sourceRoot":"","sources":["../../src/models/shipping-method-adjustment.ts"],"names":[],"mappings":"AAIA,OAAO,EAA2C,GAAG,EAAE,MAAM,iBAAiB,CAAA;AAC9E,OAAO,cAAc,MAAM,mBAAmB,CAAA;AAC9C,OAAO,mBAAmB,MAAM,mBAAmB,CAAA;AAQnD,MAAM,CAAC,OAAO,OAAO,6BAA8B,SAAQ,cAAc;IAIvE,eAAe,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAA;IAUzC,kBAAkB,EAAE,MAAM,CAAA;IAG1B,QAAQ;IAMR,MAAM;CAIP"}
|
@@ -12,7 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
13
13
|
};
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
15
|
-
const utils_1 = require("@medusajs/utils");
|
15
|
+
const utils_1 = require("@medusajs/framework/utils");
|
16
16
|
const core_1 = require("@mikro-orm/core");
|
17
17
|
const adjustment_line_1 = __importDefault(require("./adjustment-line"));
|
18
18
|
const shipping_method_1 = __importDefault(require("./shipping-method"));
|
@@ -20,22 +20,22 @@ const ShippingMethodIdIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
|
20
20
|
tableName: "order_shipping_method_adjustment",
|
21
21
|
columns: "shipping_method_id",
|
22
22
|
});
|
23
|
-
let
|
23
|
+
let OrderShippingMethodAdjustment = class OrderShippingMethodAdjustment extends adjustment_line_1.default {
|
24
24
|
onCreate() {
|
25
25
|
this.id = (0, utils_1.generateEntityId)(this.id, "ordsmadj");
|
26
|
-
this.shipping_method_id
|
26
|
+
this.shipping_method_id ??= this.shipping_method?.id;
|
27
27
|
}
|
28
28
|
onInit() {
|
29
29
|
this.id = (0, utils_1.generateEntityId)(this.id, "ordsmadj");
|
30
|
-
this.shipping_method_id
|
30
|
+
this.shipping_method_id ??= this.shipping_method?.id;
|
31
31
|
}
|
32
32
|
};
|
33
33
|
__decorate([
|
34
34
|
(0, core_1.ManyToOne)(() => shipping_method_1.default, {
|
35
35
|
persist: false,
|
36
36
|
}),
|
37
|
-
__metadata("design:type",
|
38
|
-
],
|
37
|
+
__metadata("design:type", Object)
|
38
|
+
], OrderShippingMethodAdjustment.prototype, "shipping_method", void 0);
|
39
39
|
__decorate([
|
40
40
|
(0, core_1.ManyToOne)({
|
41
41
|
entity: () => shipping_method_1.default,
|
@@ -46,21 +46,21 @@ __decorate([
|
|
46
46
|
}),
|
47
47
|
ShippingMethodIdIdIndex.MikroORMIndex(),
|
48
48
|
__metadata("design:type", String)
|
49
|
-
],
|
49
|
+
], OrderShippingMethodAdjustment.prototype, "shipping_method_id", void 0);
|
50
50
|
__decorate([
|
51
51
|
(0, core_1.BeforeCreate)(),
|
52
52
|
__metadata("design:type", Function),
|
53
53
|
__metadata("design:paramtypes", []),
|
54
54
|
__metadata("design:returntype", void 0)
|
55
|
-
],
|
55
|
+
], OrderShippingMethodAdjustment.prototype, "onCreate", null);
|
56
56
|
__decorate([
|
57
57
|
(0, core_1.OnInit)(),
|
58
58
|
__metadata("design:type", Function),
|
59
59
|
__metadata("design:paramtypes", []),
|
60
60
|
__metadata("design:returntype", void 0)
|
61
|
-
],
|
62
|
-
|
61
|
+
], OrderShippingMethodAdjustment.prototype, "onInit", null);
|
62
|
+
OrderShippingMethodAdjustment = __decorate([
|
63
63
|
(0, core_1.Entity)({ tableName: "order_shipping_method_adjustment" })
|
64
|
-
],
|
65
|
-
exports.default =
|
64
|
+
], OrderShippingMethodAdjustment);
|
65
|
+
exports.default = OrderShippingMethodAdjustment;
|
66
66
|
//# sourceMappingURL=shipping-method-adjustment.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"shipping-method-adjustment.js","sourceRoot":"","sources":["../../src/models/shipping-method-adjustment.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,
|
1
|
+
{"version":3,"file":"shipping-method-adjustment.js","sourceRoot":"","sources":["../../src/models/shipping-method-adjustment.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qDAGkC;AAClC,0CAA8E;AAC9E,wEAA8C;AAC9C,wEAAmD;AAEnD,MAAM,uBAAuB,GAAG,IAAA,sCAA8B,EAAC;IAC7D,SAAS,EAAE,kCAAkC;IAC7C,OAAO,EAAE,oBAAoB;CAC9B,CAAC,CAAA;AAGa,IAAM,6BAA6B,GAAnC,MAAM,6BAA8B,SAAQ,yBAAc;IAiBvE,QAAQ;QACN,IAAI,CAAC,EAAE,GAAG,IAAA,wBAAgB,EAAC,IAAI,CAAC,EAAE,EAAE,UAAU,CAAC,CAAA;QAC/C,IAAI,CAAC,kBAAkB,KAAK,IAAI,CAAC,eAAe,EAAE,EAAE,CAAA;IACtD,CAAC;IAGD,MAAM;QACJ,IAAI,CAAC,EAAE,GAAG,IAAA,wBAAgB,EAAC,IAAI,CAAC,EAAE,EAAE,UAAU,CAAC,CAAA;QAC/C,IAAI,CAAC,kBAAkB,KAAK,IAAI,CAAC,eAAe,EAAE,EAAE,CAAA;IACtD,CAAC;CACF,CAAA;AAvBC;IAHC,IAAA,gBAAS,EAAC,GAAG,EAAE,CAAC,yBAAmB,EAAE;QACpC,OAAO,EAAE,KAAK;KACf,CAAC;;sEACuC;AAUzC;IARC,IAAA,gBAAS,EAAC;QACT,MAAM,EAAE,GAAG,EAAE,CAAC,yBAAmB;QACjC,UAAU,EAAE,MAAM;QAClB,SAAS,EAAE,oBAAoB;QAC/B,OAAO,EAAE,IAAI;QACb,QAAQ,EAAE,SAAS;KACpB,CAAC;IACD,uBAAuB,CAAC,aAAa,EAAE;;yEACd;AAG1B;IADC,IAAA,mBAAY,GAAE;;;;6DAId;AAGD;IADC,IAAA,aAAM,GAAE;;;;2DAIR;AA1BkB,6BAA6B;IADjD,IAAA,aAAM,EAAC,EAAE,SAAS,EAAE,kCAAkC,EAAE,CAAC;GACrC,6BAA6B,CA2BjD;kBA3BoB,6BAA6B"}
|
@@ -1,8 +1,10 @@
|
|
1
|
-
import
|
1
|
+
import { Rel } from "@mikro-orm/core";
|
2
|
+
import OrderShippingMethod from "./shipping-method";
|
2
3
|
import TaxLine from "./tax-line";
|
3
|
-
export default class
|
4
|
-
shipping_method:
|
4
|
+
export default class OrderShippingMethodTaxLine extends TaxLine {
|
5
|
+
shipping_method: Rel<OrderShippingMethod>;
|
5
6
|
shipping_method_id: string;
|
6
7
|
onCreate(): void;
|
7
8
|
onInit(): void;
|
8
9
|
}
|
10
|
+
//# sourceMappingURL=shipping-method-tax-line.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"shipping-method-tax-line.d.ts","sourceRoot":"","sources":["../../src/models/shipping-method-tax-line.ts"],"names":[],"mappings":"AAIA,OAAO,EAA2C,GAAG,EAAE,MAAM,iBAAiB,CAAA;AAC9E,OAAO,mBAAmB,MAAM,mBAAmB,CAAA;AACnD,OAAO,OAAO,MAAM,YAAY,CAAA;AAQhC,MAAM,CAAC,OAAO,OAAO,0BAA2B,SAAQ,OAAO;IAI7D,eAAe,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAA;IAUzC,kBAAkB,EAAE,MAAM,CAAA;IAG1B,QAAQ;IAMR,MAAM;CAIP"}
|
@@ -12,7 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
13
13
|
};
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
15
|
-
const utils_1 = require("@medusajs/utils");
|
15
|
+
const utils_1 = require("@medusajs/framework/utils");
|
16
16
|
const core_1 = require("@mikro-orm/core");
|
17
17
|
const shipping_method_1 = __importDefault(require("./shipping-method"));
|
18
18
|
const tax_line_1 = __importDefault(require("./tax-line"));
|
@@ -20,22 +20,22 @@ const ShippingMethodIdIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
|
20
20
|
tableName: "order_shipping_method_tax_line",
|
21
21
|
columns: "shipping_method_id",
|
22
22
|
});
|
23
|
-
let
|
23
|
+
let OrderShippingMethodTaxLine = class OrderShippingMethodTaxLine extends tax_line_1.default {
|
24
24
|
onCreate() {
|
25
25
|
this.id = (0, utils_1.generateEntityId)(this.id, "ordsmtxl");
|
26
|
-
this.shipping_method_id
|
26
|
+
this.shipping_method_id ??= this.shipping_method?.id;
|
27
27
|
}
|
28
28
|
onInit() {
|
29
29
|
this.id = (0, utils_1.generateEntityId)(this.id, "ordsmtxl");
|
30
|
-
this.shipping_method_id
|
30
|
+
this.shipping_method_id ??= this.shipping_method?.id;
|
31
31
|
}
|
32
32
|
};
|
33
33
|
__decorate([
|
34
34
|
(0, core_1.ManyToOne)(() => shipping_method_1.default, {
|
35
35
|
persist: false,
|
36
36
|
}),
|
37
|
-
__metadata("design:type",
|
38
|
-
],
|
37
|
+
__metadata("design:type", Object)
|
38
|
+
], OrderShippingMethodTaxLine.prototype, "shipping_method", void 0);
|
39
39
|
__decorate([
|
40
40
|
(0, core_1.ManyToOne)({
|
41
41
|
entity: () => shipping_method_1.default,
|
@@ -46,21 +46,21 @@ __decorate([
|
|
46
46
|
}),
|
47
47
|
ShippingMethodIdIdIndex.MikroORMIndex(),
|
48
48
|
__metadata("design:type", String)
|
49
|
-
],
|
49
|
+
], OrderShippingMethodTaxLine.prototype, "shipping_method_id", void 0);
|
50
50
|
__decorate([
|
51
51
|
(0, core_1.BeforeCreate)(),
|
52
52
|
__metadata("design:type", Function),
|
53
53
|
__metadata("design:paramtypes", []),
|
54
54
|
__metadata("design:returntype", void 0)
|
55
|
-
],
|
55
|
+
], OrderShippingMethodTaxLine.prototype, "onCreate", null);
|
56
56
|
__decorate([
|
57
57
|
(0, core_1.OnInit)(),
|
58
58
|
__metadata("design:type", Function),
|
59
59
|
__metadata("design:paramtypes", []),
|
60
60
|
__metadata("design:returntype", void 0)
|
61
|
-
],
|
62
|
-
|
61
|
+
], OrderShippingMethodTaxLine.prototype, "onInit", null);
|
62
|
+
OrderShippingMethodTaxLine = __decorate([
|
63
63
|
(0, core_1.Entity)({ tableName: "order_shipping_method_tax_line" })
|
64
|
-
],
|
65
|
-
exports.default =
|
64
|
+
], OrderShippingMethodTaxLine);
|
65
|
+
exports.default = OrderShippingMethodTaxLine;
|
66
66
|
//# sourceMappingURL=shipping-method-tax-line.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"shipping-method-tax-line.js","sourceRoot":"","sources":["../../src/models/shipping-method-tax-line.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,
|
1
|
+
{"version":3,"file":"shipping-method-tax-line.js","sourceRoot":"","sources":["../../src/models/shipping-method-tax-line.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qDAGkC;AAClC,0CAA8E;AAC9E,wEAAmD;AACnD,0DAAgC;AAEhC,MAAM,uBAAuB,GAAG,IAAA,sCAA8B,EAAC;IAC7D,SAAS,EAAE,gCAAgC;IAC3C,OAAO,EAAE,oBAAoB;CAC9B,CAAC,CAAA;AAGa,IAAM,0BAA0B,GAAhC,MAAM,0BAA2B,SAAQ,kBAAO;IAiB7D,QAAQ;QACN,IAAI,CAAC,EAAE,GAAG,IAAA,wBAAgB,EAAC,IAAI,CAAC,EAAE,EAAE,UAAU,CAAC,CAAA;QAC/C,IAAI,CAAC,kBAAkB,KAAK,IAAI,CAAC,eAAe,EAAE,EAAE,CAAA;IACtD,CAAC;IAGD,MAAM;QACJ,IAAI,CAAC,EAAE,GAAG,IAAA,wBAAgB,EAAC,IAAI,CAAC,EAAE,EAAE,UAAU,CAAC,CAAA;QAC/C,IAAI,CAAC,kBAAkB,KAAK,IAAI,CAAC,eAAe,EAAE,EAAE,CAAA;IACtD,CAAC;CACF,CAAA;AAvBC;IAHC,IAAA,gBAAS,EAAC,GAAG,EAAE,CAAC,yBAAmB,EAAE;QACpC,OAAO,EAAE,KAAK;KACf,CAAC;;mEACuC;AAUzC;IARC,IAAA,gBAAS,EAAC;QACT,MAAM,EAAE,GAAG,EAAE,CAAC,yBAAmB;QACjC,SAAS,EAAE,oBAAoB;QAC/B,UAAU,EAAE,MAAM;QAClB,OAAO,EAAE,IAAI;QACb,QAAQ,EAAE,SAAS;KACpB,CAAC;IACD,uBAAuB,CAAC,aAAa,EAAE;;sEACd;AAG1B;IADC,IAAA,mBAAY,GAAE;;;;0DAId;AAGD;IADC,IAAA,aAAM,GAAE;;;;wDAIR;AA1BkB,0BAA0B;IAD9C,IAAA,aAAM,EAAC,EAAE,SAAS,EAAE,gCAAgC,EAAE,CAAC;GACnC,0BAA0B,CA2B9C;kBA3BoB,0BAA0B"}
|
@@ -1,22 +1,25 @@
|
|
1
|
-
import { BigNumberRawValue } from "@medusajs/types";
|
2
|
-
import { BigNumber } from "@medusajs/utils";
|
1
|
+
import { BigNumberRawValue } from "@medusajs/framework/types";
|
2
|
+
import { BigNumber } from "@medusajs/framework/utils";
|
3
3
|
import { Collection } from "@mikro-orm/core";
|
4
|
-
import
|
5
|
-
import
|
6
|
-
export default class
|
4
|
+
import OrderShippingMethodAdjustment from "./shipping-method-adjustment";
|
5
|
+
import OrderShippingMethodTaxLine from "./shipping-method-tax-line";
|
6
|
+
export default class OrderShippingMethod {
|
7
7
|
id: string;
|
8
8
|
name: string;
|
9
9
|
description: string | null;
|
10
10
|
amount: BigNumber | number;
|
11
11
|
raw_amount: BigNumberRawValue;
|
12
12
|
is_tax_inclusive: boolean;
|
13
|
+
is_custom_amount: boolean;
|
13
14
|
shipping_option_id: string | null;
|
14
15
|
data: Record<string, unknown> | null;
|
15
16
|
metadata: Record<string, unknown> | null;
|
16
|
-
tax_lines: Collection<
|
17
|
-
adjustments: Collection<
|
17
|
+
tax_lines: Collection<OrderShippingMethodTaxLine, object>;
|
18
|
+
adjustments: Collection<OrderShippingMethodAdjustment, object>;
|
18
19
|
created_at: Date;
|
19
20
|
updated_at: Date;
|
21
|
+
deleted_at: Date | null;
|
20
22
|
onCreate(): void;
|
21
23
|
onInit(): void;
|
22
24
|
}
|
25
|
+
//# sourceMappingURL=shipping-method.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"shipping-method.d.ts","sourceRoot":"","sources":["../../src/models/shipping-method.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,EACL,SAAS,EAKV,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAGL,UAAU,EAQX,MAAM,iBAAiB,CAAA;AACxB,OAAO,6BAA6B,MAAM,8BAA8B,CAAA;AACxE,OAAO,0BAA0B,MAAM,4BAA4B,CAAA;AAgBnE,MAAM,CAAC,OAAO,OAAO,mBAAmB;IAEtC,EAAE,EAAE,MAAM,CAAA;IAGV,IAAI,EAAE,MAAM,CAAA;IAGZ,WAAW,EAAE,MAAM,GAAG,IAAI,CAAO;IAGjC,MAAM,EAAE,SAAS,GAAG,MAAM,CAAA;IAG1B,UAAU,EAAE,iBAAiB,CAAA;IAG7B,gBAAgB,EAAE,OAAO,CAAQ;IAGjC,gBAAgB,EAAE,OAAO,CAAQ;IAOjC,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAO;IAGxC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAO;IAG3C,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAO;IAS/C,SAAS,iDAAwD;IASjE,WAAW,oDAA2D;IAOtE,UAAU,EAAE,IAAI,CAAA;IAQhB,UAAU,EAAE,IAAI,CAAA;IAIhB,UAAU,EAAE,IAAI,GAAG,IAAI,CAAO;IAG9B,QAAQ;IAIR,MAAM;CAGP"}
|
@@ -12,23 +12,31 @@ 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 shipping_method_adjustment_1 = __importDefault(require("./shipping-method-adjustment"));
|
18
18
|
const shipping_method_tax_line_1 = __importDefault(require("./shipping-method-tax-line"));
|
19
|
+
const DeletedAtIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
20
|
+
tableName: "order_shipping_method",
|
21
|
+
columns: "deleted_at",
|
22
|
+
where: "deleted_at IS NOT NULL",
|
23
|
+
});
|
19
24
|
const ShippingOptionIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
20
25
|
tableName: "order_shipping_method",
|
21
26
|
columns: "shipping_option_id",
|
27
|
+
where: "deleted_at IS NOT NULL",
|
22
28
|
});
|
23
|
-
let
|
29
|
+
let OrderShippingMethod = class OrderShippingMethod {
|
24
30
|
constructor() {
|
25
31
|
this.description = null;
|
26
32
|
this.is_tax_inclusive = false;
|
33
|
+
this.is_custom_amount = false;
|
27
34
|
this.shipping_option_id = null;
|
28
35
|
this.data = null;
|
29
36
|
this.metadata = null;
|
30
37
|
this.tax_lines = new core_1.Collection(this);
|
31
38
|
this.adjustments = new core_1.Collection(this);
|
39
|
+
this.deleted_at = null;
|
32
40
|
}
|
33
41
|
onCreate() {
|
34
42
|
this.id = (0, utils_1.generateEntityId)(this.id, "ordsm");
|
@@ -40,27 +48,31 @@ let ShippingMethod = class ShippingMethod {
|
|
40
48
|
__decorate([
|
41
49
|
(0, core_1.PrimaryKey)({ columnType: "text" }),
|
42
50
|
__metadata("design:type", String)
|
43
|
-
],
|
51
|
+
], OrderShippingMethod.prototype, "id", void 0);
|
44
52
|
__decorate([
|
45
53
|
(0, core_1.Property)({ columnType: "text" }),
|
46
54
|
__metadata("design:type", String)
|
47
|
-
],
|
55
|
+
], OrderShippingMethod.prototype, "name", void 0);
|
48
56
|
__decorate([
|
49
57
|
(0, core_1.Property)({ columnType: "jsonb", nullable: true }),
|
50
58
|
__metadata("design:type", Object)
|
51
|
-
],
|
59
|
+
], OrderShippingMethod.prototype, "description", void 0);
|
52
60
|
__decorate([
|
53
61
|
(0, utils_1.MikroOrmBigNumberProperty)(),
|
54
62
|
__metadata("design:type", Object)
|
55
|
-
],
|
63
|
+
], OrderShippingMethod.prototype, "amount", void 0);
|
56
64
|
__decorate([
|
57
65
|
(0, core_1.Property)({ columnType: "jsonb" }),
|
58
66
|
__metadata("design:type", Object)
|
59
|
-
],
|
67
|
+
], OrderShippingMethod.prototype, "raw_amount", void 0);
|
60
68
|
__decorate([
|
61
69
|
(0, core_1.Property)({ columnType: "boolean" }),
|
62
|
-
__metadata("design:type",
|
63
|
-
],
|
70
|
+
__metadata("design:type", Boolean)
|
71
|
+
], OrderShippingMethod.prototype, "is_tax_inclusive", void 0);
|
72
|
+
__decorate([
|
73
|
+
(0, core_1.Property)({ columnType: "boolean", default: false }),
|
74
|
+
__metadata("design:type", Boolean)
|
75
|
+
], OrderShippingMethod.prototype, "is_custom_amount", void 0);
|
64
76
|
__decorate([
|
65
77
|
(0, core_1.Property)({
|
66
78
|
columnType: "text",
|
@@ -68,27 +80,27 @@ __decorate([
|
|
68
80
|
}),
|
69
81
|
ShippingOptionIdIndex.MikroORMIndex(),
|
70
82
|
__metadata("design:type", Object)
|
71
|
-
],
|
83
|
+
], OrderShippingMethod.prototype, "shipping_option_id", void 0);
|
72
84
|
__decorate([
|
73
85
|
(0, core_1.Property)({ columnType: "jsonb", nullable: true }),
|
74
86
|
__metadata("design:type", Object)
|
75
|
-
],
|
87
|
+
], OrderShippingMethod.prototype, "data", void 0);
|
76
88
|
__decorate([
|
77
89
|
(0, core_1.Property)({ columnType: "jsonb", nullable: true }),
|
78
90
|
__metadata("design:type", Object)
|
79
|
-
],
|
91
|
+
], OrderShippingMethod.prototype, "metadata", void 0);
|
80
92
|
__decorate([
|
81
93
|
(0, core_1.OneToMany)(() => shipping_method_tax_line_1.default, (taxLine) => taxLine.shipping_method, {
|
82
|
-
cascade: [core_1.Cascade.PERSIST],
|
94
|
+
cascade: [core_1.Cascade.PERSIST, "soft-remove"],
|
83
95
|
}),
|
84
96
|
__metadata("design:type", Object)
|
85
|
-
],
|
97
|
+
], OrderShippingMethod.prototype, "tax_lines", void 0);
|
86
98
|
__decorate([
|
87
99
|
(0, core_1.OneToMany)(() => shipping_method_adjustment_1.default, (adjustment) => adjustment.shipping_method, {
|
88
|
-
cascade: [core_1.Cascade.PERSIST],
|
100
|
+
cascade: [core_1.Cascade.PERSIST, "soft-remove"],
|
89
101
|
}),
|
90
102
|
__metadata("design:type", Object)
|
91
|
-
],
|
103
|
+
], OrderShippingMethod.prototype, "adjustments", void 0);
|
92
104
|
__decorate([
|
93
105
|
(0, core_1.Property)({
|
94
106
|
onCreate: () => new Date(),
|
@@ -96,7 +108,7 @@ __decorate([
|
|
96
108
|
defaultRaw: "now()",
|
97
109
|
}),
|
98
110
|
__metadata("design:type", Date)
|
99
|
-
],
|
111
|
+
], OrderShippingMethod.prototype, "created_at", void 0);
|
100
112
|
__decorate([
|
101
113
|
(0, core_1.Property)({
|
102
114
|
onCreate: () => new Date(),
|
@@ -105,21 +117,27 @@ __decorate([
|
|
105
117
|
defaultRaw: "now()",
|
106
118
|
}),
|
107
119
|
__metadata("design:type", Date)
|
108
|
-
],
|
120
|
+
], OrderShippingMethod.prototype, "updated_at", void 0);
|
121
|
+
__decorate([
|
122
|
+
(0, core_1.Property)({ columnType: "timestamptz", nullable: true }),
|
123
|
+
DeletedAtIndex.MikroORMIndex(),
|
124
|
+
__metadata("design:type", Object)
|
125
|
+
], OrderShippingMethod.prototype, "deleted_at", void 0);
|
109
126
|
__decorate([
|
110
127
|
(0, core_1.BeforeCreate)(),
|
111
128
|
__metadata("design:type", Function),
|
112
129
|
__metadata("design:paramtypes", []),
|
113
130
|
__metadata("design:returntype", void 0)
|
114
|
-
],
|
131
|
+
], OrderShippingMethod.prototype, "onCreate", null);
|
115
132
|
__decorate([
|
116
133
|
(0, core_1.OnInit)(),
|
117
134
|
__metadata("design:type", Function),
|
118
135
|
__metadata("design:paramtypes", []),
|
119
136
|
__metadata("design:returntype", void 0)
|
120
|
-
],
|
121
|
-
|
122
|
-
(0, core_1.Entity)({ tableName: "order_shipping_method" })
|
123
|
-
|
124
|
-
|
137
|
+
], OrderShippingMethod.prototype, "onInit", null);
|
138
|
+
OrderShippingMethod = __decorate([
|
139
|
+
(0, core_1.Entity)({ tableName: "order_shipping_method" }),
|
140
|
+
(0, core_1.Filter)(utils_1.DALUtils.mikroOrmSoftDeletableFilterOptions)
|
141
|
+
], OrderShippingMethod);
|
142
|
+
exports.default = OrderShippingMethod;
|
125
143
|
//# sourceMappingURL=shipping-method.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"shipping-method.js","sourceRoot":"","sources":["../../src/models/shipping-method.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,
|
1
|
+
{"version":3,"file":"shipping-method.js","sourceRoot":"","sources":["../../src/models/shipping-method.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,qDAMkC;AAClC,0CAWwB;AACxB,8FAAwE;AACxE,0FAAmE;AAEnE,MAAM,cAAc,GAAG,IAAA,sCAA8B,EAAC;IACpD,SAAS,EAAE,uBAAuB;IAClC,OAAO,EAAE,YAAY;IACrB,KAAK,EAAE,wBAAwB;CAChC,CAAC,CAAA;AAEF,MAAM,qBAAqB,GAAG,IAAA,sCAA8B,EAAC;IAC3D,SAAS,EAAE,uBAAuB;IAClC,OAAO,EAAE,oBAAoB;IAC7B,KAAK,EAAE,wBAAwB;CAChC,CAAC,CAAA;AAIa,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAAzB;QAQb,gBAAW,GAAkB,IAAI,CAAA;QASjC,qBAAgB,GAAY,KAAK,CAAA;QAGjC,qBAAgB,GAAY,KAAK,CAAA;QAOj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AM,EAAC,gBAAQ,CAAC,kCAAkC,CAAC;GAC/B,mBAAmB,CAgFvC;kBAhFoB,mBAAmB"}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { BigNumberRawValue } from "@medusajs/types";
|
2
|
-
import { BigNumber } from "@medusajs/utils";
|
1
|
+
import { BigNumberRawValue } from "@medusajs/framework/types";
|
2
|
+
import { BigNumber } from "@medusajs/framework/utils";
|
3
3
|
/**
|
4
4
|
* As per the Mikro ORM docs, superclasses should use the abstract class definition
|
5
5
|
* Source: https://mikro-orm.io/docs/inheritance-mapping
|
@@ -14,4 +14,6 @@ export default abstract class TaxLine {
|
|
14
14
|
provider_id?: string | null;
|
15
15
|
created_at: Date;
|
16
16
|
updated_at: Date;
|
17
|
+
deleted_at: Date | null;
|
17
18
|
}
|
19
|
+
//# sourceMappingURL=tax-line.d.ts.map
|