@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,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.Migration20240827133639 = void 0;
|
4
|
+
const migrations_1 = require("@mikro-orm/migrations");
|
5
|
+
class Migration20240827133639 extends migrations_1.Migration {
|
6
|
+
async up() {
|
7
|
+
this.addSql('alter table if exists "return_item" add column if not exists "damaged_quantity" numeric not null default 0, add column if not exists "raw_damaged_quantity" jsonb;');
|
8
|
+
this.addSql(`UPDATE "return_item" SET raw_damaged_quantity = '{"value": "0", "precision": 20}'::jsonb;`);
|
9
|
+
this.addSql('ALTER TABLE IF EXISTS "return_item" ALTER COLUMN "raw_damaged_quantity" SET NOT NULL;');
|
10
|
+
}
|
11
|
+
async down() {
|
12
|
+
this.addSql('alter table if exists "return_item" drop column if exists "damaged_quantity";');
|
13
|
+
this.addSql('alter table if exists "return_item" drop column if exists "raw_damaged_quantity";');
|
14
|
+
}
|
15
|
+
}
|
16
|
+
exports.Migration20240827133639 = Migration20240827133639;
|
17
|
+
//# sourceMappingURL=Migration20240827133639.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Migration20240827133639.js","sourceRoot":"","sources":["../../src/migrations/Migration20240827133639.ts"],"names":[],"mappings":";;;AAAA,sDAAiD;AAEjD,MAAa,uBAAwB,SAAQ,sBAAS;IACpD,KAAK,CAAC,EAAE;QACN,IAAI,CAAC,MAAM,CACT,oKAAoK,CACrK,CAAA;QAED,IAAI,CAAC,MAAM,CACT,2FAA2F,CAC5F,CAAA;QAED,IAAI,CAAC,MAAM,CACT,uFAAuF,CACxF,CAAA;IACH,CAAC;IAED,KAAK,CAAC,IAAI;QACR,IAAI,CAAC,MAAM,CACT,+EAA+E,CAChF,CAAA;QACD,IAAI,CAAC,MAAM,CACT,mFAAmF,CACpF,CAAA;IACH,CAAC;CACF;AAvBD,0DAuBC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Migration20240902195921.d.ts","sourceRoot":"","sources":["../../src/migrations/Migration20240902195921.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,qBAAa,uBAAwB,SAAQ,SAAS;IAE9C,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;IAMnB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAM5B"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.Migration20240902195921 = void 0;
|
4
|
+
const migrations_1 = require("@mikro-orm/migrations");
|
5
|
+
class Migration20240902195921 extends migrations_1.Migration {
|
6
|
+
async up() {
|
7
|
+
this.addSql('alter table if exists "order_line_item" add column if not exists "is_custom_price" boolean not null default false;');
|
8
|
+
this.addSql('alter table if exists "order_shipping_method" add column if not exists "is_custom_amount" boolean not null default false;');
|
9
|
+
}
|
10
|
+
async down() {
|
11
|
+
this.addSql('alter table if exists "order_line_item" drop column if exists "is_custom_price";');
|
12
|
+
this.addSql('alter table if exists "order_shipping_method" drop column if exists "is_custom_amount";');
|
13
|
+
}
|
14
|
+
}
|
15
|
+
exports.Migration20240902195921 = Migration20240902195921;
|
16
|
+
//# sourceMappingURL=Migration20240902195921.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Migration20240902195921.js","sourceRoot":"","sources":["../../src/migrations/Migration20240902195921.ts"],"names":[],"mappings":";;;AAAA,sDAAkD;AAElD,MAAa,uBAAwB,SAAQ,sBAAS;IAEpD,KAAK,CAAC,EAAE;QACN,IAAI,CAAC,MAAM,CAAC,oHAAoH,CAAC,CAAC;QAElI,IAAI,CAAC,MAAM,CAAC,2HAA2H,CAAC,CAAC;IAC3I,CAAC;IAED,KAAK,CAAC,IAAI;QACR,IAAI,CAAC,MAAM,CAAC,kFAAkF,CAAC,CAAC;QAEhG,IAAI,CAAC,MAAM,CAAC,yFAAyF,CAAC,CAAC;IACzG,CAAC;CAEF;AAdD,0DAcC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Migration20240913092514.d.ts","sourceRoot":"","sources":["../../src/migrations/Migration20240913092514.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEjD,qBAAa,uBAAwB,SAAQ,SAAS;IAC9C,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;IAcnB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAQ5B"}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.Migration20240913092514 = void 0;
|
4
|
+
const migrations_1 = require("@mikro-orm/migrations");
|
5
|
+
class Migration20240913092514 extends migrations_1.Migration {
|
6
|
+
async up() {
|
7
|
+
this.addSql('alter table if exists "order_item" add column if not exists "delivered_quantity" numeric not null default 0, add column if not exists "raw_delivered_quantity" jsonb;');
|
8
|
+
this.addSql(`UPDATE "order_item" SET raw_delivered_quantity = '{"value": "0", "precision": 20}'::jsonb;`);
|
9
|
+
this.addSql('ALTER TABLE IF EXISTS "order_item" ALTER COLUMN "raw_delivered_quantity" SET NOT NULL;');
|
10
|
+
}
|
11
|
+
async down() {
|
12
|
+
this.addSql('alter table if exists "order_item" drop column if exists "delivered_quantity";');
|
13
|
+
this.addSql('alter table if exists "order_item" drop column if exists "raw_delivered_quantity";');
|
14
|
+
}
|
15
|
+
}
|
16
|
+
exports.Migration20240913092514 = Migration20240913092514;
|
17
|
+
//# sourceMappingURL=Migration20240913092514.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Migration20240913092514.js","sourceRoot":"","sources":["../../src/migrations/Migration20240913092514.ts"],"names":[],"mappings":";;;AAAA,sDAAiD;AAEjD,MAAa,uBAAwB,SAAQ,sBAAS;IACpD,KAAK,CAAC,EAAE;QACN,IAAI,CAAC,MAAM,CACT,uKAAuK,CACxK,CAAA;QAED,IAAI,CAAC,MAAM,CACT,4FAA4F,CAC7F,CAAA;QAED,IAAI,CAAC,MAAM,CACT,wFAAwF,CACzF,CAAA;IACH,CAAC;IAED,KAAK,CAAC,IAAI;QACR,IAAI,CAAC,MAAM,CACT,gFAAgF,CACjF,CAAA;QACD,IAAI,CAAC,MAAM,CACT,oFAAoF,CACrF,CAAA;IACH,CAAC;CACF;AAvBD,0DAuBC"}
|
package/dist/models/address.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
import { DAL } from "@medusajs/types";
|
1
|
+
import { DAL } from "@medusajs/framework/types";
|
2
2
|
import { OptionalProps } from "@mikro-orm/core";
|
3
|
-
type OptionalAddressProps = DAL.
|
4
|
-
export default class
|
3
|
+
type OptionalAddressProps = DAL.ModelDateColumns;
|
4
|
+
export default class OrderAddress {
|
5
5
|
[OptionalProps]: OptionalAddressProps;
|
6
6
|
id: string;
|
7
7
|
customer_id: string | null;
|
@@ -22,3 +22,4 @@ export default class Address {
|
|
22
22
|
onInit(): void;
|
23
23
|
}
|
24
24
|
export {};
|
25
|
+
//# sourceMappingURL=address.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"address.d.ts","sourceRoot":"","sources":["../../src/models/address.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAA;AAK/C,OAAO,EAIL,aAAa,EAGd,MAAM,iBAAiB,CAAA;AAExB,KAAK,oBAAoB,GAAG,GAAG,CAAC,gBAAgB,CAAA;AAQhD,MAAM,CAAC,OAAO,OAAO,YAAY;IAC/B,CAAC,aAAa,CAAC,EAAE,oBAAoB,CAAA;IAGrC,EAAE,EAAG,MAAM,CAAA;IAIX,WAAW,EAAE,MAAM,GAAG,IAAI,CAAO;IAGjC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAO;IAG7B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAO;IAGhC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAO;IAG/B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAO;IAG/B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAO;IAG/B,IAAI,EAAE,MAAM,GAAG,IAAI,CAAO;IAG1B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAO;IAGlC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAO;IAG9B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAO;IAGjC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAO;IAG3B,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAO;IAO/C,UAAU,EAAE,IAAI,CAAA;IAQhB,UAAU,EAAE,IAAI,CAAA;IAGhB,QAAQ;IAKR,MAAM;CAGP"}
|
package/dist/models/address.js
CHANGED
@@ -9,13 +9,13 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
10
10
|
};
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
const utils_1 = require("@medusajs/utils");
|
12
|
+
const utils_1 = require("@medusajs/framework/utils");
|
13
13
|
const core_1 = require("@mikro-orm/core");
|
14
14
|
const CustomerIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
15
15
|
tableName: "order_address",
|
16
16
|
columns: "customer_id",
|
17
17
|
});
|
18
|
-
let
|
18
|
+
let OrderAddress = class OrderAddress {
|
19
19
|
constructor() {
|
20
20
|
this.customer_id = null;
|
21
21
|
this.company = null;
|
@@ -40,56 +40,56 @@ let Address = class Address {
|
|
40
40
|
__decorate([
|
41
41
|
(0, core_1.PrimaryKey)({ columnType: "text" }),
|
42
42
|
__metadata("design:type", String)
|
43
|
-
],
|
43
|
+
], OrderAddress.prototype, "id", void 0);
|
44
44
|
__decorate([
|
45
45
|
(0, core_1.Property)({ columnType: "text", nullable: true }),
|
46
46
|
CustomerIdIndex.MikroORMIndex(),
|
47
47
|
__metadata("design:type", Object)
|
48
|
-
],
|
48
|
+
], OrderAddress.prototype, "customer_id", void 0);
|
49
49
|
__decorate([
|
50
50
|
(0, core_1.Property)({ columnType: "text", nullable: true }),
|
51
51
|
__metadata("design:type", Object)
|
52
|
-
],
|
52
|
+
], OrderAddress.prototype, "company", void 0);
|
53
53
|
__decorate([
|
54
54
|
(0, core_1.Property)({ columnType: "text", nullable: true }),
|
55
55
|
__metadata("design:type", Object)
|
56
|
-
],
|
56
|
+
], OrderAddress.prototype, "first_name", void 0);
|
57
57
|
__decorate([
|
58
58
|
(0, core_1.Property)({ columnType: "text", nullable: true }),
|
59
59
|
__metadata("design:type", Object)
|
60
|
-
],
|
60
|
+
], OrderAddress.prototype, "last_name", void 0);
|
61
61
|
__decorate([
|
62
62
|
(0, core_1.Property)({ columnType: "text", nullable: true }),
|
63
63
|
__metadata("design:type", Object)
|
64
|
-
],
|
64
|
+
], OrderAddress.prototype, "address_1", void 0);
|
65
65
|
__decorate([
|
66
66
|
(0, core_1.Property)({ columnType: "text", nullable: true }),
|
67
67
|
__metadata("design:type", Object)
|
68
|
-
],
|
68
|
+
], OrderAddress.prototype, "address_2", void 0);
|
69
69
|
__decorate([
|
70
70
|
(0, core_1.Property)({ columnType: "text", nullable: true }),
|
71
71
|
__metadata("design:type", Object)
|
72
|
-
],
|
72
|
+
], OrderAddress.prototype, "city", void 0);
|
73
73
|
__decorate([
|
74
74
|
(0, core_1.Property)({ columnType: "text", nullable: true }),
|
75
75
|
__metadata("design:type", Object)
|
76
|
-
],
|
76
|
+
], OrderAddress.prototype, "country_code", void 0);
|
77
77
|
__decorate([
|
78
78
|
(0, core_1.Property)({ columnType: "text", nullable: true }),
|
79
79
|
__metadata("design:type", Object)
|
80
|
-
],
|
80
|
+
], OrderAddress.prototype, "province", void 0);
|
81
81
|
__decorate([
|
82
82
|
(0, core_1.Property)({ columnType: "text", nullable: true }),
|
83
83
|
__metadata("design:type", Object)
|
84
|
-
],
|
84
|
+
], OrderAddress.prototype, "postal_code", void 0);
|
85
85
|
__decorate([
|
86
86
|
(0, core_1.Property)({ columnType: "text", nullable: true }),
|
87
87
|
__metadata("design:type", Object)
|
88
|
-
],
|
88
|
+
], OrderAddress.prototype, "phone", void 0);
|
89
89
|
__decorate([
|
90
90
|
(0, core_1.Property)({ columnType: "jsonb", nullable: true }),
|
91
91
|
__metadata("design:type", Object)
|
92
|
-
],
|
92
|
+
], OrderAddress.prototype, "metadata", void 0);
|
93
93
|
__decorate([
|
94
94
|
(0, core_1.Property)({
|
95
95
|
onCreate: () => new Date(),
|
@@ -97,7 +97,7 @@ __decorate([
|
|
97
97
|
defaultRaw: "now()",
|
98
98
|
}),
|
99
99
|
__metadata("design:type", Date)
|
100
|
-
],
|
100
|
+
], OrderAddress.prototype, "created_at", void 0);
|
101
101
|
__decorate([
|
102
102
|
(0, core_1.Property)({
|
103
103
|
onCreate: () => new Date(),
|
@@ -106,21 +106,21 @@ __decorate([
|
|
106
106
|
defaultRaw: "now()",
|
107
107
|
}),
|
108
108
|
__metadata("design:type", Date)
|
109
|
-
],
|
109
|
+
], OrderAddress.prototype, "updated_at", void 0);
|
110
110
|
__decorate([
|
111
111
|
(0, core_1.BeforeCreate)(),
|
112
112
|
__metadata("design:type", Function),
|
113
113
|
__metadata("design:paramtypes", []),
|
114
114
|
__metadata("design:returntype", void 0)
|
115
|
-
],
|
115
|
+
], OrderAddress.prototype, "onCreate", null);
|
116
116
|
__decorate([
|
117
117
|
(0, core_1.OnInit)(),
|
118
118
|
__metadata("design:type", Function),
|
119
119
|
__metadata("design:paramtypes", []),
|
120
120
|
__metadata("design:returntype", void 0)
|
121
|
-
],
|
122
|
-
|
121
|
+
], OrderAddress.prototype, "onInit", null);
|
122
|
+
OrderAddress = __decorate([
|
123
123
|
(0, core_1.Entity)({ tableName: "order_address" })
|
124
|
-
],
|
125
|
-
exports.default =
|
124
|
+
], OrderAddress);
|
125
|
+
exports.default = OrderAddress;
|
126
126
|
//# sourceMappingURL=address.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"address.js","sourceRoot":"","sources":["../../src/models/address.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,
|
1
|
+
{"version":3,"file":"address.js","sourceRoot":"","sources":["../../src/models/address.ts"],"names":[],"mappings":"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"}
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import { BigNumberRawValue, DAL } from "@medusajs/types";
|
2
|
-
import { BigNumber } from "@medusajs/utils";
|
1
|
+
import { BigNumberRawValue, DAL } from "@medusajs/framework/types";
|
2
|
+
import { BigNumber } from "@medusajs/framework/utils";
|
3
3
|
import { OptionalProps } from "@mikro-orm/core";
|
4
|
-
type OptionalAdjustmentLineProps = DAL.
|
4
|
+
type OptionalAdjustmentLineProps = DAL.ModelDateColumns;
|
5
5
|
/**
|
6
6
|
* As per the Mikro ORM docs, superclasses should use the abstract class definition
|
7
7
|
* Source: https://mikro-orm.io/docs/inheritance-mapping
|
@@ -17,5 +17,7 @@ export default abstract class AdjustmentLine {
|
|
17
17
|
provider_id: string | null;
|
18
18
|
created_at: Date;
|
19
19
|
updated_at: Date;
|
20
|
+
deleted_at: Date | null;
|
20
21
|
}
|
21
22
|
export {};
|
23
|
+
//# sourceMappingURL=adjustment-line.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"adjustment-line.d.ts","sourceRoot":"","sources":["../../src/models/adjustment-line.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAA;AAClE,OAAO,EAAE,SAAS,EAA6B,MAAM,2BAA2B,CAAA;AAChF,OAAO,EAAE,aAAa,EAAwB,MAAM,iBAAiB,CAAA;AAErE,KAAK,2BAA2B,GAAG,GAAG,CAAC,gBAAgB,CAAA;AAEvD;;;GAGG;AACH,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,cAAc;IAC1C,CAAC,aAAa,CAAC,EAAE,2BAA2B,CAAA;IAG5C,EAAE,EAAE,MAAM,CAAA;IAGV,WAAW,EAAE,MAAM,GAAG,IAAI,CAAO;IAMjC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAO;IAGlC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAO;IAG1B,MAAM,EAAE,SAAS,GAAG,MAAM,CAAA;IAG1B,UAAU,EAAE,iBAAiB,CAAA;IAG7B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAO;IAOjC,UAAU,EAAE,IAAI,CAAA;IAQhB,UAAU,EAAE,IAAI,CAAA;IAGhB,UAAU,EAAE,IAAI,GAAG,IAAI,CAAO;CAC/B"}
|
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
10
10
|
};
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
const utils_1 = require("@medusajs/utils");
|
12
|
+
const utils_1 = require("@medusajs/framework/utils");
|
13
13
|
const core_1 = require("@mikro-orm/core");
|
14
14
|
/**
|
15
15
|
* As per the Mikro ORM docs, superclasses should use the abstract class definition
|
@@ -21,6 +21,7 @@ class AdjustmentLine {
|
|
21
21
|
this.promotion_id = null;
|
22
22
|
this.code = null;
|
23
23
|
this.provider_id = null;
|
24
|
+
this.deleted_at = null;
|
24
25
|
}
|
25
26
|
}
|
26
27
|
exports.default = AdjustmentLine;
|
@@ -72,4 +73,8 @@ __decorate([
|
|
72
73
|
}),
|
73
74
|
__metadata("design:type", Date)
|
74
75
|
], AdjustmentLine.prototype, "updated_at", void 0);
|
76
|
+
__decorate([
|
77
|
+
(0, core_1.Property)({ columnType: "timestamptz", nullable: true }),
|
78
|
+
__metadata("design:type", Object)
|
79
|
+
], AdjustmentLine.prototype, "deleted_at", void 0);
|
75
80
|
//# sourceMappingURL=adjustment-line.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"adjustment-line.js","sourceRoot":"","sources":["../../src/models/adjustment-line.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,
|
1
|
+
{"version":3,"file":"adjustment-line.js","sourceRoot":"","sources":["../../src/models/adjustment-line.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,qDAAgF;AAChF,0CAAqE;AAIrE;;;GAGG;AACH,MAA8B,cAAc;IAA5C;QAOE,gBAAW,GAAkB,IAAI,CAAA;QAMjC,iBAAY,GAAkB,IAAI,CAAA;QAGlC,SAAI,GAAkB,IAAI,CAAA;QAS1B,gBAAW,GAAkB,IAAI,CAAA;QAkBjC,eAAU,GAAgB,IAAI,CAAA;IAChC,CAAC;CAAA;AA5CD,iCA4CC;AAxCC;IADC,IAAA,iBAAU,EAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC;;0CACzB;AAGV;IADC,IAAA,eAAQ,EAAC,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDAChB;AAMjC;IAJC,IAAA,eAAQ,EAAC;QACR,UAAU,EAAE,MAAM;QAClB,QAAQ,EAAE,IAAI;KACf,CAAC;;oDACgC;AAGlC;IADC,IAAA,eAAQ,EAAC,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACvB;AAG1B;IADC,IAAA,iCAAyB,GAAE;;8CACF;AAG1B;IADC,IAAA,eAAQ,EAAC,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC;;kDACL;AAG7B;IADC,IAAA,eAAQ,EAAC,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDAChB;AAOjC;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;kDAAA;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;kDAAA;AAGhB;IADC,IAAA,eAAQ,EAAC,EAAE,UAAU,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDAC1B"}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { DAL } from "@medusajs/framework/types";
|
2
|
+
import { OptionalProps, Rel } from "@mikro-orm/core";
|
3
|
+
import ClaimItem from "./claim-item";
|
4
|
+
type OptionalClaimItemImageProps = DAL.ModelDateColumns;
|
5
|
+
export default class OrderClaimItemImage {
|
6
|
+
[OptionalProps]?: OptionalClaimItemImageProps;
|
7
|
+
id: string;
|
8
|
+
claim_item_id: string;
|
9
|
+
item: Rel<ClaimItem>;
|
10
|
+
url: string;
|
11
|
+
metadata: Record<string, unknown> | null;
|
12
|
+
created_at: Date;
|
13
|
+
updated_at: Date;
|
14
|
+
deleted_at: Date | null;
|
15
|
+
onCreate(): void;
|
16
|
+
onInit(): void;
|
17
|
+
}
|
18
|
+
export {};
|
19
|
+
//# sourceMappingURL=claim-item-image.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"claim-item-image.d.ts","sourceRoot":"","sources":["../../src/models/claim-item-image.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAA;AAM/C,OAAO,EAML,aAAa,EAGb,GAAG,EACJ,MAAM,iBAAiB,CAAA;AACxB,OAAO,SAAS,MAAM,cAAc,CAAA;AAEpC,KAAK,2BAA2B,GAAG,GAAG,CAAC,gBAAgB,CAAA;AAgBvD,MAAM,CAAC,OAAO,OAAO,mBAAmB;IACtC,CAAC,aAAa,CAAC,CAAC,EAAE,2BAA2B,CAAA;IAG7C,EAAE,EAAE,MAAM,CAAA;IASV,aAAa,EAAE,MAAM,CAAA;IAKrB,IAAI,EAAE,GAAG,CAAC,SAAS,CAAC,CAAA;IAGpB,GAAG,EAAE,MAAM,CAAA;IAGX,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,109 @@
|
|
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 claim_item_1 = __importDefault(require("./claim-item"));
|
18
|
+
const ClaimItemImageDeletedAtIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
19
|
+
tableName: "order_claim_item_image",
|
20
|
+
columns: "deleted_at",
|
21
|
+
where: "deleted_at IS NOT NULL",
|
22
|
+
});
|
23
|
+
const ClaimItemIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
24
|
+
tableName: "order_claim_item_image",
|
25
|
+
columns: ["claim_item_id"],
|
26
|
+
where: "deleted_at IS NOT NULL",
|
27
|
+
});
|
28
|
+
let OrderClaimItemImage = class OrderClaimItemImage {
|
29
|
+
constructor() {
|
30
|
+
this.metadata = null;
|
31
|
+
this.deleted_at = null;
|
32
|
+
}
|
33
|
+
onCreate() {
|
34
|
+
this.id = (0, utils_1.generateEntityId)(this.id, "climg");
|
35
|
+
this.claim_item_id ??= this.item?.id;
|
36
|
+
}
|
37
|
+
onInit() {
|
38
|
+
this.id = (0, utils_1.generateEntityId)(this.id, "climg");
|
39
|
+
this.claim_item_id ??= this.item?.id;
|
40
|
+
}
|
41
|
+
};
|
42
|
+
__decorate([
|
43
|
+
(0, core_1.PrimaryKey)({ columnType: "text" }),
|
44
|
+
__metadata("design:type", String)
|
45
|
+
], OrderClaimItemImage.prototype, "id", void 0);
|
46
|
+
__decorate([
|
47
|
+
(0, core_1.ManyToOne)({
|
48
|
+
entity: () => claim_item_1.default,
|
49
|
+
mapToPk: true,
|
50
|
+
fieldName: "claim_item_id",
|
51
|
+
columnType: "text",
|
52
|
+
}),
|
53
|
+
ClaimItemIdIndex.MikroORMIndex(),
|
54
|
+
__metadata("design:type", String)
|
55
|
+
], OrderClaimItemImage.prototype, "claim_item_id", void 0);
|
56
|
+
__decorate([
|
57
|
+
(0, core_1.ManyToOne)(() => claim_item_1.default, {
|
58
|
+
persist: false,
|
59
|
+
}),
|
60
|
+
__metadata("design:type", Object)
|
61
|
+
], OrderClaimItemImage.prototype, "item", void 0);
|
62
|
+
__decorate([
|
63
|
+
(0, core_1.Property)({ columnType: "text" }),
|
64
|
+
__metadata("design:type", String)
|
65
|
+
], OrderClaimItemImage.prototype, "url", void 0);
|
66
|
+
__decorate([
|
67
|
+
(0, core_1.Property)({ columnType: "jsonb", nullable: true }),
|
68
|
+
__metadata("design:type", Object)
|
69
|
+
], OrderClaimItemImage.prototype, "metadata", void 0);
|
70
|
+
__decorate([
|
71
|
+
(0, core_1.Property)({
|
72
|
+
onCreate: () => new Date(),
|
73
|
+
columnType: "timestamptz",
|
74
|
+
defaultRaw: "now()",
|
75
|
+
}),
|
76
|
+
__metadata("design:type", Date)
|
77
|
+
], OrderClaimItemImage.prototype, "created_at", void 0);
|
78
|
+
__decorate([
|
79
|
+
(0, core_1.Property)({
|
80
|
+
onCreate: () => new Date(),
|
81
|
+
onUpdate: () => new Date(),
|
82
|
+
columnType: "timestamptz",
|
83
|
+
defaultRaw: "now()",
|
84
|
+
}),
|
85
|
+
__metadata("design:type", Date)
|
86
|
+
], OrderClaimItemImage.prototype, "updated_at", void 0);
|
87
|
+
__decorate([
|
88
|
+
(0, core_1.Property)({ columnType: "timestamptz", nullable: true }),
|
89
|
+
ClaimItemImageDeletedAtIndex.MikroORMIndex(),
|
90
|
+
__metadata("design:type", Object)
|
91
|
+
], OrderClaimItemImage.prototype, "deleted_at", void 0);
|
92
|
+
__decorate([
|
93
|
+
(0, core_1.BeforeCreate)(),
|
94
|
+
__metadata("design:type", Function),
|
95
|
+
__metadata("design:paramtypes", []),
|
96
|
+
__metadata("design:returntype", void 0)
|
97
|
+
], OrderClaimItemImage.prototype, "onCreate", null);
|
98
|
+
__decorate([
|
99
|
+
(0, core_1.OnInit)(),
|
100
|
+
__metadata("design:type", Function),
|
101
|
+
__metadata("design:paramtypes", []),
|
102
|
+
__metadata("design:returntype", void 0)
|
103
|
+
], OrderClaimItemImage.prototype, "onInit", null);
|
104
|
+
OrderClaimItemImage = __decorate([
|
105
|
+
(0, core_1.Entity)({ tableName: "order_claim_item_image" }),
|
106
|
+
(0, core_1.Filter)(utils_1.DALUtils.mikroOrmSoftDeletableFilterOptions)
|
107
|
+
], OrderClaimItemImage);
|
108
|
+
exports.default = OrderClaimItemImage;
|
109
|
+
//# sourceMappingURL=claim-item-image.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"claim-item-image.js","sourceRoot":"","sources":["../../src/models/claim-item-image.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,qDAIkC;AAClC,0CAUwB;AACxB,8DAAoC;AAIpC,MAAM,4BAA4B,GAAG,IAAA,sCAA8B,EAAC;IAClE,SAAS,EAAE,wBAAwB;IACnC,OAAO,EAAE,YAAY;IACrB,KAAK,EAAE,wBAAwB;CAChC,CAAC,CAAA;AAEF,MAAM,gBAAgB,GAAG,IAAA,sCAA8B,EAAC;IACtD,SAAS,EAAE,wBAAwB;IACnC,OAAO,EAAE,CAAC,eAAe,CAAC;IAC1B,KAAK,EAAE,wBAAwB;CAChC,CAAC,CAAA;AAIa,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAAzB;QAwBb,aAAQ,GAAmC,IAAI,CAAA;QAmB/C,eAAU,GAAgB,IAAI,CAAA;IAahC,CAAC;IAVC,QAAQ;QACN,IAAI,CAAC,EAAE,GAAG,IAAA,wBAAgB,EAAC,IAAI,CAAC,EAAE,EAAE,OAAO,CAAC,CAAA;QAC5C,IAAI,CAAC,aAAa,KAAK,IAAI,CAAC,IAAI,EAAE,EAAE,CAAA;IACtC,CAAC;IAGD,MAAM;QACJ,IAAI,CAAC,EAAE,GAAG,IAAA,wBAAgB,EAAC,IAAI,CAAC,EAAE,EAAE,OAAO,CAAC,CAAA;QAC5C,IAAI,CAAC,aAAa,KAAK,IAAI,CAAC,IAAI,EAAE,EAAE,CAAA;IACtC,CAAC;CACF,CAAA;AApDC;IADC,IAAA,iBAAU,EAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC;;+CACzB;AASV;IAPC,IAAA,gBAAS,EAAC;QACT,MAAM,EAAE,GAAG,EAAE,CAAC,oBAAS;QACvB,OAAO,EAAE,IAAI;QACb,SAAS,EAAE,eAAe;QAC1B,UAAU,EAAE,MAAM;KACnB,CAAC;IACD,gBAAgB,CAAC,aAAa,EAAE;;0DACZ;AAKrB;IAHC,IAAA,gBAAS,EAAC,GAAG,EAAE,CAAC,oBAAS,EAAE;QAC1B,OAAO,EAAE,KAAK;KACf,CAAC;;iDACkB;AAGpB;IADC,IAAA,eAAQ,EAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC;;gDACtB;AAGX;IADC,IAAA,eAAQ,EAAC,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDACH;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;uDAAA;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;uDAAA;AAIhB;IAFC,IAAA,eAAQ,EAAC,EAAE,UAAU,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACvD,4BAA4B,CAAC,aAAa,EAAE;;uDACf;AAG9B;IADC,IAAA,mBAAY,GAAE;;;;mDAId;AAGD;IADC,IAAA,aAAM,GAAE;;;;iDAIR;AAvDkB,mBAAmB;IAFvC,IAAA,aAAM,EAAC,EAAE,SAAS,EAAE,wBAAwB,EAAE,CAAC;IAC/C,IAAA,aAAM,EAAC,gBAAQ,CAAC,kCAAkC,CAAC;GAC/B,mBAAmB,CAwDvC;kBAxDoB,mBAAmB"}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import { BigNumberRawValue, DAL } from "@medusajs/framework/types";
|
2
|
+
import { ClaimReason } from "@medusajs/framework/utils";
|
3
|
+
import { Collection, OptionalProps, Rel } from "@mikro-orm/core";
|
4
|
+
import Claim from "./claim";
|
5
|
+
import OrderClaimItemImage from "./claim-item-image";
|
6
|
+
import OrderLineItem from "./line-item";
|
7
|
+
type OptionalLineItemProps = DAL.ModelDateColumns;
|
8
|
+
export default class OrderClaimItem {
|
9
|
+
[OptionalProps]?: OptionalLineItemProps;
|
10
|
+
id: string;
|
11
|
+
images: Collection<OrderClaimItemImage, object>;
|
12
|
+
reason: Rel<ClaimReason> | null;
|
13
|
+
quantity: Number | number;
|
14
|
+
raw_quantity: BigNumberRawValue;
|
15
|
+
claim_id: string;
|
16
|
+
claim: Rel<Claim>;
|
17
|
+
item_id: string;
|
18
|
+
item: Rel<OrderLineItem>;
|
19
|
+
is_additional_item: boolean;
|
20
|
+
note: string;
|
21
|
+
metadata: Record<string, unknown> | null;
|
22
|
+
created_at: Date;
|
23
|
+
updated_at: Date;
|
24
|
+
deleted_at: Date | null;
|
25
|
+
onCreate(): void;
|
26
|
+
onInit(): void;
|
27
|
+
}
|
28
|
+
export {};
|
29
|
+
//# sourceMappingURL=claim-item.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"claim-item.d.ts","sourceRoot":"","sources":["../../src/models/claim-item.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAA;AAClE,OAAO,EACL,WAAW,EAIZ,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAGL,UAAU,EAMV,aAAa,EAGb,GAAG,EACJ,MAAM,iBAAiB,CAAA;AACxB,OAAO,KAAK,MAAM,SAAS,CAAA;AAC3B,OAAO,mBAAmB,MAAM,oBAAoB,CAAA;AACpD,OAAO,aAAa,MAAM,aAAa,CAAA;AAEvC,KAAK,qBAAqB,GAAG,GAAG,CAAC,gBAAgB,CAAA;AAsBjD,MAAM,CAAC,OAAO,OAAO,cAAc;IACjC,CAAC,aAAa,CAAC,CAAC,EAAE,qBAAqB,CAAA;IAGvC,EAAE,EAAE,MAAM,CAAA;IAKV,MAAM,0CAAiD;IAGvD,MAAM,EAAE,GAAG,CAAC,WAAW,CAAC,GAAG,IAAI,CAAO;IAGtC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAA;IAGzB,YAAY,EAAE,iBAAiB,CAAA;IAS/B,QAAQ,EAAE,MAAM,CAAA;IAKhB,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,CAAA;IASjB,OAAO,EAAE,MAAM,CAAA;IAKf,IAAI,EAAE,GAAG,CAAC,aAAa,CAAC,CAAA;IAGxB,kBAAkB,EAAE,OAAO,CAAQ;IAGnC,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,157 @@
|
|
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 claim_1 = __importDefault(require("./claim"));
|
18
|
+
const claim_item_image_1 = __importDefault(require("./claim-item-image"));
|
19
|
+
const line_item_1 = __importDefault(require("./line-item"));
|
20
|
+
const tableName = "order_claim_item";
|
21
|
+
const ClaimIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
22
|
+
tableName,
|
23
|
+
columns: "claim_id",
|
24
|
+
where: "deleted_at IS NOT NULL",
|
25
|
+
});
|
26
|
+
const ItemIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
27
|
+
tableName,
|
28
|
+
columns: "item_id",
|
29
|
+
where: "deleted_at IS NOT NULL",
|
30
|
+
});
|
31
|
+
const DeletedAtIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
32
|
+
tableName,
|
33
|
+
columns: "deleted_at",
|
34
|
+
where: "deleted_at IS NOT NULL",
|
35
|
+
});
|
36
|
+
let OrderClaimItem = class OrderClaimItem {
|
37
|
+
constructor() {
|
38
|
+
this.images = new core_1.Collection(this);
|
39
|
+
this.reason = null;
|
40
|
+
this.is_additional_item = false;
|
41
|
+
this.metadata = null;
|
42
|
+
this.deleted_at = null;
|
43
|
+
}
|
44
|
+
onCreate() {
|
45
|
+
this.id = (0, utils_1.generateEntityId)(this.id, "claitem");
|
46
|
+
this.claim_id ??= this.claim?.id;
|
47
|
+
}
|
48
|
+
onInit() {
|
49
|
+
this.id = (0, utils_1.generateEntityId)(this.id, "claitem");
|
50
|
+
this.claim_id ??= this.claim?.id;
|
51
|
+
}
|
52
|
+
};
|
53
|
+
__decorate([
|
54
|
+
(0, core_1.PrimaryKey)({ columnType: "text" }),
|
55
|
+
__metadata("design:type", String)
|
56
|
+
], OrderClaimItem.prototype, "id", void 0);
|
57
|
+
__decorate([
|
58
|
+
(0, core_1.OneToMany)(() => claim_item_image_1.default, (ci) => ci.item, {
|
59
|
+
cascade: [core_1.Cascade.PERSIST, core_1.Cascade.REMOVE],
|
60
|
+
}),
|
61
|
+
__metadata("design:type", Object)
|
62
|
+
], OrderClaimItem.prototype, "images", void 0);
|
63
|
+
__decorate([
|
64
|
+
(0, core_1.Enum)({ items: () => utils_1.ClaimReason, nullable: true }),
|
65
|
+
__metadata("design:type", Object)
|
66
|
+
], OrderClaimItem.prototype, "reason", void 0);
|
67
|
+
__decorate([
|
68
|
+
(0, utils_1.MikroOrmBigNumberProperty)(),
|
69
|
+
__metadata("design:type", Number)
|
70
|
+
], OrderClaimItem.prototype, "quantity", void 0);
|
71
|
+
__decorate([
|
72
|
+
(0, core_1.Property)({ columnType: "jsonb" }),
|
73
|
+
__metadata("design:type", Object)
|
74
|
+
], OrderClaimItem.prototype, "raw_quantity", void 0);
|
75
|
+
__decorate([
|
76
|
+
(0, core_1.ManyToOne)(() => claim_1.default, {
|
77
|
+
columnType: "text",
|
78
|
+
fieldName: "claim_id",
|
79
|
+
mapToPk: true,
|
80
|
+
onDelete: "cascade",
|
81
|
+
}),
|
82
|
+
ClaimIdIndex.MikroORMIndex(),
|
83
|
+
__metadata("design:type", String)
|
84
|
+
], OrderClaimItem.prototype, "claim_id", void 0);
|
85
|
+
__decorate([
|
86
|
+
(0, core_1.ManyToOne)(() => claim_1.default, {
|
87
|
+
persist: false,
|
88
|
+
}),
|
89
|
+
__metadata("design:type", Object)
|
90
|
+
], OrderClaimItem.prototype, "claim", void 0);
|
91
|
+
__decorate([
|
92
|
+
(0, core_1.ManyToOne)({
|
93
|
+
entity: () => line_item_1.default,
|
94
|
+
fieldName: "item_id",
|
95
|
+
mapToPk: true,
|
96
|
+
columnType: "text",
|
97
|
+
}),
|
98
|
+
ItemIdIndex.MikroORMIndex(),
|
99
|
+
__metadata("design:type", String)
|
100
|
+
], OrderClaimItem.prototype, "item_id", void 0);
|
101
|
+
__decorate([
|
102
|
+
(0, core_1.ManyToOne)(() => line_item_1.default, {
|
103
|
+
persist: false,
|
104
|
+
}),
|
105
|
+
__metadata("design:type", Object)
|
106
|
+
], OrderClaimItem.prototype, "item", void 0);
|
107
|
+
__decorate([
|
108
|
+
(0, core_1.Property)({ columnType: "boolean", default: false }),
|
109
|
+
__metadata("design:type", Boolean)
|
110
|
+
], OrderClaimItem.prototype, "is_additional_item", void 0);
|
111
|
+
__decorate([
|
112
|
+
(0, core_1.Property)({ columnType: "text", nullable: true }),
|
113
|
+
__metadata("design:type", String)
|
114
|
+
], OrderClaimItem.prototype, "note", void 0);
|
115
|
+
__decorate([
|
116
|
+
(0, core_1.Property)({ columnType: "jsonb", nullable: true }),
|
117
|
+
__metadata("design:type", Object)
|
118
|
+
], OrderClaimItem.prototype, "metadata", void 0);
|
119
|
+
__decorate([
|
120
|
+
(0, core_1.Property)({
|
121
|
+
onCreate: () => new Date(),
|
122
|
+
columnType: "timestamptz",
|
123
|
+
defaultRaw: "now()",
|
124
|
+
}),
|
125
|
+
__metadata("design:type", Date)
|
126
|
+
], OrderClaimItem.prototype, "created_at", void 0);
|
127
|
+
__decorate([
|
128
|
+
(0, core_1.Property)({
|
129
|
+
onCreate: () => new Date(),
|
130
|
+
onUpdate: () => new Date(),
|
131
|
+
columnType: "timestamptz",
|
132
|
+
defaultRaw: "now()",
|
133
|
+
}),
|
134
|
+
__metadata("design:type", Date)
|
135
|
+
], OrderClaimItem.prototype, "updated_at", void 0);
|
136
|
+
__decorate([
|
137
|
+
(0, core_1.Property)({ columnType: "timestamptz", nullable: true }),
|
138
|
+
DeletedAtIndex.MikroORMIndex(),
|
139
|
+
__metadata("design:type", Object)
|
140
|
+
], OrderClaimItem.prototype, "deleted_at", void 0);
|
141
|
+
__decorate([
|
142
|
+
(0, core_1.BeforeCreate)(),
|
143
|
+
__metadata("design:type", Function),
|
144
|
+
__metadata("design:paramtypes", []),
|
145
|
+
__metadata("design:returntype", void 0)
|
146
|
+
], OrderClaimItem.prototype, "onCreate", null);
|
147
|
+
__decorate([
|
148
|
+
(0, core_1.OnInit)(),
|
149
|
+
__metadata("design:type", Function),
|
150
|
+
__metadata("design:paramtypes", []),
|
151
|
+
__metadata("design:returntype", void 0)
|
152
|
+
], OrderClaimItem.prototype, "onInit", null);
|
153
|
+
OrderClaimItem = __decorate([
|
154
|
+
(0, core_1.Entity)({ tableName })
|
155
|
+
], OrderClaimItem);
|
156
|
+
exports.default = OrderClaimItem;
|
157
|
+
//# sourceMappingURL=claim-item.js.map
|