rez_core 4.0.183 → 4.0.184
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/settings.local.json +26 -0
- package/.idea/250218_nodejs_core.iml +9 -0
- package/.idea/codeStyles/Project.xml +59 -0
- package/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/.idea/copilot.data.migration.agent.xml +6 -0
- package/.idea/copilot.data.migration.ask.xml +6 -0
- package/.idea/copilot.data.migration.ask2agent.xml +6 -0
- package/.idea/copilot.data.migration.edit.xml +6 -0
- package/.idea/inspectionProfiles/Project_Default.xml +6 -0
- package/.idea/misc.xml +6 -0
- package/.idea/modules.xml +8 -0
- package/.idea/prettier.xml +6 -0
- package/.idea/vcs.xml +6 -0
- package/.prettierrc +3 -3
- package/README.md +99 -99
- package/dist/app.module.js +0 -11
- package/dist/app.module.js.map +1 -1
- 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 +16 -12
- package/dist/config/database.config.js.map +1 -1
- package/dist/core.module.d.ts +1 -1
- package/dist/core.module.js +3 -6
- package/dist/core.module.js.map +1 -1
- package/dist/main.js +1 -1
- package/dist/main.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/filter/repository/saved-filter.repository.js +4 -4
- package/dist/module/filter/service/filter-evaluator.service.js +3 -3
- package/dist/module/filter/service/filter-evaluator.service.js.map +1 -1
- package/dist/module/filter/service/filter.service.d.ts +4 -1
- package/dist/module/filter/service/filter.service.js +69 -39
- package/dist/module/filter/service/filter.service.js.map +1 -1
- package/dist/module/integration/entity/integration-config.entity.js +6 -6
- package/dist/module/integration/entity/integration-config.entity.js.map +1 -1
- package/dist/module/integration/entity/integration-entity-mapper.entity.js +1 -1
- package/dist/module/integration/entity/integration-entity-mapper.entity.js.map +1 -1
- package/dist/module/integration/entity/integration-source.entity.js +4 -4
- package/dist/module/integration/entity/integration-source.entity.js.map +1 -1
- package/dist/module/integration/entity/user-integration.entity.js +4 -4
- package/dist/module/integration/entity/user-integration.entity.js.map +1 -1
- package/dist/module/integration/examples/usage.example.js +9 -9
- package/dist/module/integration/service/integration.service.js +1 -1
- package/dist/module/integration/service/wrapper.service.d.ts +1 -3
- package/dist/module/integration/service/wrapper.service.js +65 -67
- package/dist/module/integration/service/wrapper.service.js.map +1 -1
- package/dist/module/listmaster/entity/list-master-items.entity.js +3 -3
- package/dist/module/listmaster/entity/list-master-items.entity.js.map +1 -1
- package/dist/module/listmaster/entity/list-master.entity.js +4 -4
- package/dist/module/listmaster/entity/list-master.entity.js.map +1 -1
- package/dist/module/listmaster/service/list-master-item.service.js +3 -3
- package/dist/module/listmaster/service/list-master-item.service.js.map +1 -1
- package/dist/module/mapper/entity/field-mapper.entity.js +6 -6
- package/dist/module/mapper/entity/field-mapper.entity.js.map +1 -1
- package/dist/module/mapper/service/field-mapper.service.js +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 +1 -4
- package/dist/module/meta/controller/attribute-master.controller.js +2 -15
- 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 +0 -7
- 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-master.repository.js +2 -2
- package/dist/module/meta/repository/entity-master.repository.js.map +1 -1
- package/dist/module/meta/service/attribute-master.service.js +1 -1
- package/dist/module/meta/service/attribute-master.service.js.map +1 -1
- package/dist/module/meta/service/entity-dynamic.service.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/module/service/module-access.service.js +1 -1
- package/dist/module/module/service/module-access.service.js.map +1 -1
- package/dist/module/notification/entity/otp.entity.js +1 -1
- package/dist/module/notification/entity/otp.entity.js.map +1 -1
- package/dist/module/notification/service/notification.service.js +26 -22
- package/dist/module/notification/service/notification.service.js.map +1 -1
- package/dist/module/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 +0 -1
- package/dist/module/workflow/entity/action.entity.js +1 -5
- package/dist/module/workflow/entity/action.entity.js.map +1 -1
- package/dist/module/workflow/entity/comm-template.entity.js +1 -1
- package/dist/module/workflow/entity/comm-template.entity.js.map +1 -1
- package/dist/module/workflow/entity/template-attach-mapper.entity.js +1 -1
- package/dist/module/workflow/entity/template-attach-mapper.entity.js.map +1 -1
- package/dist/module/workflow/repository/action-data.repository.js +4 -5
- 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 +1 -3
- package/dist/module/workflow/repository/task.repository.js +5 -10
- 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 +54 -68
- 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 +51 -53
- 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 +0 -6
- package/dist/module/workflow-automation/controller/workflow-automation.controller.js +0 -16
- 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 +0 -2
- package/dist/module/workflow-automation/entity/workflow-automation.entity.js +0 -8
- package/dist/module/workflow-automation/entity/workflow-automation.entity.js.map +1 -1
- 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 +1 -13
- package/dist/module/workflow-automation/service/workflow-automation.service.js +6 -115
- package/dist/module/workflow-automation/service/workflow-automation.service.js.map +1 -1
- package/dist/module/workflow-automation/workflow-automation.module.js +1 -14
- package/dist/module/workflow-automation/workflow-automation.module.js.map +1 -1
- package/dist/table.config.js +1 -5
- package/dist/table.config.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/utils/service/loggingUtil.service.d.ts +2 -9
- package/dist/utils/service/loggingUtil.service.js +14 -65
- 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 +0 -2
- 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 +120 -124
- package/server.log +850 -0
- package/src/app.controller.ts +12 -12
- package/src/app.module.ts +52 -66
- package/src/app.service.ts +8 -8
- package/src/config/config.module.ts +17 -18
- package/src/config/database.config.ts +48 -23
- package/src/constant/global.constant.ts +67 -67
- package/src/core.module.ts +81 -88
- 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/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 +1053 -1005
- package/src/module/filter/service/saved-filter.service.ts +170 -170
- package/src/module/ics/controller/ics.controller.ts +21 -21
- package/src/module/ics/dto/ics.dto.ts +55 -55
- package/src/module/ics/ics.module.ts +13 -13
- package/src/module/ics/service/ics.service.ts +57 -57
- package/src/module/integration/controller/calender-event.controller.ts +31 -31
- package/src/module/integration/controller/integration.controller.ts +662 -662
- package/src/module/integration/controller/wrapper.controller.ts +37 -37
- package/src/module/integration/dto/create-config.dto.ts +526 -526
- package/src/module/integration/entity/integration-config.entity.ts +112 -112
- package/src/module/integration/entity/integration-entity-mapper.entity.ts +14 -14
- package/src/module/integration/entity/integration-source.entity.ts +17 -17
- package/src/module/integration/entity/user-integration.entity.ts +71 -71
- package/src/module/integration/examples/usage.example.ts +338 -338
- package/src/module/integration/factories/base.factory.ts +7 -7
- package/src/module/integration/factories/email.factory.ts +49 -49
- package/src/module/integration/factories/integration.factory.ts +121 -121
- package/src/module/integration/factories/sms.factory.ts +51 -51
- package/src/module/integration/factories/telephone.factory.ts +41 -41
- package/src/module/integration/factories/whatsapp.factory.ts +56 -56
- package/src/module/integration/integration.module.ts +110 -110
- package/src/module/integration/service/calendar-event.service.ts +118 -118
- package/src/module/integration/service/integration-entity-mapper.service.ts +17 -17
- package/src/module/integration/service/integration-queue.service.ts +229 -229
- package/src/module/integration/service/integration.service.ts +2633 -2633
- package/src/module/integration/service/oauth.service.ts +224 -224
- package/src/module/integration/service/wrapper.service.ts +494 -700
- package/src/module/integration/strategies/email/gmail-api.strategy.ts +280 -280
- package/src/module/integration/strategies/email/outlook-api.strategy.ts +44 -44
- package/src/module/integration/strategies/email/outlook.strategy.ts +64 -64
- package/src/module/integration/strategies/email/sendgrid-api.strategy.ts +260 -260
- package/src/module/integration/strategies/integration.strategy.ts +97 -97
- package/src/module/integration/strategies/sms/gupshup-sms.strategy.ts +146 -146
- package/src/module/integration/strategies/sms/msg91-sms.strategy.ts +164 -164
- package/src/module/integration/strategies/sms/tubelight-sms.strategy.ts +163 -163
- package/src/module/integration/strategies/telephone/ozonetel-voice.strategy.ts +238 -238
- package/src/module/integration/strategies/telephone/tubelight-voice.strategy.ts +210 -210
- package/src/module/integration/strategies/whatsapp/gupshup-whatsapp.strategy.ts +359 -359
- package/src/module/integration/strategies/whatsapp/tubelight-whatsapp.strategy.ts +372 -372
- package/src/module/integration/strategies/whatsapp/whatsapp-cloud.strategy.ts +403 -403
- package/src/module/integration/strategies/whatsapp/whatsapp.strategy.ts +57 -57
- package/src/module/layout/controller/layout.controller.ts +47 -47
- package/src/module/layout/entity/header-items.entity.ts +28 -28
- package/src/module/layout/entity/header-section.entity.ts +19 -19
- package/src/module/layout/layout.module.ts +21 -21
- package/src/module/layout/repository/header-items.repository.ts +18 -18
- package/src/module/layout/repository/header-section.repository.ts +22 -22
- package/src/module/layout/service/header-section.service.ts +25 -25
- package/src/module/layout_preference/controller/layout_preference.controller.ts +73 -73
- package/src/module/layout_preference/entity/layout_preference.entity.ts +28 -28
- package/src/module/layout_preference/layout_preference.module.ts +22 -22
- package/src/module/layout_preference/repository/layout_preference.repository.ts +65 -65
- package/src/module/layout_preference/service/layout_preference.service.ts +191 -191
- package/src/module/lead/controller/lead.controller.ts +30 -30
- package/src/module/lead/lead.module.ts +14 -14
- package/src/module/lead/repository/lead.repository.ts +41 -41
- package/src/module/lead/service/lead.service.ts +54 -54
- package/src/module/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 +266 -271
- package/src/module/mapper/service/mapper.service.ts +79 -79
- package/src/module/master/controller/master.controller.ts +74 -74
- package/src/module/master/service/master.service.ts +483 -483
- package/src/module/meta/controller/app-master.controller.ts +38 -38
- package/src/module/meta/controller/attribute-master.controller.ts +66 -74
- 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 +158 -166
- 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-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-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 +207 -209
- package/src/module/notification/controller/notification.controller.ts +58 -58
- package/src/module/notification/controller/otp.controller.ts +117 -117
- package/src/module/notification/entity/notification.entity.ts +26 -26
- package/src/module/notification/entity/otp.entity.ts +28 -28
- package/src/module/notification/firebase-admin.config.ts +22 -22
- package/src/module/notification/notification.module.ts +69 -69
- package/src/module/notification/repository/otp.repository.ts +27 -27
- package/src/module/notification/service/email.service.ts +127 -127
- package/src/module/notification/service/notification.service.ts +160 -163
- package/src/module/notification/service/otp.service.ts +132 -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 +50 -53
- package/src/module/workflow/entity/activity-log.entity.ts +43 -43
- package/src/module/workflow/entity/comm-template.entity.ts +43 -43
- package/src/module/workflow/entity/entity-modification.entity.ts +38 -38
- package/src/module/workflow/entity/form.entity.ts +25 -25
- package/src/module/workflow/entity/stage-action-mapping.entity.ts +17 -17
- package/src/module/workflow/entity/stage-group.entity.ts +23 -23
- package/src/module/workflow/entity/stage-movement-data.entity.ts +38 -38
- package/src/module/workflow/entity/stage.entity.ts +20 -20
- package/src/module/workflow/entity/task-data.entity.ts +88 -88
- package/src/module/workflow/entity/template-attach-mapper.entity.ts +30 -30
- package/src/module/workflow/entity/workflow-data.entity.ts +11 -11
- package/src/module/workflow/entity/workflow-level-mapping.entity.ts +18 -18
- package/src/module/workflow/entity/workflow.entity.ts +20 -20
- package/src/module/workflow/repository/action-category.repository.ts +79 -79
- package/src/module/workflow/repository/action-data.repository.ts +333 -334
- package/src/module/workflow/repository/action.repository.ts +323 -323
- package/src/module/workflow/repository/activity-log.repository.ts +148 -148
- package/src/module/workflow/repository/comm-template.repository.ts +149 -149
- package/src/module/workflow/repository/form-master.repository.ts +59 -59
- package/src/module/workflow/repository/stage-group.repository.ts +176 -176
- package/src/module/workflow/repository/stage-movement.repository.ts +244 -244
- package/src/module/workflow/repository/stage.repository.ts +172 -172
- package/src/module/workflow/repository/task.repository.ts +126 -134
- package/src/module/workflow/repository/workflow.repository.ts +42 -42
- package/src/module/workflow/service/action-category.service.ts +33 -33
- package/src/module/workflow/service/action-data.service.ts +62 -62
- package/src/module/workflow/service/action-resources-mapping.service.ts +10 -10
- package/src/module/workflow/service/action-template-mapping.service.ts +106 -106
- package/src/module/workflow/service/action.service.ts +279 -279
- package/src/module/workflow/service/activity-log.service.ts +107 -107
- package/src/module/workflow/service/comm-template.service.ts +180 -180
- package/src/module/workflow/service/entity-modification.service.ts +67 -67
- package/src/module/workflow/service/form-master.service.ts +35 -35
- package/src/module/workflow/service/populate-workflow.service.ts +303 -303
- package/src/module/workflow/service/stage-action-mapping.service.ts +5 -5
- package/src/module/workflow/service/stage-group.service.ts +319 -319
- package/src/module/workflow/service/stage.service.ts +199 -199
- package/src/module/workflow/service/task.service.ts +560 -569
- package/src/module/workflow/service/workflow-list-master.service.ts +60 -60
- package/src/module/workflow/service/workflow-meta.service.ts +640 -654
- package/src/module/workflow/service/workflow.service.ts +205 -205
- package/src/module/workflow/workflow.module.ts +176 -176
- package/src/module/workflow-automation/controller/workflow-automation.controller.ts +21 -43
- package/src/module/workflow-automation/entity/workflow-automation-action.entity.ts +26 -26
- package/src/module/workflow-automation/entity/workflow-automation.entity.ts +35 -40
- package/src/module/workflow-automation/interface/action.decorator.ts +7 -7
- package/src/module/workflow-automation/interface/action.interface.ts +5 -5
- package/src/module/workflow-automation/service/action-registery.service.ts +35 -35
- package/src/module/workflow-automation/service/workflow-automation-engine.service.ts +214 -214
- package/src/module/workflow-automation/service/workflow-automation.service.ts +347 -508
- package/src/module/workflow-automation/workflow-automation.module.ts +34 -47
- package/src/resources/dev.properties.yaml +31 -30
- package/src/resources/local.properties.yaml +27 -27
- package/src/resources/properties.module.ts +12 -12
- package/src/resources/properties.yaml.ts +11 -11
- package/src/resources/uat.properties.yaml +31 -31
- package/src/table.config.ts +126 -130
- package/src/utils/dto/excel-data.dto.ts +14 -14
- package/src/utils/dto/excelsheet-data.dto.ts +5 -5
- package/src/utils/service/base64util.service.ts +18 -18
- package/src/utils/service/clockIDGenUtil.service.ts +21 -21
- package/src/utils/service/codeGenerator.service.ts +22 -22
- package/src/utils/service/dateUtil.service.ts +17 -17
- package/src/utils/service/encryptUtil.service.ts +97 -97
- package/src/utils/service/excel-helper.service.ts +72 -72
- package/src/utils/service/excelUtil.service.ts +15 -15
- package/src/utils/service/file-util.service.ts +11 -11
- package/src/utils/service/json-util.service.ts +23 -23
- package/src/utils/service/loggingUtil.service.ts +34 -88
- package/src/utils/service/reflection-helper.service.ts +62 -62
- package/src/utils/service/wbsCodeGen.service.ts +8 -8
- package/src/utils/utils.module.ts +25 -27
- package/tsconfig.build.json +4 -4
- package/tsconfig.json +24 -24
- package/dist/config/bull.config.d.ts +0 -10
- package/dist/config/bull.config.js +0 -66
- package/dist/config/bull.config.js.map +0 -1
- package/dist/module/entity_json/controller/entity_json.controller.d.ts +0 -11
- package/dist/module/entity_json/controller/entity_json.controller.js +0 -56
- package/dist/module/entity_json/controller/entity_json.controller.js.map +0 -1
- package/dist/module/entity_json/entity_json.module.d.ts +0 -2
- package/dist/module/entity_json/entity_json.module.js +0 -26
- package/dist/module/entity_json/entity_json.module.js.map +0 -1
- package/dist/module/entity_json/service/entity_json.service.d.ts +0 -8
- package/dist/module/entity_json/service/entity_json.service.js +0 -100
- package/dist/module/entity_json/service/entity_json.service.js.map +0 -1
- package/dist/module/linked_attributes/controller/linked_attributes.controller.d.ts +0 -5
- package/dist/module/linked_attributes/controller/linked_attributes.controller.js +0 -29
- package/dist/module/linked_attributes/controller/linked_attributes.controller.js.map +0 -1
- package/dist/module/linked_attributes/entity/linked_attribute.entity.d.ts +0 -9
- package/dist/module/linked_attributes/entity/linked_attribute.entity.js +0 -70
- package/dist/module/linked_attributes/entity/linked_attribute.entity.js.map +0 -1
- package/dist/module/linked_attributes/linked_attributes.module.d.ts +0 -2
- package/dist/module/linked_attributes/linked_attributes.module.js +0 -29
- package/dist/module/linked_attributes/linked_attributes.module.js.map +0 -1
- package/dist/module/linked_attributes/repository/linked_attribute.repository.d.ts +0 -6
- package/dist/module/linked_attributes/repository/linked_attribute.repository.js +0 -31
- package/dist/module/linked_attributes/repository/linked_attribute.repository.js.map +0 -1
- package/dist/module/linked_attributes/service/linked_attributes.service.d.ts +0 -5
- package/dist/module/linked_attributes/service/linked_attributes.service.js +0 -34
- package/dist/module/linked_attributes/service/linked_attributes.service.js.map +0 -1
- package/dist/module/meta/repository/entity-attribute-update.repository.d.ts +0 -6
- package/dist/module/meta/repository/entity-attribute-update.repository.js +0 -44
- package/dist/module/meta/repository/entity-attribute-update.repository.js.map +0 -1
- package/dist/module/meta/service/entity-attribute-update.service.d.ts +0 -7
- package/dist/module/meta/service/entity-attribute-update.service.js +0 -36
- package/dist/module/meta/service/entity-attribute-update.service.js.map +0 -1
- package/dist/module/workflow-automation/service/schedule-handler.service.d.ts +0 -16
- package/dist/module/workflow-automation/service/schedule-handler.service.js +0 -109
- package/dist/module/workflow-automation/service/schedule-handler.service.js.map +0 -1
- package/dist/module/workflow-schedule/constants/schedule.constants.d.ts +0 -27
- package/dist/module/workflow-schedule/constants/schedule.constants.js +0 -31
- package/dist/module/workflow-schedule/constants/schedule.constants.js.map +0 -1
- package/dist/module/workflow-schedule/controller/workflow-schedule.controller.d.ts +0 -83
- package/dist/module/workflow-schedule/controller/workflow-schedule.controller.js +0 -220
- package/dist/module/workflow-schedule/controller/workflow-schedule.controller.js.map +0 -1
- package/dist/module/workflow-schedule/dto/create-schedule.dto.d.ts +0 -32
- package/dist/module/workflow-schedule/dto/create-schedule.dto.js +0 -163
- package/dist/module/workflow-schedule/dto/create-schedule.dto.js.map +0 -1
- package/dist/module/workflow-schedule/dto/get-execution-logs.dto.d.ts +0 -35
- package/dist/module/workflow-schedule/dto/get-execution-logs.dto.js +0 -124
- package/dist/module/workflow-schedule/dto/get-execution-logs.dto.js.map +0 -1
- package/dist/module/workflow-schedule/dto/update-schedule.dto.d.ts +0 -19
- package/dist/module/workflow-schedule/dto/update-schedule.dto.js +0 -106
- package/dist/module/workflow-schedule/dto/update-schedule.dto.js.map +0 -1
- package/dist/module/workflow-schedule/entities/scheduled-workflow.entity.d.ts +0 -30
- package/dist/module/workflow-schedule/entities/scheduled-workflow.entity.js +0 -113
- package/dist/module/workflow-schedule/entities/scheduled-workflow.entity.js.map +0 -1
- package/dist/module/workflow-schedule/entities/workflow-execution-log.entity.d.ts +0 -34
- package/dist/module/workflow-schedule/entities/workflow-execution-log.entity.js +0 -118
- package/dist/module/workflow-schedule/entities/workflow-execution-log.entity.js.map +0 -1
- package/dist/module/workflow-schedule/interfaces/schedule-job-data.interface.d.ts +0 -44
- package/dist/module/workflow-schedule/interfaces/schedule-job-data.interface.js +0 -3
- package/dist/module/workflow-schedule/interfaces/schedule-job-data.interface.js.map +0 -1
- package/dist/module/workflow-schedule/interfaces/workflow-schedule-options.interface.d.ts +0 -3
- package/dist/module/workflow-schedule/interfaces/workflow-schedule-options.interface.js +0 -3
- package/dist/module/workflow-schedule/interfaces/workflow-schedule-options.interface.js.map +0 -1
- package/dist/module/workflow-schedule/processors/schedule.processor.d.ts +0 -31
- package/dist/module/workflow-schedule/processors/schedule.processor.js +0 -409
- package/dist/module/workflow-schedule/processors/schedule.processor.js.map +0 -1
- package/dist/module/workflow-schedule/service/workflow-schedule.service.d.ts +0 -44
- package/dist/module/workflow-schedule/service/workflow-schedule.service.js +0 -434
- package/dist/module/workflow-schedule/service/workflow-schedule.service.js.map +0 -1
- package/dist/module/workflow-schedule/workflow-schedule.module.d.ts +0 -5
- package/dist/module/workflow-schedule/workflow-schedule.module.js +0 -52
- package/dist/module/workflow-schedule/workflow-schedule.module.js.map +0 -1
- package/src/config/bull.config.ts +0 -69
- package/src/module/entity_json/controller/entity_json.controller.ts +0 -45
- package/src/module/entity_json/entity_json.module.ts +0 -13
- package/src/module/entity_json/service/entity_json.service.ts +0 -134
- package/src/module/linked_attributes/controller/linked_attributes.controller.ts +0 -10
- package/src/module/linked_attributes/entity/linked_attribute.entity.ts +0 -48
- package/src/module/linked_attributes/linked_attributes.module.ts +0 -16
- package/src/module/linked_attributes/repository/linked_attribute.repository.ts +0 -12
- package/src/module/linked_attributes/service/linked_attributes.service.ts +0 -22
- package/src/module/meta/repository/entity-attribute-update.repository.ts +0 -44
- package/src/module/meta/service/entity-attribute-update.service.ts +0 -29
- package/src/module/workflow-automation/SCHEDULING_GUIDE.md +0 -145
- package/src/module/workflow-automation/service/schedule-handler.service.ts +0 -150
- package/src/module/workflow-schedule/INSTALLATION.md +0 -244
- package/src/module/workflow-schedule/MULTI_PROJECT_GUIDE.md +0 -196
- package/src/module/workflow-schedule/README.md +0 -422
- package/src/module/workflow-schedule/constants/schedule.constants.ts +0 -48
- package/src/module/workflow-schedule/controller/workflow-schedule.controller.ts +0 -255
- package/src/module/workflow-schedule/docs/CLAUDE_CODE_GUIDE.md +0 -510
- package/src/module/workflow-schedule/docs/CLAUDE_CODE_PROMPT.md +0 -362
- package/src/module/workflow-schedule/docs/RUN_CLAUDE_CODE.sh +0 -68
- package/src/module/workflow-schedule/dto/create-schedule.dto.ts +0 -147
- package/src/module/workflow-schedule/dto/get-execution-logs.dto.ts +0 -119
- package/src/module/workflow-schedule/dto/update-schedule.dto.ts +0 -96
- package/src/module/workflow-schedule/entities/scheduled-workflow.entity.ts +0 -148
- package/src/module/workflow-schedule/entities/workflow-execution-log.entity.ts +0 -154
- package/src/module/workflow-schedule/interfaces/schedule-job-data.interface.ts +0 -53
- package/src/module/workflow-schedule/interfaces/workflow-schedule-options.interface.ts +0 -12
- package/src/module/workflow-schedule/processors/schedule.processor.ts +0 -584
- package/src/module/workflow-schedule/service/workflow-schedule.service.ts +0 -600
- package/src/module/workflow-schedule/workflow-schedule.module.ts +0 -67
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { Job } from 'bull';
|
|
2
|
-
import { Repository, DataSource } from 'typeorm';
|
|
3
|
-
import { ScheduledWorkflow } from '../entities/scheduled-workflow.entity';
|
|
4
|
-
import { WorkflowExecutionLog } from '../entities/workflow-execution-log.entity';
|
|
5
|
-
import { ScheduleJobData, BatchProcessingResult } from '../interfaces/schedule-job-data.interface';
|
|
6
|
-
import { ScheduleHandlerService } from 'src/module/workflow-automation/service/schedule-handler.service';
|
|
7
|
-
export declare class ScheduleProcessor {
|
|
8
|
-
private readonly scheduledWorkflowRepository;
|
|
9
|
-
private readonly executionLogRepository;
|
|
10
|
-
private readonly dataSource;
|
|
11
|
-
private readonly scheduleHandlerService;
|
|
12
|
-
private readonly logger;
|
|
13
|
-
constructor(scheduledWorkflowRepository: Repository<ScheduledWorkflow>, executionLogRepository: Repository<WorkflowExecutionLog>, dataSource: DataSource, scheduleHandlerService: ScheduleHandlerService);
|
|
14
|
-
handleScheduledWorkflowExecution(job: Job<ScheduleJobData>): Promise<{
|
|
15
|
-
success: boolean;
|
|
16
|
-
executionLogId: number;
|
|
17
|
-
result: BatchProcessingResult;
|
|
18
|
-
}>;
|
|
19
|
-
private executeWorkflowActions;
|
|
20
|
-
private executeAction;
|
|
21
|
-
private executeSendEmailAction;
|
|
22
|
-
private executeUpdateRecordsAction;
|
|
23
|
-
private executeCreateTaskAction;
|
|
24
|
-
private executeSendNotificationAction;
|
|
25
|
-
private getTargetRecords;
|
|
26
|
-
private getTableNameForEntityType;
|
|
27
|
-
private chunkArray;
|
|
28
|
-
onActive(job: Job<ScheduleJobData>): void;
|
|
29
|
-
onCompleted(job: Job<ScheduleJobData>, result: any): void;
|
|
30
|
-
onFailed(job: Job<ScheduleJobData>, error: Error): void;
|
|
31
|
-
}
|
|
@@ -1,409 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
|
-
var ScheduleProcessor_1;
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.ScheduleProcessor = void 0;
|
|
17
|
-
const bull_1 = require("@nestjs/bull");
|
|
18
|
-
const common_1 = require("@nestjs/common");
|
|
19
|
-
const typeorm_1 = require("@nestjs/typeorm");
|
|
20
|
-
const typeorm_2 = require("typeorm");
|
|
21
|
-
const scheduled_workflow_entity_1 = require("../entities/scheduled-workflow.entity");
|
|
22
|
-
const workflow_execution_log_entity_1 = require("../entities/workflow-execution-log.entity");
|
|
23
|
-
const schedule_constants_1 = require("../constants/schedule.constants");
|
|
24
|
-
const schedule_handler_service_1 = require("../../workflow-automation/service/schedule-handler.service");
|
|
25
|
-
let ScheduleProcessor = ScheduleProcessor_1 = class ScheduleProcessor {
|
|
26
|
-
constructor(scheduledWorkflowRepository, executionLogRepository, dataSource, scheduleHandlerService) {
|
|
27
|
-
this.scheduledWorkflowRepository = scheduledWorkflowRepository;
|
|
28
|
-
this.executionLogRepository = executionLogRepository;
|
|
29
|
-
this.dataSource = dataSource;
|
|
30
|
-
this.scheduleHandlerService = scheduleHandlerService;
|
|
31
|
-
this.logger = new common_1.Logger(ScheduleProcessor_1.name);
|
|
32
|
-
}
|
|
33
|
-
async handleScheduledWorkflowExecution(job) {
|
|
34
|
-
const { scheduleId, workflowId, organizationId, triggeredBy, createdBy } = job.data;
|
|
35
|
-
this.logger.log(`🚀 [handleScheduledWorkflowExecution] Invoked for scheduleId=${scheduleId}, workflowId=${workflowId}`);
|
|
36
|
-
const executionLog = this.executionLogRepository.create({
|
|
37
|
-
schedule_id: scheduleId,
|
|
38
|
-
workflow_id: workflowId,
|
|
39
|
-
job_id: job.id.toString(),
|
|
40
|
-
execution_status: schedule_constants_1.EXECUTION_STATUS_PENDING,
|
|
41
|
-
triggered_by: triggeredBy,
|
|
42
|
-
triggered_by_user_id: triggeredBy === 'MANUAL' ? createdBy : null,
|
|
43
|
-
organization_id: organizationId,
|
|
44
|
-
enterprise_id: job.data.enterpriseId,
|
|
45
|
-
created_by: createdBy,
|
|
46
|
-
entity_type: 'WFEL',
|
|
47
|
-
});
|
|
48
|
-
this.logger.debug(`🧾 Creating execution log for jobId=${job.id}`);
|
|
49
|
-
await this.executionLogRepository.save(executionLog);
|
|
50
|
-
try {
|
|
51
|
-
executionLog.execution_status = schedule_constants_1.EXECUTION_STATUS_RUNNING;
|
|
52
|
-
executionLog.started_at = new Date();
|
|
53
|
-
await this.executionLogRepository.save(executionLog);
|
|
54
|
-
this.logger.log(`🏃 Workflow execution started for scheduleId=${scheduleId}`);
|
|
55
|
-
const schedule = await this.scheduledWorkflowRepository.findOne({
|
|
56
|
-
where: { id: scheduleId },
|
|
57
|
-
});
|
|
58
|
-
if (!schedule) {
|
|
59
|
-
throw new Error(`Scheduled workflow not found: ${scheduleId}`);
|
|
60
|
-
}
|
|
61
|
-
this.logger.debug(`📋 Loaded schedule from DB: ${JSON.stringify(schedule)}`);
|
|
62
|
-
this.logger.log(`⚙️ Executing workflow actions...`);
|
|
63
|
-
const result = await this.executeWorkflowActions(schedule, job.data);
|
|
64
|
-
this.logger.debug(`🧮 Execution result: ${JSON.stringify(result)}`);
|
|
65
|
-
const completedAt = new Date();
|
|
66
|
-
executionLog.execution_status =
|
|
67
|
-
result.failedRecords > 0 && result.successfulRecords > 0
|
|
68
|
-
? schedule_constants_1.EXECUTION_STATUS_PARTIAL
|
|
69
|
-
: result.failedRecords > 0
|
|
70
|
-
? schedule_constants_1.EXECUTION_STATUS_FAILED
|
|
71
|
-
: schedule_constants_1.EXECUTION_STATUS_COMPLETED;
|
|
72
|
-
executionLog.completed_at = completedAt;
|
|
73
|
-
executionLog.duration_ms = completedAt.getTime() - executionLog.started_at.getTime();
|
|
74
|
-
executionLog.total_records = result.totalRecords;
|
|
75
|
-
executionLog.successful_records = result.successfulRecords;
|
|
76
|
-
executionLog.failed_records = result.failedRecords;
|
|
77
|
-
executionLog.execution_details = {
|
|
78
|
-
batchesProcessed: Math.ceil(result.totalRecords / schedule_constants_1.DEFAULT_BATCH_SIZE),
|
|
79
|
-
errors: result.errors,
|
|
80
|
-
};
|
|
81
|
-
await this.executionLogRepository.save(executionLog);
|
|
82
|
-
schedule.execution_count += 1;
|
|
83
|
-
schedule.last_execution_at = completedAt;
|
|
84
|
-
await this.scheduledWorkflowRepository.save(schedule);
|
|
85
|
-
this.logger.log(`✅ Workflow execution completed: scheduleId=${scheduleId}, status=${executionLog.execution_status}, processed=${result.totalRecords}`);
|
|
86
|
-
return {
|
|
87
|
-
success: true,
|
|
88
|
-
executionLogId: executionLog.id,
|
|
89
|
-
result,
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
catch (error) {
|
|
93
|
-
this.logger.error(`🔥 Workflow execution failed: scheduleId=${scheduleId}, error=${error.message}`, error.stack);
|
|
94
|
-
executionLog.execution_status = schedule_constants_1.EXECUTION_STATUS_FAILED;
|
|
95
|
-
executionLog.completed_at = new Date();
|
|
96
|
-
executionLog.duration_ms = executionLog.started_at
|
|
97
|
-
? executionLog.completed_at.getTime() - executionLog.started_at.getTime()
|
|
98
|
-
: 0;
|
|
99
|
-
executionLog.error_message = error.message;
|
|
100
|
-
executionLog.error_stack = error.stack;
|
|
101
|
-
await this.executionLogRepository.save(executionLog);
|
|
102
|
-
throw error;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
async executeWorkflowActions(schedule, jobData) {
|
|
106
|
-
const result = {
|
|
107
|
-
totalRecords: 0,
|
|
108
|
-
processedRecords: 0,
|
|
109
|
-
successfulRecords: 0,
|
|
110
|
-
failedRecords: 0,
|
|
111
|
-
errors: [],
|
|
112
|
-
};
|
|
113
|
-
const resultData = await this.scheduleHandlerService.handleScheduledWorkflow(jobData.workflowId, jobData);
|
|
114
|
-
if (!schedule.actions || schedule.actions.length === 0) {
|
|
115
|
-
this.logger.warn(`No actions defined for schedule: ${schedule.id}`);
|
|
116
|
-
return result;
|
|
117
|
-
}
|
|
118
|
-
for (const action of schedule.actions) {
|
|
119
|
-
try {
|
|
120
|
-
const actionResult = await this.executeAction(action, jobData);
|
|
121
|
-
result.totalRecords += actionResult.totalRecords;
|
|
122
|
-
result.processedRecords += actionResult.processedRecords;
|
|
123
|
-
result.successfulRecords += actionResult.successfulRecords;
|
|
124
|
-
result.failedRecords += actionResult.failedRecords;
|
|
125
|
-
result.errors.push(...actionResult.errors);
|
|
126
|
-
}
|
|
127
|
-
catch (error) {
|
|
128
|
-
this.logger.error(`Action execution failed: actionType=${action.actionType}, error=${error.message}`);
|
|
129
|
-
result.failedRecords += 1;
|
|
130
|
-
result.errors.push({
|
|
131
|
-
error: `Action ${action.actionType} failed: ${error.message}`,
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
return resultData;
|
|
136
|
-
}
|
|
137
|
-
async executeAction(action, jobData) {
|
|
138
|
-
this.logger.log(`🚀 Executing scheduled action: ${action.actionType}`);
|
|
139
|
-
try {
|
|
140
|
-
const { workflowId, loggedInUser } = jobData;
|
|
141
|
-
const result = await this.scheduleHandlerService.handleScheduledWorkflow(workflowId, loggedInUser);
|
|
142
|
-
this.logger.log(`✅ Scheduled workflow ${workflowId} executed successfully`);
|
|
143
|
-
return {
|
|
144
|
-
totalRecords: result?.length || 0,
|
|
145
|
-
processedRecords: result?.length || 0,
|
|
146
|
-
successfulRecords: result?.length || 0,
|
|
147
|
-
failedRecords: 0,
|
|
148
|
-
errors: [],
|
|
149
|
-
};
|
|
150
|
-
}
|
|
151
|
-
catch (error) {
|
|
152
|
-
this.logger.error(`🔥 Error executing scheduled workflow action: ${error.message}`, error.stack);
|
|
153
|
-
return {
|
|
154
|
-
totalRecords: 0,
|
|
155
|
-
processedRecords: 0,
|
|
156
|
-
successfulRecords: 0,
|
|
157
|
-
failedRecords: 1,
|
|
158
|
-
errors: [{ error: error.message }],
|
|
159
|
-
};
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
async executeSendEmailAction(action, jobData) {
|
|
163
|
-
const result = {
|
|
164
|
-
totalRecords: 0,
|
|
165
|
-
processedRecords: 0,
|
|
166
|
-
successfulRecords: 0,
|
|
167
|
-
failedRecords: 0,
|
|
168
|
-
errors: [],
|
|
169
|
-
};
|
|
170
|
-
try {
|
|
171
|
-
const records = await this.getTargetRecords(action.targetEntityType, action.filterCriteria, jobData);
|
|
172
|
-
result.totalRecords = records.length;
|
|
173
|
-
const batches = this.chunkArray(records, schedule_constants_1.DEFAULT_BATCH_SIZE);
|
|
174
|
-
for (const batch of batches) {
|
|
175
|
-
for (const record of batch) {
|
|
176
|
-
try {
|
|
177
|
-
result.processedRecords += 1;
|
|
178
|
-
result.successfulRecords += 1;
|
|
179
|
-
}
|
|
180
|
-
catch (error) {
|
|
181
|
-
result.processedRecords += 1;
|
|
182
|
-
result.failedRecords += 1;
|
|
183
|
-
result.errors.push({
|
|
184
|
-
recordId: record.id,
|
|
185
|
-
error: error.message,
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
catch (error) {
|
|
192
|
-
throw new Error(`Send email action failed: ${error.message}`);
|
|
193
|
-
}
|
|
194
|
-
return result;
|
|
195
|
-
}
|
|
196
|
-
async executeUpdateRecordsAction(action, jobData) {
|
|
197
|
-
const result = {
|
|
198
|
-
totalRecords: 0,
|
|
199
|
-
processedRecords: 0,
|
|
200
|
-
successfulRecords: 0,
|
|
201
|
-
failedRecords: 0,
|
|
202
|
-
errors: [],
|
|
203
|
-
};
|
|
204
|
-
try {
|
|
205
|
-
const records = await this.getTargetRecords(action.targetEntityType, action.filterCriteria, jobData);
|
|
206
|
-
result.totalRecords = records.length;
|
|
207
|
-
const batches = this.chunkArray(records, schedule_constants_1.DEFAULT_BATCH_SIZE);
|
|
208
|
-
for (const batch of batches) {
|
|
209
|
-
const queryRunner = this.dataSource.createQueryRunner();
|
|
210
|
-
await queryRunner.connect();
|
|
211
|
-
await queryRunner.startTransaction();
|
|
212
|
-
try {
|
|
213
|
-
for (const record of batch) {
|
|
214
|
-
const updateFields = action.actionConfig.updateFields || {};
|
|
215
|
-
const updateValues = Object.keys(updateFields).map((key) => {
|
|
216
|
-
return `${key} = ?`;
|
|
217
|
-
});
|
|
218
|
-
const values = Object.values(updateFields);
|
|
219
|
-
if (updateValues.length > 0) {
|
|
220
|
-
const tableName = this.getTableNameForEntityType(action.targetEntityType);
|
|
221
|
-
await queryRunner.query(`UPDATE ${tableName} SET ${updateValues.join(', ')} WHERE id = ?`, [...values, record.id]);
|
|
222
|
-
}
|
|
223
|
-
result.processedRecords += 1;
|
|
224
|
-
result.successfulRecords += 1;
|
|
225
|
-
}
|
|
226
|
-
await queryRunner.commitTransaction();
|
|
227
|
-
}
|
|
228
|
-
catch (error) {
|
|
229
|
-
await queryRunner.rollbackTransaction();
|
|
230
|
-
result.failedRecords += batch.length;
|
|
231
|
-
result.errors.push({
|
|
232
|
-
error: `Batch update failed: ${error.message}`,
|
|
233
|
-
});
|
|
234
|
-
}
|
|
235
|
-
finally {
|
|
236
|
-
await queryRunner.release();
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
catch (error) {
|
|
241
|
-
throw new Error(`Update records action failed: ${error.message}`);
|
|
242
|
-
}
|
|
243
|
-
return result;
|
|
244
|
-
}
|
|
245
|
-
async executeCreateTaskAction(action, jobData) {
|
|
246
|
-
const result = {
|
|
247
|
-
totalRecords: 0,
|
|
248
|
-
processedRecords: 0,
|
|
249
|
-
successfulRecords: 0,
|
|
250
|
-
failedRecords: 0,
|
|
251
|
-
errors: [],
|
|
252
|
-
};
|
|
253
|
-
try {
|
|
254
|
-
const records = await this.getTargetRecords(action.targetEntityType, action.filterCriteria, jobData);
|
|
255
|
-
result.totalRecords = records.length;
|
|
256
|
-
const batches = this.chunkArray(records, schedule_constants_1.DEFAULT_BATCH_SIZE);
|
|
257
|
-
for (const batch of batches) {
|
|
258
|
-
for (const record of batch) {
|
|
259
|
-
try {
|
|
260
|
-
await this.dataSource.query(`INSERT INTO cr_wf_task (name, description, status, mapped_entity_id, mapped_entity_type,
|
|
261
|
-
organization_id, enterprise_id, created_by, created_date, entity_type)
|
|
262
|
-
VALUES (?, ?, ?, ?, ?, ?, ?, ?, NOW(), 'WFTK')`, [
|
|
263
|
-
action.actionConfig.taskName || 'Scheduled Task',
|
|
264
|
-
action.actionConfig.taskDescription || '',
|
|
265
|
-
'PENDING',
|
|
266
|
-
record.id,
|
|
267
|
-
action.targetEntityType,
|
|
268
|
-
jobData.organizationId,
|
|
269
|
-
jobData.enterpriseId,
|
|
270
|
-
jobData.createdBy,
|
|
271
|
-
]);
|
|
272
|
-
result.processedRecords += 1;
|
|
273
|
-
result.successfulRecords += 1;
|
|
274
|
-
}
|
|
275
|
-
catch (error) {
|
|
276
|
-
result.processedRecords += 1;
|
|
277
|
-
result.failedRecords += 1;
|
|
278
|
-
result.errors.push({
|
|
279
|
-
recordId: record.id,
|
|
280
|
-
error: error.message,
|
|
281
|
-
});
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
catch (error) {
|
|
287
|
-
throw new Error(`Create task action failed: ${error.message}`);
|
|
288
|
-
}
|
|
289
|
-
return result;
|
|
290
|
-
}
|
|
291
|
-
async executeSendNotificationAction(action, jobData) {
|
|
292
|
-
const result = {
|
|
293
|
-
totalRecords: 0,
|
|
294
|
-
processedRecords: 0,
|
|
295
|
-
successfulRecords: 0,
|
|
296
|
-
failedRecords: 0,
|
|
297
|
-
errors: [],
|
|
298
|
-
};
|
|
299
|
-
try {
|
|
300
|
-
const records = await this.getTargetRecords(action.targetEntityType, action.filterCriteria, jobData);
|
|
301
|
-
result.totalRecords = records.length;
|
|
302
|
-
const batches = this.chunkArray(records, schedule_constants_1.DEFAULT_BATCH_SIZE);
|
|
303
|
-
for (const batch of batches) {
|
|
304
|
-
for (const record of batch) {
|
|
305
|
-
try {
|
|
306
|
-
await this.dataSource.query(`INSERT INTO cr_notification (user_id, event_type, message, mapped_entity_id,
|
|
307
|
-
mapped_entity_type, is_read, organization_id, created_date, entity_type, status)
|
|
308
|
-
VALUES (?, ?, ?, ?, ?, 0, ?, NOW(), 'NOTF', 'ACTIVE')`, [
|
|
309
|
-
record.user_id || jobData.createdBy,
|
|
310
|
-
action.actionConfig.eventType || 'WORKFLOW_SCHEDULED',
|
|
311
|
-
action.actionConfig.message || 'Scheduled workflow executed',
|
|
312
|
-
record.id,
|
|
313
|
-
action.targetEntityType,
|
|
314
|
-
jobData.organizationId,
|
|
315
|
-
]);
|
|
316
|
-
result.processedRecords += 1;
|
|
317
|
-
result.successfulRecords += 1;
|
|
318
|
-
}
|
|
319
|
-
catch (error) {
|
|
320
|
-
result.processedRecords += 1;
|
|
321
|
-
result.failedRecords += 1;
|
|
322
|
-
result.errors.push({
|
|
323
|
-
recordId: record.id,
|
|
324
|
-
error: error.message,
|
|
325
|
-
});
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
catch (error) {
|
|
331
|
-
throw new Error(`Send notification action failed: ${error.message}`);
|
|
332
|
-
}
|
|
333
|
-
return result;
|
|
334
|
-
}
|
|
335
|
-
async getTargetRecords(entityType, filterCriteria, jobData) {
|
|
336
|
-
const tableName = this.getTableNameForEntityType(entityType);
|
|
337
|
-
let whereClause = `organization_id = ${jobData.organizationId}`;
|
|
338
|
-
const params = [];
|
|
339
|
-
if (filterCriteria && Object.keys(filterCriteria).length > 0) {
|
|
340
|
-
Object.keys(filterCriteria).forEach((key) => {
|
|
341
|
-
whereClause += ` AND ${key} = ?`;
|
|
342
|
-
params.push(filterCriteria[key]);
|
|
343
|
-
});
|
|
344
|
-
}
|
|
345
|
-
const query = `SELECT * FROM ${tableName} WHERE ${whereClause}`;
|
|
346
|
-
const records = await this.dataSource.query(query, params);
|
|
347
|
-
return records;
|
|
348
|
-
}
|
|
349
|
-
getTableNameForEntityType(entityType) {
|
|
350
|
-
const entityTypeMap = {
|
|
351
|
-
USR: 'sso_user',
|
|
352
|
-
LEAD: 'cr_lead',
|
|
353
|
-
TASK: 'cr_wf_task',
|
|
354
|
-
};
|
|
355
|
-
return entityTypeMap[entityType] || 'unknown_table';
|
|
356
|
-
}
|
|
357
|
-
chunkArray(array, chunkSize) {
|
|
358
|
-
const chunks = [];
|
|
359
|
-
for (let i = 0; i < array.length; i += chunkSize) {
|
|
360
|
-
chunks.push(array.slice(i, i + chunkSize));
|
|
361
|
-
}
|
|
362
|
-
return chunks;
|
|
363
|
-
}
|
|
364
|
-
onActive(job) {
|
|
365
|
-
this.logger.log(`Processing job ${job.id} of type ${job.name} for schedule ${job.data.scheduleId}`);
|
|
366
|
-
}
|
|
367
|
-
onCompleted(job, result) {
|
|
368
|
-
this.logger.log(`Job ${job.id} completed for schedule ${job.data.scheduleId} with result: ${JSON.stringify(result)}`);
|
|
369
|
-
}
|
|
370
|
-
onFailed(job, error) {
|
|
371
|
-
this.logger.error(`Job ${job.id} failed for schedule ${job.data.scheduleId} with error: ${error.message}`, error.stack);
|
|
372
|
-
}
|
|
373
|
-
};
|
|
374
|
-
exports.ScheduleProcessor = ScheduleProcessor;
|
|
375
|
-
__decorate([
|
|
376
|
-
(0, bull_1.Process)(schedule_constants_1.EXECUTE_SCHEDULED_WORKFLOW_JOB),
|
|
377
|
-
__metadata("design:type", Function),
|
|
378
|
-
__metadata("design:paramtypes", [Object]),
|
|
379
|
-
__metadata("design:returntype", Promise)
|
|
380
|
-
], ScheduleProcessor.prototype, "handleScheduledWorkflowExecution", null);
|
|
381
|
-
__decorate([
|
|
382
|
-
(0, bull_1.OnQueueActive)(),
|
|
383
|
-
__metadata("design:type", Function),
|
|
384
|
-
__metadata("design:paramtypes", [Object]),
|
|
385
|
-
__metadata("design:returntype", void 0)
|
|
386
|
-
], ScheduleProcessor.prototype, "onActive", null);
|
|
387
|
-
__decorate([
|
|
388
|
-
(0, bull_1.OnQueueCompleted)(),
|
|
389
|
-
__metadata("design:type", Function),
|
|
390
|
-
__metadata("design:paramtypes", [Object, Object]),
|
|
391
|
-
__metadata("design:returntype", void 0)
|
|
392
|
-
], ScheduleProcessor.prototype, "onCompleted", null);
|
|
393
|
-
__decorate([
|
|
394
|
-
(0, bull_1.OnQueueFailed)(),
|
|
395
|
-
__metadata("design:type", Function),
|
|
396
|
-
__metadata("design:paramtypes", [Object, Error]),
|
|
397
|
-
__metadata("design:returntype", void 0)
|
|
398
|
-
], ScheduleProcessor.prototype, "onFailed", null);
|
|
399
|
-
exports.ScheduleProcessor = ScheduleProcessor = ScheduleProcessor_1 = __decorate([
|
|
400
|
-
(0, bull_1.Processor)(schedule_constants_1.WORKFLOW_SCHEDULE_QUEUE),
|
|
401
|
-
__param(0, (0, typeorm_1.InjectRepository)(scheduled_workflow_entity_1.ScheduledWorkflow)),
|
|
402
|
-
__param(1, (0, typeorm_1.InjectRepository)(workflow_execution_log_entity_1.WorkflowExecutionLog)),
|
|
403
|
-
__param(3, (0, common_1.Inject)('ScheduleHandlerService')),
|
|
404
|
-
__metadata("design:paramtypes", [typeorm_2.Repository,
|
|
405
|
-
typeorm_2.Repository,
|
|
406
|
-
typeorm_2.DataSource,
|
|
407
|
-
schedule_handler_service_1.ScheduleHandlerService])
|
|
408
|
-
], ScheduleProcessor);
|
|
409
|
-
//# sourceMappingURL=schedule.processor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schedule.processor.js","sourceRoot":"","sources":["../../../../src/module/workflow-schedule/processors/schedule.processor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uCAAkG;AAClG,2CAA4D;AAE5D,6CAAmD;AACnD,qCAAiD;AACjD,qFAA0E;AAC1E,6FAAiF;AACjF,wEAayC;AAEzC,yGAAyG;AAOlG,IAAM,iBAAiB,yBAAvB,MAAM,iBAAiB;IAG5B,YAEE,2BAA2E,EAE3E,sBAAyE,EACxD,UAAsB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,oDAAoB,CAAC,CAAA;IAG1C,WAAA,IAAA,eAAM,EAAC,wBAAwB,CAAC,CAAA;qCAJiB,oBAAU;QAEf,oBAAU;QACtB,oBAAU;QAEA,iDAAsB;GAVpD,iBAAiB,CA0iB7B"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { Repository, DataSource } from 'typeorm';
|
|
2
|
-
import { Queue } from 'bull';
|
|
3
|
-
import { ScheduledWorkflow } from '../entities/scheduled-workflow.entity';
|
|
4
|
-
import { WorkflowExecutionLog } from '../entities/workflow-execution-log.entity';
|
|
5
|
-
import { CreateScheduleDto } from '../dto/create-schedule.dto';
|
|
6
|
-
import { UpdateScheduleDto } from '../dto/update-schedule.dto';
|
|
7
|
-
import { GetExecutionLogsDto } from '../dto/get-execution-logs.dto';
|
|
8
|
-
import { UserData } from '../../user/entity/user.entity';
|
|
9
|
-
import { ScheduleJobData } from '../interfaces/schedule-job-data.interface';
|
|
10
|
-
export declare class WorkflowScheduleService {
|
|
11
|
-
private readonly scheduledWorkflowRepository;
|
|
12
|
-
private readonly executionLogRepository;
|
|
13
|
-
private readonly scheduleQueue;
|
|
14
|
-
private readonly dataSource;
|
|
15
|
-
private readonly logger;
|
|
16
|
-
constructor(scheduledWorkflowRepository: Repository<ScheduledWorkflow>, executionLogRepository: Repository<WorkflowExecutionLog>, scheduleQueue: Queue<ScheduleJobData>, dataSource: DataSource);
|
|
17
|
-
createSchedule(createScheduleDto: CreateScheduleDto, loggedInUser: UserData): Promise<ScheduledWorkflow>;
|
|
18
|
-
updateSchedule(updateScheduleDto: UpdateScheduleDto, loggedInUser: UserData): Promise<ScheduledWorkflow>;
|
|
19
|
-
getScheduleById(scheduleId: number, loggedInUser: UserData): Promise<ScheduledWorkflow>;
|
|
20
|
-
getAllSchedules(page: number | undefined, size: number | undefined, filters: any | undefined, loggedInUser: UserData): Promise<{
|
|
21
|
-
data: ScheduledWorkflow[];
|
|
22
|
-
total: number;
|
|
23
|
-
page: number;
|
|
24
|
-
size: number;
|
|
25
|
-
}>;
|
|
26
|
-
pauseSchedule(scheduleId: number, loggedInUser: UserData): Promise<ScheduledWorkflow>;
|
|
27
|
-
resumeSchedule(scheduleId: number, loggedInUser: UserData): Promise<ScheduledWorkflow>;
|
|
28
|
-
deleteSchedule(scheduleId: number, loggedInUser: UserData): Promise<void>;
|
|
29
|
-
triggerManualExecution(scheduleId: number, loggedInUser: UserData, metadata?: Record<string, any>): Promise<{
|
|
30
|
-
executionLogId: number;
|
|
31
|
-
jobId: string;
|
|
32
|
-
}>;
|
|
33
|
-
getExecutionLogs(getExecutionLogsDto: GetExecutionLogsDto, loggedInUser: UserData): Promise<{
|
|
34
|
-
data: WorkflowExecutionLog[];
|
|
35
|
-
total: number;
|
|
36
|
-
page: number;
|
|
37
|
-
size: number;
|
|
38
|
-
}>;
|
|
39
|
-
getExecutionStats(scheduleId: number, loggedInUser: UserData): Promise<any>;
|
|
40
|
-
private scheduleJob;
|
|
41
|
-
private removeJob;
|
|
42
|
-
private validateCronExpression;
|
|
43
|
-
private calculateNextExecution;
|
|
44
|
-
}
|