@medusajs/pricing 0.2.0-snapshot-20240429062340 → 1.0.0-rc-20241001083650
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.ts +6 -6
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -9
- package/dist/index.js.map +1 -0
- package/dist/joiner-config.d.ts +2 -10
- package/dist/joiner-config.d.ts.map +1 -0
- package/dist/joiner-config.js +6 -48
- package/dist/joiner-config.js.map +1 -0
- package/dist/migrations/Migration20230929122253.d.ts +1 -0
- package/dist/migrations/Migration20230929122253.d.ts.map +1 -0
- package/dist/migrations/Migration20230929122253.js +1 -0
- package/dist/migrations/Migration20230929122253.js.map +1 -0
- package/dist/migrations/Migration20240322094407.d.ts +1 -0
- package/dist/migrations/Migration20240322094407.d.ts.map +1 -0
- package/dist/migrations/Migration20240322094407.js +1 -0
- package/dist/migrations/Migration20240322094407.js.map +1 -0
- package/dist/migrations/Migration20240322113359.d.ts +1 -0
- package/dist/migrations/Migration20240322113359.d.ts.map +1 -0
- package/dist/migrations/Migration20240322113359.js +1 -0
- package/dist/migrations/Migration20240322113359.js.map +1 -0
- package/dist/migrations/Migration20240322120125.d.ts +1 -0
- package/dist/migrations/Migration20240322120125.d.ts.map +1 -0
- package/dist/migrations/Migration20240322120125.js +1 -0
- package/dist/migrations/Migration20240322120125.js.map +1 -0
- package/dist/migrations/Migration20240626133555.d.ts +5 -0
- package/dist/migrations/Migration20240626133555.d.ts.map +1 -0
- package/dist/migrations/Migration20240626133555.js +34 -0
- package/dist/migrations/Migration20240626133555.js.map +1 -0
- package/dist/migrations/Migration20240704094505.d.ts +6 -0
- package/dist/migrations/Migration20240704094505.d.ts.map +1 -0
- package/dist/migrations/Migration20240704094505.js +16 -0
- package/dist/migrations/Migration20240704094505.js.map +1 -0
- package/dist/models/index.d.ts +2 -3
- package/dist/models/index.d.ts.map +1 -0
- package/dist/models/index.js +4 -7
- package/dist/models/index.js.map +1 -0
- package/dist/models/price-list-rule.d.ts +7 -9
- package/dist/models/price-list-rule.d.ts.map +1 -0
- package/dist/models/price-list-rule.js +10 -30
- package/dist/models/price-list-rule.js.map +1 -0
- package/dist/models/price-list.d.ts +4 -5
- package/dist/models/price-list.d.ts.map +1 -0
- package/dist/models/price-list.js +2 -10
- package/dist/models/price-list.js.map +1 -0
- package/dist/models/price-preference.d.ts +13 -0
- package/dist/models/price-preference.d.ts.map +1 -0
- package/dist/models/{rule-type.js → price-preference.js} +37 -41
- package/dist/models/price-preference.js.map +1 -0
- package/dist/models/price-rule.d.ts +6 -10
- package/dist/models/price-rule.d.ts.map +1 -0
- package/dist/models/price-rule.js +8 -46
- package/dist/models/price-rule.js.map +1 -0
- package/dist/models/price-set.d.ts +1 -4
- package/dist/models/price-set.d.ts.map +1 -0
- package/dist/models/price-set.js +2 -20
- package/dist/models/price-set.js.map +1 -0
- package/dist/models/price.d.ts +7 -6
- package/dist/models/price.d.ts.map +1 -0
- package/dist/models/price.js +7 -6
- package/dist/models/price.js.map +1 -0
- package/dist/repositories/index.d.ts +2 -1
- package/dist/repositories/index.d.ts.map +1 -0
- package/dist/repositories/index.js +2 -1
- package/dist/repositories/index.js.map +1 -0
- package/dist/repositories/pricing.d.ts +3 -2
- package/dist/repositories/pricing.d.ts.map +1 -0
- package/dist/repositories/pricing.js +41 -45
- package/dist/repositories/pricing.js.map +1 -0
- package/dist/schema/index.d.ts +2 -1
- package/dist/schema/index.d.ts.map +1 -0
- package/dist/schema/index.js +48 -4
- package/dist/schema/index.js.map +1 -0
- package/dist/services/index.d.ts +1 -2
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/index.js +2 -5
- package/dist/services/index.js.map +1 -0
- package/dist/services/pricing-module.d.ts +66 -53
- package/dist/services/pricing-module.d.ts.map +1 -0
- package/dist/services/pricing-module.js +625 -631
- package/dist/services/pricing-module.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types/index.d.ts +2 -1
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/services/index.d.ts +30 -2
- package/dist/types/services/index.d.ts.map +1 -0
- package/dist/types/services/index.js +1 -16
- package/dist/types/services/index.js.map +1 -0
- package/dist/utils/events.d.ts +83 -0
- package/dist/utils/events.d.ts.map +1 -0
- package/dist/utils/events.js +67 -0
- package/dist/utils/events.js.map +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +2 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/validate-price-list-dates.d.ts +1 -0
- package/dist/utils/validate-price-list-dates.d.ts.map +1 -0
- package/dist/utils/validate-price-list-dates.js +2 -1
- package/dist/utils/validate-price-list-dates.js.map +1 -0
- package/package.json +20 -21
- package/dist/initialize/index.d.ts +0 -4
- package/dist/initialize/index.js +0 -17
- package/dist/loaders/connection.d.ts +0 -4
- package/dist/loaders/connection.js +0 -40
- package/dist/loaders/container.d.ts +0 -2
- package/dist/loaders/container.js +0 -34
- package/dist/loaders/index.d.ts +0 -2
- package/dist/loaders/index.js +0 -18
- package/dist/models/price-list-rule-value.d.ts +0 -17
- package/dist/models/price-list-rule-value.js +0 -102
- package/dist/models/price-set-rule-type.d.ts +0 -10
- package/dist/models/price-set-rule-type.js +0 -108
- package/dist/models/rule-type.d.ts +0 -17
- package/dist/module-definition.d.ts +0 -4
- package/dist/module-definition.js +0 -50
- package/dist/scripts/bin/run-seed.d.ts +0 -3
- package/dist/scripts/bin/run-seed.js +0 -38
- package/dist/scripts/seed.d.ts +0 -4
- package/dist/scripts/seed.js +0 -67
- package/dist/services/price-list.d.ts +0 -16
- package/dist/services/price-list.js +0 -34
- package/dist/services/rule-type.d.ts +0 -15
- package/dist/services/rule-type.js +0 -53
- package/dist/types/services/price-list.d.ts +0 -18
- package/dist/types/services/price-list.js +0 -2
- package/dist/types/services/price-set.d.ts +0 -4
- package/dist/types/services/price-set.js +0 -2
@@ -8,57 +8,51 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
8
8
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
10
10
|
};
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
13
|
-
};
|
14
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
15
|
-
|
12
|
+
exports.uniquePreferenceRuleIndexName = void 0;
|
13
|
+
const utils_1 = require("@medusajs/framework/utils");
|
16
14
|
const core_1 = require("@mikro-orm/core");
|
17
|
-
|
18
|
-
const
|
19
|
-
|
20
|
-
tableName:
|
15
|
+
exports.uniquePreferenceRuleIndexName = "IDX_price_preference_attribute_value";
|
16
|
+
const UniquePreferenceRuleIndexStatement = (0, utils_1.createPsqlIndexStatementHelper)({
|
17
|
+
name: exports.uniquePreferenceRuleIndexName,
|
18
|
+
tableName: "price_preference",
|
19
|
+
columns: ["attribute", "value"],
|
20
|
+
unique: true,
|
21
|
+
where: "deleted_at IS NULL",
|
22
|
+
});
|
23
|
+
const DeletedAtIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
24
|
+
tableName: "price_preference",
|
21
25
|
columns: "deleted_at",
|
22
26
|
where: "deleted_at IS NOT NULL",
|
23
27
|
});
|
24
|
-
|
25
|
-
tableName: tableName,
|
26
|
-
columns: "rule_attribute",
|
27
|
-
where: "deleted_at IS NULL",
|
28
|
-
});
|
29
|
-
let RuleType = class RuleType {
|
28
|
+
let PricePreference = class PricePreference {
|
30
29
|
constructor() {
|
31
|
-
this.
|
30
|
+
this.value = null;
|
32
31
|
this.deleted_at = null;
|
33
32
|
}
|
34
33
|
onCreate() {
|
35
|
-
this.id = (0, utils_1.generateEntityId)(this.id, "
|
34
|
+
this.id = (0, utils_1.generateEntityId)(this.id, "prpref");
|
36
35
|
}
|
37
36
|
onInit() {
|
38
|
-
this.id = (0, utils_1.generateEntityId)(this.id, "
|
37
|
+
this.id = (0, utils_1.generateEntityId)(this.id, "prpref");
|
39
38
|
}
|
40
39
|
};
|
41
40
|
__decorate([
|
42
41
|
(0, core_1.PrimaryKey)({ columnType: "text" }),
|
43
42
|
__metadata("design:type", String)
|
44
|
-
],
|
43
|
+
], PricePreference.prototype, "id", void 0);
|
45
44
|
__decorate([
|
46
45
|
(0, core_1.Property)({ columnType: "text" }),
|
47
46
|
__metadata("design:type", String)
|
48
|
-
],
|
47
|
+
], PricePreference.prototype, "attribute", void 0);
|
49
48
|
__decorate([
|
50
|
-
|
51
|
-
(0, core_1.Property)({ columnType: "text" }),
|
52
|
-
__metadata("design:type", String)
|
53
|
-
], RuleType.prototype, "rule_attribute", void 0);
|
54
|
-
__decorate([
|
55
|
-
(0, core_1.Property)({ columnType: "integer", default: 0 }),
|
56
|
-
__metadata("design:type", Number)
|
57
|
-
], RuleType.prototype, "default_priority", void 0);
|
58
|
-
__decorate([
|
59
|
-
(0, core_1.ManyToMany)(() => price_set_1.default, (priceSet) => priceSet.rule_types),
|
49
|
+
(0, core_1.Property)({ columnType: "text", nullable: true }),
|
60
50
|
__metadata("design:type", Object)
|
61
|
-
],
|
51
|
+
], PricePreference.prototype, "value", void 0);
|
52
|
+
__decorate([
|
53
|
+
(0, core_1.Property)({ default: false }),
|
54
|
+
__metadata("design:type", Boolean)
|
55
|
+
], PricePreference.prototype, "is_tax_inclusive", void 0);
|
62
56
|
__decorate([
|
63
57
|
(0, core_1.Property)({
|
64
58
|
onCreate: () => new Date(),
|
@@ -66,7 +60,7 @@ __decorate([
|
|
66
60
|
defaultRaw: "now()",
|
67
61
|
}),
|
68
62
|
__metadata("design:type", Date)
|
69
|
-
],
|
63
|
+
], PricePreference.prototype, "created_at", void 0);
|
70
64
|
__decorate([
|
71
65
|
(0, core_1.Property)({
|
72
66
|
onCreate: () => new Date(),
|
@@ -75,26 +69,28 @@ __decorate([
|
|
75
69
|
defaultRaw: "now()",
|
76
70
|
}),
|
77
71
|
__metadata("design:type", Date)
|
78
|
-
],
|
72
|
+
], PricePreference.prototype, "updated_at", void 0);
|
79
73
|
__decorate([
|
80
|
-
|
74
|
+
DeletedAtIndex.MikroORMIndex(),
|
81
75
|
(0, core_1.Property)({ columnType: "timestamptz", nullable: true }),
|
82
76
|
__metadata("design:type", Object)
|
83
|
-
],
|
77
|
+
], PricePreference.prototype, "deleted_at", void 0);
|
84
78
|
__decorate([
|
85
79
|
(0, core_1.BeforeCreate)(),
|
86
80
|
__metadata("design:type", Function),
|
87
81
|
__metadata("design:paramtypes", []),
|
88
82
|
__metadata("design:returntype", void 0)
|
89
|
-
],
|
83
|
+
], PricePreference.prototype, "onCreate", null);
|
90
84
|
__decorate([
|
91
85
|
(0, core_1.OnInit)(),
|
92
86
|
__metadata("design:type", Function),
|
93
87
|
__metadata("design:paramtypes", []),
|
94
88
|
__metadata("design:returntype", void 0)
|
95
|
-
],
|
96
|
-
|
97
|
-
(0, core_1.Entity)(
|
98
|
-
(0, core_1.Filter)(utils_1.DALUtils.mikroOrmSoftDeletableFilterOptions)
|
99
|
-
|
100
|
-
|
89
|
+
], PricePreference.prototype, "onInit", null);
|
90
|
+
PricePreference = __decorate([
|
91
|
+
(0, core_1.Entity)(),
|
92
|
+
(0, core_1.Filter)(utils_1.DALUtils.mikroOrmSoftDeletableFilterOptions),
|
93
|
+
UniquePreferenceRuleIndexStatement.MikroORMIndex()
|
94
|
+
], PricePreference);
|
95
|
+
exports.default = PricePreference;
|
96
|
+
//# sourceMappingURL=price-preference.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"price-preference.js","sourceRoot":"","sources":["../../src/models/price-preference.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAIkC;AAClC,0CAOwB;AAEX,QAAA,6BAA6B,GACxC,sCAAsC,CAAA;AACxC,MAAM,kCAAkC,GAAG,IAAA,sCAA8B,EAAC;IACxE,IAAI,EAAE,qCAA6B;IACnC,SAAS,EAAE,kBAAkB;IAC7B,OAAO,EAAE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I,IAAI,EAAE;QAC1B,UAAU,EAAE,aAAa;QACzB,UAAU,EAAE,OAAO;KACpB,CAAC;8BACU,IAAI;mDAAA;AAIhB;IAFC,cAAc,CAAC,aAAa,EAAE;IAC9B,IAAA,eAAQ,EAAC,EAAE,UAAU,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDAC1B;AAG9B;IADC,IAAA,mBAAY,GAAE;;;;+CAGd;AAGD;IADC,IAAA,aAAM,GAAE;;;;6CAGR;AAxCkB,eAAe;IAHnC,IAAA,aAAM,GAAE;IACR,IAAA,aAAM,EAAC,gBAAQ,CAAC,kCAAkC,CAAC;IACnD,kCAAkC,CAAC,aAAa,EAAE;GAC9B,eAAe,CAyCnC;kBAzCoB,eAAe"}
|
@@ -1,20 +1,15 @@
|
|
1
|
-
import { DAL } from "@medusajs/types";
|
2
|
-
import { OptionalProps } from "@mikro-orm/core";
|
1
|
+
import { DAL } from "@medusajs/framework/types";
|
2
|
+
import { OptionalProps, Rel } from "@mikro-orm/core";
|
3
3
|
import Price from "./price";
|
4
|
-
|
5
|
-
import RuleType from "./rule-type";
|
6
|
-
type OptionalFields = DAL.SoftDeletableEntityDateColumns;
|
4
|
+
type OptionalFields = DAL.SoftDeletableModelDateColumns;
|
7
5
|
export default class PriceRule {
|
8
6
|
[OptionalProps]?: OptionalFields;
|
9
7
|
id: string;
|
10
|
-
|
11
|
-
price_set: PriceSet;
|
12
|
-
rule_type_id: string;
|
13
|
-
rule_type: RuleType;
|
8
|
+
attribute: string;
|
14
9
|
value: string;
|
15
10
|
priority: number;
|
16
11
|
price_id: string;
|
17
|
-
price: Price
|
12
|
+
price: Rel<Price>;
|
18
13
|
created_at: Date;
|
19
14
|
updated_at: Date;
|
20
15
|
deleted_at: Date | null;
|
@@ -22,3 +17,4 @@ export default class PriceRule {
|
|
22
17
|
onInit(): void;
|
23
18
|
}
|
24
19
|
export {};
|
20
|
+
//# sourceMappingURL=price-rule.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"price-rule.d.ts","sourceRoot":"","sources":["../../src/models/price-rule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAA;AAM/C,OAAO,EAML,aAAa,EAGb,GAAG,EACJ,MAAM,iBAAiB,CAAA;AACxB,OAAO,KAAK,MAAM,SAAS,CAAA;AAE3B,KAAK,cAAc,GAAG,GAAG,CAAC,6BAA6B,CAAA;AAkBvD,MAAM,CAAC,OAAO,OAAO,SAAS;IAC5B,CAAC,aAAa,CAAC,CAAC,EAAE,cAAc,CAAA;IAGhC,EAAE,EAAG,MAAM,CAAA;IAGX,SAAS,EAAE,MAAM,CAAA;IAGjB,KAAK,EAAE,MAAM,CAAA;IAGb,QAAQ,EAAE,MAAM,CAAI;IASpB,QAAQ,EAAE,MAAM,CAAA;IAGhB,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,CAAA;IAOjB,UAAU,EAAE,IAAI,CAAA;IAQhB,UAAU,EAAE,IAAI,CAAA;IAIhB,UAAU,EAAE,IAAI,GAAG,IAAI,CAAO;IAG9B,YAAY;IAMZ,MAAM;CAIP"}
|
@@ -12,30 +12,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
13
13
|
};
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
15
|
-
const utils_1 = require("@medusajs/utils");
|
15
|
+
const utils_1 = require("@medusajs/framework/utils");
|
16
16
|
const core_1 = require("@mikro-orm/core");
|
17
17
|
const price_1 = __importDefault(require("./price"));
|
18
|
-
const price_set_1 = __importDefault(require("./price-set"));
|
19
|
-
const rule_type_1 = __importDefault(require("./rule-type"));
|
20
18
|
const tableName = "price_rule";
|
21
19
|
const PriceRuleDeletedAtIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
22
20
|
tableName: tableName,
|
23
21
|
columns: "deleted_at",
|
24
22
|
where: "deleted_at IS NOT NULL",
|
25
23
|
});
|
26
|
-
const PriceRulePriceSetIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
27
|
-
tableName: tableName,
|
28
|
-
columns: "price_set_id",
|
29
|
-
where: "deleted_at IS NULL",
|
30
|
-
});
|
31
|
-
const PriceRuleRuleTypeIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
32
|
-
tableName: tableName,
|
33
|
-
columns: "rule_type_id",
|
34
|
-
where: "deleted_at IS NULL",
|
35
|
-
});
|
36
24
|
const PriceRulePriceIdIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
37
25
|
tableName: tableName,
|
38
|
-
columns: ["price_id", "
|
26
|
+
columns: ["price_id", "attribute"],
|
39
27
|
where: "deleted_at IS NULL",
|
40
28
|
unique: true,
|
41
29
|
});
|
@@ -46,15 +34,11 @@ let PriceRule = class PriceRule {
|
|
46
34
|
}
|
47
35
|
beforeCreate() {
|
48
36
|
this.id = (0, utils_1.generateEntityId)(this.id, "prule");
|
49
|
-
this.
|
50
|
-
this.price_set_id ?? (this.price_set_id = this.price_set?.id);
|
51
|
-
this.price_id ?? (this.price_id = this.price?.id);
|
37
|
+
this.price_id ??= this.price?.id;
|
52
38
|
}
|
53
39
|
onInit() {
|
54
40
|
this.id = (0, utils_1.generateEntityId)(this.id, "prule");
|
55
|
-
this.
|
56
|
-
this.price_set_id ?? (this.price_set_id = this.price_set?.id);
|
57
|
-
this.price_id ?? (this.price_id = this.price?.id);
|
41
|
+
this.price_id ??= this.price?.id;
|
58
42
|
}
|
59
43
|
};
|
60
44
|
__decorate([
|
@@ -62,32 +46,9 @@ __decorate([
|
|
62
46
|
__metadata("design:type", String)
|
63
47
|
], PriceRule.prototype, "id", void 0);
|
64
48
|
__decorate([
|
65
|
-
|
66
|
-
(0, core_1.ManyToOne)(() => price_set_1.default, {
|
67
|
-
columnType: "text",
|
68
|
-
mapToPk: true,
|
69
|
-
fieldName: "price_set_id",
|
70
|
-
onDelete: "cascade",
|
71
|
-
}),
|
72
|
-
__metadata("design:type", String)
|
73
|
-
], PriceRule.prototype, "price_set_id", void 0);
|
74
|
-
__decorate([
|
75
|
-
(0, core_1.ManyToOne)(() => price_set_1.default, { persist: false }),
|
76
|
-
__metadata("design:type", price_set_1.default)
|
77
|
-
], PriceRule.prototype, "price_set", void 0);
|
78
|
-
__decorate([
|
79
|
-
PriceRuleRuleTypeIdIndex.MikroORMIndex(),
|
80
|
-
(0, core_1.ManyToOne)(() => rule_type_1.default, {
|
81
|
-
columnType: "text",
|
82
|
-
mapToPk: true,
|
83
|
-
fieldName: "rule_type_id",
|
84
|
-
}),
|
49
|
+
(0, core_1.Property)({ columnType: "text" }),
|
85
50
|
__metadata("design:type", String)
|
86
|
-
], PriceRule.prototype, "
|
87
|
-
__decorate([
|
88
|
-
(0, core_1.ManyToOne)(() => rule_type_1.default, { persist: false }),
|
89
|
-
__metadata("design:type", rule_type_1.default)
|
90
|
-
], PriceRule.prototype, "rule_type", void 0);
|
51
|
+
], PriceRule.prototype, "attribute", void 0);
|
91
52
|
__decorate([
|
92
53
|
(0, core_1.Property)({ columnType: "text" }),
|
93
54
|
__metadata("design:type", String)
|
@@ -108,7 +69,7 @@ __decorate([
|
|
108
69
|
], PriceRule.prototype, "price_id", void 0);
|
109
70
|
__decorate([
|
110
71
|
(0, core_1.ManyToOne)(() => price_1.default, { persist: false }),
|
111
|
-
__metadata("design:type",
|
72
|
+
__metadata("design:type", Object)
|
112
73
|
], PriceRule.prototype, "price", void 0);
|
113
74
|
__decorate([
|
114
75
|
(0, core_1.Property)({
|
@@ -149,3 +110,4 @@ PriceRule = __decorate([
|
|
149
110
|
(0, core_1.Filter)(utils_1.DALUtils.mikroOrmSoftDeletableFilterOptions)
|
150
111
|
], PriceRule);
|
151
112
|
exports.default = PriceRule;
|
113
|
+
//# sourceMappingURL=price-rule.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"price-rule.js","sourceRoot":"","sources":["../../src/models/price-rule.ts"],"names":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AAC,EAAE,CAAC;;2CAC5B;AASpB;IAPC,qBAAqB,CAAC,aAAa,EAAE;IACrC,IAAA,gBAAS,EAAC,GAAG,EAAE,CAAC,eAAK,EAAE;QACtB,UAAU,EAAE,MAAM;QAClB,OAAO,EAAE,IAAI;QACb,SAAS,EAAE,UAAU;QACrB,QAAQ,EAAE,SAAS;KACpB,CAAC;;2CACc;AAGhB;IADC,IAAA,gBAAS,EAAC,GAAG,EAAE,CAAC,eAAK,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;wCAC1B;AAOjB;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;6CAAA;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;6CAAA;AAIhB;IAFC,uBAAuB,CAAC,aAAa,EAAE;IACvC,IAAA,eAAQ,EAAC,EAAE,UAAU,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CAC1B;AAG9B;IADC,IAAA,mBAAY,GAAE;;;;6CAId;AAGD;IADC,IAAA,aAAM,GAAE;;;;uCAIR;AAxDkB,SAAS;IAF7B,IAAA,aAAM,EAAC,EAAE,SAAS,EAAE,CAAC;IACrB,IAAA,aAAM,EAAC,gBAAQ,CAAC,kCAAkC,CAAC;GAC/B,SAAS,CAyD7B;kBAzDoB,SAAS"}
|
@@ -1,16 +1,13 @@
|
|
1
1
|
import { Collection } from "@mikro-orm/core";
|
2
2
|
import Price from "./price";
|
3
|
-
import PriceRule from "./price-rule";
|
4
|
-
import RuleType from "./rule-type";
|
5
3
|
export declare const PriceSetIdPrefix = "pset";
|
6
4
|
export default class PriceSet {
|
7
5
|
id: string;
|
8
6
|
prices: Collection<Price, object>;
|
9
|
-
price_rules: Collection<PriceRule, object>;
|
10
|
-
rule_types: Collection<RuleType, object>;
|
11
7
|
created_at: Date;
|
12
8
|
updated_at: Date;
|
13
9
|
deleted_at: Date | null;
|
14
10
|
onCreate(): void;
|
15
11
|
onInit(): void;
|
16
12
|
}
|
13
|
+
//# sourceMappingURL=price-set.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"price-set.d.ts","sourceRoot":"","sources":["../../src/models/price-set.ts"],"names":[],"mappings":"AAKA,OAAO,EAGL,UAAU,EAQX,MAAM,iBAAiB,CAAA;AACxB,OAAO,KAAK,MAAM,SAAS,CAAA;AAS3B,eAAO,MAAM,gBAAgB,SAAS,CAAA;AAItC,MAAM,CAAC,OAAO,OAAO,QAAQ;IAE3B,EAAE,EAAG,MAAM,CAAA;IAKX,MAAM,4BAAmC;IAOzC,UAAU,EAAE,IAAI,CAAA;IAQhB,UAAU,EAAE,IAAI,CAAA;IAIhB,UAAU,EAAE,IAAI,GAAG,IAAI,CAAO;IAG9B,QAAQ;IAKR,MAAM;CAGP"}
|
package/dist/models/price-set.js
CHANGED
@@ -13,12 +13,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
13
13
|
};
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
15
15
|
exports.PriceSetIdPrefix = void 0;
|
16
|
-
const utils_1 = require("@medusajs/utils");
|
16
|
+
const utils_1 = require("@medusajs/framework/utils");
|
17
17
|
const core_1 = require("@mikro-orm/core");
|
18
18
|
const price_1 = __importDefault(require("./price"));
|
19
|
-
const price_rule_1 = __importDefault(require("./price-rule"));
|
20
|
-
const price_set_rule_type_1 = __importDefault(require("./price-set-rule-type"));
|
21
|
-
const rule_type_1 = __importDefault(require("./rule-type"));
|
22
19
|
const tableName = "price_set";
|
23
20
|
const PriceSetDeletedAtIndex = (0, utils_1.createPsqlIndexStatementHelper)({
|
24
21
|
tableName: tableName,
|
@@ -29,8 +26,6 @@ exports.PriceSetIdPrefix = "pset";
|
|
29
26
|
let PriceSet = class PriceSet {
|
30
27
|
constructor() {
|
31
28
|
this.prices = new core_1.Collection(this);
|
32
|
-
this.price_rules = new core_1.Collection(this);
|
33
|
-
this.rule_types = new core_1.Collection(this);
|
34
29
|
this.deleted_at = null;
|
35
30
|
}
|
36
31
|
onCreate() {
|
@@ -50,20 +45,6 @@ __decorate([
|
|
50
45
|
}),
|
51
46
|
__metadata("design:type", Object)
|
52
47
|
], PriceSet.prototype, "prices", void 0);
|
53
|
-
__decorate([
|
54
|
-
(0, core_1.OneToMany)(() => price_rule_1.default, (pr) => pr.price_set, {
|
55
|
-
cascade: [core_1.Cascade.PERSIST, "soft-remove"],
|
56
|
-
}),
|
57
|
-
__metadata("design:type", Object)
|
58
|
-
], PriceSet.prototype, "price_rules", void 0);
|
59
|
-
__decorate([
|
60
|
-
(0, core_1.ManyToMany)({
|
61
|
-
entity: () => rule_type_1.default,
|
62
|
-
pivotEntity: () => price_set_rule_type_1.default,
|
63
|
-
cascade: ["soft-remove"],
|
64
|
-
}),
|
65
|
-
__metadata("design:type", Object)
|
66
|
-
], PriceSet.prototype, "rule_types", void 0);
|
67
48
|
__decorate([
|
68
49
|
(0, core_1.Property)({
|
69
50
|
onCreate: () => new Date(),
|
@@ -103,3 +84,4 @@ PriceSet = __decorate([
|
|
103
84
|
(0, core_1.Filter)(utils_1.DALUtils.mikroOrmSoftDeletableFilterOptions)
|
104
85
|
], PriceSet);
|
105
86
|
exports.default = PriceSet;
|
87
|
+
//# sourceMappingURL=price-set.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"price-set.js","sourceRoot":"","sources":["../../src/models/price-set.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,qDAIkC;AAClC,0CAWwB;AACxB,oDAA2B;AAE3B,MAAM,SA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B,CAAC;8BACU,IAAI;4CAAA;AAIhB;IAFC,sBAAsB,CAAC,aAAa,EAAE;IACtC,IAAA,eAAQ,EAAC,EAAE,UAAU,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CAC1B;AAG9B;IADC,IAAA,mBAAY,GAAE;;;;wCAGd;AAGD;IADC,IAAA,aAAM,GAAE;;;;sCAGR;AApCkB,QAAQ;IAF5B,IAAA,aAAM,EAAC,EAAE,SAAS,EAAE,CAAC;IACrB,IAAA,aAAM,EAAC,gBAAQ,CAAC,kCAAkC,CAAC;GAC/B,QAAQ,CAqC5B;kBArCoB,QAAQ"}
|
package/dist/models/price.d.ts
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
import { DAL } from "@medusajs/types";
|
2
|
-
import { BigNumber } from "@medusajs/utils";
|
3
|
-
import { Collection, OptionalProps } from "@mikro-orm/core";
|
1
|
+
import { DAL } from "@medusajs/framework/types";
|
2
|
+
import { BigNumber } from "@medusajs/framework/utils";
|
3
|
+
import { Collection, OptionalProps, Rel } from "@mikro-orm/core";
|
4
4
|
import PriceList from "./price-list";
|
5
5
|
import PriceRule from "./price-rule";
|
6
6
|
import PriceSet from "./price-set";
|
7
|
-
type OptionalFields = DAL.
|
7
|
+
type OptionalFields = DAL.SoftDeletableModelDateColumns;
|
8
8
|
export default class Price {
|
9
9
|
[OptionalProps]?: OptionalFields;
|
10
10
|
id: string;
|
@@ -15,11 +15,11 @@ export default class Price {
|
|
15
15
|
min_quantity: number | null;
|
16
16
|
max_quantity: number | null;
|
17
17
|
price_set_id: string;
|
18
|
-
price_set?: PriceSet
|
18
|
+
price_set?: Rel<PriceSet>;
|
19
19
|
rules_count: number;
|
20
20
|
price_rules: Collection<PriceRule, object>;
|
21
21
|
price_list_id: string | null;
|
22
|
-
price_list: PriceList | null;
|
22
|
+
price_list: Rel<PriceList> | null;
|
23
23
|
created_at: Date;
|
24
24
|
updated_at: Date;
|
25
25
|
deleted_at: Date | null;
|
@@ -27,3 +27,4 @@ export default class Price {
|
|
27
27
|
onInit(): void;
|
28
28
|
}
|
29
29
|
export {};
|
30
|
+
//# sourceMappingURL=price.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"price.d.ts","sourceRoot":"","sources":["../../src/models/price.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAA;AAC/C,OAAO,EACL,SAAS,EAKV,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAGL,UAAU,EAMV,aAAa,EAGb,GAAG,EACJ,MAAM,iBAAiB,CAAA;AACxB,OAAO,SAAS,MAAM,cAAc,CAAA;AACpC,OAAO,SAAS,MAAM,cAAc,CAAA;AACpC,OAAO,QAAQ,MAAM,aAAa,CAAA;AAElC,KAAK,cAAc,GAAG,GAAG,CAAC,6BAA6B,CAAA;AA6BvD,MAAM,CAAC,OAAO,OAAO,KAAK;IACxB,CAAC,aAAa,CAAC,CAAC,EAAE,cAAc,CAAA;IAGhC,EAAE,EAAG,MAAM,CAAA;IAGX,KAAK,EAAE,MAAM,GAAG,IAAI,CAAO;IAI3B,aAAa,EAAE,MAAM,CAAA;IAGrB,MAAM,EAAE,SAAS,GAAG,MAAM,CAAA;IAG1B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAGnC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAO;IAGlC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAO;IASlC,YAAY,EAAE,MAAM,CAAA;IAGpB,SAAS,CAAC,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAA;IAGzB,WAAW,EAAE,MAAM,CAAI;IAOvB,WAAW,gCAAuC;IAUlD,aAAa,EAAE,MAAM,GAAG,IAAI,CAAO;IAGnC,UAAU,EAAE,GAAG,CAAC,SAAS,CAAC,GAAG,IAAI,CAAO;IAOxC,UAAU,EAAE,IAAI,CAAA;IAQhB,UAAU,EAAE,IAAI,CAAA;IAIhB,UAAU,EAAE,IAAI,GAAG,IAAI,CAAO;IAG9B,QAAQ;IAOR,MAAM;CAKP"}
|
package/dist/models/price.js
CHANGED
@@ -12,7 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
13
13
|
};
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
15
|
-
const utils_1 = require("@medusajs/utils");
|
15
|
+
const utils_1 = require("@medusajs/framework/utils");
|
16
16
|
const core_1 = require("@mikro-orm/core");
|
17
17
|
const price_list_1 = __importDefault(require("./price-list"));
|
18
18
|
const price_rule_1 = __importDefault(require("./price-rule"));
|
@@ -51,13 +51,13 @@ let Price = class Price {
|
|
51
51
|
}
|
52
52
|
onCreate() {
|
53
53
|
this.id = (0, utils_1.generateEntityId)(this.id, "price");
|
54
|
-
this.price_set_id
|
55
|
-
this.price_list_id
|
54
|
+
this.price_set_id ??= this.price_set?.id;
|
55
|
+
this.price_list_id ??= this.price_list?.id;
|
56
56
|
}
|
57
57
|
onInit() {
|
58
58
|
this.id = (0, utils_1.generateEntityId)(this.id, "price");
|
59
|
-
this.price_set_id
|
60
|
-
this.price_list_id
|
59
|
+
this.price_set_id ??= this.price_set?.id;
|
60
|
+
this.price_list_id ??= this.price_list?.id;
|
61
61
|
}
|
62
62
|
};
|
63
63
|
__decorate([
|
@@ -101,7 +101,7 @@ __decorate([
|
|
101
101
|
], Price.prototype, "price_set_id", void 0);
|
102
102
|
__decorate([
|
103
103
|
(0, core_1.ManyToOne)(() => price_set_1.default, { persist: false }),
|
104
|
-
__metadata("design:type",
|
104
|
+
__metadata("design:type", Object)
|
105
105
|
], Price.prototype, "price_set", void 0);
|
106
106
|
__decorate([
|
107
107
|
(0, core_1.Property)({ columnType: "integer", default: 0 }),
|
@@ -169,3 +169,4 @@ Price = __decorate([
|
|
169
169
|
(0, core_1.Filter)(utils_1.DALUtils.mikroOrmSoftDeletableFilterOptions)
|
170
170
|
], Price);
|
171
171
|
exports.default = Price;
|
172
|
+
//# sourceMappingURL=price.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"price.js","sourceRoot":"","sources":["../../src/models/price.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,qDAMkC;AAClC,0CAawB;AACxB,8DAAoC;AACpC,8DAAoC;AACpC,4DAAkC;AAIlC,MAAM,SAAS,GAAG,OAAO,CAAA;AACzB,MAAM,mBAAmB,GAAG,IAAA,sCAA8B,EAAC;IACzD,SAAS,EAAE,SAAS;IACpB,OAAO,EAAE,YAAY;IACrB,KAAK,EAAE,wBAAwB;CAChC,CAAC,CAAA;AAEF,MAAM,oBAAoB,GAAG,IAAA,sCAA8B,EAAC;IAC1D,SAAS,EAAE,SAAS;IACpB,OAAO,EAAE,cAAc;IACvB,KAAK,EAAE,oBAAoB;CAC5B,CAAC,CAAA;AAEF,MAAM,qBAAqB,GAAG,IAAA,sCAA8B,EAAC;IAC3D,SAAS,EAAE,SAAS;IACpB,OAAO,EAAE,eAAe;IACxB,KAAK,EAAE,oBAAoB;CAC5B,CAAC,CAAA;AAEF,MAAM,sBAAsB,GAAG,IAAA,sCAA8B,EAAC;IAC5D,SAAS,EAAE,SAAS;IACpB,OAAO,EAAE,eAAe;IACxB,KAAK,EAAE,oBAAoB;CAC5B,CAAC,CAAA;AAIa,IAAM,KAAK,GAAX,MAAM,KAAK;IAAX;QAOb,UAAK,GAAkB,IAAI,CAAA;QAa3B,iBAAY,GAAkB,IAAI,CAAA;QAGlC,iBAAY,GAAkB,IAAI,CAAA;QAelC,gBAAW,GAAW,CAAC,CAAA;QAOvB,gBAAW,GAAG,IAAI,iBAAU,CAAiB,IAAI,CAAC,CAAA;QAUlD,kBAAa,GAAkB,IAAI,CAAA;QAGnC,eAAU,GAA0B,IAAI,CAAA;QAmBxC,eAAU,GAAgB,IAAI,CAAA;IAehC,CAAC;IAZC,QAAQ;QACN,IAAI,CAAC,EAAE,GAAG,IAAA,wBAAg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;AAIhB;IAFC,mBAAmB,CAAC,aAAa,EAAE;IACnC,IAAA,eAAQ,EAAC,EAAE,UAAU,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCAC1B;AAG9B;IADC,IAAA,mBAAY,GAAE;;;;qCAKd;AAGD;IADC,IAAA,aAAM,GAAE;;;;mCAKR;AA3FkB,KAAK;IAFzB,IAAA,aAAM,EAAC,EAAE,SAAS,EAAE,CAAC;IACrB,IAAA,aAAM,EAAC,gBAAQ,CAAC,kCAAkC,CAAC;GAC/B,KAAK,CA4FzB;kBA5FoB,KAAK"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/repositories/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,IAAI,cAAc,EAAE,MAAM,2BAA2B,CAAA;AACpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA"}
|
@@ -1,7 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.PricingRepository = exports.BaseRepository = void 0;
|
4
|
-
var utils_1 = require("@medusajs/utils");
|
4
|
+
var utils_1 = require("@medusajs/framework/utils");
|
5
5
|
Object.defineProperty(exports, "BaseRepository", { enumerable: true, get: function () { return utils_1.MikroOrmBaseRepository; } });
|
6
6
|
var pricing_1 = require("./pricing");
|
7
7
|
Object.defineProperty(exports, "PricingRepository", { enumerable: true, get: function () { return pricing_1.PricingRepository; } });
|
8
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/repositories/index.ts"],"names":[],"mappings":";;;AAAA,mDAAoF;AAA3E,uGAAA,sBAAsB,OAAkB;AACjD,qCAA6C;AAApC,4GAAA,iBAAiB,OAAA"}
|
@@ -1,6 +1,7 @@
|
|
1
|
-
import { MikroOrmBase } from "@medusajs/utils";
|
2
|
-
import { CalculatedPriceSetDTO, Context, PricingContext, PricingFilters, PricingRepositoryService } from "@medusajs/types";
|
1
|
+
import { MikroOrmBase } from "@medusajs/framework/utils";
|
2
|
+
import { CalculatedPriceSetDTO, Context, PricingContext, PricingFilters, PricingRepositoryService } from "@medusajs/framework/types";
|
3
3
|
export declare class PricingRepository extends MikroOrmBase implements PricingRepositoryService {
|
4
4
|
constructor();
|
5
5
|
calculatePrices(pricingFilters: PricingFilters, pricingContext?: PricingContext, sharedContext?: Context): Promise<CalculatedPriceSetDTO[]>;
|
6
6
|
}
|
7
|
+
//# sourceMappingURL=pricing.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"pricing.d.ts","sourceRoot":"","sources":["../../src/repositories/pricing.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,YAAY,EAEb,MAAM,2BAA2B,CAAA;AAElC,OAAO,EACL,qBAAqB,EACrB,OAAO,EACP,cAAc,EACd,cAAc,EACd,wBAAwB,EACzB,MAAM,2BAA2B,CAAA;AAGlC,qBAAa,iBACX,SAAQ,YACR,YAAW,wBAAwB;;IAQ7B,eAAe,CACnB,cAAc,EAAE,cAAc,EAC9B,cAAc,GAAE,cAAgC,EAChD,aAAa,GAAE,OAAY,GAC1B,OAAO,CAAC,qBAAqB,EAAE,CAAC;CA+KpC"}
|