rez_core 4.0.205 → 4.0.207
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/.prettierrc +3 -3
- package/README.md +99 -99
- package/dist/config/config.module.js +2 -2
- package/dist/config/config.module.js.map +1 -1
- package/dist/config/database.config.d.ts +1 -1
- package/dist/config/database.config.js +15 -11
- package/dist/config/database.config.js.map +1 -1
- package/dist/core.module.js +0 -6
- package/dist/core.module.js.map +1 -1
- package/dist/module/auth/guards/role.guard.js +3 -3
- package/dist/module/auth/services/auth.service.js +3 -3
- package/dist/module/auth/services/auth.service.js.map +1 -1
- package/dist/module/enterprise/entity/organization.entity.js +1 -1
- package/dist/module/enterprise/repository/school.repository.js +3 -3
- package/dist/module/enterprise/repository/school.repository.js.map +1 -1
- package/dist/module/entity_json/controller/entity_json.controller.d.ts +1 -11
- package/dist/module/entity_json/controller/entity_json.controller.js +0 -14
- package/dist/module/entity_json/controller/entity_json.controller.js.map +1 -1
- package/dist/module/entity_json/entity_json.module.js +1 -2
- package/dist/module/entity_json/entity_json.module.js.map +1 -1
- package/dist/module/entity_json/service/entity_json.service.d.ts +3 -11
- package/dist/module/entity_json/service/entity_json.service.js +51 -95
- package/dist/module/entity_json/service/entity_json.service.js.map +1 -1
- package/dist/module/filter/repository/saved-filter.repository.js +4 -4
- package/dist/module/filter/service/filter-evaluator.service.js +3 -3
- package/dist/module/filter/service/filter-evaluator.service.js.map +1 -1
- package/dist/module/filter/service/filter.service.d.ts +4 -1
- package/dist/module/filter/service/filter.service.js +69 -39
- package/dist/module/filter/service/filter.service.js.map +1 -1
- package/dist/module/integration/entity/integration-config.entity.js +6 -6
- package/dist/module/integration/entity/integration-config.entity.js.map +1 -1
- package/dist/module/integration/entity/integration-entity-mapper.entity.js +1 -1
- package/dist/module/integration/entity/integration-entity-mapper.entity.js.map +1 -1
- package/dist/module/integration/entity/integration-source.entity.js +4 -4
- package/dist/module/integration/entity/integration-source.entity.js.map +1 -1
- package/dist/module/integration/entity/user-integration.entity.js +4 -4
- package/dist/module/integration/entity/user-integration.entity.js.map +1 -1
- package/dist/module/integration/examples/usage.example.js +9 -9
- package/dist/module/integration/service/integration.service.js +1 -1
- package/dist/module/integration/service/wrapper.service.js +29 -28
- package/dist/module/integration/service/wrapper.service.js.map +1 -1
- package/dist/module/linked_attributes/entity/linked_attribute.entity.d.ts +0 -1
- package/dist/module/linked_attributes/entity/linked_attribute.entity.js +0 -4
- package/dist/module/linked_attributes/entity/linked_attribute.entity.js.map +1 -1
- package/dist/module/listmaster/entity/list-master-items.entity.js +3 -3
- package/dist/module/listmaster/entity/list-master-items.entity.js.map +1 -1
- package/dist/module/listmaster/entity/list-master.entity.js +4 -4
- package/dist/module/listmaster/entity/list-master.entity.js.map +1 -1
- package/dist/module/listmaster/service/list-master-item.service.js +3 -3
- package/dist/module/listmaster/service/list-master-item.service.js.map +1 -1
- package/dist/module/mapper/entity/field-mapper.entity.js +6 -6
- package/dist/module/mapper/entity/field-mapper.entity.js.map +1 -1
- package/dist/module/mapper/service/field-mapper.service.js +5 -5
- package/dist/module/mapper/service/field-mapper.service.js.map +1 -1
- package/dist/module/mapper/service/mapper.service.js +4 -4
- package/dist/module/mapper/service/mapper.service.js.map +1 -1
- package/dist/module/meta/controller/attribute-master.controller.d.ts +3 -2
- package/dist/module/meta/controller/attribute-master.controller.js +12 -2
- package/dist/module/meta/controller/attribute-master.controller.js.map +1 -1
- package/dist/module/meta/entity/app-master.entity.d.ts +2 -2
- package/dist/module/meta/entity/app-master.entity.js +4 -4
- package/dist/module/meta/entity/attribute-master.entity.d.ts +0 -1
- package/dist/module/meta/entity/attribute-master.entity.js +0 -4
- package/dist/module/meta/entity/attribute-master.entity.js.map +1 -1
- package/dist/module/meta/entity/entity-master.entity.js +1 -1
- package/dist/module/meta/entity/entity-master.entity.js.map +1 -1
- package/dist/module/meta/entity/view-master.entity.js +1 -1
- package/dist/module/meta/entity/view-master.entity.js.map +1 -1
- package/dist/module/meta/repository/attribute-master.repository.js +2 -2
- package/dist/module/meta/repository/attribute-master.repository.js.map +1 -1
- package/dist/module/meta/repository/entity-attribute-update.repository.js +3 -3
- package/dist/module/meta/repository/entity-master.repository.js +2 -2
- package/dist/module/meta/repository/entity-master.repository.js.map +1 -1
- package/dist/module/meta/service/attribute-master.service.js +1 -1
- package/dist/module/meta/service/attribute-master.service.js.map +1 -1
- package/dist/module/meta/service/entity-dynamic.service.d.ts +4 -1
- package/dist/module/meta/service/entity-dynamic.service.js +40 -29
- package/dist/module/meta/service/entity-dynamic.service.js.map +1 -1
- package/dist/module/meta/service/entity-list.service.js +3 -3
- package/dist/module/meta/service/entity-master.service.js +4 -4
- package/dist/module/meta/service/entity-master.service.js.map +1 -1
- package/dist/module/meta/service/entity-relation.service.js +13 -13
- package/dist/module/meta/service/entity-relation.service.js.map +1 -1
- package/dist/module/meta/service/entity-service-impl.service.js +3 -3
- package/dist/module/meta/service/media-data.service.js +9 -9
- package/dist/module/meta/service/media-data.service.js.map +1 -1
- package/dist/module/meta/service/resolver.service.js +17 -17
- package/dist/module/meta/service/resolver.service.js.map +1 -1
- package/dist/module/module/repository/menu.repository.js +12 -12
- package/dist/module/module/service/module-access.service.js +2 -8
- package/dist/module/module/service/module-access.service.js.map +1 -1
- package/dist/module/notification/controller/otp.controller.d.ts +31 -1
- package/dist/module/notification/entity/otp.entity.js +1 -1
- package/dist/module/notification/entity/otp.entity.js.map +1 -1
- package/dist/module/notification/service/notification.service.js +26 -22
- package/dist/module/notification/service/notification.service.js.map +1 -1
- package/dist/module/notification/service/otp.service.d.ts +31 -1
- package/dist/module/notification/service/otp.service.js +0 -1
- package/dist/module/notification/service/otp.service.js.map +1 -1
- package/dist/module/user/controller/login.controller.js +19 -20
- package/dist/module/user/controller/login.controller.js.map +1 -1
- package/dist/module/user/entity/user-role-mapping.entity.js +1 -1
- package/dist/module/user/entity/user-role-mapping.entity.js.map +1 -1
- package/dist/module/user/service/login.service.d.ts +57 -3
- package/dist/module/user/service/login.service.js +3 -13
- package/dist/module/user/service/login.service.js.map +1 -1
- package/dist/module/user/service/role.service.js +4 -4
- package/dist/module/user/service/user-session.service.js +4 -4
- package/dist/module/user/service/user-session.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/entity/action-category.entity.d.ts +1 -1
- package/dist/module/workflow/entity/action-category.entity.js +1 -1
- package/dist/module/workflow/entity/action-data.entity.js +1 -1
- package/dist/module/workflow/entity/action-data.entity.js.map +1 -1
- package/dist/module/workflow/entity/action.entity.js +1 -1
- package/dist/module/workflow/entity/action.entity.js.map +1 -1
- package/dist/module/workflow/entity/comm-template.entity.js +1 -1
- package/dist/module/workflow/entity/comm-template.entity.js.map +1 -1
- package/dist/module/workflow/entity/template-attach-mapper.entity.js +1 -1
- package/dist/module/workflow/entity/template-attach-mapper.entity.js.map +1 -1
- package/dist/module/workflow/repository/action-data.repository.js +4 -4
- package/dist/module/workflow/repository/action-data.repository.js.map +1 -1
- package/dist/module/workflow/repository/action.repository.js +21 -21
- package/dist/module/workflow/repository/action.repository.js.map +1 -1
- package/dist/module/workflow/repository/comm-template.repository.js +7 -7
- package/dist/module/workflow/repository/comm-template.repository.js.map +1 -1
- package/dist/module/workflow/repository/form-master.repository.js +3 -3
- package/dist/module/workflow/repository/form-master.repository.js.map +1 -1
- package/dist/module/workflow/repository/stage-group.repository.js +23 -23
- package/dist/module/workflow/repository/stage-movement.repository.js +17 -17
- package/dist/module/workflow/repository/stage-movement.repository.js.map +1 -1
- package/dist/module/workflow/repository/stage.repository.js +8 -8
- package/dist/module/workflow/repository/task.repository.js +4 -4
- package/dist/module/workflow/repository/task.repository.js.map +1 -1
- package/dist/module/workflow/service/action-template-mapping.service.js +22 -22
- package/dist/module/workflow/service/action.service.js +13 -13
- package/dist/module/workflow/service/action.service.js.map +1 -1
- package/dist/module/workflow/service/entity-modification.service.js +6 -6
- package/dist/module/workflow/service/populate-workflow.service.js +8 -8
- package/dist/module/workflow/service/populate-workflow.service.js.map +1 -1
- package/dist/module/workflow/service/stage-group.service.js +6 -6
- package/dist/module/workflow/service/stage-group.service.js.map +1 -1
- package/dist/module/workflow/service/stage.service.js +4 -4
- package/dist/module/workflow/service/stage.service.js.map +1 -1
- package/dist/module/workflow/service/task.service.js +33 -33
- package/dist/module/workflow/service/task.service.js.map +1 -1
- package/dist/module/workflow/service/workflow-list-master.service.js +16 -16
- package/dist/module/workflow/service/workflow-list-master.service.js.map +1 -1
- package/dist/module/workflow/service/workflow-meta.service.js +31 -31
- package/dist/module/workflow/service/workflow-meta.service.js.map +1 -1
- package/dist/module/workflow/service/workflow.service.js +5 -5
- package/dist/module/workflow/service/workflow.service.js.map +1 -1
- package/dist/module/workflow-automation/entity/workflow-automation-action.entity.d.ts +1 -1
- package/dist/module/workflow-automation/entity/workflow-automation-action.entity.js +1 -1
- package/dist/module/workflow-automation/service/schedule-handler.service.js +14 -14
- package/dist/module/workflow-automation/service/workflow-automation-engine.service.js +1 -1
- 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 -4
- package/dist/module/workflow-schedule/entities/scheduled-workflow.entity.js +4 -4
- package/dist/module/workflow-schedule/entities/scheduled-workflow.entity.js.map +1 -1
- package/dist/module/workflow-schedule/entities/workflow-execution-log.entity.js +2 -2
- package/dist/module/workflow-schedule/entities/workflow-execution-log.entity.js.map +1 -1
- package/dist/module/workflow-schedule/processors/schedule.processor.js +4 -4
- package/dist/module/workflow-schedule/service/workflow-schedule.service.js +9 -9
- package/dist/table.config.d.ts +1 -3
- package/dist/table.config.js +6 -6
- package/dist/table.config.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/utils/service/reflection-helper.service.js +3 -3
- package/dist/utils/service/reflection-helper.service.js.map +1 -1
- package/docs/modules/event-driven-integration-design.md +91 -91
- package/docs/modules/integration.md +250 -250
- package/eslint.config.mjs +34 -34
- package/nest-cli.json +14 -14
- package/package.json +124 -124
- package/server.log +850 -0
- package/src/app.controller.ts +12 -12
- package/src/app.module.ts +66 -66
- package/src/app.service.ts +8 -8
- package/src/config/bull.config.ts +69 -69
- package/src/config/config.module.ts +17 -18
- package/src/config/database.config.ts +48 -23
- package/src/constant/global.constant.ts +67 -67
- package/src/core.module.ts +88 -94
- package/src/decorators/roles.decorator.ts +7 -7
- package/src/dtos/response.dto.ts +6 -6
- package/src/dtos/response.ts +5 -5
- package/src/index.ts +1 -1
- package/src/module/auth/auth.module.ts +49 -49
- package/src/module/auth/controller/auth.controller.ts +28 -28
- package/src/module/auth/guards/google-auth.guard.ts +9 -9
- package/src/module/auth/guards/jwt.guard.ts +22 -22
- package/src/module/auth/guards/role.guard.ts +68 -68
- package/src/module/auth/services/auth.service.ts +50 -50
- package/src/module/auth/services/jwt.service.ts +11 -11
- package/src/module/auth/strategies/google.strategy.ts +54 -54
- package/src/module/auth/strategies/jwt.strategy.ts +58 -58
- package/src/module/auth/strategies/local.strategy.ts +13 -13
- package/src/module/dashboard/controller/dashboard.controller.ts +36 -36
- package/src/module/dashboard/dashboard.module.ts +21 -21
- package/src/module/dashboard/entity/dashboard_page_data.entity.ts +27 -27
- package/src/module/dashboard/entity/widget_master.entity.ts +18 -18
- package/src/module/dashboard/repository/dashboard.repository.ts +42 -42
- package/src/module/dashboard/service/dashboard.service.ts +73 -73
- package/src/module/dev/dev.module.ts +12 -12
- package/src/module/dev/service/dev.service.ts +7 -7
- package/src/module/enterprise/controller/organization.controller.ts +36 -36
- package/src/module/enterprise/enterprise.module.ts +30 -30
- package/src/module/enterprise/entity/enterprise.entity.ts +37 -37
- package/src/module/enterprise/entity/organization-app-mapping.entity.ts +13 -13
- package/src/module/enterprise/entity/organization.entity.ts +92 -92
- package/src/module/enterprise/repository/enterprise.repository.ts +31 -31
- package/src/module/enterprise/repository/organization.repository.ts +26 -26
- package/src/module/enterprise/repository/school.repository.ts +278 -278
- package/src/module/enterprise/service/brand.service.ts +5 -5
- package/src/module/enterprise/service/enterprise.service.ts +16 -16
- package/src/module/enterprise/service/organization-app-mapping.service.ts +4 -4
- package/src/module/enterprise/service/organization.service.ts +145 -145
- package/src/module/entity_json/controller/entity_json.controller.ts +47 -47
- package/src/module/entity_json/entity_json.module.ts +15 -16
- package/src/module/entity_json/service/entity_json.service.ts +265 -318
- package/src/module/filter/controller/filter.controller.ts +84 -84
- package/src/module/filter/dto/filter-request.dto.ts +38 -38
- package/src/module/filter/entity/saved-filter-detail.entity.ts +41 -41
- package/src/module/filter/entity/saved-filter-master.entity.ts +23 -23
- package/src/module/filter/filter.module.ts +31 -31
- package/src/module/filter/repository/saved-filter.repository.ts +168 -168
- package/src/module/filter/service/filter-evaluator.service.ts +86 -86
- package/src/module/filter/service/filter.service.ts +1051 -1005
- package/src/module/filter/service/saved-filter.service.ts +170 -170
- package/src/module/ics/controller/ics.controller.ts +21 -21
- package/src/module/ics/dto/ics.dto.ts +55 -55
- package/src/module/ics/ics.module.ts +13 -13
- package/src/module/ics/service/ics.service.ts +57 -57
- package/src/module/integration/controller/calender-event.controller.ts +31 -31
- package/src/module/integration/controller/integration.controller.ts +662 -662
- package/src/module/integration/controller/wrapper.controller.ts +37 -37
- package/src/module/integration/dto/create-config.dto.ts +526 -526
- package/src/module/integration/entity/integration-config.entity.ts +112 -112
- package/src/module/integration/entity/integration-entity-mapper.entity.ts +14 -14
- package/src/module/integration/entity/integration-source.entity.ts +17 -17
- package/src/module/integration/entity/user-integration.entity.ts +71 -71
- package/src/module/integration/examples/usage.example.ts +338 -338
- package/src/module/integration/factories/base.factory.ts +7 -7
- package/src/module/integration/factories/email.factory.ts +49 -49
- package/src/module/integration/factories/integration.factory.ts +121 -121
- package/src/module/integration/factories/sms.factory.ts +51 -51
- package/src/module/integration/factories/telephone.factory.ts +41 -41
- package/src/module/integration/factories/whatsapp.factory.ts +56 -56
- package/src/module/integration/integration.module.ts +110 -110
- package/src/module/integration/service/calendar-event.service.ts +118 -118
- package/src/module/integration/service/integration-entity-mapper.service.ts +17 -17
- package/src/module/integration/service/integration-queue.service.ts +229 -229
- package/src/module/integration/service/integration.service.ts +2633 -2633
- package/src/module/integration/service/oauth.service.ts +224 -224
- package/src/module/integration/service/wrapper.service.ts +701 -700
- package/src/module/integration/strategies/email/gmail-api.strategy.ts +280 -280
- package/src/module/integration/strategies/email/outlook-api.strategy.ts +44 -44
- package/src/module/integration/strategies/email/outlook.strategy.ts +64 -64
- package/src/module/integration/strategies/email/sendgrid-api.strategy.ts +260 -260
- package/src/module/integration/strategies/integration.strategy.ts +97 -97
- package/src/module/integration/strategies/sms/gupshup-sms.strategy.ts +146 -146
- package/src/module/integration/strategies/sms/msg91-sms.strategy.ts +164 -164
- package/src/module/integration/strategies/sms/tubelight-sms.strategy.ts +163 -163
- package/src/module/integration/strategies/telephone/ozonetel-voice.strategy.ts +238 -238
- package/src/module/integration/strategies/telephone/tubelight-voice.strategy.ts +210 -210
- package/src/module/integration/strategies/whatsapp/gupshup-whatsapp.strategy.ts +359 -359
- package/src/module/integration/strategies/whatsapp/tubelight-whatsapp.strategy.ts +372 -372
- package/src/module/integration/strategies/whatsapp/whatsapp-cloud.strategy.ts +403 -403
- package/src/module/integration/strategies/whatsapp/whatsapp.strategy.ts +57 -57
- package/src/module/layout/controller/layout.controller.ts +47 -47
- package/src/module/layout/entity/header-items.entity.ts +28 -28
- package/src/module/layout/entity/header-section.entity.ts +19 -19
- package/src/module/layout/layout.module.ts +21 -21
- package/src/module/layout/repository/header-items.repository.ts +18 -18
- package/src/module/layout/repository/header-section.repository.ts +22 -22
- package/src/module/layout/service/header-section.service.ts +25 -25
- package/src/module/layout_preference/controller/layout_preference.controller.ts +73 -73
- package/src/module/layout_preference/entity/layout_preference.entity.ts +28 -28
- package/src/module/layout_preference/layout_preference.module.ts +22 -22
- package/src/module/layout_preference/repository/layout_preference.repository.ts +65 -65
- package/src/module/layout_preference/service/layout_preference.service.ts +191 -191
- package/src/module/lead/controller/lead.controller.ts +30 -30
- package/src/module/lead/lead.module.ts +14 -14
- package/src/module/lead/repository/lead.repository.ts +41 -41
- package/src/module/lead/service/lead.service.ts +54 -54
- package/src/module/linked_attributes/controller/linked_attributes.controller.ts +10 -10
- package/src/module/linked_attributes/entity/linked_attribute.entity.ts +48 -51
- package/src/module/linked_attributes/linked_attributes.module.ts +16 -16
- package/src/module/linked_attributes/repository/linked_attribute.repository.ts +12 -12
- package/src/module/linked_attributes/service/linked_attributes.service.ts +22 -22
- package/src/module/listmaster/controller/list-master.controller.ts +230 -230
- package/src/module/listmaster/entity/list-master-items.entity.ts +43 -43
- package/src/module/listmaster/entity/list-master.entity.ts +33 -33
- package/src/module/listmaster/listmaster.module.ts +46 -46
- package/src/module/listmaster/repository/list-master-items.repository.ts +169 -169
- package/src/module/listmaster/repository/list-master.repository.ts +46 -46
- package/src/module/listmaster/service/list-master-engine.ts +19 -19
- package/src/module/listmaster/service/list-master-extension.interface.ts +4 -4
- package/src/module/listmaster/service/list-master-item.service.ts +292 -292
- package/src/module/listmaster/service/list-master-registry.ts +15 -15
- package/src/module/listmaster/service/list-master.service.ts +535 -535
- package/src/module/mapper/controller/field-mapper.controller.ts +76 -76
- package/src/module/mapper/controller/mapper.controller.ts +20 -20
- package/src/module/mapper/dto/field-mapper.dto.ts +14 -14
- package/src/module/mapper/entity/field-lovs.entity.ts +19 -19
- package/src/module/mapper/entity/field-mapper.entity.ts +53 -53
- package/src/module/mapper/entity/mapper.entity.ts +16 -16
- package/src/module/mapper/mapper.module.ts +34 -34
- package/src/module/mapper/repository/field-lovs.repository.ts +35 -35
- package/src/module/mapper/repository/field-mapper.repository.ts +42 -42
- package/src/module/mapper/repository/mapper.repository.ts +15 -15
- package/src/module/mapper/service/field-mapper.service.ts +271 -271
- package/src/module/mapper/service/mapper.service.ts +79 -79
- package/src/module/master/controller/master.controller.ts +74 -74
- package/src/module/master/service/master.service.ts +483 -483
- package/src/module/meta/controller/app-master.controller.ts +38 -38
- package/src/module/meta/controller/attribute-master.controller.ts +86 -84
- package/src/module/meta/controller/entity-dynamic.controller.ts +125 -125
- package/src/module/meta/controller/entity-master.controller.ts +41 -41
- package/src/module/meta/controller/entity-relation.controller.ts +36 -36
- package/src/module/meta/controller/entity.controller.ts +392 -392
- package/src/module/meta/controller/entity.public.controller.ts +75 -75
- package/src/module/meta/controller/media.controller.ts +107 -107
- package/src/module/meta/controller/meta.controller.ts +96 -96
- package/src/module/meta/controller/view-master.controller.ts +86 -86
- package/src/module/meta/dto/entity-list-data.dto.ts +6 -6
- package/src/module/meta/dto/entity-tab.dto.ts +4 -4
- package/src/module/meta/dto/entity-table.dto.ts +9 -9
- package/src/module/meta/entity/app-master.entity.ts +34 -34
- package/src/module/meta/entity/attribute-master.entity.ts +89 -92
- package/src/module/meta/entity/base-entity.entity.ts +75 -75
- package/src/module/meta/entity/entity-master.entity.ts +85 -85
- package/src/module/meta/entity/entity-relation-data.entity.ts +29 -29
- package/src/module/meta/entity/entity-relation.entity.ts +23 -23
- package/src/module/meta/entity/entity-table-column.entity.ts +61 -61
- package/src/module/meta/entity/entity-table.entity.ts +50 -50
- package/src/module/meta/entity/media-data.entity.ts +32 -32
- package/src/module/meta/entity/preference.entity.ts +62 -62
- package/src/module/meta/entity/view-master.entity.ts +41 -41
- package/src/module/meta/entity.module.ts +166 -166
- package/src/module/meta/repository/app-master.repository.ts +20 -20
- package/src/module/meta/repository/attribute-master.repository.ts +138 -138
- package/src/module/meta/repository/entity-attribute-update.repository.ts +44 -44
- package/src/module/meta/repository/entity-master.repository.ts +99 -99
- package/src/module/meta/repository/entity-table-column.repository.ts +39 -39
- package/src/module/meta/repository/entity-table.repository.ts +53 -53
- package/src/module/meta/repository/media-data.repository.ts +50 -50
- package/src/module/meta/repository/preference.repository.ts +20 -20
- package/src/module/meta/repository/user-app-mapping.repository.ts +28 -28
- package/src/module/meta/repository/view-master.repository.ts +42 -42
- package/src/module/meta/service/app-master.service.ts +37 -37
- package/src/module/meta/service/attribute-master.service.ts +130 -130
- package/src/module/meta/service/common.service.ts +9 -9
- package/src/module/meta/service/entity-attribute-update.service.ts +28 -28
- package/src/module/meta/service/entity-dynamic.service.ts +831 -819
- package/src/module/meta/service/entity-list.service.ts +205 -205
- package/src/module/meta/service/entity-master.service.ts +175 -175
- package/src/module/meta/service/entity-realation-data.service.ts +9 -9
- package/src/module/meta/service/entity-relation.service.ts +69 -69
- package/src/module/meta/service/entity-service-impl.service.ts +525 -525
- package/src/module/meta/service/entity-table-column.service.ts +39 -39
- package/src/module/meta/service/entity-table.service.ts +150 -150
- package/src/module/meta/service/entity-validation.service.ts +187 -187
- package/src/module/meta/service/entity.service.ts +67 -67
- package/src/module/meta/service/field-group.service.ts +103 -103
- package/src/module/meta/service/media-data.service.ts +507 -507
- package/src/module/meta/service/populate-meta.service.ts +193 -193
- package/src/module/meta/service/preference.service.ts +16 -16
- package/src/module/meta/service/resolver.service.ts +267 -267
- package/src/module/meta/service/section-master.service.ts +104 -104
- package/src/module/meta/service/update-form-json.service.ts +22 -22
- package/src/module/meta/service/user-app-mapping.service.ts +17 -17
- package/src/module/meta/service/view-master.service.ts +127 -127
- package/src/module/microservice-client/microservice-clients.module.ts +13 -13
- package/src/module/microservice-client/service/microservice-client-factory.ts +37 -37
- package/src/module/microservice-client/service/microservice-clients.ts +4 -4
- package/src/module/module/controller/menu.controller.ts +15 -15
- package/src/module/module/controller/module-access.controller.ts +134 -134
- package/src/module/module/entity/menu.entity.ts +43 -43
- package/src/module/module/entity/module-access.entity.ts +25 -25
- package/src/module/module/entity/module-action.entity.ts +17 -17
- package/src/module/module/entity/module.entity.ts +52 -52
- package/src/module/module/module.module.ts +42 -42
- package/src/module/module/repository/menu.repository.ts +184 -184
- package/src/module/module/repository/module-access.repository.ts +344 -344
- package/src/module/module/service/menu.service.ts +82 -82
- package/src/module/module/service/module-access.service.ts +194 -209
- package/src/module/notification/controller/notification.controller.ts +58 -58
- package/src/module/notification/controller/otp.controller.ts +117 -117
- package/src/module/notification/entity/notification.entity.ts +26 -26
- package/src/module/notification/entity/otp.entity.ts +28 -28
- package/src/module/notification/firebase-admin.config.ts +22 -22
- package/src/module/notification/notification.module.ts +69 -69
- package/src/module/notification/repository/otp.repository.ts +27 -27
- package/src/module/notification/service/email.service.ts +127 -127
- package/src/module/notification/service/notification.service.ts +160 -163
- package/src/module/notification/service/otp.service.ts +132 -133
- package/src/module/third-party-module/entity/third-party-api-registry.entity.ts +52 -52
- package/src/module/third-party-module/repository/third-party-api-registry.repository.ts +20 -20
- package/src/module/third-party-module/service/api-registry.service.ts +13 -13
- package/src/module/third-party-module/third-party.module.ts +12 -12
- package/src/module/user/controller/login.controller.ts +197 -198
- package/src/module/user/controller/user.controller.ts +40 -40
- package/src/module/user/dto/create-user.dto.ts +62 -62
- package/src/module/user/dto/update-user.dto.ts +4 -4
- package/src/module/user/entity/role.entity.ts +33 -33
- package/src/module/user/entity/user-role-mapping.entity.ts +38 -38
- package/src/module/user/entity/user-session.entity.ts +73 -73
- package/src/module/user/entity/user.entity.ts +59 -59
- package/src/module/user/repository/role.repository.ts +96 -96
- package/src/module/user/repository/user-role-mapping.repository.ts +126 -126
- package/src/module/user/repository/user.repository.ts +50 -50
- package/src/module/user/repository/userSession.repository.ts +33 -33
- package/src/module/user/service/login.service.ts +304 -326
- package/src/module/user/service/role.service.ts +189 -189
- package/src/module/user/service/user-role-mapping.service.ts +98 -98
- package/src/module/user/service/user-session.service.ts +168 -168
- package/src/module/user/service/user.service.ts +365 -368
- package/src/module/user/user.module.ts +65 -65
- package/src/module/workflow/controller/action-category.controller.ts +54 -54
- package/src/module/workflow/controller/action-resource-mapping.controller.ts +23 -23
- package/src/module/workflow/controller/action-template-mapping.controller.ts +35 -35
- package/src/module/workflow/controller/action.controller.ts +111 -111
- package/src/module/workflow/controller/activity-log.controller.ts +55 -55
- package/src/module/workflow/controller/comm-template.controller.ts +43 -43
- package/src/module/workflow/controller/entity-modification.controller.ts +35 -35
- package/src/module/workflow/controller/form-master.controller.ts +43 -43
- package/src/module/workflow/controller/stage-group.controller.ts +48 -48
- package/src/module/workflow/controller/stage.controller.ts +50 -50
- package/src/module/workflow/controller/task.controller.ts +77 -77
- package/src/module/workflow/controller/workflow-list-master.controller.ts +44 -44
- package/src/module/workflow/controller/workflow-meta.controller.ts +80 -80
- package/src/module/workflow/controller/workflow.controller.ts +67 -67
- package/src/module/workflow/entity/action-category.entity.ts +38 -38
- package/src/module/workflow/entity/action-data.entity.ts +55 -55
- package/src/module/workflow/entity/action-resources-mapping.entity.ts +29 -29
- package/src/module/workflow/entity/action-template-mapping.entity.ts +17 -17
- package/src/module/workflow/entity/action.entity.ts +53 -53
- package/src/module/workflow/entity/activity-log.entity.ts +43 -43
- package/src/module/workflow/entity/comm-template.entity.ts +43 -43
- package/src/module/workflow/entity/entity-modification.entity.ts +38 -38
- package/src/module/workflow/entity/form.entity.ts +25 -25
- package/src/module/workflow/entity/stage-action-mapping.entity.ts +17 -17
- package/src/module/workflow/entity/stage-group.entity.ts +23 -23
- package/src/module/workflow/entity/stage-movement-data.entity.ts +38 -38
- package/src/module/workflow/entity/stage.entity.ts +20 -20
- package/src/module/workflow/entity/task-data.entity.ts +88 -88
- package/src/module/workflow/entity/template-attach-mapper.entity.ts +30 -30
- package/src/module/workflow/entity/workflow-data.entity.ts +11 -11
- package/src/module/workflow/entity/workflow-level-mapping.entity.ts +18 -18
- package/src/module/workflow/entity/workflow.entity.ts +20 -20
- package/src/module/workflow/repository/action-category.repository.ts +79 -79
- package/src/module/workflow/repository/action-data.repository.ts +334 -334
- package/src/module/workflow/repository/action.repository.ts +323 -323
- package/src/module/workflow/repository/activity-log.repository.ts +148 -148
- package/src/module/workflow/repository/comm-template.repository.ts +149 -149
- package/src/module/workflow/repository/form-master.repository.ts +59 -59
- package/src/module/workflow/repository/stage-group.repository.ts +176 -176
- package/src/module/workflow/repository/stage-movement.repository.ts +244 -244
- package/src/module/workflow/repository/stage.repository.ts +172 -172
- package/src/module/workflow/repository/task.repository.ts +134 -134
- package/src/module/workflow/repository/workflow.repository.ts +42 -42
- package/src/module/workflow/service/action-category.service.ts +33 -33
- package/src/module/workflow/service/action-data.service.ts +62 -62
- package/src/module/workflow/service/action-resources-mapping.service.ts +10 -10
- package/src/module/workflow/service/action-template-mapping.service.ts +106 -106
- package/src/module/workflow/service/action.service.ts +279 -279
- package/src/module/workflow/service/activity-log.service.ts +107 -107
- package/src/module/workflow/service/comm-template.service.ts +180 -180
- package/src/module/workflow/service/entity-modification.service.ts +67 -67
- package/src/module/workflow/service/form-master.service.ts +35 -35
- package/src/module/workflow/service/populate-workflow.service.ts +303 -303
- package/src/module/workflow/service/stage-action-mapping.service.ts +5 -5
- package/src/module/workflow/service/stage-group.service.ts +319 -319
- package/src/module/workflow/service/stage.service.ts +199 -199
- package/src/module/workflow/service/task.service.ts +569 -569
- package/src/module/workflow/service/workflow-list-master.service.ts +60 -60
- package/src/module/workflow/service/workflow-meta.service.ts +654 -654
- package/src/module/workflow/service/workflow.service.ts +205 -205
- package/src/module/workflow/workflow.module.ts +176 -176
- package/src/module/workflow-automation/SCHEDULING_GUIDE.md +145 -145
- package/src/module/workflow-automation/controller/workflow-automation.controller.ts +43 -43
- package/src/module/workflow-automation/entity/workflow-automation-action.entity.ts +26 -26
- package/src/module/workflow-automation/entity/workflow-automation.entity.ts +40 -40
- package/src/module/workflow-automation/interface/action.decorator.ts +7 -7
- package/src/module/workflow-automation/interface/action.interface.ts +5 -5
- package/src/module/workflow-automation/service/action-registery.service.ts +35 -35
- package/src/module/workflow-automation/service/schedule-handler.service.ts +149 -149
- package/src/module/workflow-automation/service/workflow-automation-engine.service.ts +214 -214
- package/src/module/workflow-automation/service/workflow-automation.service.ts +508 -508
- package/src/module/workflow-automation/workflow-automation.module.ts +47 -47
- package/src/module/workflow-schedule/INSTALLATION.md +244 -244
- package/src/module/workflow-schedule/MULTI_PROJECT_GUIDE.md +196 -196
- package/src/module/workflow-schedule/README.md +422 -422
- package/src/module/workflow-schedule/constants/schedule.constants.ts +48 -48
- package/src/module/workflow-schedule/controller/workflow-schedule.controller.ts +255 -255
- package/src/module/workflow-schedule/docs/CLAUDE_CODE_GUIDE.md +510 -510
- package/src/module/workflow-schedule/docs/CLAUDE_CODE_PROMPT.md +362 -362
- package/src/module/workflow-schedule/docs/RUN_CLAUDE_CODE.sh +68 -68
- package/src/module/workflow-schedule/dto/create-schedule.dto.ts +147 -147
- package/src/module/workflow-schedule/dto/get-execution-logs.dto.ts +119 -119
- package/src/module/workflow-schedule/dto/update-schedule.dto.ts +96 -96
- package/src/module/workflow-schedule/entities/scheduled-workflow.entity.ts +148 -148
- package/src/module/workflow-schedule/entities/workflow-execution-log.entity.ts +154 -154
- package/src/module/workflow-schedule/interfaces/schedule-job-data.interface.ts +53 -53
- package/src/module/workflow-schedule/interfaces/workflow-schedule-options.interface.ts +12 -12
- package/src/module/workflow-schedule/processors/schedule.processor.ts +584 -584
- package/src/module/workflow-schedule/service/workflow-schedule.service.ts +600 -600
- package/src/module/workflow-schedule/workflow-schedule.module.ts +67 -67
- package/src/resources/dev.properties.yaml +31 -30
- package/src/resources/local.properties.yaml +27 -27
- package/src/resources/properties.module.ts +12 -12
- package/src/resources/properties.yaml.ts +11 -11
- package/src/resources/uat.properties.yaml +31 -31
- package/src/table.config.ts +130 -130
- package/src/utils/dto/excel-data.dto.ts +14 -14
- package/src/utils/dto/excelsheet-data.dto.ts +5 -5
- package/src/utils/service/base64util.service.ts +18 -18
- package/src/utils/service/clockIDGenUtil.service.ts +21 -21
- package/src/utils/service/codeGenerator.service.ts +22 -22
- package/src/utils/service/dateUtil.service.ts +17 -17
- package/src/utils/service/encryptUtil.service.ts +97 -97
- package/src/utils/service/excel-helper.service.ts +72 -72
- package/src/utils/service/excelUtil.service.ts +15 -15
- package/src/utils/service/file-util.service.ts +11 -11
- package/src/utils/service/json-util.service.ts +23 -23
- package/src/utils/service/loggingUtil.service.ts +88 -88
- package/src/utils/service/reflection-helper.service.ts +62 -62
- package/src/utils/service/wbsCodeGen.service.ts +8 -8
- package/src/utils/utils.module.ts +27 -27
- package/tsconfig.build.json +4 -4
- package/tsconfig.json +24 -24
- package/dist/module/entity_json/entity/entityJson.entity.d.ts +0 -10
- package/dist/module/entity_json/entity/entityJson.entity.js +0 -55
- package/dist/module/entity_json/entity/entityJson.entity.js.map +0 -1
- package/src/module/entity_json/entity/entityJson.entity.ts +0 -39
|
@@ -4,15 +4,5 @@ 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
|
|
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
|
+
}, mode?: 'flat_json' | 'dropdown'): Promise<any[] | Record<string, null>>;
|
|
18
8
|
}
|
|
@@ -24,10 +24,6 @@ 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
|
-
}
|
|
31
27
|
};
|
|
32
28
|
exports.EntityJSONController = EntityJSONController;
|
|
33
29
|
__decorate([
|
|
@@ -40,16 +36,6 @@ __decorate([
|
|
|
40
36
|
__metadata("design:paramtypes", [String, Object, String]),
|
|
41
37
|
__metadata("design:returntype", Promise)
|
|
42
38
|
], 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);
|
|
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;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;CAiBF,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;+BAhBU,oBAAoB;IADhC,IAAA,mBAAU,EAAC,aAAa,CAAC;qCAEwB,uCAAiB;GADtD,oBAAoB,CAiChC"}
|
|
@@ -14,13 +14,12 @@ 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
17
|
let EntityJSONModule = class EntityJSONModule {
|
|
19
18
|
};
|
|
20
19
|
exports.EntityJSONModule = EntityJSONModule;
|
|
21
20
|
exports.EntityJSONModule = EntityJSONModule = __decorate([
|
|
22
21
|
(0, common_1.Module)({
|
|
23
|
-
imports: [entity_module_1.EntityModule, typeorm_1.TypeOrmModule.forFeature([
|
|
22
|
+
imports: [entity_module_1.EntityModule, typeorm_1.TypeOrmModule.forFeature([]), filter_module_1.FilterModule, utils_module_1.UtilsModule],
|
|
24
23
|
controllers: [entity_json_controller_1.EntityJSONController],
|
|
25
24
|
providers: [entity_json_service_1.EntityJSONService],
|
|
26
25
|
exports: [],
|
|
@@ -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;AAQ9C,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,EAAE,CAAC,EAAC,4BAAY,EAAC,0BAAW,CAAC;QAC9E,WAAW,EAAE,CAAC,6CAAoB,CAAC;QACnC,SAAS,EAAE,CAAC,uCAAiB,CAAC;QAC9B,OAAO,EAAE,EAAE;KACZ,CAAC;GACW,gBAAgB,CAAG"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { FilterService } from 'src/module/filter/service/filter.service';
|
|
2
|
-
import { AttributeMaster } from 'src/module/meta/entity/attribute-master.entity';
|
|
3
2
|
import { EntityServiceImpl } from 'src/module/meta/service/entity-service-impl.service';
|
|
4
3
|
import { LoggingService } from 'src/utils/service/loggingUtil.service';
|
|
5
4
|
import { DataSource } from 'typeorm';
|
|
@@ -8,15 +7,8 @@ export declare class EntityJSONService extends EntityServiceImpl {
|
|
|
8
7
|
private readonly filterService;
|
|
9
8
|
private readonly loggerService;
|
|
10
9
|
constructor(dataSource: DataSource, filterService: FilterService, loggerService: LoggingService);
|
|
11
|
-
getAttributeForFlatJSON(entityType: string, loggedInUser: any, flag?: 'flat_json' | 'dropdown'
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
mainAttributes: AttributeMaster[];
|
|
15
|
-
relatedAttributes: AttributeMaster[];
|
|
16
|
-
linkedAttributes: any[];
|
|
17
|
-
};
|
|
18
|
-
}>;
|
|
19
|
-
updateEntityJSON(entityType: string, entityId: number, loggedInUser: any): Promise<Record<string, null> | null>;
|
|
20
|
-
private mergeEntityDataIntoFlatJson;
|
|
10
|
+
getAttributeForFlatJSON(entityType: string, loggedInUser: any, flag?: 'flat_json' | 'dropdown'): Promise<any[] | Record<string, null>>;
|
|
11
|
+
updateEntityJSON(entityType: string, entityId: number, loggedInUser: any): Promise<any[] | Record<string, null>>;
|
|
12
|
+
private mergeIntoFlatJson;
|
|
21
13
|
private applyLinkedFilterUsingSavedFilter;
|
|
22
14
|
}
|
|
@@ -12,7 +12,6 @@ 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");
|
|
16
15
|
const attribute_master_entity_1 = require("../../meta/entity/attribute-master.entity");
|
|
17
16
|
const entity_relation_entity_1 = require("../../meta/entity/entity-relation.entity");
|
|
18
17
|
const entity_service_impl_service_1 = require("../../meta/service/entity-service-impl.service");
|
|
@@ -31,7 +30,7 @@ let EntityJSONService = class EntityJSONService extends entity_service_impl_serv
|
|
|
31
30
|
const mainAttributes = await this.dataSource
|
|
32
31
|
.getRepository(attribute_master_entity_1.AttributeMaster)
|
|
33
32
|
.createQueryBuilder('attr')
|
|
34
|
-
.select(['attr.id', 'attr.name', 'attr.
|
|
33
|
+
.select(['attr.id', 'attr.name', 'attr.attribute_key'])
|
|
35
34
|
.where('attr.mapped_entity_type = :entityType', { entityType })
|
|
36
35
|
.andWhere('attr.organization_id = :orgId', { orgId })
|
|
37
36
|
.getMany();
|
|
@@ -42,32 +41,22 @@ let EntityJSONService = class EntityJSONService extends entity_service_impl_serv
|
|
|
42
41
|
.select(['rel.target_entity_type'])
|
|
43
42
|
.where('rel.source_entity_type = :entityType', { entityType })
|
|
44
43
|
.andWhere('rel.organization_id = :orgId', { orgId })
|
|
45
|
-
.andWhere('rel.relation_type = :relationType', {
|
|
46
|
-
relationType: 'ONE_TO_ONE',
|
|
47
|
-
})
|
|
44
|
+
.andWhere('rel.relation_type = :relationType', { relationType: 'ONE_TO_ONE' })
|
|
48
45
|
.getRawMany();
|
|
49
|
-
const relatedTypesList = relatedEntityTypes.map(
|
|
46
|
+
const relatedTypesList = relatedEntityTypes.map(x => x.rel_target_entity_type);
|
|
50
47
|
await this.loggerService.log('debug', 'EntityJSONService', 'getAttributeForFlatJSON', `Found ${relatedTypesList.length} ONE-TO-ONE related entity types`);
|
|
51
48
|
const relatedAttributes = relatedTypesList.length
|
|
52
49
|
? await this.dataSource
|
|
53
50
|
.getRepository(attribute_master_entity_1.AttributeMaster)
|
|
54
51
|
.createQueryBuilder('attr')
|
|
55
|
-
.select([
|
|
56
|
-
'attr.
|
|
57
|
-
'attr.name',
|
|
58
|
-
'attr.flat_json_key',
|
|
59
|
-
'attr.mapped_entity_type',
|
|
60
|
-
'attr.attribute_key',
|
|
61
|
-
])
|
|
62
|
-
.where('attr.mapped_entity_type IN (:...types)', {
|
|
63
|
-
types: relatedTypesList,
|
|
64
|
-
})
|
|
52
|
+
.select(['attr.id', 'attr.name', 'attr.attribute_key', 'attr.mapped_entity_type'])
|
|
53
|
+
.where('attr.mapped_entity_type IN (:...types)', { types: relatedTypesList })
|
|
65
54
|
.andWhere('attr.organization_id = :orgId', { orgId })
|
|
66
55
|
.getMany()
|
|
67
56
|
: [];
|
|
68
57
|
await this.loggerService.log('debug', 'EntityJSONService', 'getAttributeForFlatJSON', `Loaded ${relatedAttributes.length} related attributes`);
|
|
69
58
|
const linkedAttributes = await this.dataSource
|
|
70
|
-
.getRepository(
|
|
59
|
+
.getRepository('frm_linked_attribute')
|
|
71
60
|
.createQueryBuilder('fla')
|
|
72
61
|
.innerJoin(attribute_master_entity_1.AttributeMaster, 'attr', 'fla.applicable_entity_type = attr.mapped_entity_type AND fla.applicable_attribute_key = attr.attribute_key')
|
|
73
62
|
.select([
|
|
@@ -79,106 +68,75 @@ let EntityJSONService = class EntityJSONService extends entity_service_impl_serv
|
|
|
79
68
|
.where('attr.organization_id = :orgId', { orgId })
|
|
80
69
|
.getRawMany();
|
|
81
70
|
await this.loggerService.log('debug', 'EntityJSONService', 'getAttributeForFlatJSON', `Loaded ${linkedAttributes.length} linked attributes`);
|
|
82
|
-
if (flag === 'flat_json'
|
|
71
|
+
if (flag === 'flat_json') {
|
|
83
72
|
const result = {};
|
|
84
|
-
mainAttributes.forEach(
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
result[attr.flat_json_key] = null;
|
|
91
|
-
});
|
|
92
|
-
linkedAttributes.forEach((link) => {
|
|
93
|
-
if (link.applicable_attribute_key)
|
|
94
|
-
result[link.applicable_attribute_key] = null;
|
|
95
|
-
});
|
|
96
|
-
if (flag === 'all')
|
|
97
|
-
return { flat_json: result, attributes: { mainAttributes, relatedAttributes, linkedAttributes } };
|
|
73
|
+
mainAttributes.forEach(attr => { if (attr.attribute_key)
|
|
74
|
+
result[attr.attribute_key] = null; });
|
|
75
|
+
relatedAttributes.forEach(attr => { if (attr.attribute_key)
|
|
76
|
+
result[attr.attribute_key] = null; });
|
|
77
|
+
linkedAttributes.forEach(link => { if (link.applicable_attribute_key)
|
|
78
|
+
result[link.applicable_attribute_key] = null; });
|
|
98
79
|
return result;
|
|
99
80
|
}
|
|
100
81
|
const dropdown = [];
|
|
101
|
-
dropdown.push(...mainAttributes.map(
|
|
102
|
-
dropdown.push(...relatedAttributes.map(
|
|
103
|
-
|
|
104
|
-
value: a.
|
|
105
|
-
})
|
|
106
|
-
if (linkedAttributes.length > 0) {
|
|
107
|
-
dropdown.push({
|
|
108
|
-
...linkedAttributes.map((a) => ({
|
|
109
|
-
label: a.name,
|
|
110
|
-
value: a.attribute_key,
|
|
111
|
-
})),
|
|
112
|
-
});
|
|
113
|
-
}
|
|
82
|
+
dropdown.push(...mainAttributes.map(a => ({ label: a.name, value: a.attribute_key })));
|
|
83
|
+
dropdown.push(...relatedAttributes.map(a => ({ label: a.name, value: a.attribute_key })));
|
|
84
|
+
dropdown.push({
|
|
85
|
+
linked_attributes: linkedAttributes.map(a => ({ label: a.attr_name, value: a.attr_attribute_key })),
|
|
86
|
+
});
|
|
114
87
|
return dropdown;
|
|
115
88
|
}
|
|
116
89
|
async updateEntityJSON(entityType, entityId, loggedInUser) {
|
|
117
90
|
await this.loggerService.log('info', 'EntityJSONService', 'updateEntityJSON', `Building flat JSON for entity: ${entityType}#${entityId}`);
|
|
118
|
-
const
|
|
119
|
-
if (!response ||
|
|
120
|
-
!('flat_json' in response) ||
|
|
121
|
-
!('attributes' in response) ||
|
|
122
|
-
!response.attributes) {
|
|
123
|
-
await this.loggerService.log('error', 'EntityJSONService', 'updateEntityJSON', `getAttributeForFlatJSON() did not return expected structure`);
|
|
124
|
-
return null;
|
|
125
|
-
}
|
|
126
|
-
const { flat_json: flatJson, attributes } = response;
|
|
91
|
+
const flatJson = await this.getAttributeForFlatJSON(entityType, loggedInUser, 'flat_json');
|
|
127
92
|
if (!flatJson) {
|
|
128
93
|
await this.loggerService.log('error', 'EntityJSONService', 'updateEntityJSON', `Flat JSON template not found for entity: ${entityType}`);
|
|
129
|
-
|
|
94
|
+
throw new Error(`Flat JSON template not found for ${entityType}`);
|
|
130
95
|
}
|
|
131
|
-
const safeAttributes = {
|
|
132
|
-
mainAttributes: attributes.mainAttributes || [],
|
|
133
|
-
relatedAttributes: attributes.relatedAttributes || [],
|
|
134
|
-
linkedAttributes: attributes.linkedAttributes || [],
|
|
135
|
-
};
|
|
136
|
-
const attrMap = {};
|
|
137
|
-
const allAttrs = [
|
|
138
|
-
...safeAttributes.mainAttributes,
|
|
139
|
-
...safeAttributes.relatedAttributes,
|
|
140
|
-
...safeAttributes.linkedAttributes,
|
|
141
|
-
];
|
|
142
|
-
allAttrs.forEach(attr => {
|
|
143
|
-
if (attr.attribute_key) {
|
|
144
|
-
attrMap[attr.attribute_key] = attr.flat_json_key || attr.attribute_key;
|
|
145
|
-
}
|
|
146
|
-
});
|
|
147
96
|
const mainData = await this.getResolvedEntityData(entityType, entityId, loggedInUser);
|
|
148
|
-
this.
|
|
97
|
+
this.mergeIntoFlatJson(flatJson, mainData);
|
|
98
|
+
await this.loggerService.log('debug', 'EntityJSONService', 'updateEntityJSON', 'Merged main entity data into flat JSON');
|
|
149
99
|
const relations = await this.dataSource
|
|
150
100
|
.getRepository('frm_entity_relation_data')
|
|
151
101
|
.createQueryBuilder('erd')
|
|
152
|
-
.select([
|
|
153
|
-
'erd.target_entity_id AS target_entity_id',
|
|
154
|
-
'erd.target_entity_type AS target_entity_type',
|
|
155
|
-
])
|
|
102
|
+
.select(['erd.target_entity_id AS target_entity_id', 'erd.target_entity_type AS target_entity_type'])
|
|
156
103
|
.where('erd.source_entity_type = :entityType', { entityType })
|
|
157
104
|
.andWhere('erd.source_entity_id = :entityId', { entityId })
|
|
158
105
|
.andWhere('erd.relation_type = :rt', { rt: 'ONE_TO_ONE' })
|
|
159
106
|
.getRawMany();
|
|
107
|
+
await this.loggerService.log('debug', 'EntityJSONService', 'updateEntityJSON', `Found ${relations.length} ONE-TO-ONE relations`);
|
|
160
108
|
for (const rel of relations) {
|
|
161
|
-
const
|
|
162
|
-
this.
|
|
109
|
+
const related = await this.getResolvedEntityData(rel.target_entity_type, rel.target_entity_id, loggedInUser);
|
|
110
|
+
this.mergeIntoFlatJson(flatJson, related);
|
|
111
|
+
await this.loggerService.log('debug', 'EntityJSONService', 'updateEntityJSON', `Merged related entity ${rel.target_entity_type}#${rel.target_entity_id}`);
|
|
163
112
|
}
|
|
164
|
-
await this.dataSource
|
|
165
|
-
|
|
166
|
-
|
|
113
|
+
const linkedAttrs = await this.dataSource
|
|
114
|
+
.getRepository('frm_linked_attributes_table')
|
|
115
|
+
.createQueryBuilder('la')
|
|
116
|
+
.where('la.entity_type = :entityType', { entityType })
|
|
117
|
+
.getMany();
|
|
118
|
+
await this.loggerService.log('debug', 'EntityJSONService', 'updateEntityJSON', `Found ${linkedAttrs.length} linked attributes`);
|
|
119
|
+
for (const la of linkedAttrs) {
|
|
120
|
+
const mappingValue = flatJson[la.mapping_attribute];
|
|
121
|
+
const result = await this.applyLinkedFilterUsingSavedFilter(la.child_entity_type, la.saved_filter_code, la.filter_attribute, mappingValue, la.target_attribute, loggedInUser);
|
|
122
|
+
flatJson[la.target_attribute] = result;
|
|
123
|
+
await this.loggerService.log('debug', 'EntityJSONService', 'updateEntityJSON', `Linked attribute ${la.target_attribute} set from child entity ${la.child_entity_type}`);
|
|
124
|
+
}
|
|
125
|
+
await this.dataSource.query(`INSERT INTO frm_entity_json (entity_type, entity_id, json_data, created_by)
|
|
126
|
+
VALUES (?, ?, ?, ?)
|
|
127
|
+
ON DUPLICATE KEY UPDATE json_data = VALUES(json_data), updated_by = VALUES(created_by)`, [entityType, entityId, JSON.stringify(flatJson), loggedInUser.id]);
|
|
128
|
+
await this.loggerService.log('info', 'EntityJSONService', 'updateEntityJSON', `Flat JSON saved for entity: ${entityType}#${entityId}`);
|
|
167
129
|
return flatJson;
|
|
168
130
|
}
|
|
169
|
-
|
|
170
|
-
for (const
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
if (flatJson.hasOwnProperty(flatKey)) {
|
|
174
|
-
flatJson[flatKey] = record[key];
|
|
175
|
-
}
|
|
131
|
+
mergeIntoFlatJson(flatJson, entityData) {
|
|
132
|
+
for (const key of Object.keys(entityData)) {
|
|
133
|
+
if (flatJson.hasOwnProperty(key)) {
|
|
134
|
+
flatJson[key] = entityData[key];
|
|
176
135
|
}
|
|
177
136
|
}
|
|
178
137
|
}
|
|
179
138
|
async applyLinkedFilterUsingSavedFilter(childEntityType, savedFilterCode, childFilterAttribute, mappingValue, targetAttribute, loggedInUser) {
|
|
180
|
-
if (!savedFilterCode &&
|
|
181
|
-
(mappingValue === null || mappingValue === undefined))
|
|
139
|
+
if (!savedFilterCode && (mappingValue === null || mappingValue === undefined))
|
|
182
140
|
return null;
|
|
183
141
|
const dto = {
|
|
184
142
|
entity_type: childEntityType,
|
|
@@ -187,20 +145,18 @@ let EntityJSONService = class EntityJSONService extends entity_service_impl_serv
|
|
|
187
145
|
page: 1,
|
|
188
146
|
size: 1,
|
|
189
147
|
};
|
|
190
|
-
if (mappingValue !== null &&
|
|
191
|
-
mappingValue !== undefined &&
|
|
192
|
-
mappingValue !== '') {
|
|
148
|
+
if (mappingValue !== null && mappingValue !== undefined && mappingValue !== '') {
|
|
193
149
|
dto.quickFilter = [
|
|
194
150
|
{
|
|
195
151
|
filter_attribute: childFilterAttribute,
|
|
196
152
|
filter_operator: 'equal',
|
|
197
153
|
filter_value: mappingValue,
|
|
198
|
-
}
|
|
154
|
+
}
|
|
199
155
|
];
|
|
200
156
|
}
|
|
201
157
|
const result = await this.filterService.applyFilter(dto);
|
|
202
158
|
const rows = result?.data?.entity_list || [];
|
|
203
|
-
return rows.length ?
|
|
159
|
+
return rows.length ? rows[0][targetAttribute] ?? null : null;
|
|
204
160
|
}
|
|
205
161
|
};
|
|
206
162
|
exports.EntityJSONService = EntityJSONService;
|
|
@@ -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,
|
|
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;AAG9B,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,+CAAiB;IACtD,YACmB,UAAsB,EACtB,aAA4B,EAC5B,aAA6B;QAE9C,KAAK,EAAE,CAAC;QAJS,eAAU,GAAV,UAAU,CAAY;QACtB,kBAAa,GAAb,aAAa,CAAe;QAC5B,kBAAa,GAAb,aAAa,CAAgB;IAGhD,CAAC;IAED,KAAK,CAAC,uBAAuB,CAC3B,UAAkB,EAClB,YAAiB,EACjB,IAA+B;QAE/B,MAAM,KAAK,GAAG,YAAY,CAAC,eAAe,CAAC;QAC3C,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,CAC1B,MAAM,EACN,mBAAmB,EACnB,yBAAyB,EACzB,kCAAkC,UAAU,UAAU,KAAK,EAAE,CAC9D,CAAC;QAEF,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,oBAAo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AAiB;4BAAjB,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;qCAGoB,oBAAU;QACP,8BAAa;QACb,oCAAc;GAJrC,iBAAiB,CA+P7B"}
|
|
@@ -117,10 +117,10 @@ let SavedFilterRepositoryService = class SavedFilterRepositoryService {
|
|
|
117
117
|
}));
|
|
118
118
|
}
|
|
119
119
|
async getSavedFilterByCode(code, loggedInUser) {
|
|
120
|
-
const [filterMaster] = await this.dataSource.query(`SELECT id, name, code
|
|
121
|
-
FROM frm_saved_filter_master
|
|
122
|
-
WHERE code =
|
|
123
|
-
LIMIT 1
|
|
120
|
+
const [filterMaster] = await this.dataSource.query(`SELECT id, name, code
|
|
121
|
+
FROM frm_saved_filter_master
|
|
122
|
+
WHERE code = $1 AND organization_id = $2
|
|
123
|
+
LIMIT 1
|
|
124
124
|
`, [code, loggedInUser.organization_id]);
|
|
125
125
|
if (!filterMaster) {
|
|
126
126
|
return null;
|
|
@@ -20,9 +20,9 @@ let FilterEvaluatorService = class FilterEvaluatorService {
|
|
|
20
20
|
}
|
|
21
21
|
async evaluateTriggerAttributes(oldEntity, newEntity, savedFilterCode) {
|
|
22
22
|
console.log('IN FILTER EVALUATOR SERVICE');
|
|
23
|
-
const triggerFilters = await this.dataSource.query(`SELECT *
|
|
24
|
-
FROM frm_saved_filter_detail
|
|
25
|
-
WHERE mapped_filter_code =
|
|
23
|
+
const triggerFilters = await this.dataSource.query(`SELECT *
|
|
24
|
+
FROM frm_saved_filter_detail
|
|
25
|
+
WHERE mapped_filter_code = $1`, [savedFilterCode]);
|
|
26
26
|
if (!triggerFilters || triggerFilters.length === 0) {
|
|
27
27
|
return true;
|
|
28
28
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter-evaluator.service.js","sourceRoot":"","sources":["../../../../src/module/filter/service/filter-evaluator.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,qCAAqC;AAErC,qDAAiD;AAG1C,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IACjC,YACmB,UAAsB,EACtB,aAA4B;QAD5B,eAAU,GAAV,UAAU,CAAY;QACtB,kBAAa,GAAb,aAAa,CAAe;IAC5C,CAAC;IASJ,KAAK,CAAC,yBAAyB,CAC7B,SAAqC,EACrC,SAA8B,EAC9B,eAAuB;QAGvB,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;QAC3C,MAAM,cAAc,GAAwB,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CACrE;;
|
|
1
|
+
{"version":3,"file":"filter-evaluator.service.js","sourceRoot":"","sources":["../../../../src/module/filter/service/filter-evaluator.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,qCAAqC;AAErC,qDAAiD;AAG1C,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IACjC,YACmB,UAAsB,EACtB,aAA4B;QAD5B,eAAU,GAAV,UAAU,CAAY;QACtB,kBAAa,GAAb,aAAa,CAAe;IAC5C,CAAC;IASJ,KAAK,CAAC,yBAAyB,CAC7B,SAAqC,EACrC,SAA8B,EAC9B,eAAuB;QAGvB,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;QAC3C,MAAM,cAAc,GAAwB,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CACrE;;qCAE+B,EAC/B,CAAC,eAAe,CAAC,CAClB,CAAC;QAGF,IAAI,CAAC,cAAc,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACnD,OAAO,IAAI,CAAC;QACd,CAAC;QAED,MAAM,QAAQ,GAAG,SAAS,IAAI,EAAE,CAAC;QAGjC,KAAK,MAAM,MAAM,IAAI,cAAc,EAAE,CAAC;YACpC,MAAM,IAAI,GAAG,MAAM,CAAC,gBAAgB,CAAC;YACrC,MAAM,aAAa,GAAG,MAAM,CAAC,YAAY,CAAC;YAE1C,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;YAC9B,MAAM,MAAM,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;YAE/B,IAAI,MAAM,KAAK,MAAM,IAAI,CAAC,CAAC,aAAa,IAAI,MAAM,IAAI,aAAa,CAAC,EAAE,CAAC;gBACrE,OAAO,IAAI,CAAC;YACd,CAAC;QACH,CAAC;QAGD,OAAO,KAAK,CAAC;IACf,CAAC;IASD,KAAK,CAAC,gBAAgB,CACpB,UAAkB,EAClB,kBAA0B,EAC1B,QAAgB,EAChB,YAAiB;QAEjB,IAAI,CAAC,kBAAkB;YAAE,OAAO,IAAI,CAAC;QAErC,MAAM,aAAa,GAAG;YACpB,WAAW,EAAE,UAAU;YACvB,eAAe,EAAE,kBAAkB;YACnC,WAAW,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE;YAC7B,IAAI,EAAE,CAAC;YACP,IAAI,EAAE,CAAC;YACP,YAAY,EAAE,YAAY,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE;SACjD,CAAC;QAET,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,kBAAkB,CAAC,aAAa,CAAC,CAAC;QAE1E,OAAO,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,GAAG,CAAC,CAAC;IAC/C,CAAC;CACF,CAAA;AA/EY,wDAAsB;iCAAtB,sBAAsB;IADlC,IAAA,mBAAU,GAAE;qCAGoB,oBAAU;QACP,8BAAa;GAHpC,sBAAsB,CA+ElC"}
|
|
@@ -6,6 +6,7 @@ import { SavedFilterService } from './saved-filter.service';
|
|
|
6
6
|
import { EntityRelationService } from 'src/module/meta/service/entity-relation.service';
|
|
7
7
|
import { ResolverService } from 'src/module/meta/service/resolver.service';
|
|
8
8
|
import { LoggingService } from 'src/utils/service/loggingUtil.service';
|
|
9
|
+
import { ConfigService } from '@nestjs/config';
|
|
9
10
|
export declare class FilterService {
|
|
10
11
|
private dataSource;
|
|
11
12
|
private readonly attributeMasterService;
|
|
@@ -14,7 +15,8 @@ export declare class FilterService {
|
|
|
14
15
|
private readonly entityRelationService;
|
|
15
16
|
private readonly resolverService;
|
|
16
17
|
protected readonly loggingService: LoggingService;
|
|
17
|
-
|
|
18
|
+
private readonly configService;
|
|
19
|
+
constructor(dataSource: DataSource, attributeMasterService: AttributeMasterService, entityMasterService: EntityMasterService, savedFilterService: SavedFilterService, entityRelationService: EntityRelationService, resolverService: ResolverService, loggingService: LoggingService, configService: ConfigService);
|
|
18
20
|
private readonly skipAppCodeFilterEntities;
|
|
19
21
|
private readonly skipOrgFilterEntities;
|
|
20
22
|
private gettab_value_counts;
|
|
@@ -67,4 +69,5 @@ export declare class FilterService {
|
|
|
67
69
|
private buildSelectCondition;
|
|
68
70
|
private buildMultiSelectCondition;
|
|
69
71
|
private buildYearCondition;
|
|
72
|
+
queryWithSchema(sql: string, params?: any[]): Promise<any>;
|
|
70
73
|
}
|