Add workflow statuses (#6765)

Following figma updates
https://www.figma.com/design/PNBfTgOVraw557OXChYagk/Explo?node-id=21872-7929&t=DOUzd6rzwr6lprcs-0

- No activity targets for workflow entities for now
- Adding a direct relation between workflow run et workflow
- Adding a status on the version (draft, active, deactivated)
- Adding a list of statuses on workflow 
- publishedVersionId => lastPublishedVersionId

Also adding:
- the endpoint to deactivate a version
This commit is contained in:
Thomas Trompette
2024-08-28 14:53:25 +02:00
committed by GitHub
parent da23ca3c23
commit ff1adb06b2
25 changed files with 419 additions and 289 deletions

View File

@ -19,6 +19,7 @@ export class WorkflowTriggerGraphqlApiExceptionFilter
case WorkflowTriggerExceptionCode.INVALID_WORKFLOW_VERSION:
case WorkflowTriggerExceptionCode.INVALID_ACTION_TYPE:
case WorkflowTriggerExceptionCode.INVALID_WORKFLOW_TRIGGER:
case WorkflowTriggerExceptionCode.FORBIDDEN:
throw new UserInputError(exception.message);
default:
throw new InternalServerError(exception.message);

View File

@ -27,6 +27,15 @@ export class WorkflowTriggerResolver {
);
}
@Mutation(() => Boolean)
async disableWorkflowTrigger(
@Args('workflowVersionId') workflowVersionId: string,
) {
return await this.workflowTriggerWorkspaceService.disableWorkflowTrigger(
workflowVersionId,
);
}
@Mutation(() => WorkflowRunDTO)
async runWorkflowVersion(
@AuthWorkspaceMemberId() workspaceMemberId: string,