@venturialstd/workflow 0.1.149 → 0.1.151
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/README.md +238 -238
- package/dist/constants/workflow.constant.d.ts +0 -5
- package/dist/constants/workflow.constant.d.ts.map +1 -1
- package/dist/constants/workflow.constant.js +1 -7
- package/dist/constants/workflow.constant.js.map +1 -1
- package/dist/controllers/workflow-bulk-credential.controller.d.ts +9 -0
- package/dist/controllers/workflow-bulk-credential.controller.d.ts.map +1 -0
- package/dist/controllers/workflow-bulk-credential.controller.js +59 -0
- package/dist/controllers/workflow-bulk-credential.controller.js.map +1 -0
- package/dist/controllers/workflow-history.controller.d.ts +67 -0
- package/dist/controllers/workflow-history.controller.d.ts.map +1 -0
- package/dist/controllers/workflow-history.controller.js +227 -0
- package/dist/controllers/workflow-history.controller.js.map +1 -0
- package/dist/dtos/apply-bulk-credential-updates.dto.d.ts +8 -0
- package/dist/dtos/apply-bulk-credential-updates.dto.d.ts.map +1 -0
- package/dist/dtos/apply-bulk-credential-updates.dto.js +40 -0
- package/dist/dtos/apply-bulk-credential-updates.dto.js.map +1 -0
- package/dist/dtos/index.d.ts +1 -0
- package/dist/dtos/index.d.ts.map +1 -1
- package/dist/dtos/index.js +1 -0
- package/dist/dtos/index.js.map +1 -1
- package/dist/entities/workflow-execution.entity.d.ts +1 -1
- package/dist/entities/workflow-execution.entity.d.ts.map +1 -1
- package/dist/entities/workflow-execution.entity.js +2 -2
- package/dist/entities/workflow-execution.entity.js.map +1 -1
- package/dist/entities/workflow-history.entity.d.ts +48 -0
- package/dist/entities/workflow-history.entity.d.ts.map +1 -0
- package/dist/entities/{workflow-user.entity.js → workflow-history.entity.js} +46 -39
- package/dist/entities/workflow-history.entity.js.map +1 -0
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/dist/modules/jira/actions/add-attachment.action.d.ts +3 -0
- package/dist/modules/jira/actions/add-attachment.action.d.ts.map +1 -0
- package/dist/modules/jira/actions/add-attachment.action.js +62 -0
- package/dist/modules/jira/actions/add-attachment.action.js.map +1 -0
- package/dist/modules/jira/actions/add-comment.action.d.ts +3 -0
- package/dist/modules/jira/actions/add-comment.action.d.ts.map +1 -0
- package/dist/modules/jira/actions/add-comment.action.js +99 -0
- package/dist/modules/jira/actions/add-comment.action.js.map +1 -0
- package/dist/modules/jira/actions/add-worklog.action.d.ts +3 -0
- package/dist/modules/jira/actions/add-worklog.action.d.ts.map +1 -0
- package/dist/modules/jira/actions/add-worklog.action.js +134 -0
- package/dist/modules/jira/actions/add-worklog.action.js.map +1 -0
- package/dist/modules/jira/actions/assign-issue.action.d.ts +3 -0
- package/dist/modules/jira/actions/assign-issue.action.d.ts.map +1 -0
- package/dist/modules/jira/actions/assign-issue.action.js +57 -0
- package/dist/modules/jira/actions/assign-issue.action.js.map +1 -0
- package/dist/modules/jira/actions/create-issue.action.d.ts +3 -0
- package/dist/modules/jira/actions/create-issue.action.d.ts.map +1 -0
- package/dist/modules/jira/actions/create-issue.action.js +95 -0
- package/dist/modules/jira/actions/create-issue.action.js.map +1 -0
- package/dist/modules/jira/actions/delete-comment.action.d.ts +3 -0
- package/dist/modules/jira/actions/delete-comment.action.d.ts.map +1 -0
- package/dist/modules/jira/actions/delete-comment.action.js +58 -0
- package/dist/modules/jira/actions/delete-comment.action.js.map +1 -0
- package/dist/modules/jira/actions/delete-issue.action.d.ts +3 -0
- package/dist/modules/jira/actions/delete-issue.action.d.ts.map +1 -0
- package/dist/modules/jira/actions/delete-issue.action.js +51 -0
- package/dist/modules/jira/actions/delete-issue.action.js.map +1 -0
- package/dist/modules/jira/actions/delete-worklog.action.d.ts +3 -0
- package/dist/modules/jira/actions/delete-worklog.action.d.ts.map +1 -0
- package/dist/modules/jira/actions/delete-worklog.action.js +58 -0
- package/dist/modules/jira/actions/delete-worklog.action.js.map +1 -0
- package/dist/modules/jira/actions/get-all-issues.action.d.ts +3 -0
- package/dist/modules/jira/actions/get-all-issues.action.d.ts.map +1 -0
- package/dist/modules/jira/actions/get-all-issues.action.js +101 -0
- package/dist/modules/jira/actions/get-all-issues.action.js.map +1 -0
- package/dist/modules/jira/actions/get-attachments.action.d.ts +3 -0
- package/dist/modules/jira/actions/get-attachments.action.d.ts.map +1 -0
- package/dist/modules/jira/actions/get-attachments.action.js +47 -0
- package/dist/modules/jira/actions/get-attachments.action.js.map +1 -0
- package/dist/modules/jira/actions/get-changelogs.action.d.ts +3 -0
- package/dist/modules/jira/actions/get-changelogs.action.d.ts.map +1 -0
- package/dist/modules/jira/actions/get-changelogs.action.js +82 -0
- package/dist/modules/jira/actions/get-changelogs.action.js.map +1 -0
- package/dist/modules/jira/actions/get-comments.action.d.ts +3 -0
- package/dist/modules/jira/actions/get-comments.action.d.ts.map +1 -0
- package/dist/modules/jira/actions/get-comments.action.js +92 -0
- package/dist/modules/jira/actions/get-comments.action.js.map +1 -0
- package/dist/modules/jira/actions/get-issue-types.action.d.ts +3 -0
- package/dist/modules/jira/actions/get-issue-types.action.d.ts.map +1 -0
- package/dist/modules/jira/actions/get-issue-types.action.js +29 -0
- package/dist/modules/jira/actions/get-issue-types.action.js.map +1 -0
- package/dist/modules/jira/actions/get-issue.action.d.ts +3 -0
- package/dist/modules/jira/actions/get-issue.action.d.ts.map +1 -0
- package/dist/modules/jira/actions/get-issue.action.js +85 -0
- package/dist/modules/jira/actions/get-issue.action.js.map +1 -0
- package/dist/modules/jira/actions/get-myself.action.d.ts +3 -0
- package/dist/modules/jira/actions/get-myself.action.d.ts.map +1 -0
- package/dist/modules/jira/actions/get-myself.action.js +52 -0
- package/dist/modules/jira/actions/get-myself.action.js.map +1 -0
- package/dist/modules/jira/actions/get-priorities.action.d.ts +3 -0
- package/dist/modules/jira/actions/get-priorities.action.d.ts.map +1 -0
- package/dist/modules/jira/actions/get-priorities.action.js +35 -0
- package/dist/modules/jira/actions/get-priorities.action.js.map +1 -0
- package/dist/modules/jira/actions/get-project-statuses.action.d.ts +3 -0
- package/dist/modules/jira/actions/get-project-statuses.action.d.ts.map +1 -0
- package/dist/modules/jira/actions/get-project-statuses.action.js +47 -0
- package/dist/modules/jira/actions/get-project-statuses.action.js.map +1 -0
- package/dist/modules/jira/actions/get-project-versions.action.d.ts +3 -0
- package/dist/modules/jira/actions/get-project-versions.action.d.ts.map +1 -0
- package/dist/modules/jira/actions/get-project-versions.action.js +57 -0
- package/dist/modules/jira/actions/get-project-versions.action.js.map +1 -0
- package/dist/modules/jira/actions/get-project.action.d.ts +3 -0
- package/dist/modules/jira/actions/get-project.action.d.ts.map +1 -0
- package/dist/modules/jira/actions/get-project.action.js +69 -0
- package/dist/modules/jira/actions/get-project.action.js.map +1 -0
- package/dist/modules/jira/actions/get-projects.action.d.ts +3 -0
- package/dist/modules/jira/actions/get-projects.action.d.ts.map +1 -0
- package/dist/modules/jira/actions/get-projects.action.js +56 -0
- package/dist/modules/jira/actions/get-projects.action.js.map +1 -0
- package/dist/modules/jira/actions/get-ticket-information.action.d.ts +3 -0
- package/dist/modules/jira/actions/get-ticket-information.action.d.ts.map +1 -0
- package/dist/modules/jira/actions/get-ticket-information.action.js +47 -0
- package/dist/modules/jira/actions/get-ticket-information.action.js.map +1 -0
- package/dist/modules/jira/actions/get-transitions.action.d.ts +3 -0
- package/dist/modules/jira/actions/get-transitions.action.d.ts.map +1 -0
- package/dist/modules/jira/actions/get-transitions.action.js +67 -0
- package/dist/modules/jira/actions/get-transitions.action.js.map +1 -0
- package/dist/modules/jira/actions/get-user-picker.action.d.ts +3 -0
- package/dist/modules/jira/actions/get-user-picker.action.d.ts.map +1 -0
- package/dist/modules/jira/actions/get-user-picker.action.js +109 -0
- package/dist/modules/jira/actions/get-user-picker.action.js.map +1 -0
- package/dist/modules/jira/actions/get-user.action.d.ts +3 -0
- package/dist/modules/jira/actions/get-user.action.d.ts.map +1 -0
- package/dist/modules/jira/actions/get-user.action.js +63 -0
- package/dist/modules/jira/actions/get-user.action.js.map +1 -0
- package/dist/modules/jira/actions/get-users.action.d.ts +3 -0
- package/dist/modules/jira/actions/get-users.action.d.ts.map +1 -0
- package/dist/modules/jira/actions/get-users.action.js +70 -0
- package/dist/modules/jira/actions/get-users.action.js.map +1 -0
- package/dist/modules/jira/actions/get-worklogs.action.d.ts +3 -0
- package/dist/modules/jira/actions/get-worklogs.action.d.ts.map +1 -0
- package/dist/modules/jira/actions/get-worklogs.action.js +92 -0
- package/dist/modules/jira/actions/get-worklogs.action.js.map +1 -0
- package/dist/modules/jira/actions/index.d.ts +44 -0
- package/dist/modules/jira/actions/index.d.ts.map +1 -0
- package/dist/modules/jira/actions/index.js +60 -0
- package/dist/modules/jira/actions/index.js.map +1 -0
- package/dist/modules/jira/actions/search-issues-by-assignee.action.d.ts +3 -0
- package/dist/modules/jira/actions/search-issues-by-assignee.action.d.ts.map +1 -0
- package/dist/modules/jira/actions/search-issues-by-assignee.action.js +101 -0
- package/dist/modules/jira/actions/search-issues-by-assignee.action.js.map +1 -0
- package/dist/modules/jira/actions/search-issues-by-created-date.action.d.ts +3 -0
- package/dist/modules/jira/actions/search-issues-by-created-date.action.d.ts.map +1 -0
- package/dist/modules/jira/actions/search-issues-by-created-date.action.js +112 -0
- package/dist/modules/jira/actions/search-issues-by-created-date.action.js.map +1 -0
- package/dist/modules/jira/actions/search-issues-by-issue-type.action.d.ts +3 -0
- package/dist/modules/jira/actions/search-issues-by-issue-type.action.d.ts.map +1 -0
- package/dist/modules/jira/actions/search-issues-by-issue-type.action.js +101 -0
- package/dist/modules/jira/actions/search-issues-by-issue-type.action.js.map +1 -0
- package/dist/modules/jira/actions/search-issues-by-priority.action.d.ts +3 -0
- package/dist/modules/jira/actions/search-issues-by-priority.action.d.ts.map +1 -0
- package/dist/modules/jira/actions/search-issues-by-priority.action.js +101 -0
- package/dist/modules/jira/actions/search-issues-by-priority.action.js.map +1 -0
- package/dist/modules/jira/actions/search-issues-by-project-and-assignee.action.d.ts +3 -0
- package/dist/modules/jira/actions/search-issues-by-project-and-assignee.action.d.ts.map +1 -0
- package/dist/modules/jira/actions/search-issues-by-project-and-assignee.action.js +112 -0
- package/dist/modules/jira/actions/search-issues-by-project-and-assignee.action.js.map +1 -0
- package/dist/modules/jira/actions/search-issues-by-project-and-status.action.d.ts +3 -0
- package/dist/modules/jira/actions/search-issues-by-project-and-status.action.d.ts.map +1 -0
- package/dist/modules/jira/actions/search-issues-by-project-and-status.action.js +112 -0
- package/dist/modules/jira/actions/search-issues-by-project-and-status.action.js.map +1 -0
- package/dist/modules/jira/actions/search-issues-by-project.action.d.ts +3 -0
- package/dist/modules/jira/actions/search-issues-by-project.action.d.ts.map +1 -0
- package/dist/modules/jira/actions/search-issues-by-project.action.js +101 -0
- package/dist/modules/jira/actions/search-issues-by-project.action.js.map +1 -0
- package/dist/modules/jira/actions/search-issues-by-reporter.action.d.ts +3 -0
- package/dist/modules/jira/actions/search-issues-by-reporter.action.d.ts.map +1 -0
- package/dist/modules/jira/actions/search-issues-by-reporter.action.js +101 -0
- package/dist/modules/jira/actions/search-issues-by-reporter.action.js.map +1 -0
- package/dist/modules/jira/actions/search-issues-by-status.action.d.ts +3 -0
- package/dist/modules/jira/actions/search-issues-by-status.action.d.ts.map +1 -0
- package/dist/modules/jira/actions/search-issues-by-status.action.js +101 -0
- package/dist/modules/jira/actions/search-issues-by-status.action.js.map +1 -0
- package/dist/modules/jira/actions/search-issues-by-text.action.d.ts +3 -0
- package/dist/modules/jira/actions/search-issues-by-text.action.d.ts.map +1 -0
- package/dist/modules/jira/actions/search-issues-by-text.action.js +101 -0
- package/dist/modules/jira/actions/search-issues-by-text.action.js.map +1 -0
- package/dist/modules/jira/actions/search-issues-by-updated-date.action.d.ts +3 -0
- package/dist/modules/jira/actions/search-issues-by-updated-date.action.d.ts.map +1 -0
- package/dist/modules/jira/actions/search-issues-by-updated-date.action.js +112 -0
- package/dist/modules/jira/actions/search-issues-by-updated-date.action.js.map +1 -0
- package/dist/modules/jira/actions/search-issues.action.d.ts +3 -0
- package/dist/modules/jira/actions/search-issues.action.d.ts.map +1 -0
- package/dist/modules/jira/actions/search-issues.action.js +101 -0
- package/dist/modules/jira/actions/search-issues.action.js.map +1 -0
- package/dist/modules/jira/actions/search-unassigned-issues.action.d.ts +3 -0
- package/dist/modules/jira/actions/search-unassigned-issues.action.d.ts.map +1 -0
- package/dist/modules/jira/actions/search-unassigned-issues.action.js +90 -0
- package/dist/modules/jira/actions/search-unassigned-issues.action.js.map +1 -0
- package/dist/modules/jira/actions/transition-issue.action.d.ts +3 -0
- package/dist/modules/jira/actions/transition-issue.action.d.ts.map +1 -0
- package/dist/modules/jira/actions/transition-issue.action.js +88 -0
- package/dist/modules/jira/actions/transition-issue.action.js.map +1 -0
- package/dist/modules/jira/actions/update-comment.action.d.ts +3 -0
- package/dist/modules/jira/actions/update-comment.action.d.ts.map +1 -0
- package/dist/modules/jira/actions/update-comment.action.js +116 -0
- package/dist/modules/jira/actions/update-comment.action.js.map +1 -0
- package/dist/modules/jira/actions/update-issue.action.d.ts +3 -0
- package/dist/modules/jira/actions/update-issue.action.d.ts.map +1 -0
- package/dist/modules/jira/actions/update-issue.action.js +129 -0
- package/dist/modules/jira/actions/update-issue.action.js.map +1 -0
- package/dist/modules/jira/actions/update-worklog.action.d.ts +3 -0
- package/dist/modules/jira/actions/update-worklog.action.d.ts.map +1 -0
- package/dist/modules/jira/actions/update-worklog.action.js +145 -0
- package/dist/modules/jira/actions/update-worklog.action.js.map +1 -0
- package/dist/modules/jira/auth/index.d.ts +2 -0
- package/dist/modules/jira/auth/index.d.ts.map +1 -0
- package/dist/modules/jira/auth/index.js +18 -0
- package/dist/modules/jira/auth/index.js.map +1 -0
- package/dist/modules/jira/auth/jira-auth.service.d.ts +9 -0
- package/dist/modules/jira/auth/jira-auth.service.d.ts.map +1 -0
- package/dist/modules/jira/auth/jira-auth.service.js +93 -0
- package/dist/modules/jira/auth/jira-auth.service.js.map +1 -0
- package/dist/modules/jira/credentials.d.ts +3 -0
- package/dist/modules/jira/credentials.d.ts.map +1 -0
- package/dist/modules/jira/credentials.js +44 -0
- package/dist/modules/jira/credentials.js.map +1 -0
- package/dist/modules/jira/jira-nest.module.d.ts +3 -0
- package/dist/modules/jira/jira-nest.module.d.ts.map +1 -0
- package/dist/modules/jira/jira-nest.module.js +121 -0
- package/dist/modules/jira/jira-nest.module.js.map +1 -0
- package/dist/modules/jira/jira.module.d.ts +3 -0
- package/dist/modules/jira/jira.module.d.ts.map +1 -0
- package/dist/modules/jira/jira.module.js +63 -0
- package/dist/modules/jira/jira.module.js.map +1 -0
- package/dist/modules/jira/services/add-attachment.service.d.ts +8 -0
- package/dist/modules/jira/services/add-attachment.service.d.ts.map +1 -0
- package/dist/modules/jira/services/add-attachment.service.js +59 -0
- package/dist/modules/jira/services/add-attachment.service.js.map +1 -0
- package/dist/modules/jira/services/add-comment.service.d.ts +8 -0
- package/dist/modules/jira/services/add-comment.service.d.ts.map +1 -0
- package/dist/modules/jira/services/add-comment.service.js +74 -0
- package/dist/modules/jira/services/add-comment.service.js.map +1 -0
- package/dist/modules/jira/services/add-worklog.service.d.ts +8 -0
- package/dist/modules/jira/services/add-worklog.service.d.ts.map +1 -0
- package/dist/modules/jira/services/add-worklog.service.js +88 -0
- package/dist/modules/jira/services/add-worklog.service.js.map +1 -0
- package/dist/modules/jira/services/assign-issue.service.d.ts +8 -0
- package/dist/modules/jira/services/assign-issue.service.d.ts.map +1 -0
- package/dist/modules/jira/services/assign-issue.service.js +55 -0
- package/dist/modules/jira/services/assign-issue.service.js.map +1 -0
- package/dist/modules/jira/services/create-issue.service.d.ts +8 -0
- package/dist/modules/jira/services/create-issue.service.d.ts.map +1 -0
- package/dist/modules/jira/services/create-issue.service.js +90 -0
- package/dist/modules/jira/services/create-issue.service.js.map +1 -0
- package/dist/modules/jira/services/delete-comment.service.d.ts +8 -0
- package/dist/modules/jira/services/delete-comment.service.d.ts.map +1 -0
- package/dist/modules/jira/services/delete-comment.service.js +55 -0
- package/dist/modules/jira/services/delete-comment.service.js.map +1 -0
- package/dist/modules/jira/services/delete-issue.service.d.ts +8 -0
- package/dist/modules/jira/services/delete-issue.service.d.ts.map +1 -0
- package/dist/modules/jira/services/delete-issue.service.js +51 -0
- package/dist/modules/jira/services/delete-issue.service.js.map +1 -0
- package/dist/modules/jira/services/delete-worklog.service.d.ts +8 -0
- package/dist/modules/jira/services/delete-worklog.service.d.ts.map +1 -0
- package/dist/modules/jira/services/delete-worklog.service.js +55 -0
- package/dist/modules/jira/services/delete-worklog.service.js.map +1 -0
- package/dist/modules/jira/services/get-all-issues.service.d.ts +8 -0
- package/dist/modules/jira/services/get-all-issues.service.d.ts.map +1 -0
- package/dist/modules/jira/services/get-all-issues.service.js +66 -0
- package/dist/modules/jira/services/get-all-issues.service.js.map +1 -0
- package/dist/modules/jira/services/get-attachments.service.d.ts +8 -0
- package/dist/modules/jira/services/get-attachments.service.d.ts.map +1 -0
- package/dist/modules/jira/services/get-attachments.service.js +51 -0
- package/dist/modules/jira/services/get-attachments.service.js.map +1 -0
- package/dist/modules/jira/services/get-changelogs.service.d.ts +8 -0
- package/dist/modules/jira/services/get-changelogs.service.d.ts.map +1 -0
- package/dist/modules/jira/services/get-changelogs.service.js +58 -0
- package/dist/modules/jira/services/get-changelogs.service.js.map +1 -0
- package/dist/modules/jira/services/get-comments.service.d.ts +8 -0
- package/dist/modules/jira/services/get-comments.service.d.ts.map +1 -0
- package/dist/modules/jira/services/get-comments.service.js +60 -0
- package/dist/modules/jira/services/get-comments.service.js.map +1 -0
- package/dist/modules/jira/services/get-issue-types.service.d.ts +8 -0
- package/dist/modules/jira/services/get-issue-types.service.d.ts.map +1 -0
- package/dist/modules/jira/services/get-issue-types.service.js +76 -0
- package/dist/modules/jira/services/get-issue-types.service.js.map +1 -0
- package/dist/modules/jira/services/get-issue.service.d.ts +8 -0
- package/dist/modules/jira/services/get-issue.service.d.ts.map +1 -0
- package/dist/modules/jira/services/get-issue.service.js +59 -0
- package/dist/modules/jira/services/get-issue.service.js.map +1 -0
- package/dist/modules/jira/services/get-myself.service.d.ts +8 -0
- package/dist/modules/jira/services/get-myself.service.d.ts.map +1 -0
- package/dist/modules/jira/services/get-myself.service.js +49 -0
- package/dist/modules/jira/services/get-myself.service.js.map +1 -0
- package/dist/modules/jira/services/get-priorities.service.d.ts +8 -0
- package/dist/modules/jira/services/get-priorities.service.d.ts.map +1 -0
- package/dist/modules/jira/services/get-priorities.service.js +68 -0
- package/dist/modules/jira/services/get-priorities.service.js.map +1 -0
- package/dist/modules/jira/services/get-project-statuses.service.d.ts +8 -0
- package/dist/modules/jira/services/get-project-statuses.service.d.ts.map +1 -0
- package/dist/modules/jira/services/get-project-statuses.service.js +51 -0
- package/dist/modules/jira/services/get-project-statuses.service.js.map +1 -0
- package/dist/modules/jira/services/get-project-versions.service.d.ts +8 -0
- package/dist/modules/jira/services/get-project-versions.service.d.ts.map +1 -0
- package/dist/modules/jira/services/get-project-versions.service.js +54 -0
- package/dist/modules/jira/services/get-project-versions.service.js.map +1 -0
- package/dist/modules/jira/services/get-project.service.d.ts +8 -0
- package/dist/modules/jira/services/get-project.service.d.ts.map +1 -0
- package/dist/modules/jira/services/get-project.service.js +53 -0
- package/dist/modules/jira/services/get-project.service.js.map +1 -0
- package/dist/modules/jira/services/get-projects.service.d.ts +8 -0
- package/dist/modules/jira/services/get-projects.service.d.ts.map +1 -0
- package/dist/modules/jira/services/get-projects.service.js +52 -0
- package/dist/modules/jira/services/get-projects.service.js.map +1 -0
- package/dist/modules/jira/services/get-ticket-information.service.d.ts +9 -0
- package/dist/modules/jira/services/get-ticket-information.service.d.ts.map +1 -0
- package/dist/modules/jira/services/get-ticket-information.service.js +59 -0
- package/dist/modules/jira/services/get-ticket-information.service.js.map +1 -0
- package/dist/modules/jira/services/get-transitions.service.d.ts +8 -0
- package/dist/modules/jira/services/get-transitions.service.d.ts.map +1 -0
- package/dist/modules/jira/services/get-transitions.service.js +56 -0
- package/dist/modules/jira/services/get-transitions.service.js.map +1 -0
- package/dist/modules/jira/services/get-user-picker.service.d.ts +8 -0
- package/dist/modules/jira/services/get-user-picker.service.d.ts.map +1 -0
- package/dist/modules/jira/services/get-user-picker.service.js +74 -0
- package/dist/modules/jira/services/get-user-picker.service.js.map +1 -0
- package/dist/modules/jira/services/get-user.service.d.ts +8 -0
- package/dist/modules/jira/services/get-user.service.d.ts.map +1 -0
- package/dist/modules/jira/services/get-user.service.js +53 -0
- package/dist/modules/jira/services/get-user.service.js.map +1 -0
- package/dist/modules/jira/services/get-users.service.d.ts +8 -0
- package/dist/modules/jira/services/get-users.service.d.ts.map +1 -0
- package/dist/modules/jira/services/get-users.service.js +56 -0
- package/dist/modules/jira/services/get-users.service.js.map +1 -0
- package/dist/modules/jira/services/get-worklogs.service.d.ts +8 -0
- package/dist/modules/jira/services/get-worklogs.service.d.ts.map +1 -0
- package/dist/modules/jira/services/get-worklogs.service.js +60 -0
- package/dist/modules/jira/services/get-worklogs.service.js.map +1 -0
- package/dist/modules/jira/services/index.d.ts +47 -0
- package/dist/modules/jira/services/index.d.ts.map +1 -0
- package/dist/modules/jira/services/index.js +63 -0
- package/dist/modules/jira/services/index.js.map +1 -0
- package/dist/modules/jira/services/issue-updated-polling.service.d.ts +32 -0
- package/dist/modules/jira/services/issue-updated-polling.service.d.ts.map +1 -0
- package/dist/modules/jira/services/issue-updated-polling.service.js +274 -0
- package/dist/modules/jira/services/issue-updated-polling.service.js.map +1 -0
- package/dist/modules/jira/services/new-comment-added.service.d.ts +35 -0
- package/dist/modules/jira/services/new-comment-added.service.d.ts.map +1 -0
- package/dist/modules/jira/services/new-comment-added.service.js +335 -0
- package/dist/modules/jira/services/new-comment-added.service.js.map +1 -0
- package/dist/modules/jira/services/new-issue-created.service.d.ts +33 -0
- package/dist/modules/jira/services/new-issue-created.service.d.ts.map +1 -0
- package/dist/modules/jira/services/new-issue-created.service.js +282 -0
- package/dist/modules/jira/services/new-issue-created.service.js.map +1 -0
- package/dist/modules/jira/services/search-issues-by-assignee.service.d.ts +8 -0
- package/dist/modules/jira/services/search-issues-by-assignee.service.d.ts.map +1 -0
- package/dist/modules/jira/services/search-issues-by-assignee.service.js +66 -0
- package/dist/modules/jira/services/search-issues-by-assignee.service.js.map +1 -0
- package/dist/modules/jira/services/search-issues-by-created-date.service.d.ts +8 -0
- package/dist/modules/jira/services/search-issues-by-created-date.service.d.ts.map +1 -0
- package/dist/modules/jira/services/search-issues-by-created-date.service.js +70 -0
- package/dist/modules/jira/services/search-issues-by-created-date.service.js.map +1 -0
- package/dist/modules/jira/services/search-issues-by-issue-type.service.d.ts +8 -0
- package/dist/modules/jira/services/search-issues-by-issue-type.service.d.ts.map +1 -0
- package/dist/modules/jira/services/search-issues-by-issue-type.service.js +66 -0
- package/dist/modules/jira/services/search-issues-by-issue-type.service.js.map +1 -0
- package/dist/modules/jira/services/search-issues-by-priority.service.d.ts +8 -0
- package/dist/modules/jira/services/search-issues-by-priority.service.d.ts.map +1 -0
- package/dist/modules/jira/services/search-issues-by-priority.service.js +66 -0
- package/dist/modules/jira/services/search-issues-by-priority.service.js.map +1 -0
- package/dist/modules/jira/services/search-issues-by-project-and-assignee.service.d.ts +8 -0
- package/dist/modules/jira/services/search-issues-by-project-and-assignee.service.d.ts.map +1 -0
- package/dist/modules/jira/services/search-issues-by-project-and-assignee.service.js +70 -0
- package/dist/modules/jira/services/search-issues-by-project-and-assignee.service.js.map +1 -0
- package/dist/modules/jira/services/search-issues-by-project-and-status.service.d.ts +8 -0
- package/dist/modules/jira/services/search-issues-by-project-and-status.service.d.ts.map +1 -0
- package/dist/modules/jira/services/search-issues-by-project-and-status.service.js +70 -0
- package/dist/modules/jira/services/search-issues-by-project-and-status.service.js.map +1 -0
- package/dist/modules/jira/services/search-issues-by-project.service.d.ts +8 -0
- package/dist/modules/jira/services/search-issues-by-project.service.d.ts.map +1 -0
- package/dist/modules/jira/services/search-issues-by-project.service.js +66 -0
- package/dist/modules/jira/services/search-issues-by-project.service.js.map +1 -0
- package/dist/modules/jira/services/search-issues-by-reporter.service.d.ts +8 -0
- package/dist/modules/jira/services/search-issues-by-reporter.service.d.ts.map +1 -0
- package/dist/modules/jira/services/search-issues-by-reporter.service.js +66 -0
- package/dist/modules/jira/services/search-issues-by-reporter.service.js.map +1 -0
- package/dist/modules/jira/services/search-issues-by-status.service.d.ts +8 -0
- package/dist/modules/jira/services/search-issues-by-status.service.d.ts.map +1 -0
- package/dist/modules/jira/services/search-issues-by-status.service.js +66 -0
- package/dist/modules/jira/services/search-issues-by-status.service.js.map +1 -0
- package/dist/modules/jira/services/search-issues-by-text.service.d.ts +8 -0
- package/dist/modules/jira/services/search-issues-by-text.service.d.ts.map +1 -0
- package/dist/modules/jira/services/search-issues-by-text.service.js +66 -0
- package/dist/modules/jira/services/search-issues-by-text.service.js.map +1 -0
- package/dist/modules/jira/services/search-issues-by-updated-date.service.d.ts +8 -0
- package/dist/modules/jira/services/search-issues-by-updated-date.service.d.ts.map +1 -0
- package/dist/modules/jira/services/search-issues-by-updated-date.service.js +70 -0
- package/dist/modules/jira/services/search-issues-by-updated-date.service.js.map +1 -0
- package/dist/modules/jira/services/search-issues.service.d.ts +8 -0
- package/dist/modules/jira/services/search-issues.service.d.ts.map +1 -0
- package/dist/modules/jira/services/search-issues.service.js +67 -0
- package/dist/modules/jira/services/search-issues.service.js.map +1 -0
- package/dist/modules/jira/services/search-unassigned-issues.service.d.ts +8 -0
- package/dist/modules/jira/services/search-unassigned-issues.service.d.ts.map +1 -0
- package/dist/modules/jira/services/search-unassigned-issues.service.js +62 -0
- package/dist/modules/jira/services/search-unassigned-issues.service.js.map +1 -0
- package/dist/modules/jira/services/transition-issue.service.d.ts +8 -0
- package/dist/modules/jira/services/transition-issue.service.d.ts.map +1 -0
- package/dist/modules/jira/services/transition-issue.service.js +88 -0
- package/dist/modules/jira/services/transition-issue.service.js.map +1 -0
- package/dist/modules/jira/services/update-comment.service.d.ts +8 -0
- package/dist/modules/jira/services/update-comment.service.d.ts.map +1 -0
- package/dist/modules/jira/services/update-comment.service.js +79 -0
- package/dist/modules/jira/services/update-comment.service.js.map +1 -0
- package/dist/modules/jira/services/update-issue.service.d.ts +8 -0
- package/dist/modules/jira/services/update-issue.service.d.ts.map +1 -0
- package/dist/modules/jira/services/update-issue.service.js +108 -0
- package/dist/modules/jira/services/update-issue.service.js.map +1 -0
- package/dist/modules/jira/services/update-worklog.service.d.ts +8 -0
- package/dist/modules/jira/services/update-worklog.service.d.ts.map +1 -0
- package/dist/modules/jira/services/update-worklog.service.js +92 -0
- package/dist/modules/jira/services/update-worklog.service.js.map +1 -0
- package/dist/modules/jira/triggers/index.d.ts +3 -0
- package/dist/modules/jira/triggers/index.d.ts.map +1 -0
- package/dist/modules/jira/triggers/index.js +12 -0
- package/dist/modules/jira/triggers/index.js.map +1 -0
- package/dist/modules/jira/triggers/issue-updated-polling.trigger.d.ts +3 -0
- package/dist/modules/jira/triggers/issue-updated-polling.trigger.d.ts.map +1 -0
- package/dist/modules/jira/triggers/issue-updated-polling.trigger.js +77 -0
- package/dist/modules/jira/triggers/issue-updated-polling.trigger.js.map +1 -0
- package/dist/modules/jira/triggers/new-comment-added.trigger.d.ts +3 -0
- package/dist/modules/jira/triggers/new-comment-added.trigger.d.ts.map +1 -0
- package/dist/modules/jira/triggers/new-comment-added.trigger.js +74 -0
- package/dist/modules/jira/triggers/new-comment-added.trigger.js.map +1 -0
- package/dist/modules/jira/triggers/new-issue-created.trigger.d.ts +3 -0
- package/dist/modules/jira/triggers/new-issue-created.trigger.d.ts.map +1 -0
- package/dist/modules/jira/triggers/new-issue-created.trigger.js +87 -0
- package/dist/modules/jira/triggers/new-issue-created.trigger.js.map +1 -0
- package/dist/modules/jira/utils/jira-adf.util.d.ts +5 -0
- package/dist/modules/jira/utils/jira-adf.util.d.ts.map +1 -0
- package/dist/modules/jira/utils/jira-adf.util.js +73 -0
- package/dist/modules/jira/utils/jira-adf.util.js.map +1 -0
- package/dist/modules/jira/utils/jira-credentials.util.d.ts +4 -0
- package/dist/modules/jira/utils/jira-credentials.util.d.ts.map +1 -0
- package/dist/modules/jira/utils/jira-credentials.util.js +26 -0
- package/dist/modules/jira/utils/jira-credentials.util.js.map +1 -0
- package/dist/modules/jira/utils/jira-error.util.d.ts +3 -0
- package/dist/modules/jira/utils/jira-error.util.d.ts.map +1 -0
- package/dist/modules/jira/utils/jira-error.util.js +25 -0
- package/dist/modules/jira/utils/jira-error.util.js.map +1 -0
- package/dist/services/workflow-bulk-credential.service.d.ts +26 -0
- package/dist/services/workflow-bulk-credential.service.d.ts.map +1 -0
- package/dist/services/workflow-bulk-credential.service.js +114 -0
- package/dist/services/workflow-bulk-credential.service.js.map +1 -0
- package/dist/services/workflow-edge.service.d.ts +1 -7
- package/dist/services/workflow-edge.service.d.ts.map +1 -1
- package/dist/services/workflow-edge.service.js +2 -29
- package/dist/services/workflow-edge.service.js.map +1 -1
- package/dist/services/workflow-execution.service.js +2 -2
- package/dist/services/workflow-execution.service.js.map +1 -1
- package/dist/services/workflow-history.service.d.ts +66 -0
- package/dist/services/workflow-history.service.d.ts.map +1 -0
- package/dist/services/workflow-history.service.js +459 -0
- package/dist/services/workflow-history.service.js.map +1 -0
- package/dist/services/workflow-node.service.d.ts +1 -7
- package/dist/services/workflow-node.service.d.ts.map +1 -1
- package/dist/services/workflow-node.service.js +2 -29
- package/dist/services/workflow-node.service.js.map +1 -1
- package/dist/services/workflow-sse.service.d.ts +1 -19
- package/dist/services/workflow-sse.service.d.ts.map +1 -1
- package/dist/services/workflow-sse.service.js +0 -24
- package/dist/services/workflow-sse.service.js.map +1 -1
- package/dist/services/workflow.service.d.ts +1 -6
- package/dist/services/workflow.service.d.ts.map +1 -1
- package/dist/services/workflow.service.js +4 -26
- package/dist/services/workflow.service.js.map +1 -1
- package/dist/utils/deep-equal.util.d.ts +2 -0
- package/dist/utils/deep-equal.util.d.ts.map +1 -0
- package/dist/utils/deep-equal.util.js +48 -0
- package/dist/utils/deep-equal.util.js.map +1 -0
- package/dist/utils/workflow-diff.util.d.ts +13 -0
- package/dist/utils/workflow-diff.util.d.ts.map +1 -0
- package/dist/utils/workflow-diff.util.js +84 -0
- package/dist/utils/workflow-diff.util.js.map +1 -0
- package/dist/utils/workflow-snapshot.util.d.ts +5 -0
- package/dist/utils/workflow-snapshot.util.d.ts.map +1 -0
- package/dist/utils/workflow-snapshot.util.js +145 -0
- package/dist/utils/workflow-snapshot.util.js.map +1 -0
- package/dist/utils/workflow-validation.util.d.ts +4 -0
- package/dist/utils/workflow-validation.util.d.ts.map +1 -0
- package/dist/utils/workflow-validation.util.js +62 -0
- package/dist/utils/workflow-validation.util.js.map +1 -0
- package/dist/workflow-core.module.d.ts.map +1 -1
- package/dist/workflow-core.module.js +11 -5
- package/dist/workflow-core.module.js.map +1 -1
- package/dist/workflow.module.d.ts.map +1 -1
- package/dist/workflow.module.js +4 -1
- package/dist/workflow.module.js.map +1 -1
- package/package.json +109 -108
- package/dist/entities/workflow-user.entity.d.ts +0 -13
- package/dist/entities/workflow-user.entity.d.ts.map +0 -1
- package/dist/entities/workflow-user.entity.js.map +0 -1
- package/dist/services/workflow-user.service.d.ts +0 -20
- package/dist/services/workflow-user.service.d.ts.map +0 -1
- package/dist/services/workflow-user.service.js +0 -111
- package/dist/services/workflow-user.service.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,238 +1,238 @@
|
|
|
1
|
-
# Workflow Module
|
|
2
|
-
|
|
3
|
-
A comprehensive workflow management module for Venturial that handles workflow creation, execution, and session management.
|
|
4
|
-
|
|
5
|
-
## Features
|
|
6
|
-
|
|
7
|
-
- **Workflow Management**: Create, update, and manage workflows with nodes and edges
|
|
8
|
-
- **Node Types**: Support for multiple node types (Chatbot, AI, Conditional, Twilio)
|
|
9
|
-
- **Execution Tracking**: Track workflow executions with status and data
|
|
10
|
-
- **Session Management**: Persistent sessions for multi-step workflows
|
|
11
|
-
- **Execution Modes**: Support for single-run and persistent session workflows
|
|
12
|
-
|
|
13
|
-
## Installation
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
npm install @venturialstd/workflow
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
## Entities
|
|
20
|
-
|
|
21
|
-
### Workflow
|
|
22
|
-
Main workflow entity containing:
|
|
23
|
-
- `name`: Workflow name
|
|
24
|
-
- `active`: Whether the workflow is active
|
|
25
|
-
- `executionMode`: `single` or `persistent`
|
|
26
|
-
- `status`: `active`, `inactive`, or `draft`
|
|
27
|
-
- Relationships to nodes, edges, executions, and sessions
|
|
28
|
-
|
|
29
|
-
### WorkflowNode
|
|
30
|
-
Represents a node in the workflow:
|
|
31
|
-
- `nodeId`: ReactFlow node identifier
|
|
32
|
-
- `type`: Node type (chatbot, ai, conditional, twilio)
|
|
33
|
-
- `actionType`: Specific trigger or action identifier
|
|
34
|
-
- `properties`: Node-specific properties (JSONB)
|
|
35
|
-
- `position`: Node position on canvas (x, y)
|
|
36
|
-
|
|
37
|
-
### WorkflowEdge
|
|
38
|
-
Represents connections between nodes:
|
|
39
|
-
- `edgeId`: ReactFlow edge identifier
|
|
40
|
-
- `source`: Source node ID
|
|
41
|
-
- `target`: Target node ID
|
|
42
|
-
- `sourceHandle` / `targetHandle`: Handle identifiers
|
|
43
|
-
|
|
44
|
-
### WorkflowExecution
|
|
45
|
-
Tracks individual workflow runs:
|
|
46
|
-
- `status`: `pending`, `running`, `completed`, `failed`, `cancelled`
|
|
47
|
-
- `sessionId`: Optional session ID for persistent workflows
|
|
48
|
-
- `currentNodeId`: Current node being executed
|
|
49
|
-
- `inputData` / `outputData` / `errorData`: Execution data
|
|
50
|
-
|
|
51
|
-
### WorkflowSession
|
|
52
|
-
Manages persistent workflow sessions:
|
|
53
|
-
- `userId`: Optional user identifier
|
|
54
|
-
- `externalId`: External identifier (phone, email, etc.)
|
|
55
|
-
- `currentNodeId`: Current node in session
|
|
56
|
-
- `context`: Session context/variables (JSONB)
|
|
57
|
-
- `history`: Array of node execution history
|
|
58
|
-
|
|
59
|
-
### WorkflowModuleCredential
|
|
60
|
-
Stores credentials for workflow modules:
|
|
61
|
-
- `moduleId`: Module identifier (e.g., 'twilio', 'ai')
|
|
62
|
-
- `name`: User-defined name for this credential set
|
|
63
|
-
- `credentials`: Encrypted credential values (JSONB)
|
|
64
|
-
- `organizationId`: Optional organization scope
|
|
65
|
-
- `userId`: Optional user scope
|
|
66
|
-
- `isActive`: Whether the credential is active
|
|
67
|
-
|
|
68
|
-
## Services
|
|
69
|
-
|
|
70
|
-
All services extend `TypeOrmCrudService` and provide CRUD operations via `@dataui/crud`.
|
|
71
|
-
|
|
72
|
-
### WorkflowService
|
|
73
|
-
- `getWorkflowsByOrganization(organizationId)`
|
|
74
|
-
- `getActiveWorkflows(organizationId?)`
|
|
75
|
-
- `activateWorkflow(workflowId)`
|
|
76
|
-
- `deactivateWorkflow(workflowId)`
|
|
77
|
-
- `getWorkflowWithNodesAndEdges(workflowId)`
|
|
78
|
-
|
|
79
|
-
### WorkflowNodeService
|
|
80
|
-
- `getNodesByWorkflowId(workflowId)`
|
|
81
|
-
- `getNodeByNodeId(workflowId, nodeId)`
|
|
82
|
-
- `updateNodeProperties(id, properties)`
|
|
83
|
-
- `updateNodePosition(id, position)`
|
|
84
|
-
|
|
85
|
-
### WorkflowEdgeService
|
|
86
|
-
- `getEdgesByWorkflowId(workflowId)`
|
|
87
|
-
- `getEdgeByEdgeId(workflowId, edgeId)`
|
|
88
|
-
- `getEdgesBySourceNode(workflowId, sourceNodeId)`
|
|
89
|
-
- `getEdgesByTargetNode(workflowId, targetNodeId)`
|
|
90
|
-
|
|
91
|
-
### WorkflowExecutionService
|
|
92
|
-
- `getExecutionsByWorkflowId(workflowId)`
|
|
93
|
-
- `getExecutionsBySessionId(sessionId)`
|
|
94
|
-
- `getActiveExecutions(workflowId?)`
|
|
95
|
-
- `startExecution(executionId)`
|
|
96
|
-
- `completeExecution(executionId, outputData?)`
|
|
97
|
-
- `failExecution(executionId, errorMessage, errorData?)`
|
|
98
|
-
- `updateCurrentNode(executionId, currentNodeId)`
|
|
99
|
-
|
|
100
|
-
### WorkflowSessionService
|
|
101
|
-
- `getSessionsByWorkflowId(workflowId)`
|
|
102
|
-
- `getActiveSessions(workflowId?)`
|
|
103
|
-
- `getSessionByExternalId(workflowId, externalId)`
|
|
104
|
-
- `getSessionByUserId(workflowId, userId)`
|
|
105
|
-
- `updateSessionContext(sessionId, context)`
|
|
106
|
-
- `addToSessionHistory(sessionId, nodeId, data?)`
|
|
107
|
-
- `deactivateSession(sessionId)`
|
|
108
|
-
|
|
109
|
-
### WorkflowModuleCredentialService
|
|
110
|
-
- `getCredentialsByModule(moduleId, organizationId?, userId?)`
|
|
111
|
-
- `getCredentialByName(moduleId, name, organizationId?, userId?)`
|
|
112
|
-
- `getActiveCredentials(moduleId, organizationId?)`
|
|
113
|
-
- `updateCredential(id, credentials)`
|
|
114
|
-
- `activateCredential(id)`
|
|
115
|
-
- `deactivateCredential(id)`
|
|
116
|
-
|
|
117
|
-
## Usage
|
|
118
|
-
|
|
119
|
-
### Import the Module
|
|
120
|
-
|
|
121
|
-
```typescript
|
|
122
|
-
import { WorkflowModule } from '@venturialstd/workflow';
|
|
123
|
-
|
|
124
|
-
@Module({
|
|
125
|
-
imports: [WorkflowModule],
|
|
126
|
-
})
|
|
127
|
-
export class AppModule {}
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
### Use Services
|
|
131
|
-
|
|
132
|
-
```typescript
|
|
133
|
-
import { WorkflowService } from '@venturialstd/workflow';
|
|
134
|
-
|
|
135
|
-
@Injectable()
|
|
136
|
-
export class MyService {
|
|
137
|
-
constructor(private workflowService: WorkflowService) {}
|
|
138
|
-
|
|
139
|
-
async createWorkflow(data: CreateWorkflowDto) {
|
|
140
|
-
return this.workflowService.create(data);
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
## Constants
|
|
146
|
-
|
|
147
|
-
### Execution Modes
|
|
148
|
-
- `EXECUTION_MODE.SINGLE`: One-time execution
|
|
149
|
-
- `EXECUTION_MODE.PERSISTENT`: Maintains session state
|
|
150
|
-
|
|
151
|
-
### Node Types
|
|
152
|
-
- `NODE_TYPE.CHATBOT`
|
|
153
|
-
- `NODE_TYPE.AI`
|
|
154
|
-
- `NODE_TYPE.CONDITIONAL`
|
|
155
|
-
- `NODE_TYPE.TWILIO`
|
|
156
|
-
|
|
157
|
-
### Node Categories
|
|
158
|
-
- `NODE_CATEGORY.TRIGGER`
|
|
159
|
-
- `NODE_CATEGORY.ACTION`
|
|
160
|
-
|
|
161
|
-
### Workflow Status
|
|
162
|
-
- `WORKFLOW_STATUS.ACTIVE`
|
|
163
|
-
- `WORKFLOW_STATUS.INACTIVE`
|
|
164
|
-
- `WORKFLOW_STATUS.DRAFT`
|
|
165
|
-
|
|
166
|
-
### Execution Status
|
|
167
|
-
- `EXECUTION_STATUS.PENDING`
|
|
168
|
-
- `EXECUTION_STATUS.RUNNING`
|
|
169
|
-
- `EXECUTION_STATUS.COMPLETED`
|
|
170
|
-
- `EXECUTION_STATUS.FAILED`
|
|
171
|
-
- `EXECUTION_STATUS.CANCELLED`
|
|
172
|
-
|
|
173
|
-
## DTOs
|
|
174
|
-
|
|
175
|
-
All DTOs follow the `Create*Dto` pattern:
|
|
176
|
-
- `CreateWorkflowDto`
|
|
177
|
-
- `CreateWorkflowNodeDto`
|
|
178
|
-
- `CreateWorkflowEdgeDto`
|
|
179
|
-
- `CreateWorkflowExecutionDto`
|
|
180
|
-
- `CreateWorkflowSessionDto`
|
|
181
|
-
- `CreateWorkflowModuleCredentialDto`
|
|
182
|
-
- `UpdateWorkflowModuleCredentialDto`
|
|
183
|
-
|
|
184
|
-
## Database Schema
|
|
185
|
-
|
|
186
|
-
The module uses PostgreSQL with JSONB columns for flexible data storage:
|
|
187
|
-
- Node properties stored as JSONB
|
|
188
|
-
- Edge data stored as JSONB
|
|
189
|
-
- Execution input/output/error data as JSONB
|
|
190
|
-
- Session context and history as JSONB
|
|
191
|
-
- Module credentials stored as JSONB (should be encrypted at application level)
|
|
192
|
-
|
|
193
|
-
## Module Credentials
|
|
194
|
-
|
|
195
|
-
Each module can define required credential fields. Users can create multiple credential sets per module:
|
|
196
|
-
|
|
197
|
-
### Defining Credential Fields in Modules
|
|
198
|
-
|
|
199
|
-
Modules can define `credentialFields` in their module definition:
|
|
200
|
-
|
|
201
|
-
```typescript
|
|
202
|
-
credentialFields: [
|
|
203
|
-
{
|
|
204
|
-
id: 'apiKey',
|
|
205
|
-
name: 'API Key',
|
|
206
|
-
description: 'API key for the service',
|
|
207
|
-
type: FIELD_TYPE.STRING,
|
|
208
|
-
validation: { required: true },
|
|
209
|
-
sensitive: true, // Will be encrypted/masked
|
|
210
|
-
required: true,
|
|
211
|
-
},
|
|
212
|
-
]
|
|
213
|
-
```
|
|
214
|
-
|
|
215
|
-
### Managing Credentials
|
|
216
|
-
|
|
217
|
-
```typescript
|
|
218
|
-
// Create credentials for a module
|
|
219
|
-
const credential = await credentialService.create({
|
|
220
|
-
moduleId: 'twilio',
|
|
221
|
-
name: 'Production Twilio',
|
|
222
|
-
credentials: {
|
|
223
|
-
accountSid: 'AC...',
|
|
224
|
-
authToken: '...',
|
|
225
|
-
},
|
|
226
|
-
organizationId: 'org-123',
|
|
227
|
-
});
|
|
228
|
-
|
|
229
|
-
// Get all credentials for a module
|
|
230
|
-
const credentials = await credentialService.getCredentialsByModule(
|
|
231
|
-
'twilio',
|
|
232
|
-
'org-123'
|
|
233
|
-
);
|
|
234
|
-
```
|
|
235
|
-
|
|
236
|
-
## License
|
|
237
|
-
|
|
238
|
-
Part of the Venturial Core NPM package.
|
|
1
|
+
# Workflow Module
|
|
2
|
+
|
|
3
|
+
A comprehensive workflow management module for Venturial that handles workflow creation, execution, and session management.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Workflow Management**: Create, update, and manage workflows with nodes and edges
|
|
8
|
+
- **Node Types**: Support for multiple node types (Chatbot, AI, Conditional, Twilio)
|
|
9
|
+
- **Execution Tracking**: Track workflow executions with status and data
|
|
10
|
+
- **Session Management**: Persistent sessions for multi-step workflows
|
|
11
|
+
- **Execution Modes**: Support for single-run and persistent session workflows
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install @venturialstd/workflow
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Entities
|
|
20
|
+
|
|
21
|
+
### Workflow
|
|
22
|
+
Main workflow entity containing:
|
|
23
|
+
- `name`: Workflow name
|
|
24
|
+
- `active`: Whether the workflow is active
|
|
25
|
+
- `executionMode`: `single` or `persistent`
|
|
26
|
+
- `status`: `active`, `inactive`, or `draft`
|
|
27
|
+
- Relationships to nodes, edges, executions, and sessions
|
|
28
|
+
|
|
29
|
+
### WorkflowNode
|
|
30
|
+
Represents a node in the workflow:
|
|
31
|
+
- `nodeId`: ReactFlow node identifier
|
|
32
|
+
- `type`: Node type (chatbot, ai, conditional, twilio)
|
|
33
|
+
- `actionType`: Specific trigger or action identifier
|
|
34
|
+
- `properties`: Node-specific properties (JSONB)
|
|
35
|
+
- `position`: Node position on canvas (x, y)
|
|
36
|
+
|
|
37
|
+
### WorkflowEdge
|
|
38
|
+
Represents connections between nodes:
|
|
39
|
+
- `edgeId`: ReactFlow edge identifier
|
|
40
|
+
- `source`: Source node ID
|
|
41
|
+
- `target`: Target node ID
|
|
42
|
+
- `sourceHandle` / `targetHandle`: Handle identifiers
|
|
43
|
+
|
|
44
|
+
### WorkflowExecution
|
|
45
|
+
Tracks individual workflow runs:
|
|
46
|
+
- `status`: `pending`, `running`, `completed`, `failed`, `cancelled`
|
|
47
|
+
- `sessionId`: Optional session ID for persistent workflows
|
|
48
|
+
- `currentNodeId`: Current node being executed
|
|
49
|
+
- `inputData` / `outputData` / `errorData`: Execution data
|
|
50
|
+
|
|
51
|
+
### WorkflowSession
|
|
52
|
+
Manages persistent workflow sessions:
|
|
53
|
+
- `userId`: Optional user identifier
|
|
54
|
+
- `externalId`: External identifier (phone, email, etc.)
|
|
55
|
+
- `currentNodeId`: Current node in session
|
|
56
|
+
- `context`: Session context/variables (JSONB)
|
|
57
|
+
- `history`: Array of node execution history
|
|
58
|
+
|
|
59
|
+
### WorkflowModuleCredential
|
|
60
|
+
Stores credentials for workflow modules:
|
|
61
|
+
- `moduleId`: Module identifier (e.g., 'twilio', 'ai')
|
|
62
|
+
- `name`: User-defined name for this credential set
|
|
63
|
+
- `credentials`: Encrypted credential values (JSONB)
|
|
64
|
+
- `organizationId`: Optional organization scope
|
|
65
|
+
- `userId`: Optional user scope
|
|
66
|
+
- `isActive`: Whether the credential is active
|
|
67
|
+
|
|
68
|
+
## Services
|
|
69
|
+
|
|
70
|
+
All services extend `TypeOrmCrudService` and provide CRUD operations via `@dataui/crud`.
|
|
71
|
+
|
|
72
|
+
### WorkflowService
|
|
73
|
+
- `getWorkflowsByOrganization(organizationId)`
|
|
74
|
+
- `getActiveWorkflows(organizationId?)`
|
|
75
|
+
- `activateWorkflow(workflowId)`
|
|
76
|
+
- `deactivateWorkflow(workflowId)`
|
|
77
|
+
- `getWorkflowWithNodesAndEdges(workflowId)`
|
|
78
|
+
|
|
79
|
+
### WorkflowNodeService
|
|
80
|
+
- `getNodesByWorkflowId(workflowId)`
|
|
81
|
+
- `getNodeByNodeId(workflowId, nodeId)`
|
|
82
|
+
- `updateNodeProperties(id, properties)`
|
|
83
|
+
- `updateNodePosition(id, position)`
|
|
84
|
+
|
|
85
|
+
### WorkflowEdgeService
|
|
86
|
+
- `getEdgesByWorkflowId(workflowId)`
|
|
87
|
+
- `getEdgeByEdgeId(workflowId, edgeId)`
|
|
88
|
+
- `getEdgesBySourceNode(workflowId, sourceNodeId)`
|
|
89
|
+
- `getEdgesByTargetNode(workflowId, targetNodeId)`
|
|
90
|
+
|
|
91
|
+
### WorkflowExecutionService
|
|
92
|
+
- `getExecutionsByWorkflowId(workflowId)`
|
|
93
|
+
- `getExecutionsBySessionId(sessionId)`
|
|
94
|
+
- `getActiveExecutions(workflowId?)`
|
|
95
|
+
- `startExecution(executionId)`
|
|
96
|
+
- `completeExecution(executionId, outputData?)`
|
|
97
|
+
- `failExecution(executionId, errorMessage, errorData?)`
|
|
98
|
+
- `updateCurrentNode(executionId, currentNodeId)`
|
|
99
|
+
|
|
100
|
+
### WorkflowSessionService
|
|
101
|
+
- `getSessionsByWorkflowId(workflowId)`
|
|
102
|
+
- `getActiveSessions(workflowId?)`
|
|
103
|
+
- `getSessionByExternalId(workflowId, externalId)`
|
|
104
|
+
- `getSessionByUserId(workflowId, userId)`
|
|
105
|
+
- `updateSessionContext(sessionId, context)`
|
|
106
|
+
- `addToSessionHistory(sessionId, nodeId, data?)`
|
|
107
|
+
- `deactivateSession(sessionId)`
|
|
108
|
+
|
|
109
|
+
### WorkflowModuleCredentialService
|
|
110
|
+
- `getCredentialsByModule(moduleId, organizationId?, userId?)`
|
|
111
|
+
- `getCredentialByName(moduleId, name, organizationId?, userId?)`
|
|
112
|
+
- `getActiveCredentials(moduleId, organizationId?)`
|
|
113
|
+
- `updateCredential(id, credentials)`
|
|
114
|
+
- `activateCredential(id)`
|
|
115
|
+
- `deactivateCredential(id)`
|
|
116
|
+
|
|
117
|
+
## Usage
|
|
118
|
+
|
|
119
|
+
### Import the Module
|
|
120
|
+
|
|
121
|
+
```typescript
|
|
122
|
+
import { WorkflowModule } from '@venturialstd/workflow';
|
|
123
|
+
|
|
124
|
+
@Module({
|
|
125
|
+
imports: [WorkflowModule],
|
|
126
|
+
})
|
|
127
|
+
export class AppModule {}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Use Services
|
|
131
|
+
|
|
132
|
+
```typescript
|
|
133
|
+
import { WorkflowService } from '@venturialstd/workflow';
|
|
134
|
+
|
|
135
|
+
@Injectable()
|
|
136
|
+
export class MyService {
|
|
137
|
+
constructor(private workflowService: WorkflowService) {}
|
|
138
|
+
|
|
139
|
+
async createWorkflow(data: CreateWorkflowDto) {
|
|
140
|
+
return this.workflowService.create(data);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## Constants
|
|
146
|
+
|
|
147
|
+
### Execution Modes
|
|
148
|
+
- `EXECUTION_MODE.SINGLE`: One-time execution
|
|
149
|
+
- `EXECUTION_MODE.PERSISTENT`: Maintains session state
|
|
150
|
+
|
|
151
|
+
### Node Types
|
|
152
|
+
- `NODE_TYPE.CHATBOT`
|
|
153
|
+
- `NODE_TYPE.AI`
|
|
154
|
+
- `NODE_TYPE.CONDITIONAL`
|
|
155
|
+
- `NODE_TYPE.TWILIO`
|
|
156
|
+
|
|
157
|
+
### Node Categories
|
|
158
|
+
- `NODE_CATEGORY.TRIGGER`
|
|
159
|
+
- `NODE_CATEGORY.ACTION`
|
|
160
|
+
|
|
161
|
+
### Workflow Status
|
|
162
|
+
- `WORKFLOW_STATUS.ACTIVE`
|
|
163
|
+
- `WORKFLOW_STATUS.INACTIVE`
|
|
164
|
+
- `WORKFLOW_STATUS.DRAFT`
|
|
165
|
+
|
|
166
|
+
### Execution Status
|
|
167
|
+
- `EXECUTION_STATUS.PENDING`
|
|
168
|
+
- `EXECUTION_STATUS.RUNNING`
|
|
169
|
+
- `EXECUTION_STATUS.COMPLETED`
|
|
170
|
+
- `EXECUTION_STATUS.FAILED`
|
|
171
|
+
- `EXECUTION_STATUS.CANCELLED`
|
|
172
|
+
|
|
173
|
+
## DTOs
|
|
174
|
+
|
|
175
|
+
All DTOs follow the `Create*Dto` pattern:
|
|
176
|
+
- `CreateWorkflowDto`
|
|
177
|
+
- `CreateWorkflowNodeDto`
|
|
178
|
+
- `CreateWorkflowEdgeDto`
|
|
179
|
+
- `CreateWorkflowExecutionDto`
|
|
180
|
+
- `CreateWorkflowSessionDto`
|
|
181
|
+
- `CreateWorkflowModuleCredentialDto`
|
|
182
|
+
- `UpdateWorkflowModuleCredentialDto`
|
|
183
|
+
|
|
184
|
+
## Database Schema
|
|
185
|
+
|
|
186
|
+
The module uses PostgreSQL with JSONB columns for flexible data storage:
|
|
187
|
+
- Node properties stored as JSONB
|
|
188
|
+
- Edge data stored as JSONB
|
|
189
|
+
- Execution input/output/error data as JSONB
|
|
190
|
+
- Session context and history as JSONB
|
|
191
|
+
- Module credentials stored as JSONB (should be encrypted at application level)
|
|
192
|
+
|
|
193
|
+
## Module Credentials
|
|
194
|
+
|
|
195
|
+
Each module can define required credential fields. Users can create multiple credential sets per module:
|
|
196
|
+
|
|
197
|
+
### Defining Credential Fields in Modules
|
|
198
|
+
|
|
199
|
+
Modules can define `credentialFields` in their module definition:
|
|
200
|
+
|
|
201
|
+
```typescript
|
|
202
|
+
credentialFields: [
|
|
203
|
+
{
|
|
204
|
+
id: 'apiKey',
|
|
205
|
+
name: 'API Key',
|
|
206
|
+
description: 'API key for the service',
|
|
207
|
+
type: FIELD_TYPE.STRING,
|
|
208
|
+
validation: { required: true },
|
|
209
|
+
sensitive: true, // Will be encrypted/masked
|
|
210
|
+
required: true,
|
|
211
|
+
},
|
|
212
|
+
]
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### Managing Credentials
|
|
216
|
+
|
|
217
|
+
```typescript
|
|
218
|
+
// Create credentials for a module
|
|
219
|
+
const credential = await credentialService.create({
|
|
220
|
+
moduleId: 'twilio',
|
|
221
|
+
name: 'Production Twilio',
|
|
222
|
+
credentials: {
|
|
223
|
+
accountSid: 'AC...',
|
|
224
|
+
authToken: '...',
|
|
225
|
+
},
|
|
226
|
+
organizationId: 'org-123',
|
|
227
|
+
});
|
|
228
|
+
|
|
229
|
+
// Get all credentials for a module
|
|
230
|
+
const credentials = await credentialService.getCredentialsByModule(
|
|
231
|
+
'twilio',
|
|
232
|
+
'org-123'
|
|
233
|
+
);
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
## License
|
|
237
|
+
|
|
238
|
+
Part of the Venturial Core NPM package.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow.constant.d.ts","sourceRoot":"","sources":["../../src/constants/workflow.constant.ts"],"names":[],"mappings":"AAAA,oBAAY,cAAc;IACxB,MAAM,WAAW;IACjB,UAAU,eAAe;CAC1B;AAED,oBAAY,SAAS;IACnB,OAAO,YAAY;IACnB,EAAE,OAAO;IACT,WAAW,gBAAgB;IAC3B,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAED,oBAAY,eAAe;IACzB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,KAAK,UAAU;CAChB;AAED,oBAAY,gBAAgB;IAC1B,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,MAAM,WAAW;IACjB,SAAS,cAAc;CACxB
|
|
1
|
+
{"version":3,"file":"workflow.constant.d.ts","sourceRoot":"","sources":["../../src/constants/workflow.constant.ts"],"names":[],"mappings":"AAAA,oBAAY,cAAc;IACxB,MAAM,WAAW;IACjB,UAAU,eAAe;CAC1B;AAED,oBAAY,SAAS;IACnB,OAAO,YAAY;IACnB,EAAE,OAAO;IACT,WAAW,gBAAgB;IAC3B,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAED,oBAAY,eAAe;IACzB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,KAAK,UAAU;CAChB;AAED,oBAAY,gBAAgB;IAC1B,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,MAAM,WAAW;IACjB,SAAS,cAAc;CACxB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.EXECUTION_STATUS = exports.WORKFLOW_STATUS = exports.NODE_TYPE = exports.EXECUTION_MODE = void 0;
|
|
4
4
|
var EXECUTION_MODE;
|
|
5
5
|
(function (EXECUTION_MODE) {
|
|
6
6
|
EXECUTION_MODE["SINGLE"] = "single";
|
|
@@ -28,10 +28,4 @@ var EXECUTION_STATUS;
|
|
|
28
28
|
EXECUTION_STATUS["FAILED"] = "failed";
|
|
29
29
|
EXECUTION_STATUS["CANCELLED"] = "cancelled";
|
|
30
30
|
})(EXECUTION_STATUS || (exports.EXECUTION_STATUS = EXECUTION_STATUS = {}));
|
|
31
|
-
var WORKFLOW_USER_ROLE;
|
|
32
|
-
(function (WORKFLOW_USER_ROLE) {
|
|
33
|
-
WORKFLOW_USER_ROLE["OWNER"] = "owner";
|
|
34
|
-
WORKFLOW_USER_ROLE["EDITOR"] = "editor";
|
|
35
|
-
WORKFLOW_USER_ROLE["VIEWER"] = "viewer";
|
|
36
|
-
})(WORKFLOW_USER_ROLE || (exports.WORKFLOW_USER_ROLE = WORKFLOW_USER_ROLE = {}));
|
|
37
31
|
//# sourceMappingURL=workflow.constant.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow.constant.js","sourceRoot":"","sources":["../../src/constants/workflow.constant.ts"],"names":[],"mappings":";;;AAAA,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,mCAAiB,CAAA;IACjB,2CAAyB,CAAA;AAC3B,CAAC,EAHW,cAAc,8BAAd,cAAc,QAGzB;AAED,IAAY,SAMX;AAND,WAAY,SAAS;IACnB,gCAAmB,CAAA;IACnB,sBAAS,CAAA;IACT,wCAA2B,CAAA;IAC3B,8BAAiB,CAAA;IACjB,gCAAmB,CAAA;AACrB,CAAC,EANW,SAAS,yBAAT,SAAS,QAMpB;AAED,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,oCAAiB,CAAA;IACjB,wCAAqB,CAAA;IACrB,kCAAe,CAAA;AACjB,CAAC,EAJW,eAAe,+BAAf,eAAe,QAI1B;AAED,IAAY,gBAMX;AAND,WAAY,gBAAgB;IAC1B,uCAAmB,CAAA;IACnB,uCAAmB,CAAA;IACnB,2CAAuB,CAAA;IACvB,qCAAiB,CAAA;IACjB,2CAAuB,CAAA;AACzB,CAAC,EANW,gBAAgB,gCAAhB,gBAAgB,QAM3B
|
|
1
|
+
{"version":3,"file":"workflow.constant.js","sourceRoot":"","sources":["../../src/constants/workflow.constant.ts"],"names":[],"mappings":";;;AAAA,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,mCAAiB,CAAA;IACjB,2CAAyB,CAAA;AAC3B,CAAC,EAHW,cAAc,8BAAd,cAAc,QAGzB;AAED,IAAY,SAMX;AAND,WAAY,SAAS;IACnB,gCAAmB,CAAA;IACnB,sBAAS,CAAA;IACT,wCAA2B,CAAA;IAC3B,8BAAiB,CAAA;IACjB,gCAAmB,CAAA;AACrB,CAAC,EANW,SAAS,yBAAT,SAAS,QAMpB;AAED,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,oCAAiB,CAAA;IACjB,wCAAqB,CAAA;IACrB,kCAAe,CAAA;AACjB,CAAC,EAJW,eAAe,+BAAf,eAAe,QAI1B;AAED,IAAY,gBAMX;AAND,WAAY,gBAAgB;IAC1B,uCAAmB,CAAA;IACnB,uCAAmB,CAAA;IACnB,2CAAuB,CAAA;IACvB,qCAAiB,CAAA;IACjB,2CAAuB,CAAA;AACzB,CAAC,EANW,gBAAgB,gCAAhB,gBAAgB,QAM3B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ApplyBulkCredentialUpdatesDto } from '../dtos/apply-bulk-credential-updates.dto';
|
|
2
|
+
import { BulkCredentialApplyResult, DistinctModuleInfo, WorkflowBulkCredentialService } from '../services/workflow-bulk-credential.service';
|
|
3
|
+
export declare class WorkflowBulkCredentialController {
|
|
4
|
+
private readonly workflowBulkCredentialService;
|
|
5
|
+
constructor(workflowBulkCredentialService: WorkflowBulkCredentialService);
|
|
6
|
+
getDistinctModules(workflowId: string): Promise<DistinctModuleInfo[]>;
|
|
7
|
+
applyBulkCredentialUpdates(workflowId: string, body: ApplyBulkCredentialUpdatesDto): Promise<BulkCredentialApplyResult>;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=workflow-bulk-credential.controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-bulk-credential.controller.d.ts","sourceRoot":"","sources":["../../src/controllers/workflow-bulk-credential.controller.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,6BAA6B,EAAE,MAAM,2CAA2C,CAAC;AAC1F,OAAO,EACL,yBAAyB,EACzB,kBAAkB,EAClB,6BAA6B,EAC9B,MAAM,8CAA8C,CAAC;AAEtD,qBAEa,gCAAgC;IAC/B,OAAO,CAAC,QAAQ,CAAC,6BAA6B;gBAA7B,6BAA6B,EAAE,6BAA6B;IAMnF,kBAAkB,CACD,UAAU,EAAE,MAAM,GACtC,OAAO,CAAC,kBAAkB,EAAE,CAAC;IAQ1B,0BAA0B,CACT,UAAU,EAAE,MAAM,EAC/B,IAAI,EAAE,6BAA6B,GAC1C,OAAO,CAAC,yBAAyB,CAAC;CAMtC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.WorkflowBulkCredentialController = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
18
|
+
const apply_bulk_credential_updates_dto_1 = require("../dtos/apply-bulk-credential-updates.dto");
|
|
19
|
+
const workflow_bulk_credential_service_1 = require("../services/workflow-bulk-credential.service");
|
|
20
|
+
let WorkflowBulkCredentialController = class WorkflowBulkCredentialController {
|
|
21
|
+
workflowBulkCredentialService;
|
|
22
|
+
constructor(workflowBulkCredentialService) {
|
|
23
|
+
this.workflowBulkCredentialService = workflowBulkCredentialService;
|
|
24
|
+
}
|
|
25
|
+
async getDistinctModules(workflowId) {
|
|
26
|
+
return this.workflowBulkCredentialService.getDistinctModulesByWorkflowId(workflowId);
|
|
27
|
+
}
|
|
28
|
+
async applyBulkCredentialUpdates(workflowId, body) {
|
|
29
|
+
return this.workflowBulkCredentialService.applyBulkCredentialUpdates(workflowId, body.updates.map((u) => ({ moduleKey: u.moduleKey, credentialId: u.credentialId })));
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
exports.WorkflowBulkCredentialController = WorkflowBulkCredentialController;
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, common_1.Get)(':workflowId/distinct-modules'),
|
|
35
|
+
(0, swagger_1.ApiOperation)({ summary: 'Get distinct modules used in a workflow' }),
|
|
36
|
+
(0, swagger_1.ApiResponse)({ status: 200, description: 'List of distinct modules with node counts and current credential' }),
|
|
37
|
+
(0, swagger_1.ApiResponse)({ status: 404, description: 'Workflow not found' }),
|
|
38
|
+
__param(0, (0, common_1.Param)('workflowId')),
|
|
39
|
+
__metadata("design:type", Function),
|
|
40
|
+
__metadata("design:paramtypes", [String]),
|
|
41
|
+
__metadata("design:returntype", Promise)
|
|
42
|
+
], WorkflowBulkCredentialController.prototype, "getDistinctModules", null);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, common_1.Post)(':workflowId/apply'),
|
|
45
|
+
(0, swagger_1.ApiOperation)({ summary: 'Apply bulk credential updates to workflow nodes' }),
|
|
46
|
+
(0, swagger_1.ApiResponse)({ status: 200, description: 'Bulk update result with updated count and optional failed nodes' }),
|
|
47
|
+
(0, swagger_1.ApiResponse)({ status: 400, description: 'Invalid request' }),
|
|
48
|
+
__param(0, (0, common_1.Param)('workflowId')),
|
|
49
|
+
__param(1, (0, common_1.Body)()),
|
|
50
|
+
__metadata("design:type", Function),
|
|
51
|
+
__metadata("design:paramtypes", [String, apply_bulk_credential_updates_dto_1.ApplyBulkCredentialUpdatesDto]),
|
|
52
|
+
__metadata("design:returntype", Promise)
|
|
53
|
+
], WorkflowBulkCredentialController.prototype, "applyBulkCredentialUpdates", null);
|
|
54
|
+
exports.WorkflowBulkCredentialController = WorkflowBulkCredentialController = __decorate([
|
|
55
|
+
(0, swagger_1.ApiTags)('workflow/workflow-bulk-credential'),
|
|
56
|
+
(0, common_1.Controller)('workflow/workflow-bulk-credential'),
|
|
57
|
+
__metadata("design:paramtypes", [workflow_bulk_credential_service_1.WorkflowBulkCredentialService])
|
|
58
|
+
], WorkflowBulkCredentialController);
|
|
59
|
+
//# sourceMappingURL=workflow-bulk-credential.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-bulk-credential.controller.js","sourceRoot":"","sources":["../../src/controllers/workflow-bulk-credential.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAoE;AACpE,6CAAqE;AAErE,iGAA0F;AAC1F,mGAIsD;AAI/C,IAAM,gCAAgC,GAAtC,MAAM,gCAAgC;IACd;IAA7B,YAA6B,6BAA4D;QAA5D,kCAA6B,GAA7B,6BAA6B,CAA+B;IAAI,CAAC;IAMxF,AAAN,KAAK,CAAC,kBAAkB,CACD,UAAkB;QAEvC,OAAO,IAAI,CAAC,6BAA6B,CAAC,8BAA8B,CAAC,UAAU,CAAC,CAAC;IACvF,CAAC;IAMK,AAAN,KAAK,CAAC,0BAA0B,CACT,UAAkB,EAC/B,IAAmC;QAE3C,OAAO,IAAI,CAAC,6BAA6B,CAAC,0BAA0B,CAClE,UAAU,EACV,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,SAAS,EAAE,YAAY,EAAE,CAAC,CAAC,YAAY,EAAE,CAAC,CAAC,CACpF,CAAC;IACJ,CAAC;CACF,CAAA;AA1BY,4EAAgC;AAOrC;IAJL,IAAA,YAAG,EAAC,8BAA8B,CAAC;IACnC,IAAA,sBAAY,EAAC,EAAE,OAAO,EAAE,yCAAyC,EAAE,CAAC;IACpE,IAAA,qBAAW,EAAC,EAAE,MAAM,EAAE,GAAG,EAAE,WAAW,EAAE,kEAAkE,EAAE,CAAC;IAC7G,IAAA,qBAAW,EAAC,EAAE,MAAM,EAAE,GAAG,EAAE,WAAW,EAAE,oBAAoB,EAAE,CAAC;IAE7D,WAAA,IAAA,cAAK,EAAC,YAAY,CAAC,CAAA;;;;0EAGrB;AAMK;IAJL,IAAA,aAAI,EAAC,mBAAmB,CAAC;IACzB,IAAA,sBAAY,EAAC,EAAE,OAAO,EAAE,iDAAiD,EAAE,CAAC;IAC5E,IAAA,qBAAW,EAAC,EAAE,MAAM,EAAE,GAAG,EAAE,WAAW,EAAE,iEAAiE,EAAE,CAAC;IAC5G,IAAA,qBAAW,EAAC,EAAE,MAAM,EAAE,GAAG,EAAE,WAAW,EAAE,iBAAiB,EAAE,CAAC;IAE1D,WAAA,IAAA,cAAK,EAAC,YAAY,CAAC,CAAA;IACnB,WAAA,IAAA,aAAI,GAAE,CAAA;;6CAAO,iEAA6B;;kFAM5C;2CAzBU,gCAAgC;IAF5C,IAAA,iBAAO,EAAC,mCAAmC,CAAC;IAC5C,IAAA,mBAAU,EAAC,mCAAmC,CAAC;qCAEc,gEAA6B;GAD9E,gCAAgC,CA0B5C"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { WorkflowHistoryService } from '../services/workflow-history.service';
|
|
2
|
+
export declare class WorkflowHistoryController {
|
|
3
|
+
private readonly workflowHistoryService;
|
|
4
|
+
constructor(workflowHistoryService: WorkflowHistoryService);
|
|
5
|
+
saveVersion(workflowId: string, body: {
|
|
6
|
+
createdBy: string;
|
|
7
|
+
name: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
}): Promise<import("../entities/workflow-history.entity").WorkflowHistory>;
|
|
10
|
+
getVersions(workflowId: string, limit?: number, offset?: number): Promise<{
|
|
11
|
+
data: import("../entities/workflow-history.entity").WorkflowHistory[];
|
|
12
|
+
total: number;
|
|
13
|
+
limit: number;
|
|
14
|
+
offset: number;
|
|
15
|
+
}>;
|
|
16
|
+
getVersion(versionId: string): Promise<import("../entities/workflow-history.entity").WorkflowHistory>;
|
|
17
|
+
getVersionByNumber(workflowId: string, versionNumber: number): Promise<import("../entities/workflow-history.entity").WorkflowHistory>;
|
|
18
|
+
restoreVersion(versionId: string, body: {
|
|
19
|
+
restoredBy: string;
|
|
20
|
+
createNewVersion?: boolean;
|
|
21
|
+
}): Promise<import("..").Workflow>;
|
|
22
|
+
compareVersions(versionId1: string, versionId2: string, workflowId?: string): Promise<{
|
|
23
|
+
version1: import("../entities/workflow-history.entity").WorkflowHistory | "current";
|
|
24
|
+
version2: import("../entities/workflow-history.entity").WorkflowHistory | "current";
|
|
25
|
+
summary: {
|
|
26
|
+
workflowChanges: string[];
|
|
27
|
+
nodesAdded: number;
|
|
28
|
+
nodesRemoved: number;
|
|
29
|
+
nodesModified: number;
|
|
30
|
+
edgesAdded: number;
|
|
31
|
+
edgesRemoved: number;
|
|
32
|
+
edgesModified: number;
|
|
33
|
+
};
|
|
34
|
+
}>;
|
|
35
|
+
compareWithCurrent(workflowId: string, versionId: string): Promise<{
|
|
36
|
+
version: import("../entities/workflow-history.entity").WorkflowHistory;
|
|
37
|
+
current: import("../entities/workflow-history.entity").WorkflowHistory["snapshot"];
|
|
38
|
+
summary: {
|
|
39
|
+
workflowChanges: string[];
|
|
40
|
+
nodesAdded: number;
|
|
41
|
+
nodesRemoved: number;
|
|
42
|
+
nodesModified: number;
|
|
43
|
+
edgesAdded: number;
|
|
44
|
+
edgesRemoved: number;
|
|
45
|
+
edgesModified: number;
|
|
46
|
+
};
|
|
47
|
+
}>;
|
|
48
|
+
deleteVersion(versionId: string, body: {
|
|
49
|
+
deletedBy: string;
|
|
50
|
+
}): Promise<{
|
|
51
|
+
success: boolean;
|
|
52
|
+
message: string;
|
|
53
|
+
}>;
|
|
54
|
+
deleteVersions(body: {
|
|
55
|
+
versionIds: string[];
|
|
56
|
+
deletedBy: string;
|
|
57
|
+
}): Promise<{
|
|
58
|
+
success: boolean;
|
|
59
|
+
deleted: number;
|
|
60
|
+
failed: number;
|
|
61
|
+
errors: Array<{
|
|
62
|
+
versionId: string;
|
|
63
|
+
error: string;
|
|
64
|
+
}>;
|
|
65
|
+
}>;
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=workflow-history.controller.d.ts.map
|