@medusajs/order 0.1.3-snapshot-20240607093839 → 0.1.3-snapshot-20240701122250
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.ts +2 -1
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/dist/joiner-config.d.ts +1 -3
- package/dist/joiner-config.js +4 -42
- package/dist/joiner-config.js.map +1 -1
- package/dist/migrations/Migration20240604100512.d.ts +4 -0
- package/dist/migrations/Migration20240604100512.js +364 -0
- package/dist/migrations/Migration20240604100512.js.map +1 -0
- package/dist/models/claim-item-image.d.ts +18 -0
- package/dist/models/claim-item-image.js +108 -0
- package/dist/models/claim-item-image.js.map +1 -0
- package/dist/models/claim-item.d.ts +28 -0
- package/dist/models/claim-item.js +156 -0
- package/dist/models/claim-item.js.map +1 -0
- package/dist/models/claim.d.ts +35 -0
- package/dist/models/claim.js +196 -0
- package/dist/models/claim.js.map +1 -0
- package/dist/models/exchange-item.d.ts +23 -0
- package/dist/models/exchange-item.js +138 -0
- package/dist/models/exchange-item.js.map +1 -0
- package/dist/models/exchange.d.ts +33 -0
- package/dist/models/exchange.js +189 -0
- package/dist/models/exchange.js.map +1 -0
- package/dist/models/index.d.ts +7 -0
- package/dist/models/index.js +15 -1
- package/dist/models/index.js.map +1 -1
- package/dist/models/line-item-adjustment.d.ts +2 -1
- package/dist/models/line-item-adjustment.js +1 -1
- package/dist/models/line-item-adjustment.js.map +1 -1
- package/dist/models/line-item-tax-line.d.ts +2 -1
- package/dist/models/line-item-tax-line.js +1 -1
- package/dist/models/line-item-tax-line.js.map +1 -1
- package/dist/models/line-item.d.ts +1 -1
- package/dist/models/line-item.js +3 -3
- package/dist/models/line-item.js.map +1 -1
- package/dist/models/order-change-action.d.ts +13 -3
- package/dist/models/order-change-action.js +94 -0
- package/dist/models/order-change-action.js.map +1 -1
- package/dist/models/order-change.d.ts +14 -3
- package/dist/models/order-change.js +107 -3
- package/dist/models/order-change.js.map +1 -1
- package/dist/models/order-item.d.ts +3 -3
- package/dist/models/order-item.js +7 -7
- package/dist/models/order-item.js.map +1 -1
- package/dist/models/order-shipping-method.d.ts +12 -3
- package/dist/models/order-shipping-method.js +83 -7
- package/dist/models/order-shipping-method.js.map +1 -1
- package/dist/models/order-summary.d.ts +3 -2
- package/dist/models/order-summary.js +7 -4
- package/dist/models/order-summary.js.map +1 -1
- package/dist/models/order.d.ts +3 -3
- package/dist/models/order.js +1 -1
- package/dist/models/order.js.map +1 -1
- package/dist/models/return-item.d.ts +28 -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 +3 -3
- package/dist/models/return-reason.js.map +1 -1
- package/dist/models/return.d.ts +38 -0
- package/dist/models/return.js +213 -0
- package/dist/models/return.js.map +1 -0
- package/dist/models/shipping-method-adjustment.d.ts +2 -1
- package/dist/models/shipping-method-adjustment.js +1 -1
- package/dist/models/shipping-method-adjustment.js.map +1 -1
- package/dist/models/shipping-method-tax-line.d.ts +2 -1
- package/dist/models/shipping-method-tax-line.js +1 -1
- package/dist/models/shipping-method-tax-line.js.map +1 -1
- package/dist/models/shipping-method.js +1 -1
- package/dist/models/shipping-method.js.map +1 -1
- package/dist/models/tax-line.js.map +1 -1
- package/dist/models/transaction.d.ts +11 -2
- package/dist/models/transaction.js +80 -1
- package/dist/models/transaction.js.map +1 -1
- package/dist/repositories/claim.d.ts +8 -0
- package/dist/repositories/claim.js +11 -0
- package/dist/repositories/claim.js.map +1 -0
- package/dist/repositories/exchange.d.ts +8 -0
- package/dist/repositories/exchange.js +11 -0
- package/dist/repositories/exchange.js.map +1 -0
- package/dist/repositories/index.d.ts +3 -1
- package/dist/repositories/index.js +7 -16
- package/dist/repositories/index.js.map +1 -1
- package/dist/repositories/order.d.ts +0 -3
- package/dist/repositories/order.js +2 -83
- package/dist/repositories/order.js.map +1 -1
- package/dist/repositories/return.d.ts +8 -0
- package/dist/repositories/return.js +11 -0
- package/dist/repositories/return.js.map +1 -0
- package/dist/services/actions/cancel-fulfillment.d.ts +2 -0
- package/dist/services/actions/cancel-fulfillment.js +32 -0
- package/dist/services/actions/cancel-fulfillment.js.map +1 -0
- package/dist/services/actions/create-claim.d.ts +2 -0
- package/dist/services/actions/create-claim.js +229 -0
- package/dist/services/actions/create-claim.js.map +1 -0
- package/dist/services/actions/create-exchange.d.ts +2 -0
- package/dist/services/actions/create-exchange.js +194 -0
- package/dist/services/actions/create-exchange.js.map +1 -0
- package/dist/services/actions/create-return.d.ts +2 -0
- package/dist/services/actions/create-return.js +98 -0
- package/dist/services/actions/create-return.js.map +1 -0
- package/dist/services/actions/index.d.ts +7 -0
- package/dist/services/actions/index.js +24 -0
- package/dist/services/actions/index.js.map +1 -0
- package/dist/services/actions/receive-return.d.ts +2 -0
- package/dist/services/actions/receive-return.js +75 -0
- package/dist/services/actions/receive-return.js.map +1 -0
- package/dist/services/actions/register-fulfillment.d.ts +2 -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 +2 -0
- package/dist/services/actions/register-shipment.js +38 -0
- package/dist/services/actions/register-shipment.js.map +1 -0
- package/dist/services/order-change-service.d.ts +6 -6
- package/dist/services/order-change-service.js +4 -3
- package/dist/services/order-change-service.js.map +1 -1
- package/dist/services/order-module-service.d.ts +101 -64
- package/dist/services/order-module-service.js +458 -295
- package/dist/services/order-module-service.js.map +1 -1
- package/dist/services/order-service.d.ts +4 -4
- package/dist/services/order-service.js +1 -1
- package/dist/services/order-service.js.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/order-change.d.ts +32 -0
- package/dist/types/order-change.js +34 -0
- package/dist/types/order-change.js.map +1 -0
- package/dist/types/utils/index.d.ts +25 -1
- package/dist/types/utils/index.js.map +1 -1
- package/dist/utils/actions/cancel-item-fulfillment.js +2 -0
- package/dist/utils/actions/cancel-item-fulfillment.js.map +1 -1
- package/dist/utils/actions/cancel-return.js +2 -0
- package/dist/utils/actions/cancel-return.js.map +1 -1
- package/dist/utils/actions/fulfill-item.js +2 -0
- package/dist/utils/actions/fulfill-item.js.map +1 -1
- package/dist/utils/actions/index.d.ts +1 -0
- package/dist/utils/actions/index.js +1 -0
- package/dist/utils/actions/index.js.map +1 -1
- package/dist/utils/actions/item-add.js +10 -7
- package/dist/utils/actions/item-add.js.map +1 -1
- package/dist/utils/actions/item-remove.js +6 -4
- package/dist/utils/actions/item-remove.js.map +1 -1
- package/dist/utils/actions/receive-damaged-return-item.js +2 -0
- package/dist/utils/actions/receive-damaged-return-item.js.map +1 -1
- package/dist/utils/actions/receive-return-item.js +2 -0
- package/dist/utils/actions/receive-return-item.js.map +1 -1
- package/dist/utils/actions/return-item.js +2 -0
- package/dist/utils/actions/return-item.js.map +1 -1
- package/dist/utils/actions/ship-item.js +2 -0
- package/dist/utils/actions/ship-item.js.map +1 -1
- package/dist/utils/actions/shipping-add.js +6 -2
- package/dist/utils/actions/shipping-add.js.map +1 -1
- package/dist/utils/actions/write-off-item.js +2 -0
- package/dist/utils/actions/write-off-item.js.map +1 -1
- package/dist/utils/apply-order-changes.d.ts +14 -0
- package/dist/utils/apply-order-changes.js +74 -0
- package/dist/utils/apply-order-changes.js.map +1 -0
- package/dist/utils/base-repository-find.d.ts +2 -0
- package/dist/utils/base-repository-find.js +117 -0
- package/dist/utils/base-repository-find.js.map +1 -0
- package/dist/utils/calculate-order-change.js +5 -1
- package/dist/utils/calculate-order-change.js.map +1 -1
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.js +3 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/set-action-reference.d.ts +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 +3 -2
- package/dist/utils/transform-order.js +84 -17
- package/dist/utils/transform-order.js.map +1 -1
- package/package.json +7 -11
- package/dist/module-definition.d.ts +0 -2
- package/dist/module-definition.js +0 -9
- 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
@@ -0,0 +1,170 @@
|
|
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 line_item_1 = __importDefault(require("./line-item"));
|
18
|
+
const return_1 = __importDefault(require("./return"));
|
19
|
+
const return_reason_1 = __importDefault(require("./return-reason"));
|
20
|
+
const ReturnIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
21
|
+
tableName: "return_item",
|
22
|
+
columns: "return_id",
|
23
|
+
where: "deleted_at IS NOT NULL",
|
24
|
+
});
|
25
|
+
const ReturnReasonIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
26
|
+
tableName: "return_item",
|
27
|
+
columns: "reason_id",
|
28
|
+
where: "deleted_at IS NOT NULL",
|
29
|
+
});
|
30
|
+
const ItemIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
31
|
+
tableName: "return_item",
|
32
|
+
columns: "item_id",
|
33
|
+
where: "deleted_at IS NOT NULL",
|
34
|
+
});
|
35
|
+
const DeletedAtIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
36
|
+
tableName: "order_claim_item_image",
|
37
|
+
columns: "deleted_at",
|
38
|
+
where: "deleted_at IS NOT NULL",
|
39
|
+
});
|
40
|
+
let ReturnItem = class ReturnItem {
|
41
|
+
constructor() {
|
42
|
+
this.reason_id = null;
|
43
|
+
this.received_quantity = 0;
|
44
|
+
this.metadata = null;
|
45
|
+
this.deleted_at = null;
|
46
|
+
}
|
47
|
+
onCreate() {
|
48
|
+
this.id = (0, utils_1.generateEntityId)(this.id, "retitem");
|
49
|
+
this.return_id = this.return?.id;
|
50
|
+
}
|
51
|
+
onInit() {
|
52
|
+
this.id = (0, utils_1.generateEntityId)(this.id, "retitem");
|
53
|
+
this.return_id = this.return?.id;
|
54
|
+
}
|
55
|
+
};
|
56
|
+
__decorate([
|
57
|
+
(0, core_1.PrimaryKey)({ columnType: "text" }),
|
58
|
+
__metadata("design:type", String)
|
59
|
+
], ReturnItem.prototype, "id", void 0);
|
60
|
+
__decorate([
|
61
|
+
(0, core_1.ManyToOne)(() => return_reason_1.default, {
|
62
|
+
columnType: "text",
|
63
|
+
fieldName: "reason_id",
|
64
|
+
mapToPk: true,
|
65
|
+
nullable: true,
|
66
|
+
}),
|
67
|
+
ReturnReasonIdIndex.MikroORMIndex(),
|
68
|
+
__metadata("design:type", Object)
|
69
|
+
], ReturnItem.prototype, "reason_id", void 0);
|
70
|
+
__decorate([
|
71
|
+
(0, core_1.ManyToOne)(() => return_reason_1.default, {
|
72
|
+
persist: false,
|
73
|
+
}),
|
74
|
+
__metadata("design:type", return_reason_1.default)
|
75
|
+
], ReturnItem.prototype, "reason", void 0);
|
76
|
+
__decorate([
|
77
|
+
(0, utils_1.MikroOrmBigNumberProperty)(),
|
78
|
+
__metadata("design:type", Number)
|
79
|
+
], ReturnItem.prototype, "quantity", void 0);
|
80
|
+
__decorate([
|
81
|
+
(0, core_1.Property)({ columnType: "jsonb" }),
|
82
|
+
__metadata("design:type", Object)
|
83
|
+
], ReturnItem.prototype, "raw_quantity", void 0);
|
84
|
+
__decorate([
|
85
|
+
(0, utils_1.MikroOrmBigNumberProperty)(),
|
86
|
+
__metadata("design:type", Number)
|
87
|
+
], ReturnItem.prototype, "received_quantity", void 0);
|
88
|
+
__decorate([
|
89
|
+
(0, core_1.Property)({ columnType: "jsonb" }),
|
90
|
+
__metadata("design:type", Object)
|
91
|
+
], ReturnItem.prototype, "raw_received_quantity", void 0);
|
92
|
+
__decorate([
|
93
|
+
(0, core_1.ManyToOne)(() => return_1.default, {
|
94
|
+
columnType: "text",
|
95
|
+
fieldName: "return_id",
|
96
|
+
mapToPk: true,
|
97
|
+
onDelete: "cascade",
|
98
|
+
}),
|
99
|
+
ReturnIdIndex.MikroORMIndex(),
|
100
|
+
__metadata("design:type", String)
|
101
|
+
], ReturnItem.prototype, "return_id", void 0);
|
102
|
+
__decorate([
|
103
|
+
(0, core_1.ManyToOne)(() => return_1.default, {
|
104
|
+
persist: false,
|
105
|
+
}),
|
106
|
+
__metadata("design:type", return_1.default)
|
107
|
+
], ReturnItem.prototype, "return", void 0);
|
108
|
+
__decorate([
|
109
|
+
(0, core_1.ManyToOne)({
|
110
|
+
entity: () => line_item_1.default,
|
111
|
+
fieldName: "item_id",
|
112
|
+
mapToPk: true,
|
113
|
+
columnType: "text",
|
114
|
+
}),
|
115
|
+
ItemIdIndex.MikroORMIndex(),
|
116
|
+
__metadata("design:type", String)
|
117
|
+
], ReturnItem.prototype, "item_id", void 0);
|
118
|
+
__decorate([
|
119
|
+
(0, core_1.ManyToOne)(() => line_item_1.default, {
|
120
|
+
persist: false,
|
121
|
+
}),
|
122
|
+
__metadata("design:type", line_item_1.default)
|
123
|
+
], ReturnItem.prototype, "item", void 0);
|
124
|
+
__decorate([
|
125
|
+
(0, core_1.Property)({ columnType: "text", nullable: true }),
|
126
|
+
__metadata("design:type", String)
|
127
|
+
], ReturnItem.prototype, "note", void 0);
|
128
|
+
__decorate([
|
129
|
+
(0, core_1.Property)({ columnType: "jsonb", nullable: true }),
|
130
|
+
__metadata("design:type", Object)
|
131
|
+
], ReturnItem.prototype, "metadata", void 0);
|
132
|
+
__decorate([
|
133
|
+
(0, core_1.Property)({
|
134
|
+
onCreate: () => new Date(),
|
135
|
+
columnType: "timestamptz",
|
136
|
+
defaultRaw: "now()",
|
137
|
+
}),
|
138
|
+
__metadata("design:type", Date)
|
139
|
+
], ReturnItem.prototype, "created_at", void 0);
|
140
|
+
__decorate([
|
141
|
+
(0, core_1.Property)({
|
142
|
+
onCreate: () => new Date(),
|
143
|
+
onUpdate: () => new Date(),
|
144
|
+
columnType: "timestamptz",
|
145
|
+
defaultRaw: "now()",
|
146
|
+
}),
|
147
|
+
__metadata("design:type", Date)
|
148
|
+
], ReturnItem.prototype, "updated_at", void 0);
|
149
|
+
__decorate([
|
150
|
+
(0, core_1.Property)({ columnType: "timestamptz", nullable: true }),
|
151
|
+
DeletedAtIndex.MikroORMIndex(),
|
152
|
+
__metadata("design:type", Object)
|
153
|
+
], ReturnItem.prototype, "deleted_at", void 0);
|
154
|
+
__decorate([
|
155
|
+
(0, core_1.BeforeCreate)(),
|
156
|
+
__metadata("design:type", Function),
|
157
|
+
__metadata("design:paramtypes", []),
|
158
|
+
__metadata("design:returntype", void 0)
|
159
|
+
], ReturnItem.prototype, "onCreate", null);
|
160
|
+
__decorate([
|
161
|
+
(0, core_1.OnInit)(),
|
162
|
+
__metadata("design:type", Function),
|
163
|
+
__metadata("design:paramtypes", []),
|
164
|
+
__metadata("design:returntype", void 0)
|
165
|
+
], ReturnItem.prototype, "onInit", null);
|
166
|
+
ReturnItem = __decorate([
|
167
|
+
(0, core_1.Entity)({ tableName: "return_item" })
|
168
|
+
], ReturnItem);
|
169
|
+
exports.default = ReturnItem;
|
170
|
+
//# sourceMappingURL=return-item.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"return-item.js","sourceRoot":"","sources":["../../src/models/return-item.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,2CAIwB;AACxB,0CAQwB;AACxB,4DAAkC;AAClC,sDAA6B;AAC7B,oEAA0C;AAI1C,MAAM,aAAa,GAAG,IAAA,sCAA8B,EAAC;IACnD,SAAS,EAAE,aAAa;IACxB,OAAO,EAAE,WAAW;IACpB,KAAK,EAAE,wBAAwB;CAChC,CAAC,CAAA;AAEF,MAAM,mBAAmB,GAAG,IAAA,sCAA8B,EAAC;IACzD,SAAS,EAAE,aAAa;IACxB,OAAO,EAAE,WAAW;IACpB,KAAK,EAAE,wBAAwB;CAChC,CAAC,CAAA;AAEF,MAAM,WAAW,GAAG,IAAA,sCAA8B,EAAC;IACjD,SAAS,EAAE,aAAa;IACxB,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,wBAAwB;CAChC,CAAC,CAAA;AAEF,MAAM,cAAc,GAAG,IAAA,sCAA8B,EAAC;IACpD,SAAS,EAAE,wBAAwB;IACnC,OAAO,EAAE,YAAY;IACrB,KAAK,EAAE,wBAAwB;CAChC,CAAC,CAAA;AAGa,IAAM,UAAU,GAAhB,MAAM,UAAU;IAAhB;QAab,cAAS,GAAkB,IAAI,CAAA;QAc/B,sBAAiB,GAAoB,CAAC,CAAA;QAqCtC,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,SAAS,CAAC,CAAA;QAC9C,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,MAAM,EAAE,EAAE,CAAA;IAClC,CAAC;IAGD,MAAM;QACJ,IAAI,CAAC,EAAE,GAAG,IAAA,wBAAgB,EAAC,IAAI,CAAC,EAAE,EAAE,SA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OrderProps = "parent_return_reason" | DAL.EntityDateColumns;
|
4
4
|
export default class ReturnReason {
|
5
5
|
[OptionalProps]?: OptionalOrderProps;
|
@@ -8,8 +8,8 @@ export default class ReturnReason {
|
|
8
8
|
label: string;
|
9
9
|
description: string | null;
|
10
10
|
parent_return_reason_id?: string | null;
|
11
|
-
parent_return_reason?: ReturnReason | null;
|
12
|
-
return_reason_children: ReturnReason[];
|
11
|
+
parent_return_reason?: Rel<ReturnReason> | null;
|
12
|
+
return_reason_children: Rel<ReturnReason>[];
|
13
13
|
metadata: Record<string, unknown> | null;
|
14
14
|
created_at: Date;
|
15
15
|
updated_at: Date;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"return-reason.js","sourceRoot":"","sources":["../../src/models/return-reason.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,2CAGwB;AACxB,
|
1
|
+
{"version":3,"file":"return-reason.js","sourceRoot":"","sources":["../../src/models/return-reason.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,2CAGwB;AACxB,0CAWwB;AAExB,MAAM,cAAc,GAAG,IAAA,sCAA8B,EAAC;IACpD,SAAS,EAAE,eAAe;IAC1B,OAAO,EAAE,YAAY;IACrB,KAAK,EAAE,wBAAwB;CAChC,CAAC,CAAA;AAEF,MAAM,UAAU,GAAG,IAAA,sCAA8B,EAAC;IAChD,SAAS,EAAE,eAAe;IAC1B,OAAO,EAAE,OAAO;IAChB,KAAK,EAAE,wBAAwB;CAChC,CAAC,CAAA;AAEF,MAAM,WAAW,GAAG,IAAA,sCAA8B,EAAC;IACjD,SAAS,EAAE,eAAe;IAC1B,OAAO,EAAE,yBAAyB;IAClC,KAAK,EAAE,wBAAwB;CAChC,CAAC,CAAA;AAKa,IAAM,YAAY,GAAlB,MAAM,YAAY;IAAlB;QAcb,gBAAW,GAAkB,IAAI,CAAA;QAsBjC,aAAQ,GAAmC,IAAI,CAAA;QAmB/C,eAAU,GAAgB,IAAI,CAAA;IAWhC,CAAC;IARC,QAAQ;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;QACR,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE;QAC1B,UAAU,EAAE,aAAa;QACzB,UAAU,EAAE,OAAO;KACpB,CAAC;8BACU,IAAI;gDAAA;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;gDAAA;AAIhB;IAFC,IAAA,eAAQ,EAAC,EAAE,UAAU,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACvD,cAAc,CAAC,aAAa,EAAE;;gDACD;AAG9B;IADC,IAAA,mBAAY,GAAE;;;;4CAGd;AAGD;IADC,IAAA,aAAM,GAAE;;;;0CAGR;AAjEkB,YAAY;IADhC,IAAA,aAAM,EAAC,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;GAClB,YAAY,CAkEhC;kBAlEoB,YAAY"}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
import { BigNumberRawValue, DAL } from "@medusajs/types";
|
2
|
+
import { BigNumber, ReturnStatus } from "@medusajs/utils";
|
3
|
+
import { Collection, OptionalProps, Rel } from "@mikro-orm/core";
|
4
|
+
import { Transaction } from ".";
|
5
|
+
import Claim from "./claim";
|
6
|
+
import Exchange from "./exchange";
|
7
|
+
import Order from "./order";
|
8
|
+
import OrderItem from "./order-item";
|
9
|
+
import OrderShippingMethod from "./order-shipping-method";
|
10
|
+
type OptionalReturnProps = DAL.EntityDateColumns;
|
11
|
+
export default class Return {
|
12
|
+
[OptionalProps]?: OptionalReturnProps;
|
13
|
+
id: string;
|
14
|
+
order_id: string;
|
15
|
+
order: Rel<Order>;
|
16
|
+
exchange: Rel<Exchange>;
|
17
|
+
exchange_id: string | null;
|
18
|
+
claim: Rel<Claim>;
|
19
|
+
claim_id: string | null;
|
20
|
+
order_version: number;
|
21
|
+
display_id: number;
|
22
|
+
status: ReturnStatus;
|
23
|
+
no_notification: boolean | null;
|
24
|
+
refund_amount: BigNumber | number;
|
25
|
+
raw_refund_amount: BigNumberRawValue;
|
26
|
+
items: Collection<OrderItem, object>;
|
27
|
+
shipping_methods: Collection<OrderShippingMethod, object>;
|
28
|
+
transactions: Collection<Transaction, object>;
|
29
|
+
metadata: Record<string, unknown> | null;
|
30
|
+
created_at: Date;
|
31
|
+
updated_at: Date;
|
32
|
+
deleted_at: Date | null;
|
33
|
+
received_at: Date | null;
|
34
|
+
canceled_at: Date | null;
|
35
|
+
onCreate(): void;
|
36
|
+
onInit(): void;
|
37
|
+
}
|
38
|
+
export {};
|
@@ -0,0 +1,213 @@
|
|
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 _models_1 = require(".");
|
18
|
+
const claim_1 = __importDefault(require("./claim"));
|
19
|
+
const exchange_1 = __importDefault(require("./exchange"));
|
20
|
+
const order_1 = __importDefault(require("./order"));
|
21
|
+
const order_shipping_method_1 = __importDefault(require("./order-shipping-method"));
|
22
|
+
const DisplayIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
23
|
+
tableName: "return",
|
24
|
+
columns: "display_id",
|
25
|
+
where: "deleted_at IS NOT NULL",
|
26
|
+
});
|
27
|
+
const ReturnDeletedAtIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
28
|
+
tableName: "return",
|
29
|
+
columns: "deleted_at",
|
30
|
+
where: "deleted_at IS NOT NULL",
|
31
|
+
});
|
32
|
+
const OrderIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
33
|
+
tableName: "return",
|
34
|
+
columns: ["order_id"],
|
35
|
+
where: "deleted_at IS NOT NULL",
|
36
|
+
});
|
37
|
+
const ExchangeIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
38
|
+
tableName: "return",
|
39
|
+
columns: ["exchange_id"],
|
40
|
+
where: "exchange_id IS NOT NULL AND deleted_at IS NOT NULL",
|
41
|
+
});
|
42
|
+
const ClaimIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
43
|
+
tableName: "return",
|
44
|
+
columns: ["claim_id"],
|
45
|
+
where: "claim_id IS NOT NULL AND deleted_at IS NOT NULL",
|
46
|
+
});
|
47
|
+
let Return = class Return {
|
48
|
+
constructor() {
|
49
|
+
this.exchange_id = null;
|
50
|
+
this.claim_id = null;
|
51
|
+
this.status = utils_1.ReturnStatus.REQUESTED;
|
52
|
+
this.no_notification = null;
|
53
|
+
this.items = new core_1.Collection(this);
|
54
|
+
this.shipping_methods = new core_1.Collection(this);
|
55
|
+
this.transactions = new core_1.Collection(this);
|
56
|
+
this.metadata = null;
|
57
|
+
this.deleted_at = null;
|
58
|
+
this.received_at = null;
|
59
|
+
this.canceled_at = null;
|
60
|
+
}
|
61
|
+
onCreate() {
|
62
|
+
this.id = (0, utils_1.generateEntityId)(this.id, "return");
|
63
|
+
}
|
64
|
+
onInit() {
|
65
|
+
this.id = (0, utils_1.generateEntityId)(this.id, "return");
|
66
|
+
}
|
67
|
+
};
|
68
|
+
__decorate([
|
69
|
+
(0, core_1.PrimaryKey)({ columnType: "text" }),
|
70
|
+
__metadata("design:type", String)
|
71
|
+
], Return.prototype, "id", void 0);
|
72
|
+
__decorate([
|
73
|
+
(0, core_1.ManyToOne)({
|
74
|
+
entity: () => order_1.default,
|
75
|
+
mapToPk: true,
|
76
|
+
fieldName: "order_id",
|
77
|
+
columnType: "text",
|
78
|
+
}),
|
79
|
+
OrderIdIndex.MikroORMIndex(),
|
80
|
+
__metadata("design:type", String)
|
81
|
+
], Return.prototype, "order_id", void 0);
|
82
|
+
__decorate([
|
83
|
+
(0, core_1.ManyToOne)(() => order_1.default, {
|
84
|
+
persist: false,
|
85
|
+
}),
|
86
|
+
__metadata("design:type", Object)
|
87
|
+
], Return.prototype, "order", void 0);
|
88
|
+
__decorate([
|
89
|
+
(0, core_1.OneToOne)({
|
90
|
+
entity: () => exchange_1.default,
|
91
|
+
cascade: ["soft-remove"],
|
92
|
+
fieldName: "exchange_id",
|
93
|
+
nullable: true,
|
94
|
+
}),
|
95
|
+
__metadata("design:type", Object)
|
96
|
+
], Return.prototype, "exchange", void 0);
|
97
|
+
__decorate([
|
98
|
+
(0, core_1.Property)({ columnType: "text", nullable: true }),
|
99
|
+
ExchangeIdIndex.MikroORMIndex(),
|
100
|
+
__metadata("design:type", Object)
|
101
|
+
], Return.prototype, "exchange_id", void 0);
|
102
|
+
__decorate([
|
103
|
+
(0, core_1.OneToOne)({
|
104
|
+
entity: () => claim_1.default,
|
105
|
+
cascade: ["soft-remove"],
|
106
|
+
fieldName: "claim_id",
|
107
|
+
nullable: true,
|
108
|
+
}),
|
109
|
+
__metadata("design:type", Object)
|
110
|
+
], Return.prototype, "claim", void 0);
|
111
|
+
__decorate([
|
112
|
+
(0, core_1.Property)({ columnType: "text", nullable: true }),
|
113
|
+
ClaimIdIndex.MikroORMIndex(),
|
114
|
+
__metadata("design:type", Object)
|
115
|
+
], Return.prototype, "claim_id", void 0);
|
116
|
+
__decorate([
|
117
|
+
(0, core_1.Property)({
|
118
|
+
columnType: "integer",
|
119
|
+
}),
|
120
|
+
__metadata("design:type", Number)
|
121
|
+
], Return.prototype, "order_version", void 0);
|
122
|
+
__decorate([
|
123
|
+
(0, core_1.Property)({ autoincrement: true, primary: false }),
|
124
|
+
DisplayIdIndex.MikroORMIndex(),
|
125
|
+
__metadata("design:type", Number)
|
126
|
+
], Return.prototype, "display_id", void 0);
|
127
|
+
__decorate([
|
128
|
+
(0, core_1.Enum)({ items: () => utils_1.ReturnStatus, default: utils_1.ReturnStatus.REQUESTED }),
|
129
|
+
__metadata("design:type", String)
|
130
|
+
], Return.prototype, "status", void 0);
|
131
|
+
__decorate([
|
132
|
+
(0, core_1.Property)({ columnType: "boolean", nullable: true }),
|
133
|
+
__metadata("design:type", Object)
|
134
|
+
], Return.prototype, "no_notification", void 0);
|
135
|
+
__decorate([
|
136
|
+
(0, utils_1.MikroOrmBigNumberProperty)({
|
137
|
+
nullable: true,
|
138
|
+
}),
|
139
|
+
__metadata("design:type", Object)
|
140
|
+
], Return.prototype, "refund_amount", void 0);
|
141
|
+
__decorate([
|
142
|
+
(0, core_1.Property)({ columnType: "jsonb", nullable: true }),
|
143
|
+
__metadata("design:type", Object)
|
144
|
+
], Return.prototype, "raw_refund_amount", void 0);
|
145
|
+
__decorate([
|
146
|
+
(0, core_1.OneToMany)(() => _models_1.ReturnItem, (itemDetail) => itemDetail.return, {
|
147
|
+
cascade: [core_1.Cascade.PERSIST],
|
148
|
+
}),
|
149
|
+
__metadata("design:type", Object)
|
150
|
+
], Return.prototype, "items", void 0);
|
151
|
+
__decorate([
|
152
|
+
(0, core_1.OneToMany)(() => order_shipping_method_1.default, (shippingMethod) => shippingMethod.return, {
|
153
|
+
cascade: [core_1.Cascade.PERSIST],
|
154
|
+
}),
|
155
|
+
__metadata("design:type", Object)
|
156
|
+
], Return.prototype, "shipping_methods", void 0);
|
157
|
+
__decorate([
|
158
|
+
(0, core_1.OneToMany)(() => _models_1.Transaction, (transaction) => transaction.return, {
|
159
|
+
cascade: [core_1.Cascade.PERSIST],
|
160
|
+
}),
|
161
|
+
__metadata("design:type", Object)
|
162
|
+
], Return.prototype, "transactions", void 0);
|
163
|
+
__decorate([
|
164
|
+
(0, core_1.Property)({ columnType: "jsonb", nullable: true }),
|
165
|
+
__metadata("design:type", Object)
|
166
|
+
], Return.prototype, "metadata", void 0);
|
167
|
+
__decorate([
|
168
|
+
(0, core_1.Property)({
|
169
|
+
onCreate: () => new Date(),
|
170
|
+
columnType: "timestamptz",
|
171
|
+
defaultRaw: "now()",
|
172
|
+
}),
|
173
|
+
__metadata("design:type", Date)
|
174
|
+
], Return.prototype, "created_at", void 0);
|
175
|
+
__decorate([
|
176
|
+
(0, core_1.Property)({
|
177
|
+
onCreate: () => new Date(),
|
178
|
+
onUpdate: () => new Date(),
|
179
|
+
columnType: "timestamptz",
|
180
|
+
defaultRaw: "now()",
|
181
|
+
}),
|
182
|
+
__metadata("design:type", Date)
|
183
|
+
], Return.prototype, "updated_at", void 0);
|
184
|
+
__decorate([
|
185
|
+
(0, core_1.Property)({ columnType: "timestamptz", nullable: true }),
|
186
|
+
ReturnDeletedAtIndex.MikroORMIndex(),
|
187
|
+
__metadata("design:type", Object)
|
188
|
+
], Return.prototype, "deleted_at", void 0);
|
189
|
+
__decorate([
|
190
|
+
(0, core_1.Property)({ columnType: "timestamptz", nullable: true }),
|
191
|
+
__metadata("design:type", Object)
|
192
|
+
], Return.prototype, "received_at", void 0);
|
193
|
+
__decorate([
|
194
|
+
(0, core_1.Property)({ columnType: "timestamptz", nullable: true }),
|
195
|
+
__metadata("design:type", Object)
|
196
|
+
], Return.prototype, "canceled_at", void 0);
|
197
|
+
__decorate([
|
198
|
+
(0, core_1.BeforeCreate)(),
|
199
|
+
__metadata("design:type", Function),
|
200
|
+
__metadata("design:paramtypes", []),
|
201
|
+
__metadata("design:returntype", void 0)
|
202
|
+
], Return.prototype, "onCreate", null);
|
203
|
+
__decorate([
|
204
|
+
(0, core_1.OnInit)(),
|
205
|
+
__metadata("design:type", Function),
|
206
|
+
__metadata("design:paramtypes", []),
|
207
|
+
__metadata("design:returntype", void 0)
|
208
|
+
], Return.prototype, "onInit", null);
|
209
|
+
Return = __decorate([
|
210
|
+
(0, core_1.Entity)({ tableName: "return" })
|
211
|
+
], Return);
|
212
|
+
exports.default = Return;
|
213
|
+
//# sourceMappingURL=return.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"return.js","sourceRoot":"","sources":["../../src/models/return.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,2CAMwB;AACxB,0CAcwB;AACxB,qCAAiD;AACjD,oDAA2B;AAC3B,0DAAiC;AACjC,oDAA2B;AAE3B,oFAAyD;AAIzD,MAAM,cAAc,GAAG,IAAA,sCAA8B,EAAC;IACpD,SAAS,EAAE,QAAQ;IACnB,OAAO,EAAE,YAAY;IACrB,KAAK,EAAE,wBAAwB;CAChC,CAAC,CAAA;AAEF,MAAM,oBAAoB,GAAG,IAAA,sCAA8B,EAAC;IAC1D,SAAS,EAAE,QAAQ;IACnB,OAAO,EAAE,YAAY;IACrB,KAAK,EAAE,wBAAwB;CAChC,CAAC,CAAA;AAEF,MAAM,YAAY,GAAG,IAAA,sCAA8B,EAAC;IAClD,SAAS,EAAE,QAAQ;IACnB,OAAO,EAAE,CAAC,UAAU,CAAC;IACrB,KAAK,EAAE,wBAAwB;CAChC,CAAC,CAAA;AAEF,MAAM,eAAe,GAAG,IAAA,sCAA8B,EAAC;IACrD,SAAS,EAAE,QAAQ;IACnB,OAAO,EAAE,CAAC,aAAa,CAAC;IACxB,KAAK,EAAE,oDAAoD;CAC5D,CAAC,CAAA;AAEF,MAAM,YAAY,GAAG,IAAA,sCAA8B,EAAC;IAClD,SAAS,EAAE,QAAQ;IACnB,OAAO,EAAE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,IAAI,EAAE,CAAC;;2CACzB;AAG/B;IADC,IAAA,eAAQ,EAAC,EAAE,UAAU,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACzB;AAG/B;IADC,IAAA,mBAAY,GAAE;;;;sCAGd;AAGD;IADC,IAAA,aAAM,GAAE;;;;oCAGR;AA1HkB,MAAM;IAD1B,IAAA,aAAM,EAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC;GACX,MAAM,CA2H1B;kBA3HoB,MAAM"}
|
@@ -1,7 +1,8 @@
|
|
1
|
+
import { Rel } from "@mikro-orm/core";
|
1
2
|
import AdjustmentLine from "./adjustment-line";
|
2
3
|
import ShippingMethod from "./shipping-method";
|
3
4
|
export default class ShippingMethodAdjustment extends AdjustmentLine {
|
4
|
-
shipping_method: ShippingMethod
|
5
|
+
shipping_method: Rel<ShippingMethod>;
|
5
6
|
shipping_method_id: string;
|
6
7
|
onCreate(): void;
|
7
8
|
onInit(): void;
|
@@ -34,7 +34,7 @@ __decorate([
|
|
34
34
|
(0, core_1.ManyToOne)(() => shipping_method_1.default, {
|
35
35
|
persist: false,
|
36
36
|
}),
|
37
|
-
__metadata("design:type",
|
37
|
+
__metadata("design:type", Object)
|
38
38
|
], ShippingMethodAdjustment.prototype, "shipping_method", void 0);
|
39
39
|
__decorate([
|
40
40
|
(0, core_1.ManyToOne)({
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"shipping-method-adjustment.js","sourceRoot":"","sources":["../../src/models/shipping-method-adjustment.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,2CAGwB;AACxB,
|
1
|
+
{"version":3,"file":"shipping-method-adjustment.js","sourceRoot":"","sources":["../../src/models/shipping-method-adjustment.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,2CAGwB;AACxB,0CAA8E;AAC9E,wEAA8C;AAC9C,wEAA8C;AAE9C,MAAM,uBAAuB,GAAG,IAAA,sCAA8B,EAAC;IAC7D,SAAS,EAAE,kCAAkC;IAC7C,OAAO,EAAE,oBAAoB;CAC9B,CAAC,CAAA;AAGa,IAAM,wBAAwB,GAA9B,MAAM,wBAAyB,SAAQ,yBAAc;IAiBlE,QAAQ;QACN,IAAI,CAAC,EAAE,GAAG,IAAA,wBAAgB,EAAC,IAAI,CAAC,EAAE,EAAE,UAAU,CAAC,CAAA;QAC/C,IAAI,CAAC,kBAAkB,KAAK,IAAI,CAAC,eAAe,EAAE,EAAE,CAAA;IACtD,CAAC;IAGD,MAAM;QACJ,IAAI,CAAC,EAAE,GAAG,IAAA,wBAAgB,EAAC,IAAI,CAAC,EAAE,EAAE,UAAU,CAAC,CAAA;QAC/C,IAAI,CAAC,kBAAkB,KAAK,IAAI,CAAC,eAAe,EAAE,EAAE,CAAA;IACtD,CAAC;CACF,CAAA;AAvBC;IAHC,IAAA,gBAAS,EAAC,GAAG,EAAE,CAAC,yBAAc,EAAE;QAC/B,OAAO,EAAE,KAAK;KACf,CAAC;;iEACkC;AAUpC;IARC,IAAA,gBAAS,EAAC;QACT,MAAM,EAAE,GAAG,EAAE,CAAC,yBAAc;QAC5B,UAAU,EAAE,MAAM;QAClB,SAAS,EAAE,oBAAoB;QAC/B,OAAO,EAAE,IAAI;QACb,QAAQ,EAAE,SAAS;KACpB,CAAC;IACD,uBAAuB,CAAC,aAAa,EAAE;;oEACd;AAG1B;IADC,IAAA,mBAAY,GAAE;;;;wDAId;AAGD;IADC,IAAA,aAAM,GAAE;;;;sDAIR;AA1BkB,wBAAwB;IAD5C,IAAA,aAAM,EAAC,EAAE,SAAS,EAAE,kCAAkC,EAAE,CAAC;GACrC,wBAAwB,CA2B5C;kBA3BoB,wBAAwB"}
|
@@ -1,7 +1,8 @@
|
|
1
|
+
import { Rel } from "@mikro-orm/core";
|
1
2
|
import ShippingMethod from "./shipping-method";
|
2
3
|
import TaxLine from "./tax-line";
|
3
4
|
export default class ShippingMethodTaxLine extends TaxLine {
|
4
|
-
shipping_method: ShippingMethod
|
5
|
+
shipping_method: Rel<ShippingMethod>;
|
5
6
|
shipping_method_id: string;
|
6
7
|
onCreate(): void;
|
7
8
|
onInit(): void;
|
@@ -34,7 +34,7 @@ __decorate([
|
|
34
34
|
(0, core_1.ManyToOne)(() => shipping_method_1.default, {
|
35
35
|
persist: false,
|
36
36
|
}),
|
37
|
-
__metadata("design:type",
|
37
|
+
__metadata("design:type", Object)
|
38
38
|
], ShippingMethodTaxLine.prototype, "shipping_method", void 0);
|
39
39
|
__decorate([
|
40
40
|
(0, core_1.ManyToOne)({
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"shipping-method-tax-line.js","sourceRoot":"","sources":["../../src/models/shipping-method-tax-line.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,2CAGwB;AACxB,
|
1
|
+
{"version":3,"file":"shipping-method-tax-line.js","sourceRoot":"","sources":["../../src/models/shipping-method-tax-line.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,2CAGwB;AACxB,0CAA8E;AAC9E,wEAA8C;AAC9C,0DAAgC;AAEhC,MAAM,uBAAuB,GAAG,IAAA,sCAA8B,EAAC;IAC7D,SAAS,EAAE,gCAAgC;IAC3C,OAAO,EAAE,oBAAoB;CAC9B,CAAC,CAAA;AAGa,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,kBAAO;IAiBxD,QAAQ;QACN,IAAI,CAAC,EAAE,GAAG,IAAA,wBAAgB,EAAC,IAAI,CAAC,EAAE,EAAE,UAAU,CAAC,CAAA;QAC/C,IAAI,CAAC,kBAAkB,KAAK,IAAI,CAAC,eAAe,EAAE,EAAE,CAAA;IACtD,CAAC;IAGD,MAAM;QACJ,IAAI,CAAC,EAAE,GAAG,IAAA,wBAAgB,EAAC,IAAI,CAAC,EAAE,EAAE,UAAU,CAAC,CAAA;QAC/C,IAAI,CAAC,kBAAkB,KAAK,IAAI,CAAC,eAAe,EAAE,EAAE,CAAA;IACtD,CAAC;CACF,CAAA;AAvBC;IAHC,IAAA,gBAAS,EAAC,GAAG,EAAE,CAAC,yBAAc,EAAE;QAC/B,OAAO,EAAE,KAAK;KACf,CAAC;;8DACkC;AAUpC;IARC,IAAA,gBAAS,EAAC;QACT,MAAM,EAAE,GAAG,EAAE,CAAC,yBAAc;QAC5B,SAAS,EAAE,oBAAoB;QAC/B,UAAU,EAAE,MAAM;QAClB,OAAO,EAAE,IAAI;QACb,QAAQ,EAAE,SAAS;KACpB,CAAC;IACD,uBAAuB,CAAC,aAAa,EAAE;;iEACd;AAG1B;IADC,IAAA,mBAAY,GAAE;;;;qDAId;AAGD;IADC,IAAA,aAAM,GAAE;;;;mDAIR;AA1BkB,qBAAqB;IADzC,IAAA,aAAM,EAAC,EAAE,SAAS,EAAE,gCAAgC,EAAE,CAAC;GACnC,qBAAqB,CA2BzC;kBA3BoB,qBAAqB"}
|
@@ -59,7 +59,7 @@ __decorate([
|
|
59
59
|
], ShippingMethod.prototype, "raw_amount", void 0);
|
60
60
|
__decorate([
|
61
61
|
(0, core_1.Property)({ columnType: "boolean" }),
|
62
|
-
__metadata("design:type",
|
62
|
+
__metadata("design:type", Boolean)
|
63
63
|
], ShippingMethod.prototype, "is_tax_inclusive", void 0);
|
64
64
|
__decorate([
|
65
65
|
(0, core_1.Property)({
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"shipping-method.js","sourceRoot":"","sources":["../../src/models/shipping-method.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,2CAKwB;AACxB,
|
1
|
+
{"version":3,"file":"shipping-method.js","sourceRoot":"","sources":["../../src/models/shipping-method.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,2CAKwB;AACxB,0CAUwB;AACxB,8FAAmE;AACnE,0FAA8D;AAE9D,MAAM,qBAAqB,GAAG,IAAA,sCAA8B,EAAC;IAC3D,SAAS,EAAE,uBAAuB;IAClC,OAAO,EAAE,oBAAoB;CAC9B,CAAC,CAAA;AAGa,IAAM,cAAc,GAApB,MAAM,cAAc;IAApB;QAQb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EAAC,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACH;AAS/C;IAPC,IAAA,gBAAS,EACR,GAAG,EAAE,CAAC,kCAAqB,EAC3B,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,eAAe,EACpC;QACE,OAAO,EAAE,CAAC,cAAO,CAAC,OAAO,CAAC;KAC3B,CACF;;iDAC2D;AAS5D;IAPC,IAAA,gBAAS,EACR,GAAG,EAAE,CAAC,oCAAwB,EAC9B,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,eAAe,EAC1C;QACE,OAAO,EAAE,CAAC,cAAO,CAAC,OAAO,CAAC;KAC3B,CACF;;mDACgE;AAOjE;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,mBAAY,GAAE;;;;8CAGd;AAED;IADC,IAAA,aAAM,GAAE;;;;4CAGR;AAxEkB,cAAc;IADlC,IAAA,aAAM,EAAC,EAAE,SAAS,EAAE,uBAAuB,EAAE,CAAC;GAC1B,cAAc,CAyElC;kBAzEoB,cAAc"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"tax-line.js","sourceRoot":"","sources":["../../src/models/tax-line.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,
|
1
|
+
{"version":3,"file":"tax-line.js","sourceRoot":"","sources":["../../src/models/tax-line.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,2CAAsE;AACtE,0CAAsD;AAEtD;;;GAGG;AACH,MAA8B,OAAO;CAuCpC;AAvCD,0BAuCC;AArCC;IADC,IAAA,iBAAU,EAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC;;mCACzB;AAGV;IADC,IAAA,eAAQ,EAAC,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACtB;AAM3B;IAJC,IAAA,eAAQ,EAAC;QACR,UAAU,EAAE,MAAM;QAClB,QAAQ,EAAE,IAAI;KACf,CAAC;;4CACyB;AAG3B;IADC,IAAA,eAAQ,EAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC;;qCACrB;AAGZ;IADC,IAAA,iCAAyB,GAAE;;qCACJ;AAGxB;IADC,IAAA,eAAQ,EAAC,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC;;yCACP;AAG3B;IADC,IAAA,eAAQ,EAAC,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACtB;AAO3B;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;2CAAA;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;2CAAA"}
|
@@ -1,13 +1,22 @@
|
|
1
1
|
import { BigNumberRawValue, DAL } from "@medusajs/types";
|
2
2
|
import { BigNumber } from "@medusajs/utils";
|
3
|
-
import { OptionalProps } from "@mikro-orm/core";
|
3
|
+
import { OptionalProps, Rel } from "@mikro-orm/core";
|
4
|
+
import Claim from "./claim";
|
5
|
+
import Exchange from "./exchange";
|
4
6
|
import Order from "./order";
|
7
|
+
import Return from "./return";
|
5
8
|
type OptionalLineItemProps = DAL.EntityDateColumns;
|
6
9
|
export default class Transaction {
|
7
10
|
[OptionalProps]?: OptionalLineItemProps;
|
8
11
|
id: string;
|
9
12
|
order_id: string;
|
10
|
-
order: Order
|
13
|
+
order: Rel<Order>;
|
14
|
+
return_id: string | null;
|
15
|
+
return: Rel<Return>;
|
16
|
+
exchange_id: string | null;
|
17
|
+
exchange: Rel<Exchange>;
|
18
|
+
claim_id: string | null;
|
19
|
+
claim: Rel<Claim>;
|
11
20
|
version: number;
|
12
21
|
amount: BigNumber | number;
|
13
22
|
raw_amount: BigNumberRawValue;
|