@medusajs/promotion 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +21 -0
- package/dist/initialize/index.d.ts +5 -0
- package/dist/initialize/index.d.ts.map +1 -0
- package/dist/initialize/index.js +16 -0
- package/dist/joiner-config.d.ts +8 -0
- package/dist/joiner-config.d.ts.map +1 -0
- package/dist/joiner-config.js +28 -0
- package/dist/loaders/connection.d.ts +5 -0
- package/dist/loaders/connection.d.ts.map +1 -0
- package/dist/loaders/connection.js +41 -0
- package/dist/loaders/container.d.ts +5 -0
- package/dist/loaders/container.d.ts.map +1 -0
- package/dist/loaders/container.js +53 -0
- package/dist/loaders/index.d.ts +3 -0
- package/dist/loaders/index.d.ts.map +1 -0
- package/dist/loaders/index.js +18 -0
- package/dist/migrations/Migration20231221104256.d.ts +5 -0
- package/dist/migrations/Migration20231221104256.d.ts.map +1 -0
- package/dist/migrations/Migration20231221104256.js +19 -0
- package/dist/models/application-method.d.ts +21 -0
- package/dist/models/application-method.d.ts.map +1 -0
- package/dist/models/application-method.js +98 -0
- package/dist/models/index.d.ts +3 -0
- package/dist/models/index.d.ts.map +1 -0
- package/dist/models/index.js +10 -0
- package/dist/models/promotion.d.ts +20 -0
- package/dist/models/promotion.d.ts.map +1 -0
- package/dist/models/promotion.js +94 -0
- package/dist/module-definition.d.ts +3 -0
- package/dist/module-definition.d.ts.map +1 -0
- package/dist/module-definition.js +15 -0
- package/dist/repositories/application-method.d.ts +17 -0
- package/dist/repositories/application-method.d.ts.map +1 -0
- package/dist/repositories/application-method.js +59 -0
- package/dist/repositories/index.d.ts +4 -0
- package/dist/repositories/index.d.ts.map +1 -0
- package/dist/repositories/index.js +9 -0
- package/dist/repositories/promotion.d.ts +17 -0
- package/dist/repositories/promotion.d.ts.map +1 -0
- package/dist/repositories/promotion.js +69 -0
- package/dist/scripts/bin/run-migration-down.d.ts +4 -0
- package/dist/scripts/bin/run-migration-down.d.ts.map +1 -0
- package/dist/scripts/bin/run-migration-down.js +32 -0
- package/dist/scripts/bin/run-migration-up.d.ts +4 -0
- package/dist/scripts/bin/run-migration-up.d.ts.map +1 -0
- package/dist/scripts/bin/run-migration-up.js +32 -0
- package/dist/scripts/bin/run-seed.d.ts +4 -0
- package/dist/scripts/bin/run-seed.d.ts.map +1 -0
- package/dist/scripts/bin/run-seed.js +38 -0
- package/dist/scripts/index.d.ts +3 -0
- package/dist/scripts/index.d.ts.map +1 -0
- package/dist/scripts/index.js +18 -0
- package/dist/scripts/migration-down.d.ts +10 -0
- package/dist/scripts/migration-down.d.ts.map +1 -0
- package/dist/scripts/migration-down.js +53 -0
- package/dist/scripts/migration-up.d.ts +10 -0
- package/dist/scripts/migration-up.d.ts.map +1 -0
- package/dist/scripts/migration-up.js +57 -0
- package/dist/scripts/seed.d.ts +5 -0
- package/dist/scripts/seed.d.ts.map +1 -0
- package/dist/scripts/seed.js +54 -0
- package/dist/services/application-method.d.ts +18 -0
- package/dist/services/application-method.d.ts.map +1 -0
- package/dist/services/application-method.js +91 -0
- package/dist/services/index.d.ts +4 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/index.js +12 -0
- package/dist/services/promotion-module.d.ts +21 -0
- package/dist/services/promotion-module.d.ts.map +1 -0
- package/dist/services/promotion-module.js +88 -0
- package/dist/services/promotion.d.ts +18 -0
- package/dist/services/promotion.d.ts.map +1 -0
- package/dist/services/promotion.js +91 -0
- package/dist/types/application-method.d.ts +13 -0
- package/dist/types/application-method.d.ts.map +1 -0
- package/dist/types/application-method.js +2 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +18 -0
- package/dist/types/promotion.d.ts +10 -0
- package/dist/types/promotion.d.ts.map +1 -0
- package/dist/types/promotion.js +2 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +17 -0
- package/dist/utils/validations/application-method.d.ts +3 -0
- package/dist/utils/validations/application-method.d.ts.map +1 -0
- package/dist/utils/validations/application-method.js +26 -0
- package/dist/utils/validations/index.d.ts +2 -0
- package/dist/utils/validations/index.d.ts.map +1 -0
- package/dist/utils/validations/index.js +17 -0
- package/package.json +63 -0
|
@@ -0,0 +1,91 @@
|
|
|
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 types_1 = require("@medusajs/types");
|
|
16
|
+
const utils_1 = require("@medusajs/utils");
|
|
17
|
+
const _models_1 = require("../models");
|
|
18
|
+
class ApplicationMethodService {
|
|
19
|
+
constructor({ applicationMethodRepository }) {
|
|
20
|
+
this.applicationMethodRepository_ = applicationMethodRepository;
|
|
21
|
+
}
|
|
22
|
+
async retrieve(applicationMethodId, config = {}, sharedContext = {}) {
|
|
23
|
+
return (await (0, utils_1.retrieveEntity)({
|
|
24
|
+
id: applicationMethodId,
|
|
25
|
+
entityName: _models_1.ApplicationMethod.name,
|
|
26
|
+
repository: this.applicationMethodRepository_,
|
|
27
|
+
config,
|
|
28
|
+
sharedContext,
|
|
29
|
+
}));
|
|
30
|
+
}
|
|
31
|
+
async list(filters = {}, config = {}, sharedContext = {}) {
|
|
32
|
+
const queryOptions = utils_1.ModulesSdkUtils.buildQuery(filters, config);
|
|
33
|
+
return (await this.applicationMethodRepository_.find(queryOptions, sharedContext));
|
|
34
|
+
}
|
|
35
|
+
async listAndCount(filters = {}, config = {}, sharedContext = {}) {
|
|
36
|
+
const queryOptions = utils_1.ModulesSdkUtils.buildQuery(filters, config);
|
|
37
|
+
return (await this.applicationMethodRepository_.findAndCount(queryOptions, sharedContext));
|
|
38
|
+
}
|
|
39
|
+
async create(data, sharedContext = {}) {
|
|
40
|
+
return (await this.applicationMethodRepository_.create(data, sharedContext));
|
|
41
|
+
}
|
|
42
|
+
async update(data, sharedContext = {}) {
|
|
43
|
+
return (await this.applicationMethodRepository_.update(data, sharedContext));
|
|
44
|
+
}
|
|
45
|
+
async delete(ids, sharedContext = {}) {
|
|
46
|
+
await this.applicationMethodRepository_.delete(ids, sharedContext);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.default = ApplicationMethodService;
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, utils_1.InjectManager)("applicationMethodRepository_"),
|
|
52
|
+
__param(2, (0, utils_1.MedusaContext)()),
|
|
53
|
+
__metadata("design:type", Function),
|
|
54
|
+
__metadata("design:paramtypes", [String, Object, Object]),
|
|
55
|
+
__metadata("design:returntype", Promise)
|
|
56
|
+
], ApplicationMethodService.prototype, "retrieve", null);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, utils_1.InjectManager)("applicationMethodRepository_"),
|
|
59
|
+
__param(2, (0, utils_1.MedusaContext)()),
|
|
60
|
+
__metadata("design:type", Function),
|
|
61
|
+
__metadata("design:paramtypes", [Object, Object, Object]),
|
|
62
|
+
__metadata("design:returntype", Promise)
|
|
63
|
+
], ApplicationMethodService.prototype, "list", null);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, utils_1.InjectManager)("applicationMethodRepository_"),
|
|
66
|
+
__param(2, (0, utils_1.MedusaContext)()),
|
|
67
|
+
__metadata("design:type", Function),
|
|
68
|
+
__metadata("design:paramtypes", [Object, Object, Object]),
|
|
69
|
+
__metadata("design:returntype", Promise)
|
|
70
|
+
], ApplicationMethodService.prototype, "listAndCount", null);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, utils_1.InjectTransactionManager)("applicationMethodRepository_"),
|
|
73
|
+
__param(1, (0, utils_1.MedusaContext)()),
|
|
74
|
+
__metadata("design:type", Function),
|
|
75
|
+
__metadata("design:paramtypes", [Array, Object]),
|
|
76
|
+
__metadata("design:returntype", Promise)
|
|
77
|
+
], ApplicationMethodService.prototype, "create", null);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, utils_1.InjectTransactionManager)("applicationMethodRepository_"),
|
|
80
|
+
__param(1, (0, utils_1.MedusaContext)()),
|
|
81
|
+
__metadata("design:type", Function),
|
|
82
|
+
__metadata("design:paramtypes", [Array, Object]),
|
|
83
|
+
__metadata("design:returntype", Promise)
|
|
84
|
+
], ApplicationMethodService.prototype, "update", null);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, utils_1.InjectTransactionManager)("applicationMethodRepository_"),
|
|
87
|
+
__param(1, (0, utils_1.MedusaContext)()),
|
|
88
|
+
__metadata("design:type", Function),
|
|
89
|
+
__metadata("design:paramtypes", [Array, Object]),
|
|
90
|
+
__metadata("design:returntype", Promise)
|
|
91
|
+
], ApplicationMethodService.prototype, "delete", null);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,sBAAsB,CAAA;AAC1E,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,aAAa,CAAA;AACzD,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,oBAAoB,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
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.PromotionModuleService = exports.PromotionService = exports.ApplicationMethodService = void 0;
|
|
7
|
+
var application_method_1 = require("./application-method");
|
|
8
|
+
Object.defineProperty(exports, "ApplicationMethodService", { enumerable: true, get: function () { return __importDefault(application_method_1).default; } });
|
|
9
|
+
var promotion_1 = require("./promotion");
|
|
10
|
+
Object.defineProperty(exports, "PromotionService", { enumerable: true, get: function () { return __importDefault(promotion_1).default; } });
|
|
11
|
+
var promotion_module_1 = require("./promotion-module");
|
|
12
|
+
Object.defineProperty(exports, "PromotionModuleService", { enumerable: true, get: function () { return __importDefault(promotion_module_1).default; } });
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Context, DAL, FindConfig, InternalModuleDeclaration, ModuleJoinerConfig, PromotionTypes } from "@medusajs/types";
|
|
2
|
+
import { Promotion } from "../models";
|
|
3
|
+
import { ApplicationMethodService, PromotionService } from ".";
|
|
4
|
+
type InjectedDependencies = {
|
|
5
|
+
baseRepository: DAL.RepositoryService;
|
|
6
|
+
promotionService: PromotionService;
|
|
7
|
+
applicationMethodService: ApplicationMethodService;
|
|
8
|
+
};
|
|
9
|
+
export default class PromotionModuleService<TPromotion extends Promotion = Promotion> implements PromotionTypes.IPromotionModuleService {
|
|
10
|
+
protected readonly moduleDeclaration: InternalModuleDeclaration;
|
|
11
|
+
protected baseRepository_: DAL.RepositoryService;
|
|
12
|
+
protected promotionService_: PromotionService;
|
|
13
|
+
protected applicationMethodService_: ApplicationMethodService;
|
|
14
|
+
constructor({ baseRepository, promotionService, applicationMethodService, }: InjectedDependencies, moduleDeclaration: InternalModuleDeclaration);
|
|
15
|
+
__joinerConfig(): ModuleJoinerConfig;
|
|
16
|
+
list(filters?: PromotionTypes.FilterablePromotionProps, config?: FindConfig<PromotionTypes.PromotionDTO>, sharedContext?: Context): Promise<PromotionTypes.PromotionDTO[]>;
|
|
17
|
+
create(data: PromotionTypes.CreatePromotionDTO[], sharedContext?: Context): Promise<PromotionTypes.PromotionDTO[]>;
|
|
18
|
+
protected create_(data: PromotionTypes.CreatePromotionDTO[], sharedContext?: Context): Promise<Promotion[]>;
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=promotion-module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promotion-module.d.ts","sourceRoot":"","sources":["../../src/services/promotion-module.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,GAAG,EACH,UAAU,EACV,yBAAyB,EACzB,kBAAkB,EAClB,cAAc,EACf,MAAM,iBAAiB,CAAA;AAMxB,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AACnC,OAAO,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AAKtE,KAAK,oBAAoB,GAAG;IAC1B,cAAc,EAAE,GAAG,CAAC,iBAAiB,CAAA;IACrC,gBAAgB,EAAE,gBAAgB,CAAA;IAClC,wBAAwB,EAAE,wBAAwB,CAAA;CACnD,CAAA;AAED,MAAM,CAAC,OAAO,OAAO,sBAAsB,CACzC,UAAU,SAAS,SAAS,GAAG,SAAS,CACxC,YAAW,cAAc,CAAC,uBAAuB;IAY/C,SAAS,CAAC,QAAQ,CAAC,iBAAiB,EAAE,yBAAyB;IAVjE,SAAS,CAAC,eAAe,EAAE,GAAG,CAAC,iBAAiB,CAAA;IAChD,SAAS,CAAC,iBAAiB,EAAE,gBAAgB,CAAA;IAC7C,SAAS,CAAC,yBAAyB,EAAE,wBAAwB,CAAA;gBAG3D,EACE,cAAc,EACd,gBAAgB,EAChB,wBAAwB,GACzB,EAAE,oBAAoB,EACJ,iBAAiB,EAAE,yBAAyB;IAOjE,cAAc,IAAI,kBAAkB;IAK9B,IAAI,CACR,OAAO,GAAE,cAAc,CAAC,wBAA6B,EACrD,MAAM,GAAE,UAAU,CAAC,cAAc,CAAC,YAAY,CAAM,EACnC,aAAa,GAAE,OAAY,GAC3C,OAAO,CAAC,cAAc,CAAC,YAAY,EAAE,CAAC;IAgBnC,MAAM,CACV,IAAI,EAAE,cAAc,CAAC,kBAAkB,EAAE,EACxB,aAAa,GAAE,OAAY,GAC3C,OAAO,CAAC,cAAc,CAAC,YAAY,EAAE,CAAC;cAazB,OAAO,CACrB,IAAI,EAAE,cAAc,CAAC,kBAAkB,EAAE,EACxB,aAAa,GAAE,OAAY;CAiD/C"}
|
|
@@ -0,0 +1,88 @@
|
|
|
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 types_1 = require("@medusajs/types");
|
|
16
|
+
const utils_1 = require("@medusajs/utils");
|
|
17
|
+
const joiner_config_1 = require("../joiner-config");
|
|
18
|
+
const utils_2 = require("../utils");
|
|
19
|
+
class PromotionModuleService {
|
|
20
|
+
constructor({ baseRepository, promotionService, applicationMethodService, }, moduleDeclaration) {
|
|
21
|
+
this.moduleDeclaration = moduleDeclaration;
|
|
22
|
+
this.baseRepository_ = baseRepository;
|
|
23
|
+
this.promotionService_ = promotionService;
|
|
24
|
+
this.applicationMethodService_ = applicationMethodService;
|
|
25
|
+
}
|
|
26
|
+
__joinerConfig() {
|
|
27
|
+
return joiner_config_1.joinerConfig;
|
|
28
|
+
}
|
|
29
|
+
async list(filters = {}, config = {}, sharedContext = {}) {
|
|
30
|
+
const promotions = await this.promotionService_.list(filters, config, sharedContext);
|
|
31
|
+
return this.baseRepository_.serialize(promotions, {
|
|
32
|
+
populate: true,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
async create(data, sharedContext = {}) {
|
|
36
|
+
const promotions = await this.create_(data, sharedContext);
|
|
37
|
+
return await this.list({ id: promotions.map((p) => p.id) }, {
|
|
38
|
+
relations: ["application_method"],
|
|
39
|
+
}, sharedContext);
|
|
40
|
+
}
|
|
41
|
+
async create_(data, sharedContext = {}) {
|
|
42
|
+
const promotionCodeApplicationMethodDataMap = new Map();
|
|
43
|
+
const promotionsData = [];
|
|
44
|
+
const applicationMethodsData = [];
|
|
45
|
+
for (const { application_method: applicationMethodData, ...promotionData } of data) {
|
|
46
|
+
if (applicationMethodData) {
|
|
47
|
+
promotionCodeApplicationMethodDataMap.set(promotionData.code, applicationMethodData);
|
|
48
|
+
}
|
|
49
|
+
promotionsData.push(promotionData);
|
|
50
|
+
}
|
|
51
|
+
const createdPromotions = await this.promotionService_.create(data, sharedContext);
|
|
52
|
+
for (const promotion of createdPromotions) {
|
|
53
|
+
const data = promotionCodeApplicationMethodDataMap.get(promotion.code);
|
|
54
|
+
if (!data)
|
|
55
|
+
continue;
|
|
56
|
+
const applicationMethodData = {
|
|
57
|
+
...data,
|
|
58
|
+
promotion,
|
|
59
|
+
};
|
|
60
|
+
(0, utils_2.validateApplicationMethodAttributes)(applicationMethodData);
|
|
61
|
+
applicationMethodsData.push(applicationMethodData);
|
|
62
|
+
}
|
|
63
|
+
await this.applicationMethodService_.create(applicationMethodsData, sharedContext);
|
|
64
|
+
return createdPromotions;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
exports.default = PromotionModuleService;
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, utils_1.InjectManager)("baseRepository_"),
|
|
70
|
+
__param(2, (0, utils_1.MedusaContext)()),
|
|
71
|
+
__metadata("design:type", Function),
|
|
72
|
+
__metadata("design:paramtypes", [Object, Object, Object]),
|
|
73
|
+
__metadata("design:returntype", Promise)
|
|
74
|
+
], PromotionModuleService.prototype, "list", null);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, utils_1.InjectManager)("baseRepository_"),
|
|
77
|
+
__param(1, (0, utils_1.MedusaContext)()),
|
|
78
|
+
__metadata("design:type", Function),
|
|
79
|
+
__metadata("design:paramtypes", [Array, Object]),
|
|
80
|
+
__metadata("design:returntype", Promise)
|
|
81
|
+
], PromotionModuleService.prototype, "create", null);
|
|
82
|
+
__decorate([
|
|
83
|
+
(0, utils_1.InjectTransactionManager)("baseRepository_"),
|
|
84
|
+
__param(1, (0, utils_1.MedusaContext)()),
|
|
85
|
+
__metadata("design:type", Function),
|
|
86
|
+
__metadata("design:paramtypes", [Array, Object]),
|
|
87
|
+
__metadata("design:returntype", Promise)
|
|
88
|
+
], PromotionModuleService.prototype, "create_", null);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Context, DAL, FindConfig, PromotionTypes } from "@medusajs/types";
|
|
2
|
+
import { Promotion } from "../models";
|
|
3
|
+
import { CreatePromotionDTO, UpdatePromotionDTO } from "../types";
|
|
4
|
+
type InjectedDependencies = {
|
|
5
|
+
promotionRepository: DAL.RepositoryService;
|
|
6
|
+
};
|
|
7
|
+
export default class PromotionService<TEntity extends Promotion = Promotion> {
|
|
8
|
+
protected readonly promotionRepository_: DAL.RepositoryService;
|
|
9
|
+
constructor({ promotionRepository }: InjectedDependencies);
|
|
10
|
+
retrieve(promotionId: string, config?: FindConfig<PromotionTypes.PromotionDTO>, sharedContext?: Context): Promise<TEntity>;
|
|
11
|
+
list(filters?: PromotionTypes.FilterablePromotionProps, config?: FindConfig<PromotionTypes.PromotionDTO>, sharedContext?: Context): Promise<TEntity[]>;
|
|
12
|
+
listAndCount(filters?: PromotionTypes.FilterablePromotionProps, config?: FindConfig<PromotionTypes.PromotionDTO>, sharedContext?: Context): Promise<[TEntity[], number]>;
|
|
13
|
+
create(data: CreatePromotionDTO[], sharedContext?: Context): Promise<TEntity[]>;
|
|
14
|
+
update(data: UpdatePromotionDTO[], sharedContext?: Context): Promise<TEntity[]>;
|
|
15
|
+
delete(ids: string[], sharedContext?: Context): Promise<void>;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=promotion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promotion.d.ts","sourceRoot":"","sources":["../../src/services/promotion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAQ1E,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAEnC,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAEjE,KAAK,oBAAoB,GAAG;IAC1B,mBAAmB,EAAE,GAAG,CAAC,iBAAiB,CAAA;CAC3C,CAAA;AAED,MAAM,CAAC,OAAO,OAAO,gBAAgB,CAAC,OAAO,SAAS,SAAS,GAAG,SAAS;IACzE,SAAS,CAAC,QAAQ,CAAC,oBAAoB,EAAE,GAAG,CAAC,iBAAiB,CAAA;gBAElD,EAAE,mBAAmB,EAAE,EAAE,oBAAoB;IAKnD,QAAQ,CACZ,WAAW,EAAE,MAAM,EACnB,MAAM,GAAE,UAAU,CAAC,cAAc,CAAC,YAAY,CAAM,EACnC,aAAa,GAAE,OAAY,GAC3C,OAAO,CAAC,OAAO,CAAC;IAWb,IAAI,CACR,OAAO,GAAE,cAAc,CAAC,wBAA6B,EACrD,MAAM,GAAE,UAAU,CAAC,cAAc,CAAC,YAAY,CAAM,EACnC,aAAa,GAAE,OAAY,GAC3C,OAAO,CAAC,OAAO,EAAE,CAAC;IAUf,YAAY,CAChB,OAAO,GAAE,cAAc,CAAC,wBAA6B,EACrD,MAAM,GAAE,UAAU,CAAC,cAAc,CAAC,YAAY,CAAM,EACnC,aAAa,GAAE,OAAY,GAC3C,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,MAAM,CAAC,CAAC;IAUzB,MAAM,CACV,IAAI,EAAE,kBAAkB,EAAE,EACT,aAAa,GAAE,OAAY,GAC3C,OAAO,CAAC,OAAO,EAAE,CAAC;IAQf,MAAM,CACV,IAAI,EAAE,kBAAkB,EAAE,EACT,aAAa,GAAE,OAAY,GAC3C,OAAO,CAAC,OAAO,EAAE,CAAC;IAQf,MAAM,CACV,GAAG,EAAE,MAAM,EAAE,EACI,aAAa,GAAE,OAAY,GAC3C,OAAO,CAAC,IAAI,CAAC;CAGjB"}
|
|
@@ -0,0 +1,91 @@
|
|
|
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 types_1 = require("@medusajs/types");
|
|
16
|
+
const utils_1 = require("@medusajs/utils");
|
|
17
|
+
const _models_1 = require("../models");
|
|
18
|
+
class PromotionService {
|
|
19
|
+
constructor({ promotionRepository }) {
|
|
20
|
+
this.promotionRepository_ = promotionRepository;
|
|
21
|
+
}
|
|
22
|
+
async retrieve(promotionId, config = {}, sharedContext = {}) {
|
|
23
|
+
return (await (0, utils_1.retrieveEntity)({
|
|
24
|
+
id: promotionId,
|
|
25
|
+
entityName: _models_1.Promotion.name,
|
|
26
|
+
repository: this.promotionRepository_,
|
|
27
|
+
config,
|
|
28
|
+
sharedContext,
|
|
29
|
+
}));
|
|
30
|
+
}
|
|
31
|
+
async list(filters = {}, config = {}, sharedContext = {}) {
|
|
32
|
+
const queryOptions = utils_1.ModulesSdkUtils.buildQuery(filters, config);
|
|
33
|
+
return (await this.promotionRepository_.find(queryOptions, sharedContext));
|
|
34
|
+
}
|
|
35
|
+
async listAndCount(filters = {}, config = {}, sharedContext = {}) {
|
|
36
|
+
const queryOptions = utils_1.ModulesSdkUtils.buildQuery(filters, config);
|
|
37
|
+
return (await this.promotionRepository_.findAndCount(queryOptions, sharedContext));
|
|
38
|
+
}
|
|
39
|
+
async create(data, sharedContext = {}) {
|
|
40
|
+
return (await this.promotionRepository_.create(data, sharedContext));
|
|
41
|
+
}
|
|
42
|
+
async update(data, sharedContext = {}) {
|
|
43
|
+
return (await this.promotionRepository_.update(data, sharedContext));
|
|
44
|
+
}
|
|
45
|
+
async delete(ids, sharedContext = {}) {
|
|
46
|
+
await this.promotionRepository_.delete(ids, sharedContext);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.default = PromotionService;
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, utils_1.InjectManager)("promotionRepository_"),
|
|
52
|
+
__param(2, (0, utils_1.MedusaContext)()),
|
|
53
|
+
__metadata("design:type", Function),
|
|
54
|
+
__metadata("design:paramtypes", [String, Object, Object]),
|
|
55
|
+
__metadata("design:returntype", Promise)
|
|
56
|
+
], PromotionService.prototype, "retrieve", null);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, utils_1.InjectManager)("promotionRepository_"),
|
|
59
|
+
__param(2, (0, utils_1.MedusaContext)()),
|
|
60
|
+
__metadata("design:type", Function),
|
|
61
|
+
__metadata("design:paramtypes", [Object, Object, Object]),
|
|
62
|
+
__metadata("design:returntype", Promise)
|
|
63
|
+
], PromotionService.prototype, "list", null);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, utils_1.InjectManager)("promotionRepository_"),
|
|
66
|
+
__param(2, (0, utils_1.MedusaContext)()),
|
|
67
|
+
__metadata("design:type", Function),
|
|
68
|
+
__metadata("design:paramtypes", [Object, Object, Object]),
|
|
69
|
+
__metadata("design:returntype", Promise)
|
|
70
|
+
], PromotionService.prototype, "listAndCount", null);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, utils_1.InjectTransactionManager)("promotionRepository_"),
|
|
73
|
+
__param(1, (0, utils_1.MedusaContext)()),
|
|
74
|
+
__metadata("design:type", Function),
|
|
75
|
+
__metadata("design:paramtypes", [Array, Object]),
|
|
76
|
+
__metadata("design:returntype", Promise)
|
|
77
|
+
], PromotionService.prototype, "create", null);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, utils_1.InjectTransactionManager)("promotionRepository_"),
|
|
80
|
+
__param(1, (0, utils_1.MedusaContext)()),
|
|
81
|
+
__metadata("design:type", Function),
|
|
82
|
+
__metadata("design:paramtypes", [Array, Object]),
|
|
83
|
+
__metadata("design:returntype", Promise)
|
|
84
|
+
], PromotionService.prototype, "update", null);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, utils_1.InjectTransactionManager)("promotionRepository_"),
|
|
87
|
+
__param(1, (0, utils_1.MedusaContext)()),
|
|
88
|
+
__metadata("design:type", Function),
|
|
89
|
+
__metadata("design:paramtypes", [Array, Object]),
|
|
90
|
+
__metadata("design:returntype", Promise)
|
|
91
|
+
], PromotionService.prototype, "delete", null);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ApplicationMethodAllocation, ApplicationMethodTargetType, ApplicationMethodType, PromotionDTO } from "@medusajs/types";
|
|
2
|
+
export interface CreateApplicationMethodDTO {
|
|
3
|
+
type: ApplicationMethodType;
|
|
4
|
+
target_type: ApplicationMethodTargetType;
|
|
5
|
+
allocation?: ApplicationMethodAllocation;
|
|
6
|
+
value?: number;
|
|
7
|
+
promotion: PromotionDTO | string;
|
|
8
|
+
max_quantity?: number;
|
|
9
|
+
}
|
|
10
|
+
export interface UpdateApplicationMethodDTO {
|
|
11
|
+
id: string;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=application-method.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"application-method.d.ts","sourceRoot":"","sources":["../../src/types/application-method.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,EAC3B,qBAAqB,EACrB,YAAY,EACb,MAAM,iBAAiB,CAAA;AAExB,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,qBAAqB,CAAA;IAC3B,WAAW,EAAE,2BAA2B,CAAA;IACxC,UAAU,CAAC,EAAE,2BAA2B,CAAA;IACxC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,YAAY,GAAG,MAAM,CAAA;IAChC,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,0BAA0B;IACzC,EAAE,EAAE,MAAM,CAAA;CACX"}
|
|
@@ -0,0 +1 @@
|
|
|
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,cAAc,sBAAsB,CAAA;AACpC,cAAc,aAAa,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./application-method"), exports);
|
|
18
|
+
__exportStar(require("./promotion"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promotion.d.ts","sourceRoot":"","sources":["../../src/types/promotion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE/C,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,aAAa,CAAA;IACnB,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB;AAED,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAA;CACX"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./validations"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"application-method.d.ts","sourceRoot":"","sources":["../../../src/utils/validations/application-method.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAA;AAgBxD,wBAAgB,mCAAmC,CACjD,IAAI,EAAE,0BAA0B,QA2BjC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateApplicationMethodAttributes = void 0;
|
|
4
|
+
const utils_1 = require("@medusajs/utils");
|
|
5
|
+
const allowedTargetTypes = [
|
|
6
|
+
utils_1.ApplicationMethodTargetType.SHIPPING,
|
|
7
|
+
utils_1.ApplicationMethodTargetType.ITEM,
|
|
8
|
+
];
|
|
9
|
+
const allowedAllocationTypes = [
|
|
10
|
+
utils_1.ApplicationMethodAllocation.ACROSS,
|
|
11
|
+
utils_1.ApplicationMethodAllocation.EACH,
|
|
12
|
+
];
|
|
13
|
+
const allowedAllocationForQuantity = [
|
|
14
|
+
utils_1.ApplicationMethodAllocation.EACH,
|
|
15
|
+
];
|
|
16
|
+
function validateApplicationMethodAttributes(data) {
|
|
17
|
+
if (allowedTargetTypes.includes(data.target_type) &&
|
|
18
|
+
!allowedAllocationTypes.includes(data.allocation || "")) {
|
|
19
|
+
throw new utils_1.MedusaError(utils_1.MedusaError.Types.INVALID_DATA, `application_method.allocation should be either '${allowedAllocationTypes.join(" OR ")}' when application_method.target_type is either '${allowedTargetTypes.join(" OR ")}'`);
|
|
20
|
+
}
|
|
21
|
+
if (allowedAllocationForQuantity.includes(data.allocation || "") &&
|
|
22
|
+
!(0, utils_1.isDefined)(data.max_quantity)) {
|
|
23
|
+
throw new utils_1.MedusaError(utils_1.MedusaError.Types.INVALID_DATA, `application_method.max_quantity is required when application_method.allocation is '${allowedAllocationForQuantity.join(" OR ")}'`);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.validateApplicationMethodAttributes = validateApplicationMethodAttributes;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/validations/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./application-method"), exports);
|
package/package.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@medusajs/promotion",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Medusa Promotion module",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist"
|
|
9
|
+
],
|
|
10
|
+
"engines": {
|
|
11
|
+
"node": ">=16"
|
|
12
|
+
},
|
|
13
|
+
"bin": {
|
|
14
|
+
"medusa-promotion-migrations-down": "dist/scripts/bin/run-migration-down.js",
|
|
15
|
+
"medusa-promotion-migrations-up": "dist/scripts/bin/run-migration-up.js",
|
|
16
|
+
"medusa-promotion-seed": "dist/scripts/bin/run-seed.js"
|
|
17
|
+
},
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "https://github.com/medusajs/medusa",
|
|
21
|
+
"directory": "packages/promotion"
|
|
22
|
+
},
|
|
23
|
+
"publishConfig": {
|
|
24
|
+
"access": "public"
|
|
25
|
+
},
|
|
26
|
+
"author": "Medusa",
|
|
27
|
+
"license": "MIT",
|
|
28
|
+
"scripts": {
|
|
29
|
+
"watch": "tsc --build --watch",
|
|
30
|
+
"watch:test": "tsc --build tsconfig.spec.json --watch",
|
|
31
|
+
"prepublishOnly": "cross-env NODE_ENV=production tsc --build && tsc-alias -p tsconfig.json",
|
|
32
|
+
"build": "rimraf dist && tsc --build && tsc-alias -p tsconfig.json",
|
|
33
|
+
"test": "jest --runInBand --bail --forceExit -- src/**/__tests__/**/*.ts",
|
|
34
|
+
"test:integration": "jest --runInBand --forceExit -- integration-tests/**/__tests__/**/*.ts",
|
|
35
|
+
"migration:generate": " MIKRO_ORM_CLI=./mikro-orm.config.dev.ts mikro-orm migration:generate",
|
|
36
|
+
"migration:initial": " MIKRO_ORM_CLI=./mikro-orm.config.dev.ts mikro-orm migration:create --initial",
|
|
37
|
+
"migration:create": " MIKRO_ORM_CLI=./mikro-orm.config.dev.ts mikro-orm migration:create",
|
|
38
|
+
"migration:up": " MIKRO_ORM_CLI=./mikro-orm.config.dev.ts mikro-orm migration:up",
|
|
39
|
+
"orm:cache:clear": " MIKRO_ORM_CLI=./mikro-orm.config.dev.ts mikro-orm cache:clear"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@mikro-orm/cli": "5.7.12",
|
|
43
|
+
"cross-env": "^5.2.1",
|
|
44
|
+
"jest": "^29.6.3",
|
|
45
|
+
"medusa-test-utils": "^1.1.40",
|
|
46
|
+
"rimraf": "^3.0.2",
|
|
47
|
+
"ts-jest": "^29.1.1",
|
|
48
|
+
"ts-node": "^10.9.1",
|
|
49
|
+
"tsc-alias": "^1.8.6",
|
|
50
|
+
"typescript": "^5.1.6"
|
|
51
|
+
},
|
|
52
|
+
"dependencies": {
|
|
53
|
+
"@medusajs/modules-sdk": "^1.12.5",
|
|
54
|
+
"@medusajs/types": "^1.11.9",
|
|
55
|
+
"@medusajs/utils": "^1.11.2",
|
|
56
|
+
"@mikro-orm/core": "5.7.12",
|
|
57
|
+
"@mikro-orm/migrations": "5.7.12",
|
|
58
|
+
"@mikro-orm/postgresql": "5.7.12",
|
|
59
|
+
"awilix": "^8.0.0",
|
|
60
|
+
"dotenv": "^16.1.4",
|
|
61
|
+
"knex": "2.4.2"
|
|
62
|
+
}
|
|
63
|
+
}
|