@medusajs/pricing 0.1.13-snapshot-20240718073308 → 0.1.13
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.js +9 -5
- package/dist/initialize/index.d.ts +4 -0
- package/dist/initialize/index.js +17 -0
- package/dist/joiner-config.d.ts +10 -2
- package/dist/joiner-config.js +52 -4
- package/dist/loaders/connection.d.ts +4 -0
- package/dist/loaders/connection.js +40 -0
- package/dist/loaders/container.d.ts +2 -0
- package/dist/loaders/container.js +34 -0
- package/dist/loaders/index.d.ts +2 -0
- package/dist/loaders/index.js +18 -0
- package/dist/migrations/Migration20230929122253.d.ts +0 -1
- package/dist/migrations/Migration20240322094407.d.ts +0 -1
- package/dist/migrations/Migration20240322113359.d.ts +0 -1
- package/dist/migrations/Migration20240322120125.d.ts +0 -1
- package/dist/models/index.d.ts +3 -2
- package/dist/models/index.js +7 -3
- package/dist/models/price-list-rule-value.d.ts +17 -0
- package/dist/models/price-list-rule-value.js +102 -0
- package/dist/models/price-list-rule.d.ts +8 -6
- package/dist/models/price-list-rule.js +29 -8
- package/dist/models/price-list.d.ts +3 -2
- package/dist/models/price-list.js +9 -0
- package/dist/models/price-rule.d.ts +9 -5
- package/dist/models/price-rule.js +45 -6
- package/dist/models/price-set-rule-type.d.ts +10 -0
- package/dist/models/price-set-rule-type.js +108 -0
- package/dist/models/price-set.d.ts +4 -1
- package/dist/models/price-set.js +19 -0
- package/dist/models/price.d.ts +4 -5
- package/dist/models/price.js +5 -5
- package/dist/models/rule-type.d.ts +17 -0
- package/dist/models/{price-preference.js → rule-type.js} +40 -35
- package/dist/module-definition.d.ts +4 -0
- package/dist/module-definition.js +50 -0
- package/dist/repositories/index.d.ts +0 -1
- package/dist/repositories/pricing.d.ts +0 -1
- package/dist/repositories/pricing.js +36 -29
- package/dist/schema/index.d.ts +0 -1
- package/dist/scripts/bin/run-seed.d.ts +3 -0
- package/dist/scripts/bin/run-seed.js +38 -0
- package/dist/scripts/seed.d.ts +4 -0
- package/dist/scripts/seed.js +67 -0
- package/dist/services/index.d.ts +2 -1
- package/dist/services/index.js +5 -1
- package/dist/services/price-list.d.ts +16 -0
- package/dist/services/price-list.js +34 -0
- package/dist/services/pricing-module.d.ts +53 -66
- package/dist/services/pricing-module.js +605 -594
- package/dist/services/rule-type.d.ts +15 -0
- package/dist/services/rule-type.js +53 -0
- package/dist/types/index.d.ts +0 -1
- package/dist/types/services/index.d.ts +2 -30
- package/dist/types/services/index.js +16 -0
- package/dist/types/services/price-list.d.ts +18 -0
- package/dist/types/services/price-list.js +2 -0
- package/dist/types/services/price-set.d.ts +4 -0
- package/dist/types/services/price-set.js +2 -0
- package/dist/utils/index.d.ts +0 -2
- package/dist/utils/index.js +0 -1
- package/dist/utils/validate-price-list-dates.d.ts +0 -1
- package/package.json +13 -8
- package/dist/index.d.ts.map +0 -1
- package/dist/joiner-config.d.ts.map +0 -1
- package/dist/migrations/Migration20230929122253.d.ts.map +0 -1
- package/dist/migrations/Migration20240322094407.d.ts.map +0 -1
- package/dist/migrations/Migration20240322113359.d.ts.map +0 -1
- package/dist/migrations/Migration20240322120125.d.ts.map +0 -1
- package/dist/migrations/Migration20240626133555.d.ts +0 -5
- package/dist/migrations/Migration20240626133555.d.ts.map +0 -1
- package/dist/migrations/Migration20240626133555.js +0 -33
- package/dist/migrations/Migration20240704094505.d.ts +0 -6
- package/dist/migrations/Migration20240704094505.d.ts.map +0 -1
- package/dist/migrations/Migration20240704094505.js +0 -15
- package/dist/models/index.d.ts.map +0 -1
- package/dist/models/price-list-rule.d.ts.map +0 -1
- package/dist/models/price-list.d.ts.map +0 -1
- package/dist/models/price-preference.d.ts +0 -13
- package/dist/models/price-preference.d.ts.map +0 -1
- package/dist/models/price-rule.d.ts.map +0 -1
- package/dist/models/price-set.d.ts.map +0 -1
- package/dist/models/price.d.ts.map +0 -1
- package/dist/repositories/index.d.ts.map +0 -1
- package/dist/repositories/pricing.d.ts.map +0 -1
- package/dist/schema/index.d.ts.map +0 -1
- package/dist/services/index.d.ts.map +0 -1
- package/dist/services/pricing-module.d.ts.map +0 -1
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/services/index.d.ts.map +0 -1
- package/dist/utils/events.d.ts +0 -63
- package/dist/utils/events.d.ts.map +0 -1
- package/dist/utils/events.js +0 -66
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/validate-price-list-dates.d.ts.map +0 -1
@@ -0,0 +1,15 @@
|
|
1
|
+
import { Context, DAL, PricingTypes } from "@medusajs/types";
|
2
|
+
import { RuleType } from "../models";
|
3
|
+
type InjectedDependencies = {
|
4
|
+
ruleTypeRepository: DAL.RepositoryService;
|
5
|
+
};
|
6
|
+
declare const RuleTypeService_base: new <TEntity_1 extends object = any>(container: InjectedDependencies) => import("@medusajs/types").InternalModuleService<TEntity_1, InjectedDependencies>;
|
7
|
+
export default class RuleTypeService<TEntity extends RuleType = RuleType> extends RuleTypeService_base<TEntity> {
|
8
|
+
protected readonly ruleTypeRepository_: DAL.RepositoryService<TEntity>;
|
9
|
+
constructor({ ruleTypeRepository }: InjectedDependencies);
|
10
|
+
create(data: PricingTypes.CreateRuleTypeDTO, sharedContext: Context): Promise<TEntity>;
|
11
|
+
create(data: PricingTypes.CreateRuleTypeDTO[], sharedContext: Context): Promise<TEntity[]>;
|
12
|
+
update(data: PricingTypes.UpdateRuleTypeDTO[], sharedContext: Context): Promise<TEntity[]>;
|
13
|
+
update(data: PricingTypes.UpdateRuleTypeDTO, sharedContext: Context): Promise<TEntity>;
|
14
|
+
}
|
15
|
+
export {};
|
@@ -0,0 +1,53 @@
|
|
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 __param = (this && this.__param) || function (paramIndex, decorator) {
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
13
|
+
};
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
15
|
+
const utils_1 = require("@medusajs/utils");
|
16
|
+
const _models_1 = require("../models");
|
17
|
+
class RuleTypeService extends utils_1.ModulesSdkUtils.internalModuleServiceFactory(_models_1.RuleType) {
|
18
|
+
constructor({ ruleTypeRepository }) {
|
19
|
+
// @ts-ignore
|
20
|
+
super(...arguments);
|
21
|
+
this.ruleTypeRepository_ = ruleTypeRepository;
|
22
|
+
}
|
23
|
+
async create(data, sharedContext = {}) {
|
24
|
+
const data_ = Array.isArray(data) ? data : [data];
|
25
|
+
(0, utils_1.validateRuleAttributes)(data_.map((d) => d.rule_attribute));
|
26
|
+
return await super.create(data, sharedContext);
|
27
|
+
}
|
28
|
+
// TODO: add support for selector? and then rm ts ignore
|
29
|
+
// @ts-ignore
|
30
|
+
async update(data, sharedContext = {}) {
|
31
|
+
const data_ = Array.isArray(data) ? data : [data];
|
32
|
+
(0, utils_1.validateRuleAttributes)(data_.map((d) => d.rule_attribute));
|
33
|
+
return await super.update(data, sharedContext);
|
34
|
+
}
|
35
|
+
}
|
36
|
+
exports.default = RuleTypeService;
|
37
|
+
__decorate([
|
38
|
+
(0, utils_1.InjectTransactionManager)("ruleTypeRepository_"),
|
39
|
+
__param(1, (0, utils_1.MedusaContext)()),
|
40
|
+
__metadata("design:type", Function),
|
41
|
+
__metadata("design:paramtypes", [Object, Object]),
|
42
|
+
__metadata("design:returntype", Promise)
|
43
|
+
], RuleTypeService.prototype, "create", null);
|
44
|
+
__decorate([
|
45
|
+
(0, utils_1.InjectTransactionManager)("ruleTypeRepository_")
|
46
|
+
// TODO: add support for selector? and then rm ts ignore
|
47
|
+
// @ts-ignore
|
48
|
+
,
|
49
|
+
__param(1, (0, utils_1.MedusaContext)()),
|
50
|
+
__metadata("design:type", Function),
|
51
|
+
__metadata("design:paramtypes", [Object, Object]),
|
52
|
+
__metadata("design:returntype", Promise)
|
53
|
+
], RuleTypeService.prototype, "update", null);
|
package/dist/types/index.d.ts
CHANGED
@@ -1,30 +1,2 @@
|
|
1
|
-
|
2
|
-
export
|
3
|
-
rules_count?: number;
|
4
|
-
price_list_rules?: {
|
5
|
-
attribute: string;
|
6
|
-
value: string;
|
7
|
-
}[];
|
8
|
-
prices?: PricingTypes.CreatePriceListPriceDTO[];
|
9
|
-
}
|
10
|
-
export interface UpdatePriceListDTO {
|
11
|
-
id: string;
|
12
|
-
title?: string;
|
13
|
-
description?: string | null;
|
14
|
-
starts_at?: string | null;
|
15
|
-
ends_at?: string | null;
|
16
|
-
status?: PriceListStatus;
|
17
|
-
number_rules?: number;
|
18
|
-
}
|
19
|
-
export interface UpdatePriceSetInput extends PricingTypes.UpdatePriceSetDTO {
|
20
|
-
id: string;
|
21
|
-
}
|
22
|
-
export interface UpsertPriceDTO extends Omit<PricingTypes.CreatePriceDTO, "rules"> {
|
23
|
-
id?: string;
|
24
|
-
price_list_id?: string;
|
25
|
-
price_rules: PricingTypes.CreatePriceRuleDTO[];
|
26
|
-
}
|
27
|
-
export interface UpdatePricePreferenceInput extends PricingTypes.UpdatePricePreferenceDTO {
|
28
|
-
id: string;
|
29
|
-
}
|
30
|
-
//# sourceMappingURL=index.d.ts.map
|
1
|
+
export * from "./price-list";
|
2
|
+
export * from "./price-set";
|
@@ -1,2 +1,18 @@
|
|
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 });
|
17
|
+
__exportStar(require("./price-list"), exports);
|
18
|
+
__exportStar(require("./price-set"), exports);
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { PriceListStatus, PriceListType } from "@medusajs/utils";
|
2
|
+
export interface CreatePriceListDTO {
|
3
|
+
title: string;
|
4
|
+
description: string;
|
5
|
+
starts_at?: string | null;
|
6
|
+
ends_at?: string | null;
|
7
|
+
status?: PriceListStatus;
|
8
|
+
type?: PriceListType;
|
9
|
+
number_rules?: number;
|
10
|
+
}
|
11
|
+
export interface UpdatePriceListDTO {
|
12
|
+
id: string;
|
13
|
+
title?: string;
|
14
|
+
starts_at?: string | null;
|
15
|
+
ends_at?: string | null;
|
16
|
+
status?: PriceListStatus;
|
17
|
+
number_rules?: number;
|
18
|
+
}
|
package/dist/utils/index.d.ts
CHANGED
package/dist/utils/index.js
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@medusajs/pricing",
|
3
|
-
"version": "0.1.13
|
3
|
+
"version": "0.1.13",
|
4
4
|
"description": "Medusa Pricing module",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"types": "dist/index.d.ts",
|
@@ -8,7 +8,10 @@
|
|
8
8
|
"dist"
|
9
9
|
],
|
10
10
|
"engines": {
|
11
|
-
"node": ">=
|
11
|
+
"node": ">=16"
|
12
|
+
},
|
13
|
+
"bin": {
|
14
|
+
"medusa-pricing-seed": "dist/scripts/bin/run-seed.js"
|
12
15
|
},
|
13
16
|
"repository": {
|
14
17
|
"type": "git",
|
@@ -34,12 +37,10 @@
|
|
34
37
|
"orm:cache:clear": " MIKRO_ORM_CLI=./mikro-orm.config.dev.ts mikro-orm cache:clear"
|
35
38
|
},
|
36
39
|
"devDependencies": {
|
37
|
-
"@medusajs/modules-sdk": "1.13.0-snapshot-20240718073308",
|
38
|
-
"@medusajs/types": "1.12.0-snapshot-20240718073308",
|
39
40
|
"@mikro-orm/cli": "5.9.7",
|
40
41
|
"cross-env": "^5.2.1",
|
41
|
-
"jest": "^29.
|
42
|
-
"medusa-test-utils": "1.1.45
|
42
|
+
"jest": "^29.6.3",
|
43
|
+
"medusa-test-utils": "^1.1.45",
|
43
44
|
"rimraf": "^3.0.2",
|
44
45
|
"ts-jest": "^29.1.1",
|
45
46
|
"ts-node": "^10.9.1",
|
@@ -47,10 +48,14 @@
|
|
47
48
|
"typescript": "^5.1.6"
|
48
49
|
},
|
49
50
|
"dependencies": {
|
50
|
-
"@medusajs/
|
51
|
+
"@medusajs/modules-sdk": "^1.12.12",
|
52
|
+
"@medusajs/types": "^1.11.17",
|
53
|
+
"@medusajs/utils": "^1.11.10",
|
51
54
|
"@mikro-orm/core": "5.9.7",
|
52
55
|
"@mikro-orm/migrations": "5.9.7",
|
53
56
|
"@mikro-orm/postgresql": "5.9.7",
|
54
|
-
"awilix": "^8.0.0"
|
57
|
+
"awilix": "^8.0.0",
|
58
|
+
"dotenv": "^16.4.5",
|
59
|
+
"knex": "2.4.2"
|
55
60
|
}
|
56
61
|
}
|
package/dist/index.d.ts.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAA;;;;AAEhD,wBAEE;AAEF,cAAc,SAAS,CAAA"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"joiner-config.d.ts","sourceRoot":"","sources":["../src/joiner-config.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY,uOAEvB,CAAA"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Migration20230929122253.d.ts","sourceRoot":"","sources":["../../src/migrations/Migration20230929122253.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEjD,qBAAa,uBAAwB,SAAQ,SAAS;IAC9C,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;CAkO1B"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Migration20240322094407.d.ts","sourceRoot":"","sources":["../../src/migrations/Migration20240322094407.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,qBAAa,uBAAwB,SAAQ,SAAS;IAE9C,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;IAInB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAM5B"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Migration20240322113359.d.ts","sourceRoot":"","sources":["../../src/migrations/Migration20240322113359.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEjD,qBAAa,uBAAwB,SAAQ,SAAS;IAC9C,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;IAcnB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAa5B"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Migration20240322120125.d.ts","sourceRoot":"","sources":["../../src/migrations/Migration20240322120125.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEjD,qBAAa,uBAAwB,SAAQ,SAAS;IAC9C,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;IAOnB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAQ5B"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Migration20240626133555.d.ts","sourceRoot":"","sources":["../../src/migrations/Migration20240626133555.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEjD,qBAAa,uBAAwB,SAAQ,SAAS;IAC9C,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;CAoE1B"}
|
@@ -1,33 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.Migration20240626133555 = void 0;
|
4
|
-
const migrations_1 = require("@mikro-orm/migrations");
|
5
|
-
class Migration20240626133555 extends migrations_1.Migration {
|
6
|
-
async up() {
|
7
|
-
this.addSql('alter table if exists "price_list_rule" add column if not exists "value" jsonb;');
|
8
|
-
// TODO: Added on 28.06.2024, Drop defaults after a while.
|
9
|
-
this.addSql('alter table if exists "price_list_rule" add column if not exists "attribute" text not null DEFAULT \'\';');
|
10
|
-
this.addSql('alter table if exists "price_rule" add column if not exists "attribute" text not null DEFAULT \'\';');
|
11
|
-
/* DATA MIGRATION */
|
12
|
-
this.addSql("update price_rule set attribute = (SELECT rule_attribute FROM rule_type WHERE rule_type.id = price_rule.rule_type_id);");
|
13
|
-
this.addSql("update price_list_rule set value = (SELECT array_to_json(ARRAY(SELECT value FROM price_list_rule_value WHERE price_list_rule_value.price_list_rule_id = price_list_rule.id))::jsonb);");
|
14
|
-
this.addSql("update price_list_rule set attribute = (SELECT rule_attribute FROM rule_type WHERE rule_type.id = price_list_rule.rule_type_id);");
|
15
|
-
/* DATA MIGRATION END */
|
16
|
-
this.addSql('alter table if exists "price_set_rule_type" drop constraint if exists "price_set_rule_type_rule_type_id_foreign";');
|
17
|
-
this.addSql('alter table if exists "price_rule" drop constraint if exists "price_rule_rule_type_id_foreign";');
|
18
|
-
this.addSql('alter table if exists "price_list_rule" drop constraint if exists "price_list_rule_rule_type_id_foreign";');
|
19
|
-
this.addSql('alter table if exists "price_rule" drop constraint if exists "price_rule_price_set_id_foreign";');
|
20
|
-
this.addSql('drop index if exists "IDX_price_list_rule_rule_type_id_unique";');
|
21
|
-
this.addSql('drop index if exists "IDX_price_rule_price_set_id";');
|
22
|
-
this.addSql('drop index if exists "IDX_price_rule_rule_type_id";');
|
23
|
-
this.addSql('drop index if exists "IDX_price_rule_price_id_unique";');
|
24
|
-
this.addSql('CREATE UNIQUE INDEX IF NOT EXISTS "IDX_price_rule_price_id_attribute_unique" ON "price_rule" (price_id, attribute) WHERE deleted_at IS NULL;');
|
25
|
-
this.addSql('alter table if exists "price_rule" drop column if exists "price_set_id";');
|
26
|
-
this.addSql('alter table if exists "price_rule" drop column if exists "rule_type_id";');
|
27
|
-
this.addSql('alter table if exists "price_list_rule" drop column if exists "rule_type_id";');
|
28
|
-
this.addSql('drop table if exists "rule_type" cascade;');
|
29
|
-
this.addSql('drop table if exists "price_set_rule_type" cascade;');
|
30
|
-
this.addSql('drop table if exists "price_list_rule_value" cascade;');
|
31
|
-
}
|
32
|
-
}
|
33
|
-
exports.Migration20240626133555 = Migration20240626133555;
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Migration20240704094505.d.ts","sourceRoot":"","sources":["../../src/migrations/Migration20240704094505.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,qBAAa,uBAAwB,SAAQ,SAAS;IAE9C,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;IAMnB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAI5B"}
|
@@ -1,15 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.Migration20240704094505 = void 0;
|
4
|
-
const migrations_1 = require("@mikro-orm/migrations");
|
5
|
-
class Migration20240704094505 extends migrations_1.Migration {
|
6
|
-
async up() {
|
7
|
-
this.addSql('create table if not exists "price_preference" ("id" text not null, "attribute" text not null, "value" text null, "is_tax_inclusive" boolean not null default false, "created_at" timestamptz not null default now(), "updated_at" timestamptz not null default now(), "deleted_at" timestamptz null, constraint "price_preference_pkey" primary key ("id"));');
|
8
|
-
this.addSql('CREATE INDEX IF NOT EXISTS "IDX_price_preference_deleted_at" ON "price_preference" (deleted_at) WHERE deleted_at IS NOT NULL;');
|
9
|
-
this.addSql('CREATE UNIQUE INDEX IF NOT EXISTS "IDX_price_preference_attribute_value" ON "price_preference" (attribute, value) WHERE deleted_at IS NULL;');
|
10
|
-
}
|
11
|
-
async down() {
|
12
|
-
this.addSql('drop table if exists "price_preference" cascade;');
|
13
|
-
}
|
14
|
-
}
|
15
|
-
exports.Migration20240704094505 = Migration20240704094505;
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAA;AAC1C,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,cAAc,CAAA;AACnD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAC5D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,cAAc,CAAA;AACnD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,aAAa,CAAA;AACjD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,oBAAoB,CAAA"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"price-list-rule.d.ts","sourceRoot":"","sources":["../../src/models/price-list-rule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAA;AAMrC,OAAO,EAML,aAAa,EAGb,GAAG,EACJ,MAA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AS,EAAE,IAAI,GAAG,IAAI,CAAO;IAM7B,OAAO,EAAE,IAAI,GAAG,IAAI,CAAO;IAK3B,MAAM,4BAAmC;IAKzC,gBAAgB,oCAA2C;IAG3D,WAAW,EAAE,MAAM,CAAI;IAOvB,UAAU,EAAE,IAAI,CAAA;IAQhB,UAAU,EAAE,IAAI,CAAA;IAIhB,UAAU,EAAE,IAAI,GAAG,IAAI,CAAO;IAG9B,QAAQ;IAKR,MAAM;CAGP"}
|
@@ -1,13 +0,0 @@
|
|
1
|
-
export declare const uniquePreferenceRuleIndexName = "IDX_price_preference_attribute_value";
|
2
|
-
export default class PricePreference {
|
3
|
-
id: string;
|
4
|
-
attribute: string;
|
5
|
-
value: string | null;
|
6
|
-
is_tax_inclusive: boolean;
|
7
|
-
created_at: Date;
|
8
|
-
updated_at: Date;
|
9
|
-
deleted_at: Date | null;
|
10
|
-
onCreate(): void;
|
11
|
-
onInit(): void;
|
12
|
-
}
|
13
|
-
//# sourceMappingURL=price-preference.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"price-preference.d.ts","sourceRoot":"","sources":["../../src/models/price-preference.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,6BAA6B,yCACF,CAAA;AAkBxC,MAAM,CAAC,OAAO,OAAO,eAAe;IAElC,EAAE,EAAE,MAAM,CAAA;IAGV,SAAS,EAAE,MAAM,CAAA;IAGjB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAO;IAG3B,gBAAgB,EAAE,OAAO,CAAA;IAOzB,UAAU,EAAE,IAAI,CAAA;IAQhB,UAAU,EAAE,IAAI,CAAA;IAIhB,UAAU,EAAE,IAAI,GAAG,IAAI,CAAO;IAG9B,QAAQ;IAKR,MAAM;CAGP"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"price-rule.d.ts","sourceRoot":"","sources":["../../src/models/price-rule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAA;AAMrC,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"}
|
@@ -1 +0,0 @@
|
|
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"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"price.d.ts","sourceRoot":"","sources":["../../src/models/price.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAA;AACrC,OAAO,EACL,SAAS,EAKV,MAAM,iBAAiB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-1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"pricing.d.ts","sourceRoot":"","sources":["../../src/repositories/pricing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,YAAY,EAAmB,MAAM,iBAAiB,CAAA;AAE5E,OAAO,EACL,qBAAqB,EACrB,OAAO,EACP,cAAc,EACd,cAAc,EACd,wBAAwB,EACzB,MAAM,iBAAiB,CAAA;AAGxB,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;CAqKpC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schema/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM,0MAalB,CAAA;AAED,eAAe,MAAM,CAAA"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,kBAAkB,CAAA"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"pricing-module.d.ts","sourceRoot":"","sources":["../../src/services/pricing-module.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,OAAO,EAEP,kBAAkB,EAGlB,GAAG,EACH,UAAU,EACV,yBAAyB,EACzB,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EAClB,WAAW,EACX,cAAc,EACd,cAAc,EACd,wBAAwB,EACxB,YAAY,EACZ,wBAAwB,EACxB,iBAAiB,EAClB,MAAM,iBAAiB,CAAA;AAoBxB,OAAO,EACL,KAAK,EACL,SAAS,EACT,aAAa,EACb,eAAe,EACf,SAAS,EACT,QAAQ,EACT,MAAM,SAAS,CAAA;AAEhB,OAAO,EAAE,YAAY,E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AKA,mBAAmB,CACjC,IAAI,EAAE,YAAY,CAAC,qBAAqB,EAAE,EAC1C,aAAa,GAAE,OAAY,GAC1B,OAAO,CAAC,KAAK,EAAE,CAAC;cAuEH,kBAAkB,CAChC,IAAI,EAAE,YAAY,CAAC,oBAAoB,EAAE,EACzC,aAAa,GAAE,OAAY,GAC1B,OAAO,CAAC,SAAS,EAAE,CAAC;cA2DP,qBAAqB,CACnC,IAAI,EAAE,YAAY,CAAC,uBAAuB,EAAE,EAC5C,aAAa,GAAE,OAAY,GAC1B,OAAO,CAAC,SAAS,EAAE,CAAC;IA4DvB,SAAS,CAAC,sBAAsB,CAC9B,IAAI,EAAE,CACF,YAAY,CAAC,kBAAkB,GAC/B,YAAY,CAAC,kBAAkB,GAC/B,kBAAkB,CACrB,EAAE;IAiBL,SAAS,CAAC,uBAAuB,CAC/B,MAAM,EAAE,UAAU,CAAC,YAAY,CAAC,WAAW,CAAC,GAAG,SAAS;;;;;;;;;;;;CAS3D"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAExC,MAAM,MAAM,sCAAsC,GAAG;IACnD,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,OAAO,KAAK,YAAY,MAAM,YAAY,CAAA"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/services/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAE/D,MAAM,WAAW,kBAAmB,SAAQ,YAAY,CAAC,kBAAkB;IACzE,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gBAAgB,CAAC,EAAE;QACjB,SAAS,EAAE,MAAM,CAAA;QACjB,KAAK,EAAE,MAAM,CAAA;KACd,EAAE,CAAA;IACH,MAAM,CAAC,EAAE,YAAY,CAAC,uBAAuB,EAAE,CAAA;CAChD;AAED,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,MAAM,CAAC,EAAE,eAAe,CAAA;IACxB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,mBAAoB,SAAQ,YAAY,CAAC,iBAAiB;IACzE,EAAE,EAAE,MAAM,CAAA;CACX;AAED,MAAM,WAAW,cACf,SAAQ,IAAI,CAAC,YAAY,CAAC,cAAc,EAAE,OAAO,CAAC;IAClD,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,WAAW,EAAE,YAAY,CAAC,kBAAkB,EAAE,CAAA;CAC/C;AAED,MAAM,WAAW,0BACf,SAAQ,YAAY,CAAC,wBAAwB;IAC7C,EAAE,EAAE,MAAM,CAAA;CACX"}
|
package/dist/utils/events.d.ts
DELETED
@@ -1,63 +0,0 @@
|
|
1
|
-
export declare const eventBuilders: {
|
2
|
-
createdPriceSet: ({ data, sharedContext, }: {
|
3
|
-
data: {
|
4
|
-
id: string;
|
5
|
-
}[];
|
6
|
-
sharedContext: import("@medusajs/types").Context;
|
7
|
-
}) => void;
|
8
|
-
createdPrice: ({ data, sharedContext, }: {
|
9
|
-
data: {
|
10
|
-
id: string;
|
11
|
-
}[];
|
12
|
-
sharedContext: import("@medusajs/types").Context;
|
13
|
-
}) => void;
|
14
|
-
createdPriceRule: ({ data, sharedContext, }: {
|
15
|
-
data: {
|
16
|
-
id: string;
|
17
|
-
}[];
|
18
|
-
sharedContext: import("@medusajs/types").Context;
|
19
|
-
}) => void;
|
20
|
-
createdPriceList: ({ data, sharedContext, }: {
|
21
|
-
data: {
|
22
|
-
id: string;
|
23
|
-
}[];
|
24
|
-
sharedContext: import("@medusajs/types").Context;
|
25
|
-
}) => void;
|
26
|
-
createdPriceListRule: ({ data, sharedContext, }: {
|
27
|
-
data: {
|
28
|
-
id: string;
|
29
|
-
}[];
|
30
|
-
sharedContext: import("@medusajs/types").Context;
|
31
|
-
}) => void;
|
32
|
-
attachedPriceListRule: ({ data, sharedContext, }: {
|
33
|
-
data: {
|
34
|
-
id: string;
|
35
|
-
}[];
|
36
|
-
sharedContext: import("@medusajs/types").Context;
|
37
|
-
}) => void;
|
38
|
-
updatedPrice: ({ data, sharedContext, }: {
|
39
|
-
data: {
|
40
|
-
id: string;
|
41
|
-
}[];
|
42
|
-
sharedContext: import("@medusajs/types").Context;
|
43
|
-
}) => void;
|
44
|
-
updatedPriceRule: ({ data, sharedContext, }: {
|
45
|
-
data: {
|
46
|
-
id: string;
|
47
|
-
}[];
|
48
|
-
sharedContext: import("@medusajs/types").Context;
|
49
|
-
}) => void;
|
50
|
-
deletedPrice: ({ data, sharedContext, }: {
|
51
|
-
data: {
|
52
|
-
id: string;
|
53
|
-
}[];
|
54
|
-
sharedContext: import("@medusajs/types").Context;
|
55
|
-
}) => void;
|
56
|
-
deletedPriceRule: ({ data, sharedContext, }: {
|
57
|
-
data: {
|
58
|
-
id: string;
|
59
|
-
}[];
|
60
|
-
sharedContext: import("@medusajs/types").Context;
|
61
|
-
}) => void;
|
62
|
-
};
|
63
|
-
//# sourceMappingURL=events.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/utils/events.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6DzB,CAAA"}
|
package/dist/utils/events.js
DELETED
@@ -1,66 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.eventBuilders = void 0;
|
4
|
-
const utils_1 = require("@medusajs/utils");
|
5
|
-
exports.eventBuilders = {
|
6
|
-
createdPriceSet: (0, utils_1.eventBuilderFactory)({
|
7
|
-
source: utils_1.Modules.PRICING,
|
8
|
-
action: utils_1.CommonEvents.CREATED,
|
9
|
-
object: "price_set",
|
10
|
-
eventsEnum: utils_1.PricingEvents,
|
11
|
-
}),
|
12
|
-
createdPrice: (0, utils_1.eventBuilderFactory)({
|
13
|
-
source: utils_1.Modules.PRICING,
|
14
|
-
action: utils_1.CommonEvents.CREATED,
|
15
|
-
object: "price",
|
16
|
-
eventsEnum: utils_1.PricingEvents,
|
17
|
-
}),
|
18
|
-
createdPriceRule: (0, utils_1.eventBuilderFactory)({
|
19
|
-
source: utils_1.Modules.PRICING,
|
20
|
-
action: utils_1.CommonEvents.CREATED,
|
21
|
-
object: "price_rule",
|
22
|
-
eventsEnum: utils_1.PricingEvents,
|
23
|
-
}),
|
24
|
-
createdPriceList: (0, utils_1.eventBuilderFactory)({
|
25
|
-
source: utils_1.Modules.PRICING,
|
26
|
-
action: utils_1.CommonEvents.CREATED,
|
27
|
-
object: "price_list",
|
28
|
-
eventsEnum: utils_1.PricingEvents,
|
29
|
-
}),
|
30
|
-
createdPriceListRule: (0, utils_1.eventBuilderFactory)({
|
31
|
-
source: utils_1.Modules.PRICING,
|
32
|
-
action: utils_1.CommonEvents.CREATED,
|
33
|
-
object: "price_list_rule",
|
34
|
-
eventsEnum: utils_1.PricingEvents,
|
35
|
-
}),
|
36
|
-
attachedPriceListRule: (0, utils_1.eventBuilderFactory)({
|
37
|
-
source: utils_1.Modules.PRICING,
|
38
|
-
action: utils_1.CommonEvents.ATTACHED,
|
39
|
-
object: "price_list_rule",
|
40
|
-
eventsEnum: utils_1.PricingEvents,
|
41
|
-
}),
|
42
|
-
updatedPrice: (0, utils_1.eventBuilderFactory)({
|
43
|
-
source: utils_1.Modules.PRICING,
|
44
|
-
action: utils_1.CommonEvents.UPDATED,
|
45
|
-
object: "price",
|
46
|
-
eventsEnum: utils_1.PricingEvents,
|
47
|
-
}),
|
48
|
-
updatedPriceRule: (0, utils_1.eventBuilderFactory)({
|
49
|
-
source: utils_1.Modules.PRICING,
|
50
|
-
action: utils_1.CommonEvents.UPDATED,
|
51
|
-
object: "price_rule",
|
52
|
-
eventsEnum: utils_1.PricingEvents,
|
53
|
-
}),
|
54
|
-
deletedPrice: (0, utils_1.eventBuilderFactory)({
|
55
|
-
source: utils_1.Modules.PRICING,
|
56
|
-
action: utils_1.CommonEvents.DELETED,
|
57
|
-
object: "price",
|
58
|
-
eventsEnum: utils_1.PricingEvents,
|
59
|
-
}),
|
60
|
-
deletedPriceRule: (0, utils_1.eventBuilderFactory)({
|
61
|
-
source: utils_1.Modules.PRICING,
|
62
|
-
action: utils_1.CommonEvents.DELETED,
|
63
|
-
object: "price_rule",
|
64
|
-
eventsEnum: utils_1.PricingEvents,
|
65
|
-
}),
|
66
|
-
};
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAA;AAC3C,cAAc,UAAU,CAAA"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"validate-price-list-dates.d.ts","sourceRoot":"","sources":["../../src/utils/validate-price-list-dates.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,sBAAsB,kBAAmB;IACpD,SAAS,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,IAAI,CAAA;IAChC,OAAO,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,IAAI,CAAA;CAC/B,SAcA,CAAA"}
|