rez_core 4.0.167 → 4.0.171
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/.prettierrc +3 -3
- package/README.md +99 -99
- package/dist/app.module.js +9 -0
- package/dist/app.module.js.map +1 -1
- package/dist/config/bull.config.d.ts +10 -0
- package/dist/config/bull.config.js +66 -0
- package/dist/config/bull.config.js.map +1 -0
- 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 +12 -16
- package/dist/config/database.config.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 +8 -0
- package/dist/module/entity_json/controller/entity_json.controller.js +42 -0
- package/dist/module/entity_json/controller/entity_json.controller.js.map +1 -0
- package/dist/module/entity_json/entity_json.module.d.ts +2 -0
- package/dist/module/entity_json/entity_json.module.js +26 -0
- package/dist/module/entity_json/entity_json.module.js.map +1 -0
- package/dist/module/entity_json/service/entity_json.service.d.ts +7 -0
- package/dist/module/entity_json/service/entity_json.service.js +80 -0
- package/dist/module/entity_json/service/entity_json.service.js.map +1 -0
- 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 +1 -4
- package/dist/module/filter/service/filter.service.js +39 -69
- 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.d.ts +3 -1
- package/dist/module/integration/service/wrapper.service.js +67 -65
- package/dist/module/integration/service/wrapper.service.js.map +1 -1
- package/dist/module/linked_attributes/controller/linked_attributes.controller.d.ts +5 -0
- package/dist/module/linked_attributes/controller/linked_attributes.controller.js +29 -0
- package/dist/module/linked_attributes/controller/linked_attributes.controller.js.map +1 -0
- package/dist/module/linked_attributes/entity/linked_attribute.entity.d.ts +9 -0
- package/dist/module/linked_attributes/entity/linked_attribute.entity.js +70 -0
- package/dist/module/linked_attributes/entity/linked_attribute.entity.js.map +1 -0
- package/dist/module/linked_attributes/linked_attributes.module.d.ts +2 -0
- package/dist/module/linked_attributes/linked_attributes.module.js +29 -0
- package/dist/module/linked_attributes/linked_attributes.module.js.map +1 -0
- package/dist/module/linked_attributes/repository/linked_attribute.repository.d.ts +6 -0
- package/dist/module/linked_attributes/repository/linked_attribute.repository.js +31 -0
- package/dist/module/linked_attributes/repository/linked_attribute.repository.js.map +1 -0
- package/dist/module/linked_attributes/service/linked_attributes.service.d.ts +5 -0
- package/dist/module/linked_attributes/service/linked_attributes.service.js +34 -0
- package/dist/module/linked_attributes/service/linked_attributes.service.js.map +1 -0
- 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 +7 -7
- 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 +4 -1
- package/dist/module/meta/controller/attribute-master.controller.js +15 -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/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/entity.module.js +7 -0
- package/dist/module/meta/entity.module.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.d.ts +6 -0
- package/dist/module/meta/repository/entity-attribute-update.repository.js +44 -0
- package/dist/module/meta/repository/entity-attribute-update.repository.js.map +1 -0
- 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-attribute-update.service.d.ts +7 -0
- package/dist/module/meta/service/entity-attribute-update.service.js +36 -0
- package/dist/module/meta/service/entity-attribute-update.service.js.map +1 -0
- package/dist/module/meta/service/entity-dynamic.service.js +27 -27
- 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 +19 -19
- package/dist/module/meta/service/resolver.service.js.map +1 -1
- package/dist/module/module/repository/menu.repository.js +12 -12
- 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 +9 -9
- package/dist/module/user/controller/login.controller.js +18 -18
- 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.js +1 -1
- 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/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.d.ts +1 -0
- package/dist/module/workflow/entity/action.entity.js +5 -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 +5 -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.d.ts +3 -1
- package/dist/module/workflow/repository/task.repository.js +10 -5
- 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 +68 -54
- 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 +53 -51
- 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/controller/workflow-automation.controller.d.ts +6 -0
- package/dist/module/workflow-automation/controller/workflow-automation.controller.js +16 -0
- package/dist/module/workflow-automation/controller/workflow-automation.controller.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/entity/workflow-automation.entity.d.ts +2 -0
- package/dist/module/workflow-automation/entity/workflow-automation.entity.js +8 -0
- package/dist/module/workflow-automation/entity/workflow-automation.entity.js.map +1 -1
- package/dist/module/workflow-automation/service/schedule-handler.service.d.ts +16 -0
- package/dist/module/workflow-automation/service/schedule-handler.service.js +109 -0
- package/dist/module/workflow-automation/service/schedule-handler.service.js.map +1 -0
- package/dist/module/workflow-automation/service/workflow-automation-engine.service.d.ts +1 -1
- 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.d.ts +13 -1
- package/dist/module/workflow-automation/service/workflow-automation.service.js +115 -6
- package/dist/module/workflow-automation/service/workflow-automation.service.js.map +1 -1
- package/dist/module/workflow-automation/workflow-automation.module.js +14 -1
- package/dist/module/workflow-automation/workflow-automation.module.js.map +1 -1
- package/dist/module/workflow-schedule/constants/schedule.constants.d.ts +27 -0
- package/dist/module/workflow-schedule/constants/schedule.constants.js +31 -0
- package/dist/module/workflow-schedule/constants/schedule.constants.js.map +1 -0
- package/dist/module/workflow-schedule/controller/workflow-schedule.controller.d.ts +83 -0
- package/dist/module/workflow-schedule/controller/workflow-schedule.controller.js +220 -0
- package/dist/module/workflow-schedule/controller/workflow-schedule.controller.js.map +1 -0
- package/dist/module/workflow-schedule/dto/create-schedule.dto.d.ts +32 -0
- package/dist/module/workflow-schedule/dto/create-schedule.dto.js +163 -0
- package/dist/module/workflow-schedule/dto/create-schedule.dto.js.map +1 -0
- package/dist/module/workflow-schedule/dto/get-execution-logs.dto.d.ts +35 -0
- package/dist/module/workflow-schedule/dto/get-execution-logs.dto.js +124 -0
- package/dist/module/workflow-schedule/dto/get-execution-logs.dto.js.map +1 -0
- package/dist/module/workflow-schedule/dto/update-schedule.dto.d.ts +19 -0
- package/dist/module/workflow-schedule/dto/update-schedule.dto.js +106 -0
- package/dist/module/workflow-schedule/dto/update-schedule.dto.js.map +1 -0
- package/dist/module/workflow-schedule/entities/scheduled-workflow.entity.d.ts +30 -0
- package/dist/module/workflow-schedule/entities/scheduled-workflow.entity.js +113 -0
- package/dist/module/workflow-schedule/entities/scheduled-workflow.entity.js.map +1 -0
- package/dist/module/workflow-schedule/entities/workflow-execution-log.entity.d.ts +34 -0
- package/dist/module/workflow-schedule/entities/workflow-execution-log.entity.js +118 -0
- package/dist/module/workflow-schedule/entities/workflow-execution-log.entity.js.map +1 -0
- package/dist/module/workflow-schedule/interfaces/schedule-job-data.interface.d.ts +44 -0
- package/dist/module/workflow-schedule/interfaces/schedule-job-data.interface.js +3 -0
- package/dist/module/workflow-schedule/interfaces/schedule-job-data.interface.js.map +1 -0
- package/dist/module/workflow-schedule/processors/schedule.processor.d.ts +31 -0
- package/dist/module/workflow-schedule/processors/schedule.processor.js +409 -0
- package/dist/module/workflow-schedule/processors/schedule.processor.js.map +1 -0
- package/dist/module/workflow-schedule/service/workflow-schedule.service.d.ts +44 -0
- package/dist/module/workflow-schedule/service/workflow-schedule.service.js +434 -0
- package/dist/module/workflow-schedule/service/workflow-schedule.service.js.map +1 -0
- package/dist/module/workflow-schedule/workflow-schedule.module.d.ts +2 -0
- package/dist/module/workflow-schedule/workflow-schedule.module.js +44 -0
- package/dist/module/workflow-schedule/workflow-schedule.module.js.map +1 -0
- package/dist/table.config.js +5 -1
- package/dist/table.config.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/utils/service/loggingUtil.service.d.ts +9 -2
- package/dist/utils/service/loggingUtil.service.js +65 -14
- package/dist/utils/service/loggingUtil.service.js.map +1 -1
- package/dist/utils/service/reflection-helper.service.js +3 -3
- package/dist/utils/service/reflection-helper.service.js.map +1 -1
- package/dist/utils/utils.module.js +2 -0
- package/dist/utils/utils.module.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 -120
- package/src/app.controller.ts +12 -12
- package/src/app.module.ts +62 -52
- package/src/app.service.ts +8 -8
- package/src/config/bull.config.ts +69 -0
- package/src/config/config.module.ts +18 -17
- package/src/config/database.config.ts +23 -48
- package/src/constant/global.constant.ts +67 -67
- package/src/core.module.ts +81 -81
- 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 +21 -0
- package/src/module/entity_json/entity_json.module.ts +13 -0
- package/src/module/entity_json/service/entity_json.service.ts +88 -0
- 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 +1005 -1053
- 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 +700 -494
- 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 -0
- package/src/module/linked_attributes/entity/linked_attribute.entity.ts +48 -0
- package/src/module/linked_attributes/linked_attributes.module.ts +16 -0
- package/src/module/linked_attributes/repository/linked_attribute.repository.ts +12 -0
- package/src/module/linked_attributes/service/linked_attributes.service.ts +22 -0
- 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 -266
- 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 +74 -66
- package/src/module/meta/controller/entity-dynamic.controller.ts +125 -125
- package/src/module/meta/controller/entity-master.controller.ts +28 -28
- 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 -89
- 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 -158
- package/src/module/meta/repository/app-master.repository.ts +20 -20
- package/src/module/meta/repository/attribute-master.repository.ts +118 -118
- package/src/module/meta/repository/entity-attribute-update.repository.ts +44 -0
- package/src/module/meta/repository/entity-master.repository.ts +69 -69
- 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 +126 -126
- package/src/module/meta/service/common.service.ts +9 -9
- package/src/module/meta/service/entity-attribute-update.service.ts +29 -0
- package/src/module/meta/service/entity-dynamic.service.ts +819 -819
- package/src/module/meta/service/entity-list.service.ts +205 -205
- package/src/module/meta/service/entity-master.service.ts +169 -169
- 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 +209 -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 +163 -163
- package/src/module/notification/service/otp.service.ts +132 -132
- 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 -197
- 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 -304
- 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 -365
- 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 -50
- 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 -333
- 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 -126
- 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 -560
- package/src/module/workflow/service/workflow-list-master.service.ts +60 -60
- package/src/module/workflow/service/workflow-meta.service.ts +654 -640
- package/src/module/workflow/service/workflow.service.ts +205 -205
- package/src/module/workflow/workflow.module.ts +176 -176
- package/src/module/workflow-automation/controller/workflow-automation.controller.ts +43 -21
- package/src/module/workflow-automation/entity/workflow-automation-action.entity.ts +26 -26
- package/src/module/workflow-automation/entity/workflow-automation.entity.ts +40 -35
- 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 +150 -0
- package/src/module/workflow-automation/service/workflow-automation-engine.service.ts +214 -214
- package/src/module/workflow-automation/service/workflow-automation.service.ts +508 -347
- package/src/module/workflow-automation/workflow-automation.module.ts +47 -34
- package/src/module/workflow-schedule/INSTALLATION.md +244 -0
- package/src/module/workflow-schedule/README.md +422 -0
- package/src/module/workflow-schedule/constants/schedule.constants.ts +48 -0
- package/src/module/workflow-schedule/controller/workflow-schedule.controller.ts +255 -0
- package/src/module/workflow-schedule/docs/CLAUDE_CODE_GUIDE.md +510 -0
- package/src/module/workflow-schedule/docs/CLAUDE_CODE_PROMPT.md +362 -0
- package/src/module/workflow-schedule/docs/RUN_CLAUDE_CODE.sh +68 -0
- package/src/module/workflow-schedule/dto/create-schedule.dto.ts +147 -0
- package/src/module/workflow-schedule/dto/get-execution-logs.dto.ts +119 -0
- package/src/module/workflow-schedule/dto/update-schedule.dto.ts +96 -0
- package/src/module/workflow-schedule/entities/scheduled-workflow.entity.ts +148 -0
- package/src/module/workflow-schedule/entities/workflow-execution-log.entity.ts +154 -0
- package/src/module/workflow-schedule/interfaces/schedule-job-data.interface.ts +53 -0
- package/src/module/workflow-schedule/processors/schedule.processor.ts +584 -0
- package/src/module/workflow-schedule/service/workflow-schedule.service.ts +600 -0
- package/src/module/workflow-schedule/workflow-schedule.module.ts +43 -0
- package/src/resources/dev.properties.yaml +30 -31
- 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 -126
- 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 -34
- 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 -25
- package/tsconfig.build.json +4 -4
- package/tsconfig.json +24 -24
- 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/server.log +0 -850
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-list-master.service.js","sourceRoot":"","sources":["../../../../src/module/workflow/service/workflow-list-master.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,gGAAwF;AACxF,qCAAqC;AAG9B,IAAM,yBAAyB,GAA/B,MAAM,yBAA0B,SAAQ,+CAAiB;IAC9D,YAA6B,UAAsB;QACjD,KAAK,EAAE,CAAC;QADmB,eAAU,GAAV,UAAU,CAAY;IAEnD,CAAC;IAED,KAAK,CAAC,8BAA8B,CAAC,OAAe;QAClD,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CACzC;;;;;;;;;;OAUC,EACD,CAAC,OAAO,CAAC,CACV,CAAC;QAGF,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,IAAS,EAAE,EAAE,CAAC,CAAC;YACjC,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;YACzC,YAAY,EAAE,MAAM;SACrB,CAAC,CAAC,CAAC;IACN,CAAC;IAED,KAAK,CAAC,gBAAgB,CAAC,YAAoB;QACzC,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CACzC,
|
|
1
|
+
{"version":3,"file":"workflow-list-master.service.js","sourceRoot":"","sources":["../../../../src/module/workflow/service/workflow-list-master.service.ts"],"names":[],"mappings":";;;;;;;;;;;;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nextStage.id,
|
|
165
165
|
is_current: 'Y',
|
|
166
166
|
});
|
|
167
|
-
this.populateActionService(stageData.nextStage.id, loggedInUser, mapped_entity_id, mapped_entity_type);
|
|
167
|
+
await this.populateActionService(stageData.nextStage.id, loggedInUser, mapped_entity_id, mapped_entity_type);
|
|
168
168
|
try {
|
|
169
169
|
await this.activityLogService.logActivity({
|
|
170
170
|
mapped_entity_id: mapped_entity_id,
|
|
@@ -223,10 +223,10 @@ let WorkflowMetaService = class WorkflowMetaService extends entity_service_impl_
|
|
|
223
223
|
action_id: entityData.action_id,
|
|
224
224
|
}, loggedInUser);
|
|
225
225
|
const leadData = await this.getEntityData('LEAD', lead_id, loggedInUser);
|
|
226
|
-
const unassignedListMasterItemData = await this.dataSource.query(`SELECT name, id
|
|
227
|
-
FROM frm_list_master_items
|
|
228
|
-
WHERE listtype = "LEST" AND organization_id =
|
|
229
|
-
AND value IN (
|
|
226
|
+
const unassignedListMasterItemData = await this.dataSource.query(`SELECT name, id
|
|
227
|
+
FROM frm_list_master_items
|
|
228
|
+
WHERE listtype = "LEST" AND organization_id = ?
|
|
229
|
+
AND value IN (?, ?)`, [loggedInUser.organization_id, 'unassigned', 'active']);
|
|
230
230
|
const unassignedId = unassignedListMasterItemData.find((item) => item.name.toLowerCase() === 'unassigned')?.id;
|
|
231
231
|
const activeId = unassignedListMasterItemData.find((item) => item.name.toLowerCase() === 'active')?.id;
|
|
232
232
|
if (leadData?.lead_status === unassignedId) {
|
|
@@ -237,40 +237,52 @@ let WorkflowMetaService = class WorkflowMetaService extends entity_service_impl_
|
|
|
237
237
|
status: leadData?.lead_status,
|
|
238
238
|
lead_status: leadData?.lead_status,
|
|
239
239
|
}, loggedInUser);
|
|
240
|
-
await this.dataSource.query(`UPDATE frm_wf_action_data SET user_id
|
|
241
|
-
WHERE mapped_entity_id
|
|
242
|
-
AND mapped_entity_type =
|
|
243
|
-
AND stage_id =
|
|
244
|
-
AND (is_current = 'Y' OR is_current IS NULL)
|
|
240
|
+
await this.dataSource.query(`UPDATE frm_wf_action_data SET user_id =?
|
|
241
|
+
WHERE mapped_entity_id=?
|
|
242
|
+
AND mapped_entity_type = ?
|
|
243
|
+
AND stage_id = ?
|
|
244
|
+
AND (is_current = 'Y' OR is_current IS NULL)
|
|
245
245
|
`, [lead_owner, lead_id, entity_type, stage_id]);
|
|
246
|
-
await this.dataSource.query(`UPDATE crm_lead_meeting SET user_id
|
|
247
|
-
WHERE stage_id =
|
|
248
|
-
AND mapped_entity_id =
|
|
249
|
-
AND mapped_entity_type = "LEAD"
|
|
250
|
-
AND (status='scheduled' OR status='rescheduled')
|
|
246
|
+
await this.dataSource.query(`UPDATE crm_lead_meeting SET user_id=?
|
|
247
|
+
WHERE stage_id = ?
|
|
248
|
+
AND mapped_entity_id = ?
|
|
249
|
+
AND mapped_entity_type = "LEAD"
|
|
250
|
+
AND (status='scheduled' OR status='rescheduled')
|
|
251
251
|
`, [lead_owner, stage_id, lead_id]);
|
|
252
|
-
const taskRows = await this.dataSource.query(`SELECT id,status FROM frm_wf_task_data
|
|
253
|
-
WHERE mapped_entity_id =
|
|
254
|
-
AND mapped_entity_type =
|
|
255
|
-
AND stage_id =
|
|
252
|
+
const taskRows = await this.dataSource.query(`SELECT id,status FROM frm_wf_task_data
|
|
253
|
+
WHERE mapped_entity_id = ?
|
|
254
|
+
AND mapped_entity_type = ?
|
|
255
|
+
AND stage_id = ?`, [lead_id, entity_type, stage_id]);
|
|
256
256
|
for (const task of taskRows) {
|
|
257
|
-
const statusRows = await this.dataSource.query(`SELECT value FROM frm_list_master_items
|
|
258
|
-
WHERE id =
|
|
257
|
+
const statusRows = await this.dataSource.query(`SELECT value FROM frm_list_master_items
|
|
258
|
+
WHERE id = ? AND organization_id = ?`, [task.status, loggedInUser.organization_id]);
|
|
259
259
|
const statusName = statusRows[0]?.value?.toLowerCase() || '';
|
|
260
260
|
if (['todo', 'in_progress'].includes(statusName) ||
|
|
261
261
|
statusName === 'todo') {
|
|
262
|
-
await this.dataSource.query(`UPDATE frm_wf_task_data SET user_id =
|
|
262
|
+
await this.dataSource.query(`UPDATE frm_wf_task_data SET user_id = ?, task_owner = ? WHERE id = ?`, [lead_owner, lead_owner, task.id]);
|
|
263
263
|
}
|
|
264
264
|
}
|
|
265
|
-
|
|
265
|
+
let leadOwnerName;
|
|
266
|
+
try {
|
|
267
|
+
const baseUrl = this.configService.get('REDIRECT_BE_URL');
|
|
268
|
+
const queryParams = new URLSearchParams({
|
|
269
|
+
loggedInUser: JSON.stringify(loggedInUser),
|
|
270
|
+
}).toString();
|
|
271
|
+
const url = `${baseUrl}/entity/public/getById/${entityData?.lead_owner}?entity_type=USR&${queryParams}`;
|
|
272
|
+
const response = await axios_1.default.get(url);
|
|
273
|
+
leadOwnerName = response.data;
|
|
274
|
+
}
|
|
275
|
+
catch (error) {
|
|
276
|
+
console.error('Internal Entity API call failed:', error.message);
|
|
277
|
+
}
|
|
266
278
|
try {
|
|
267
279
|
const logData = {
|
|
268
280
|
mapped_entity_id: lead_id,
|
|
269
281
|
mapped_entity_type: 'LEAD',
|
|
270
282
|
title: 'Owner Assigned',
|
|
271
283
|
description: leadData?.lead_owner
|
|
272
|
-
? `${leadOwnerName
|
|
273
|
-
: `${leadOwnerName
|
|
284
|
+
? `${leadOwnerName?.name} reassigned as Lead owner.`
|
|
285
|
+
: `${leadOwnerName?.name} assigned as Lead owner.`,
|
|
274
286
|
action: 'assign',
|
|
275
287
|
category: activity_log_repository_1.ACTIVITY_CATEGORIES.ASSIGN,
|
|
276
288
|
appcode: loggedInUser.appcode,
|
|
@@ -302,32 +314,29 @@ let WorkflowMetaService = class WorkflowMetaService extends entity_service_impl_
|
|
|
302
314
|
console.log('No eligible owners found for lead assignment.');
|
|
303
315
|
const userIds = owners?.map((o) => Number(o.id));
|
|
304
316
|
const placeholders = userIds.map(() => '?').join(',');
|
|
305
|
-
const lastRow = await this.dataSource.query(`
|
|
306
|
-
SELECT lead_owner
|
|
307
|
-
FROM crm_lead
|
|
308
|
-
WHERE organization_id =
|
|
309
|
-
AND level_id =
|
|
310
|
-
AND level_type =
|
|
311
|
-
AND lead_owner IN (${placeholders})
|
|
312
|
-
ORDER BY created_date DESC
|
|
313
|
-
LIMIT 1
|
|
317
|
+
const lastRow = await this.dataSource.query(`
|
|
318
|
+
SELECT lead_owner
|
|
319
|
+
FROM crm_lead
|
|
320
|
+
WHERE organization_id = ?
|
|
321
|
+
AND level_id = ?
|
|
322
|
+
AND level_type = ?
|
|
323
|
+
AND lead_owner IN (${placeholders})
|
|
324
|
+
ORDER BY created_date DESC
|
|
325
|
+
LIMIT 1
|
|
314
326
|
`, [organization_id, Number(level_id), level_type, ...userIds]);
|
|
315
327
|
const lastAssigned = lastRow.length ? Number(lastRow[0].lead_owner) : null;
|
|
316
328
|
const lastIdx = lastAssigned != null ? userIds.indexOf(lastAssigned) : -1;
|
|
317
329
|
const nextIdx = (lastIdx + 1) % userIds.length;
|
|
318
330
|
const nextUser = userIds[nextIdx];
|
|
319
|
-
await this.dataSource.query(`
|
|
320
|
-
UPDATE crm_lead
|
|
321
|
-
SET lead_owner = $1
|
|
322
|
-
WHERE organization_id = $2
|
|
323
|
-
AND level_id = $3
|
|
324
|
-
AND level_type = $4
|
|
325
|
-
AND lead_owner IS NULL
|
|
326
|
-
ORDER BY created_date ASC
|
|
327
|
-
LIMIT 1
|
|
328
|
-
`, [nextUser, organization_id, Number(level_id), level_type]);
|
|
329
331
|
console.log(`Assigning lead to user ID: ${nextUser}`);
|
|
330
332
|
const firstAction = actions[0];
|
|
333
|
+
await this.updateLeadOwner({
|
|
334
|
+
lead_id: mapped_entity_id,
|
|
335
|
+
lead_owner: nextUser,
|
|
336
|
+
stage_id: stage_id,
|
|
337
|
+
entity_type: mapped_entity_type,
|
|
338
|
+
action_id: firstAction.id,
|
|
339
|
+
}, loggedInUser);
|
|
331
340
|
await this.taskService.moveTask(loggedInUser, {
|
|
332
341
|
mapped_entity_type,
|
|
333
342
|
mapped_entity_id,
|
|
@@ -338,13 +347,6 @@ let WorkflowMetaService = class WorkflowMetaService extends entity_service_impl_
|
|
|
338
347
|
console.log('Only one action present and it is owner assignment. Moving to next stage.');
|
|
339
348
|
await this.moveToNextStage(mapped_entity_type, mapped_entity_id, loggedInUser);
|
|
340
349
|
}
|
|
341
|
-
await this.updateLeadOwner({
|
|
342
|
-
lead_id: mapped_entity_id,
|
|
343
|
-
lead_owner: nextUser,
|
|
344
|
-
stage_id: stage_id,
|
|
345
|
-
entity_type: mapped_entity_type,
|
|
346
|
-
action_id: firstAction.id,
|
|
347
|
-
}, loggedInUser);
|
|
348
350
|
return nextUser;
|
|
349
351
|
}
|
|
350
352
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-meta.service.js","sourceRoot":"","sources":["../../../../src/module/workflow/service/workflow-meta.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAKwB;AACxB,2CAA+C;AAC/C,6CAAmD;AACnD,iCAA0B;AAC1B,gGAAwF;AAExF,qCAAiD;AACjD,qFAAyE;AACzE,mFAA4E;AAC5E,uFAAkF;AAClF,mEAA+D;AAC/D,+DAA0D;AAC1D,iEAA4D;AAC5D,+EAA0E;AAC1E,iDAA6C;AAGtC,IAAM,mBAAmB,GAAzB,MAAM,mBAAoB,SAAQ,+CAAiB;IACxD,YAEmB,iBAAgD,EAChD,uBAAgD,EAChD,UAAsB,EACtB,cAA8B,EAC9B,iBAAoC,EAEpC,WAAwB,EAExB,kBAAsC,EAEtC,mBAA8C,EAC9C,aAA4B;QAE7C,KAAK,EAAE,CAAC;QAbS,sBAAiB,GAAjB,iBAAiB,CAA+B;QAChD,4BAAuB,GAAvB,uBAAuB,CAAyB;QAChD,eAAU,GAAV,UAAU,CAAY;QACtB,mBAAc,GAAd,cAAc,CAAgB;QAC9B,sBAAiB,GAAjB,iBAAiB,CAAmB;QAEpC,gBAAW,GAAX,WAAW,CAAa;QAExB,uBAAkB,GAAlB,kBAAkB,CAAoB;QAEtC,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,MAAM,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,YAAY,EAAE;YAC5C,kBAAkB;YAClB,gBAAgB;YAChB,QAAQ;YACR,SAAS,EAAE,WAAW,CAAC,EAAE;SAC1B,CAAC,CAAC;QAGH,IAAI,OAAO,CAAC,MAAM,IAAI,CAAC,EAAE,CAAC;YACxB,OAAO,CAAC,GAAG,CACT,2EAA2E,CAC5E,CAAC;YACF,MAAM,IAAI,CAAC,eAAe,CACxB,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,CACb,CAAC;QACJ,CAAC;QAGD,MAAM,IAAI,CAAC,eAAe,CACxB;YACE,OAAO,EAAE,gBAAgB;YACzB,UAAU,EAAE,QAAQ;YACpB,QAAQ,EAAE,QAAQ;YAClB,WAAW,EAAE,kBAAkB;YAC/B,SAAS,EAAE,WAAW,CAAC,EAAE;SAC1B,EACD,YAAY,CACb,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF,CAAA;AAzmBY,kDAAmB;8BAAnB,mBAAmB;IAD/B,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,0BAAgB,EAAC,8CAAiB,CAAC,CAAA;IAMnC,WAAA,IAAA,eAAM,EAAC,aAAa,CAAC,CAAA;IAErB,WAAA,IAAA,eAAM,EAAC,oBAAoB,CAAC,CAAA;IAE5B,WAAA,IAAA,eAAM,EAAC,2BAA2B,CAAC,CAAA;qCATA,oBAAU;QACJ,mDAAuB;QACpC,oBAAU;QACN,gCAAc;QACX,uCAAiB;QAEvB,0BAAW;QAEJ,yCAAkB;QAEjB,uDAAyB;QAC/B,sBAAa;GAdpC,mBAAmB,CAymB/B"}
|
|
1
|
+
{"version":3,"file":"workflow-meta.service.js","sourceRoot":"","sources":["../../../../src/module/workflow/service/workflow-meta.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAKwB;AACxB,2CAA+C;AAC/C,6CAAmD;AACnD,iCAA0B;AAC1B,gGAAwF;AAExF,qCAAiD;AACjD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C;QAGH,IAAI,OAAO,CAAC,MAAM,IAAI,CAAC,EAAE,CAAC;YACxB,OAAO,CAAC,GAAG,CACT,2EAA2E,CAC5E,CAAC;YACF,MAAM,IAAI,CAAC,eAAe,CACxB,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,CACb,CAAC;QACJ,CAAC;QAED,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF,CAAA;AAvnBY,kDAAmB;8BAAnB,mBAAmB;IAD/B,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,0BAAgB,EAAC,8CAAiB,CAAC,CAAA;IAMnC,WAAA,IAAA,eAAM,EAAC,aAAa,CAAC,CAAA;IAErB,WAAA,IAAA,eAAM,EAAC,oBAAoB,CAAC,CAAA;IAE5B,WAAA,IAAA,eAAM,EAAC,2BAA2B,CAAC,CAAA;qCATA,oBAAU;QACJ,mDAAuB;QACpC,oBAAU;QACN,gCAAc;QACX,uCAAiB;QAEvB,0BAAW;QAEJ,yCAAkB;QAEjB,uDAAyB;QAC/B,sBAAa;GAdpC,mBAAmB,CAunB/B"}
|
|
@@ -35,7 +35,7 @@ let WorkflowService = class WorkflowService extends entity_service_impl_service_
|
|
|
35
35
|
return this.workflowRepository.getAllWorkflowsByFilters(entity_type, level_id, level_type);
|
|
36
36
|
}
|
|
37
37
|
async getWorkflowById(id) {
|
|
38
|
-
const result = await this.dataSource.query(`SELECT * FROM frm_wf_master WHERE id =
|
|
38
|
+
const result = await this.dataSource.query(`SELECT * FROM frm_wf_master WHERE id = ?`, [id]);
|
|
39
39
|
return result[0] || null;
|
|
40
40
|
}
|
|
41
41
|
async updateEntity(entityData, loggedInUser) {
|
|
@@ -72,9 +72,9 @@ let WorkflowService = class WorkflowService extends entity_service_impl_service_
|
|
|
72
72
|
currentId: workflowId,
|
|
73
73
|
})
|
|
74
74
|
.execute();
|
|
75
|
-
await this.dataSource.query(`UPDATE frm_wf_level_mapping
|
|
76
|
-
SET workflow_id =
|
|
77
|
-
WHERE mapped_level_id =
|
|
75
|
+
await this.dataSource.query(`UPDATE frm_wf_level_mapping
|
|
76
|
+
SET workflow_id = ?
|
|
77
|
+
WHERE mapped_level_id = ? AND mapped_level_type = ?`, [workflowId, level_id, level_type]);
|
|
78
78
|
}
|
|
79
79
|
return super.updateEntity(entityData, loggedInUser);
|
|
80
80
|
}
|
|
@@ -92,7 +92,7 @@ let WorkflowService = class WorkflowService extends entity_service_impl_service_
|
|
|
92
92
|
if (getWorkflow.is_factory) {
|
|
93
93
|
throw new common_1.BadRequestException('Cannot delete workflow because it is factory.');
|
|
94
94
|
}
|
|
95
|
-
const getAllStageGroup = await this.dataSource.query(`SELECT id FROM frm_wf_stage_group WHERE workflow_id =
|
|
95
|
+
const getAllStageGroup = await this.dataSource.query(`SELECT id FROM frm_wf_stage_group WHERE workflow_id = ? AND level_id = ? AND level_type = ?`, [id, loggedInUser.level_id, loggedInUser.level_type]);
|
|
96
96
|
if (getAllStageGroup.length > 0) {
|
|
97
97
|
for (const stageGroup of getAllStageGroup) {
|
|
98
98
|
await this.stateGroupService.deleteEntity('WFSG', stageGroup.id, loggedInUser);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow.service.js","sourceRoot":"","sources":["../../../../src/module/workflow/service/workflow.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,2CAAyE;AACzE,gGAAwF;AACxF,qCAAyC;AACzC,2EAAuE;AAGvE,sFAAsF;AACtF,uEAAyE;AACzE,+DAAqD;AAErD,iFAA4E;AAC5E,+DAA0D;AAGnD,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,+CAAiB;IACpD,YACmB,UAAsB,EACtB,kBAAsC,EAEtC,iBAAoC,EAEpC,iBAAoC,EACpC,oBAA0C;QAE3D,KAAK,EAAE,CAAC;QARS,eAAU,GAAV,UAAU,CAAY;QACtB,uBAAkB,GAAlB,kBAAkB,CAAoB;QAEtC,sBAAiB,GAAjB,iBAAiB,CAAmB;QAEpC,sBAAiB,GAAjB,iBAAiB,CAAmB;QACpC,yBAAoB,GAApB,oBAAoB,CAAsB;IAG7D,CAAC;IAED,KAAK,CAAC,eAAe,CACnB,WAAmB,EACnB,QAAgB,EAChB,UAAkB;QAElB,OAAO,IAAI,CAAC,kBAAkB,CAAC,wBAAwB,CACrD,WAAW,EACX,QAAQ,EACR,UAAU,CACX,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,eAAe,CAAC,EAAU;QAC9B,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CACxC,
|
|
1
|
+
{"version":3,"file":"workflow.service.js","sourceRoot":"","sources":["../../../../src/module/workflow/service/workflow.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,2CAAyE;AACzE,gGAAwF;AACxF,qCAAyC;AACzC,2EAAuE;AAGvE,sFAAsF;AACtF,uEAAyE;AACzE,+DAAqD;AAErD,iFAA4E;AAC5E,+DAA0D;AAGnD,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,+CAAiB;IACpD,YACmB,UAAsB,EACtB,kBAAsC,EAEtC,iBAAoC,EAEpC,iBAAoC,EACpC,oBAA0C;QAE3D,KAAK,EAAE,CAAC;QARS,eAAU,GAAV,UAAU,CAAY;QACtB,uBAAkB,GAAlB,kBAAkB,CAAoB;QAEtC,sBAAiB,GAAjB,iBAAiB,CAAmB;QAEpC,sBAAiB,GAAjB,iBAAiB,CAAmB;QACpC,yBAAoB,GAApB,oBAAoB,CAAsB;IAG7D,CAAC;IAED,KAAK,CAAC,eAAe,CACnB,WAAmB,EACnB,QAAgB,EAChB,UAAkB;QAElB,OAAO,IAAI,CAAC,kBAAkB,CAAC,wBAAwB,CACrD,WAAW,EACX,QAAQ,EACR,UAAU,CACX,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,eAAe,CAAC,EAAU;QAC9B,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CACxC,0CAA0C,EAC1C,CAAC,EAAE,CAAC,CACL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,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC;IACvE,CAAC;CACF,CAAA;AA7LY,0CAAe;0BAAf,eAAe;IAD3B,IAAA,mBAAU,GAAE;IAKR,WAAA,IAAA,eAAM,EAAC,mBAAmB,CAAC,CAAA;IAE3B,WAAA,IAAA,eAAM,EAAC,mBAAmB,CAAC,CAAA;qCAJC,oBAAU;QACF,wCAAkB;QAEnB,uCAAiB;QAEjB,uCAAiB;QACd,6CAAoB;GARlD,eAAe,CA6L3B"}
|
|
@@ -2,4 +2,10 @@ import { WorkflowAutomationService } from '../service/workflow-automation.servic
|
|
|
2
2
|
export declare class WorkflowAutomationController {
|
|
3
3
|
private readonly workflowAutomationService;
|
|
4
4
|
constructor(workflowAutomationService: WorkflowAutomationService);
|
|
5
|
+
updateSequence(body: any, req: Request & {
|
|
6
|
+
user?: any;
|
|
7
|
+
}): Promise<{
|
|
8
|
+
updated: number;
|
|
9
|
+
results: any[];
|
|
10
|
+
}>;
|
|
5
11
|
}
|
|
@@ -20,8 +20,24 @@ let WorkflowAutomationController = class WorkflowAutomationController {
|
|
|
20
20
|
constructor(workflowAutomationService) {
|
|
21
21
|
this.workflowAutomationService = workflowAutomationService;
|
|
22
22
|
}
|
|
23
|
+
async updateSequence(body, req) {
|
|
24
|
+
const loggedInUser = req.user?.userData;
|
|
25
|
+
if (!Array.isArray(body) || body.length === 0) {
|
|
26
|
+
throw new common_1.BadRequestException('Invalid input. Expected a non-empty array.');
|
|
27
|
+
}
|
|
28
|
+
return this.workflowAutomationService.updateSequence(body, loggedInUser);
|
|
29
|
+
}
|
|
23
30
|
};
|
|
24
31
|
exports.WorkflowAutomationController = WorkflowAutomationController;
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, common_1.Post)('/updateSequence'),
|
|
34
|
+
(0, common_1.HttpCode)(common_1.HttpStatus.OK),
|
|
35
|
+
__param(0, (0, common_1.Body)()),
|
|
36
|
+
__param(1, (0, common_1.Req)()),
|
|
37
|
+
__metadata("design:type", Function),
|
|
38
|
+
__metadata("design:paramtypes", [Object, Object]),
|
|
39
|
+
__metadata("design:returntype", Promise)
|
|
40
|
+
], WorkflowAutomationController.prototype, "updateSequence", null);
|
|
25
41
|
exports.WorkflowAutomationController = WorkflowAutomationController = __decorate([
|
|
26
42
|
(0, common_1.Controller)('/workflow-automation'),
|
|
27
43
|
(0, common_1.UseGuards)(jwt_guard_1.JwtAuthGuard),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-automation.controller.js","sourceRoot":"","sources":["../../../../src/module/workflow-automation/controller/workflow-automation.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"workflow-automation.controller.js","sourceRoot":"","sources":["../../../../src/module/workflow-automation/controller/workflow-automation.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAUwB;AACxB,2DAAgE;AAChE,wFAAmF;AAI5E,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IACvC,YAEmB,yBAAoD;QAApD,8BAAyB,GAAzB,yBAAyB,CAA2B;IACpE,CAAC;IAQE,AAAN,KAAK,CAAC,cAAc,CACV,IAAS,EACV,GAA6B;QAEpC,MAAM,YAAY,GAAG,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC;QAExC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC9C,MAAM,IAAI,4BAAmB,CAC3B,4CAA4C,CAC7C,CAAC;QACJ,CAAC;QAED,OAAO,IAAI,CAAC,yBAAyB,CAAC,cAAc,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;IAC3E,CAAC;CACF,CAAA;AA1BY,oEAA4B;AAYjC;IAFL,IAAA,aAAI,EAAC,iBAAiB,CAAC;IACvB,IAAA,iBAAQ,EAAC,mBAAU,CAAC,EAAE,CAAC;IAErB,WAAA,IAAA,aAAI,GAAE,CAAA;IACN,WAAA,IAAA,YAAG,GAAE,CAAA;;;;kEAWP;uCAzBU,4BAA4B;IAFxC,IAAA,mBAAU,EAAC,sBAAsB,CAAC;IAClC,IAAA,kBAAS,EAAC,wBAAY,CAAC;IAGnB,WAAA,IAAA,eAAM,EAAC,2BAA2B,CAAC,CAAA;qCACQ,uDAAyB;GAH5D,4BAA4B,CA0BxC"}
|
|
@@ -39,7 +39,7 @@ __decorate([
|
|
|
39
39
|
__decorate([
|
|
40
40
|
(0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
|
|
41
41
|
__metadata("design:type", String)
|
|
42
|
-
], WorkflowAutomationActionEntity.prototype, "
|
|
42
|
+
], WorkflowAutomationActionEntity.prototype, "actionCategoryName", void 0);
|
|
43
43
|
exports.WorkflowAutomationActionEntity = WorkflowAutomationActionEntity = __decorate([
|
|
44
44
|
(0, typeorm_1.Entity)({ name: 'frm_wf_automation_action' }),
|
|
45
45
|
__metadata("design:paramtypes", [])
|
|
@@ -52,6 +52,14 @@ __decorate([
|
|
|
52
52
|
(0, typeorm_1.Column)({ type: 'json', nullable: true }),
|
|
53
53
|
__metadata("design:type", String)
|
|
54
54
|
], WorkflowAutomation.prototype, "schedule", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], WorkflowAutomation.prototype, "cron_type", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
61
|
+
__metadata("design:type", Number)
|
|
62
|
+
], WorkflowAutomation.prototype, "sequence", void 0);
|
|
55
63
|
exports.WorkflowAutomation = WorkflowAutomation = __decorate([
|
|
56
64
|
(0, typeorm_1.Entity)({ name: 'frm_wf_automation' }),
|
|
57
65
|
__metadata("design:paramtypes", [])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-automation.entity.js","sourceRoot":"","sources":["../../../../src/module/workflow-automation/entity/workflow-automation.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uEAAmE;AACnE,6EAAuE;AACvE,qCAAyC;AAGlC,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,+BAAU;IAChD;QACE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,WAAW,GAAG,qCAAmB,CAAC;IACzC,CAAC;
|
|
1
|
+
{"version":3,"file":"workflow-automation.entity.js","sourceRoot":"","sources":["../../../../src/module/workflow-automation/entity/workflow-automation.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uEAAmE;AACnE,6EAAuE;AACvE,qCAAyC;AAGlC,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,+BAAU;IAChD;QACE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,WAAW,GAAG,qCAAmB,CAAC;IACzC,CAAC;CA8BF,CAAA;AAlCY,gDAAkB;AAO7B;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uDACxB;AAGpB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8DACjB;AAG3B;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yDACtB;AAGtB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iEACd;AAG9B;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gEACf;AAG7B;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wDACvB;AAGrB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kEACb;AAG/B;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;oDACxB;AAGjB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDAC1B;AAElB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;oDACvB;6BAjCN,kBAAkB;IAD9B,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,mBAAmB,EAAE,CAAC;;GACzB,kBAAkB,CAkC9B"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FilterEvaluatorService } from 'src/module/filter/service/filter-evaluator.service';
|
|
2
|
+
import { DataSource } from 'typeorm';
|
|
3
|
+
import { WorkflowAutomationEngineService } from './workflow-automation-engine.service';
|
|
4
|
+
export declare class ScheduleHandlerService {
|
|
5
|
+
private readonly dataSource;
|
|
6
|
+
private readonly filterEvaluator;
|
|
7
|
+
private readonly workflowAutomationEngineService;
|
|
8
|
+
private readonly logger;
|
|
9
|
+
constructor(dataSource: DataSource, filterEvaluator: FilterEvaluatorService, workflowAutomationEngineService: WorkflowAutomationEngineService);
|
|
10
|
+
scheduleQueryBuilder(workflowId: number, jobData: any): Promise<{
|
|
11
|
+
results: any;
|
|
12
|
+
workflow: any;
|
|
13
|
+
tableName: any;
|
|
14
|
+
}>;
|
|
15
|
+
handleScheduledWorkflow(workflowId: number, jobData: any): Promise<void>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var ScheduleHandlerService_1;
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.ScheduleHandlerService = void 0;
|
|
14
|
+
const common_1 = require("@nestjs/common");
|
|
15
|
+
const filter_evaluator_service_1 = require("../../filter/service/filter-evaluator.service");
|
|
16
|
+
const typeorm_1 = require("typeorm");
|
|
17
|
+
const workflow_automation_engine_service_1 = require("./workflow-automation-engine.service");
|
|
18
|
+
let ScheduleHandlerService = ScheduleHandlerService_1 = class ScheduleHandlerService {
|
|
19
|
+
constructor(dataSource, filterEvaluator, workflowAutomationEngineService) {
|
|
20
|
+
this.dataSource = dataSource;
|
|
21
|
+
this.filterEvaluator = filterEvaluator;
|
|
22
|
+
this.workflowAutomationEngineService = workflowAutomationEngineService;
|
|
23
|
+
this.logger = new common_1.Logger(ScheduleHandlerService_1.name);
|
|
24
|
+
}
|
|
25
|
+
async scheduleQueryBuilder(workflowId, jobData) {
|
|
26
|
+
const [workflow] = await this.dataSource.query(`SELECT * FROM frm_wf_automation WHERE id = ? AND organization_id = ?`, [workflowId, jobData.organizationId]);
|
|
27
|
+
if (!workflow)
|
|
28
|
+
throw new Error(`Workflow with ID ${workflowId} not found`);
|
|
29
|
+
const event = JSON.parse(workflow.event_json || '{}');
|
|
30
|
+
const scheduleJson = workflow.schedule;
|
|
31
|
+
const entityType = workflow.applicable_entity_type;
|
|
32
|
+
const [entity] = await this.dataSource.query(`SELECT data_source FROM frm_entity_master WHERE mapped_entity_type = ? AND organization_id = ?`, [entityType, jobData.organizationId]);
|
|
33
|
+
if (!entity?.data_source)
|
|
34
|
+
throw new Error(`Entity ${entityType} not found`);
|
|
35
|
+
const tableName = entity.data_source;
|
|
36
|
+
const [executionDateItem] = await this.dataSource.query(`SELECT name FROM frm_list_master_items WHERE id = ?`, [scheduleJson.executionDate]);
|
|
37
|
+
const executionDateName = executionDateItem?.name?.toLowerCase() || '';
|
|
38
|
+
const executionDataOrTime = scheduleJson.executionDateOrTime;
|
|
39
|
+
const executionUnits = Number(scheduleJson.executionDateUnits || 0);
|
|
40
|
+
const fixedTime = scheduleJson.fixedTime;
|
|
41
|
+
let comparisonDateCondition = '';
|
|
42
|
+
if (executionDateName.includes('after')) {
|
|
43
|
+
comparisonDateCondition = `
|
|
44
|
+
${executionDataOrTime} >= CURDATE() + INTERVAL ${executionUnits} DAY
|
|
45
|
+
AND ${executionDataOrTime} < CURDATE() + INTERVAL ${executionUnits + 1} DAY
|
|
46
|
+
`;
|
|
47
|
+
}
|
|
48
|
+
else if (executionDateName.includes('before')) {
|
|
49
|
+
comparisonDateCondition = `
|
|
50
|
+
${executionDataOrTime} >= CURDATE() - INTERVAL ${executionUnits + 1} DAY
|
|
51
|
+
AND ${executionDataOrTime} < CURDATE() - INTERVAL ${executionUnits} DAY
|
|
52
|
+
`;
|
|
53
|
+
}
|
|
54
|
+
else if (executionDateName.includes('same')) {
|
|
55
|
+
comparisonDateCondition = `
|
|
56
|
+
${executionDataOrTime} >= CURDATE()
|
|
57
|
+
AND ${executionDataOrTime} < CURDATE() + INTERVAL 1 DAY
|
|
58
|
+
`;
|
|
59
|
+
}
|
|
60
|
+
const query = `
|
|
61
|
+
SELECT *
|
|
62
|
+
FROM ${tableName}
|
|
63
|
+
WHERE ${comparisonDateCondition}
|
|
64
|
+
AND organization_id = ?
|
|
65
|
+
`;
|
|
66
|
+
this.logger.debug(`Executing Scheduler Query: ${query}`);
|
|
67
|
+
const results = await this.dataSource.query(query, [
|
|
68
|
+
jobData.organizationId,
|
|
69
|
+
]);
|
|
70
|
+
this.logger.log(`Found ${results.length} scheduled records for ${tableName}`);
|
|
71
|
+
return { results, workflow, tableName };
|
|
72
|
+
}
|
|
73
|
+
async handleScheduledWorkflow(workflowId, jobData) {
|
|
74
|
+
const { results, workflow, tableName } = await this.scheduleQueryBuilder(workflowId, jobData);
|
|
75
|
+
if (!results?.length) {
|
|
76
|
+
this.logger.warn(`No records found for scheduled workflow ${workflowId}`);
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
this.logger.log(`Processing ${results.length} records for workflow ${workflowId}`);
|
|
80
|
+
const event = JSON.parse(workflow.event_json || '{}');
|
|
81
|
+
const filter = workflow.condition_filter_code;
|
|
82
|
+
const mappedEntityType = workflow.applicable_entity_type;
|
|
83
|
+
const matchedEntities = [];
|
|
84
|
+
for (const record of results) {
|
|
85
|
+
const entityIdToUse = record.id;
|
|
86
|
+
const criteriaMatched = await this.filterEvaluator.evaluateCriteria(mappedEntityType, filter, entityIdToUse, jobData);
|
|
87
|
+
this.logger.debug(`⚖️ Criteria check for entity ${entityIdToUse} -> ${criteriaMatched}`);
|
|
88
|
+
if (criteriaMatched) {
|
|
89
|
+
matchedEntities.push(record);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
if (!matchedEntities.length) {
|
|
93
|
+
this.logger.log(`No records passed criteria for workflow ${workflowId}`);
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
this.logger.log(`✅ ${matchedEntities.length} entities passed criteria, executing actions...`);
|
|
97
|
+
for (const entity of matchedEntities) {
|
|
98
|
+
await this.workflowAutomationEngineService.executeActions(workflowId, entity, jobData);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
exports.ScheduleHandlerService = ScheduleHandlerService;
|
|
103
|
+
exports.ScheduleHandlerService = ScheduleHandlerService = ScheduleHandlerService_1 = __decorate([
|
|
104
|
+
(0, common_1.Injectable)(),
|
|
105
|
+
__metadata("design:paramtypes", [typeorm_1.DataSource,
|
|
106
|
+
filter_evaluator_service_1.FilterEvaluatorService,
|
|
107
|
+
workflow_automation_engine_service_1.WorkflowAutomationEngineService])
|
|
108
|
+
], ScheduleHandlerService);
|
|
109
|
+
//# sourceMappingURL=schedule-handler.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schedule-handler.service.js","sourceRoot":"","sources":["../../../../src/module/workflow-automation/service/schedule-handler.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAA4D;AAC5D,4FAA4F;AAC5F,qCAAqC;AACrC,6FAAuF;AAGhF,IAAM,sBAAsB,8BAA5B,MAAM,sBAAsB;IAGjC,YACmB,UAAsB,EACtB,eAAuC,EAEvC,+BAAgE;QAHhE,eAAU,GAAV,UAAU,CAAY;QACtB,oBAAe,GAAf,eAAe,CAAwB;QAEvC,oCAA+B,GAA/B,+BAA+B,CAAiC;QANlE,WAAM,GAAG,IAAI,eAAM,CAAC,wBAAsB,CAAC,IAAI,CAAC,CAAC;IAO/D,CAAC;IAEJ,KAAK,CAAC,oBAAoB,CAAC,UAAkB,EAAE,OAAY;QAEzD,MAAM,CAAC,QAAQ,CAAC,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CAC5C,sEAAsE,EACtE,CAAC,UAAU,EAAE,OAAO,CAAC,cAAc,CAAC,CACrC,CAAC;QAEF,IAAI,CAAC,QAAQ;YAAE,MAAM,IAAI,KAAK,CAAC,oBAAoB,UAAU,YAAY,CAAC,CAAC;QAE3E,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC;QACtD,MAAM,YAAY,GAAG,QAAQ,CAAC,QAAQ,CAAC;QACvC,MAA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ChC,MAAM,eAAe,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,gBAAgB,CACjE,gBAAgB,EAChB,MAAM,EACN,aAAa,EACb,OAAO,CACR,CAAC;YAEF,IAAI,CAAC,MAAM,CAAC,KAAK,CACf,gCAAgC,aAAa,OAAO,eAAe,EAAE,CACtE,CAAC;YAEF,IAAI,eAAe,EAAE,CAAC;gBACpB,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAC/B,CAAC;QACH,CAAC;QAGD,IAAI,CAAC,eAAe,CAAC,MAAM,EAAE,CAAC;YAC5B,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,2CAA2C,UAAU,EAAE,CAAC,CAAC;YACzE,OAAO;QACT,CAAC;QAED,IAAI,CAAC,MAAM,CAAC,GAAG,CACb,KAAK,eAAe,CAAC,MAAM,iDAAiD,CAC7E,CAAC;QAEF,KAAK,MAAM,MAAM,IAAI,eAAe,EAAE,CAAC;YACrC,MAAM,IAAI,CAAC,+BAA+B,CAAC,cAAc,CACvD,UAAU,EACV,MAAM,EACN,OAAO,CACR,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAA;AA/IY,wDAAsB;iCAAtB,sBAAsB;IADlC,IAAA,mBAAU,GAAE;qCAKoB,oBAAU;QACL,iDAAsB;QAEN,oEAA+B;GAPxE,sBAAsB,CA+IlC"}
|
|
@@ -10,5 +10,5 @@ export declare class WorkflowAutomationEngineService {
|
|
|
10
10
|
constructor(wfService: WorkflowAutomationService, filterEvaluator: FilterEvaluatorService, dataSource: DataSource);
|
|
11
11
|
registerAction(actionName: string, actionInstance: Action): void;
|
|
12
12
|
handleEntityEvent(entityType: string, eventType: 'CREATE' | 'UPDATE' | 'DELETE', newEntity: any, user: any, preUpdateStates?: Record<number, boolean> | null): Promise<void>;
|
|
13
|
-
|
|
13
|
+
executeActions(workflow_automation_id: number, entity: any, user: any): Promise<void>;
|
|
14
14
|
}
|
|
@@ -80,7 +80,7 @@ let WorkflowAutomationEngineService = class WorkflowAutomationEngineService {
|
|
|
80
80
|
}
|
|
81
81
|
for (const action of actions) {
|
|
82
82
|
try {
|
|
83
|
-
const [category] = await this.dataSource.query(`SELECT action_decorator FROM frm_wf_action_category WHERE id =
|
|
83
|
+
const [category] = await this.dataSource.query(`SELECT action_decorator FROM frm_wf_action_category WHERE id = ?`, [action.action_category_id]);
|
|
84
84
|
if (!category?.action_decorator) {
|
|
85
85
|
console.warn(`⚠️ [WorkflowAutomationEngine] No action_decorator found for category_id=${action.action_category_id}`);
|
|
86
86
|
continue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-automation-engine.service.js","sourceRoot":"","sources":["../../../../src/module/workflow-automation/service/workflow-automation-engine.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,2CAAoD;AACpD,+EAA0E;AAC1E,4FAAuF;AAEvF,qCAAqC;AAG9B,IAAM,+BAA+B,GAArC,MAAM,+BAA+B;IAG1C,YAEE,SAAqD,EACpC,eAAuC,EACvC,UAAsB;QAFtB,cAAS,GAAT,SAAS,CAA2B;QACpC,oBAAe,GAAf,eAAe,CAAwB;QACvC,eAAU,GAAV,UAAU,CAAY;QANxB,YAAO,GAAG,IAAI,GAAG,EAAkB,CAAC;IAOlD,CAAC;IAEJ,cAAc,CAAC,UAAkB,EAAE,cAAsB;QACvD,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAC7C,OAAO,CAAC,GAAG,CACT,oDAAoD,UAAU,EAAE,CACjE,CAAC;IACJ,CAAC;IAMD,KAAK,CAAC,iBAAiB,CACrB,UAAkB,EAClB,SAAyC,EACzC,SAAc,EACd,IAAS,EACT,eAAgD;QAEhD,OAAO,CAAC,GAAG,CACT,wDAAwD,SAAS,oBAAoB,UAAU,EAAE,EACjG,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAE,eAAe,EAAE,CAC7C,CAAC;QAEF,MAAM,SAAS,GAAG,MAAM,IA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I,CAAC,CAAC;QACpD,CAAC;QAED,OAAO,CAAC,GAAG,CACT,uEAAuE,UAAU,KAAK,SAAS,GAAG,CACnG,CAAC;IACJ,CAAC;
|
|
1
|
+
{"version":3,"file":"workflow-automation-engine.service.js","sourceRoot":"","sources":["../../../../src/module/workflow-automation/service/workflow-automation-engine.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,2CAAoD;AACpD,+EAA0E;AAC1E,4FAAuF;AAEvF,qCAAqC;AAG9B,IAAM,+BAA+B,GAArC,MAAM,+BAA+B;IAG1C,YAEE,SAAqD,EACpC,eAAuC,EACvC,UAAsB;QAFtB,cAAS,GAAT,SAAS,CAA2B;QACpC,oBAAe,GAAf,eAAe,CAAwB;QACvC,eAAU,GAAV,UAAU,CAAY;QANxB,YAAO,GAAG,IAAI,GAAG,EAAkB,CAAC;IAOlD,CAAC;IAEJ,cAAc,CAAC,UAAkB,EAAE,cAAsB;QACvD,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAC7C,OAAO,CAAC,GAAG,CACT,oDAAoD,UAAU,EAAE,CACjE,CAAC;IACJ,CAAC;IAMD,KAAK,CAAC,iBAAiB,CACrB,UAAkB,EAClB,SAAyC,EACzC,SAAc,EACd,IAAS,EACT,eAAgD;QAEhD,OAAO,CAAC,GAAG,CACT,wDAAwD,SAAS,oBAAoB,UAAU,EAAE,EACjG,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAE,eAAe,EAAE,CAC7C,CAAC;QAEF,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,cAAc,CACnD,UAAU,EACV,SAAS,EACT,IAAI,CACL,CAAC;QAEF,OAAO,CAAC,GAAG,CACT,uCAAuC,SAAS,CAAC,MAAM,oCAAoC,UAAU,eAAe,SAAS,EAAE,CAChI,CAAC;QAEF,KAAK,MAAM,EAAE,IAAI,SAAS,EAAE,CAAC;YAC3B,OAAO,CAAC,GAAG,CAC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H,CAAC;IACH,CAAC;CACF,CAAA;AA7MY,0EAA+B;0CAA/B,+BAA+B;IAD3C,IAAA,mBAAU,GAAE;IAKR,WAAA,IAAA,eAAM,EAAC,2BAA2B,CAAC,CAAA;qCACR,uDAAyB;QACnB,iDAAsB;QAC3B,oBAAU;GAP9B,+BAA+B,CA6M3C"}
|
|
@@ -4,13 +4,17 @@ import { WorkflowAutomationActionEntity } from '../entity/workflow-automation-ac
|
|
|
4
4
|
import { EntityServiceImpl } from 'src/module/meta/service/entity-service-impl.service';
|
|
5
5
|
import { UserData } from 'src/module/user/entity/user.entity';
|
|
6
6
|
import { SavedFilterService } from 'src/module/filter/service/saved-filter.service';
|
|
7
|
+
import { ScheduledWorkflow } from 'src/module/workflow-schedule/entities/scheduled-workflow.entity';
|
|
8
|
+
import { WorkflowScheduleService } from 'src/module/workflow-schedule/service/workflow-schedule.service';
|
|
7
9
|
export declare class WorkflowAutomationService extends EntityServiceImpl {
|
|
8
10
|
private readonly wfRepo;
|
|
9
11
|
private readonly actionRepo;
|
|
10
12
|
private readonly savedFilterService;
|
|
11
13
|
private readonly dataSource;
|
|
14
|
+
private readonly scheduledWorkflowRepository;
|
|
15
|
+
private readonly workflowScheduleService;
|
|
12
16
|
private readonly logger;
|
|
13
|
-
constructor(wfRepo: Repository<WorkflowAutomation>, actionRepo: Repository<WorkflowAutomationActionEntity>, savedFilterService: SavedFilterService, dataSource: DataSource);
|
|
17
|
+
constructor(wfRepo: Repository<WorkflowAutomation>, actionRepo: Repository<WorkflowAutomationActionEntity>, savedFilterService: SavedFilterService, dataSource: DataSource, scheduledWorkflowRepository: Repository<ScheduledWorkflow>, workflowScheduleService: WorkflowScheduleService);
|
|
14
18
|
createRule(data: Partial<WorkflowAutomation>): Promise<WorkflowAutomation>;
|
|
15
19
|
updateRule(id: number, data: Partial<WorkflowAutomation>): Promise<WorkflowAutomation | null>;
|
|
16
20
|
deleteRule(id: number): Promise<void>;
|
|
@@ -36,6 +40,8 @@ export declare class WorkflowAutomationService extends EntityServiceImpl {
|
|
|
36
40
|
trigger_type: string;
|
|
37
41
|
applicable_entity_type: string;
|
|
38
42
|
schedule: string;
|
|
43
|
+
cron_type: string;
|
|
44
|
+
sequence: number;
|
|
39
45
|
id: number;
|
|
40
46
|
entity_type: string;
|
|
41
47
|
name: string;
|
|
@@ -53,4 +59,10 @@ export declare class WorkflowAutomationService extends EntityServiceImpl {
|
|
|
53
59
|
level_id: string;
|
|
54
60
|
level_type: string;
|
|
55
61
|
}>;
|
|
62
|
+
registerScheduleAutomation(workflow: any, loggedInUser: UserData): Promise<ScheduledWorkflow | undefined>;
|
|
63
|
+
generateDailyCron(executionTime: string): Promise<string>;
|
|
64
|
+
updateSequence(body: any[], loggedInUser: any): Promise<{
|
|
65
|
+
updated: number;
|
|
66
|
+
results: any[];
|
|
67
|
+
}>;
|
|
56
68
|
}
|