@medusajs/order 0.1.3-snapshot-20240718083016 → 0.1.3-snapshot-20240719080828
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/migrations/Migration20240219102530.d.ts +1 -0
- package/dist/migrations/Migration20240219102530.d.ts.map +1 -0
- package/dist/migrations/Migration20240219102530.js +38 -4
- 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 +364 -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/models/address.d.ts +2 -1
- package/dist/models/address.d.ts.map +1 -0
- package/dist/models/adjustment-line.d.ts +3 -1
- package/dist/models/adjustment-line.d.ts.map +1 -0
- package/dist/models/adjustment-line.js +5 -0
- 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 +156 -0
- package/dist/models/claim-item.js.map +1 -0
- package/dist/models/claim.d.ts +36 -0
- package/dist/models/claim.d.ts.map +1 -0
- package/dist/models/claim.js +195 -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 +34 -0
- package/dist/models/exchange.d.ts.map +1 -0
- package/dist/models/exchange.js +188 -0
- package/dist/models/exchange.js.map +1 -0
- package/dist/models/index.d.ts +9 -0
- package/dist/models/index.d.ts.map +1 -0
- package/dist/models/index.js +17 -1
- package/dist/models/index.js.map +1 -1
- package/dist/models/line-item-adjustment.d.ts +3 -1
- package/dist/models/line-item-adjustment.d.ts.map +1 -0
- package/dist/models/line-item-adjustment.js +3 -3
- package/dist/models/line-item-adjustment.js.map +1 -1
- package/dist/models/line-item-tax-line.d.ts +3 -1
- package/dist/models/line-item-tax-line.d.ts.map +1 -0
- package/dist/models/line-item-tax-line.js +3 -3
- package/dist/models/line-item-tax-line.js.map +1 -1
- package/dist/models/line-item.d.ts +3 -1
- package/dist/models/line-item.d.ts.map +1 -0
- package/dist/models/line-item.js +18 -4
- package/dist/models/line-item.js.map +1 -1
- package/dist/models/order-change-action.d.ts +15 -4
- package/dist/models/order-change-action.d.ts.map +1 -0
- package/dist/models/order-change-action.js +102 -7
- package/dist/models/order-change-action.js.map +1 -1
- package/dist/models/order-change.d.ts +17 -5
- package/dist/models/order-change.d.ts.map +1 -0
- package/dist/models/order-change.js +109 -4
- package/dist/models/order-change.js.map +1 -1
- package/dist/models/order-item.d.ts +5 -4
- package/dist/models/order-item.d.ts.map +1 -0
- package/dist/models/order-item.js +13 -13
- package/dist/models/order-item.js.map +1 -1
- package/dist/models/order-shipping-method.d.ts +14 -4
- package/dist/models/order-shipping-method.d.ts.map +1 -0
- package/dist/models/order-shipping-method.js +89 -13
- package/dist/models/order-shipping-method.js.map +1 -1
- package/dist/models/order-summary.d.ts +6 -7
- package/dist/models/order-summary.d.ts.map +1 -0
- package/dist/models/order-summary.js +9 -6
- package/dist/models/order-summary.js.map +1 -1
- package/dist/models/order.d.ts +6 -4
- package/dist/models/order.d.ts.map +1 -0
- package/dist/models/order.js +11 -1
- package/dist/models/order.js.map +1 -1
- package/dist/models/return-item.d.ts +29 -0
- package/dist/models/return-item.d.ts.map +1 -0
- package/dist/models/return-item.js +170 -0
- package/dist/models/return-item.js.map +1 -0
- package/dist/models/return-reason.d.ts +21 -0
- package/dist/models/return-reason.d.ts.map +1 -0
- package/dist/models/return-reason.js +120 -0
- package/dist/models/return-reason.js.map +1 -0
- package/dist/models/return.d.ts +39 -0
- package/dist/models/return.d.ts.map +1 -0
- package/dist/models/return.js +216 -0
- package/dist/models/return.js.map +1 -0
- package/dist/models/shipping-method-adjustment.d.ts +3 -1
- package/dist/models/shipping-method-adjustment.d.ts.map +1 -0
- package/dist/models/shipping-method-adjustment.js +3 -3
- package/dist/models/shipping-method-adjustment.js.map +1 -1
- package/dist/models/shipping-method-tax-line.d.ts +3 -1
- package/dist/models/shipping-method-tax-line.d.ts.map +1 -0
- package/dist/models/shipping-method-tax-line.js +3 -3
- package/dist/models/shipping-method-tax-line.js.map +1 -1
- package/dist/models/shipping-method.d.ts +2 -0
- package/dist/models/shipping-method.d.ts.map +1 -0
- package/dist/models/shipping-method.js +17 -4
- package/dist/models/shipping-method.js.map +1 -1
- package/dist/models/tax-line.d.ts +2 -0
- package/dist/models/tax-line.d.ts.map +1 -0
- package/dist/models/tax-line.js +7 -0
- package/dist/models/tax-line.js.map +1 -1
- package/dist/models/transaction.d.ts +15 -3
- package/dist/models/transaction.d.ts.map +1 -0
- package/dist/models/transaction.js +109 -4
- 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 +4 -1
- package/dist/repositories/index.d.ts.map +1 -0
- package/dist/repositories/index.js +7 -16
- package/dist/repositories/index.js.map +1 -1
- package/dist/repositories/order.d.ts +1 -3
- package/dist/repositories/order.d.ts.map +1 -0
- package/dist/repositories/order.js +2 -85
- 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/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 +107 -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 +92 -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 +32 -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 +72 -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 +228 -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 +193 -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 +102 -0
- package/dist/services/actions/create-return.js.map +1 -0
- package/dist/services/actions/index.d.ts +11 -0
- package/dist/services/actions/index.d.ts.map +1 -0
- package/dist/services/actions/index.js +27 -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 +72 -0
- package/dist/services/actions/receive-return.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 +30 -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 +38 -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 +138 -67
- package/dist/services/order-module-service.d.ts.map +1 -0
- package/dist/services/order-module-service.js +992 -240
- package/dist/services/order-module-service.js.map +1 -1
- package/dist/services/order-service.d.ts +5 -4
- package/dist/services/order-service.d.ts.map +1 -0
- package/dist/services/order-service.js +1 -1
- package/dist/services/order-service.js.map +1 -1
- package/dist/types/address.d.ts +1 -0
- package/dist/types/address.d.ts.map +1 -0
- package/dist/types/index.d.ts +3 -1
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/line-item-adjustment.d.ts +1 -0
- 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 +1 -0
- package/dist/types/line-item.d.ts.map +1 -0
- package/dist/types/order-change.d.ts +6 -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 +2 -1
- package/dist/types/order-detail.d.ts.map +1 -0
- package/dist/types/order.d.ts +3 -2
- package/dist/types/order.d.ts.map +1 -0
- package/dist/types/shipping-method-adjustment.d.ts +1 -0
- 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 +4 -0
- package/dist/types/shipping-method.d.ts.map +1 -0
- package/dist/types/tax-line.d.ts +1 -0
- package/dist/types/tax-line.d.ts.map +1 -0
- package/dist/types/transaction.d.ts +1 -0
- package/dist/types/transaction.d.ts.map +1 -0
- package/dist/types/utils/index.d.ts +40 -21
- 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 +6 -10
- package/dist/utils/actions/cancel-return.js.map +1 -1
- 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 +6 -10
- package/dist/utils/actions/fulfill-item.js.map +1 -1
- package/dist/utils/actions/index.d.ts +4 -1
- package/dist/utils/actions/index.d.ts.map +1 -0
- package/dist/utils/actions/index.js +3 -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 +15 -24
- 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 +8 -22
- package/dist/utils/actions/item-remove.js.map +1 -1
- 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 +9 -35
- 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 +7 -36
- 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 +8 -12
- 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 +6 -10
- 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 +16 -16
- 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 +25 -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 +6 -10
- 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 +95 -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 +142 -0
- package/dist/utils/base-repository-find.js.map +1 -0
- package/dist/utils/calculate-order-change.d.ts +11 -5
- package/dist/utils/calculate-order-change.d.ts.map +1 -0
- package/dist/utils/calculate-order-change.js +57 -182
- 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 +11 -0
- package/dist/utils/set-action-reference.js.map +1 -0
- package/dist/utils/transform-order.d.ts +4 -2
- package/dist/utils/transform-order.d.ts.map +1 -0
- package/dist/utils/transform-order.js +131 -17
- package/dist/utils/transform-order.js.map +1 -1
- package/package.json +8 -14
- package/dist/joiner-config.d.ts +0 -5
- package/dist/joiner-config.js +0 -36
- package/dist/joiner-config.js.map +0 -1
- 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,67 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.Migration20240716081800 = void 0;
|
4
|
+
const migrations_1 = require("@mikro-orm/migrations");
|
5
|
+
class Migration20240716081800 extends migrations_1.Migration {
|
6
|
+
async up() {
|
7
|
+
const sql = `
|
8
|
+
DROP INDEX IF EXISTS "IDX_order_line_item_variant_id";
|
9
|
+
DROP INDEX IF EXISTS "IDX_order_line_item_product_id";
|
10
|
+
|
11
|
+
ALTER TABLE "order_line_item"
|
12
|
+
ADD COLUMN if NOT exists "deleted_at" timestamptz NULL;
|
13
|
+
|
14
|
+
CREATE INDEX IF NOT EXISTS "IDX_order_line_item_variant_id" ON "order_line_item" (
|
15
|
+
variant_id
|
16
|
+
) WHERE deleted_at IS NULL;
|
17
|
+
|
18
|
+
CREATE INDEX IF NOT EXISTS "IDX_order_line_item_product_id" ON "order_line_item" (
|
19
|
+
product_id
|
20
|
+
) WHERE deleted_at IS NULL;
|
21
|
+
|
22
|
+
|
23
|
+
|
24
|
+
DROP INDEX IF EXISTS "IDX_order_shipping_method_tax_line_shipping_method_id";
|
25
|
+
|
26
|
+
ALTER TABLE "order_shipping_method_tax_line"
|
27
|
+
ADD COLUMN if NOT exists "deleted_at" timestamptz NULL;
|
28
|
+
|
29
|
+
CREATE INDEX IF NOT EXISTS "IDX_order_shipping_method_tax_line_shipping_method_id" ON "order_shipping_method_tax_line" (
|
30
|
+
shipping_method_id
|
31
|
+
) WHERE deleted_at IS NULL;
|
32
|
+
|
33
|
+
|
34
|
+
DROP INDEX IF EXISTS "IDX_order_shipping_method_adjustment_shipping_method_id";
|
35
|
+
|
36
|
+
ALTER TABLE "order_shipping_method_adjustment"
|
37
|
+
ADD COLUMN if NOT exists "deleted_at" timestamptz NULL;
|
38
|
+
|
39
|
+
CREATE INDEX IF NOT EXISTS "IDX_order_shipping_method_adjustment_shipping_method_id" ON "order_shipping_method_adjustment" (
|
40
|
+
shipping_method_id
|
41
|
+
) WHERE deleted_at IS NULL;
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
DROP INDEX IF EXISTS "IDX_order_line_item_tax_line_item_id";
|
46
|
+
|
47
|
+
ALTER TABLE "order_line_item_tax_line"
|
48
|
+
ADD COLUMN if NOT exists "deleted_at" timestamptz NULL;
|
49
|
+
|
50
|
+
CREATE INDEX IF NOT EXISTS "IDX_order_line_item_tax_line_item_id" ON "order_line_item_tax_line" (
|
51
|
+
item_id
|
52
|
+
) WHERE deleted_at IS NULL;
|
53
|
+
|
54
|
+
DROP INDEX IF EXISTS "IDX_order_line_item_adjustment_item_id";
|
55
|
+
|
56
|
+
ALTER TABLE "order_line_item_adjustment"
|
57
|
+
ADD COLUMN if NOT exists "deleted_at" timestamptz NULL;
|
58
|
+
|
59
|
+
CREATE INDEX IF NOT EXISTS "IDX_order_line_item_adjustment_item_id" ON "order_line_item_adjustment" (
|
60
|
+
item_id
|
61
|
+
) WHERE deleted_at IS NULL;
|
62
|
+
`;
|
63
|
+
this.addSql(sql);
|
64
|
+
}
|
65
|
+
}
|
66
|
+
exports.Migration20240716081800 = Migration20240716081800;
|
67
|
+
//# sourceMappingURL=Migration20240716081800.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Migration20240716081800.js","sourceRoot":"","sources":["../../src/migrations/Migration20240716081800.ts"],"names":[],"mappings":";;;AAAA,sDAAiD;AAEjD,MAAa,uBAAwB,SAAQ,sBAAS;IACpD,KAAK,CAAC,EAAE;QACN,MAAM,GAAG,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAuDX,CAAA;QAED,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;IAClB,CAAC;CACF;AA7DD,0DA6DC"}
|
package/dist/models/address.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { DAL } from "@medusajs/types";
|
2
2
|
import { OptionalProps } from "@mikro-orm/core";
|
3
|
-
type OptionalAddressProps = DAL.
|
3
|
+
type OptionalAddressProps = DAL.ModelDateColumns;
|
4
4
|
export default class Address {
|
5
5
|
[OptionalProps]: OptionalAddressProps;
|
6
6
|
id: string;
|
@@ -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,iBAAiB,CAAA;AAKrC,OAAO,EAIL,aAAa,EAGd,MAAM,iBAAiB,CAAA;AAExB,KAAK,oBAAoB,GAAG,GAAG,CAAC,gBAAgB,CAAA;AAQhD,MAAM,CAAC,OAAO,OAAO,OAAO;IAC1B,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"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { BigNumberRawValue, DAL } from "@medusajs/types";
|
2
2
|
import { BigNumber } from "@medusajs/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,iBAAiB,CAAA;AACxD,OAAO,EAAE,SAAS,EAA6B,MAAM,iBAAiB,CAAA;AACtE,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"}
|
@@ -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,2CAAsE;AACtE,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;
|
1
|
+
{"version":3,"file":"adjustment-line.js","sourceRoot":"","sources":["../../src/models/adjustment-line.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,2CAAsE;AACtE,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;Q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"@mikro-orm/core";
|
3
|
+
import ClaimItem from "./claim-item";
|
4
|
+
type OptionalClaimItemImageProps = DAL.ModelDateColumns;
|
5
|
+
export default class ClaimItemImage {
|
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,iBAAiB,CAAA;AAMrC,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,cAAc;IACjC,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/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 ClaimItemImage = class ClaimItemImage {
|
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
|
+
], ClaimItemImage.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
|
+
], ClaimItemImage.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
|
+
], ClaimItemImage.prototype, "item", void 0);
|
62
|
+
__decorate([
|
63
|
+
(0, core_1.Property)({ columnType: "text" }),
|
64
|
+
__metadata("design:type", String)
|
65
|
+
], ClaimItemImage.prototype, "url", void 0);
|
66
|
+
__decorate([
|
67
|
+
(0, core_1.Property)({ columnType: "jsonb", nullable: true }),
|
68
|
+
__metadata("design:type", Object)
|
69
|
+
], ClaimItemImage.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
|
+
], ClaimItemImage.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
|
+
], ClaimItemImage.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
|
+
], ClaimItemImage.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
|
+
], ClaimItemImage.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
|
+
], ClaimItemImage.prototype, "onInit", null);
|
104
|
+
ClaimItemImage = __decorate([
|
105
|
+
(0, core_1.Entity)({ tableName: "order_claim_item_image" }),
|
106
|
+
(0, core_1.Filter)(utils_1.DALUtils.mikroOrmSoftDeletableFilterOptions)
|
107
|
+
], ClaimItemImage);
|
108
|
+
exports.default = ClaimItemImage;
|
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,2CAIwB;AACxB,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,CAA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hB;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;AAIhB;IAFC,IAAA,eAAQ,EAAC,EAAE,UAAU,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACvD,4BAA4B,CAAC,aAAa,EAAE;;kDACf;AAG9B;IADC,IAAA,mBAAY,GAAE;;;;8CAId;AAGD;IADC,IAAA,aAAM,GAAE;;;;4CAIR;AAvDkB,cAAc;IAFlC,IAAA,aAAM,EAAC,EAAE,SAAS,EAAE,wBAAwB,EAAE,CAAC;IAC/C,IAAA,aAAM,EAAC,gBAAQ,CAAC,kCAAkC,CAAC;GAC/B,cAAc,CAwDlC;kBAxDoB,cAAc"}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import { BigNumberRawValue, DAL } from "@medusajs/types";
|
2
|
+
import { ClaimReason } from "@medusajs/utils";
|
3
|
+
import { Collection, OptionalProps, Rel } from "@mikro-orm/core";
|
4
|
+
import Claim from "./claim";
|
5
|
+
import ClaimItemImage from "./claim-item-image";
|
6
|
+
import LineItem from "./line-item";
|
7
|
+
type OptionalLineItemProps = DAL.ModelDateColumns;
|
8
|
+
export default class OrderClaimItem {
|
9
|
+
[OptionalProps]?: OptionalLineItemProps;
|
10
|
+
id: string;
|
11
|
+
images: Collection<ClaimItemImage, 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<LineItem>;
|
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,iBAAiB,CAAA;AACxD,OAAO,EACL,WAAW,EAIZ,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAGL,UAAU,EAMV,aAAa,EAGb,GAAG,EACJ,MAAM,iBAAiB,CAAA;AACxB,OAAO,KAAK,MAAM,SAAS,CAAA;AAC3B,OAAO,cAAc,MAAM,oBAAoB,CAAA;AAC/C,OAAO,QAAQ,MAAM,aAAa,CAAA;AAElC,KAAK,qBAAqB,GAAG,GAAG,CAAC,gBAAgB,CAAA;AAqBjD,MAAM,CAAC,OAAO,OAAO,cAAc;IACjC,CAAC,aAAa,CAAC,CAAC,EAAE,qBAAqB,CAAA;IAGvC,EAAE,EAAE,MAAM,CAAA;IAKV,MAAM,qCAA4C;IAGlD,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,QAAQ,CAAC,CAAA;IAGnB,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,156 @@
|
|
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/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 ClaimIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
21
|
+
tableName: "order_claim_item",
|
22
|
+
columns: "claim_id",
|
23
|
+
where: "deleted_at IS NOT NULL",
|
24
|
+
});
|
25
|
+
const ItemIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
26
|
+
tableName: "order_claim_item",
|
27
|
+
columns: "item_id",
|
28
|
+
where: "deleted_at IS NOT NULL",
|
29
|
+
});
|
30
|
+
const DeletedAtIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
31
|
+
tableName: "order_claim_item_image",
|
32
|
+
columns: "deleted_at",
|
33
|
+
where: "deleted_at IS NOT NULL",
|
34
|
+
});
|
35
|
+
let OrderClaimItem = class OrderClaimItem {
|
36
|
+
constructor() {
|
37
|
+
this.images = new core_1.Collection(this);
|
38
|
+
this.reason = null;
|
39
|
+
this.is_additional_item = false;
|
40
|
+
this.metadata = null;
|
41
|
+
this.deleted_at = null;
|
42
|
+
}
|
43
|
+
onCreate() {
|
44
|
+
this.id = (0, utils_1.generateEntityId)(this.id, "claitem");
|
45
|
+
this.claim_id = this.claim?.id;
|
46
|
+
}
|
47
|
+
onInit() {
|
48
|
+
this.id = (0, utils_1.generateEntityId)(this.id, "claitem");
|
49
|
+
this.claim_id = this.claim?.id;
|
50
|
+
}
|
51
|
+
};
|
52
|
+
__decorate([
|
53
|
+
(0, core_1.PrimaryKey)({ columnType: "text" }),
|
54
|
+
__metadata("design:type", String)
|
55
|
+
], OrderClaimItem.prototype, "id", void 0);
|
56
|
+
__decorate([
|
57
|
+
(0, core_1.OneToMany)(() => claim_item_image_1.default, (ci) => ci.item, {
|
58
|
+
cascade: [core_1.Cascade.PERSIST, core_1.Cascade.REMOVE],
|
59
|
+
}),
|
60
|
+
__metadata("design:type", Object)
|
61
|
+
], OrderClaimItem.prototype, "images", void 0);
|
62
|
+
__decorate([
|
63
|
+
(0, core_1.Enum)({ items: () => utils_1.ClaimReason, nullable: true }),
|
64
|
+
__metadata("design:type", Object)
|
65
|
+
], OrderClaimItem.prototype, "reason", void 0);
|
66
|
+
__decorate([
|
67
|
+
(0, utils_1.MikroOrmBigNumberProperty)(),
|
68
|
+
__metadata("design:type", Number)
|
69
|
+
], OrderClaimItem.prototype, "quantity", void 0);
|
70
|
+
__decorate([
|
71
|
+
(0, core_1.Property)({ columnType: "jsonb" }),
|
72
|
+
__metadata("design:type", Object)
|
73
|
+
], OrderClaimItem.prototype, "raw_quantity", void 0);
|
74
|
+
__decorate([
|
75
|
+
(0, core_1.ManyToOne)(() => claim_1.default, {
|
76
|
+
columnType: "text",
|
77
|
+
fieldName: "claim_id",
|
78
|
+
mapToPk: true,
|
79
|
+
onDelete: "cascade",
|
80
|
+
}),
|
81
|
+
ClaimIdIndex.MikroORMIndex(),
|
82
|
+
__metadata("design:type", String)
|
83
|
+
], OrderClaimItem.prototype, "claim_id", void 0);
|
84
|
+
__decorate([
|
85
|
+
(0, core_1.ManyToOne)(() => claim_1.default, {
|
86
|
+
persist: false,
|
87
|
+
}),
|
88
|
+
__metadata("design:type", Object)
|
89
|
+
], OrderClaimItem.prototype, "claim", void 0);
|
90
|
+
__decorate([
|
91
|
+
(0, core_1.ManyToOne)({
|
92
|
+
entity: () => line_item_1.default,
|
93
|
+
fieldName: "item_id",
|
94
|
+
mapToPk: true,
|
95
|
+
columnType: "text",
|
96
|
+
}),
|
97
|
+
ItemIdIndex.MikroORMIndex(),
|
98
|
+
__metadata("design:type", String)
|
99
|
+
], OrderClaimItem.prototype, "item_id", void 0);
|
100
|
+
__decorate([
|
101
|
+
(0, core_1.ManyToOne)(() => line_item_1.default, {
|
102
|
+
persist: false,
|
103
|
+
}),
|
104
|
+
__metadata("design:type", Object)
|
105
|
+
], OrderClaimItem.prototype, "item", void 0);
|
106
|
+
__decorate([
|
107
|
+
(0, core_1.Property)({ columnType: "boolean", default: false }),
|
108
|
+
__metadata("design:type", Boolean)
|
109
|
+
], OrderClaimItem.prototype, "is_additional_item", void 0);
|
110
|
+
__decorate([
|
111
|
+
(0, core_1.Property)({ columnType: "text", nullable: true }),
|
112
|
+
__metadata("design:type", String)
|
113
|
+
], OrderClaimItem.prototype, "note", void 0);
|
114
|
+
__decorate([
|
115
|
+
(0, core_1.Property)({ columnType: "jsonb", nullable: true }),
|
116
|
+
__metadata("design:type", Object)
|
117
|
+
], OrderClaimItem.prototype, "metadata", void 0);
|
118
|
+
__decorate([
|
119
|
+
(0, core_1.Property)({
|
120
|
+
onCreate: () => new Date(),
|
121
|
+
columnType: "timestamptz",
|
122
|
+
defaultRaw: "now()",
|
123
|
+
}),
|
124
|
+
__metadata("design:type", Date)
|
125
|
+
], OrderClaimItem.prototype, "created_at", void 0);
|
126
|
+
__decorate([
|
127
|
+
(0, core_1.Property)({
|
128
|
+
onCreate: () => new Date(),
|
129
|
+
onUpdate: () => new Date(),
|
130
|
+
columnType: "timestamptz",
|
131
|
+
defaultRaw: "now()",
|
132
|
+
}),
|
133
|
+
__metadata("design:type", Date)
|
134
|
+
], OrderClaimItem.prototype, "updated_at", void 0);
|
135
|
+
__decorate([
|
136
|
+
(0, core_1.Property)({ columnType: "timestamptz", nullable: true }),
|
137
|
+
DeletedAtIndex.MikroORMIndex(),
|
138
|
+
__metadata("design:type", Object)
|
139
|
+
], OrderClaimItem.prototype, "deleted_at", void 0);
|
140
|
+
__decorate([
|
141
|
+
(0, core_1.BeforeCreate)(),
|
142
|
+
__metadata("design:type", Function),
|
143
|
+
__metadata("design:paramtypes", []),
|
144
|
+
__metadata("design:returntype", void 0)
|
145
|
+
], OrderClaimItem.prototype, "onCreate", null);
|
146
|
+
__decorate([
|
147
|
+
(0, core_1.OnInit)(),
|
148
|
+
__metadata("design:type", Function),
|
149
|
+
__metadata("design:paramtypes", []),
|
150
|
+
__metadata("design:returntype", void 0)
|
151
|
+
], OrderClaimItem.prototype, "onInit", null);
|
152
|
+
OrderClaimItem = __decorate([
|
153
|
+
(0, core_1.Entity)({ tableName: "order_claim_item" })
|
154
|
+
], OrderClaimItem);
|
155
|
+
exports.default = OrderClaimItem;
|
156
|
+
//# sourceMappingURL=claim-item.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"claim-item.js","sourceRoot":"","sources":["../../src/models/claim-item.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,2CAKwB;AACxB,0CAawB;AACxB,oDAA2B;AAC3B,0EAA+C;AAC/C,4DAAkC;AAIlC,MAAM,YAAY,GAAG,IAAA,sCAA8B,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,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;AAIhB;IAFC,IAAA,eAAQ,EAAC,EAAE,UAAU,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACvD,cAAc,CAAC,aAAa,EAAE;;kDACD;AAG9B;IADC,IAAA,mBAAY,GAAE;;;;8CAId;AAGD;IADC,IAAA,aAAM,GAAE;;;;4CAIR;AAtFkB,cAAc;IADlC,IAAA,aAAM,EAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC;GACrB,cAAc,CAuFlC;kBAvFoB,cAAc"}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import { BigNumberRawValue, DAL } from "@medusajs/types";
|
2
|
+
import { BigNumber, ClaimType } from "@medusajs/utils";
|
3
|
+
import { Collection, OptionalProps, Rel } from "@mikro-orm/core";
|
4
|
+
import ClaimItem from "./claim-item";
|
5
|
+
import Order from "./order";
|
6
|
+
import OrderShippingMethod from "./order-shipping-method";
|
7
|
+
import Return from "./return";
|
8
|
+
import Transaction from "./transaction";
|
9
|
+
type OptionalOrderClaimProps = DAL.ModelDateColumns;
|
10
|
+
export default class OrderClaim {
|
11
|
+
[OptionalProps]?: OptionalOrderClaimProps;
|
12
|
+
id: string;
|
13
|
+
order_id: string;
|
14
|
+
order: Rel<Order>;
|
15
|
+
return: Rel<Return>;
|
16
|
+
return_id: string | null;
|
17
|
+
order_version: number;
|
18
|
+
display_id: number;
|
19
|
+
type: Rel<ClaimType>;
|
20
|
+
no_notification: boolean | null;
|
21
|
+
refund_amount: BigNumber | number;
|
22
|
+
raw_refund_amount: BigNumberRawValue;
|
23
|
+
additional_items: Collection<ClaimItem, object>;
|
24
|
+
claim_items: Collection<ClaimItem, object>;
|
25
|
+
shipping_methods: Collection<OrderShippingMethod, object>;
|
26
|
+
transactions: Collection<Transaction, object>;
|
27
|
+
metadata: Record<string, unknown> | null;
|
28
|
+
created_at: Date;
|
29
|
+
updated_at: Date;
|
30
|
+
deleted_at: Date | null;
|
31
|
+
canceled_at: Date | null;
|
32
|
+
onCreate(): void;
|
33
|
+
onInit(): void;
|
34
|
+
}
|
35
|
+
export {};
|
36
|
+
//# sourceMappingURL=claim.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"claim.d.ts","sourceRoot":"","sources":["../../src/models/claim.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAA;AACxD,OAAO,EACL,SAAS,EACT,SAAS,EAIV,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAGL,UAAU,EAOV,aAAa,EAGb,GAAG,EACJ,MAAM,iBAAiB,CAAA;AACxB,OAAO,SAAS,MAAM,cAAc,CAAA;AACpC,OAAO,KAAK,MAAM,SAAS,CAAA;AAC3B,OAAO,mBAAmB,MAAM,yBAAyB,CAAA;AACzD,OAAO,MAAM,MAAM,UAAU,CAAA;AAC7B,OAAO,WAAW,MAAM,eAAe,CAAA;AAEvC,KAAK,uBAAuB,GAAG,GAAG,CAAC,gBAAgB,CAAA;AA2BnD,MAAM,CAAC,OAAO,OAAO,UAAU;IAC7B,CAAC,aAAa,CAAC,CAAC,EAAE,uBAAuB,CAAA;IAGzC,EAAE,EAAE,MAAM,CAAA;IASV,QAAQ,EAAE,MAAM,CAAA;IAKhB,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,CAAA;IASjB,MAAM,EAAE,GAAG,CA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