rez_core 6.5.123 → 7.0.0
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/.claude/settings.local.json +26 -0
- package/.idea/250218_nodejs_core.iml +9 -0
- package/.idea/codeStyles/Project.xml +59 -0
- package/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/.idea/copilot.data.migration.agent.xml +6 -0
- package/.idea/copilot.data.migration.ask.xml +6 -0
- package/.idea/copilot.data.migration.ask2agent.xml +6 -0
- package/.idea/copilot.data.migration.edit.xml +6 -0
- package/.idea/inspectionProfiles/Project_Default.xml +6 -0
- package/.idea/misc.xml +6 -0
- package/.idea/modules.xml +8 -0
- package/.idea/prettier.xml +6 -0
- package/.idea/vcs.xml +6 -0
- package/dist/constant/db-data-type.constant.js +2 -0
- package/dist/constant/db-data-type.constant.js.map +1 -1
- package/dist/module/auth/auth.module.d.ts +6 -1
- package/dist/module/auth/auth.module.js +28 -1
- package/dist/module/auth/auth.module.js.map +1 -1
- package/dist/module/auth/strategies/jwt.strategy.d.ts +4 -1
- package/dist/module/auth/strategies/jwt.strategy.js +17 -4
- package/dist/module/auth/strategies/jwt.strategy.js.map +1 -1
- package/dist/module/entity_json/controller/entity_json.controller.d.ts +2 -12
- package/dist/module/entity_json/controller/entity_json.controller.js +7 -21
- package/dist/module/entity_json/controller/entity_json.controller.js.map +1 -1
- package/dist/module/entity_json/entity/entityJson.entity.d.ts +2 -1
- package/dist/module/entity_json/entity/entityJson.entity.js +5 -1
- package/dist/module/entity_json/entity/entityJson.entity.js.map +1 -1
- package/dist/module/entity_json/entity_json.module.js +7 -2
- package/dist/module/entity_json/entity_json.module.js.map +1 -1
- package/dist/module/entity_json/service/entity_json.service.d.ts +12 -11
- package/dist/module/entity_json/service/entity_json.service.js +168 -36
- package/dist/module/entity_json/service/entity_json.service.js.map +1 -1
- package/dist/module/linked_attributes/controller/linked_attributes.controller.d.ts +42 -0
- package/dist/module/linked_attributes/controller/linked_attributes.controller.js +90 -0
- package/dist/module/linked_attributes/controller/linked_attributes.controller.js.map +1 -1
- package/dist/module/linked_attributes/dto/create-linked-attribute-smart.dto.d.ts +13 -0
- package/dist/module/linked_attributes/dto/create-linked-attribute-smart.dto.js +64 -0
- package/dist/module/linked_attributes/dto/create-linked-attribute-smart.dto.js.map +1 -0
- 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/linked_attributes.module.js +8 -1
- package/dist/module/linked_attributes/linked_attributes.module.js.map +1 -1
- package/dist/module/linked_attributes/service/linked_attributes.service.d.ts +65 -1
- package/dist/module/linked_attributes/service/linked_attributes.service.js +286 -2
- package/dist/module/linked_attributes/service/linked_attributes.service.js.map +1 -1
- package/dist/module/meta/entity/dynamic.entity.js +12 -2
- package/dist/module/meta/entity/dynamic.entity.js.map +1 -1
- package/dist/module/meta/entity/entity-master.entity.d.ts +1 -1
- package/dist/module/meta/entity/entity-master.entity.js +4 -4
- package/dist/module/meta/entity/entity-master.entity.js.map +1 -1
- package/dist/module/meta/repository/attribute-master.repository.d.ts +1 -0
- package/dist/module/meta/repository/attribute-master.repository.js +10 -0
- package/dist/module/meta/repository/attribute-master.repository.js.map +1 -1
- package/dist/module/meta/repository/entity-relation.repository.d.ts +1 -0
- package/dist/module/meta/repository/entity-relation.repository.js +10 -0
- package/dist/module/meta/repository/entity-relation.repository.js.map +1 -1
- package/dist/module/meta/service/attribute-master.service.d.ts +1 -0
- package/dist/module/meta/service/attribute-master.service.js +8 -3
- package/dist/module/meta/service/attribute-master.service.js.map +1 -1
- package/dist/module/meta/service/entity-dynamic.service.d.ts +2 -2
- package/dist/module/meta/service/entity-dynamic.service.js +39 -16
- package/dist/module/meta/service/entity-dynamic.service.js.map +1 -1
- package/dist/module/meta/service/entity-master.service.d.ts +2 -2
- package/dist/module/meta/service/entity-master.service.js +34 -35
- package/dist/module/meta/service/entity-master.service.js.map +1 -1
- package/dist/module/meta/service/entity-relation.service.d.ts +3 -1
- package/dist/module/meta/service/entity-relation.service.js +3 -0
- package/dist/module/meta/service/entity-relation.service.js.map +1 -1
- package/dist/module/meta/service/entity-service-impl.service.d.ts +1 -1
- package/dist/module/meta/service/entity-service-impl.service.js +1 -1
- package/dist/module/meta/service/entity-service-impl.service.js.map +1 -1
- package/dist/module/meta/service/entity.service.d.ts +1 -1
- package/dist/module/meta/service/resolver.service.js +1 -1
- package/dist/module/meta/service/resolver.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -1
- package/server.log +850 -0
- package/src/constant/db-data-type.constant.ts +2 -0
- package/src/module/auth/auth.module.ts +32 -4
- package/src/module/auth/strategies/jwt.strategy.ts +22 -18
- package/src/module/entity_json/controller/entity_json.controller.ts +52 -24
- package/src/module/entity_json/docs/FlatJson_Filterin_System.md +2804 -0
- package/src/module/entity_json/entity/entityJson.entity.ts +4 -1
- package/src/module/entity_json/entity_json.module.ts +9 -5
- package/src/module/entity_json/service/entity_json.service.ts +315 -69
- package/src/module/linked_attributes/controller/linked_attributes.controller.ts +100 -0
- package/src/module/linked_attributes/dto/create-linked-attribute-smart.dto.ts +54 -0
- package/src/module/linked_attributes/entity/linked_attribute.entity.ts +3 -0
- package/src/module/linked_attributes/linked_attributes.module.ts +9 -2
- package/src/module/linked_attributes/service/linked_attributes.service.ts +578 -3
- package/src/module/linked_attributes/test/linked-attributes.service.spec.ts +244 -0
- package/src/module/meta/entity/dynamic.entity.ts +2 -0
- package/src/module/meta/entity/entity-master.entity.ts +3 -3
- package/src/module/meta/repository/attribute-master.repository.ts +16 -1
- package/src/module/meta/repository/entity-relation.repository.ts +16 -2
- package/src/module/meta/service/attribute-master.service.ts +23 -11
- package/src/module/meta/service/entity-dynamic.service.ts +45 -21
- package/src/module/meta/service/entity-master.service.ts +41 -44
- package/src/module/meta/service/entity-relation.service.ts +12 -1
- package/src/module/meta/service/entity-service-impl.service.ts +1 -0
- package/src/module/meta/service/entity.service.ts +1 -0
- package/src/module/meta/service/resolver.service.ts +1 -1
- package/src/resources/dev.properties.yaml +3 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"Bash(npm run build:*)",
|
|
5
|
+
"Bash(npm install)",
|
|
6
|
+
"Bash(npm run lint)",
|
|
7
|
+
"Bash(npm install:*)",
|
|
8
|
+
"Bash(curl:*)",
|
|
9
|
+
"Bash(npm run start:dev:*)",
|
|
10
|
+
"Bash(mkdir:*)",
|
|
11
|
+
"Bash(lsof:*)",
|
|
12
|
+
"Bash(kill:*)",
|
|
13
|
+
"Bash(npx eslint:*)",
|
|
14
|
+
"Read(/Users/admin/yash/**)",
|
|
15
|
+
"Bash(timeout 15 npm run start:dev)",
|
|
16
|
+
"Read(/Users/admin/yash/**)",
|
|
17
|
+
"Bash(find:*)",
|
|
18
|
+
"Bash(sed:*)",
|
|
19
|
+
"Bash(git checkout:*)",
|
|
20
|
+
"Read(//Users/admin/yash/**)",
|
|
21
|
+
"Bash(npx tsc:*)"
|
|
22
|
+
],
|
|
23
|
+
"deny": [],
|
|
24
|
+
"ask": []
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<module type="JAVA_MODULE" version="4">
|
|
3
|
+
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
|
4
|
+
<exclude-output />
|
|
5
|
+
<content url="file://$MODULE_DIR$" />
|
|
6
|
+
<orderEntry type="inheritedJdk" />
|
|
7
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
|
8
|
+
</component>
|
|
9
|
+
</module>
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<component name="ProjectCodeStyleConfiguration">
|
|
2
|
+
<code_scheme name="Project" version="173">
|
|
3
|
+
<HTMLCodeStyleSettings>
|
|
4
|
+
<option name="HTML_SPACE_INSIDE_EMPTY_TAG" value="true" />
|
|
5
|
+
</HTMLCodeStyleSettings>
|
|
6
|
+
<JSCodeStyleSettings version="0">
|
|
7
|
+
<option name="FORCE_SEMICOLON_STYLE" value="true" />
|
|
8
|
+
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
|
|
9
|
+
<option name="USE_DOUBLE_QUOTES" value="false" />
|
|
10
|
+
<option name="FORCE_QUOTE_STYlE" value="true" />
|
|
11
|
+
<option name="ENFORCE_TRAILING_COMMA" value="WhenMultiline" />
|
|
12
|
+
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
|
|
13
|
+
<option name="SPACES_WITHIN_IMPORTS" value="true" />
|
|
14
|
+
</JSCodeStyleSettings>
|
|
15
|
+
<TypeScriptCodeStyleSettings version="0">
|
|
16
|
+
<option name="FORCE_SEMICOLON_STYLE" value="true" />
|
|
17
|
+
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
|
|
18
|
+
<option name="USE_DOUBLE_QUOTES" value="false" />
|
|
19
|
+
<option name="FORCE_QUOTE_STYlE" value="true" />
|
|
20
|
+
<option name="ENFORCE_TRAILING_COMMA" value="WhenMultiline" />
|
|
21
|
+
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
|
|
22
|
+
<option name="SPACES_WITHIN_IMPORTS" value="true" />
|
|
23
|
+
</TypeScriptCodeStyleSettings>
|
|
24
|
+
<VueCodeStyleSettings>
|
|
25
|
+
<option name="INTERPOLATION_NEW_LINE_AFTER_START_DELIMITER" value="false" />
|
|
26
|
+
<option name="INTERPOLATION_NEW_LINE_BEFORE_END_DELIMITER" value="false" />
|
|
27
|
+
</VueCodeStyleSettings>
|
|
28
|
+
<codeStyleSettings language="HTML">
|
|
29
|
+
<option name="SOFT_MARGINS" value="80" />
|
|
30
|
+
<indentOptions>
|
|
31
|
+
<option name="INDENT_SIZE" value="2" />
|
|
32
|
+
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
33
|
+
<option name="TAB_SIZE" value="2" />
|
|
34
|
+
</indentOptions>
|
|
35
|
+
</codeStyleSettings>
|
|
36
|
+
<codeStyleSettings language="JavaScript">
|
|
37
|
+
<option name="SOFT_MARGINS" value="80" />
|
|
38
|
+
<indentOptions>
|
|
39
|
+
<option name="INDENT_SIZE" value="2" />
|
|
40
|
+
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
41
|
+
<option name="TAB_SIZE" value="2" />
|
|
42
|
+
</indentOptions>
|
|
43
|
+
</codeStyleSettings>
|
|
44
|
+
<codeStyleSettings language="TypeScript">
|
|
45
|
+
<option name="SOFT_MARGINS" value="80" />
|
|
46
|
+
<indentOptions>
|
|
47
|
+
<option name="INDENT_SIZE" value="2" />
|
|
48
|
+
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
49
|
+
<option name="TAB_SIZE" value="2" />
|
|
50
|
+
</indentOptions>
|
|
51
|
+
</codeStyleSettings>
|
|
52
|
+
<codeStyleSettings language="Vue">
|
|
53
|
+
<option name="SOFT_MARGINS" value="80" />
|
|
54
|
+
<indentOptions>
|
|
55
|
+
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
56
|
+
</indentOptions>
|
|
57
|
+
</codeStyleSettings>
|
|
58
|
+
</code_scheme>
|
|
59
|
+
</component>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<component name="InspectionProjectProfileManager">
|
|
2
|
+
<profile version="1.0">
|
|
3
|
+
<option name="myName" value="Project Default" />
|
|
4
|
+
<inspection_tool class="SqlNoDataSourceInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
5
|
+
</profile>
|
|
6
|
+
</component>
|
package/.idea/misc.xml
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="21" project-jdk-type="JavaSDK">
|
|
4
|
+
<output url="file://$PROJECT_DIR$/out" />
|
|
5
|
+
</component>
|
|
6
|
+
</project>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="ProjectModuleManager">
|
|
4
|
+
<modules>
|
|
5
|
+
<module fileurl="file://$PROJECT_DIR$/.idea/250218_nodejs_core.iml" filepath="$PROJECT_DIR$/.idea/250218_nodejs_core.iml" />
|
|
6
|
+
</modules>
|
|
7
|
+
</component>
|
|
8
|
+
</project>
|
package/.idea/vcs.xml
ADDED
|
@@ -79,6 +79,7 @@ exports.ELEMENT_TYPE_TO_DB_TYPE_MAP = {
|
|
|
79
79
|
'url': 'VARCHAR(500)',
|
|
80
80
|
'json-editor': 'JSON',
|
|
81
81
|
'custom-chip-input': 'VARCHAR(500)',
|
|
82
|
+
'multiselect': 'TEXT[]',
|
|
82
83
|
};
|
|
83
84
|
function getDbColumnType(elementType, dbLength) {
|
|
84
85
|
const normalized = elementType?.toLowerCase().trim();
|
|
@@ -111,6 +112,7 @@ function getDbDataTypeName(elementType) {
|
|
|
111
112
|
'url': 'varchar',
|
|
112
113
|
'json-editor': 'json',
|
|
113
114
|
'custom-chip-input': 'varchar',
|
|
115
|
+
'multiselect': 'array',
|
|
114
116
|
};
|
|
115
117
|
return mapping[normalized] || 'varchar';
|
|
116
118
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"db-data-type.constant.js","sourceRoot":"","sources":["../../src/constant/db-data-type.constant.ts"],"names":[],"mappings":";;;AAqEA,gDAGC;AAKD,gDAGC;
|
|
1
|
+
{"version":3,"file":"db-data-type.constant.js","sourceRoot":"","sources":["../../src/constant/db-data-type.constant.ts"],"names":[],"mappings":";;;AAqEA,gDAGC;AAKD,gDAGC;AAoCD,0CAUC;AAOD,8CA0BC;AA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AC,WAAmB,EAAE,QAAiB;IAClE,MAAM,UAAU,GAAG,WAAW,EAAE,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC;IACrD,MAAM,QAAQ,GAAG,mCAA2B,CAAC,UAAU,CAAC,IAAI,cAAc,CAAC;IAG3E,IAAI,QAAQ,IAAI,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;QAC7C,OAAO,WAAW,QAAQ,GAAG,CAAC;IAClC,CAAC;IAED,OAAO,QAAQ,CAAC;AACpB,CAAC;AAOD,SAAgB,iBAAiB,CAAC,WAAmB;IACjD,MAAM,UAAU,GAAG,WAAW,EAAE,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC;IACrD,MAAM,OAAO,GAA2B;QACpC,OAAO,EAAE,SAAS;QAClB,MAAM,EAAE,SAAS;QACjB,UAAU,EAAE,SAAS;QACrB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,KAAK;QACf,SAAS,EAAE,SAAS;QACpB,MAAM,EAAE,MAAM;QACd,MAAM,EAAE,MAAM;QACd,UAAU,EAAE,WAAW;QACvB,aAAa,EAAE,KAAK;QACpB,aAAa,EAAE,MAAM;QACrB,OAAO,EAAE,SAAS;QAClB,OAAO,EAAE,SAAS;QAClB,UAAU,EAAE,SAAS;QACrB,eAAe,EAAE,SAAS;QAC1B,OAAO,EAAE,SAAS;QAClB,UAAU,EAAE,SAAS;QACrB,KAAK,EAAE,SAAS;QAChB,aAAa,EAAE,MAAM;QACrB,mBAAmB,EAAE,SAAS;QAC9B,aAAa,EAAE,OAAO;KACzB,CAAC;IACF,OAAO,OAAO,CAAC,UAAU,CAAC,IAAI,SAAS,CAAC;AAC5C,CAAC"}
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { OnModuleInit } from '@nestjs/common';
|
|
2
|
+
import { RedisService } from '@liaoliaots/nestjs-redis';
|
|
3
|
+
export declare class AuthModule implements OnModuleInit {
|
|
4
|
+
private readonly redisService;
|
|
5
|
+
constructor(redisService: RedisService);
|
|
6
|
+
onModuleInit(): Promise<void>;
|
|
2
7
|
}
|
|
@@ -5,6 +5,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
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
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
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
|
+
};
|
|
8
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
12
|
exports.AuthModule = void 0;
|
|
10
13
|
const common_1 = require("@nestjs/common");
|
|
@@ -20,7 +23,19 @@ const google_strategy_1 = require("./strategies/google.strategy");
|
|
|
20
23
|
const role_guard_1 = require("./guards/role.guard");
|
|
21
24
|
const auth_service_1 = require("./services/auth.service");
|
|
22
25
|
const auth_controller_1 = require("./controller/auth.controller");
|
|
26
|
+
const nestjs_redis_1 = require("@liaoliaots/nestjs-redis");
|
|
23
27
|
let AuthModule = class AuthModule {
|
|
28
|
+
constructor(redisService) {
|
|
29
|
+
this.redisService = redisService;
|
|
30
|
+
}
|
|
31
|
+
async onModuleInit() {
|
|
32
|
+
const redis = this.redisService.getOrThrow();
|
|
33
|
+
await redis.set('PING_TEST', 'PONG', 'EX', 10000);
|
|
34
|
+
const value = await redis.get('PING_TEST');
|
|
35
|
+
console.log(`Redis Read: ${value}`);
|
|
36
|
+
const ping = await redis.ping();
|
|
37
|
+
console.log(`Redis PING reply: ${ping}`);
|
|
38
|
+
}
|
|
24
39
|
};
|
|
25
40
|
exports.AuthModule = AuthModule;
|
|
26
41
|
exports.AuthModule = AuthModule = __decorate([
|
|
@@ -41,6 +56,17 @@ exports.AuthModule = AuthModule = __decorate([
|
|
|
41
56
|
},
|
|
42
57
|
}),
|
|
43
58
|
typeorm_1.TypeOrmModule.forFeature([user_session_entity_1.UserSession]),
|
|
59
|
+
nestjs_redis_1.RedisModule.forRootAsync({
|
|
60
|
+
imports: [config_1.ConfigModule],
|
|
61
|
+
inject: [config_1.ConfigService],
|
|
62
|
+
useFactory: async (configService) => ({
|
|
63
|
+
config: {
|
|
64
|
+
host: configService.get('REDIS_HOST') || 'localhost',
|
|
65
|
+
port: Number(configService.get('REDIS_PORT')) || 6379,
|
|
66
|
+
password: configService.get('REDIS_PASSWORD') || 'Rezolut123',
|
|
67
|
+
},
|
|
68
|
+
}),
|
|
69
|
+
}),
|
|
44
70
|
],
|
|
45
71
|
controllers: [auth_controller_1.AuthController],
|
|
46
72
|
providers: [
|
|
@@ -52,6 +78,7 @@ exports.AuthModule = AuthModule = __decorate([
|
|
|
52
78
|
auth_service_1.AuthService,
|
|
53
79
|
],
|
|
54
80
|
exports: [jwt_service_1.JwtAuthService, jwt_guard_1.JwtAuthGuard, role_guard_1.RolesGuard, auth_service_1.AuthService],
|
|
55
|
-
})
|
|
81
|
+
}),
|
|
82
|
+
__metadata("design:paramtypes", [nestjs_redis_1.RedisService])
|
|
56
83
|
], AuthModule);
|
|
57
84
|
//# sourceMappingURL=auth.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.module.js","sourceRoot":"","sources":["../../../src/module/auth/auth.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"auth.module.js","sourceRoot":"","sources":["../../../src/module/auth/auth.module.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAsD;AACtD,2CAA6D;AAC7D,qCAAwC;AACxC,6CAAgD;AAChD,4DAAwD;AACxD,wDAAwD;AACxD,kDAAkD;AAClD,+CAAkD;AAClD,4EAAiE;AACjE,kEAA8D;AAC9D,oDAAiD;AACjD,0DAAsD;AACtD,kEAA8D;AAC9D,2DAAqE;AA8C9D,IAAM,UAAU,GAAhB,MAAM,UAAU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YAAY,CAAC;gBACvB,OAAO,EAAE,CAAC,qBAAY,CAAC;gBACvB,MAAM,EAAE,CAAC,sBAAa,CAAC;gBACvB,UAAU,EAAE,KAAK,EAAE,aAA4B,EAAE,EAAE,CAAC,CAAC;oBACnD,MAAM,EAAE;wBACN,IAAI,EAAE,aAAa,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,WAAW;wBACpD,IAAI,EAAE,MAAM,CAAC,aAAa,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,IAAI,IAAI;wBACrD,QAAQ,EAAE,aAAa,CAAC,GAAG,CAAC,gBAAgB,CAAC,IAAI,YAAY;qBAC9D;iBACF,CAAC;aACH,CAAC;SACH;QACD,WAAW,EAAE,CAAC,gCAAc,CAAC;QAC7B,SAAS,EAAE;YACT,4BAAc;YACd,0BAAW;YACX,wBAAY;YACZ,gCAAc;YACd,uBAAU;YACV,0BAAW;SACZ;QACD,OAAO,EAAE,CAAC,4BAAc,EAAE,wBAAY,EAAE,uBAAU,EAAE,0BAAW,CAAC;KACjE,CAAC;qCAE2C,2BAAY;GAD5C,UAAU,CAiBtB"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { ConfigService } from '@nestjs/config';
|
|
2
|
+
import { RedisService } from '@liaoliaots/nestjs-redis';
|
|
2
3
|
declare const JwtStrategy_base: new (...args: any) => any;
|
|
3
4
|
export declare class JwtStrategy extends JwtStrategy_base {
|
|
4
5
|
private readonly configService;
|
|
5
|
-
|
|
6
|
+
private readonly redisService;
|
|
7
|
+
private redis;
|
|
8
|
+
constructor(configService: ConfigService, redisService: RedisService);
|
|
6
9
|
validate(payload: any): Promise<{
|
|
7
10
|
userData: {
|
|
8
11
|
id: any;
|
|
@@ -14,17 +14,29 @@ const passport_jwt_1 = require("passport-jwt");
|
|
|
14
14
|
const passport_1 = require("@nestjs/passport");
|
|
15
15
|
const common_1 = require("@nestjs/common");
|
|
16
16
|
const config_1 = require("@nestjs/config");
|
|
17
|
+
const nestjs_redis_1 = require("@liaoliaots/nestjs-redis");
|
|
17
18
|
let JwtStrategy = class JwtStrategy extends (0, passport_1.PassportStrategy)(passport_jwt_1.Strategy) {
|
|
18
|
-
constructor(configService) {
|
|
19
|
+
constructor(configService, redisService) {
|
|
19
20
|
super({
|
|
20
21
|
jwtFromRequest: passport_jwt_1.ExtractJwt.fromAuthHeaderAsBearerToken(),
|
|
21
22
|
ignoreExpiration: false,
|
|
22
23
|
secretOrKey: configService.get('SECRET_KEY'),
|
|
23
24
|
});
|
|
24
25
|
this.configService = configService;
|
|
26
|
+
this.redisService = redisService;
|
|
27
|
+
this.redis = this.redisService.getOrThrow();
|
|
25
28
|
}
|
|
26
29
|
async validate(payload) {
|
|
27
|
-
const { id, sessionToken, app_id, email_id, organization_id, enterprise_id, level_id, level_type, appcode } = payload;
|
|
30
|
+
const { id, sessionToken, app_id, email_id, organization_id, enterprise_id, level_id, level_type, appcode, } = payload;
|
|
31
|
+
const redisKey = `SESSION:${sessionToken}`;
|
|
32
|
+
const sessionData = await this.redis.get(redisKey);
|
|
33
|
+
if (!sessionData) {
|
|
34
|
+
throw new common_1.UnauthorizedException('Session expired or invalid');
|
|
35
|
+
}
|
|
36
|
+
const session = JSON.parse(sessionData);
|
|
37
|
+
if (session.is_session_loggedout === 1) {
|
|
38
|
+
throw new common_1.UnauthorizedException('Session logged out');
|
|
39
|
+
}
|
|
28
40
|
const userData = {
|
|
29
41
|
id: id,
|
|
30
42
|
sessionToken: sessionToken,
|
|
@@ -34,7 +46,7 @@ let JwtStrategy = class JwtStrategy extends (0, passport_1.PassportStrategy)(pas
|
|
|
34
46
|
enterprise_id: enterprise_id,
|
|
35
47
|
level_id: level_id,
|
|
36
48
|
level_type: level_type,
|
|
37
|
-
appcode: appcode
|
|
49
|
+
appcode: appcode,
|
|
38
50
|
};
|
|
39
51
|
return { userData };
|
|
40
52
|
}
|
|
@@ -42,6 +54,7 @@ let JwtStrategy = class JwtStrategy extends (0, passport_1.PassportStrategy)(pas
|
|
|
42
54
|
exports.JwtStrategy = JwtStrategy;
|
|
43
55
|
exports.JwtStrategy = JwtStrategy = __decorate([
|
|
44
56
|
(0, common_1.Injectable)(),
|
|
45
|
-
__metadata("design:paramtypes", [config_1.ConfigService
|
|
57
|
+
__metadata("design:paramtypes", [config_1.ConfigService,
|
|
58
|
+
nestjs_redis_1.RedisService])
|
|
46
59
|
], JwtStrategy);
|
|
47
60
|
//# sourceMappingURL=jwt.strategy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jwt.strategy.js","sourceRoot":"","sources":["../../../../src/module/auth/strategies/jwt.strategy.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAAoD;AACpD,+CAAoD;AACpD,2CAAmE;
|
|
1
|
+
{"version":3,"file":"jwt.strategy.js","sourceRoot":"","sources":["../../../../src/module/auth/strategies/jwt.strategy.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAAoD;AACpD,+CAAoD;AACpD,2CAAmE;AACnE,2CAA+C;AAE/C,2DAAwD;AAGjD,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,IAAA,2BAAgB,EAAC,uBAAQ,CAAC;IAGzD,YAA6B,aAA4B,EAC5B,YAA0B;QACrD,KAAK,CAAC;YACJ,cAAc,EAAE,yBAAU,CAAC,2BAA2B,EAAE;YACxD,gBAAgB,EAAE,KAAK;YACvB,WAAW,EAAE,aAAa,CAAC,GAAG,CAAC,YAAY,CAAC;SAC7C,CAAC,CAAC;QANwB,kBAAa,GAAb,aAAa,CAAe;QAC5B,iBAAY,GAAZ,YAAY,CAAc;QAMrD,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE,CAAC;IAC9C,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,OAAO;QACpB,MAAM,EACJ,EAAE,EACF,YAAY,EACZ,MAAM,EACN,QAAQ,EACR,eAAe,EACf,aAAa,EACb,QAAQ,EACR,UAAU,EACV,OAAO,GACR,GAAG,OAAO,CAAC;QAEZ,MAAM,QAAQ,GAAG,WAAW,YAAY,EAAE,CAAC;QAE3C,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAEnD,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,MAAM,IAAI,8BAAqB,CAAC,4BAA4B,CAAC,CAAC;QAChE,CAAC;QAED,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;QAExC,IAAI,OAAO,CAAC,oBAAoB,KAAK,CAAC,EAAE,CAAC;YACvC,MAAM,IAAI,8BAAqB,CAAC,oBAAoB,CAAC,CAAC;QACxD,CAAC;QAGD,MAAM,QAAQ,GAAG;YACf,EAAE,EAAE,EAAE;YACN,YAAY,EAAE,YAAY;YAC1B,MAAM,EAAE,MAAM;YACd,QAAQ,EAAE,QAAQ;YAClB,eAAe,EAAE,eAAe;YAChC,aAAa,EAAE,aAAa;YAC5B,QAAQ,EAAE,QAAQ;YAClB,UAAU,EAAE,UAAU;YACtB,OAAO,EAAE,OAAO;SACjB,CAAC;QAEF,OAAO,EAAE,QAAQ,EAAE,CAAC;IACtB,CAAC;CACF,CAAA;AAvDY,kCAAW;sBAAX,WAAW;IADvB,IAAA,mBAAU,GAAE;qCAIiC,sBAAa;QACd,2BAAY;GAJ5C,WAAW,CAuDvB"}
|
|
@@ -2,17 +2,7 @@ import { EntityJSONService } from '../service/entity_json.service';
|
|
|
2
2
|
export declare class EntityJSONController {
|
|
3
3
|
private readonly entityJSONService;
|
|
4
4
|
constructor(entityJSONService: EntityJSONService);
|
|
5
|
-
|
|
5
|
+
computeJson(entityId: number, entityType: string, req: Request & {
|
|
6
6
|
user: any;
|
|
7
|
-
}
|
|
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>;
|
|
7
|
+
}): Promise<Record<string, any>>;
|
|
18
8
|
}
|
|
@@ -20,36 +20,22 @@ let EntityJSONController = class EntityJSONController {
|
|
|
20
20
|
constructor(entityJSONService) {
|
|
21
21
|
this.entityJSONService = entityJSONService;
|
|
22
22
|
}
|
|
23
|
-
async
|
|
23
|
+
async computeJson(entityId, entityType, req) {
|
|
24
24
|
const loggedInUser = req.user?.userData;
|
|
25
|
-
return this.entityJSONService.
|
|
26
|
-
}
|
|
27
|
-
async updateEntityJson(entityId, entityType, req) {
|
|
28
|
-
const loggedInUser = req.user?.userData;
|
|
29
|
-
return this.entityJSONService.updateEntityJSON(entityType, Number(entityId), loggedInUser);
|
|
25
|
+
return this.entityJSONService.computeFlatJson(entityType, entityId, loggedInUser);
|
|
30
26
|
}
|
|
31
27
|
};
|
|
32
28
|
exports.EntityJSONController = EntityJSONController;
|
|
33
29
|
__decorate([
|
|
34
|
-
(0, common_1.Get)('
|
|
35
|
-
(0, common_1.UseGuards)(jwt_guard_1.JwtAuthGuard),
|
|
36
|
-
__param(0, (0, common_1.Param)('entityType')),
|
|
37
|
-
__param(1, (0, common_1.Req)()),
|
|
38
|
-
__param(2, (0, common_1.Query)('mode')),
|
|
39
|
-
__metadata("design:type", Function),
|
|
40
|
-
__metadata("design:paramtypes", [String, Object, String]),
|
|
41
|
-
__metadata("design:returntype", Promise)
|
|
42
|
-
], EntityJSONController.prototype, "getEntityJson", null);
|
|
43
|
-
__decorate([
|
|
44
|
-
(0, common_1.Post)('/update-json/:entityId'),
|
|
30
|
+
(0, common_1.Get)('/compute-json'),
|
|
45
31
|
(0, common_1.UseGuards)(jwt_guard_1.JwtAuthGuard),
|
|
46
|
-
__param(0, (0, common_1.
|
|
47
|
-
__param(1, (0, common_1.Query)('
|
|
32
|
+
__param(0, (0, common_1.Query)('entity_id')),
|
|
33
|
+
__param(1, (0, common_1.Query)('entity_type')),
|
|
48
34
|
__param(2, (0, common_1.Req)()),
|
|
49
35
|
__metadata("design:type", Function),
|
|
50
|
-
__metadata("design:paramtypes", [
|
|
36
|
+
__metadata("design:paramtypes", [Number, String, Object]),
|
|
51
37
|
__metadata("design:returntype", Promise)
|
|
52
|
-
], EntityJSONController.prototype, "
|
|
38
|
+
], EntityJSONController.prototype, "computeJson", null);
|
|
53
39
|
exports.EntityJSONController = EntityJSONController = __decorate([
|
|
54
40
|
(0, common_1.Controller)('entity-json'),
|
|
55
41
|
__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;
|
|
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;IAgD/D,AAAN,KAAK,CAAC,WAAW,CAAqB,QAAgB,EACd,UAAkB,EACjC,GAA4B;QAEnD,MAAM,YAAY,GAAG,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC;QACxC,OAAO,IAAI,CAAC,iBAAiB,CAAC,eAAe,CAC3C,UAAU,EACV,QAAQ,EACR,YAAY,CACb,CAAC;IACJ,CAAC;CACF,CAAA;AA5DY,oDAAoB;AAiDzB;IAFL,IAAA,YAAG,EAAC,eAAe,CAAC;IACpB,IAAA,kBAAS,EAAC,wBAAY,CAAC;IACL,WAAA,IAAA,cAAK,EAAC,WAAW,CAAC,CAAA;IAClB,WAAA,IAAA,cAAK,EAAC,aAAa,CAAC,CAAA;IACpB,WAAA,IAAA,YAAG,GAAE,CAAA;;;;uDAQvB;+BA3DU,oBAAoB;IADhC,IAAA,mBAAU,EAAC,aAAa,CAAC;qCAEwB,uCAAiB;GADtD,oBAAoB,CA4DhC"}
|
|
@@ -39,7 +39,7 @@ __decorate([
|
|
|
39
39
|
__decorate([
|
|
40
40
|
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
41
41
|
__metadata("design:type", Number)
|
|
42
|
-
], EntityJson.prototype, "
|
|
42
|
+
], EntityJson.prototype, "organization_id", void 0);
|
|
43
43
|
__decorate([
|
|
44
44
|
(0, typeorm_1.CreateDateColumn)({ type: 'timestamp', nullable: true }),
|
|
45
45
|
__metadata("design:type", Date)
|
|
@@ -48,6 +48,10 @@ __decorate([
|
|
|
48
48
|
(0, typeorm_1.UpdateDateColumn)({ type: 'timestamp', nullable: true }),
|
|
49
49
|
__metadata("design:type", Date)
|
|
50
50
|
], EntityJson.prototype, "updated_at", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, typeorm_1.UpdateDateColumn)({ type: 'varchar', nullable: true }),
|
|
53
|
+
__metadata("design:type", String)
|
|
54
|
+
], EntityJson.prototype, "updated_by", void 0);
|
|
51
55
|
exports.EntityJson = EntityJson = __decorate([
|
|
52
56
|
(0, typeorm_1.Entity)('frm_entity_json'),
|
|
53
57
|
(0, typeorm_1.Unique)(['entity_type', 'entity_id'])
|
|
@@ -1 +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;
|
|
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;CA6BtB,CAAA;AA7BY,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;;mDAChB;AAGxB;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;AAGjB;IADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACnC;qBA5BR,UAAU;IAFtB,IAAA,gBAAM,EAAC,iBAAiB,CAAC;IACzB,IAAA,gBAAM,EAAC,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;GACxB,UAAU,CA6BtB"}
|
|
@@ -21,10 +21,15 @@ let EntityJSONModule = class EntityJSONModule {
|
|
|
21
21
|
exports.EntityJSONModule = EntityJSONModule;
|
|
22
22
|
exports.EntityJSONModule = EntityJSONModule = __decorate([
|
|
23
23
|
(0, common_1.Module)({
|
|
24
|
-
imports: [
|
|
24
|
+
imports: [
|
|
25
|
+
(0, common_1.forwardRef)(() => entity_module_1.EntityModule),
|
|
26
|
+
typeorm_1.TypeOrmModule.forFeature([entityJson_entity_1.EntityJson]),
|
|
27
|
+
(0, common_1.forwardRef)(() => filter_module_1.FilterModule),
|
|
28
|
+
utils_module_1.UtilsModule,
|
|
29
|
+
],
|
|
25
30
|
controllers: [entity_json_controller_1.EntityJSONController],
|
|
26
31
|
providers: [entity_json_service_1.EntityJSONService, entityJson_repository_1.EntityJSONRepository],
|
|
27
|
-
exports: [],
|
|
32
|
+
exports: [entity_json_service_1.EntityJSONService],
|
|
28
33
|
})
|
|
29
34
|
], EntityJSONModule);
|
|
30
35
|
//# sourceMappingURL=entity_json.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity_json.module.js","sourceRoot":"","sources":["../../../src/module/entity_json/entity_json.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"entity_json.module.js","sourceRoot":"","sources":["../../../src/module/entity_json/entity_json.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAoD;AACpD,yDAAqD;AACrD,6CAAgD;AAChD,uEAAkE;AAClE,gFAA2E;AAC3E,2DAAuD;AACvD,2DAAqD;AACrD,kEAAwD;AACxD,2EAAuE;AAahE,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;CAAG,CAAA;AAAnB,4CAAgB;2BAAhB,gBAAgB;IAX5B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,4BAAY,CAAC;YAC9B,uBAAa,CAAC,UAAU,CAAC,CAAC,8BAAU,CAAC,CAAC;YACtC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,4BAAY,CAAC;YAC9B,0BAAW;SACZ;QACD,WAAW,EAAE,CAAC,6CAAoB,CAAC;QACnC,SAAS,EAAE,CAAC,uCAAiB,EAAE,4CAAoB,CAAC;QACpD,OAAO,EAAE,CAAC,uCAAiB,CAAC;KAC7B,CAAC;GACW,gBAAgB,CAAG"}
|
|
@@ -1,25 +1,26 @@
|
|
|
1
|
-
import { AttributeMaster } from 'src/module/meta/entity/attribute-master.entity';
|
|
2
1
|
import { EntityServiceImpl } from 'src/module/meta/service/entity-service-impl.service';
|
|
3
2
|
import { LoggingService } from 'src/utils/service/loggingUtil.service';
|
|
4
3
|
import { DataSource } from 'typeorm';
|
|
5
4
|
import { EntityJSONRepository } from './entityJson.repository';
|
|
6
5
|
import { FilterService } from '../../filter/service/filter.service';
|
|
6
|
+
import { AttributeMasterService } from 'src/module/meta/service/attribute-master.service';
|
|
7
|
+
import { EntityMasterService } from '../../meta/service/entity-master.service';
|
|
8
|
+
import { EntityDynamicService } from '../../meta/service/entity-dynamic.service';
|
|
9
|
+
import { EntityRelationService } from '../../meta/service/entity-relation.service';
|
|
7
10
|
export declare class EntityJSONService {
|
|
8
11
|
private readonly dataSource;
|
|
9
12
|
private readonly loggerService;
|
|
10
13
|
private readonly EntityJSONRepository;
|
|
11
14
|
private readonly filterService;
|
|
12
15
|
private readonly entityServiceImpl;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
};
|
|
21
|
-
}>;
|
|
22
|
-
updateEntityJSON(entityType: string, entityId: number, loggedInUser: any): Promise<Record<string, null> | null>;
|
|
16
|
+
private readonly entityMasterService;
|
|
17
|
+
private readonly entityDynamicService;
|
|
18
|
+
private readonly attributeMasterService;
|
|
19
|
+
private readonly entityRelationService;
|
|
20
|
+
constructor(dataSource: DataSource, loggerService: LoggingService, EntityJSONRepository: EntityJSONRepository, filterService: FilterService, entityServiceImpl: EntityServiceImpl, entityMasterService: EntityMasterService, entityDynamicService: EntityDynamicService, attributeMasterService: AttributeMasterService, entityRelationService: EntityRelationService);
|
|
21
|
+
getAttributeForFlatJSON(entityType: string, loggedInUser: any, flag?: 'flat_json' | 'dropdown' | 'all' | 'filter_attribute'): Promise<any>;
|
|
22
|
+
updateEntityJSON(entityType: string, entityId: number, loggedInUser: any): Promise<any>;
|
|
23
23
|
private mergeEntityDataIntoFlatJson;
|
|
24
24
|
private applyLinkedFilterUsingSavedFilter;
|
|
25
|
+
computeFlatJson(entityType: string, entityId: number, loggedInUser: any): Promise<Record<string, any>>;
|
|
25
26
|
}
|