rez_core 6.5.28 → 6.5.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app.module.js +3 -3
- package/dist/app.module.js.map +1 -1
- package/dist/core.module.js +38 -60
- package/dist/core.module.js.map +1 -1
- package/dist/migrations/1732612800000-AddEntityJsonGinIndex.d.ts +6 -0
- package/dist/migrations/1732612800000-AddEntityJsonGinIndex.js +32 -0
- package/dist/migrations/1732612800000-AddEntityJsonGinIndex.js.map +1 -0
- package/dist/module/auth/strategies/jwt.strategy.d.ts +1 -2
- package/dist/module/auth/strategies/jwt.strategy.js +2 -3
- package/dist/module/auth/strategies/jwt.strategy.js.map +1 -1
- package/dist/module/dashboard/dashboard.module.js +1 -1
- package/dist/module/dashboard/dashboard.module.js.map +1 -1
- package/dist/module/dashboard/service/dashboard.service.js +3 -2
- package/dist/module/dashboard/service/dashboard.service.js.map +1 -1
- package/dist/module/enterprise/controller/organization.controller.d.ts +4 -12
- package/dist/module/enterprise/controller/organization.controller.js +8 -64
- package/dist/module/enterprise/controller/organization.controller.js.map +1 -1
- package/dist/module/enterprise/enterprise.module.js +15 -10
- package/dist/module/enterprise/enterprise.module.js.map +1 -1
- package/dist/module/enterprise/entity/enterprise.entity.d.ts +3 -1
- package/dist/module/enterprise/entity/enterprise.entity.js +12 -4
- package/dist/module/enterprise/entity/enterprise.entity.js.map +1 -1
- package/dist/module/enterprise/entity/organization-app-mapping.entity.d.ts +1 -6
- package/dist/module/enterprise/entity/organization-app-mapping.entity.js +4 -21
- package/dist/module/enterprise/entity/organization-app-mapping.entity.js.map +1 -1
- package/dist/module/enterprise/entity/organization.entity.d.ts +18 -3
- package/dist/module/enterprise/entity/organization.entity.js +74 -8
- package/dist/module/enterprise/entity/organization.entity.js.map +1 -1
- package/dist/module/enterprise/repository/enterprise.repository.d.ts +2 -4
- package/dist/module/enterprise/repository/enterprise.repository.js +4 -19
- package/dist/module/enterprise/repository/enterprise.repository.js.map +1 -1
- package/dist/module/enterprise/service/brand.service.d.ts +3 -0
- package/dist/module/enterprise/service/brand.service.js +17 -0
- package/dist/module/enterprise/service/brand.service.js.map +1 -1
- package/dist/module/enterprise/service/enterprise.service.d.ts +2 -2
- package/dist/module/enterprise/service/enterprise.service.js +4 -4
- package/dist/module/enterprise/service/enterprise.service.js.map +1 -1
- package/dist/module/enterprise/service/organization.service.d.ts +4 -4
- package/dist/module/enterprise/service/organization.service.js +24 -101
- package/dist/module/enterprise/service/organization.service.js.map +1 -1
- package/dist/module/entity_json/controller/entity_json.controller.d.ts +2 -9
- 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 +2 -10
- package/dist/module/entity_json/service/entity_json.service.js +98 -23
- package/dist/module/entity_json/service/entity_json.service.js.map +1 -1
- package/dist/module/filter/controller/filter.controller.d.ts +12 -0
- package/dist/module/filter/controller/filter.controller.js +1 -1
- package/dist/module/filter/controller/filter.controller.js.map +1 -1
- package/dist/module/filter/filter.module.js +11 -2
- package/dist/module/filter/filter.module.js.map +1 -1
- package/dist/module/filter/service/filter.service.d.ts +38 -2
- package/dist/module/filter/service/filter.service.js +43 -50
- package/dist/module/filter/service/filter.service.js.map +1 -1
- package/dist/module/filter/service/flatjson-filter.service.d.ts +32 -0
- package/dist/module/filter/service/flatjson-filter.service.js +632 -0
- package/dist/module/filter/service/flatjson-filter.service.js.map +1 -0
- package/dist/module/filter/service/saved-filter.service.d.ts +3 -2
- package/dist/module/filter/service/saved-filter.service.js +14 -18
- package/dist/module/filter/service/saved-filter.service.js.map +1 -1
- package/dist/module/integration/service/integration.service.d.ts +1 -0
- package/dist/module/integration/service/integration.service.js +2 -1
- package/dist/module/integration/service/integration.service.js.map +1 -1
- package/dist/module/integration/service/wrapper.service.js +1 -0
- package/dist/module/integration/service/wrapper.service.js.map +1 -1
- package/dist/module/layout/controller/layout.controller.d.ts +3 -1
- package/dist/module/layout/controller/layout.controller.js +7 -3
- package/dist/module/layout/controller/layout.controller.js.map +1 -1
- package/dist/module/layout/entity/header-section.entity.d.ts +2 -0
- package/dist/module/layout/entity/header-section.entity.js +8 -0
- package/dist/module/layout/entity/header-section.entity.js.map +1 -1
- package/dist/module/layout/layout.module.js +2 -1
- package/dist/module/layout/layout.module.js.map +1 -1
- package/dist/module/layout/repository/header-section.repository.d.ts +1 -0
- package/dist/module/layout/repository/header-section.repository.js +5 -0
- package/dist/module/layout/repository/header-section.repository.js.map +1 -1
- package/dist/module/layout/service/header-section.service.d.ts +1 -1
- package/dist/module/layout/service/header-section.service.js +1 -1
- package/dist/module/layout/service/header-section.service.js.map +1 -1
- package/dist/module/linked_attributes/controller/linked_attributes.controller.d.ts +41 -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/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 +287 -2
- package/dist/module/linked_attributes/service/linked_attributes.service.js.map +1 -1
- package/dist/module/listmaster/service/list-master.service.js +8 -1
- package/dist/module/listmaster/service/list-master.service.js.map +1 -1
- package/dist/module/meta/controller/meta.controller.d.ts +6 -1
- package/dist/module/meta/controller/meta.controller.js +19 -1
- package/dist/module/meta/controller/meta.controller.js.map +1 -1
- package/dist/module/meta/entity/app-master.entity.d.ts +4 -8
- package/dist/module/meta/entity/app-master.entity.js +12 -30
- package/dist/module/meta/entity/app-master.entity.js.map +1 -1
- package/dist/module/meta/entity/entity-master.entity.d.ts +1 -0
- package/dist/module/meta/entity/entity-master.entity.js +8 -1
- package/dist/module/meta/entity/entity-master.entity.js.map +1 -1
- package/dist/module/meta/entity.module.js +5 -2
- package/dist/module/meta/entity.module.js.map +1 -1
- package/dist/module/meta/repository/app-master.repository.js +1 -1
- package/dist/module/meta/repository/app-master.repository.js.map +1 -1
- package/dist/module/meta/service/attribute-master.service.d.ts +6 -1
- package/dist/module/meta/service/attribute-master.service.js +22 -2
- package/dist/module/meta/service/attribute-master.service.js.map +1 -1
- package/dist/module/meta/service/entity-master.service.js +1 -0
- package/dist/module/meta/service/entity-master.service.js.map +1 -1
- package/dist/module/meta/service/entity-relation.service.d.ts +4 -3
- package/dist/module/meta/service/entity-relation.service.js +10 -4
- 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 +14 -10
- package/dist/module/meta/service/entity-service-impl.service.js.map +1 -1
- package/dist/module/meta/service/entity-table.service.d.ts +2 -3
- package/dist/module/meta/service/entity-table.service.js +19 -23
- package/dist/module/meta/service/entity-table.service.js.map +1 -1
- package/dist/module/meta/service/populate-meta.service.d.ts +13 -0
- package/dist/module/{enterprise → meta}/service/populate-meta.service.js +8 -2
- package/dist/module/meta/service/populate-meta.service.js.map +1 -0
- package/dist/module/meta/service/resolver.service.d.ts +1 -1
- package/dist/module/meta/service/resolver.service.js +6 -3
- package/dist/module/meta/service/resolver.service.js.map +1 -1
- package/dist/module/module/controller/menu.controller.js +2 -2
- package/dist/module/module/controller/menu.controller.js.map +1 -1
- package/dist/module/module/controller/module-access.controller.d.ts +4 -3
- package/dist/module/module/controller/module-access.controller.js +10 -15
- package/dist/module/module/controller/module-access.controller.js.map +1 -1
- package/dist/module/module/entity/menu.entity.d.ts +4 -6
- package/dist/module/module/entity/menu.entity.js +12 -16
- package/dist/module/module/entity/menu.entity.js.map +1 -1
- package/dist/module/module/entity/module-access.entity.d.ts +0 -15
- package/dist/module/module/entity/module-access.entity.js +0 -50
- package/dist/module/module/entity/module-access.entity.js.map +1 -1
- package/dist/module/module/entity/module-action.entity.d.ts +2 -4
- package/dist/module/module/entity/module-action.entity.js +6 -11
- package/dist/module/module/entity/module-action.entity.js.map +1 -1
- package/dist/module/module/entity/module.entity.d.ts +5 -3
- package/dist/module/module/entity/module.entity.js +18 -8
- package/dist/module/module/entity/module.entity.js.map +1 -1
- package/dist/module/module/module.module.d.ts +1 -1
- package/dist/module/module/module.module.js +7 -5
- package/dist/module/module/module.module.js.map +1 -1
- package/dist/module/module/repository/menu.repository.d.ts +4 -4
- package/dist/module/module/repository/menu.repository.js +27 -17
- package/dist/module/module/repository/menu.repository.js.map +1 -1
- package/dist/module/module/repository/module-access.repository.d.ts +7 -7
- package/dist/module/module/repository/module-access.repository.js +48 -86
- package/dist/module/module/repository/module-access.repository.js.map +1 -1
- package/dist/module/module/service/menu.service.d.ts +5 -3
- package/dist/module/module/service/menu.service.js +12 -9
- package/dist/module/module/service/menu.service.js.map +1 -1
- package/dist/module/module/service/module-access.service.d.ts +11 -8
- package/dist/module/module/service/module-access.service.js +26 -24
- package/dist/module/module/service/module-access.service.js.map +1 -1
- package/dist/module/notification/entity/notification.entity.d.ts +2 -17
- package/dist/module/notification/entity/notification.entity.js +2 -68
- package/dist/module/notification/entity/notification.entity.js.map +1 -1
- package/dist/module/notification/notification.module.js +2 -0
- package/dist/module/notification/notification.module.js.map +1 -1
- package/dist/module/notification/service/notification.service.d.ts +3 -1
- package/dist/module/notification/service/notification.service.js +5 -2
- package/dist/module/notification/service/notification.service.js.map +1 -1
- package/dist/module/notification/service/otp.service.js.map +1 -1
- package/dist/module/user/controller/login.controller.d.ts +3 -1
- package/dist/module/user/controller/login.controller.js +6 -2
- package/dist/module/user/controller/login.controller.js.map +1 -1
- package/dist/module/user/controller/user.controller.d.ts +2 -0
- package/dist/module/user/controller/user.controller.js +13 -0
- package/dist/module/user/controller/user.controller.js.map +1 -1
- package/dist/module/user/dto/create-user.dto.d.ts +3 -6
- package/dist/module/user/dto/create-user.dto.js +11 -17
- package/dist/module/user/dto/create-user.dto.js.map +1 -1
- package/dist/module/user/entity/role.entity.d.ts +6 -18
- package/dist/module/user/entity/role.entity.js +19 -64
- package/dist/module/user/entity/role.entity.js.map +1 -1
- package/dist/module/user/entity/user-role-mapping.entity.d.ts +0 -10
- package/dist/module/user/entity/user-role-mapping.entity.js +1 -33
- package/dist/module/user/entity/user-role-mapping.entity.js.map +1 -1
- package/dist/module/user/entity/user-session.entity.d.ts +2 -0
- package/dist/module/user/entity/user-session.entity.js +20 -2
- package/dist/module/user/entity/user-session.entity.js.map +1 -1
- package/dist/module/user/entity/user.entity.d.ts +5 -17
- package/dist/module/user/entity/user.entity.js +15 -61
- package/dist/module/user/entity/user.entity.js.map +1 -1
- package/dist/module/user/repository/role.repository.d.ts +2 -6
- package/dist/module/user/repository/role.repository.js +8 -16
- package/dist/module/user/repository/role.repository.js.map +1 -1
- package/dist/module/user/repository/user-role-mapping.repository.d.ts +0 -1
- package/dist/module/user/repository/user-role-mapping.repository.js +0 -3
- package/dist/module/user/repository/user-role-mapping.repository.js.map +1 -1
- package/dist/module/user/repository/user.repository.d.ts +2 -4
- package/dist/module/user/repository/user.repository.js +7 -19
- package/dist/module/user/repository/user.repository.js.map +1 -1
- package/dist/module/user/repository/userSession.repository.d.ts +0 -1
- package/dist/module/user/repository/userSession.repository.js +0 -3
- package/dist/module/user/repository/userSession.repository.js.map +1 -1
- package/dist/module/user/service/login.service.d.ts +5 -3
- package/dist/module/user/service/login.service.js +42 -43
- package/dist/module/user/service/login.service.js.map +1 -1
- package/dist/module/user/service/role.service.d.ts +11 -24
- package/dist/module/user/service/role.service.js +38 -42
- package/dist/module/user/service/role.service.js.map +1 -1
- package/dist/module/user/service/user-role-mapping.service.d.ts +0 -2
- package/dist/module/user/service/user-role-mapping.service.js +0 -6
- package/dist/module/user/service/user-role-mapping.service.js.map +1 -1
- package/dist/module/user/service/user-session.service.d.ts +4 -3
- package/dist/module/user/service/user-session.service.js +11 -10
- package/dist/module/user/service/user-session.service.js.map +1 -1
- package/dist/module/user/service/user.service.d.ts +20 -29
- package/dist/module/user/service/user.service.js +56 -44
- package/dist/module/user/service/user.service.js.map +1 -1
- package/dist/module/user/user.module.js +7 -1
- package/dist/module/user/user.module.js.map +1 -1
- package/dist/module/workflow/repository/action-data.repository.d.ts +1 -1
- package/dist/module/workflow/repository/action-data.repository.js +8 -6
- package/dist/module/workflow/repository/action-data.repository.js.map +1 -1
- package/dist/module/workflow/repository/action.repository.d.ts +1 -1
- package/dist/module/workflow/repository/action.repository.js +10 -10
- package/dist/module/workflow/repository/action.repository.js.map +1 -1
- package/dist/module/workflow/repository/form-master.repository.d.ts +1 -1
- package/dist/module/workflow/repository/form-master.repository.js +2 -2
- package/dist/module/workflow/repository/form-master.repository.js.map +1 -1
- package/dist/module/workflow/service/action-data.service.js +2 -1
- package/dist/module/workflow/service/action-data.service.js.map +1 -1
- package/dist/module/workflow/service/action.service.js +2 -2
- package/dist/module/workflow/service/action.service.js.map +1 -1
- package/dist/module/workflow/service/comm-template.service.js +2 -0
- package/dist/module/workflow/service/comm-template.service.js.map +1 -1
- package/dist/module/workflow/service/entity-modification.service.js +1 -0
- package/dist/module/workflow/service/entity-modification.service.js.map +1 -1
- package/dist/module/workflow/service/form-master.service.js +2 -2
- package/dist/module/workflow/service/form-master.service.js.map +1 -1
- package/dist/module/workflow/service/populate-workflow.service.d.ts +1 -1
- package/dist/module/workflow/service/populate-workflow.service.js +1 -1
- package/dist/module/workflow/service/populate-workflow.service.js.map +1 -1
- package/dist/module/workflow/service/task.service.js +3 -0
- package/dist/module/workflow/service/task.service.js.map +1 -1
- package/dist/module/workflow/service/workflow-meta.service.js +7 -2
- package/dist/module/workflow/service/workflow-meta.service.js.map +1 -1
- package/dist/module/workflow/service/workflow.service.js +2 -2
- package/dist/module/workflow/service/workflow.service.js.map +1 -1
- package/dist/module/workflow/workflow.module.js +0 -2
- package/dist/module/workflow/workflow.module.js.map +1 -1
- package/dist/module/workflow-automation/service/workflow-automation.service.js +6 -11
- package/dist/module/workflow-automation/service/workflow-automation.service.js.map +1 -1
- package/dist/module/workflow-automation/workflow-automation.module.js +1 -3
- package/dist/module/workflow-automation/workflow-automation.module.js.map +1 -1
- package/dist/module/workflow-schedule/service/workflow-schedule.service.js +2 -0
- package/dist/module/workflow-schedule/service/workflow-schedule.service.js.map +1 -1
- package/dist/table.config.d.ts +4 -2
- package/dist/table.config.js +2 -0
- package/dist/table.config.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/app.module.ts +5 -5
- package/src/core.module.ts +44 -55
- package/src/migrations/1732612800000-AddEntityJsonGinIndex.ts +41 -0
- package/src/module/auth/strategies/jwt.strategy.ts +2 -4
- package/src/module/dashboard/dashboard.module.ts +3 -3
- package/src/module/dashboard/service/dashboard.service.ts +3 -2
- package/src/module/enterprise/controller/organization.controller.ts +4 -60
- package/src/module/enterprise/enterprise.module.ts +18 -16
- package/src/module/enterprise/entity/enterprise.entity.ts +11 -5
- package/src/module/enterprise/entity/organization-app-mapping.entity.ts +4 -18
- package/src/module/enterprise/entity/organization.entity.ts +59 -9
- package/src/module/enterprise/repository/enterprise.repository.ts +4 -26
- package/src/module/enterprise/service/brand.service.ts +5 -75
- package/src/module/enterprise/service/enterprise.service.ts +4 -10
- package/src/module/enterprise/service/organization.service.ts +23 -140
- package/src/module/entity_json/controller/entity_json.controller.ts +13 -0
- 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 +233 -49
- package/src/module/filter/controller/filter.controller.ts +1 -3
- package/src/module/filter/filter.module.ts +12 -3
- package/src/module/filter/service/filter.service.ts +130 -73
- package/src/module/filter/service/flatjson-filter.service.ts +903 -0
- package/src/module/filter/service/saved-filter.service.ts +16 -26
- package/src/module/filter/test/flatjson-filter.service.spec.ts +415 -0
- package/src/module/integration/service/integration.service.ts +6 -2
- package/src/module/integration/service/wrapper.service.ts +1 -0
- package/src/module/layout/controller/layout.controller.ts +8 -1
- package/src/module/layout/entity/header-section.entity.ts +6 -0
- package/src/module/layout/layout.module.ts +1 -1
- package/src/module/layout/repository/header-section.repository.ts +6 -0
- package/src/module/layout/service/header-section.service.ts +1 -1
- 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/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/listmaster/service/list-master.service.ts +9 -1
- package/src/module/meta/controller/meta.controller.ts +25 -3
- package/src/module/meta/entity/app-master.entity.ts +9 -22
- package/src/module/meta/entity/entity-master.entity.ts +9 -3
- package/src/module/meta/entity.module.ts +6 -5
- package/src/module/meta/repository/app-master.repository.ts +1 -1
- package/src/module/meta/service/attribute-master.service.ts +31 -1
- package/src/module/meta/service/entity-master.service.ts +1 -0
- package/src/module/meta/service/entity-relation.service.ts +10 -6
- package/src/module/meta/service/entity-service-impl.service.ts +14 -19
- package/src/module/meta/service/entity-table.service.ts +28 -20
- package/src/module/meta/service/entity.service.ts +0 -1
- package/src/module/{enterprise → meta}/service/populate-meta.service.ts +5 -2
- package/src/module/meta/service/resolver.service.ts +4 -0
- package/src/module/module/controller/menu.controller.ts +2 -2
- package/src/module/module/controller/module-access.controller.ts +11 -16
- package/src/module/module/entity/menu.entity.ts +10 -14
- package/src/module/module/entity/module-access.entity.ts +1 -41
- package/src/module/module/entity/module-action.entity.ts +6 -10
- package/src/module/module/entity/module.entity.ts +14 -7
- package/src/module/module/module.module.ts +3 -2
- package/src/module/module/repository/menu.repository.ts +31 -19
- package/src/module/module/repository/module-access.repository.ts +63 -100
- package/src/module/module/service/menu.service.ts +13 -11
- package/src/module/module/service/module-access.service.ts +38 -26
- package/src/module/notification/entity/notification.entity.ts +3 -53
- package/src/module/notification/notification.module.ts +2 -0
- package/src/module/notification/service/notification.service.ts +1 -0
- package/src/module/notification/service/otp.service.ts +2 -3
- package/src/module/user/controller/login.controller.ts +8 -7
- package/src/module/user/controller/user.controller.ts +9 -0
- package/src/module/user/dto/create-user.dto.ts +6 -19
- package/src/module/user/entity/role.entity.ts +16 -59
- package/src/module/user/entity/user-role-mapping.entity.ts +3 -29
- package/src/module/user/entity/user-session.entity.ts +19 -3
- package/src/module/user/entity/user.entity.ts +13 -48
- package/src/module/user/repository/role.repository.ts +12 -24
- package/src/module/user/repository/user-role-mapping.repository.ts +1 -5
- package/src/module/user/repository/user.repository.ts +8 -28
- package/src/module/user/repository/userSession.repository.ts +1 -5
- package/src/module/user/service/login.service.ts +51 -47
- package/src/module/user/service/role.service.ts +60 -53
- package/src/module/user/service/user-role-mapping.service.ts +1 -23
- package/src/module/user/service/user-session.service.ts +11 -14
- package/src/module/user/service/user.service.ts +91 -64
- package/src/module/user/user.module.ts +5 -3
- package/src/module/workflow/repository/action-data.repository.ts +8 -6
- package/src/module/workflow/repository/action.repository.ts +11 -11
- package/src/module/workflow/repository/form-master.repository.ts +2 -2
- package/src/module/workflow/service/action-data.service.ts +2 -3
- package/src/module/workflow/service/action.service.ts +2 -2
- package/src/module/workflow/service/comm-template.service.ts +2 -0
- package/src/module/workflow/service/entity-modification.service.ts +1 -0
- package/src/module/workflow/service/form-master.service.ts +2 -2
- package/src/module/workflow/service/populate-workflow.service.ts +1 -1
- package/src/module/workflow/service/task.service.ts +3 -0
- package/src/module/workflow/service/workflow-meta.service.ts +7 -2
- package/src/module/workflow/service/workflow.service.ts +2 -2
- package/src/module/workflow/workflow.module.ts +0 -2
- package/src/module/workflow-automation/service/workflow-automation.service.ts +7 -19
- package/src/module/workflow-automation/workflow-automation.module.ts +3 -4
- package/src/module/workflow-schedule/service/workflow-schedule.service.ts +2 -0
- package/src/resources/dev.properties.yaml +2 -2
- package/src/table.config.ts +2 -0
- package/.claude/settings.local.json +0 -26
- package/.idea/250218_nodejs_core.iml +0 -9
- package/.idea/codeStyles/Project.xml +0 -59
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
- package/.idea/copilot.data.migration.agent.xml +0 -6
- package/.idea/copilot.data.migration.ask.xml +0 -6
- package/.idea/copilot.data.migration.ask2agent.xml +0 -6
- package/.idea/copilot.data.migration.edit.xml +0 -6
- package/.idea/inspectionProfiles/Project_Default.xml +0 -6
- package/.idea/misc.xml +0 -6
- package/.idea/modules.xml +0 -8
- package/.idea/prettier.xml +0 -6
- package/.idea/vcs.xml +0 -6
- package/dist/constant/status.constant.d.ts +0 -4
- package/dist/constant/status.constant.js +0 -9
- package/dist/constant/status.constant.js.map +0 -1
- package/dist/module/enterprise/controller/enterprise.controller.d.ts +0 -12
- package/dist/module/enterprise/controller/enterprise.controller.js +0 -57
- package/dist/module/enterprise/controller/enterprise.controller.js.map +0 -1
- package/dist/module/enterprise/controller/meta.controller.d.ts +0 -9
- package/dist/module/enterprise/controller/meta.controller.js +0 -43
- package/dist/module/enterprise/controller/meta.controller.js.map +0 -1
- package/dist/module/enterprise/service/brand-profile.service.d.ts +0 -0
- package/dist/module/enterprise/service/brand-profile.service.js +0 -1
- package/dist/module/enterprise/service/brand-profile.service.js.map +0 -1
- package/dist/module/enterprise/service/populate-meta.service.d.ts +0 -9
- package/dist/module/enterprise/service/populate-meta.service.js.map +0 -1
- package/dist/module/enterprise/service/school.service.d.ts +0 -0
- package/dist/module/enterprise/service/school.service.js +0 -1
- package/dist/module/enterprise/service/school.service.js.map +0 -1
- package/server.log +0 -850
- package/src/constant/status.constant.ts +0 -4
- package/src/module/enterprise/controller/enterprise.controller.ts +0 -40
- package/src/module/enterprise/controller/meta.controller.ts +0 -23
- package/src/module/enterprise/service/brand-profile.service.ts +0 -10
- package/src/module/enterprise/service/school.service.ts +0 -5
|
@@ -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,4 +1,3 @@
|
|
|
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';
|
|
@@ -11,15 +10,8 @@ export declare class EntityJSONService {
|
|
|
11
10
|
private readonly filterService;
|
|
12
11
|
private readonly entityServiceImpl;
|
|
13
12
|
constructor(dataSource: DataSource, loggerService: LoggingService, EntityJSONRepository: EntityJSONRepository, filterService: FilterService, entityServiceImpl: EntityServiceImpl);
|
|
14
|
-
getAttributeForFlatJSON(entityType: string, loggedInUser: any, flag?: 'flat_json' | 'dropdown' | 'all'): Promise<any
|
|
15
|
-
|
|
16
|
-
attributes: {
|
|
17
|
-
mainAttributes: AttributeMaster[];
|
|
18
|
-
relatedAttributes: AttributeMaster[];
|
|
19
|
-
linkedAttributes: any[];
|
|
20
|
-
};
|
|
21
|
-
}>;
|
|
22
|
-
updateEntityJSON(entityType: string, entityId: number, loggedInUser: any): Promise<Record<string, null> | null>;
|
|
13
|
+
getAttributeForFlatJSON(entityType: string, loggedInUser: any, flag?: 'flat_json' | 'dropdown' | 'all' | 'filter_attribute'): Promise<any>;
|
|
14
|
+
updateEntityJSON(entityType: string, entityId: number, loggedInUser: any): Promise<any>;
|
|
23
15
|
private mergeEntityDataIntoFlatJson;
|
|
24
16
|
private applyLinkedFilterUsingSavedFilter;
|
|
25
17
|
}
|
|
@@ -31,12 +31,18 @@ let EntityJSONService = class EntityJSONService {
|
|
|
31
31
|
this.entityServiceImpl = entityServiceImpl;
|
|
32
32
|
}
|
|
33
33
|
async getAttributeForFlatJSON(entityType, loggedInUser, flag) {
|
|
34
|
-
const entId = loggedInUser.
|
|
35
|
-
await this.loggerService.log('info', 'EntityJSONService', 'getAttributeForFlatJSON', `Loading attributes for entity: ${entityType},
|
|
34
|
+
const entId = loggedInUser.enterprise_id;
|
|
35
|
+
await this.loggerService.log('info', 'EntityJSONService', 'getAttributeForFlatJSON', `Loading attributes for entity: ${entityType}, org: ${entId}`);
|
|
36
36
|
const mainAttributes = await this.dataSource
|
|
37
37
|
.getRepository(attribute_master_entity_1.AttributeMaster)
|
|
38
38
|
.createQueryBuilder('attr')
|
|
39
|
-
.select([
|
|
39
|
+
.select([
|
|
40
|
+
'attr.id',
|
|
41
|
+
'attr.name',
|
|
42
|
+
'attr.flat_json_key',
|
|
43
|
+
'attr.attribute_key',
|
|
44
|
+
'attr.data_type',
|
|
45
|
+
])
|
|
40
46
|
.where('attr.mapped_entity_type = :entityType', { entityType })
|
|
41
47
|
.andWhere('attr.enterprise_id = :entId', { entId })
|
|
42
48
|
.getMany();
|
|
@@ -49,14 +55,23 @@ let EntityJSONService = class EntityJSONService {
|
|
|
49
55
|
.andWhere('rel.enterprise_id = :entId', { entId })
|
|
50
56
|
.andWhere('rel.relation_type = :relationType', { relationType: 'ONE_TO_ONE' })
|
|
51
57
|
.getRawMany();
|
|
52
|
-
const relatedTypesList = relatedEntityTypes.map(x => x.rel_target_entity_type);
|
|
58
|
+
const relatedTypesList = relatedEntityTypes.map((x) => x.rel_target_entity_type);
|
|
53
59
|
await this.loggerService.log('debug', 'EntityJSONService', 'getAttributeForFlatJSON', `Found ${relatedTypesList.length} ONE-TO-ONE related entity types`);
|
|
54
60
|
const relatedAttributes = relatedTypesList.length
|
|
55
61
|
? await this.dataSource
|
|
56
62
|
.getRepository(attribute_master_entity_1.AttributeMaster)
|
|
57
63
|
.createQueryBuilder('attr')
|
|
58
|
-
.select([
|
|
59
|
-
|
|
64
|
+
.select([
|
|
65
|
+
'attr.id',
|
|
66
|
+
'attr.name',
|
|
67
|
+
'attr.flat_json_key',
|
|
68
|
+
'attr.mapped_entity_type',
|
|
69
|
+
'attr.attribute_key',
|
|
70
|
+
'attr.data_type',
|
|
71
|
+
])
|
|
72
|
+
.where('attr.mapped_entity_type IN (:...types)', {
|
|
73
|
+
types: relatedTypesList,
|
|
74
|
+
})
|
|
60
75
|
.andWhere('attr.enterprise_id = :entId', { entId })
|
|
61
76
|
.getMany()
|
|
62
77
|
: [];
|
|
@@ -72,41 +87,83 @@ let EntityJSONService = class EntityJSONService {
|
|
|
72
87
|
'fla.saved_filter_code AS saved_filter_code',
|
|
73
88
|
'attr.name AS name',
|
|
74
89
|
'attr.id AS id',
|
|
90
|
+
'attr.data_type AS data_type',
|
|
75
91
|
])
|
|
76
92
|
.where('attr.enterprise_id = :entId', { entId })
|
|
77
93
|
.getRawMany();
|
|
78
94
|
await this.loggerService.log('debug', 'EntityJSONService', 'getAttributeForFlatJSON', `Loaded ${linkedAttributes.length} linked attributes`);
|
|
95
|
+
if (flag === 'filter_attribute') {
|
|
96
|
+
const filterAttributes = [];
|
|
97
|
+
filterAttributes.push(...mainAttributes.map((a) => ({
|
|
98
|
+
id: a.id,
|
|
99
|
+
name: a.name,
|
|
100
|
+
data_type: a.data_type,
|
|
101
|
+
flat_json_key: a.flat_json_key,
|
|
102
|
+
source: 'main',
|
|
103
|
+
})));
|
|
104
|
+
filterAttributes.push(...relatedAttributes.map((a) => ({
|
|
105
|
+
id: a.id,
|
|
106
|
+
name: a.name,
|
|
107
|
+
data_type: a.data_type,
|
|
108
|
+
flat_json_key: a.flat_json_key,
|
|
109
|
+
source: 'related',
|
|
110
|
+
})));
|
|
111
|
+
filterAttributes.push(...linkedAttributes.map((l) => ({
|
|
112
|
+
id: l.id,
|
|
113
|
+
name: l.name,
|
|
114
|
+
data_type: l.data_type,
|
|
115
|
+
flat_json_key: l.target_attribute_key,
|
|
116
|
+
source: 'linked',
|
|
117
|
+
})));
|
|
118
|
+
return filterAttributes;
|
|
119
|
+
}
|
|
79
120
|
if (flag === 'flat_json' || flag === 'all') {
|
|
80
121
|
const result = {};
|
|
81
|
-
mainAttributes.forEach(attr => {
|
|
122
|
+
mainAttributes.forEach((attr) => {
|
|
82
123
|
if (attr.flat_json_key)
|
|
83
124
|
result[attr.flat_json_key] = null;
|
|
84
125
|
});
|
|
85
|
-
relatedAttributes.forEach(attr => {
|
|
126
|
+
relatedAttributes.forEach((attr) => {
|
|
86
127
|
if (attr.flat_json_key)
|
|
87
128
|
result[attr.flat_json_key] = null;
|
|
88
129
|
});
|
|
89
|
-
linkedAttributes.forEach(link => {
|
|
130
|
+
linkedAttributes.forEach((link) => {
|
|
90
131
|
if (link.target_attribute_key)
|
|
91
132
|
result[link.target_attribute_key] = null;
|
|
92
133
|
});
|
|
93
134
|
if (flag === 'all') {
|
|
94
|
-
return {
|
|
135
|
+
return {
|
|
136
|
+
flat_json: result,
|
|
137
|
+
attributes: {
|
|
138
|
+
mainAttributes,
|
|
139
|
+
relatedAttributes,
|
|
140
|
+
linkedAttributes,
|
|
141
|
+
},
|
|
142
|
+
};
|
|
95
143
|
}
|
|
96
144
|
return result;
|
|
97
145
|
}
|
|
98
146
|
const dropdown = [];
|
|
99
|
-
dropdown.push(...mainAttributes.map(a => ({ label: a.name, value: a.flat_json_key })));
|
|
100
|
-
dropdown.push(...relatedAttributes.map(a => ({
|
|
147
|
+
dropdown.push(...mainAttributes.map((a) => ({ label: a.name, value: a.flat_json_key })));
|
|
148
|
+
dropdown.push(...relatedAttributes.map((a) => ({
|
|
149
|
+
label: a.name,
|
|
150
|
+
value: a.flat_json_key,
|
|
151
|
+
})));
|
|
101
152
|
if (linkedAttributes.length > 0) {
|
|
102
|
-
dropdown.push(...linkedAttributes.map(a => ({
|
|
153
|
+
dropdown.push(...linkedAttributes.map((a) => ({
|
|
154
|
+
label: a.name,
|
|
155
|
+
value: a.target_attribute_key,
|
|
156
|
+
})));
|
|
103
157
|
}
|
|
104
158
|
return dropdown;
|
|
105
159
|
}
|
|
106
160
|
async updateEntityJSON(entityType, entityId, loggedInUser) {
|
|
107
161
|
await this.loggerService.log('info', 'EntityJSONService', 'updateEntityJSON', `Building flat JSON for entity: ${entityType}#${entityId}`);
|
|
108
162
|
const response = await this.getAttributeForFlatJSON(entityType, loggedInUser, 'all');
|
|
109
|
-
if (!response ||
|
|
163
|
+
if (!response ||
|
|
164
|
+
!('flat_json' in response) ||
|
|
165
|
+
!('attributes' in response) ||
|
|
166
|
+
!response.attributes) {
|
|
110
167
|
await this.loggerService.log('error', 'EntityJSONService', 'updateEntityJSON', `getAttributeForFlatJSON() did not return expected structure`);
|
|
111
168
|
return null;
|
|
112
169
|
}
|
|
@@ -119,23 +176,29 @@ let EntityJSONService = class EntityJSONService {
|
|
|
119
176
|
linkedAttributes: attributes.linkedAttributes || [],
|
|
120
177
|
};
|
|
121
178
|
const attrMap = {};
|
|
122
|
-
const allAttrs = [
|
|
123
|
-
|
|
179
|
+
const allAttrs = [
|
|
180
|
+
...safeAttributes.mainAttributes,
|
|
181
|
+
...safeAttributes.relatedAttributes,
|
|
182
|
+
];
|
|
183
|
+
allAttrs.forEach((attr) => {
|
|
124
184
|
if (attr.attribute_key)
|
|
125
185
|
attrMap[attr.attribute_key] = attr.flat_json_key || attr.attribute_key;
|
|
126
186
|
});
|
|
127
|
-
const mainData = await this.entityServiceImpl.getResolvedEntityData(entityType, entityId, loggedInUser);
|
|
187
|
+
const mainData = await this.entityServiceImpl.getResolvedEntityData(entityType, entityId, loggedInUser, true);
|
|
128
188
|
this.mergeEntityDataIntoFlatJson(flatJson, mainData, attrMap);
|
|
129
189
|
const relations = await this.dataSource
|
|
130
190
|
.getRepository('frm_entity_relation_data')
|
|
131
191
|
.createQueryBuilder('erd')
|
|
132
|
-
.select([
|
|
192
|
+
.select([
|
|
193
|
+
'erd.target_entity_id AS target_entity_id',
|
|
194
|
+
'erd.target_entity_type AS target_entity_type',
|
|
195
|
+
])
|
|
133
196
|
.where('erd.source_entity_type = :entityType', { entityType })
|
|
134
197
|
.andWhere('erd.source_entity_id = :entityId', { entityId })
|
|
135
198
|
.andWhere('erd.relation_type = :rt', { rt: 'ONE_TO_ONE' })
|
|
136
199
|
.getRawMany();
|
|
137
200
|
for (const rel of relations) {
|
|
138
|
-
const relatedData = await this.entityServiceImpl.getResolvedEntityData(rel.target_entity_type, rel.target_entity_id, loggedInUser);
|
|
201
|
+
const relatedData = await this.entityServiceImpl.getResolvedEntityData(rel.target_entity_type, rel.target_entity_id, loggedInUser, true);
|
|
139
202
|
this.mergeEntityDataIntoFlatJson(flatJson, relatedData, attrMap);
|
|
140
203
|
}
|
|
141
204
|
for (const linkAttr of safeAttributes.linkedAttributes) {
|
|
@@ -174,21 +237,33 @@ let EntityJSONService = class EntityJSONService {
|
|
|
174
237
|
}
|
|
175
238
|
}
|
|
176
239
|
async applyLinkedFilterUsingSavedFilter(childEntityType, savedFilterCode, childFilterAttribute, mappingValue, targetAttribute, loggedInUser, entity_id) {
|
|
177
|
-
if (!savedFilterCode &&
|
|
240
|
+
if (!savedFilterCode &&
|
|
241
|
+
(mappingValue === null || mappingValue === undefined))
|
|
178
242
|
return null;
|
|
179
243
|
const dto = {
|
|
180
244
|
entity_type: childEntityType,
|
|
181
245
|
savedFilterCode,
|
|
182
246
|
page: 1,
|
|
183
247
|
size: 1,
|
|
248
|
+
loggedInUser
|
|
184
249
|
};
|
|
185
|
-
if (mappingValue !== null &&
|
|
250
|
+
if (mappingValue !== null &&
|
|
251
|
+
mappingValue !== undefined &&
|
|
252
|
+
mappingValue !== '') {
|
|
186
253
|
dto.quickFilter = [
|
|
187
|
-
{
|
|
254
|
+
{
|
|
255
|
+
filter_attribute: childFilterAttribute,
|
|
256
|
+
filter_operator: 'equal',
|
|
257
|
+
filter_value: mappingValue,
|
|
258
|
+
},
|
|
188
259
|
];
|
|
189
260
|
}
|
|
190
261
|
dto.quickFilter = [
|
|
191
|
-
{
|
|
262
|
+
{
|
|
263
|
+
filter_attribute: 'parent_id',
|
|
264
|
+
filter_operator: 'equal',
|
|
265
|
+
filter_value: [entity_id],
|
|
266
|
+
},
|
|
192
267
|
];
|
|
193
268
|
const result = await this.filterService.applyFilter(dto);
|
|
194
269
|
const rows = result?.data?.entity_list || [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity_json.service.js","sourceRoot":"","sources":["../../../../src/module/entity_json/service/entity_json.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAgE;AAChE,oGAA+F;AAC/F,uFAAiF;AACjF,qFAA+E;AAC/E,gGAAwF;AACxF,oFAAuE;AACvE,qCAAqC;AACrC,mEAA+D;AAC/D,wEAAoE;
|
|
1
|
+
{"version":3,"file":"entity_json.service.js","sourceRoot":"","sources":["../../../../src/module/entity_json/service/entity_json.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAgE;AAChE,oGAA+F;AAC/F,uFAAiF;AACjF,qFAA+E;AAC/E,gGAAwF;AACxF,oFAAuE;AACvE,qCAAqC;AACrC,mEAA+D;AAC/D,wEAAoE;AAK7D,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAC5B,YACmB,UAAsB,EACtB,aAA6B,EAC7B,oBAA0C,EACD,aAA4B,EACxB,iBAAoC;QAJjF,eAAU,GAAV,UAAU,CAAY;QACtB,kBAAa,GAAb,aAAa,CAAgB;QAC7B,yBAAoB,GAApB,oBAAoB,CAAsB;QACD,kBAAa,GAAb,aAAa,CAAe;QACxB,sBAAiB,GAAjB,iBAAiB,CAAmB;IAEpG,CAAC;IAED,KAAK,CAAC,uBAAuB,CAC3B,UAAkB,EAClB,YAAiB,EACjB,IAA4D;QAE5D,MAAM,KAAK,GAAG,YAAY,CAAC,aAAa,CAAC;QAEzC,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,CAC1B,MAAM,EACN,mBAAmB,EACnB,yBAAyB,EACzB,kCAAkC,UAAU,UAAU,KAAK,EAAE,CAC9D,CAAC;QAGF,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,UAAU;aACzC,aAAa,CAAC,yCAAe,CAAC;aAC9B,kBAAkB,CAAC,MAAM,CAAC;aAC1B,MAAM,CAAC;YACN,SAAS;YACT,WAAW;YACX,oBAAoB;YACpB,oBAAoB;YACpB,gBAAgB;SACjB,CAAC;aACD,KAAK,CAAC,uCAAuC,EAAE,EAAE,UAAU,EAAE,CAAC;aAC9D,QAAQ,CAAC,6BAA6B,EAAE,EAAE,KAAK,EAAE,CAAC;aAClD,OAAO,EAAE,CAAC;QAEb,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,CAC1B,OAAO,EACP,mBAAmB,EACnB,yBAAyB,EACzB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AAK,SAAS;YAC1B,YAAY,KAAK,EAAE,EACnB,CAAC;YACD,GAAG,CAAC,WAAW,GAAG;gBAChB;oBACE,gBAAgB,EAAE,oBAAoB;oBACtC,eAAe,EAAE,OAAO;oBACxB,YAAY,EAAE,YAAY;iBAC3B;aACF,CAAC;QACJ,CAAC;QAED,GAAG,CAAC,WAAW,GAAG;YAChB;gBACE,gBAAgB,EAAE,WAAW;gBAC7B,eAAe,EAAE,OAAO;gBACxB,YAAY,EAAE,CAAC,SAAS,CAAC;aAC1B;SACF,CAAC;QAEF,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QACzD,MAAM,IAAI,GAAG,MAAM,EAAE,IAAI,EAAE,WAAW,IAAI,EAAE,CAAC;QAC7C,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACtE,CAAC;CAGF,CAAA;AA5ZY,8CAAiB;4BAAjB,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;IAMR,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,8BAAa,CAAC,CAAC,CAAA;IACvC,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,+CAAiB,CAAC,CAAC,CAAA;qCAJf,oBAAU;QACP,oCAAc;QACP,4CAAoB;QACc,8BAAa;QACL,+CAAiB;GANzF,iBAAiB,CA4Z7B"}
|
|
@@ -27,6 +27,18 @@ export declare class FilterController {
|
|
|
27
27
|
entity_list: never[];
|
|
28
28
|
pagination: {};
|
|
29
29
|
};
|
|
30
|
+
} | {
|
|
31
|
+
success: boolean;
|
|
32
|
+
data: {
|
|
33
|
+
entity_tabs: any;
|
|
34
|
+
entity_list: any;
|
|
35
|
+
pagination: {
|
|
36
|
+
total: any;
|
|
37
|
+
page: any;
|
|
38
|
+
size: any;
|
|
39
|
+
totalPages: any;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
30
42
|
}>;
|
|
31
43
|
getFilterById(id: string): Promise<{
|
|
32
44
|
filter_attribute: string;
|
|
@@ -26,7 +26,7 @@ let FilterController = class FilterController {
|
|
|
26
26
|
const loggedInUser = req.user.userData;
|
|
27
27
|
const { page: _p, size: _s, ...otherQueryParams } = queryParams;
|
|
28
28
|
const { entity_type, quickFilter, savedFilterCode, attributeFilter, tabs, sortby, } = body;
|
|
29
|
-
return this.filterService.
|
|
29
|
+
return this.filterService.applyFilterWithRouting({
|
|
30
30
|
entity_type,
|
|
31
31
|
quickFilter,
|
|
32
32
|
savedFilterCode,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter.controller.js","sourceRoot":"","sources":["../../../../src/module/filter/controller/filter.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAWwB;AACxB,8DAA0D;AAC1D,0EAAqE;AACrE,2DAAgE;AAGzD,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAC3B,YACmB,aAA4B,EAE5B,kBAAsC;QAFtC,kBAAa,GAAb,aAAa,CAAe;QAE5B,uBAAkB,GAAlB,kBAAkB,CAAoB;IACtD,CAAC;IAKE,AAAN,KAAK,CAAC,WAAW,CACP,IAAS,EACY,OAAO,CAAC,EACR,OAAO,EAAE,EAC/B,GAA4B,EAC1B,WAAmC,EACvB,SAAkB,EACpB,OAAgB,EACjB,OAAgB;QAElC,MAAM,YAAY,GAAG,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;QAGvC,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,gBAAgB,EAAE,GAAG,WAAW,CAAC;QAEhE,MAAM,EACJ,WAAW,EACX,WAAW,EACX,eAAe,EACf,eAAe,EACf,IAAI,EACJ,MAAM,GACP,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"filter.controller.js","sourceRoot":"","sources":["../../../../src/module/filter/controller/filter.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAWwB;AACxB,8DAA0D;AAC1D,0EAAqE;AACrE,2DAAgE;AAGzD,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAC3B,YACmB,aAA4B,EAE5B,kBAAsC;QAFtC,kBAAa,GAAb,aAAa,CAAe;QAE5B,uBAAkB,GAAlB,kBAAkB,CAAoB;IACtD,CAAC;IAKE,AAAN,KAAK,CAAC,WAAW,CACP,IAAS,EACY,OAAO,CAAC,EACR,OAAO,EAAE,EAC/B,GAA4B,EAC1B,WAAmC,EACvB,SAAkB,EACpB,OAAgB,EACjB,OAAgB;QAElC,MAAM,YAAY,GAAG,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;QAGvC,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,gBAAgB,EAAE,GAAG,WAAW,CAAC;QAEhE,MAAM,EACJ,WAAW,EACX,WAAW,EACX,eAAe,EACf,eAAe,EACf,IAAI,EACJ,MAAM,GACP,GAAG,IAAI,CAAC;QAET,OAAO,IAAI,CAAC,aAAa,CAAC,sBAAsB,CAAC;YAC/C,WAAW;YACX,WAAW;YACX,eAAe;YACf,eAAe;YACf,IAAI;YACJ,MAAM;YACN,IAAI;YACJ,IAAI;YACJ,YAAY;YACZ,WAAW,EAAE,gBAAgB;YAC7B,eAAe,EAAE,SAAS;YAC1B,aAAa,EAAE,OAAO;YACtB,aAAa,EAAE,OAAO;SACvB,CAAC,CAAC;IACL,CAAC;IAIK,AAAN,KAAK,CAAC,aAAa,CAAc,EAAU;QACzC,OAAO,IAAI,CAAC,kBAAkB,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;IAC3D,CAAC;IAKK,AAAN,KAAK,CAAC,oBAAoB,CACT,IAAY,EACpB,GAA4B;QAEnC,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
@@ -14,10 +14,14 @@ const saved_filter_detail_entity_1 = require("./entity/saved-filter-detail.entit
|
|
|
14
14
|
const saved_filter_master_entity_1 = require("./entity/saved-filter-master.entity");
|
|
15
15
|
const saved_filter_repository_1 = require("./repository/saved-filter.repository");
|
|
16
16
|
const entity_module_1 = require("../meta/entity.module");
|
|
17
|
+
const entity_json_module_1 = require("../entity_json/entity_json.module");
|
|
17
18
|
const filter_service_1 = require("./service/filter.service");
|
|
18
19
|
const filter_controller_1 = require("./controller/filter.controller");
|
|
19
20
|
const filter_evaluator_service_1 = require("./service/filter-evaluator.service");
|
|
20
21
|
const saved_filter_detail_repository_1 = require("./repository/saved.filter-detail.repository");
|
|
22
|
+
const flatjson_filter_service_1 = require("./service/flatjson-filter.service");
|
|
23
|
+
const config_1 = require("@nestjs/config");
|
|
24
|
+
const utils_module_1 = require("../../utils/utils.module");
|
|
21
25
|
let FilterModule = class FilterModule {
|
|
22
26
|
};
|
|
23
27
|
exports.FilterModule = FilterModule;
|
|
@@ -25,7 +29,10 @@ exports.FilterModule = FilterModule = __decorate([
|
|
|
25
29
|
(0, common_1.Module)({
|
|
26
30
|
imports: [
|
|
27
31
|
typeorm_1.TypeOrmModule.forFeature([saved_filter_detail_entity_1.SavedFilterDetail, saved_filter_master_entity_1.SavedFilterMaster]),
|
|
28
|
-
(0, common_1.forwardRef)(() => entity_module_1.EntityModule)
|
|
32
|
+
(0, common_1.forwardRef)(() => entity_module_1.EntityModule),
|
|
33
|
+
(0, common_1.forwardRef)(() => entity_json_module_1.EntityJSONModule),
|
|
34
|
+
config_1.ConfigModule,
|
|
35
|
+
utils_module_1.UtilsModule,
|
|
29
36
|
],
|
|
30
37
|
controllers: [filter_controller_1.FilterController],
|
|
31
38
|
providers: [
|
|
@@ -33,13 +40,15 @@ exports.FilterModule = FilterModule = __decorate([
|
|
|
33
40
|
saved_filter_repository_1.SavedFilterRepositoryService,
|
|
34
41
|
filter_service_1.FilterService,
|
|
35
42
|
filter_evaluator_service_1.FilterEvaluatorService,
|
|
36
|
-
saved_filter_detail_repository_1.SavedFilterDetailRepository
|
|
43
|
+
saved_filter_detail_repository_1.SavedFilterDetailRepository,
|
|
44
|
+
flatjson_filter_service_1.FlatjsonFilterService,
|
|
37
45
|
],
|
|
38
46
|
exports: [
|
|
39
47
|
'SavedFilterService',
|
|
40
48
|
saved_filter_repository_1.SavedFilterRepositoryService,
|
|
41
49
|
filter_service_1.FilterService,
|
|
42
50
|
filter_evaluator_service_1.FilterEvaluatorService,
|
|
51
|
+
flatjson_filter_service_1.FlatjsonFilterService,
|
|
43
52
|
],
|
|
44
53
|
})
|
|
45
54
|
], FilterModule);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter.module.js","sourceRoot":"","sources":["../../../src/module/filter/filter.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAoD;AACpD,6CAAgD;AAChD,yEAAoE;AACpE,oFAAwE;AACxE,oFAAwE;AACxE,kFAAoF;AACpF,yDAAqD;AACrD,6DAAyD;AACzD,sEAAkE;AAClE,iFAA4E;AAC5E,gGAA0F;
|
|
1
|
+
{"version":3,"file":"filter.module.js","sourceRoot":"","sources":["../../../src/module/filter/filter.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAoD;AACpD,6CAAgD;AAChD,yEAAoE;AACpE,oFAAwE;AACxE,oFAAwE;AACxE,kFAAoF;AACpF,yDAAqD;AACrD,0EAAqE;AACrE,6DAAyD;AACzD,sEAAkE;AAClE,iFAA4E;AAC5E,gGAA0F;AAC1F,+EAA0E;AAC1E,2CAA8C;AAC9C,2DAAqD;AA2B9C,IAAM,YAAY,GAAlB,MAAM,YAAY;CAAG,CAAA;AAAf,oCAAY;uBAAZ,YAAY;IAzBxB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,uBAAa,CAAC,UAAU,CAAC,CAAC,8CAAiB,EAAE,8CAAiB,CAAC,CAAC;YAChE,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,4BAAY,CAAC;YAC9B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,qCAAgB,CAAC;YAClC,qBAAY;YACZ,0BAAW;SACZ;QACD,WAAW,EAAE,CAAC,oCAAgB,CAAC;QAC/B,SAAS,EAAE;YACT,EAAE,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,yCAAkB,EAAE;YAC/D,sDAA4B;YAC5B,8BAAa;YACb,iDAAsB;YACtB,4DAA2B;YAC3B,+CAAqB;SACtB;QACD,OAAO,EAAE;YACP,oBAAoB;YACpB,sDAA4B;YAC5B,8BAAa;YACb,iDAAsB;YACtB,+CAAqB;SACtB;KACF,CAAC;GACW,YAAY,CAAG"}
|
|
@@ -8,19 +8,55 @@ import { LoggingService } from 'src/utils/service/loggingUtil.service';
|
|
|
8
8
|
import { ConfigService } from '@nestjs/config';
|
|
9
9
|
import { ReflectionHelper } from '../../../utils/service/reflection-helper.service';
|
|
10
10
|
import { EntityManager } from 'typeorm';
|
|
11
|
+
import { FlatjsonFilterService } from './flatjson-filter.service';
|
|
11
12
|
export declare class FilterService {
|
|
12
13
|
private entityManager;
|
|
13
14
|
private readonly attributeMasterService;
|
|
14
15
|
private readonly entityMasterService;
|
|
15
|
-
private readonly savedFilterService;
|
|
16
16
|
private readonly entityRelationService;
|
|
17
|
+
private readonly savedFilterService;
|
|
17
18
|
private readonly resolverService;
|
|
18
19
|
protected readonly loggingService: LoggingService;
|
|
19
20
|
private readonly configService;
|
|
20
21
|
private readonly reflectionHelper;
|
|
21
|
-
|
|
22
|
+
private readonly flatjsonFilterService;
|
|
23
|
+
constructor(entityManager: EntityManager, attributeMasterService: AttributeMasterService, entityMasterService: EntityMasterService, entityRelationService: EntityRelationService, savedFilterService: SavedFilterService, resolverService: ResolverService, loggingService: LoggingService, configService: ConfigService, reflectionHelper: ReflectionHelper, flatjsonFilterService: FlatjsonFilterService);
|
|
22
24
|
schema: any;
|
|
23
25
|
private gettab_value_counts;
|
|
26
|
+
applyFilterWithRouting(dto: FilterRequestDto): Promise<{
|
|
27
|
+
success: boolean;
|
|
28
|
+
data: {
|
|
29
|
+
entity_tabs: any[];
|
|
30
|
+
entity_list: any[];
|
|
31
|
+
pagination: {
|
|
32
|
+
total: number;
|
|
33
|
+
page: number;
|
|
34
|
+
size: number;
|
|
35
|
+
totalPages: number;
|
|
36
|
+
hasNextPage: boolean;
|
|
37
|
+
hasPreviousPage: boolean;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
} | {
|
|
41
|
+
success: boolean;
|
|
42
|
+
data: {
|
|
43
|
+
entity_tabs: never[];
|
|
44
|
+
entity_list: never[];
|
|
45
|
+
pagination: {};
|
|
46
|
+
};
|
|
47
|
+
} | {
|
|
48
|
+
success: boolean;
|
|
49
|
+
data: {
|
|
50
|
+
entity_tabs: any;
|
|
51
|
+
entity_list: any;
|
|
52
|
+
pagination: {
|
|
53
|
+
total: any;
|
|
54
|
+
page: any;
|
|
55
|
+
size: any;
|
|
56
|
+
totalPages: any;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
}>;
|
|
24
60
|
applyFilterWrapper(dto: FilterRequestDto): Promise<{
|
|
25
61
|
success: boolean;
|
|
26
62
|
data: {
|
|
@@ -24,17 +24,19 @@ const loggingUtil_service_1 = require("../../../utils/service/loggingUtil.servic
|
|
|
24
24
|
const config_1 = require("@nestjs/config");
|
|
25
25
|
const reflection_helper_service_1 = require("../../../utils/service/reflection-helper.service");
|
|
26
26
|
const typeorm_1 = require("typeorm");
|
|
27
|
+
const flatjson_filter_service_1 = require("./flatjson-filter.service");
|
|
27
28
|
let FilterService = class FilterService {
|
|
28
|
-
constructor(entityManager, attributeMasterService, entityMasterService,
|
|
29
|
+
constructor(entityManager, attributeMasterService, entityMasterService, entityRelationService, savedFilterService, resolverService, loggingService, configService, reflectionHelper, flatjsonFilterService) {
|
|
29
30
|
this.entityManager = entityManager;
|
|
30
31
|
this.attributeMasterService = attributeMasterService;
|
|
31
32
|
this.entityMasterService = entityMasterService;
|
|
32
|
-
this.savedFilterService = savedFilterService;
|
|
33
33
|
this.entityRelationService = entityRelationService;
|
|
34
|
+
this.savedFilterService = savedFilterService;
|
|
34
35
|
this.resolverService = resolverService;
|
|
35
36
|
this.loggingService = loggingService;
|
|
36
37
|
this.configService = configService;
|
|
37
38
|
this.reflectionHelper = reflectionHelper;
|
|
39
|
+
this.flatjsonFilterService = flatjsonFilterService;
|
|
38
40
|
this.schema = this.configService.get('DB_SCHEMA');
|
|
39
41
|
}
|
|
40
42
|
async gettab_value_counts(tableName, column, whereClauses) {
|
|
@@ -77,6 +79,30 @@ let FilterService = class FilterService {
|
|
|
77
79
|
})),
|
|
78
80
|
];
|
|
79
81
|
}
|
|
82
|
+
async applyFilterWithRouting(dto) {
|
|
83
|
+
const useFlatjson = dto.queryParams?.use_flatjson === 'true';
|
|
84
|
+
if (useFlatjson) {
|
|
85
|
+
await this.loggingService.log('info', 'FilterService', 'applyFilterWithRouting', `Using FLATJSON filtering for ${dto.entity_type}`);
|
|
86
|
+
const result = await this.flatjsonFilterService.applyFlatjsonFilter(dto);
|
|
87
|
+
return {
|
|
88
|
+
success: true,
|
|
89
|
+
data: {
|
|
90
|
+
entity_tabs: result.tabCounts || [],
|
|
91
|
+
entity_list: result.data,
|
|
92
|
+
pagination: {
|
|
93
|
+
total: result.total,
|
|
94
|
+
page: result.page,
|
|
95
|
+
size: result.size,
|
|
96
|
+
totalPages: result.totalPages,
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
await this.loggingService.log('info', 'FilterService', 'applyFilterWithRouting', `Using TRADITIONAL filtering for ${dto.entity_type}`);
|
|
103
|
+
return this.applyFilterWrapper(dto);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
80
106
|
async applyFilterWrapper(dto) {
|
|
81
107
|
const { entity_type, quickFilter = [], savedFilterCode, attributeFilter = [], loggedInUser, } = dto;
|
|
82
108
|
const savedFilters = await this.getSavedFilters(savedFilterCode ?? undefined);
|
|
@@ -146,7 +172,7 @@ let FilterService = class FilterService {
|
|
|
146
172
|
}
|
|
147
173
|
async applyFilter(dto) {
|
|
148
174
|
const { entity_type, quickFilter, savedFilterCode, attributeFilter, tabs, sortby, loggedInUser, queryParams, customLevelType, customLevelId, customAppCode, } = dto;
|
|
149
|
-
const { level_type, level_id, id: user_id,
|
|
175
|
+
const { level_type, level_id, id: user_id, appcode, organization_id, enterprise_id } = loggedInUser || {};
|
|
150
176
|
const entityMeta = await this.entityMasterService.getEntityData(entity_type, loggedInUser);
|
|
151
177
|
const tableName = entityMeta?.data_source;
|
|
152
178
|
if (!tableName) {
|
|
@@ -204,7 +230,7 @@ let FilterService = class FilterService {
|
|
|
204
230
|
entity_type !== 'TEM' &&
|
|
205
231
|
level_type &&
|
|
206
232
|
level_id &&
|
|
207
|
-
|
|
233
|
+
organization_id &&
|
|
208
234
|
!customLevelType &&
|
|
209
235
|
!customLevelId) {
|
|
210
236
|
baseWhere.push({
|
|
@@ -275,43 +301,6 @@ let FilterService = class FilterService {
|
|
|
275
301
|
}) || [];
|
|
276
302
|
let filteredTabs = await this.getFilteredTabs(layout, showList, entityMeta, baseWhere, tabs, loggedInUser);
|
|
277
303
|
const dataWhere = [...baseWhere];
|
|
278
|
-
if (tabs?.columnName && tabs?.value) {
|
|
279
|
-
const tabAttrMeta = attributeMetaMap[tabs.columnName];
|
|
280
|
-
const tabValue = tabs.value.toLowerCase();
|
|
281
|
-
if (tabValue === 'others') {
|
|
282
|
-
const valuesToExclude = showList
|
|
283
|
-
.filter((v) => v.label.toLowerCase() !== 'all')
|
|
284
|
-
.map((v) => v.value);
|
|
285
|
-
if (valuesToExclude.length > 0) {
|
|
286
|
-
for (const value of valuesToExclude) {
|
|
287
|
-
const resolvedId = await this.resolverService.getResolvedId(loggedInUser, tabs.columnName, value, entity_type);
|
|
288
|
-
if (resolvedId) {
|
|
289
|
-
const tabCondition = this.buildCondition({
|
|
290
|
-
filter_attribute: tabs.columnName,
|
|
291
|
-
filter_operator: 'not_equal',
|
|
292
|
-
filter_value: [resolvedId],
|
|
293
|
-
skip_id: true,
|
|
294
|
-
}, tabAttrMeta);
|
|
295
|
-
if (tabCondition)
|
|
296
|
-
dataWhere.push(tabCondition);
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
else if (tabValue !== 'all') {
|
|
302
|
-
const resolvedId = await this.resolverService.getResolvedId(loggedInUser, tabs.columnName, tabs.value, entity_type);
|
|
303
|
-
if (resolvedId) {
|
|
304
|
-
const tabCondition = this.buildCondition({
|
|
305
|
-
filter_attribute: tabs.columnName,
|
|
306
|
-
filter_operator: 'equal',
|
|
307
|
-
filter_value: [resolvedId],
|
|
308
|
-
skip_id: true,
|
|
309
|
-
}, tabAttrMeta);
|
|
310
|
-
if (tabCondition)
|
|
311
|
-
dataWhere.push(tabCondition);
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
304
|
let qb = this.entityManager
|
|
316
305
|
.createQueryBuilder()
|
|
317
306
|
.select('e.*')
|
|
@@ -342,7 +331,6 @@ let FilterService = class FilterService {
|
|
|
342
331
|
return formattedRow;
|
|
343
332
|
};
|
|
344
333
|
const formattedEntityList = entity_list.map(formatDatesInRow);
|
|
345
|
-
const resolvedEntityList = await Promise.all(formattedEntityList.map((row) => this.resolverService.getResolvedData(loggedInUser, row, entity_type)));
|
|
346
334
|
const resolvedTabs = await Promise.all(filteredTabs.map(async (tab) => {
|
|
347
335
|
const tabAttrKey = layout?.attribute || tabs?.columnName;
|
|
348
336
|
if (!tabAttrKey ||
|
|
@@ -350,8 +338,7 @@ let FilterService = class FilterService {
|
|
|
350
338
|
tab.tab_value?.toLowerCase() === 'others') {
|
|
351
339
|
return tab;
|
|
352
340
|
}
|
|
353
|
-
|
|
354
|
-
return { ...tab, tab_value: resolvedVal ?? tab.tab_value };
|
|
341
|
+
return { ...tab, tab_value: tab.tab_value ?? tab.tab_value };
|
|
355
342
|
}));
|
|
356
343
|
const countQb = this.entityManager
|
|
357
344
|
.createQueryBuilder()
|
|
@@ -365,7 +352,7 @@ let FilterService = class FilterService {
|
|
|
365
352
|
success: true,
|
|
366
353
|
data: {
|
|
367
354
|
entity_tabs: resolvedTabs,
|
|
368
|
-
entity_list:
|
|
355
|
+
entity_list: formattedEntityList,
|
|
369
356
|
pagination: {
|
|
370
357
|
total,
|
|
371
358
|
page,
|
|
@@ -905,17 +892,23 @@ let FilterService = class FilterService {
|
|
|
905
892
|
exports.FilterService = FilterService;
|
|
906
893
|
exports.FilterService = FilterService = __decorate([
|
|
907
894
|
(0, common_1.Injectable)(),
|
|
908
|
-
__param(
|
|
909
|
-
__param(
|
|
910
|
-
__param(
|
|
895
|
+
__param(1, (0, common_1.Inject)((0, common_1.forwardRef)(() => attribute_master_service_1.AttributeMasterService))),
|
|
896
|
+
__param(2, (0, common_1.Inject)((0, common_1.forwardRef)(() => entity_master_service_1.EntityMasterService))),
|
|
897
|
+
__param(3, (0, common_1.Inject)('EntityRelationService')),
|
|
898
|
+
__param(4, (0, common_1.Inject)('SavedFilterService')),
|
|
899
|
+
__param(5, (0, common_1.Inject)((0, common_1.forwardRef)(() => resolver_service_1.ResolverService))),
|
|
900
|
+
__param(6, (0, common_1.Inject)((0, common_1.forwardRef)(() => loggingUtil_service_1.LoggingService))),
|
|
901
|
+
__param(8, (0, common_1.Inject)((0, common_1.forwardRef)(() => reflection_helper_service_1.ReflectionHelper))),
|
|
902
|
+
__param(9, (0, common_1.Inject)((0, common_1.forwardRef)(() => flatjson_filter_service_1.FlatjsonFilterService))),
|
|
911
903
|
__metadata("design:paramtypes", [typeorm_1.EntityManager,
|
|
912
904
|
attribute_master_service_1.AttributeMasterService,
|
|
913
905
|
entity_master_service_1.EntityMasterService,
|
|
914
|
-
saved_filter_service_1.SavedFilterService,
|
|
915
906
|
entity_relation_service_1.EntityRelationService,
|
|
907
|
+
saved_filter_service_1.SavedFilterService,
|
|
916
908
|
resolver_service_1.ResolverService,
|
|
917
909
|
loggingUtil_service_1.LoggingService,
|
|
918
910
|
config_1.ConfigService,
|
|
919
|
-
reflection_helper_service_1.ReflectionHelper
|
|
911
|
+
reflection_helper_service_1.ReflectionHelper,
|
|
912
|
+
flatjson_filter_service_1.FlatjsonFilterService])
|
|
920
913
|
], FilterService);
|
|
921
914
|
//# sourceMappingURL=filter.service.js.map
|