@medusajs/order 0.1.3-snapshot-20240718073308 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.ts +8 -6
- package/dist/index.js +26 -4
- package/dist/index.js.map +1 -1
- package/dist/joiner-config.d.ts +5 -0
- package/dist/joiner-config.js +36 -0
- package/dist/joiner-config.js.map +1 -0
- package/dist/migrations/Migration20240219102530.d.ts +0 -1
- package/dist/migrations/Migration20240219102530.js +4 -38
- package/dist/migrations/Migration20240219102530.js.map +1 -1
- package/dist/models/address.d.ts +1 -2
- package/dist/models/adjustment-line.d.ts +1 -3
- package/dist/models/adjustment-line.js +0 -5
- package/dist/models/adjustment-line.js.map +1 -1
- package/dist/models/index.d.ts +0 -9
- package/dist/models/index.js +1 -17
- package/dist/models/index.js.map +1 -1
- package/dist/models/line-item-adjustment.d.ts +1 -3
- 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 +1 -3
- 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 +1 -3
- package/dist/models/line-item.js +4 -18
- package/dist/models/line-item.js.map +1 -1
- package/dist/models/order-change-action.d.ts +4 -15
- package/dist/models/order-change-action.js +7 -102
- package/dist/models/order-change-action.js.map +1 -1
- package/dist/models/order-change.d.ts +5 -17
- package/dist/models/order-change.js +4 -109
- package/dist/models/order-change.js.map +1 -1
- package/dist/models/order-item.d.ts +4 -5
- 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 +4 -14
- package/dist/models/order-shipping-method.js +13 -89
- package/dist/models/order-shipping-method.js.map +1 -1
- package/dist/models/order-summary.d.ts +2 -6
- package/dist/models/order-summary.js +6 -9
- package/dist/models/order-summary.js.map +1 -1
- package/dist/models/order.d.ts +4 -6
- package/dist/models/order.js +1 -11
- package/dist/models/order.js.map +1 -1
- package/dist/models/shipping-method-adjustment.d.ts +1 -3
- 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 +1 -3
- 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 +0 -2
- package/dist/models/shipping-method.js +4 -17
- package/dist/models/shipping-method.js.map +1 -1
- package/dist/models/tax-line.d.ts +0 -2
- package/dist/models/tax-line.js +0 -7
- package/dist/models/tax-line.js.map +1 -1
- package/dist/models/transaction.d.ts +3 -15
- package/dist/models/transaction.js +4 -109
- package/dist/models/transaction.js.map +1 -1
- package/dist/module-definition.d.ts +2 -0
- package/dist/module-definition.js +59 -0
- package/dist/module-definition.js.map +1 -0
- package/dist/repositories/index.d.ts +1 -4
- package/dist/repositories/index.js +16 -7
- package/dist/repositories/index.js.map +1 -1
- package/dist/repositories/order.d.ts +3 -1
- package/dist/repositories/order.js +85 -2
- package/dist/repositories/order.js.map +1 -1
- package/dist/scripts/bin/run-seed.d.ts +3 -0
- package/dist/scripts/bin/run-seed.js +49 -0
- package/dist/scripts/bin/run-seed.js.map +1 -0
- package/dist/services/index.d.ts +1 -1
- package/dist/services/index.js +3 -1
- package/dist/services/index.js.map +1 -1
- package/dist/services/order-change-service.d.ts +15 -0
- package/dist/services/order-change-service.js +96 -0
- package/dist/services/order-change-service.js.map +1 -0
- package/dist/services/order-module-service.d.ts +67 -138
- package/dist/services/order-module-service.js +240 -990
- package/dist/services/order-module-service.js.map +1 -1
- package/dist/services/order-service.d.ts +4 -5
- package/dist/services/order-service.js +1 -1
- package/dist/services/order-service.js.map +1 -1
- package/dist/types/address.d.ts +0 -1
- package/dist/types/index.d.ts +1 -3
- package/dist/types/index.js +0 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types/line-item-adjustment.d.ts +0 -1
- package/dist/types/line-item-tax-line.d.ts +0 -1
- package/dist/types/line-item.d.ts +0 -1
- package/dist/types/order-detail.d.ts +1 -2
- package/dist/types/order.d.ts +2 -3
- package/dist/types/shipping-method-adjustment.d.ts +0 -1
- package/dist/types/shipping-method-tax-line.d.ts +0 -1
- package/dist/types/shipping-method.d.ts +0 -4
- package/dist/types/tax-line.d.ts +0 -1
- package/dist/types/transaction.d.ts +0 -1
- package/dist/types/utils/index.d.ts +11 -43
- package/dist/types/utils/index.js.map +1 -1
- package/dist/utils/action-key.d.ts +13 -0
- package/dist/utils/action-key.js +18 -0
- package/dist/utils/action-key.js.map +1 -0
- package/dist/utils/actions/cancel-return.d.ts +0 -1
- package/dist/utils/actions/cancel-return.js +6 -7
- package/dist/utils/actions/cancel-return.js.map +1 -1
- package/dist/utils/actions/cancel.d.ts +0 -1
- package/dist/utils/actions/cancel.js +2 -2
- package/dist/utils/actions/cancel.js.map +1 -1
- package/dist/utils/actions/fulfill-item.d.ts +0 -1
- package/dist/utils/actions/fulfill-item.js +6 -7
- package/dist/utils/actions/fulfill-item.js.map +1 -1
- package/dist/utils/actions/index.d.ts +0 -4
- package/dist/utils/actions/index.js +0 -3
- package/dist/utils/actions/index.js.map +1 -1
- package/dist/utils/actions/item-add.d.ts +0 -1
- package/dist/utils/actions/item-add.js +14 -17
- package/dist/utils/actions/item-add.js.map +1 -1
- package/dist/utils/actions/item-remove.d.ts +0 -1
- package/dist/utils/actions/item-remove.js +10 -11
- package/dist/utils/actions/item-remove.js.map +1 -1
- package/dist/utils/actions/receive-damaged-return-item.d.ts +0 -1
- package/dist/utils/actions/receive-damaged-return-item.js +7 -8
- package/dist/utils/actions/receive-damaged-return-item.js.map +1 -1
- package/dist/utils/actions/receive-return-item.d.ts +0 -1
- package/dist/utils/actions/receive-return-item.js +7 -8
- package/dist/utils/actions/receive-return-item.js.map +1 -1
- package/dist/utils/actions/return-item.d.ts +0 -1
- package/dist/utils/actions/return-item.js +8 -9
- package/dist/utils/actions/return-item.js.map +1 -1
- package/dist/utils/actions/ship-item.d.ts +0 -1
- package/dist/utils/actions/ship-item.js +6 -7
- package/dist/utils/actions/ship-item.js.map +1 -1
- package/dist/utils/actions/shipping-add.d.ts +0 -1
- package/dist/utils/actions/shipping-add.js +7 -16
- package/dist/utils/actions/shipping-add.js.map +1 -1
- package/dist/utils/actions/write-off-item.d.ts +0 -1
- package/dist/utils/actions/write-off-item.js +6 -7
- package/dist/utils/actions/write-off-item.js.map +1 -1
- package/dist/utils/calculate-order-change.d.ts +2 -11
- package/dist/utils/calculate-order-change.js +70 -68
- package/dist/utils/calculate-order-change.js.map +1 -1
- package/dist/utils/index.d.ts +1 -4
- package/dist/utils/index.js +1 -3
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/transform-order.d.ts +2 -4
- package/dist/utils/transform-order.js +17 -131
- package/dist/utils/transform-order.js.map +1 -1
- package/package.json +14 -8
- package/dist/index.d.ts.map +0 -1
- package/dist/migrations/Migration20240219102530.d.ts.map +0 -1
- package/dist/migrations/Migration20240604100512.d.ts +0 -5
- package/dist/migrations/Migration20240604100512.d.ts.map +0 -1
- package/dist/migrations/Migration20240604100512.js +0 -364
- package/dist/migrations/Migration20240604100512.js.map +0 -1
- package/dist/migrations/Migration20240715102100.d.ts +0 -5
- package/dist/migrations/Migration20240715102100.d.ts.map +0 -1
- package/dist/migrations/Migration20240715102100.js +0 -15
- package/dist/migrations/Migration20240715102100.js.map +0 -1
- package/dist/migrations/Migration20240715174100.d.ts +0 -5
- package/dist/migrations/Migration20240715174100.d.ts.map +0 -1
- package/dist/migrations/Migration20240715174100.js +0 -21
- package/dist/migrations/Migration20240715174100.js.map +0 -1
- package/dist/migrations/Migration20240716081800.d.ts +0 -5
- package/dist/migrations/Migration20240716081800.d.ts.map +0 -1
- package/dist/migrations/Migration20240716081800.js +0 -67
- package/dist/migrations/Migration20240716081800.js.map +0 -1
- package/dist/models/address.d.ts.map +0 -1
- package/dist/models/adjustment-line.d.ts.map +0 -1
- package/dist/models/claim-item-image.d.ts +0 -19
- package/dist/models/claim-item-image.d.ts.map +0 -1
- package/dist/models/claim-item-image.js +0 -109
- package/dist/models/claim-item-image.js.map +0 -1
- package/dist/models/claim-item.d.ts +0 -29
- package/dist/models/claim-item.d.ts.map +0 -1
- package/dist/models/claim-item.js +0 -156
- package/dist/models/claim-item.js.map +0 -1
- package/dist/models/claim.d.ts +0 -36
- package/dist/models/claim.d.ts.map +0 -1
- package/dist/models/claim.js +0 -195
- package/dist/models/claim.js.map +0 -1
- package/dist/models/exchange-item.d.ts +0 -24
- package/dist/models/exchange-item.d.ts.map +0 -1
- package/dist/models/exchange-item.js +0 -138
- package/dist/models/exchange-item.js.map +0 -1
- package/dist/models/exchange.d.ts +0 -34
- package/dist/models/exchange.d.ts.map +0 -1
- package/dist/models/exchange.js +0 -188
- package/dist/models/exchange.js.map +0 -1
- package/dist/models/index.d.ts.map +0 -1
- package/dist/models/line-item-adjustment.d.ts.map +0 -1
- package/dist/models/line-item-tax-line.d.ts.map +0 -1
- package/dist/models/line-item.d.ts.map +0 -1
- package/dist/models/order-change-action.d.ts.map +0 -1
- package/dist/models/order-change.d.ts.map +0 -1
- package/dist/models/order-item.d.ts.map +0 -1
- package/dist/models/order-shipping-method.d.ts.map +0 -1
- package/dist/models/order-summary.d.ts.map +0 -1
- package/dist/models/order.d.ts.map +0 -1
- package/dist/models/return-item.d.ts +0 -29
- package/dist/models/return-item.d.ts.map +0 -1
- package/dist/models/return-item.js +0 -170
- package/dist/models/return-item.js.map +0 -1
- package/dist/models/return-reason.d.ts +0 -21
- package/dist/models/return-reason.d.ts.map +0 -1
- package/dist/models/return-reason.js +0 -120
- package/dist/models/return-reason.js.map +0 -1
- package/dist/models/return.d.ts +0 -39
- package/dist/models/return.d.ts.map +0 -1
- package/dist/models/return.js +0 -216
- package/dist/models/return.js.map +0 -1
- package/dist/models/shipping-method-adjustment.d.ts.map +0 -1
- package/dist/models/shipping-method-tax-line.d.ts.map +0 -1
- package/dist/models/shipping-method.d.ts.map +0 -1
- package/dist/models/tax-line.d.ts.map +0 -1
- package/dist/models/transaction.d.ts.map +0 -1
- package/dist/repositories/claim.d.ts +0 -9
- package/dist/repositories/claim.d.ts.map +0 -1
- package/dist/repositories/claim.js +0 -11
- package/dist/repositories/claim.js.map +0 -1
- package/dist/repositories/exchange.d.ts +0 -9
- package/dist/repositories/exchange.d.ts.map +0 -1
- package/dist/repositories/exchange.js +0 -11
- package/dist/repositories/exchange.js.map +0 -1
- package/dist/repositories/index.d.ts.map +0 -1
- package/dist/repositories/order.d.ts.map +0 -1
- package/dist/repositories/return.d.ts +0 -9
- package/dist/repositories/return.d.ts.map +0 -1
- package/dist/repositories/return.js +0 -11
- package/dist/repositories/return.js.map +0 -1
- package/dist/services/actions/cancel-claim.d.ts +0 -3
- package/dist/services/actions/cancel-claim.d.ts.map +0 -1
- package/dist/services/actions/cancel-claim.js +0 -107
- package/dist/services/actions/cancel-claim.js.map +0 -1
- package/dist/services/actions/cancel-exchange.d.ts +0 -3
- package/dist/services/actions/cancel-exchange.d.ts.map +0 -1
- package/dist/services/actions/cancel-exchange.js +0 -92
- package/dist/services/actions/cancel-exchange.js.map +0 -1
- package/dist/services/actions/cancel-fulfillment.d.ts +0 -3
- package/dist/services/actions/cancel-fulfillment.d.ts.map +0 -1
- package/dist/services/actions/cancel-fulfillment.js +0 -32
- package/dist/services/actions/cancel-fulfillment.js.map +0 -1
- package/dist/services/actions/cancel-return.d.ts +0 -3
- package/dist/services/actions/cancel-return.d.ts.map +0 -1
- package/dist/services/actions/cancel-return.js +0 -72
- package/dist/services/actions/cancel-return.js.map +0 -1
- package/dist/services/actions/create-claim.d.ts +0 -3
- package/dist/services/actions/create-claim.d.ts.map +0 -1
- package/dist/services/actions/create-claim.js +0 -228
- package/dist/services/actions/create-claim.js.map +0 -1
- package/dist/services/actions/create-exchange.d.ts +0 -3
- package/dist/services/actions/create-exchange.d.ts.map +0 -1
- package/dist/services/actions/create-exchange.js +0 -193
- package/dist/services/actions/create-exchange.js.map +0 -1
- package/dist/services/actions/create-return.d.ts +0 -3
- package/dist/services/actions/create-return.d.ts.map +0 -1
- package/dist/services/actions/create-return.js +0 -102
- package/dist/services/actions/create-return.js.map +0 -1
- package/dist/services/actions/index.d.ts +0 -11
- package/dist/services/actions/index.d.ts.map +0 -1
- package/dist/services/actions/index.js +0 -27
- package/dist/services/actions/index.js.map +0 -1
- package/dist/services/actions/receive-return.d.ts +0 -3
- package/dist/services/actions/receive-return.d.ts.map +0 -1
- package/dist/services/actions/receive-return.js +0 -73
- package/dist/services/actions/receive-return.js.map +0 -1
- package/dist/services/actions/register-fulfillment.d.ts +0 -3
- package/dist/services/actions/register-fulfillment.d.ts.map +0 -1
- package/dist/services/actions/register-fulfillment.js +0 -30
- package/dist/services/actions/register-fulfillment.js.map +0 -1
- package/dist/services/actions/register-shipment.d.ts +0 -3
- package/dist/services/actions/register-shipment.d.ts.map +0 -1
- package/dist/services/actions/register-shipment.js +0 -38
- package/dist/services/actions/register-shipment.js.map +0 -1
- package/dist/services/index.d.ts.map +0 -1
- package/dist/services/order-module-service.d.ts.map +0 -1
- package/dist/services/order-service.d.ts.map +0 -1
- package/dist/types/address.d.ts.map +0 -1
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/line-item-adjustment.d.ts.map +0 -1
- package/dist/types/line-item-tax-line.d.ts.map +0 -1
- package/dist/types/line-item.d.ts.map +0 -1
- package/dist/types/order-change.d.ts +0 -6
- package/dist/types/order-change.d.ts.map +0 -1
- package/dist/types/order-change.js +0 -3
- package/dist/types/order-change.js.map +0 -1
- package/dist/types/order-detail.d.ts.map +0 -1
- package/dist/types/order.d.ts.map +0 -1
- package/dist/types/shipping-method-adjustment.d.ts.map +0 -1
- package/dist/types/shipping-method-tax-line.d.ts.map +0 -1
- package/dist/types/shipping-method.d.ts.map +0 -1
- package/dist/types/tax-line.d.ts.map +0 -1
- package/dist/types/transaction.d.ts.map +0 -1
- package/dist/types/utils/index.d.ts.map +0 -1
- package/dist/utils/actions/cancel-item-fulfillment.d.ts +0 -2
- package/dist/utils/actions/cancel-item-fulfillment.d.ts.map +0 -1
- package/dist/utils/actions/cancel-item-fulfillment.js +0 -39
- package/dist/utils/actions/cancel-item-fulfillment.js.map +0 -1
- package/dist/utils/actions/cancel-return.d.ts.map +0 -1
- package/dist/utils/actions/cancel.d.ts.map +0 -1
- package/dist/utils/actions/fulfill-item.d.ts.map +0 -1
- package/dist/utils/actions/index.d.ts.map +0 -1
- package/dist/utils/actions/item-add.d.ts.map +0 -1
- package/dist/utils/actions/item-remove.d.ts.map +0 -1
- package/dist/utils/actions/receive-damaged-return-item.d.ts.map +0 -1
- package/dist/utils/actions/receive-return-item.d.ts.map +0 -1
- package/dist/utils/actions/reinstate-item.d.ts +0 -2
- package/dist/utils/actions/reinstate-item.d.ts.map +0 -1
- package/dist/utils/actions/reinstate-item.js +0 -37
- package/dist/utils/actions/reinstate-item.js.map +0 -1
- package/dist/utils/actions/return-item.d.ts.map +0 -1
- package/dist/utils/actions/ship-item.d.ts.map +0 -1
- package/dist/utils/actions/shipping-add.d.ts.map +0 -1
- package/dist/utils/actions/shipping-remove.d.ts +0 -2
- package/dist/utils/actions/shipping-remove.d.ts.map +0 -1
- package/dist/utils/actions/shipping-remove.js +0 -41
- package/dist/utils/actions/shipping-remove.js.map +0 -1
- package/dist/utils/actions/write-off-item.d.ts.map +0 -1
- package/dist/utils/apply-order-changes.d.ts +0 -18
- package/dist/utils/apply-order-changes.d.ts.map +0 -1
- package/dist/utils/apply-order-changes.js +0 -95
- package/dist/utils/apply-order-changes.js.map +0 -1
- package/dist/utils/base-repository-find.d.ts +0 -3
- package/dist/utils/base-repository-find.d.ts.map +0 -1
- package/dist/utils/base-repository-find.js +0 -142
- package/dist/utils/base-repository-find.js.map +0 -1
- package/dist/utils/calculate-order-change.d.ts.map +0 -1
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/set-action-reference.d.ts +0 -3
- package/dist/utils/set-action-reference.d.ts.map +0 -1
- package/dist/utils/set-action-reference.js +0 -17
- package/dist/utils/set-action-reference.js.map +0 -1
- package/dist/utils/transform-order.d.ts.map +0 -1
package/dist/index.d.ts
CHANGED
@@ -1,6 +1,8 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
export
|
6
|
-
|
1
|
+
import { moduleDefinition } from "./module-definition";
|
2
|
+
export * from "./models";
|
3
|
+
export * from "./services";
|
4
|
+
export * from "./types";
|
5
|
+
export declare const initialize: (options?: import("@medusajs/modules-sdk").InternalModuleDeclaration | import("@medusajs/modules-sdk").ModuleServiceInitializeOptions | import("@medusajs/modules-sdk").ModuleServiceInitializeCustomDataLayerOptions | import("@medusajs/modules-sdk").ExternalModuleDeclaration | undefined, injectedDependencies?: any) => Promise<unknown>;
|
6
|
+
export declare const runMigrations: ((options: import("@medusajs/modules-sdk").LoaderOptions<any>, moduleDeclaration?: import("@medusajs/modules-sdk").InternalModuleDeclaration | undefined) => Promise<void>) | undefined;
|
7
|
+
export declare const revertMigration: ((options: import("@medusajs/modules-sdk").LoaderOptions<any>, moduleDeclaration?: import("@medusajs/modules-sdk").InternalModuleDeclaration | undefined) => Promise<void>) | undefined;
|
8
|
+
export default moduleDefinition;
|
package/dist/index.js
CHANGED
@@ -1,8 +1,30 @@
|
|
1
1
|
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
|
4
|
-
const
|
5
|
-
|
6
|
-
|
17
|
+
exports.revertMigration = exports.runMigrations = exports.initialize = void 0;
|
18
|
+
const modules_sdk_1 = require("@medusajs/modules-sdk");
|
19
|
+
const module_definition_1 = require("./module-definition");
|
20
|
+
__exportStar(require("./models"), exports);
|
21
|
+
__exportStar(require("./services"), exports);
|
22
|
+
__exportStar(require("./types"), exports);
|
23
|
+
exports.initialize = (0, modules_sdk_1.initializeFactory)({
|
24
|
+
moduleName: modules_sdk_1.Modules.ORDER,
|
25
|
+
moduleDefinition: module_definition_1.moduleDefinition,
|
7
26
|
});
|
27
|
+
exports.runMigrations = module_definition_1.moduleDefinition.runMigrations;
|
28
|
+
exports.revertMigration = module_definition_1.moduleDefinition.revertMigration;
|
29
|
+
exports.default = module_definition_1.moduleDefinition;
|
8
30
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,uDAAkE;AAClE,2DAAsD;AAEtD,2CAAwB;AACxB,6CAA0B;AAC1B,0CAAuB;AAEV,QAAA,UAAU,GAAG,IAAA,+BAAiB,EAAC;IAC1C,UAAU,EAAE,qBAAO,CAAC,KAAK;IACzB,gBAAgB,EAAhB,oCAAgB;CACjB,CAAC,CAAA;AACW,QAAA,aAAa,GAAG,oCAAgB,CAAC,aAAa,CAAA;AAC9C,QAAA,eAAe,GAAG,oCAAgB,CAAC,eAAe,CAAA;AAC/D,kBAAe,oCAAgB,CAAA"}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { ModuleJoinerConfig } from "@medusajs/types";
|
2
|
+
import { MapToConfig } from "@medusajs/utils";
|
3
|
+
export declare const LinkableKeys: Record<string, string>;
|
4
|
+
export declare const entityNameToLinkableKeysMap: MapToConfig;
|
5
|
+
export declare const joinerConfig: ModuleJoinerConfig;
|
@@ -0,0 +1,36 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.joinerConfig = exports.entityNameToLinkableKeysMap = exports.LinkableKeys = void 0;
|
7
|
+
const modules_sdk_1 = require("@medusajs/modules-sdk");
|
8
|
+
const _models_1 = require("./models");
|
9
|
+
const order_1 = __importDefault(require("./models/order"));
|
10
|
+
exports.LinkableKeys = {
|
11
|
+
order_id: order_1.default.name,
|
12
|
+
order_item_id: _models_1.LineItem.name,
|
13
|
+
};
|
14
|
+
const entityLinkableKeysMap = {};
|
15
|
+
Object.entries(exports.LinkableKeys).forEach(([key, value]) => {
|
16
|
+
entityLinkableKeysMap[value] ?? (entityLinkableKeysMap[value] = []);
|
17
|
+
entityLinkableKeysMap[value].push({
|
18
|
+
mapTo: key,
|
19
|
+
valueFrom: key.split("_").pop(),
|
20
|
+
});
|
21
|
+
});
|
22
|
+
exports.entityNameToLinkableKeysMap = entityLinkableKeysMap;
|
23
|
+
exports.joinerConfig = {
|
24
|
+
serviceName: modules_sdk_1.Modules.ORDER,
|
25
|
+
primaryKeys: ["id"],
|
26
|
+
linkableKeys: exports.LinkableKeys,
|
27
|
+
alias: [
|
28
|
+
{
|
29
|
+
name: ["order", "orders"],
|
30
|
+
args: {
|
31
|
+
entity: order_1.default.name,
|
32
|
+
},
|
33
|
+
},
|
34
|
+
],
|
35
|
+
};
|
36
|
+
//# sourceMappingURL=joiner-config.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"joiner-config.js","sourceRoot":"","sources":["../src/joiner-config.ts"],"names":[],"mappings":";;;;;;AAAA,uDAA+C;AAG/C,qCAAkC;AAClC,2DAAkC;AAErB,QAAA,YAAY,GAA2B;IAClD,QAAQ,EAAE,eAAK,CAAC,IAAI;IACpB,aAAa,EAAE,kBAAQ,CAAC,IAAI;CAC7B,CAAA;AAED,MAAM,qBAAqB,GAAgB,EAAE,CAAA;AAC7C,MAAM,CAAC,OAAO,CAAC,oBAAY,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;IACpD,qBAAqB,CAAC,KAAK,MAA3B,qBAAqB,CAAC,KAAK,IAAM,EAAE,EAAA;IACnC,qBAAqB,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC;QAChC,KAAK,EAAE,GAAG;QACV,SAAS,EAAE,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAG;KACjC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA;AAEW,QAAA,2BAA2B,GAAgB,qBAAqB,CAAA;AAEhE,QAAA,YAAY,GAAuB;IAC9C,WAAW,EAAE,qBAAO,CAAC,KAAK;IAC1B,WAAW,EAAE,CAAC,IAAI,CAAC;IACnB,YAAY,EAAE,oBAAY;IAC1B,KAAK,EAAE;QACL;YACE,IAAI,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC;YACzB,IAAI,EAAE;gBACJ,MAAM,EAAE,eAAK,CAAC,IAAI;aACnB;SACF;KACF;CACoB,CAAA"}
|
@@ -32,7 +32,6 @@ class Migration20240219102530 extends migrations_1.Migration {
|
|
32
32
|
CREATE TABLE IF NOT EXISTS "order" (
|
33
33
|
"id" TEXT NOT NULL,
|
34
34
|
"region_id" TEXT NULL,
|
35
|
-
"display_id" SERIAL,
|
36
35
|
"customer_id" TEXT NULL,
|
37
36
|
"version" INTEGER NOT NULL DEFAULT 1,
|
38
37
|
"sales_channel_id" TEXT NULL,
|
@@ -110,11 +109,6 @@ class Migration20240219102530 extends migrations_1.Migration {
|
|
110
109
|
|
111
110
|
${(0, utils_1.generatePostgresAlterColummnIfExistStatement)("order", ["fulfillment_status", "payment_status", "display_id"], "DROP NOT NULL")}
|
112
111
|
|
113
|
-
CREATE INDEX IF NOT EXISTS "IDX_order_display_id" ON "order" (
|
114
|
-
display_id
|
115
|
-
)
|
116
|
-
WHERE deleted_at IS NOT NULL;
|
117
|
-
|
118
112
|
CREATE INDEX IF NOT EXISTS "IDX_order_region_id" ON "order" (
|
119
113
|
region_id
|
120
114
|
)
|
@@ -443,7 +437,6 @@ class Migration20240219102530 extends migrations_1.Migration {
|
|
443
437
|
CREATE TABLE IF NOT EXISTS "order_transaction" (
|
444
438
|
"id" TEXT NOT NULL,
|
445
439
|
"order_id" TEXT NOT NULL,
|
446
|
-
"version" INTEGER NOT NULL DEFAULT 1,
|
447
440
|
"amount" NUMERIC NOT NULL,
|
448
441
|
"raw_amount" JSONB NOT NULL,
|
449
442
|
"currency_code" TEXT NOT NULL,
|
@@ -451,48 +444,21 @@ class Migration20240219102530 extends migrations_1.Migration {
|
|
451
444
|
"reference_id" TEXT NULL,
|
452
445
|
"created_at" TIMESTAMPTZ NOT NULL DEFAULT Now(),
|
453
446
|
"updated_at" TIMESTAMPTZ NOT NULL DEFAULT Now(),
|
454
|
-
"deleted_at" timestamptz NULL,
|
455
447
|
CONSTRAINT "order_transaction_pkey" PRIMARY KEY ("id")
|
456
448
|
);
|
457
449
|
|
458
|
-
CREATE INDEX IF NOT EXISTS "
|
459
|
-
order_id
|
460
|
-
|
461
|
-
)
|
462
|
-
WHERE deleted_at IS NOT NULL;
|
450
|
+
CREATE INDEX IF NOT EXISTS "IDX_order_transaction_order_id" ON "order_transaction" (
|
451
|
+
order_id
|
452
|
+
);
|
463
453
|
|
464
454
|
CREATE INDEX IF NOT EXISTS "IDX_order_transaction_currency_code" ON "order_transaction" (
|
465
455
|
currency_code
|
466
|
-
)
|
467
|
-
WHERE deleted_at IS NOT NULL;
|
456
|
+
);
|
468
457
|
|
469
458
|
CREATE INDEX IF NOT EXISTS "IDX_order_transaction_reference_id" ON "order_transaction" (
|
470
459
|
reference_id
|
471
|
-
)
|
472
|
-
WHERE deleted_at IS NOT NULL;
|
473
|
-
|
474
|
-
CREATE TABLE IF NOT EXISTS "return_reason"
|
475
|
-
(
|
476
|
-
id character varying NOT NULL,
|
477
|
-
value character varying NOT NULL,
|
478
|
-
label character varying NOT NULL,
|
479
|
-
description character varying,
|
480
|
-
metadata JSONB NULL,
|
481
|
-
parent_return_reason_id character varying,
|
482
|
-
created_at timestamp with time zone NOT NULL DEFAULT now(),
|
483
|
-
updated_at timestamp with time zone NOT NULL DEFAULT now(),
|
484
|
-
deleted_at timestamp with time zone,
|
485
|
-
CONSTRAINT "return_reason_pkey" PRIMARY KEY (id),
|
486
|
-
CONSTRAINT "return_reason_parent_return_reason_id_foreign" FOREIGN KEY (parent_return_reason_id)
|
487
|
-
REFERENCES "return_reason" (id) MATCH SIMPLE
|
488
|
-
ON UPDATE NO ACTION
|
489
|
-
ON DELETE NO ACTION
|
490
460
|
);
|
491
461
|
|
492
|
-
CREATE UNIQUE INDEX IF NOT EXISTS "IDX_return_reason_value" ON "return_reason" USING btree (value ASC NULLS LAST)
|
493
|
-
WHERE deleted_at IS NOT NULL;
|
494
|
-
|
495
|
-
|
496
462
|
ALTER TABLE if exists "order"
|
497
463
|
ADD CONSTRAINT "order_shipping_address_id_foreign" FOREIGN KEY ("shipping_address_id") REFERENCES "order_address" ("id") ON
|
498
464
|
UPDATE CASCADE ON
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Migration20240219102530.js","sourceRoot":"","sources":["../../src/migrations/Migration20240219102530.ts"],"names":[],"mappings":";;;AAAA,2CAA8E;AAC9E,sDAAiD;AAEjD,MAAa,uBAAwB,SAAQ,sBAAS;IACpD,KAAK,CAAC,EAAE;QACN,MAAM,GAAG,GAAG
|
1
|
+
{"version":3,"file":"Migration20240219102530.js","sourceRoot":"","sources":["../../src/migrations/Migration20240219102530.ts"],"names":[],"mappings":";;;AAAA,2CAA8E;AAC9E,sDAAiD;AAEjD,MAAa,uBAAwB,SAAQ,sBAAS;IACpD,KAAK,CAAC,EAAE;QACN,MAAM,GAAG,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAsGR,IAAA,oDAA4C,EAC5C,OAAO,EACP,CAAC,oBAAoB,EAAE,gBAAgB,EAAE,YAAY,CAAC,EACtD,eAAe,CAChB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgaF,CAAA;QAED,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;IAClB,CAAC;CACF;AAhhBD,0DAghBC"}
|
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.EntityDateColumns;
|
4
4
|
export default class Address {
|
5
5
|
[OptionalProps]: OptionalAddressProps;
|
6
6
|
id: string;
|
@@ -22,4 +22,3 @@ export default class Address {
|
|
22
22
|
onInit(): void;
|
23
23
|
}
|
24
24
|
export {};
|
25
|
-
//# sourceMappingURL=address.d.ts.map
|
@@ -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.EntityDateColumns;
|
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,7 +17,5 @@ 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;
|
21
20
|
}
|
22
21
|
export {};
|
23
|
-
//# sourceMappingURL=adjustment-line.d.ts.map
|
@@ -21,7 +21,6 @@ class AdjustmentLine {
|
|
21
21
|
this.promotion_id = null;
|
22
22
|
this.code = null;
|
23
23
|
this.provider_id = null;
|
24
|
-
this.deleted_at = null;
|
25
24
|
}
|
26
25
|
}
|
27
26
|
exports.default = AdjustmentLine;
|
@@ -73,8 +72,4 @@ __decorate([
|
|
73
72
|
}),
|
74
73
|
__metadata("design:type", Date)
|
75
74
|
], 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);
|
80
75
|
//# 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,GAAk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AAC,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"}
|
package/dist/models/index.d.ts
CHANGED
@@ -1,9 +1,4 @@
|
|
1
1
|
export { default as Address } from "./address";
|
2
|
-
export { default as OrderClaim } from "./claim";
|
3
|
-
export { default as ClaimItem } from "./claim-item";
|
4
|
-
export { default as ClaimItemImage } from "./claim-item-image";
|
5
|
-
export { default as OrderExchange } from "./exchange";
|
6
|
-
export { default as ExchangeItem } from "./exchange-item";
|
7
2
|
export { default as LineItem } from "./line-item";
|
8
3
|
export { default as LineItemAdjustment } from "./line-item-adjustment";
|
9
4
|
export { default as LineItemTaxLine } from "./line-item-tax-line";
|
@@ -13,11 +8,7 @@ export { default as OrderChangeAction } from "./order-change-action";
|
|
13
8
|
export { default as OrderItem } from "./order-item";
|
14
9
|
export { default as OrderShippingMethod } from "./order-shipping-method";
|
15
10
|
export { default as OrderSummary } from "./order-summary";
|
16
|
-
export { default as Return } from "./return";
|
17
|
-
export { default as ReturnItem } from "./return-item";
|
18
|
-
export { default as ReturnReason } from "./return-reason";
|
19
11
|
export { default as ShippingMethod } from "./shipping-method";
|
20
12
|
export { default as ShippingMethodAdjustment } from "./shipping-method-adjustment";
|
21
13
|
export { default as ShippingMethodTaxLine } from "./shipping-method-tax-line";
|
22
14
|
export { default as Transaction } from "./transaction";
|
23
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/models/index.js
CHANGED
@@ -3,19 +3,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.Transaction = exports.ShippingMethodTaxLine = exports.ShippingMethodAdjustment = exports.ShippingMethod = exports.
|
6
|
+
exports.Transaction = exports.ShippingMethodTaxLine = exports.ShippingMethodAdjustment = exports.ShippingMethod = exports.OrderSummary = exports.OrderShippingMethod = exports.OrderItem = exports.OrderChangeAction = exports.OrderChange = exports.Order = exports.LineItemTaxLine = exports.LineItemAdjustment = exports.LineItem = exports.Address = void 0;
|
7
7
|
var address_1 = require("./address");
|
8
8
|
Object.defineProperty(exports, "Address", { enumerable: true, get: function () { return __importDefault(address_1).default; } });
|
9
|
-
var claim_1 = require("./claim");
|
10
|
-
Object.defineProperty(exports, "OrderClaim", { enumerable: true, get: function () { return __importDefault(claim_1).default; } });
|
11
|
-
var claim_item_1 = require("./claim-item");
|
12
|
-
Object.defineProperty(exports, "ClaimItem", { enumerable: true, get: function () { return __importDefault(claim_item_1).default; } });
|
13
|
-
var claim_item_image_1 = require("./claim-item-image");
|
14
|
-
Object.defineProperty(exports, "ClaimItemImage", { enumerable: true, get: function () { return __importDefault(claim_item_image_1).default; } });
|
15
|
-
var exchange_1 = require("./exchange");
|
16
|
-
Object.defineProperty(exports, "OrderExchange", { enumerable: true, get: function () { return __importDefault(exchange_1).default; } });
|
17
|
-
var exchange_item_1 = require("./exchange-item");
|
18
|
-
Object.defineProperty(exports, "ExchangeItem", { enumerable: true, get: function () { return __importDefault(exchange_item_1).default; } });
|
19
9
|
var line_item_1 = require("./line-item");
|
20
10
|
Object.defineProperty(exports, "LineItem", { enumerable: true, get: function () { return __importDefault(line_item_1).default; } });
|
21
11
|
var line_item_adjustment_1 = require("./line-item-adjustment");
|
@@ -34,12 +24,6 @@ var order_shipping_method_1 = require("./order-shipping-method");
|
|
34
24
|
Object.defineProperty(exports, "OrderShippingMethod", { enumerable: true, get: function () { return __importDefault(order_shipping_method_1).default; } });
|
35
25
|
var order_summary_1 = require("./order-summary");
|
36
26
|
Object.defineProperty(exports, "OrderSummary", { enumerable: true, get: function () { return __importDefault(order_summary_1).default; } });
|
37
|
-
var return_1 = require("./return");
|
38
|
-
Object.defineProperty(exports, "Return", { enumerable: true, get: function () { return __importDefault(return_1).default; } });
|
39
|
-
var return_item_1 = require("./return-item");
|
40
|
-
Object.defineProperty(exports, "ReturnItem", { enumerable: true, get: function () { return __importDefault(return_item_1).default; } });
|
41
|
-
var return_reason_1 = require("./return-reason");
|
42
|
-
Object.defineProperty(exports, "ReturnReason", { enumerable: true, get: function () { return __importDefault(return_reason_1).default; } });
|
43
27
|
var shipping_method_1 = require("./shipping-method");
|
44
28
|
Object.defineProperty(exports, "ShippingMethod", { enumerable: true, get: function () { return __importDefault(shipping_method_1).default; } });
|
45
29
|
var shipping_method_adjustment_1 = require("./shipping-method-adjustment");
|
package/dist/models/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":";;;;;;AAAA,qCAA8C;AAArC,mHAAA,OAAO,OAAW;AAC3B,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":";;;;;;AAAA,qCAA8C;AAArC,mHAAA,OAAO,OAAW;AAC3B,yCAAiD;AAAxC,sHAAA,OAAO,OAAY;AAC5B,+DAAsE;AAA7D,2IAAA,OAAO,OAAsB;AACtC,2DAAiE;AAAxD,sIAAA,OAAO,OAAmB;AACnC,iCAA0C;AAAjC,+GAAA,OAAO,OAAS;AACzB,+CAAuD;AAA9C,4HAAA,OAAO,OAAe;AAC/B,6DAAoE;AAA3D,yIAAA,OAAO,OAAqB;AACrC,2CAAmD;AAA1C,wHAAA,OAAO,OAAa;AAC7B,iEAAwE;AAA/D,6IAAA,OAAO,OAAuB;AACvC,iDAAyD;AAAhD,8HAAA,OAAO,OAAgB;AAChC,qDAA6D;AAApD,kIAAA,OAAO,OAAkB;AAClC,2EAAkF;AAAzE,uJAAA,OAAO,OAA4B;AAC5C,uEAA6E;AAApE,kJAAA,OAAO,OAAyB;AACzC,6CAAsD;AAA7C,2HAAA,OAAO,OAAe"}
|
@@ -1,10 +1,8 @@
|
|
1
|
-
import { Rel } from "@mikro-orm/core";
|
2
1
|
import AdjustmentLine from "./adjustment-line";
|
3
2
|
import LineItem from "./line-item";
|
4
3
|
export default class LineItemAdjustment extends AdjustmentLine {
|
5
|
-
item:
|
4
|
+
item: LineItem;
|
6
5
|
item_id: string;
|
7
6
|
onCreate(): void;
|
8
7
|
onInit(): void;
|
9
8
|
}
|
10
|
-
//# sourceMappingURL=line-item-adjustment.d.ts.map
|
@@ -23,18 +23,18 @@ const ItemIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
|
23
23
|
let LineItemAdjustment = class LineItemAdjustment extends adjustment_line_1.default {
|
24
24
|
onCreate() {
|
25
25
|
this.id = (0, utils_1.generateEntityId)(this.id, "ordliadj");
|
26
|
-
this.item_id
|
26
|
+
this.item_id ?? (this.item_id = this.item?.id);
|
27
27
|
}
|
28
28
|
onInit() {
|
29
29
|
this.id = (0, utils_1.generateEntityId)(this.id, "ordliadj");
|
30
|
-
this.item_id
|
30
|
+
this.item_id ?? (this.item_id = this.item?.id);
|
31
31
|
}
|
32
32
|
};
|
33
33
|
__decorate([
|
34
34
|
(0, core_1.ManyToOne)(() => line_item_1.default, {
|
35
35
|
persist: false,
|
36
36
|
}),
|
37
|
-
__metadata("design:type",
|
37
|
+
__metadata("design:type", line_item_1.default)
|
38
38
|
], LineItemAdjustment.prototype, "item", void 0);
|
39
39
|
__decorate([
|
40
40
|
(0, core_1.ManyToOne)({
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"line-item-adjustment.js","sourceRoot":"","sources":["../../src/models/line-item-adjustment.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,2CAGwB;AACxB,
|
1
|
+
{"version":3,"file":"line-item-adjustment.js","sourceRoot":"","sources":["../../src/models/line-item-adjustment.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,2CAGwB;AACxB,0CAAyE;AACzE,wEAA8C;AAC9C,4DAAkC;AAElC,MAAM,WAAW,GAAG,IAAA,sCAA8B,EAAC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Line extends TaxLine {
|
5
|
-
item:
|
4
|
+
item: LineItem;
|
6
5
|
item_id: string;
|
7
6
|
onCreate(): void;
|
8
7
|
onInit(): void;
|
9
8
|
}
|
10
|
-
//# sourceMappingURL=line-item-tax-line.d.ts.map
|
@@ -23,11 +23,11 @@ const ItemIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
|
23
23
|
let LineItemTaxLine = class LineItemTaxLine extends tax_line_1.default {
|
24
24
|
onCreate() {
|
25
25
|
this.id = (0, utils_1.generateEntityId)(this.id, "ordlitxl");
|
26
|
-
this.item_id
|
26
|
+
this.item_id ?? (this.item_id = this.item?.id);
|
27
27
|
}
|
28
28
|
onInit() {
|
29
29
|
this.id = (0, utils_1.generateEntityId)(this.id, "ordlitxl");
|
30
|
-
this.item_id
|
30
|
+
this.item_id ?? (this.item_id = this.item?.id);
|
31
31
|
}
|
32
32
|
};
|
33
33
|
__decorate([
|
@@ -35,7 +35,7 @@ __decorate([
|
|
35
35
|
fieldName: "item_id",
|
36
36
|
persist: false,
|
37
37
|
}),
|
38
|
-
__metadata("design:type",
|
38
|
+
__metadata("design:type", line_item_1.default)
|
39
39
|
], LineItemTaxLine.prototype, "item", void 0);
|
40
40
|
__decorate([
|
41
41
|
(0, core_1.ManyToOne)({
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"line-item-tax-line.js","sourceRoot":"","sources":["../../src/models/line-item-tax-line.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,2CAGwB;AACxB,
|
1
|
+
{"version":3,"file":"line-item-tax-line.js","sourceRoot":"","sources":["../../src/models/line-item-tax-line.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,2CAGwB;AACxB,0CAMwB;AACxB,4DAAkC;AAClC,0DAAgC;AAEhC,MAAM,WAAW,GAAG,IAAA,sCAA8B,EAAC;IACjD,SAAS,EAAE,0BAA0B;IACrC,OAAO,EAAE,SAAS;CACnB,CAAC,CAAA;AAGa,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,kBAAO;IAkBlD,QAAQ;QACN,IAAI,CAAC,EAAE,GAAG,IAAA,wBAAgB,EAAC,IAAI,CAAC,EAAE,EAAE,UAAU,CAAC,CAAA;QAC/C,IAAI,CAAC,OAAO,KAAZ,IAAI,CAAC,OAAO,GAAK,IAAI,CAAC,IAAI,EAAE,EAAE,EAAA;IAChC,CAAC;IAGD,MAAM;QACJ,IAAI,CAAC,EAAE,GAAG,IAAA,wBAAgB,EAAC,IAAI,CAAC,EAAE,EAAE,UAAU,CAAC,CAAA;QAC/C,IAAI,CAAC,OAAO,KAAZ,IAAI,CAAC,OAAO,GAAK,IAAI,CAAC,IAAI,EAAE,EAAE,EAAA;IAChC,CAAC;CACF,CAAA;AAvBC;IAJC,IAAA,gBAAS,EAAC,GAAG,EAAE,CAAC,mBAAQ,EAAE;QACzB,SAAS,EAAE,SAAS;QACpB,OAAO,EAAE,KAAK;KACf,CAAC;8BACI,mBAAQ;6CAAA;AAUd;IARC,IAAA,gBAAS,EAAC;QACT,MAAM,EAAE,GAAG,EAAE,CAAC,mBAAQ;QACtB,UAAU,EAAE,MAAM;QAClB,SAAS,EAAE,SAAS;QACpB,OAAO,EAAE,CAAC,cAAO,CAAC,OAAO,EAAE,cAAO,CAAC,MAAM,CAAC;QAC1C,OAAO,EAAE,IAAI;KACd,CAAC;IACD,WAAW,CAAC,aAAa,EAAE;;gDACb;AAGf;IADC,IAAA,mBAAY,GAAE;;;;+CAId;AAGD;IADC,IAAA,aAAM,GAAE;;;;6CAIR;AA3BkB,eAAe;IADnC,IAAA,aAAM,EAAC,EAAE,SAAS,EAAE,0BAA0B,EAAE,CAAC;GAC7B,eAAe,CA4BnC;kBA5BoB,eAAe"}
|
@@ -3,7 +3,7 @@ import { BigNumber } from "@medusajs/utils";
|
|
3
3
|
import { Collection, OptionalProps } from "@mikro-orm/core";
|
4
4
|
import LineItemAdjustment from "./line-item-adjustment";
|
5
5
|
import LineItemTaxLine from "./line-item-tax-line";
|
6
|
-
type OptionalLineItemProps = DAL.
|
6
|
+
type OptionalLineItemProps = "is_discoutable" | "is_tax_inclusive" | "compare_at_unit_price" | "requires_shipping" | DAL.EntityDateColumns;
|
7
7
|
export default class LineItem {
|
8
8
|
[OptionalProps]?: OptionalLineItemProps;
|
9
9
|
id: string;
|
@@ -34,9 +34,7 @@ export default class LineItem {
|
|
34
34
|
metadata: Record<string, unknown> | null;
|
35
35
|
created_at: Date;
|
36
36
|
updated_at: Date;
|
37
|
-
deleted_at: Date | null;
|
38
37
|
onCreate(): void;
|
39
38
|
onInit(): void;
|
40
39
|
}
|
41
40
|
export {};
|
42
|
-
//# sourceMappingURL=line-item.d.ts.map
|
package/dist/models/line-item.js
CHANGED
@@ -16,20 +16,13 @@ const utils_1 = require("@medusajs/utils");
|
|
16
16
|
const core_1 = require("@mikro-orm/core");
|
17
17
|
const line_item_adjustment_1 = __importDefault(require("./line-item-adjustment"));
|
18
18
|
const line_item_tax_line_1 = __importDefault(require("./line-item-tax-line"));
|
19
|
-
const DeletedAtIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
20
|
-
tableName: "order_line_item",
|
21
|
-
columns: "deleted_at",
|
22
|
-
where: "deleted_at IS NOT NULL",
|
23
|
-
});
|
24
19
|
const ProductIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
25
20
|
tableName: "order_line_item",
|
26
21
|
columns: "product_id",
|
27
|
-
where: "deleted_at IS NOT NULL",
|
28
22
|
});
|
29
23
|
const VariantIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
30
24
|
tableName: "order_line_item",
|
31
25
|
columns: "variant_id",
|
32
|
-
where: "deleted_at IS NOT NULL",
|
33
26
|
});
|
34
27
|
let LineItem = class LineItem {
|
35
28
|
constructor() {
|
@@ -55,7 +48,6 @@ let LineItem = class LineItem {
|
|
55
48
|
this.tax_lines = new core_1.Collection(this);
|
56
49
|
this.adjustments = new core_1.Collection(this);
|
57
50
|
this.metadata = null;
|
58
|
-
this.deleted_at = null;
|
59
51
|
}
|
60
52
|
onCreate() {
|
61
53
|
this.id = (0, utils_1.generateEntityId)(this.id, "ordli");
|
@@ -138,15 +130,15 @@ __decorate([
|
|
138
130
|
], LineItem.prototype, "variant_option_values", void 0);
|
139
131
|
__decorate([
|
140
132
|
(0, core_1.Property)({ columnType: "boolean" }),
|
141
|
-
__metadata("design:type",
|
133
|
+
__metadata("design:type", Object)
|
142
134
|
], LineItem.prototype, "requires_shipping", void 0);
|
143
135
|
__decorate([
|
144
136
|
(0, core_1.Property)({ columnType: "boolean" }),
|
145
|
-
__metadata("design:type",
|
137
|
+
__metadata("design:type", Object)
|
146
138
|
], LineItem.prototype, "is_discountable", void 0);
|
147
139
|
__decorate([
|
148
140
|
(0, core_1.Property)({ columnType: "boolean" }),
|
149
|
-
__metadata("design:type",
|
141
|
+
__metadata("design:type", Object)
|
150
142
|
], LineItem.prototype, "is_tax_inclusive", void 0);
|
151
143
|
__decorate([
|
152
144
|
(0, utils_1.MikroOrmBigNumberProperty)({
|
@@ -201,11 +193,6 @@ __decorate([
|
|
201
193
|
}),
|
202
194
|
__metadata("design:type", Date)
|
203
195
|
], LineItem.prototype, "updated_at", void 0);
|
204
|
-
__decorate([
|
205
|
-
(0, core_1.Property)({ columnType: "timestamptz", nullable: true }),
|
206
|
-
DeletedAtIndex.MikroORMIndex(),
|
207
|
-
__metadata("design:type", Object)
|
208
|
-
], LineItem.prototype, "deleted_at", void 0);
|
209
196
|
__decorate([
|
210
197
|
(0, core_1.BeforeCreate)(),
|
211
198
|
__metadata("design:type", Function),
|
@@ -219,8 +206,7 @@ __decorate([
|
|
219
206
|
__metadata("design:returntype", void 0)
|
220
207
|
], LineItem.prototype, "onInit", null);
|
221
208
|
LineItem = __decorate([
|
222
|
-
(0, core_1.Entity)({ tableName: "order_line_item" })
|
223
|
-
(0, core_1.Filter)(utils_1.DALUtils.mikroOrmSoftDeletableFilterOptions)
|
209
|
+
(0, core_1.Entity)({ tableName: "order_line_item" })
|
224
210
|
], LineItem);
|
225
211
|
exports.default = LineItem;
|
226
212
|
//# sourceMappingURL=line-item.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"line-item.js","sourceRoot":"","sources":["../../src/models/line-item.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,
|
1
|
+
{"version":3,"file":"line-item.js","sourceRoot":"","sources":["../../src/models/line-item.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,2CAKwB;AACxB,0CAUwB;AACxB,kFAAuD;AACvD,8EAAkD;AASlD,MAAM,cAAc,GAAG,IAAA,sCAA8B,EAAC;IACpD,SAAS,EAAE,iBAAiB;IAC5B,OAAO,EAAE,YAAY;CACtB,CAAC,CAAA;AAEF,MAAM,cAAc,GAAG,IAAA,sCAA8B,EAAC;IACpD,SAAS,EAAE,iBAAiB;IAC5B,OAAO,EAAE,YAAY;CACtB,CAAC,CAAA;AAGa,IAAM,QAAQ,GAAd,MAAM,QAAQ;IAAd;QAUb,aAAQ,GAAkB,IAAI,CAAA;QAG9B,cAAS,GAAkB,IAAI,CAAA;QAO/B,eAAU,GAAkB,IAAI,CAAA;QAOhC,eAAU,GAAkB,IAAI,CAAA;QAGhC,kBAAa,GAAkB,IAAI,CAAA;QAGnC,wBAAmB,GAAkB,IAAI,CAAA;QAGzC,qBAAgB,GAAkB,IAAI,CAAA;QAGtC,iBAAY,GAAkB,IAAI,CAAA;QAGlC,uBAAkB,GAAkB,IAAI,CAAA;QAGxC,mBAAc,GAAkB,IAAI,CAAA;QAGpC,gBAAW,GAAkB,IAAI,CAAA;QAGjC,oBAAe,GAAkB,IAAI,CAAA;QAGrC,kBAAa,GAAkB,IAAI,CAAA;QAGnC,0BAAqB,GAAmC,IAAI,CAAA;QAG5D,sBAAiB,GAAG,IAAI,CAAA;QAGxB,oBAAe,GAAG,IAAI,CAAA;QAGtB,qBAAgB,GAAG,KAAK,CAAA;QAKxB,0BAAqB,GAA+B,IAAI,CAAA;QAGxD,8BAAyB,GAA6B,IA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@
|
|
1
1
|
import { BigNumberRawValue, DAL } from "@medusajs/types";
|
2
2
|
import { BigNumber } from "@medusajs/utils";
|
3
|
-
import { OptionalProps
|
4
|
-
import OrderClaim from "./claim";
|
5
|
-
import OrderExchange from "./exchange";
|
3
|
+
import { OptionalProps } from "@mikro-orm/core";
|
6
4
|
import Order from "./order";
|
7
5
|
import OrderChange from "./order-change";
|
8
|
-
|
9
|
-
type OptionalLineItemProps = DAL.ModelDateColumns;
|
6
|
+
type OptionalLineItemProps = DAL.EntityDateColumns;
|
10
7
|
export default class OrderChangeAction {
|
11
8
|
[OptionalProps]?: OptionalLineItemProps;
|
12
9
|
id: string;
|
13
10
|
ordering: number;
|
14
11
|
order_id: string | null;
|
15
|
-
order:
|
16
|
-
return_id: string | null;
|
17
|
-
return: Return;
|
18
|
-
claim_id: string | null;
|
19
|
-
claim: OrderClaim;
|
20
|
-
exchange_id: string | null;
|
21
|
-
exchange: OrderExchange;
|
12
|
+
order: Order | null;
|
22
13
|
version: number | null;
|
23
14
|
order_change_id: string | null;
|
24
|
-
order_change:
|
15
|
+
order_change: OrderChange | null;
|
25
16
|
reference: string | null;
|
26
17
|
reference_id: string | null;
|
27
18
|
action: string;
|
@@ -32,9 +23,7 @@ export default class OrderChangeAction {
|
|
32
23
|
applied: boolean;
|
33
24
|
created_at: Date;
|
34
25
|
updated_at: Date;
|
35
|
-
deleted_at: Date | null;
|
36
26
|
onCreate(): void;
|
37
27
|
onInit(): void;
|
38
28
|
}
|
39
29
|
export {};
|
40
|
-
//# sourceMappingURL=order-change-action.d.ts.map
|