rez_core 5.0.28 → 5.0.30
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/dist/module/entity_json/controller/entity_json.controller.d.ts +11 -1
- package/dist/module/entity_json/controller/entity_json.controller.js +14 -0
- package/dist/module/entity_json/controller/entity_json.controller.js.map +1 -1
- package/dist/module/entity_json/entity/entityJson.entity.d.ts +10 -0
- package/dist/module/entity_json/entity/entityJson.entity.js +55 -0
- package/dist/module/entity_json/entity/entityJson.entity.js.map +1 -0
- package/dist/module/entity_json/entity_json.module.js +4 -2
- package/dist/module/entity_json/entity_json.module.js.map +1 -1
- package/dist/module/entity_json/service/entityJson.repository.d.ts +7 -0
- package/dist/module/entity_json/service/entityJson.repository.js +45 -0
- package/dist/module/entity_json/service/entityJson.repository.js.map +1 -0
- package/dist/module/entity_json/service/entity_json.service.d.ts +14 -4
- package/dist/module/entity_json/service/entity_json.service.js +84 -57
- package/dist/module/entity_json/service/entity_json.service.js.map +1 -1
- package/dist/module/filter/service/filter.service.js +84 -14
- package/dist/module/filter/service/filter.service.js.map +1 -1
- package/dist/module/linked_attributes/controller/linked_attributes.controller.d.ts +2 -0
- package/dist/module/linked_attributes/controller/linked_attributes.controller.js +26 -0
- package/dist/module/linked_attributes/controller/linked_attributes.controller.js.map +1 -1
- package/dist/module/linked_attributes/entity/linked_attribute.entity.d.ts +1 -0
- package/dist/module/linked_attributes/entity/linked_attribute.entity.js +4 -0
- package/dist/module/linked_attributes/entity/linked_attribute.entity.js.map +1 -1
- package/dist/module/linked_attributes/service/linked_attributes.service.d.ts +6 -1
- package/dist/module/linked_attributes/service/linked_attributes.service.js +61 -2
- package/dist/module/linked_attributes/service/linked_attributes.service.js.map +1 -1
- package/dist/module/listmaster/service/list-master.service.js +4 -2
- package/dist/module/listmaster/service/list-master.service.js.map +1 -1
- package/dist/module/meta/controller/attribute-master.controller.d.ts +2 -3
- package/dist/module/meta/controller/attribute-master.controller.js +2 -12
- package/dist/module/meta/controller/attribute-master.controller.js.map +1 -1
- package/dist/module/meta/entity/attribute-master.entity.d.ts +1 -0
- package/dist/module/meta/entity/attribute-master.entity.js +4 -0
- package/dist/module/meta/entity/attribute-master.entity.js.map +1 -1
- package/dist/module/notification/controller/otp.controller.d.ts +1 -31
- package/dist/module/notification/service/otp.service.d.ts +1 -31
- package/dist/module/notification/service/otp.service.js +1 -0
- package/dist/module/notification/service/otp.service.js.map +1 -1
- package/dist/module/user/controller/login.controller.js +2 -1
- package/dist/module/user/controller/login.controller.js.map +1 -1
- package/dist/module/user/service/login.service.d.ts +3 -57
- package/dist/module/user/service/login.service.js +12 -2
- package/dist/module/user/service/login.service.js.map +1 -1
- package/dist/module/user/service/user.service.js +1 -1
- package/dist/module/user/service/user.service.js.map +1 -1
- package/dist/module/workflow/repository/action.repository.js +1 -0
- package/dist/module/workflow/repository/action.repository.js.map +1 -1
- package/dist/module/workflow/service/workflow-meta.service.js +1 -1
- package/dist/module/workflow/service/workflow-meta.service.js.map +1 -1
- package/dist/module/workflow-automation/service/schedule-handler.service.d.ts +11 -5
- package/dist/module/workflow-automation/service/schedule-handler.service.js +50 -18
- package/dist/module/workflow-automation/service/schedule-handler.service.js.map +1 -1
- package/dist/module/workflow-automation/service/workflow-automation-engine.service.d.ts +4 -3
- package/dist/module/workflow-automation/service/workflow-automation-engine.service.js +12 -4
- package/dist/module/workflow-automation/service/workflow-automation-engine.service.js.map +1 -1
- package/dist/module/workflow-automation/service/workflow-automation.service.js +4 -2
- package/dist/module/workflow-automation/service/workflow-automation.service.js.map +1 -1
- package/dist/module/workflow-automation/workflow-automation.module.js +6 -0
- package/dist/module/workflow-automation/workflow-automation.module.js.map +1 -1
- package/dist/module/workflow-schedule/service/workflow-schedule.service.js +1 -1
- package/dist/module/workflow-schedule/service/workflow-schedule.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/module/entity_json/controller/entity_json.controller.ts +14 -14
- package/src/module/entity_json/entity/entityJson.entity.ts +39 -0
- package/src/module/entity_json/entity_json.module.ts +5 -2
- package/src/module/entity_json/service/entityJson.repository.ts +37 -0
- package/src/module/entity_json/service/entity_json.service.ts +109 -140
- package/src/module/filter/service/filter.service.ts +109 -16
- package/src/module/linked_attributes/controller/linked_attributes.controller.ts +25 -1
- package/src/module/linked_attributes/entity/linked_attribute.entity.ts +3 -0
- package/src/module/linked_attributes/service/linked_attributes.service.ts +81 -1
- package/src/module/listmaster/service/list-master.service.ts +27 -18
- package/src/module/meta/controller/attribute-master.controller.ts +11 -13
- package/src/module/meta/entity/attribute-master.entity.ts +3 -0
- package/src/module/notification/service/otp.service.ts +1 -0
- package/src/module/user/controller/login.controller.ts +2 -1
- package/src/module/user/service/login.service.ts +25 -3
- package/src/module/user/service/user.service.ts +4 -1
- package/src/module/workflow/repository/action.repository.ts +1 -0
- package/src/module/workflow/service/workflow-meta.service.ts +1 -1
- package/src/module/workflow-automation/service/schedule-handler.service.ts +45 -26
- package/src/module/workflow-automation/service/workflow-automation-engine.service.ts +16 -6
- package/src/module/workflow-automation/service/workflow-automation.service.ts +10 -3
- package/src/module/workflow-automation/workflow-automation.module.ts +7 -0
- package/src/module/workflow-schedule/service/workflow-schedule.service.ts +1 -1
|
@@ -4,5 +4,15 @@ export declare class EntityJSONController {
|
|
|
4
4
|
constructor(entityJSONService: EntityJSONService);
|
|
5
5
|
getEntityJson(entityType: string, req: Request & {
|
|
6
6
|
user: any;
|
|
7
|
-
}, mode?: 'flat_json' | 'dropdown'): Promise<any[] | Record<string, null
|
|
7
|
+
}, mode?: 'flat_json' | 'dropdown'): Promise<any[] | Record<string, null> | {
|
|
8
|
+
flat_json: Record<string, null>;
|
|
9
|
+
attributes: {
|
|
10
|
+
mainAttributes: import("../../meta/entity/attribute-master.entity").AttributeMaster[];
|
|
11
|
+
relatedAttributes: import("../../meta/entity/attribute-master.entity").AttributeMaster[];
|
|
12
|
+
linkedAttributes: any[];
|
|
13
|
+
};
|
|
14
|
+
}>;
|
|
15
|
+
updateEntityJson(entityId: string, entityType: string, req: Request & {
|
|
16
|
+
user: any;
|
|
17
|
+
}): Promise<Record<string, null> | null>;
|
|
8
18
|
}
|
|
@@ -24,6 +24,10 @@ let EntityJSONController = class EntityJSONController {
|
|
|
24
24
|
const loggedInUser = req.user?.userData;
|
|
25
25
|
return this.entityJSONService.getAttributeForFlatJSON(entityType, loggedInUser, mode);
|
|
26
26
|
}
|
|
27
|
+
async updateEntityJson(entityId, entityType, req) {
|
|
28
|
+
const loggedInUser = req.user?.userData;
|
|
29
|
+
return this.entityJSONService.updateEntityJSON(entityType, Number(entityId), loggedInUser);
|
|
30
|
+
}
|
|
27
31
|
};
|
|
28
32
|
exports.EntityJSONController = EntityJSONController;
|
|
29
33
|
__decorate([
|
|
@@ -36,6 +40,16 @@ __decorate([
|
|
|
36
40
|
__metadata("design:paramtypes", [String, Object, String]),
|
|
37
41
|
__metadata("design:returntype", Promise)
|
|
38
42
|
], EntityJSONController.prototype, "getEntityJson", null);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, common_1.Post)('/update-json/:entityId'),
|
|
45
|
+
(0, common_1.UseGuards)(jwt_guard_1.JwtAuthGuard),
|
|
46
|
+
__param(0, (0, common_1.Param)('entityId')),
|
|
47
|
+
__param(1, (0, common_1.Query)('entityType')),
|
|
48
|
+
__param(2, (0, common_1.Req)()),
|
|
49
|
+
__metadata("design:type", Function),
|
|
50
|
+
__metadata("design:paramtypes", [String, String, Object]),
|
|
51
|
+
__metadata("design:returntype", Promise)
|
|
52
|
+
], EntityJSONController.prototype, "updateEntityJson", null);
|
|
39
53
|
exports.EntityJSONController = EntityJSONController = __decorate([
|
|
40
54
|
(0, common_1.Controller)('entity-json'),
|
|
41
55
|
__metadata("design:paramtypes", [entity_json_service_1.EntityJSONService])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity_json.controller.js","sourceRoot":"","sources":["../../../../src/module/entity_json/controller/entity_json.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAQwB;AACxB,wEAAmE;AACnE,2DAAgE;AAGzD,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAC/B,YAA6B,iBAAoC;QAApC,sBAAiB,GAAjB,iBAAiB,CAAmB;IAAG,CAAC;IAI/D,AAAN,KAAK,CAAC,aAAa,CACI,UAAkB,EAChC,GAA4B,EACpB,IAA+B;QAE9C,MAAM,YAAY,GAAG,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC;QACxC,OAAO,IAAI,CAAC,iBAAiB,CAAC,uBAAuB,CACnD,UAAU,EACV,YAAY,EACZ,IAAI,CACL,CAAC;IACJ,CAAC;
|
|
1
|
+
{"version":3,"file":"entity_json.controller.js","sourceRoot":"","sources":["../../../../src/module/entity_json/controller/entity_json.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAQwB;AACxB,wEAAmE;AACnE,2DAAgE;AAGzD,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAC/B,YAA6B,iBAAoC;QAApC,sBAAiB,GAAjB,iBAAiB,CAAmB;IAAG,CAAC;IAI/D,AAAN,KAAK,CAAC,aAAa,CACI,UAAkB,EAChC,GAA4B,EACpB,IAA+B;QAE9C,MAAM,YAAY,GAAG,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC;QACxC,OAAO,IAAI,CAAC,iBAAiB,CAAC,uBAAuB,CACnD,UAAU,EACV,YAAY,EACZ,IAAI,CACL,CAAC;IACJ,CAAC;IAIK,AAAN,KAAK,CAAC,gBAAgB,CACD,QAAgB,EACd,UAAkB,EAChC,GAA4B;QAEnC,MAAM,YAAY,GAAG,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC;QAExC,OAAO,IAAI,CAAC,iBAAiB,CAAC,gBAAgB,CAC5C,UAAU,EACV,MAAM,CAAC,QAAQ,CAAC,EAChB,YAAY,CACb,CAAC;IACJ,CAAC;CACF,CAAA;AAjCY,oDAAoB;AAKzB;IAFL,IAAA,YAAG,EAAC,cAAc,CAAC;IACnB,IAAA,kBAAS,EAAC,wBAAY,CAAC;IAErB,WAAA,IAAA,cAAK,EAAC,YAAY,CAAC,CAAA;IACnB,WAAA,IAAA,YAAG,GAAE,CAAA;IACL,WAAA,IAAA,cAAK,EAAC,MAAM,CAAC,CAAA;;;;yDAQf;AAIK;IAFL,IAAA,aAAI,EAAC,wBAAwB,CAAC;IAC9B,IAAA,kBAAS,EAAC,wBAAY,CAAC;IAErB,WAAA,IAAA,cAAK,EAAC,UAAU,CAAC,CAAA;IACjB,WAAA,IAAA,cAAK,EAAC,YAAY,CAAC,CAAA;IACnB,WAAA,IAAA,YAAG,GAAE,CAAA;;;;4DASP;+BAhCU,oBAAoB;IADhC,IAAA,mBAAU,EAAC,aAAa,CAAC;qCAEwB,uCAAiB;GADtD,oBAAoB,CAiChC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.EntityJson = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
let EntityJson = class EntityJson {
|
|
15
|
+
};
|
|
16
|
+
exports.EntityJson = EntityJson;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, typeorm_1.PrimaryGeneratedColumn)(),
|
|
19
|
+
__metadata("design:type", Number)
|
|
20
|
+
], EntityJson.prototype, "id", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, typeorm_1.Index)(),
|
|
23
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100 }),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], EntityJson.prototype, "entity_type", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typeorm_1.Index)(),
|
|
28
|
+
(0, typeorm_1.Column)({ type: 'int' }),
|
|
29
|
+
__metadata("design:type", Number)
|
|
30
|
+
], EntityJson.prototype, "entity_id", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_1.Column)({ type: 'json', nullable: false }),
|
|
33
|
+
__metadata("design:type", Object)
|
|
34
|
+
], EntityJson.prototype, "json_data", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
37
|
+
__metadata("design:type", Number)
|
|
38
|
+
], EntityJson.prototype, "created_by", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
41
|
+
__metadata("design:type", Number)
|
|
42
|
+
], EntityJson.prototype, "updated_by", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.CreateDateColumn)({ type: 'timestamp', nullable: true }),
|
|
45
|
+
__metadata("design:type", Date)
|
|
46
|
+
], EntityJson.prototype, "created_at", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, typeorm_1.UpdateDateColumn)({ type: 'timestamp', nullable: true }),
|
|
49
|
+
__metadata("design:type", Date)
|
|
50
|
+
], EntityJson.prototype, "updated_at", void 0);
|
|
51
|
+
exports.EntityJson = EntityJson = __decorate([
|
|
52
|
+
(0, typeorm_1.Entity)('frm_entity_json'),
|
|
53
|
+
(0, typeorm_1.Unique)(['entity_type', 'entity_id'])
|
|
54
|
+
], EntityJson);
|
|
55
|
+
//# sourceMappingURL=entityJson.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entityJson.entity.js","sourceRoot":"","sources":["../../../../src/module/entity_json/entity/entityJson.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAQiB;AAIV,IAAM,UAAU,GAAhB,MAAM,UAAU;CA0BtB,CAAA;AA1BY,gCAAU;AAErB;IADC,IAAA,gCAAsB,GAAE;;sCACd;AAIX;IAFC,IAAA,eAAK,GAAE;IACP,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;+CACrB;AAIpB;IAFC,IAAA,eAAK,GAAE;IACP,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;;6CACN;AAGlB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;6CACX;AAG/B;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACrB;AAGnB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACrB;AAGnB;IADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BAC5C,IAAI;8CAAC;AAGjB;IADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BAC5C,IAAI;8CAAC;qBAzBN,UAAU;IAFtB,IAAA,gBAAM,EAAC,iBAAiB,CAAC;IACzB,IAAA,gBAAM,EAAC,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;GACxB,UAAU,CA0BtB"}
|
|
@@ -14,14 +14,16 @@ const entity_json_service_1 = require("./service/entity_json.service");
|
|
|
14
14
|
const entity_json_controller_1 = require("./controller/entity_json.controller");
|
|
15
15
|
const filter_module_1 = require("../filter/filter.module");
|
|
16
16
|
const utils_module_1 = require("../../utils/utils.module");
|
|
17
|
+
const entityJson_entity_1 = require("./entity/entityJson.entity");
|
|
18
|
+
const entityJson_repository_1 = require("./service/entityJson.repository");
|
|
17
19
|
let EntityJSONModule = class EntityJSONModule {
|
|
18
20
|
};
|
|
19
21
|
exports.EntityJSONModule = EntityJSONModule;
|
|
20
22
|
exports.EntityJSONModule = EntityJSONModule = __decorate([
|
|
21
23
|
(0, common_1.Module)({
|
|
22
|
-
imports: [entity_module_1.EntityModule, typeorm_1.TypeOrmModule.forFeature([]), filter_module_1.FilterModule, utils_module_1.UtilsModule],
|
|
24
|
+
imports: [entity_module_1.EntityModule, typeorm_1.TypeOrmModule.forFeature([entityJson_entity_1.EntityJson]), filter_module_1.FilterModule, utils_module_1.UtilsModule],
|
|
23
25
|
controllers: [entity_json_controller_1.EntityJSONController],
|
|
24
|
-
providers: [entity_json_service_1.EntityJSONService],
|
|
26
|
+
providers: [entity_json_service_1.EntityJSONService, entityJson_repository_1.EntityJSONRepository],
|
|
25
27
|
exports: [],
|
|
26
28
|
})
|
|
27
29
|
], EntityJSONModule);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity_json.module.js","sourceRoot":"","sources":["../../../src/module/entity_json/entity_json.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,yDAAqD;AACrD,6CAAgD;AAChD,uEAAkE;AAClE,gFAA2E;AAC3E,2DAAuD;AACvD,2DAAqD;
|
|
1
|
+
{"version":3,"file":"entity_json.module.js","sourceRoot":"","sources":["../../../src/module/entity_json/entity_json.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,yDAAqD;AACrD,6CAAgD;AAChD,uEAAkE;AAClE,gFAA2E;AAC3E,2DAAuD;AACvD,2DAAqD;AACrD,kEAAwD;AACxD,2EAAuE;AAShE,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;CAAG,CAAA;AAAnB,4CAAgB;2BAAhB,gBAAgB;IAN5B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,4BAAY,EAAE,uBAAa,CAAC,UAAU,CAAC,CAAC,8BAAU,CAAC,CAAC,EAAC,4BAAY,EAAC,0BAAW,CAAC;QACxF,WAAW,EAAE,CAAC,6CAAoB,CAAC;QACnC,SAAS,EAAE,CAAC,uCAAiB,EAAC,4CAAoB,CAAC;QACnD,OAAO,EAAE,EAAE;KACZ,CAAC;GACW,gBAAgB,CAAG"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Repository } from "typeorm";
|
|
2
|
+
import { EntityJson } from "../entity/entityJson.entity";
|
|
3
|
+
export declare class EntityJSONRepository {
|
|
4
|
+
private readonly entityJSONRepository;
|
|
5
|
+
constructor(entityJSONRepository: Repository<EntityJson>);
|
|
6
|
+
create(flatJson: Partial<EntityJson>): Promise<EntityJson | null>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
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
|
+
exports.EntityJSONRepository = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
18
|
+
const typeorm_2 = require("typeorm");
|
|
19
|
+
const entityJson_entity_1 = require("../entity/entityJson.entity");
|
|
20
|
+
let EntityJSONRepository = class EntityJSONRepository {
|
|
21
|
+
constructor(entityJSONRepository) {
|
|
22
|
+
this.entityJSONRepository = entityJSONRepository;
|
|
23
|
+
}
|
|
24
|
+
async create(flatJson) {
|
|
25
|
+
const { entity_type, entity_id } = flatJson;
|
|
26
|
+
const existing = await this.entityJSONRepository.findOne({
|
|
27
|
+
where: { entity_type, entity_id },
|
|
28
|
+
});
|
|
29
|
+
if (existing) {
|
|
30
|
+
await this.entityJSONRepository.update(existing.id, flatJson);
|
|
31
|
+
return this.entityJSONRepository.findOne({
|
|
32
|
+
where: { id: existing.id },
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
const created = this.entityJSONRepository.create(flatJson);
|
|
36
|
+
return this.entityJSONRepository.save(created);
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
exports.EntityJSONRepository = EntityJSONRepository;
|
|
40
|
+
exports.EntityJSONRepository = EntityJSONRepository = __decorate([
|
|
41
|
+
(0, common_1.Injectable)(),
|
|
42
|
+
__param(0, (0, typeorm_1.InjectRepository)(entityJson_entity_1.EntityJson)),
|
|
43
|
+
__metadata("design:paramtypes", [typeorm_2.Repository])
|
|
44
|
+
], EntityJSONRepository);
|
|
45
|
+
//# sourceMappingURL=entityJson.repository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entityJson.repository.js","sourceRoot":"","sources":["../../../../src/module/entity_json/service/entityJson.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,6CAAmD;AACnD,qCAAqC;AACrC,mEAAyD;AAKlD,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAC/B,YAEmB,oBAA4C;QAA5C,yBAAoB,GAApB,oBAAoB,CAAwB;IAC5D,CAAC;IAEJ,KAAK,CAAC,MAAM,CAAC,QAA6B;QACxC,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,GAAG,QAAQ,CAAC;QAG5C,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC;YACvD,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE;SAClC,CAAC,CAAC;QAEH,IAAI,QAAQ,EAAE,CAAC;YAEb,MAAM,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC;YAG9D,OAAO,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC;gBACvC,KAAK,EAAE,EAAE,EAAE,EAAE,QAAQ,CAAC,EAAE,EAAE;aAC3B,CAAC,CAAC;QACL,CAAC;QAGD,MAAM,OAAO,GAAG,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QAC3D,OAAO,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACjD,CAAC;CACF,CAAA;AA5BY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,0BAAgB,EAAC,8BAAU,CAAC,CAAA;qCACU,oBAAU;GAHxC,oBAAoB,CA4BhC"}
|
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
import { FilterService } from 'src/module/filter/service/filter.service';
|
|
2
|
+
import { AttributeMaster } from 'src/module/meta/entity/attribute-master.entity';
|
|
2
3
|
import { EntityServiceImpl } from 'src/module/meta/service/entity-service-impl.service';
|
|
3
4
|
import { LoggingService } from 'src/utils/service/loggingUtil.service';
|
|
4
5
|
import { DataSource } from 'typeorm';
|
|
6
|
+
import { EntityJSONRepository } from './entityJson.repository';
|
|
5
7
|
export declare class EntityJSONService extends EntityServiceImpl {
|
|
6
8
|
private readonly dataSource;
|
|
7
9
|
private readonly filterService;
|
|
8
10
|
private readonly loggerService;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
private readonly EntityJSONRepository;
|
|
12
|
+
constructor(dataSource: DataSource, filterService: FilterService, loggerService: LoggingService, EntityJSONRepository: EntityJSONRepository);
|
|
13
|
+
getAttributeForFlatJSON(entityType: string, loggedInUser: any, flag?: 'flat_json' | 'dropdown' | 'all'): Promise<any[] | Record<string, null> | {
|
|
14
|
+
flat_json: Record<string, null>;
|
|
15
|
+
attributes: {
|
|
16
|
+
mainAttributes: AttributeMaster[];
|
|
17
|
+
relatedAttributes: AttributeMaster[];
|
|
18
|
+
linkedAttributes: any[];
|
|
19
|
+
};
|
|
20
|
+
}>;
|
|
21
|
+
updateEntityJSON(entityType: string, entityId: number, loggedInUser: any): Promise<Record<string, null> | null>;
|
|
22
|
+
private mergeEntityDataIntoFlatJson;
|
|
13
23
|
private applyLinkedFilterUsingSavedFilter;
|
|
14
24
|
}
|
|
@@ -12,17 +12,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.EntityJSONService = void 0;
|
|
13
13
|
const common_1 = require("@nestjs/common");
|
|
14
14
|
const filter_service_1 = require("../../filter/service/filter.service");
|
|
15
|
+
const linked_attribute_entity_1 = require("../../linked_attributes/entity/linked_attribute.entity");
|
|
15
16
|
const attribute_master_entity_1 = require("../../meta/entity/attribute-master.entity");
|
|
16
17
|
const entity_relation_entity_1 = require("../../meta/entity/entity-relation.entity");
|
|
17
18
|
const entity_service_impl_service_1 = require("../../meta/service/entity-service-impl.service");
|
|
18
19
|
const loggingUtil_service_1 = require("../../../utils/service/loggingUtil.service");
|
|
19
20
|
const typeorm_1 = require("typeorm");
|
|
21
|
+
const entityJson_repository_1 = require("./entityJson.repository");
|
|
20
22
|
let EntityJSONService = class EntityJSONService extends entity_service_impl_service_1.EntityServiceImpl {
|
|
21
|
-
constructor(dataSource, filterService, loggerService) {
|
|
23
|
+
constructor(dataSource, filterService, loggerService, EntityJSONRepository) {
|
|
22
24
|
super();
|
|
23
25
|
this.dataSource = dataSource;
|
|
24
26
|
this.filterService = filterService;
|
|
25
27
|
this.loggerService = loggerService;
|
|
28
|
+
this.EntityJSONRepository = EntityJSONRepository;
|
|
26
29
|
}
|
|
27
30
|
async getAttributeForFlatJSON(entityType, loggedInUser, flag) {
|
|
28
31
|
const orgId = loggedInUser.organization_id;
|
|
@@ -30,7 +33,7 @@ let EntityJSONService = class EntityJSONService extends entity_service_impl_serv
|
|
|
30
33
|
const mainAttributes = await this.dataSource
|
|
31
34
|
.getRepository(attribute_master_entity_1.AttributeMaster)
|
|
32
35
|
.createQueryBuilder('attr')
|
|
33
|
-
.select(['attr.id', 'attr.name', 'attr.attribute_key'])
|
|
36
|
+
.select(['attr.id', 'attr.name', 'attr.flat_json_key', 'attr.attribute_key'])
|
|
34
37
|
.where('attr.mapped_entity_type = :entityType', { entityType })
|
|
35
38
|
.andWhere('attr.organization_id = :orgId', { orgId })
|
|
36
39
|
.getMany();
|
|
@@ -49,53 +52,69 @@ let EntityJSONService = class EntityJSONService extends entity_service_impl_serv
|
|
|
49
52
|
? await this.dataSource
|
|
50
53
|
.getRepository(attribute_master_entity_1.AttributeMaster)
|
|
51
54
|
.createQueryBuilder('attr')
|
|
52
|
-
.select(['attr.id', 'attr.name', 'attr.
|
|
55
|
+
.select(['attr.id', 'attr.name', 'attr.flat_json_key', 'attr.mapped_entity_type', 'attr.attribute_key'])
|
|
53
56
|
.where('attr.mapped_entity_type IN (:...types)', { types: relatedTypesList })
|
|
54
57
|
.andWhere('attr.organization_id = :orgId', { orgId })
|
|
55
58
|
.getMany()
|
|
56
59
|
: [];
|
|
57
60
|
await this.loggerService.log('debug', 'EntityJSONService', 'getAttributeForFlatJSON', `Loaded ${relatedAttributes.length} related attributes`);
|
|
58
61
|
const linkedAttributes = await this.dataSource
|
|
59
|
-
.getRepository(
|
|
62
|
+
.getRepository(linked_attribute_entity_1.LinkedAttributes)
|
|
60
63
|
.createQueryBuilder('fla')
|
|
61
64
|
.innerJoin(attribute_master_entity_1.AttributeMaster, 'attr', 'fla.applicable_entity_type = attr.mapped_entity_type AND fla.applicable_attribute_key = attr.attribute_key')
|
|
62
65
|
.select([
|
|
63
|
-
'fla.applicable_entity_type',
|
|
64
|
-
'
|
|
65
|
-
'
|
|
66
|
-
'
|
|
66
|
+
'fla.applicable_entity_type AS applicable_entity_type',
|
|
67
|
+
'fla.applicable_attribute_key AS applicable_attribute_key',
|
|
68
|
+
'fla.attribute_key AS target_attribute_key',
|
|
69
|
+
'fla.saved_filter_code AS saved_filter_code',
|
|
70
|
+
'attr.name AS name',
|
|
71
|
+
'attr.id AS id',
|
|
67
72
|
])
|
|
68
73
|
.where('attr.organization_id = :orgId', { orgId })
|
|
69
74
|
.getRawMany();
|
|
70
75
|
await this.loggerService.log('debug', 'EntityJSONService', 'getAttributeForFlatJSON', `Loaded ${linkedAttributes.length} linked attributes`);
|
|
71
|
-
if (flag === 'flat_json') {
|
|
76
|
+
if (flag === 'flat_json' || flag === 'all') {
|
|
72
77
|
const result = {};
|
|
73
|
-
mainAttributes.forEach(attr => { if (attr.
|
|
74
|
-
result[attr.
|
|
75
|
-
relatedAttributes.forEach(attr => { if (attr.
|
|
76
|
-
result[attr.
|
|
77
|
-
linkedAttributes.forEach(link => { if (link.
|
|
78
|
-
result[link.
|
|
78
|
+
mainAttributes.forEach(attr => { if (attr.flat_json_key)
|
|
79
|
+
result[attr.flat_json_key] = null; });
|
|
80
|
+
relatedAttributes.forEach(attr => { if (attr.flat_json_key)
|
|
81
|
+
result[attr.flat_json_key] = null; });
|
|
82
|
+
linkedAttributes.forEach(link => { if (link.target_attribute_key)
|
|
83
|
+
result[link.target_attribute_key] = null; });
|
|
84
|
+
if (flag === 'all') {
|
|
85
|
+
return { flat_json: result, attributes: { mainAttributes, relatedAttributes, linkedAttributes } };
|
|
86
|
+
}
|
|
79
87
|
return result;
|
|
80
88
|
}
|
|
81
89
|
const dropdown = [];
|
|
82
|
-
dropdown.push(...mainAttributes.map(a => ({ label: a.name, value: a.
|
|
83
|
-
dropdown.push(...relatedAttributes.map(a => ({ label: a.name, value: a.
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}
|
|
90
|
+
dropdown.push(...mainAttributes.map(a => ({ label: a.name, value: a.flat_json_key })));
|
|
91
|
+
dropdown.push(...relatedAttributes.map(a => ({ label: a.name, value: a.flat_json_key })));
|
|
92
|
+
if (linkedAttributes.length > 0) {
|
|
93
|
+
dropdown.push(...linkedAttributes.map(a => ({ label: a.name, value: a.attribute_key })));
|
|
94
|
+
}
|
|
87
95
|
return dropdown;
|
|
88
96
|
}
|
|
89
97
|
async updateEntityJSON(entityType, entityId, loggedInUser) {
|
|
90
98
|
await this.loggerService.log('info', 'EntityJSONService', 'updateEntityJSON', `Building flat JSON for entity: ${entityType}#${entityId}`);
|
|
91
|
-
const
|
|
92
|
-
if (!
|
|
93
|
-
await this.loggerService.log('error', 'EntityJSONService', 'updateEntityJSON', `
|
|
94
|
-
|
|
99
|
+
const response = await this.getAttributeForFlatJSON(entityType, loggedInUser, 'all');
|
|
100
|
+
if (!response || !('flat_json' in response) || !('attributes' in response) || !response.attributes) {
|
|
101
|
+
await this.loggerService.log('error', 'EntityJSONService', 'updateEntityJSON', `getAttributeForFlatJSON() did not return expected structure`);
|
|
102
|
+
return null;
|
|
95
103
|
}
|
|
104
|
+
const { flat_json: flatJson, attributes } = response;
|
|
105
|
+
if (!flatJson)
|
|
106
|
+
return null;
|
|
107
|
+
const safeAttributes = {
|
|
108
|
+
mainAttributes: attributes.mainAttributes || [],
|
|
109
|
+
relatedAttributes: attributes.relatedAttributes || [],
|
|
110
|
+
linkedAttributes: attributes.linkedAttributes || [],
|
|
111
|
+
};
|
|
112
|
+
const attrMap = {};
|
|
113
|
+
const allAttrs = [...safeAttributes.mainAttributes, ...safeAttributes.relatedAttributes];
|
|
114
|
+
allAttrs.forEach(attr => { if (attr.attribute_key)
|
|
115
|
+
attrMap[attr.attribute_key] = attr.flat_json_key || attr.attribute_key; });
|
|
96
116
|
const mainData = await this.getResolvedEntityData(entityType, entityId, loggedInUser);
|
|
97
|
-
this.
|
|
98
|
-
await this.loggerService.log('debug', 'EntityJSONService', 'updateEntityJSON', 'Merged main entity data into flat JSON');
|
|
117
|
+
this.mergeEntityDataIntoFlatJson(flatJson, mainData, attrMap);
|
|
99
118
|
const relations = await this.dataSource
|
|
100
119
|
.getRepository('frm_entity_relation_data')
|
|
101
120
|
.createQueryBuilder('erd')
|
|
@@ -104,38 +123,46 @@ let EntityJSONService = class EntityJSONService extends entity_service_impl_serv
|
|
|
104
123
|
.andWhere('erd.source_entity_id = :entityId', { entityId })
|
|
105
124
|
.andWhere('erd.relation_type = :rt', { rt: 'ONE_TO_ONE' })
|
|
106
125
|
.getRawMany();
|
|
107
|
-
await this.loggerService.log('debug', 'EntityJSONService', 'updateEntityJSON', `Found ${relations.length} ONE-TO-ONE relations`);
|
|
108
126
|
for (const rel of relations) {
|
|
109
|
-
const
|
|
110
|
-
this.
|
|
111
|
-
await this.loggerService.log('debug', 'EntityJSONService', 'updateEntityJSON', `Merged related entity ${rel.target_entity_type}#${rel.target_entity_id}`);
|
|
127
|
+
const relatedData = await this.getResolvedEntityData(rel.target_entity_type, rel.target_entity_id, loggedInUser);
|
|
128
|
+
this.mergeEntityDataIntoFlatJson(flatJson, relatedData, attrMap);
|
|
112
129
|
}
|
|
113
|
-
const
|
|
114
|
-
.
|
|
115
|
-
.
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
const
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
130
|
+
for (const linkAttr of safeAttributes.linkedAttributes) {
|
|
131
|
+
const childEntityType = linkAttr.applicable_entity_type;
|
|
132
|
+
const sourceKey = linkAttr.applicable_attribute_key;
|
|
133
|
+
const targetKey = linkAttr.target_attribute_key;
|
|
134
|
+
if (!childEntityType || !sourceKey || !targetKey)
|
|
135
|
+
continue;
|
|
136
|
+
const mappingValue = mainData?.[sourceKey] ?? null;
|
|
137
|
+
const value = await this.applyLinkedFilterUsingSavedFilter(childEntityType, linkAttr.saved_filter_code, sourceKey, mappingValue, targetKey, loggedInUser, entityId);
|
|
138
|
+
if (value !== null && value !== undefined) {
|
|
139
|
+
flatJson[targetKey] = value;
|
|
140
|
+
}
|
|
124
141
|
}
|
|
125
|
-
await this.
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
142
|
+
await this.loggerService.log('info', 'EntityJSONService', 'updateEntityJSON', `Saving flat JSON for entity: ${entityType}#${entityId}`);
|
|
143
|
+
let JsonData = {
|
|
144
|
+
entity_type: entityType,
|
|
145
|
+
entity_id: entityId,
|
|
146
|
+
json_data: flatJson,
|
|
147
|
+
created_by: loggedInUser.id,
|
|
148
|
+
};
|
|
149
|
+
await this.EntityJSONRepository.create(JsonData);
|
|
129
150
|
return flatJson;
|
|
130
151
|
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
152
|
+
mergeEntityDataIntoFlatJson(flatJson, entityData, attrMap) {
|
|
153
|
+
const records = Array.isArray(entityData) ? entityData : [entityData];
|
|
154
|
+
for (const record of records) {
|
|
155
|
+
if (!record || typeof record !== 'object')
|
|
156
|
+
continue;
|
|
157
|
+
for (const key of Object.keys(record)) {
|
|
158
|
+
const flatKey = attrMap[key] || key;
|
|
159
|
+
if (flatJson.hasOwnProperty(flatKey)) {
|
|
160
|
+
flatJson[flatKey] = record[key];
|
|
161
|
+
}
|
|
135
162
|
}
|
|
136
163
|
}
|
|
137
164
|
}
|
|
138
|
-
async applyLinkedFilterUsingSavedFilter(childEntityType, savedFilterCode, childFilterAttribute, mappingValue, targetAttribute, loggedInUser) {
|
|
165
|
+
async applyLinkedFilterUsingSavedFilter(childEntityType, savedFilterCode, childFilterAttribute, mappingValue, targetAttribute, loggedInUser, entity_id) {
|
|
139
166
|
if (!savedFilterCode && (mappingValue === null || mappingValue === undefined))
|
|
140
167
|
return null;
|
|
141
168
|
const dto = {
|
|
@@ -147,16 +174,15 @@ let EntityJSONService = class EntityJSONService extends entity_service_impl_serv
|
|
|
147
174
|
};
|
|
148
175
|
if (mappingValue !== null && mappingValue !== undefined && mappingValue !== '') {
|
|
149
176
|
dto.quickFilter = [
|
|
150
|
-
{
|
|
151
|
-
filter_attribute: childFilterAttribute,
|
|
152
|
-
filter_operator: 'equal',
|
|
153
|
-
filter_value: mappingValue,
|
|
154
|
-
}
|
|
177
|
+
{ filter_attribute: childFilterAttribute, filter_operator: 'equal', filter_value: mappingValue },
|
|
155
178
|
];
|
|
156
179
|
}
|
|
180
|
+
dto.quickFilter = [
|
|
181
|
+
{ filter_attribute: 'parent_id', filter_operator: 'equal', filter_value: [entity_id] },
|
|
182
|
+
];
|
|
157
183
|
const result = await this.filterService.applyFilter(dto);
|
|
158
184
|
const rows = result?.data?.entity_list || [];
|
|
159
|
-
return rows.length ? rows[0][
|
|
185
|
+
return rows.length ? (rows[0][childFilterAttribute] ?? null) : null;
|
|
160
186
|
}
|
|
161
187
|
};
|
|
162
188
|
exports.EntityJSONService = EntityJSONService;
|
|
@@ -164,6 +190,7 @@ exports.EntityJSONService = EntityJSONService = __decorate([
|
|
|
164
190
|
(0, common_1.Injectable)(),
|
|
165
191
|
__metadata("design:paramtypes", [typeorm_1.DataSource,
|
|
166
192
|
filter_service_1.FilterService,
|
|
167
|
-
loggingUtil_service_1.LoggingService
|
|
193
|
+
loggingUtil_service_1.LoggingService,
|
|
194
|
+
entityJson_repository_1.EntityJSONRepository])
|
|
168
195
|
], EntityJSONService);
|
|
169
196
|
//# sourceMappingURL=entity_json.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity_json.service.js","sourceRoot":"","sources":["../../../../src/module/entity_json/service/entity_json.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,wEAAyE;AACzE,uFAAiF;AACjF,qFAA+E;AAC/E,gGAAwF;AACxF,oFAAuE;AACvE,qCAAqC;
|
|
1
|
+
{"version":3,"file":"entity_json.service.js","sourceRoot":"","sources":["../../../../src/module/entity_json/service/entity_json.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,wEAAyE;AACzE,oGAA+F;AAC/F,uFAAiF;AACjF,qFAA+E;AAC/E,gGAAwF;AACxF,oFAAuE;AACvE,qCAAqC;AACrC,mEAA+D;AAGxD,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,+CAAiB;IACtD,YACmB,UAAsB,EACtB,aAA4B,EAC5B,aAA6B,EAC7B,oBAAyC;QAE1D,KAAK,EAAE,CAAC;QALS,eAAU,GAAV,UAAU,CAAY;QACtB,kBAAa,GAAb,aAAa,CAAe;QAC5B,kBAAa,GAAb,aAAa,CAAgB;QAC7B,yBAAoB,GAApB,oBAAoB,CAAqB;IAG5D,CAAC;IAED,KAAK,CAAC,uBAAuB,CAC3B,UAAkB,EAClB,YAAiB,EACjB,IAAuC;QAEvC,MAAM,KAAK,GAAG,YAAY,CAAC,eAAe,CAAC;QAE3C,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,MAAM,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,kCAAkC,UAAU,UAAU,KAAK,EAAE,CAAC,CAAC;QAEpJ,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,UAAU;aACzC,aAAa,CAAC,yCAAe,CAAC;aAC9B,kBAAkB,CAAC,MAAM,CAAC;aAC1B,MAAM,CAAC,CAAC,SAAS,EAAE,WAAW,EAAE,oBAAoB,EAAE,oBAAoB,CAAC,CAAC;aAC5E,KAA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