IG-770 - Endpoints for Add/Edit/Delete workflow definitions
Created by: RobinKavPA
PR
Add CRUD endpoints for creating new workflow definitions, edit existing workflows that are not in use (no active applications) and delete workflows that are not in use.
Solution
- Updated DAR model to include reference to workflow definition by _id, also includes workflow object mapped to the workflow definition schema for storing a static version of the workflow attached
- Added endpoint to get all workflows for a publisher
- Added generic team function to detect if a user is in a given role for a given team
- Added create, edit, delete endpoints for workflows
- Added workflow model with separate workflow and step schemas for nested validation rules