From 56d7c5f74d911a63c9be3b4532e02cf68dd155f5 Mon Sep 17 00:00:00 2001 From: Ivica Cardic Date: Thu, 14 Nov 2024 08:46:16 +0100 Subject: [PATCH 01/18] 440 - Optimize --- .../platform/configuration/facade/WorkflowFacadeImpl.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server/libs/platform/platform-configuration/platform-configuration-service/src/main/java/com/bytechef/platform/configuration/facade/WorkflowFacadeImpl.java b/server/libs/platform/platform-configuration/platform-configuration-service/src/main/java/com/bytechef/platform/configuration/facade/WorkflowFacadeImpl.java index 0752b90e30c..788d21c6f32 100644 --- a/server/libs/platform/platform-configuration/platform-configuration-service/src/main/java/com/bytechef/platform/configuration/facade/WorkflowFacadeImpl.java +++ b/server/libs/platform/platform-configuration/platform-configuration-service/src/main/java/com/bytechef/platform/configuration/facade/WorkflowFacadeImpl.java @@ -59,13 +59,15 @@ public void update(String id, String definition, Integer version) { private WorkflowDTO toWorkflowDTO(Workflow workflow) { List workflowTaskDTOs = new ArrayList<>(); - for (WorkflowTask workflowTask : workflow.getAllTasks()) { + List allTasks = workflow.getAllTasks(); + + for (WorkflowTask workflowTask : allTasks) { workflowTaskDTOs.add( new WorkflowTaskDTO( workflowTask, workflowConnectionFacade.getWorkflowConnections( CollectionUtils.getFirst( - workflow.getAllTasks(), + allTasks, curWorkflowTask -> Objects.equals(curWorkflowTask.getName(), workflowTask.getName()))), DataStream.of(workflowTask.getExtensions()))); } From e5ada43b438ddf8a12b4b542fc8cfaa18fe923b7 Mon Sep 17 00:00:00 2001 From: Ivica Cardic Date: Thu, 14 Nov 2024 08:47:05 +0100 Subject: [PATCH 02/18] 206 - Remove duplicate component names --- .../web/rest/mapper/util/WorkflowMapperUtils.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/util/WorkflowMapperUtils.java b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/util/WorkflowMapperUtils.java index d43c944bc3a..f445adfbb57 100644 --- a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/util/WorkflowMapperUtils.java +++ b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/util/WorkflowMapperUtils.java @@ -22,7 +22,9 @@ import com.bytechef.platform.configuration.dto.WorkflowTriggerDTO; import com.bytechef.platform.configuration.web.rest.model.WorkflowModelAware; import com.bytechef.platform.definition.WorkflowNodeType; +import java.util.ArrayList; import java.util.List; +import java.util.stream.Collectors; /** * @author Ivica Cardic @@ -38,11 +40,12 @@ public static void afterMapping( (int) getWorkflowTriggerConnectionsCount(workflowTriggerDTOs)); workflowModel.setInputsCount(CollectionUtils.size(inputs)); workflowModel.setWorkflowTaskComponentNames( - workflowTaskDTOs - .stream() - .map(workflowTask -> WorkflowNodeType.ofType(workflowTask.getType())) - .map(WorkflowNodeType::componentName) - .toList()); + new ArrayList<>( + workflowTaskDTOs + .stream() + .map(workflowTask -> WorkflowNodeType.ofType(workflowTask.getType())) + .map(WorkflowNodeType::componentName) + .collect(Collectors.toSet()))); List workflowTriggerComponentNames = workflowTriggerDTOs.stream() .map(workflowTrigger -> WorkflowNodeType.ofType(workflowTrigger.type())) From 27ff5777a35eeae32d62a3860e07c937fd51c27b Mon Sep 17 00:00:00 2001 From: Ivica Cardic Date: Thu, 14 Nov 2024 08:47:29 +0100 Subject: [PATCH 03/18] 1070 - Remove unused --- .../configuration/web/rest/model/WorkflowModelAware.java | 2 -- .../platform-configuration-rest-impl/openapi.yaml | 4 ---- 2 files changed, 6 deletions(-) diff --git a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/model/WorkflowModelAware.java b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/model/WorkflowModelAware.java index dbdd11be2f3..5df3f0363a2 100644 --- a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/model/WorkflowModelAware.java +++ b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/model/WorkflowModelAware.java @@ -27,8 +27,6 @@ public interface WorkflowModelAware { void setConnectionsCount(Integer connectionsCount); -// void setManualTrigger(Boolean manual); - void setWorkflowTaskComponentNames(List workflowTaskComponentNames); void setWorkflowTriggerComponentNames(List workflowTriggerComponentNames); diff --git a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-impl/openapi.yaml b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-impl/openapi.yaml index 8f252ff79bd..e7c4e34ae8c 100644 --- a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-impl/openapi.yaml +++ b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-impl/openapi.yaml @@ -2036,10 +2036,6 @@ components: type: "integer" format: "int32" readOnly: true -# manualTrigger: -# description: "Does this workflow have a manual trigger or not" -# type: "boolean" -# readOnly: true workflowTaskComponentNames: type: "array" items: From c63345b294cf417e0673876bd6c81041cb0b7463 Mon Sep 17 00:00:00 2001 From: Ivica Cardic Date: Fri, 15 Nov 2024 06:14:09 +0100 Subject: [PATCH 04/18] 723 - Show property values when hovering over a node --- ...TaskDispatcherDefinitionServiceClient.java | 9 +- .../util/WorkflowNodeDescriptionUtils.java | 93 +++++++++++++++++++ .../service/ActionDefinitionServiceImpl.java | 17 +--- .../service/TriggerDefinitionServiceImpl.java | 21 +---- .../WorkflowNodeDescriptionFacadeImpl.java | 22 +++-- .../TaskDispatcherDefinitionService.java | 6 +- .../TaskDispatcherDefinitionServiceImpl.java | 16 +++- 7 files changed, 141 insertions(+), 43 deletions(-) create mode 100644 server/libs/platform/platform-api/src/main/java/com/bytechef/platform/util/WorkflowNodeDescriptionUtils.java diff --git a/server/ee/libs/platform/platform-workflow/platform-workflow-task-dispatcher/platform-workflow-task-dispatcher-registry/platform-workflow-task-dispatcher-registry-remote-client/src/main/java/com/bytechef/ee/platform/workflow/task/dispatcher/registry/remote/client/service/RemoteTaskDispatcherDefinitionServiceClient.java b/server/ee/libs/platform/platform-workflow/platform-workflow-task-dispatcher/platform-workflow-task-dispatcher-registry/platform-workflow-task-dispatcher-registry-remote-client/src/main/java/com/bytechef/ee/platform/workflow/task/dispatcher/registry/remote/client/service/RemoteTaskDispatcherDefinitionServiceClient.java index 2754607d6ac..f5841300589 100644 --- a/server/ee/libs/platform/platform-workflow/platform-workflow-task-dispatcher/platform-workflow-task-dispatcher-registry/platform-workflow-task-dispatcher-registry-remote-client/src/main/java/com/bytechef/ee/platform/workflow/task/dispatcher/registry/remote/client/service/RemoteTaskDispatcherDefinitionServiceClient.java +++ b/server/ee/libs/platform/platform-workflow/platform-workflow-task-dispatcher/platform-workflow-task-dispatcher-registry/platform-workflow-task-dispatcher-registry-remote-client/src/main/java/com/bytechef/ee/platform/workflow/task/dispatcher/registry/remote/client/service/RemoteTaskDispatcherDefinitionServiceClient.java @@ -37,7 +37,7 @@ public RemoteTaskDispatcherDefinitionServiceClient(LoadBalancedRestClient loadBa @Override public OutputResponse executeOutputSchema( - String name, int version, Map inputParameters) { + String name, int version, Map inputParameters) { return loadBalancedRestClient.post( uriBuilder -> uriBuilder @@ -50,7 +50,12 @@ public OutputResponse executeOutputSchema( } @Override - public TaskDispatcherDefinition getTaskDispatcherDefinition(String name, Integer version) { + public String executeWorkflowNodeDescription(String name, int version, Map inputParameters) { + throw new UnsupportedOperationException(); + } + + @Override + public TaskDispatcherDefinition getTaskDispatcherDefinition(String name, int version) { return loadBalancedRestClient.get( uriBuilder -> uriBuilder .host(COORDINATOR_APP) diff --git a/server/libs/platform/platform-api/src/main/java/com/bytechef/platform/util/WorkflowNodeDescriptionUtils.java b/server/libs/platform/platform-api/src/main/java/com/bytechef/platform/util/WorkflowNodeDescriptionUtils.java new file mode 100644 index 00000000000..51e96e827c3 --- /dev/null +++ b/server/libs/platform/platform-api/src/main/java/com/bytechef/platform/util/WorkflowNodeDescriptionUtils.java @@ -0,0 +1,93 @@ +/* + * Copyright 2023-present ByteChef Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.bytechef.platform.util; + +import java.util.Map; + +/** + * @author Ivica Cardic + */ +public class WorkflowNodeDescriptionUtils { + + public static String renderComponentProperties( + Map inputParameters, String componentTile, String operationTitle) { + + StringBuilder sb = new StringBuilder(); + renderProperties(null, inputParameters, sb); + + return """ +
%n\ +
%n\ +
Component:
%n\ +
%s%n\ +
%n\ +
Action:
%n\ +
%s
%n\ +
%n\ +
%n\ +
Properties:
%n\ +
%n\ +
%n\ + %s%n\ +
%n\ + """.formatted(componentTile, operationTitle, sb); + } + + public static String renderTaskDispatcherProperties(Map inputParameters, String taskDispatcherTitle) { + StringBuilder sb = new StringBuilder(); + + renderProperties(null, inputParameters, sb); + + return """ +
%n\ +
%n\ +
Flow Control:
%n\ +
%s
%n\ +
%n\ +
%n\ +
Properties:
%n\ +
%n\ +
%n\ + %s%n\ +
%n\ + """.formatted(taskDispatcherTitle, ""); // TODO render properties only for the current task dispatcher + } + + private static void renderProperties(String namePrefix, Map parameterMap, StringBuilder sb) { + for (Map.Entry entry : parameterMap.entrySet()) { + String name = (String) entry.getKey(); + + if (namePrefix != null) { + name = namePrefix + "." + name; + } + + if (entry.getValue() instanceof Map map) { + renderProperties(name, map, sb); + + continue; + } + + sb.append(""" +
%n\ +
%s:
%n\ +
%s
%n\ +
%n\ + """.formatted(name, entry.getValue())); + } + } +} diff --git a/server/libs/platform/platform-component/platform-component-service/src/main/java/com/bytechef/platform/component/service/ActionDefinitionServiceImpl.java b/server/libs/platform/platform-component/platform-component-service/src/main/java/com/bytechef/platform/component/service/ActionDefinitionServiceImpl.java index 7925d0cb436..fd490bbb471 100644 --- a/server/libs/platform/platform-component/platform-component-service/src/main/java/com/bytechef/platform/component/service/ActionDefinitionServiceImpl.java +++ b/server/libs/platform/platform-component/platform-component-service/src/main/java/com/bytechef/platform/component/service/ActionDefinitionServiceImpl.java @@ -49,6 +49,7 @@ import com.bytechef.platform.component.exception.ComponentExecutionException; import com.bytechef.platform.registry.domain.OutputResponse; import com.bytechef.platform.registry.util.SchemaUtils; +import com.bytechef.platform.util.WorkflowNodeDescriptionUtils; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.List; import java.util.Map; @@ -336,7 +337,6 @@ private ActionPropertiesFunction getComponentPropertiesFunction( PropertiesDataSource propertiesDataSource = dynamicPropertiesProperty.getDynamicPropertiesDataSource(); return (ActionPropertiesFunction) propertiesDataSource.getProperties(); - } private ActionWorkflowNodeDescriptionFunction getWorkflowNodeDescriptionFunction( @@ -355,18 +355,9 @@ private ActionWorkflowNodeDescriptionFunction getWorkflowNodeDescriptionFunction componentDefinitionRegistry.getActionDefinition(componentName, componentVersion, actionName); return actionDefinition.getWorkflowNodeDescription() - .orElse((inputParameters, context) -> getComponentTitle(componentDefinition) + ": " + - getActionTitle(actionDefinition)); - } - - private static String getActionTitle(com.bytechef.component.definition.ActionDefinition actionDefinition) { - return actionDefinition.getTitle() - .orElse(actionDefinition.getName()); - } - - private static String getComponentTitle(ComponentDefinition componentDefinition) { - return componentDefinition.getTitle() - .orElse(componentDefinition.getName()); + .orElse((inputParameters, context) -> WorkflowNodeDescriptionUtils.renderComponentProperties( + inputParameters, OptionalUtils.orElse(componentDefinition.getTitle(), componentDefinition.getName()), + OptionalUtils.orElse(actionDefinition.getTitle(), actionDefinition.getName()))); } private static Map getLookupDependsOnPathsMap(List lookupDependsOnPaths) { diff --git a/server/libs/platform/platform-component/platform-component-service/src/main/java/com/bytechef/platform/component/service/TriggerDefinitionServiceImpl.java b/server/libs/platform/platform-component/platform-component-service/src/main/java/com/bytechef/platform/component/service/TriggerDefinitionServiceImpl.java index 1458165eb66..ae7d761b436 100644 --- a/server/libs/platform/platform-component/platform-component-service/src/main/java/com/bytechef/platform/component/service/TriggerDefinitionServiceImpl.java +++ b/server/libs/platform/platform-component/platform-component-service/src/main/java/com/bytechef/platform/component/service/TriggerDefinitionServiceImpl.java @@ -62,6 +62,7 @@ import com.bytechef.platform.component.trigger.WebhookRequest; import com.bytechef.platform.registry.domain.OutputResponse; import com.bytechef.platform.registry.util.SchemaUtils; +import com.bytechef.platform.util.WorkflowNodeDescriptionUtils; import com.bytechef.platform.workflow.coordinator.event.TriggerListenerEvent; import com.bytechef.platform.workflow.execution.WorkflowExecutionId; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; @@ -510,12 +511,6 @@ inputParameters, new HttpHeadersImpl(webhookRequest.headers()), .orElse(WebhookValidateResponse.ok()); } - private static String getComponentTitle(ComponentDefinition componentDefinition) { - return componentDefinition - .getTitle() - .orElse(componentDefinition.getName()); - } - private OptionsDataSource.TriggerOptionsFunction getComponentOptionsFunction( String componentName, int componentVersion, String triggerName, String propertyName, Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, @@ -588,10 +583,10 @@ private TriggerWorkflowNodeDescriptionFunction getWorkflowNodeDescriptionFunctio com.bytechef.component.definition.TriggerDefinition triggerDefinition = componentDefinitionRegistry.getTriggerDefinition(componentName, componentVersion, triggerName); - return OptionalUtils.orElse( - triggerDefinition.getWorkflowNodeDescription(), - (inputParameters, context) -> getComponentTitle(componentDefinition) + ": " + - getTriggerTitle(triggerDefinition)); + return triggerDefinition.getWorkflowNodeDescription() + .orElse((inputParameters, context) -> WorkflowNodeDescriptionUtils.renderComponentProperties( + inputParameters, OptionalUtils.orElse(componentDefinition.getTitle(), componentDefinition.getName()), + OptionalUtils.orElse(triggerDefinition.getTitle(), triggerDefinition.getName()))); } private ListenerDisableConsumer getListenerDisableConsumer( @@ -612,12 +607,6 @@ private ListenerEnableConsumer getListenerEnableConsumer( return OptionalUtils.get(triggerDefinition.getListenerEnable()); } - private static String getTriggerTitle(com.bytechef.component.definition.TriggerDefinition triggerDefinition) { - return triggerDefinition - .getTitle() - .orElse(triggerDefinition.getName()); - } - @SuppressWarnings("unchecked") private WebhookEnableOutput toDynamicWebhookEnableOutput(Map triggerState) { if (triggerState == null) { diff --git a/server/libs/platform/platform-configuration/platform-configuration-service/src/main/java/com/bytechef/platform/configuration/facade/WorkflowNodeDescriptionFacadeImpl.java b/server/libs/platform/platform-configuration/platform-configuration-service/src/main/java/com/bytechef/platform/configuration/facade/WorkflowNodeDescriptionFacadeImpl.java index 8879bd493c5..b9c30de091c 100644 --- a/server/libs/platform/platform-configuration/platform-configuration-service/src/main/java/com/bytechef/platform/configuration/facade/WorkflowNodeDescriptionFacadeImpl.java +++ b/server/libs/platform/platform-configuration/platform-configuration-service/src/main/java/com/bytechef/platform/configuration/facade/WorkflowNodeDescriptionFacadeImpl.java @@ -24,6 +24,7 @@ import com.bytechef.platform.configuration.domain.WorkflowTrigger; import com.bytechef.platform.configuration.service.WorkflowTestConfigurationService; import com.bytechef.platform.definition.WorkflowNodeType; +import com.bytechef.platform.workflow.task.dispatcher.registry.service.TaskDispatcherDefinitionService; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.Map; import org.springframework.stereotype.Service; @@ -35,26 +36,25 @@ public class WorkflowNodeDescriptionFacadeImpl implements WorkflowNodeDescriptionFacade { private final ActionDefinitionFacade actionDefinitionFacade; + private final TaskDispatcherDefinitionService taksDispatcherDefinitionService; private final TriggerDefinitionFacade triggerDefinitionFacade; private final WorkflowService workflowService; - private final WorkflowNodeOutputFacade workflowNodeOutputFacade; private final WorkflowTestConfigurationService workflowTestConfigurationService; @SuppressFBWarnings("EI") public WorkflowNodeDescriptionFacadeImpl( - ActionDefinitionFacade actionDefinitionFacade, TriggerDefinitionFacade triggerDefinitionFacade, - WorkflowService workflowService, WorkflowNodeOutputFacade workflowNodeOutputFacade, + ActionDefinitionFacade actionDefinitionFacade, TaskDispatcherDefinitionService taksDispatcherDefinitionService, + TriggerDefinitionFacade triggerDefinitionFacade, WorkflowService workflowService, WorkflowTestConfigurationService workflowTestConfigurationService) { this.actionDefinitionFacade = actionDefinitionFacade; + this.taksDispatcherDefinitionService = taksDispatcherDefinitionService; this.triggerDefinitionFacade = triggerDefinitionFacade; this.workflowService = workflowService; - this.workflowNodeOutputFacade = workflowNodeOutputFacade; this.workflowTestConfigurationService = workflowTestConfigurationService; } @Override - @SuppressWarnings("unchecked") public String getWorkflowNodeDescription(String workflowId, String workflowNodeName) { Workflow workflow = workflowService.getWorkflow(workflowId); Map inputs = workflowTestConfigurationService.getWorkflowTestConfigurationInputs(workflowId); @@ -78,9 +78,15 @@ public String getWorkflowNodeDescription(String workflowId, String workflowNodeN WorkflowNodeType workflowNodeType = WorkflowNodeType.ofType(workflowTask.getType()); - return actionDefinitionFacade.executeWorkflowNodeDescription( - workflowNodeType.componentName(), workflowNodeType.componentVersion(), - workflowNodeType.componentOperationName(), workflowTask.evaluateParameters(inputs)); + if (workflowNodeType.componentOperationName() == null) { + return taksDispatcherDefinitionService.executeWorkflowNodeDescription( + workflowNodeType.componentName(), workflowNodeType.componentVersion(), + workflowTask.evaluateParameters(inputs)); + } else { + return actionDefinitionFacade.executeWorkflowNodeDescription( + workflowNodeType.componentName(), workflowNodeType.componentVersion(), + workflowNodeType.componentOperationName(), workflowTask.evaluateParameters(inputs)); + } }); } diff --git a/server/libs/platform/platform-workflow/platform-workflow-task-dispatcher/platform-workflow-task-dispatcher-registry/platform-workflow-task-dispatcher-registry-api/src/main/java/com/bytechef/platform/workflow/task/dispatcher/registry/service/TaskDispatcherDefinitionService.java b/server/libs/platform/platform-workflow/platform-workflow-task-dispatcher/platform-workflow-task-dispatcher-registry/platform-workflow-task-dispatcher-registry-api/src/main/java/com/bytechef/platform/workflow/task/dispatcher/registry/service/TaskDispatcherDefinitionService.java index fff7eb4aa87..e64bd57c55b 100644 --- a/server/libs/platform/platform-workflow/platform-workflow-task-dispatcher/platform-workflow-task-dispatcher-registry/platform-workflow-task-dispatcher-registry-api/src/main/java/com/bytechef/platform/workflow/task/dispatcher/registry/service/TaskDispatcherDefinitionService.java +++ b/server/libs/platform/platform-workflow/platform-workflow-task-dispatcher/platform-workflow-task-dispatcher-registry/platform-workflow-task-dispatcher-registry-api/src/main/java/com/bytechef/platform/workflow/task/dispatcher/registry/service/TaskDispatcherDefinitionService.java @@ -26,9 +26,11 @@ */ public interface TaskDispatcherDefinitionService { - OutputResponse executeOutputSchema(String name, int version, Map inputParameters); + OutputResponse executeOutputSchema(String name, int version, Map inputParameters); - TaskDispatcherDefinition getTaskDispatcherDefinition(String name, Integer version); + String executeWorkflowNodeDescription(String name, int version, Map inputParameters); + + TaskDispatcherDefinition getTaskDispatcherDefinition(String name, int version); List getTaskDispatcherDefinitions(); diff --git a/server/libs/platform/platform-workflow/platform-workflow-task-dispatcher/platform-workflow-task-dispatcher-registry/platform-workflow-task-dispatcher-registry-service/src/main/java/com/bytechef/platform/workflow/task/dispatcher/registry/service/TaskDispatcherDefinitionServiceImpl.java b/server/libs/platform/platform-workflow/platform-workflow-task-dispatcher/platform-workflow-task-dispatcher-registry/platform-workflow-task-dispatcher-registry-service/src/main/java/com/bytechef/platform/workflow/task/dispatcher/registry/service/TaskDispatcherDefinitionServiceImpl.java index 7fffd764d23..3298c95256d 100644 --- a/server/libs/platform/platform-workflow/platform-workflow-task-dispatcher/platform-workflow-task-dispatcher-registry/platform-workflow-task-dispatcher-registry-service/src/main/java/com/bytechef/platform/workflow/task/dispatcher/registry/service/TaskDispatcherDefinitionServiceImpl.java +++ b/server/libs/platform/platform-workflow/platform-workflow-task-dispatcher/platform-workflow-task-dispatcher-registry/platform-workflow-task-dispatcher-registry-service/src/main/java/com/bytechef/platform/workflow/task/dispatcher/registry/service/TaskDispatcherDefinitionServiceImpl.java @@ -16,9 +16,11 @@ package com.bytechef.platform.workflow.task.dispatcher.registry.service; +import com.bytechef.commons.util.OptionalUtils; import com.bytechef.definition.BaseOutputDefinition; import com.bytechef.platform.registry.domain.OutputResponse; import com.bytechef.platform.registry.util.SchemaUtils; +import com.bytechef.platform.util.WorkflowNodeDescriptionUtils; import com.bytechef.platform.workflow.task.dispatcher.definition.OutputFunction; import com.bytechef.platform.workflow.task.dispatcher.definition.PropertyFactory; import com.bytechef.platform.workflow.task.dispatcher.registry.TaskDispatcherDefinitionRegistry; @@ -45,7 +47,7 @@ public TaskDispatcherDefinitionServiceImpl(TaskDispatcherDefinitionRegistry task @Override public OutputResponse executeOutputSchema( - @NonNull String name, int version, @NonNull Map inputParameters) { + @NonNull String name, int version, @NonNull Map inputParameters) { OutputFunction outputFunction = getOutputSchemaFunction(name, version); @@ -64,7 +66,17 @@ public OutputResponse executeOutputSchema( } @Override - public TaskDispatcherDefinition getTaskDispatcherDefinition(String name, Integer version) { + public String executeWorkflowNodeDescription(String name, int version, Map inputParameters) { + com.bytechef.platform.workflow.task.dispatcher.definition.TaskDispatcherDefinition taskDispatcherDefinition = + taskDispatcherDefinitionRegistry.getTaskDispatcherDefinition(name, version); + + return WorkflowNodeDescriptionUtils.renderTaskDispatcherProperties( + inputParameters, + OptionalUtils.orElse(taskDispatcherDefinition.getTitle(), taskDispatcherDefinition.getName())); + } + + @Override + public TaskDispatcherDefinition getTaskDispatcherDefinition(String name, int version) { return new TaskDispatcherDefinition( taskDispatcherDefinitionRegistry.getTaskDispatcherDefinition(name, version)); } From c1ed6dbb506b94ea3d80fb9ad7c52adcc7a78b20 Mon Sep 17 00:00:00 2001 From: Ivica Cardic Date: Sat, 16 Nov 2024 08:32:54 +0100 Subject: [PATCH 05/18] 723 - Show property values when hovering over a node --- .../util/WorkflowNodeDescriptionUtils.java | 37 ++++++++----------- 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/server/libs/platform/platform-api/src/main/java/com/bytechef/platform/util/WorkflowNodeDescriptionUtils.java b/server/libs/platform/platform-api/src/main/java/com/bytechef/platform/util/WorkflowNodeDescriptionUtils.java index 51e96e827c3..9f468fa81ce 100644 --- a/server/libs/platform/platform-api/src/main/java/com/bytechef/platform/util/WorkflowNodeDescriptionUtils.java +++ b/server/libs/platform/platform-api/src/main/java/com/bytechef/platform/util/WorkflowNodeDescriptionUtils.java @@ -30,18 +30,10 @@ public static String renderComponentProperties( renderProperties(null, inputParameters, sb); return """ -
%n\ -
%n\ -
Component:
%n\ -
%s%n\ -
%n\ -
Action:
%n\ -
%s
%n\ -
%n\ -
%n\ -
Properties:
%n\ -
%n\ +
%n\ +
%n\ +
%s
%n\ +
%s
%n\
%n\ %s%n\
%n\ @@ -54,14 +46,9 @@ public static String renderTaskDispatcherProperties(Map inputParamete renderProperties(null, inputParameters, sb); return """ -
%n\ -
%n\ -
Flow Control:
%n\ -
%s
%n\ -
%n\ -
%n\ -
Properties:
%n\ -
%n\ +
%n\ +
%n\ +
%s
%n\
%n\ %s%n\
%n\ @@ -69,6 +56,12 @@ public static String renderTaskDispatcherProperties(Map inputParamete } private static void renderProperties(String namePrefix, Map parameterMap, StringBuilder sb) { + if (parameterMap.isEmpty()) { + return; + } + + sb.append("
"); + for (Map.Entry entry : parameterMap.entrySet()) { String name = (String) entry.getKey(); @@ -84,10 +77,12 @@ private static void renderProperties(String namePrefix, Map parameterMap, sb.append("""
%n\ -
%s:
%n\ +
%s:
%n\
%s
%n\
%n\ """.formatted(name, entry.getValue())); } + + sb.append("
"); } } From cecc98c1584b861c6caa1b63d4262435b8a76680 Mon Sep 17 00:00:00 2001 From: Ivica Cardic Date: Sat, 16 Nov 2024 08:33:02 +0100 Subject: [PATCH 06/18] 723 - client - Add sanitizer --- .../platform/workflow-editor/nodes/WorkflowNode.tsx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/client/src/pages/platform/workflow-editor/nodes/WorkflowNode.tsx b/client/src/pages/platform/workflow-editor/nodes/WorkflowNode.tsx index 8e629219396..9b8b608cb4c 100644 --- a/client/src/pages/platform/workflow-editor/nodes/WorkflowNode.tsx +++ b/client/src/pages/platform/workflow-editor/nodes/WorkflowNode.tsx @@ -8,6 +8,7 @@ import {useQueryClient} from '@tanstack/react-query'; import {PencilIcon, TrashIcon} from 'lucide-react'; import {memo, useState} from 'react'; import {Handle, NodeProps, Position, useReactFlow} from 'reactflow'; +import sanitize from 'sanitize-html'; import {twMerge} from 'tailwind-merge'; import useNodeClickHandler from '../hooks/useNodeClick'; @@ -110,8 +111,16 @@ const WorkflowNode = ({data, id}: NodeProps) => { - - {workflowNodeDescription?.description} + + {workflowNodeDescription?.description && ( +
+ )} From b57ce777d00f325e66231ceecaf1b11092d4e39f Mon Sep 17 00:00:00 2001 From: Ivica Cardic Date: Fri, 15 Nov 2024 06:54:56 +0100 Subject: [PATCH 07/18] =?UTF-8?q?1023=20-=20Append=20=E2=80=98/api-platfor?= =?UTF-8?q?m=E2=80=99=20to=20API=20Platform=20based=20endpoin+ts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../configuration/web/rest/ApiCollectionApiController.java | 2 +- .../web/rest/ApiCollectionEndpointApiController.java | 2 +- .../configuration/web/rest/ApiCollectionTagApiController.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/ApiCollectionApiController.java b/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/ApiCollectionApiController.java index f12c2a48f71..a453d79ad6f 100644 --- a/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/ApiCollectionApiController.java +++ b/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/ApiCollectionApiController.java @@ -27,7 +27,7 @@ * @author Ivica Cardic */ @RestController -@RequestMapping("${openapi.openAPIDefinition.base-path.automation:}/internal") +@RequestMapping("${openapi.openAPIDefinition.base-path.automation:}/api-platform/internal") @ConditionalOnCoordinator public class ApiCollectionApiController implements ApiCollectionApi { diff --git a/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/ApiCollectionEndpointApiController.java b/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/ApiCollectionEndpointApiController.java index 4510227e35d..7a05ce65141 100644 --- a/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/ApiCollectionEndpointApiController.java +++ b/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/ApiCollectionEndpointApiController.java @@ -25,7 +25,7 @@ * @author Ivica Cardic */ @RestController -@RequestMapping("${openapi.openAPIDefinition.base-path.automation:}/internal") +@RequestMapping("${openapi.openAPIDefinition.base-path.automation:}/api-platform/internal") @ConditionalOnCoordinator public class ApiCollectionEndpointApiController implements ApiCollectionEndpointApi { diff --git a/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/ApiCollectionTagApiController.java b/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/ApiCollectionTagApiController.java index 0727fdaa31b..5140a2f83d2 100644 --- a/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/ApiCollectionTagApiController.java +++ b/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/ApiCollectionTagApiController.java @@ -32,7 +32,7 @@ * @author Ivica Cardic */ @RestController -@RequestMapping("${openapi.openAPIDefinition.base-path.automation:}/internal") +@RequestMapping("${openapi.openAPIDefinition.base-path.automation:}/api-platform/internal") @ConditionalOnCoordinator public class ApiCollectionTagApiController implements ApiCollectionTagApi { From 5226ba8f5a9e609c1df9f35978354774986cf5f5 Mon Sep 17 00:00:00 2001 From: Ivica Cardic Date: Fri, 15 Nov 2024 06:53:59 +0100 Subject: [PATCH 08/18] 1023 - Add API clients to separate api keys used by endpints bult by api platform from the platform endpoints --- server/apps/server-app/build.gradle.kts | 1 + .../configuration/domain/ApiClient.java | 141 +++++++++++++++++ .../service/ApiClientService.java | 33 ++++ .../openapi.yaml | 147 +++++++++++++++++- .../web/rest/ApiClientApiController.java | 98 ++++++++++++ .../web/rest/mapper/ApiClientMapper.java | 32 ++++ .../web/rest/mapper/ApiCollectionMapper.java | 18 +++ .../build.gradle.kts | 1 + .../repository/ApiClientRepository.java | 24 +++ .../service/ApiClientServiceImpl.java | 79 ++++++++++ ...on_api_platform_added_api_client_table.xml | 34 ++++ .../handler/ApiPlatformHandlerExecutor.java | 2 +- .../ApiPlatformHandlerConfiguration.java | 6 +- .../ApiPlatformHandlerExecutorImpl.java | 10 +- ...=> ApiPlatformHandlerTriggerExecutor.java} | 58 +------ ...piPlatformHandlerTriggerExecutorTest.java} | 2 +- .../build.gradle.kts | 2 - .../handler/ApiPlatformHandlerController.java | 2 +- ...ApiPlatformApiKeyAuthenticationFilter.java | 32 ---- .../build.gradle.kts | 8 + .../ApiClientAuthenticationProvider.java | 59 +++++++ ...ientAuthenticationProviderContributor.java | 35 +++++ .../ApiClientKeyAuthenticationToken.java | 37 +++++ .../filter/ApiClientAuthenticationFilter.java | 37 +++++ ...uthenticationFilterBeforeContributor.java} | 21 +-- .../IntegrationComponentDefinitionFilter.java | 2 +- .../ConnectedUserAuthenticationFilter.java | 2 +- .../build.gradle.kts | 1 - ...AbstractPublicApiAuthenticationFilter.java | 2 +- .../platform/tenant}/domain/TenantKey.java | 2 +- .../bytechef/platform/user/domain/ApiKey.java | 4 - .../platform/user/domain/SigningKey.java | 4 - .../platform-user-rest-impl/openapi.yaml | 2 +- .../user/service/ApiKeyServiceImpl.java | 4 +- .../user/service/SigningKeyServiceImpl.java | 4 +- settings.gradle.kts | 1 + 36 files changed, 812 insertions(+), 135 deletions(-) create mode 100644 server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-api/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/domain/ApiClient.java create mode 100644 server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-api/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/service/ApiClientService.java create mode 100644 server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/ApiClientApiController.java create mode 100644 server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/mapper/ApiClientMapper.java create mode 100644 server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-service/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/repository/ApiClientRepository.java create mode 100644 server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-service/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/service/ApiClientServiceImpl.java create mode 100644 server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-service/src/main/resources/config/liquibase/changelog/automation/configuration/202401114213040_automation_api_platform_added_api_client_table.xml rename server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-impl/src/main/java/com/bytechef/ee/automation/apiplatform/handler/executor/{ApiPlatformHandlerTriggerSyncExecutor.java => ApiPlatformHandlerTriggerExecutor.java} (73%) rename server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-impl/src/test/java/com/bytechef/ee/automation/apiplatform/handler/executor/{ApiPlatformHandlerTriggerSyncExecutorTest.java => ApiPlatformHandlerTriggerExecutorTest.java} (94%) delete mode 100644 server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-rest/src/main/java/com/bytechef/ee/automation/apiplatform/handler/security/web/filter/ApiPlatformApiKeyAuthenticationFilter.java create mode 100644 server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-security-web/automation-api-platform-handler-security-web-impl/build.gradle.kts create mode 100644 server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-security-web/automation-api-platform-handler-security-web-impl/src/main/java/com/bytechef/ee/automation/apiplatform/handler/security/web/authentication/ApiClientAuthenticationProvider.java create mode 100644 server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-security-web/automation-api-platform-handler-security-web-impl/src/main/java/com/bytechef/ee/automation/apiplatform/handler/security/web/authentication/ApiClientAuthenticationProviderContributor.java create mode 100644 server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-security-web/automation-api-platform-handler-security-web-impl/src/main/java/com/bytechef/ee/automation/apiplatform/handler/security/web/authentication/ApiClientKeyAuthenticationToken.java create mode 100644 server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-security-web/automation-api-platform-handler-security-web-impl/src/main/java/com/bytechef/ee/automation/apiplatform/handler/security/web/filter/ApiClientAuthenticationFilter.java rename server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/{automation-api-platform-handler-rest/src/main/java/com/bytechef/ee/automation/apiplatform/handler/security/web/filter/ApiPlatformApiKeyAuthenticationFilterBeforeContributor.java => automation-api-platform-handler-security-web/automation-api-platform-handler-security-web-impl/src/main/java/com/bytechef/ee/automation/apiplatform/handler/security/web/filter/ApiClientAuthenticationFilterBeforeContributor.java} (50%) rename server/libs/platform/{platform-user/platform-user-api/src/main/java/com/bytechef/platform/user => platform-tenant/platform-tenant-api/src/main/java/com/bytechef/platform/tenant}/domain/TenantKey.java (97%) diff --git a/server/apps/server-app/build.gradle.kts b/server/apps/server-app/build.gradle.kts index 176588806ba..8c03475ce58 100644 --- a/server/apps/server-app/build.gradle.kts +++ b/server/apps/server-app/build.gradle.kts @@ -251,6 +251,7 @@ dependencies { implementation(project(":server:ee:libs:automation:automation-api-platform:automation-api-platform-configuration:automation-api-platform-configuration-service")) implementation(project(":server:ee:libs:automation:automation-api-platform:automation-api-platform-handler:automation-api-platform-handler-rest")) implementation(project(":server:ee:libs:automation:automation-api-platform:automation-api-platform-handler:automation-api-platform-handler-impl")) + implementation(project(":server:ee:libs:automation:automation-api-platform:automation-api-platform-handler:automation-api-platform-handler-security-web:automation-api-platform-handler-security-web-impl")) implementation(project(":server:ee:libs:config:tenant-multi-data-config")) implementation(project(":server:ee:libs:config:tenant-multi-message-event-config")) implementation(project(":server:ee:libs:config:tenant-multi-security-config")) diff --git a/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-api/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/domain/ApiClient.java b/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-api/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/domain/ApiClient.java new file mode 100644 index 00000000000..4262be1501e --- /dev/null +++ b/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-api/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/domain/ApiClient.java @@ -0,0 +1,141 @@ +/* + * Copyright 2023-present ByteChef Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.bytechef.ee.automation.apiplatform.configuration.domain; + +import java.time.LocalDateTime; +import java.util.Objects; +import org.springframework.data.annotation.CreatedBy; +import org.springframework.data.annotation.CreatedDate; +import org.springframework.data.annotation.Id; +import org.springframework.data.annotation.LastModifiedBy; +import org.springframework.data.annotation.LastModifiedDate; +import org.springframework.data.relational.core.mapping.Column; +import org.springframework.data.relational.core.mapping.Table; + +/** + * @author Ivica Cardic + */ +@Table("api_client") +public class ApiClient { + + @Id + private Long id; + + @Column + private String name; + + @Column("secret_key") + private String secretKey; + + @CreatedBy + @Column("created_by") + private String createdBy; + + @Column("created_date") + @CreatedDate + private LocalDateTime createdDate; + + @Column("last_modified_by") + @LastModifiedBy + private String lastModifiedBy; + + @Column("last_modified_date") + @LastModifiedDate + private LocalDateTime lastModifiedDate; + + @Column("last_used_date") + private LocalDateTime lastUsedDate; + + public ApiClient() { + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + + if (!(o instanceof ApiClient apiClient)) { + return false; + } + + return Objects.equals(id, apiClient.id); + } + + @Override + public int hashCode() { + return getClass().hashCode(); + } + + public Long getId() { + return id; + } + + public String getName() { + return name; + } + + public String getSecretKey() { + return secretKey; + } + + public String getCreatedBy() { + return createdBy; + } + + public LocalDateTime getCreatedDate() { + return createdDate; + } + + public String getLastModifiedBy() { + return lastModifiedBy; + } + + public LocalDateTime getLastModifiedDate() { + return lastModifiedDate; + } + + public LocalDateTime getLastUsedDate() { + return lastUsedDate; + } + + public void setId(Long id) { + this.id = id; + } + + public void setName(String name) { + this.name = name; + } + + public void setSecretKey(String secretKey) { + this.secretKey = secretKey; + } + + @Override + public String toString() { + return "ApiKey{" + + "id=" + id + + ", name='" + name + '\'' + + ", secretKey='" + secretKey + '\'' + + ", createdBy='" + createdBy + '\'' + + ", createdDate=" + createdDate + + ", lastModifiedBy='" + lastModifiedBy + '\'' + + ", lastModifiedDate=" + lastModifiedDate + + ", lastUsedDate=" + lastUsedDate + + '}'; + } +} diff --git a/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-api/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/service/ApiClientService.java b/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-api/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/service/ApiClientService.java new file mode 100644 index 00000000000..428504804c4 --- /dev/null +++ b/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-api/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/service/ApiClientService.java @@ -0,0 +1,33 @@ +/* + * Copyright 2023-present ByteChef Inc. + * + * Licensed under the ByteChef Enterprise license (the "Enterprise License"); + * you may not use this file except in compliance with the Enterprise License. + */ + +package com.bytechef.ee.automation.apiplatform.configuration.service; + +import com.bytechef.ee.automation.apiplatform.configuration.domain.ApiClient; +import java.util.List; +import java.util.Optional; +import org.springframework.lang.NonNull; + +/** + * @version ee + * + * @author Ivica Cardic + */ +public interface ApiClientService { + + String create(@NonNull ApiClient apiKey); + + void delete(long id); + + Optional fetchApiClient(@NonNull String secretKey); + + ApiClient getApiClient(long id); + + List getApiClients(); + + ApiClient update(@NonNull ApiClient apiClient); +} diff --git a/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/openapi.yaml b/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/openapi.yaml index 5d20d4b337f..def538c2307 100644 --- a/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/openapi.yaml +++ b/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/openapi.yaml @@ -4,15 +4,118 @@ info: title: "The Automation API Platform Internal API" version: "1" servers: - - url: "/api/automation/internal" + - url: "/api/automation/api-platform/internal" tags: - name: "api-collection" description: "The Automation API Platform Collection Internal API" + - name: "api-client" + description: "The Automation API Platform Client Internal API" - name: "api-collection-tag" description: "The Automation API Platform Collection Tag Internal API" - name: "api-collection-endpoint" description: "The Automation API Platform Collection Endpoint Internal API" paths: + /api-clients: + get: + description: "Get API clients." + summary: "Get API clients" + tags: + - "api-client" + operationId: "getApiClients" + responses: + "200": + description: "The list of API clients." + content: + application/json: + schema: + type: "array" + items: + $ref: "#/components/schemas/ApiClient" + post: + description: "Create a new API client." + summary: "Create a new API client" + tags: + - "api-client" + operationId: "createApiClient" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ApiClient" + required: true + responses: + "200": + description: "The secret API key object." + content: + application/json: + schema: + type: "object" + properties: + secretKey: + description: "The secret API key." + type: "string" + /api-client/{id}: + delete: + description: "Delete an API client." + summary: "Delete an API client" + tags: + - "api-client" + operationId: "deleteApiClient" + parameters: + - name: "id" + description: "The id of an API client." + in: "path" + required: true + schema: + type: "integer" + format: "int64" + responses: + "204": + description: "Successful operation." + get: + description: "Get an API client by id." + summary: "Get an API client by id" + tags: + - "api-client" + operationId: "getApiClient" + parameters: + - name: "id" + description: "The id of an API client." + in: "path" + required: true + schema: + type: "integer" + format: "int64" + responses: + "200": + description: "The API client object." + content: + application/json: + schema: + $ref: "#/components/schemas/ApiClient" + put: + description: "Update an existing API client." + summary: "Update an existing API client" + tags: + - "api-client" + operationId: "updateApiClient" + parameters: + - name: "id" + description: "The id of an API client." + in: "path" + required: true + schema: + type: "integer" + format: "int64" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ApiClient" + required: true + responses: + "204": + description: "Successful operation." /api-collections: post: description: "Create a new API collection." @@ -272,6 +375,48 @@ paths: $ref: "#/components/schemas/ApiCollection" components: schemas: + ApiClient: + description: "Contains generated key required for calling API." + type: "object" + required: + - name + - secretKey + properties: + createdBy: + description: "The created by." + type: "string" + readOnly: true + createdDate: + description: "The created date." + type: "string" + format: "date-time" + readOnly: true + id: + description: "The id of an API key." + type: "integer" + format: "int64" + readOnly: true + lastModifiedBy: + description: "The last modified by." + type: "string" + readOnly: true + lastModifiedDate: + description: "The last modified date." + type: "string" + format: "date-time" + readOnly: true + lastUsedDate: + description: "The last used date." + type: "string" + format: "date-time" + readOnly: true + name: + description: "The name of an API key." + type: "string" + secretKey: + description: "The preview of secret API key." + type: "string" + readOnly: true ApiCollection: description: "An API collection." required: diff --git a/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/ApiClientApiController.java b/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/ApiClientApiController.java new file mode 100644 index 00000000000..d8507e753b3 --- /dev/null +++ b/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/ApiClientApiController.java @@ -0,0 +1,98 @@ +/* + * Copyright 2023-present ByteChef Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.bytechef.ee.automation.apiplatform.configuration.web.rest; + +import com.bytechef.atlas.coordinator.annotation.ConditionalOnCoordinator; +import com.bytechef.commons.util.CollectionUtils; +import com.bytechef.commons.util.StringUtils; +import com.bytechef.ee.automation.apiplatform.configuration.domain.ApiClient; +import com.bytechef.ee.automation.apiplatform.configuration.service.ApiClientService; +import com.bytechef.ee.automation.apiplatform.configuration.web.rest.model.ApiClientModel; +import com.bytechef.ee.automation.apiplatform.configuration.web.rest.model.CreateApiClient200ResponseModel; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; +import java.util.List; +import org.springframework.core.convert.ConversionService; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author Ivica Cardic + */ +@RestController +@RequestMapping("${openapi.openAPIDefinition.base-path.automation:}/api-platform/internal") +@ConditionalOnCoordinator +public class ApiClientApiController implements ApiClientApi { + + private final ApiClientService apiClientService; + private final ConversionService conversionService; + + @SuppressFBWarnings("EI") + public ApiClientApiController( + ApiClientService apiClientService, ConversionService conversionService) { + + this.apiClientService = apiClientService; + this.conversionService = conversionService; + } + + @Override + @SuppressFBWarnings("NP") + public ResponseEntity createApiClient(ApiClientModel apiClientModel) { + return ResponseEntity.ok( + new CreateApiClient200ResponseModel().secretKey( + apiClientService.create(conversionService.convert(apiClientModel, ApiClient.class)))); + } + + @Override + public ResponseEntity deleteApiClient(Long id) { + apiClientService.delete(id); + + return ResponseEntity.ok() + .build(); + } + + @Override + @SuppressFBWarnings("NP") + public ResponseEntity getApiClient(Long id) { + ApiClientModel apiClientModel = conversionService.convert( + apiClientService.getApiClient(id), ApiClientModel.class); + + return ResponseEntity.ok(apiClientModel.secretKey(obfuscate(apiClientModel.getSecretKey()))); + } + + @Override + public ResponseEntity> getApiClients() { + return ResponseEntity.ok( + CollectionUtils.map( + apiClientService.getApiClients(), + apiKey -> conversionService.convert(apiKey, ApiClientModel.class) + .secretKey(obfuscate(apiKey.getSecretKey())))); + } + + @Override + @SuppressFBWarnings("NP") + public ResponseEntity updateApiClient(Long id, ApiClientModel apiClientModel) { + apiClientService.update(conversionService.convert(apiClientModel.id(id), ApiClient.class)); + + return ResponseEntity.noContent() + .build(); + } + + private static String obfuscate(String secretKey) { + return StringUtils.obfuscate(secretKey, 26, 6); + } +} diff --git a/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/mapper/ApiClientMapper.java b/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/mapper/ApiClientMapper.java new file mode 100644 index 00000000000..f2882f822f8 --- /dev/null +++ b/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/mapper/ApiClientMapper.java @@ -0,0 +1,32 @@ +/* + * Copyright 2023-present ByteChef Inc. + * + * Licensed under the ByteChef Enterprise license (the "Enterprise License"); + * you may not use this file except in compliance with the Enterprise License. + */ + +package com.bytechef.ee.automation.apiplatform.configuration.web.rest.mapper; + +import com.bytechef.ee.automation.apiplatform.configuration.domain.ApiClient; +import com.bytechef.ee.automation.apiplatform.configuration.web.rest.mapper.config.ApiPlatformMapperSpringConfig; +import com.bytechef.ee.automation.apiplatform.configuration.web.rest.model.ApiClientModel; +import org.mapstruct.InheritInverseConfiguration; +import org.mapstruct.Mapper; +import org.mapstruct.extensions.spring.DelegatingConverter; +import org.springframework.core.convert.converter.Converter; + +/** + * @version ee + * + * @author Ivica Cardic + */ +@Mapper(config = ApiPlatformMapperSpringConfig.class) +public interface ApiClientMapper extends Converter { + + @Override + ApiClientModel convert(ApiClient apiClient); + + @InheritInverseConfiguration + @DelegatingConverter + ApiClient invertConvert(ApiClientModel apiClientModel); +} diff --git a/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/mapper/ApiCollectionMapper.java b/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/mapper/ApiCollectionMapper.java index 138d78d5abf..8259e6e4e12 100644 --- a/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/mapper/ApiCollectionMapper.java +++ b/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/mapper/ApiCollectionMapper.java @@ -7,6 +7,10 @@ package com.bytechef.ee.automation.apiplatform.configuration.web.rest.mapper; +import com.bytechef.automation.configuration.domain.Project; +import com.bytechef.automation.configuration.domain.ProjectInstance; +import com.bytechef.automation.configuration.web.rest.model.ProjectBasicModel; +import com.bytechef.automation.configuration.web.rest.model.ProjectInstanceBasicModel; import com.bytechef.ee.automation.apiplatform.configuration.dto.ApiCollectionDTO; import com.bytechef.ee.automation.apiplatform.configuration.web.rest.mapper.config.AutomationApiPlatformMapperSpringConfig; import com.bytechef.ee.automation.apiplatform.configuration.web.rest.model.ApiCollectionModel; @@ -31,4 +35,18 @@ public interface ApiCollectionMapper extends Converter { + + Optional findBySecretKey(String secretKey); +} diff --git a/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-service/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/service/ApiClientServiceImpl.java b/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-service/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/service/ApiClientServiceImpl.java new file mode 100644 index 00000000000..65814011ded --- /dev/null +++ b/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-service/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/service/ApiClientServiceImpl.java @@ -0,0 +1,79 @@ +/* + * Copyright 2023-present ByteChef Inc. + * + * Licensed under the ByteChef Enterprise license (the "Enterprise License"); + * you may not use this file except in compliance with the Enterprise License. + */ + +package com.bytechef.ee.automation.apiplatform.configuration.service; + +import com.bytechef.commons.util.OptionalUtils; +import com.bytechef.ee.automation.apiplatform.configuration.domain.ApiClient; +import com.bytechef.ee.automation.apiplatform.configuration.repository.ApiClientRepository; +import com.bytechef.platform.tenant.domain.TenantKey; +import java.util.List; +import java.util.Optional; +import org.apache.commons.lang3.Validate; +import org.springframework.lang.NonNull; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +/** + * @version ee + * + * @author Ivica Cardic + */ +@Service +@Transactional +public class ApiClientServiceImpl implements ApiClientService { + + private final ApiClientRepository apiClientRepository; + + public ApiClientServiceImpl(ApiClientRepository apiClientRepository) { + this.apiClientRepository = apiClientRepository; + } + + @Override + public String create(@NonNull ApiClient apiKey) { + Validate.isTrue(apiKey.getId() == null, "'id' must be null"); + Validate.notNull(apiKey.getName(), "'name' must not be null"); + + apiKey.setSecretKey(String.valueOf(TenantKey.of())); + + apiKey = apiClientRepository.save(apiKey); + + return apiKey.getSecretKey(); + } + + @Override + public void delete(long id) { + apiClientRepository.deleteById(id); + } + + @Override + @Transactional(readOnly = true) + public Optional fetchApiClient(@NonNull String secretKey) { + return apiClientRepository.findBySecretKey(secretKey); + } + + @Override + @Transactional(readOnly = true) + public ApiClient getApiClient(long id) { + return OptionalUtils.get(apiClientRepository.findById(id)); + } + + @Override + @Transactional(readOnly = true) + public List getApiClients() { + return apiClientRepository.findAll(); + } + + @Override + public ApiClient update(@NonNull ApiClient apiClient) { + ApiClient curApiClient = getApiClient(Validate.notNull(apiClient.getId(), "id")); + + curApiClient.setName(Validate.notNull(apiClient.getName(), "name")); + + return apiClientRepository.save(curApiClient); + } +} diff --git a/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-service/src/main/resources/config/liquibase/changelog/automation/configuration/202401114213040_automation_api_platform_added_api_client_table.xml b/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-service/src/main/resources/config/liquibase/changelog/automation/configuration/202401114213040_automation_api_platform_added_api_client_table.xml new file mode 100644 index 00000000000..d984652f553 --- /dev/null +++ b/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-service/src/main/resources/config/liquibase/changelog/automation/configuration/202401114213040_automation_api_platform_added_api_client_table.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-api/src/main/java/com/bytechef/ee/automation/apiplatform/handler/ApiPlatformHandlerExecutor.java b/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-api/src/main/java/com/bytechef/ee/automation/apiplatform/handler/ApiPlatformHandlerExecutor.java index 71be99de525..be5eadea131 100644 --- a/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-api/src/main/java/com/bytechef/ee/automation/apiplatform/handler/ApiPlatformHandlerExecutor.java +++ b/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-api/src/main/java/com/bytechef/ee/automation/apiplatform/handler/ApiPlatformHandlerExecutor.java @@ -24,5 +24,5 @@ */ public interface ApiPlatformHandlerExecutor { - Object executeSync(WorkflowExecutionId workflowExecutionId, WebhookRequest webhookRequest); + Object execute(WorkflowExecutionId workflowExecutionId, WebhookRequest webhookRequest); } diff --git a/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-impl/src/main/java/com/bytechef/ee/automation/apiplatform/handler/config/ApiPlatformHandlerConfiguration.java b/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-impl/src/main/java/com/bytechef/ee/automation/apiplatform/handler/config/ApiPlatformHandlerConfiguration.java index 2fcbff4486d..faeefd929cf 100644 --- a/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-impl/src/main/java/com/bytechef/ee/automation/apiplatform/handler/config/ApiPlatformHandlerConfiguration.java +++ b/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-impl/src/main/java/com/bytechef/ee/automation/apiplatform/handler/config/ApiPlatformHandlerConfiguration.java @@ -33,7 +33,7 @@ import com.bytechef.component.map.constant.MapConstants; import com.bytechef.ee.automation.apiplatform.handler.ApiPlatformHandlerExecutor; import com.bytechef.ee.automation.apiplatform.handler.executor.ApiPlatformHandlerExecutorImpl; -import com.bytechef.ee.automation.apiplatform.handler.executor.ApiPlatformHandlerTriggerSyncExecutor; +import com.bytechef.ee.automation.apiplatform.handler.executor.ApiPlatformHandlerTriggerExecutor; import com.bytechef.message.broker.sync.SyncMessageBroker; import com.bytechef.message.event.MessageEvent; import com.bytechef.platform.configuration.instance.accessor.InstanceAccessorRegistry; @@ -71,7 +71,7 @@ ApiPlatformHandlerExecutor apiPlatformHandlerExecutor( InstanceAccessorRegistry instanceAccessorRegistry, InstanceJobFacade instanceJobFacade, JobService jobService, List taskDispatcherPreSendProcessors, TaskExecutionService taskExecutionService, TaskHandlerRegistry taskHandlerRegistry, - ApiPlatformHandlerTriggerSyncExecutor apiPlatformHandlerTriggerSyncExecutor, TaskFileStorage taskFileStorage, + ApiPlatformHandlerTriggerExecutor apiPlatformHandlerTriggerExecutor, TaskFileStorage taskFileStorage, WorkflowService workflowService) { SyncMessageBroker syncMessageBroker = new SyncMessageBroker(); @@ -88,7 +88,7 @@ ApiPlatformHandlerExecutor apiPlatformHandlerExecutor( contextService, counterService, syncMessageBroker, taskExecutionService, taskFileStorage), taskExecutionService, taskHandlerRegistry, taskFileStorage, workflowService), - apiPlatformHandlerTriggerSyncExecutor, taskFileStorage); + apiPlatformHandlerTriggerExecutor, taskFileStorage); } private static ApplicationEventPublisher getEventPublisher(SyncMessageBroker syncMessageBroker) { diff --git a/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-impl/src/main/java/com/bytechef/ee/automation/apiplatform/handler/executor/ApiPlatformHandlerExecutorImpl.java b/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-impl/src/main/java/com/bytechef/ee/automation/apiplatform/handler/executor/ApiPlatformHandlerExecutorImpl.java index 0e41e94d1b6..111e11b4307 100644 --- a/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-impl/src/main/java/com/bytechef/ee/automation/apiplatform/handler/executor/ApiPlatformHandlerExecutorImpl.java +++ b/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-impl/src/main/java/com/bytechef/ee/automation/apiplatform/handler/executor/ApiPlatformHandlerExecutorImpl.java @@ -42,27 +42,27 @@ public class ApiPlatformHandlerExecutorImpl implements ApiPlatformHandlerExecuto private final InstanceAccessorRegistry instanceAccessorRegistry; private final InstanceJobFacade instanceJobFacade; private final JobSyncExecutor jobSyncExecutor; - private final ApiPlatformHandlerTriggerSyncExecutor apiPlatformHandlerTriggerSyncExecutor; + private final ApiPlatformHandlerTriggerExecutor apiPlatformHandlerTriggerExecutor; private final TaskFileStorage taskFileStorage; @SuppressFBWarnings("EI") public ApiPlatformHandlerExecutorImpl( InstanceAccessorRegistry instanceAccessorRegistry, InstanceJobFacade instanceJobFacade, - JobSyncExecutor jobSyncExecutor, ApiPlatformHandlerTriggerSyncExecutor apiPlatformHandlerTriggerSyncExecutor, + JobSyncExecutor jobSyncExecutor, ApiPlatformHandlerTriggerExecutor apiPlatformHandlerTriggerExecutor, TaskFileStorage taskFileStorage) { this.instanceAccessorRegistry = instanceAccessorRegistry; this.instanceJobFacade = instanceJobFacade; this.jobSyncExecutor = jobSyncExecutor; - this.apiPlatformHandlerTriggerSyncExecutor = apiPlatformHandlerTriggerSyncExecutor; + this.apiPlatformHandlerTriggerExecutor = apiPlatformHandlerTriggerExecutor; this.taskFileStorage = taskFileStorage; } @Override - public Object executeSync(WorkflowExecutionId workflowExecutionId, WebhookRequest webhookRequest) { + public Object execute(WorkflowExecutionId workflowExecutionId, WebhookRequest webhookRequest) { Object outputs; - TriggerOutput triggerOutput = apiPlatformHandlerTriggerSyncExecutor.execute( + TriggerOutput triggerOutput = apiPlatformHandlerTriggerExecutor.execute( workflowExecutionId, webhookRequest); Map inputMap = getInputMap(workflowExecutionId); diff --git a/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-impl/src/main/java/com/bytechef/ee/automation/apiplatform/handler/executor/ApiPlatformHandlerTriggerSyncExecutor.java b/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-impl/src/main/java/com/bytechef/ee/automation/apiplatform/handler/executor/ApiPlatformHandlerTriggerExecutor.java similarity index 73% rename from server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-impl/src/main/java/com/bytechef/ee/automation/apiplatform/handler/executor/ApiPlatformHandlerTriggerSyncExecutor.java rename to server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-impl/src/main/java/com/bytechef/ee/automation/apiplatform/handler/executor/ApiPlatformHandlerTriggerExecutor.java index cdf89f0d622..2b480791480 100644 --- a/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-impl/src/main/java/com/bytechef/ee/automation/apiplatform/handler/executor/ApiPlatformHandlerTriggerSyncExecutor.java +++ b/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-impl/src/main/java/com/bytechef/ee/automation/apiplatform/handler/executor/ApiPlatformHandlerTriggerExecutor.java @@ -21,7 +21,6 @@ import com.bytechef.commons.util.CollectionUtils; import com.bytechef.commons.util.MapUtils; import com.bytechef.commons.util.OptionalUtils; -import com.bytechef.component.definition.TriggerDefinition.WebhookValidateResponse; import com.bytechef.platform.component.constant.MetadataConstants; import com.bytechef.platform.component.facade.TriggerDefinitionFacade; import com.bytechef.platform.component.trigger.TriggerOutput; @@ -47,7 +46,7 @@ * @author Ivica Cardic */ @Component -public class ApiPlatformHandlerTriggerSyncExecutor { +public class ApiPlatformHandlerTriggerExecutor { private final InstanceAccessorRegistry instanceAccessorRegistry; private final TriggerDefinitionFacade triggerDefinitionFacade; @@ -58,7 +57,7 @@ public class ApiPlatformHandlerTriggerSyncExecutor { private final WorkflowService workflowService; @SuppressFBWarnings("EI") - public ApiPlatformHandlerTriggerSyncExecutor( + public ApiPlatformHandlerTriggerExecutor( InstanceAccessorRegistry instanceAccessorRegistry, TriggerDefinitionFacade triggerDefinitionFacade, TriggerExecutionService triggerExecutionService, List triggerDispatcherPreSendProcessors, @@ -118,36 +117,6 @@ public TriggerOutput execute(WorkflowExecutionId workflowExecutionId, WebhookReq return triggerOutput; } - public WebhookValidateResponse validate(WorkflowExecutionId workflowExecutionId, WebhookRequest webhookRequest) { - Result result = getProcessData(workflowExecutionId, webhookRequest); - - TriggerExecution triggerExecution = result.triggerExecution(); - WorkflowNodeType workflowNodeType = result.workflowNodeType(); - - return triggerDefinitionFacade.executeWebhookValidate( - workflowNodeType.componentName(), workflowNodeType.componentVersion(), - workflowNodeType.componentOperationName(), triggerExecution.getParameters(), - MapUtils.getRequired(triggerExecution.getMetadata(), WebhookRequest.WEBHOOK_REQUEST, WebhookRequest.class), - OptionalUtils.orElse(CollectionUtils.findFirst(result.connectIdMap() - .values()), null)); - } - - public WebhookValidateResponse validateOnEnable( - WorkflowExecutionId workflowExecutionId, WebhookRequest webhookRequest) { - - Result result = getProcessData(workflowExecutionId, webhookRequest); - - TriggerExecution triggerExecution = result.triggerExecution(); - WorkflowNodeType workflowNodeType = result.workflowNodeType(); - - return triggerDefinitionFacade.executeWebhookValidateOnEnable( - workflowNodeType.componentName(), workflowNodeType.componentVersion(), - workflowNodeType.componentOperationName(), triggerExecution.getParameters(), - MapUtils.getRequired(triggerExecution.getMetadata(), WebhookRequest.WEBHOOK_REQUEST, WebhookRequest.class), - OptionalUtils.orElse(CollectionUtils.findFirst(result.connectIdMap() - .values()), null)); - } - private WorkflowNodeType getComponentOperation(WorkflowExecutionId workflowExecutionId, String workflowId) { Workflow workflow = workflowService.getWorkflow(workflowId); @@ -163,25 +132,6 @@ private WorkflowNodeType getComponentOperation(WorkflowExecutionId workflowExecu workflowExecutionId.getInstanceId(), workflowExecutionId.getWorkflowReferenceCode()); } - private Result getProcessData(WorkflowExecutionId workflowExecutionId, WebhookRequest webhookRequest) { - String workflowId = getWorkflowId(workflowExecutionId); - - TriggerExecution triggerExecution = TriggerExecution.builder() - .metadata(Map.of(WebhookRequest.WEBHOOK_REQUEST, webhookRequest)) - .workflowExecutionId(workflowExecutionId) - .workflowTrigger(getWorkflowTrigger(workflowExecutionId, workflowId)) - .build(); - - triggerExecution = preProcess(triggerExecution.evaluate(getInputMap(workflowExecutionId))); - - WorkflowNodeType workflowNodeType = getComponentOperation(workflowExecutionId, workflowId); - - Map connectIdMap = MapUtils.getMap( - triggerExecution.getMetadata(), MetadataConstants.CONNECTION_IDS, Long.class, Map.of()); - - return new Result(triggerExecution, workflowNodeType, connectIdMap); - } - private String getWorkflowId(WorkflowExecutionId workflowExecutionId) { InstanceAccessor instanceAccessor = instanceAccessorRegistry.getInstanceAccessor(workflowExecutionId.getType()); @@ -214,8 +164,4 @@ private TriggerExecution preProcess(TriggerExecution triggerExecution) { return triggerExecution; } - - private record Result( - TriggerExecution triggerExecution, WorkflowNodeType workflowNodeType, Map connectIdMap) { - } } diff --git a/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-impl/src/test/java/com/bytechef/ee/automation/apiplatform/handler/executor/ApiPlatformHandlerTriggerSyncExecutorTest.java b/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-impl/src/test/java/com/bytechef/ee/automation/apiplatform/handler/executor/ApiPlatformHandlerTriggerExecutorTest.java similarity index 94% rename from server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-impl/src/test/java/com/bytechef/ee/automation/apiplatform/handler/executor/ApiPlatformHandlerTriggerSyncExecutorTest.java rename to server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-impl/src/test/java/com/bytechef/ee/automation/apiplatform/handler/executor/ApiPlatformHandlerTriggerExecutorTest.java index 1e623f7b19e..e6dd6063aaa 100644 --- a/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-impl/src/test/java/com/bytechef/ee/automation/apiplatform/handler/executor/ApiPlatformHandlerTriggerSyncExecutorTest.java +++ b/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-impl/src/test/java/com/bytechef/ee/automation/apiplatform/handler/executor/ApiPlatformHandlerTriggerExecutorTest.java @@ -23,7 +23,7 @@ * @author Ivica Cardic */ @Disabled -public class ApiPlatformHandlerTriggerSyncExecutorTest { +public class ApiPlatformHandlerTriggerExecutorTest { @Test public void testExecute() { diff --git a/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-rest/build.gradle.kts b/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-rest/build.gradle.kts index 4aebcfde18c..076e876cfb0 100644 --- a/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-rest/build.gradle.kts +++ b/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-rest/build.gradle.kts @@ -11,9 +11,7 @@ dependencies { implementation(project(":server:libs:platform:platform-component:platform-component-api")) implementation(project(":server:libs:platform:platform-configuration:platform-configuration-instance-api")) implementation(project(":server:libs:platform:platform-file-storage:platform-file-storage-api")) - implementation(project(":server:libs:platform:platform-security:platform-security-web:platform-security-web-api")) implementation(project(":server:libs:platform:platform-tenant:platform-tenant-api")) - implementation(project(":server:libs:platform:platform-user:platform-user-api")) implementation(project(":server:libs:platform:platform-webhook:platform-webhook-rest:platform-webhook-rest-api")) implementation(project(":server:libs:platform:platform-workflow:platform-workflow-execution:platform-workflow-execution-api")) diff --git a/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-rest/src/main/java/com/bytechef/ee/automation/apiplatform/handler/ApiPlatformHandlerController.java b/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-rest/src/main/java/com/bytechef/ee/automation/apiplatform/handler/ApiPlatformHandlerController.java index af164a0f489..fde0bd2e3d5 100644 --- a/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-rest/src/main/java/com/bytechef/ee/automation/apiplatform/handler/ApiPlatformHandlerController.java +++ b/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-rest/src/main/java/com/bytechef/ee/automation/apiplatform/handler/ApiPlatformHandlerController.java @@ -138,7 +138,7 @@ private Object doHandle(HttpServletRequest request) { // TODO return response from ResponseToAPIRequest action - return apiPlatformHandlerExecutor.executeSync(workflowExecutionId, webhookRequest); + return apiPlatformHandlerExecutor.execute(workflowExecutionId, webhookRequest); }); } diff --git a/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-rest/src/main/java/com/bytechef/ee/automation/apiplatform/handler/security/web/filter/ApiPlatformApiKeyAuthenticationFilter.java b/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-rest/src/main/java/com/bytechef/ee/automation/apiplatform/handler/security/web/filter/ApiPlatformApiKeyAuthenticationFilter.java deleted file mode 100644 index 70a683f6efa..00000000000 --- a/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-rest/src/main/java/com/bytechef/ee/automation/apiplatform/handler/security/web/filter/ApiPlatformApiKeyAuthenticationFilter.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2023-present ByteChef Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.bytechef.ee.automation.apiplatform.handler.security.web.filter; - -import com.bytechef.platform.security.web.filter.AbstractPublicApiAuthenticationFilter; -import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; -import org.springframework.security.authentication.AuthenticationManager; - -/** - * @author Ivica Cardic - */ -public class ApiPlatformApiKeyAuthenticationFilter extends AbstractPublicApiAuthenticationFilter { - - @SuppressFBWarnings("EI") - public ApiPlatformApiKeyAuthenticationFilter(AuthenticationManager authenticationManager) { - super("^/api/automation/o/.+", authenticationManager); - } -} diff --git a/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-security-web/automation-api-platform-handler-security-web-impl/build.gradle.kts b/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-security-web/automation-api-platform-handler-security-web-impl/build.gradle.kts new file mode 100644 index 00000000000..070a3619fe9 --- /dev/null +++ b/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-security-web/automation-api-platform-handler-security-web-impl/build.gradle.kts @@ -0,0 +1,8 @@ +dependencies { + compileOnly("jakarta.servlet:jakarta.servlet-api") + + implementation(project(":server:libs:platform:platform-security:platform-security-web:platform-security-web-api")) + implementation(project(":server:libs:platform:platform-tenant:platform-tenant-api")) + + implementation(project(":server:ee:libs:automation:automation-api-platform:automation-api-platform-configuration:automation-api-platform-configuration-api")) +} diff --git a/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-security-web/automation-api-platform-handler-security-web-impl/src/main/java/com/bytechef/ee/automation/apiplatform/handler/security/web/authentication/ApiClientAuthenticationProvider.java b/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-security-web/automation-api-platform-handler-security-web-impl/src/main/java/com/bytechef/ee/automation/apiplatform/handler/security/web/authentication/ApiClientAuthenticationProvider.java new file mode 100644 index 00000000000..706396dc9af --- /dev/null +++ b/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-security-web/automation-api-platform-handler-security-web-impl/src/main/java/com/bytechef/ee/automation/apiplatform/handler/security/web/authentication/ApiClientAuthenticationProvider.java @@ -0,0 +1,59 @@ +/* + * Copyright 2023-present ByteChef Inc. + * + * Licensed under the ByteChef Enterprise license (the "Enterprise License"); + * you may not use this file except in compliance with the Enterprise License. + */ + +package com.bytechef.ee.automation.apiplatform.handler.security.web.authentication; + +import com.bytechef.ee.automation.apiplatform.configuration.domain.ApiClient; +import com.bytechef.ee.automation.apiplatform.configuration.service.ApiClientService; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; +import java.util.List; +import java.util.Optional; +import org.springframework.security.authentication.AuthenticationProvider; +import org.springframework.security.authentication.BadCredentialsException; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.AuthenticationException; + +/** + * @version ee + * + * @author Ivica Cardic + */ +public class ApiClientAuthenticationProvider implements AuthenticationProvider { + + private final ApiClientService apiClientService; + + @SuppressFBWarnings("EI") + public ApiClientAuthenticationProvider(ApiClientService apiClientService) { + this.apiClientService = apiClientService; + } + + @Override + public Authentication authenticate(Authentication authentication) throws AuthenticationException { + ApiClientKeyAuthenticationToken apiClientKeyAuthenticationToken = + (ApiClientKeyAuthenticationToken) authentication; + + Optional apiClientOptional = apiClientService.fetchApiClient( + apiClientKeyAuthenticationToken.getSecretKey()); + + if (apiClientOptional.isEmpty()) { + throw new BadCredentialsException("Unknown API secret key"); + } + + ApiClient apiClient = apiClientOptional.get(); + + return new ApiClientKeyAuthenticationToken(createSpringSecurityUser(apiClient.getName())); + } + + @Override + public boolean supports(Class authentication) { + return authentication.equals(ApiClientKeyAuthenticationToken.class); + } + + private org.springframework.security.core.userdetails.User createSpringSecurityUser(String secretKey) { + return new org.springframework.security.core.userdetails.User(secretKey, "", List.of()); + } +} diff --git a/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-security-web/automation-api-platform-handler-security-web-impl/src/main/java/com/bytechef/ee/automation/apiplatform/handler/security/web/authentication/ApiClientAuthenticationProviderContributor.java b/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-security-web/automation-api-platform-handler-security-web-impl/src/main/java/com/bytechef/ee/automation/apiplatform/handler/security/web/authentication/ApiClientAuthenticationProviderContributor.java new file mode 100644 index 00000000000..bc589f20860 --- /dev/null +++ b/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-security-web/automation-api-platform-handler-security-web-impl/src/main/java/com/bytechef/ee/automation/apiplatform/handler/security/web/authentication/ApiClientAuthenticationProviderContributor.java @@ -0,0 +1,35 @@ +/* + * Copyright 2023-present ByteChef Inc. + * + * Licensed under the ByteChef Enterprise license (the "Enterprise License"); + * you may not use this file except in compliance with the Enterprise License. + */ + +package com.bytechef.ee.automation.apiplatform.handler.security.web.authentication; + +import com.bytechef.ee.automation.apiplatform.configuration.service.ApiClientService; +import com.bytechef.platform.security.web.authentication.AuthenticationProviderContributor; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; +import org.springframework.security.authentication.AuthenticationProvider; +import org.springframework.stereotype.Component; + +/** + * @version ee + * + * @author Ivica Cardic + */ +@Component +public class ApiClientAuthenticationProviderContributor implements AuthenticationProviderContributor { + + private final ApiClientService apiClientService; + + @SuppressFBWarnings("EI") + public ApiClientAuthenticationProviderContributor(ApiClientService apiClientService) { + this.apiClientService = apiClientService; + } + + @Override + public AuthenticationProvider getAuthenticationProvider() { + return new ApiClientAuthenticationProvider(apiClientService); + } +} diff --git a/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-security-web/automation-api-platform-handler-security-web-impl/src/main/java/com/bytechef/ee/automation/apiplatform/handler/security/web/authentication/ApiClientKeyAuthenticationToken.java b/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-security-web/automation-api-platform-handler-security-web-impl/src/main/java/com/bytechef/ee/automation/apiplatform/handler/security/web/authentication/ApiClientKeyAuthenticationToken.java new file mode 100644 index 00000000000..311f65d9ec5 --- /dev/null +++ b/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-security-web/automation-api-platform-handler-security-web-impl/src/main/java/com/bytechef/ee/automation/apiplatform/handler/security/web/authentication/ApiClientKeyAuthenticationToken.java @@ -0,0 +1,37 @@ +/* + * Copyright 2023-present ByteChef Inc. + * + * Licensed under the ByteChef Enterprise license (the "Enterprise License"); + * you may not use this file except in compliance with the Enterprise License. + */ + +package com.bytechef.ee.automation.apiplatform.handler.security.web.authentication; + +import com.bytechef.platform.security.web.authentication.AbstractPublicApiAuthenticationToken; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; +import org.springframework.security.core.userdetails.User; + +/** + * @version ee + * + * @author Ivica Cardic + */ +public class ApiClientKeyAuthenticationToken extends AbstractPublicApiAuthenticationToken { + + private String secretKey; + + public ApiClientKeyAuthenticationToken(String secretKey, String tenantId) { + super(tenantId); + + this.secretKey = secretKey; + } + + @SuppressFBWarnings("EI") + public ApiClientKeyAuthenticationToken(User user) { + super(user); + } + + public String getSecretKey() { + return secretKey; + } +} diff --git a/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-security-web/automation-api-platform-handler-security-web-impl/src/main/java/com/bytechef/ee/automation/apiplatform/handler/security/web/filter/ApiClientAuthenticationFilter.java b/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-security-web/automation-api-platform-handler-security-web-impl/src/main/java/com/bytechef/ee/automation/apiplatform/handler/security/web/filter/ApiClientAuthenticationFilter.java new file mode 100644 index 00000000000..e4b3d048283 --- /dev/null +++ b/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-security-web/automation-api-platform-handler-security-web-impl/src/main/java/com/bytechef/ee/automation/apiplatform/handler/security/web/filter/ApiClientAuthenticationFilter.java @@ -0,0 +1,37 @@ +/* + * Copyright 2023-present ByteChef Inc. + * + * Licensed under the ByteChef Enterprise license (the "Enterprise License"); + * you may not use this file except in compliance with the Enterprise License. + */ + +package com.bytechef.ee.automation.apiplatform.handler.security.web.filter; + +import com.bytechef.ee.automation.apiplatform.handler.security.web.authentication.ApiClientKeyAuthenticationToken; +import com.bytechef.platform.security.web.filter.AbstractPublicApiAuthenticationFilter; +import com.bytechef.platform.tenant.domain.TenantKey; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; +import jakarta.servlet.http.HttpServletRequest; +import org.springframework.security.authentication.AuthenticationManager; +import org.springframework.security.core.Authentication; + +/** + * @version ee + * + * @author Ivica Cardic + */ +public class ApiClientAuthenticationFilter extends AbstractPublicApiAuthenticationFilter { + + @SuppressFBWarnings("EI") + public ApiClientAuthenticationFilter(AuthenticationManager authenticationManager) { + super("^/api/o/.+", authenticationManager); + } + + protected Authentication getAuthentication(HttpServletRequest request) { + String token = getAuthToken(request); + + TenantKey tenantKey = TenantKey.parse(token); + + return new ApiClientKeyAuthenticationToken(token, tenantKey.getTenantId()); + } +} diff --git a/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-rest/src/main/java/com/bytechef/ee/automation/apiplatform/handler/security/web/filter/ApiPlatformApiKeyAuthenticationFilterBeforeContributor.java b/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-security-web/automation-api-platform-handler-security-web-impl/src/main/java/com/bytechef/ee/automation/apiplatform/handler/security/web/filter/ApiClientAuthenticationFilterBeforeContributor.java similarity index 50% rename from server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-rest/src/main/java/com/bytechef/ee/automation/apiplatform/handler/security/web/filter/ApiPlatformApiKeyAuthenticationFilterBeforeContributor.java rename to server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-security-web/automation-api-platform-handler-security-web-impl/src/main/java/com/bytechef/ee/automation/apiplatform/handler/security/web/filter/ApiClientAuthenticationFilterBeforeContributor.java index 62368014699..e3574aaf6f9 100644 --- a/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-rest/src/main/java/com/bytechef/ee/automation/apiplatform/handler/security/web/filter/ApiPlatformApiKeyAuthenticationFilterBeforeContributor.java +++ b/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-security-web/automation-api-platform-handler-security-web-impl/src/main/java/com/bytechef/ee/automation/apiplatform/handler/security/web/filter/ApiClientAuthenticationFilterBeforeContributor.java @@ -1,17 +1,8 @@ /* * Copyright 2023-present ByteChef Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Licensed under the ByteChef Enterprise license (the "Enterprise License"); + * you may not use this file except in compliance with the Enterprise License. */ package com.bytechef.ee.automation.apiplatform.handler.security.web.filter; @@ -19,22 +10,22 @@ import com.bytechef.platform.security.web.filter.FilterBeforeContributor; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import jakarta.servlet.Filter; -import org.springframework.core.annotation.Order; import org.springframework.security.authentication.AuthenticationManager; import org.springframework.security.web.authentication.www.BasicAuthenticationFilter; import org.springframework.stereotype.Component; /** + * @version ee + * * @author Ivica Cardic */ @Component -@Order(2) -public class ApiPlatformApiKeyAuthenticationFilterBeforeContributor implements FilterBeforeContributor { +public class ApiClientAuthenticationFilterBeforeContributor implements FilterBeforeContributor { @Override @SuppressFBWarnings("EI") public Filter getFilter(AuthenticationManager authenticationManager) { - return new ApiPlatformApiKeyAuthenticationFilter(authenticationManager); + return new ApiClientAuthenticationFilter(authenticationManager); } @Override diff --git a/server/libs/embedded/embedded-configuration/embedded-configuration-service/src/main/java/com/bytechef/embedded/configuration/filter/IntegrationComponentDefinitionFilter.java b/server/libs/embedded/embedded-configuration/embedded-configuration-service/src/main/java/com/bytechef/embedded/configuration/filter/IntegrationComponentDefinitionFilter.java index 21269700aa7..77a304ba225 100644 --- a/server/libs/embedded/embedded-configuration/embedded-configuration-service/src/main/java/com/bytechef/embedded/configuration/filter/IntegrationComponentDefinitionFilter.java +++ b/server/libs/embedded/embedded-configuration/embedded-configuration-service/src/main/java/com/bytechef/embedded/configuration/filter/IntegrationComponentDefinitionFilter.java @@ -28,7 +28,7 @@ @Component public class IntegrationComponentDefinitionFilter implements ComponentDefinitionFilter { - private static final List COMPONENT_NAMES = List.of("webhook"); + private static final List COMPONENT_NAMES = List.of("apiPlatform", "webhook"); @Override public boolean filter(ComponentDefinition componentDefinition) { diff --git a/server/libs/embedded/embedded-security-web/embedded-security-web-impl/src/main/java/com/bytechef/embedded/security/web/filter/ConnectedUserAuthenticationFilter.java b/server/libs/embedded/embedded-security-web/embedded-security-web-impl/src/main/java/com/bytechef/embedded/security/web/filter/ConnectedUserAuthenticationFilter.java index c380a38b91c..e7766d8f3bb 100644 --- a/server/libs/embedded/embedded-security-web/embedded-security-web-impl/src/main/java/com/bytechef/embedded/security/web/filter/ConnectedUserAuthenticationFilter.java +++ b/server/libs/embedded/embedded-security-web/embedded-security-web-impl/src/main/java/com/bytechef/embedded/security/web/filter/ConnectedUserAuthenticationFilter.java @@ -19,8 +19,8 @@ import com.bytechef.embedded.security.web.authentication.ConnectedUserAuthenticationToken; import com.bytechef.platform.constant.Environment; import com.bytechef.platform.security.web.filter.AbstractPublicApiAuthenticationFilter; +import com.bytechef.platform.tenant.domain.TenantKey; import com.bytechef.platform.tenant.util.TenantUtils; -import com.bytechef.platform.user.domain.TenantKey; import com.bytechef.platform.user.service.SigningKeyService; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import io.jsonwebtoken.Claims; diff --git a/server/libs/platform/platform-security/platform-security-web/platform-security-web-api/build.gradle.kts b/server/libs/platform/platform-security/platform-security-web/platform-security-web-api/build.gradle.kts index 6eba26f96bf..8eefb3a8796 100644 --- a/server/libs/platform/platform-security/platform-security-web/platform-security-web-api/build.gradle.kts +++ b/server/libs/platform/platform-security/platform-security-web/platform-security-web-api/build.gradle.kts @@ -2,7 +2,6 @@ dependencies { api("org.springframework.security:spring-security-config") api("org.springframework.security:spring-security-web") api(project(":server:libs:platform:platform-security:platform-security-api")) - api(project(":server:libs:platform:platform-user:platform-user-api")) implementation("org.apache.commons:commons-lang3") implementation(project(":server:libs:platform:platform-tenant:platform-tenant-api")) diff --git a/server/libs/platform/platform-security/platform-security-web/platform-security-web-api/src/main/java/com/bytechef/platform/security/web/filter/AbstractPublicApiAuthenticationFilter.java b/server/libs/platform/platform-security/platform-security-web/platform-security-web-api/src/main/java/com/bytechef/platform/security/web/filter/AbstractPublicApiAuthenticationFilter.java index be8ddc2267b..4a9c545186c 100644 --- a/server/libs/platform/platform-security/platform-security-web/platform-security-web-api/src/main/java/com/bytechef/platform/security/web/filter/AbstractPublicApiAuthenticationFilter.java +++ b/server/libs/platform/platform-security/platform-security-web/platform-security-web-api/src/main/java/com/bytechef/platform/security/web/filter/AbstractPublicApiAuthenticationFilter.java @@ -18,8 +18,8 @@ import com.bytechef.platform.security.web.authentication.AbstractPublicApiAuthenticationToken; import com.bytechef.platform.security.web.authentication.ApiKeyAuthenticationToken; +import com.bytechef.platform.tenant.domain.TenantKey; import com.bytechef.platform.tenant.util.TenantUtils; -import com.bytechef.platform.user.domain.TenantKey; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import jakarta.servlet.FilterChain; import jakarta.servlet.http.HttpServletRequest; diff --git a/server/libs/platform/platform-user/platform-user-api/src/main/java/com/bytechef/platform/user/domain/TenantKey.java b/server/libs/platform/platform-tenant/platform-tenant-api/src/main/java/com/bytechef/platform/tenant/domain/TenantKey.java similarity index 97% rename from server/libs/platform/platform-user/platform-user-api/src/main/java/com/bytechef/platform/user/domain/TenantKey.java rename to server/libs/platform/platform-tenant/platform-tenant-api/src/main/java/com/bytechef/platform/tenant/domain/TenantKey.java index 3857fcbe1b7..c80e666038b 100644 --- a/server/libs/platform/platform-user/platform-user-api/src/main/java/com/bytechef/platform/user/domain/TenantKey.java +++ b/server/libs/platform/platform-tenant/platform-tenant-api/src/main/java/com/bytechef/platform/tenant/domain/TenantKey.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.bytechef.platform.user.domain; +package com.bytechef.platform.tenant.domain; import com.bytechef.commons.util.EncodingUtils; import com.bytechef.commons.util.RandomUtils; diff --git a/server/libs/platform/platform-user/platform-user-api/src/main/java/com/bytechef/platform/user/domain/ApiKey.java b/server/libs/platform/platform-user/platform-user-api/src/main/java/com/bytechef/platform/user/domain/ApiKey.java index 4703f64cfb8..4100ece4f39 100644 --- a/server/libs/platform/platform-user/platform-user-api/src/main/java/com/bytechef/platform/user/domain/ApiKey.java +++ b/server/libs/platform/platform-user/platform-user-api/src/main/java/com/bytechef/platform/user/domain/ApiKey.java @@ -157,10 +157,6 @@ public void setSecretKey(String secretKey) { this.secretKey = secretKey; } - public void setSecretKey(TenantKey tenantKey) { - this.secretKey = tenantKey.toString(); - } - public void setType(ModeType type) { if (type != null) { this.type = type.ordinal(); diff --git a/server/libs/platform/platform-user/platform-user-api/src/main/java/com/bytechef/platform/user/domain/SigningKey.java b/server/libs/platform/platform-user/platform-user-api/src/main/java/com/bytechef/platform/user/domain/SigningKey.java index ac56e4a1cc6..f41512a79c3 100644 --- a/server/libs/platform/platform-user/platform-user-api/src/main/java/com/bytechef/platform/user/domain/SigningKey.java +++ b/server/libs/platform/platform-user/platform-user-api/src/main/java/com/bytechef/platform/user/domain/SigningKey.java @@ -152,10 +152,6 @@ public void setKeyId(String keyId) { this.keyId = keyId; } - public void setKeyId(TenantKey tenantKey) { - this.keyId = tenantKey.toString(); - } - public void setLastUsedDate(LocalDateTime lastUsedDate) { this.lastUsedDate = lastUsedDate; } diff --git a/server/libs/platform/platform-user/platform-user-rest/platform-user-rest-impl/openapi.yaml b/server/libs/platform/platform-user/platform-user-rest/platform-user-rest-impl/openapi.yaml index dd6a808ce34..95d574aa7ef 100644 --- a/server/libs/platform/platform-user/platform-user-rest/platform-user-rest-impl/openapi.yaml +++ b/server/libs/platform/platform-user/platform-user-rest/platform-user-rest-impl/openapi.yaml @@ -14,7 +14,7 @@ paths: /api-keys: get: description: "Get API keys." - summary: "Get api keys" + summary: "Get API keys" tags: - "api-key" operationId: "getApiKeys" diff --git a/server/libs/platform/platform-user/platform-user-service/src/main/java/com/bytechef/platform/user/service/ApiKeyServiceImpl.java b/server/libs/platform/platform-user/platform-user-service/src/main/java/com/bytechef/platform/user/service/ApiKeyServiceImpl.java index fe983c3b6d6..8c4ad863f58 100644 --- a/server/libs/platform/platform-user/platform-user-service/src/main/java/com/bytechef/platform/user/service/ApiKeyServiceImpl.java +++ b/server/libs/platform/platform-user/platform-user-service/src/main/java/com/bytechef/platform/user/service/ApiKeyServiceImpl.java @@ -17,8 +17,8 @@ package com.bytechef.platform.user.service; import com.bytechef.commons.util.OptionalUtils; +import com.bytechef.platform.tenant.domain.TenantKey; import com.bytechef.platform.user.domain.ApiKey; -import com.bytechef.platform.user.domain.TenantKey; import com.bytechef.platform.user.repository.ApiKeyRepository; import java.util.List; import java.util.Optional; @@ -46,7 +46,7 @@ public String create(@NonNull ApiKey apiKey) { Validate.isTrue(apiKey.getId() == null, "'id' must be null"); Validate.notNull(apiKey.getName(), "'name' must not be null"); - apiKey.setSecretKey(TenantKey.of()); + apiKey.setSecretKey(String.valueOf(TenantKey.of())); apiKey = apiKeyRepository.save(apiKey); diff --git a/server/libs/platform/platform-user/platform-user-service/src/main/java/com/bytechef/platform/user/service/SigningKeyServiceImpl.java b/server/libs/platform/platform-user/platform-user-service/src/main/java/com/bytechef/platform/user/service/SigningKeyServiceImpl.java index 5d4e8f7a919..91d8a5151e7 100644 --- a/server/libs/platform/platform-user/platform-user-service/src/main/java/com/bytechef/platform/user/service/SigningKeyServiceImpl.java +++ b/server/libs/platform/platform-user/platform-user-service/src/main/java/com/bytechef/platform/user/service/SigningKeyServiceImpl.java @@ -18,8 +18,8 @@ import com.bytechef.commons.util.OptionalUtils; import com.bytechef.platform.constant.ModeType; +import com.bytechef.platform.tenant.domain.TenantKey; import com.bytechef.platform.user.domain.SigningKey; -import com.bytechef.platform.user.domain.TenantKey; import com.bytechef.platform.user.repository.SigningKeyRepository; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.security.KeyFactory; @@ -74,7 +74,7 @@ public String create(@NonNull SigningKey signingKey) { KeyPair keyPair = keyPairGenerator.generateKeyPair(); - signingKey.setKeyId(TenantKey.of()); + signingKey.setKeyId(String.valueOf(TenantKey.of())); PublicKey publicKey = keyPair.getPublic(); diff --git a/settings.gradle.kts b/settings.gradle.kts index 3db2c8f2e3b..50cb2a341f2 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -377,6 +377,7 @@ include("server:ee:libs:automation:automation-api-platform:automation-api-platfo include("server:ee:libs:automation:automation-api-platform:automation-api-platform-handler:automation-api-platform-handler-api") include("server:ee:libs:automation:automation-api-platform:automation-api-platform-handler:automation-api-platform-handler-rest") include("server:ee:libs:automation:automation-api-platform:automation-api-platform-handler:automation-api-platform-handler-impl") +include("server:ee:libs:automation:automation-api-platform:automation-api-platform-handler:automation-api-platform-handler-security-web:automation-api-platform-handler-security-web-impl") include("server:ee:libs:config:tenant-multi-data-config") include("server:ee:libs:config:tenant-multi-message-event-config") From a6c1deb3e5b7c44e30fef912b33527dd7386f3cf Mon Sep 17 00:00:00 2001 From: Ivica Cardic Date: Fri, 15 Nov 2024 06:55:20 +0100 Subject: [PATCH 09/18] 1023 - Generate --- .../generated/.openapi-generator/FILES | 3 + .../configuration/web/rest/ApiClientApi.java | 228 +++++++++++++++ .../web/rest/ApiCollectionApi.java | 2 +- .../web/rest/ApiCollectionEndpointApi.java | 2 +- .../web/rest/ApiCollectionTagApi.java | 2 +- .../web/rest/model/ApiClientModel.java | 271 ++++++++++++++++++ .../model/ApiCollectionEndpointModel.java | 2 +- .../web/rest/model/ApiCollectionModel.java | 2 +- .../CreateApiClient200ResponseModel.java | 85 ++++++ .../web/rest/model/HttpMethodModel.java | 2 +- 10 files changed, 593 insertions(+), 6 deletions(-) create mode 100644 server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/generated/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/ApiClientApi.java create mode 100644 server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/generated/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/model/ApiClientModel.java create mode 100644 server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/generated/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/model/CreateApiClient200ResponseModel.java diff --git a/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/generated/.openapi-generator/FILES b/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/generated/.openapi-generator/FILES index dc742d47e20..3f6408ade06 100644 --- a/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/generated/.openapi-generator/FILES +++ b/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/generated/.openapi-generator/FILES @@ -1,9 +1,12 @@ README.md pom.xml +src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/ApiClientApi.java src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/ApiCollectionApi.java src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/ApiCollectionEndpointApi.java src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/ApiCollectionTagApi.java src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/ApiUtil.java +src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/model/ApiClientModel.java src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/model/ApiCollectionEndpointModel.java src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/model/ApiCollectionModel.java +src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/model/CreateApiClient200ResponseModel.java src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/model/HttpMethodModel.java diff --git a/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/generated/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/ApiClientApi.java b/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/generated/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/ApiClientApi.java new file mode 100644 index 00000000000..0151e0f4a7b --- /dev/null +++ b/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/generated/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/ApiClientApi.java @@ -0,0 +1,228 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.9.0). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package com.bytechef.ee.automation.apiplatform.configuration.web.rest; + +import com.bytechef.ee.automation.apiplatform.configuration.web.rest.model.ApiClientModel; +import com.bytechef.ee.automation.apiplatform.configuration.web.rest.model.CreateApiClient200ResponseModel; +import io.swagger.v3.oas.annotations.ExternalDocumentation; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.ArraySchema; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.enums.ParameterIn; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import jakarta.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-11-15T12:48:42.005777+01:00[Europe/Zagreb]", comments = "Generator version: 7.9.0") +@Validated +@Tag(name = "api-client", description = "The Automation API Platform Client Internal API") +public interface ApiClientApi { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * POST /api-clients : Create a new API client + * Create a new API client. + * + * @param apiClientModel (required) + * @return The secret API key object. (status code 200) + */ + @Operation( + operationId = "createApiClient", + summary = "Create a new API client", + description = "Create a new API client.", + tags = { "api-client" }, + responses = { + @ApiResponse(responseCode = "200", description = "The secret API key object.", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = CreateApiClient200ResponseModel.class)) + }) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/api-clients", + produces = { "application/json" }, + consumes = { "application/json" } + ) + + default ResponseEntity createApiClient( + @Parameter(name = "ApiClientModel", description = "", required = true) @Valid @RequestBody ApiClientModel apiClientModel + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"secretKey\" : \"secretKey\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * DELETE /api-client/{id} : Delete an API client + * Delete an API client. + * + * @param id The id of an API client. (required) + * @return Successful operation. (status code 204) + */ + @Operation( + operationId = "deleteApiClient", + summary = "Delete an API client", + description = "Delete an API client.", + tags = { "api-client" }, + responses = { + @ApiResponse(responseCode = "204", description = "Successful operation.") + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/api-client/{id}" + ) + + default ResponseEntity deleteApiClient( + @Parameter(name = "id", description = "The id of an API client.", required = true, in = ParameterIn.PATH) @PathVariable("id") Long id + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /api-client/{id} : Get an API client by id + * Get an API client by id. + * + * @param id The id of an API client. (required) + * @return The API client object. (status code 200) + */ + @Operation( + operationId = "getApiClient", + summary = "Get an API client by id", + description = "Get an API client by id.", + tags = { "api-client" }, + responses = { + @ApiResponse(responseCode = "200", description = "The API client object.", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = ApiClientModel.class)) + }) + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/api-client/{id}", + produces = { "application/json" } + ) + + default ResponseEntity getApiClient( + @Parameter(name = "id", description = "The id of an API client.", required = true, in = ParameterIn.PATH) @PathVariable("id") Long id + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"createdDate\" : \"2000-01-23T04:56:07.000+00:00\", \"lastUsedDate\" : \"2000-01-23T04:56:07.000+00:00\", \"secretKey\" : \"secretKey\", \"createdBy\" : \"createdBy\", \"lastModifiedDate\" : \"2000-01-23T04:56:07.000+00:00\", \"lastModifiedBy\" : \"lastModifiedBy\", \"name\" : \"name\", \"id\" : 0 }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /api-clients : Get API clients + * Get API clients. + * + * @return The list of API clients. (status code 200) + */ + @Operation( + operationId = "getApiClients", + summary = "Get API clients", + description = "Get API clients.", + tags = { "api-client" }, + responses = { + @ApiResponse(responseCode = "200", description = "The list of API clients.", content = { + @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = ApiClientModel.class))) + }) + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/api-clients", + produces = { "application/json" } + ) + + default ResponseEntity> getApiClients( + + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "[ { \"createdDate\" : \"2000-01-23T04:56:07.000+00:00\", \"lastUsedDate\" : \"2000-01-23T04:56:07.000+00:00\", \"secretKey\" : \"secretKey\", \"createdBy\" : \"createdBy\", \"lastModifiedDate\" : \"2000-01-23T04:56:07.000+00:00\", \"lastModifiedBy\" : \"lastModifiedBy\", \"name\" : \"name\", \"id\" : 0 }, { \"createdDate\" : \"2000-01-23T04:56:07.000+00:00\", \"lastUsedDate\" : \"2000-01-23T04:56:07.000+00:00\", \"secretKey\" : \"secretKey\", \"createdBy\" : \"createdBy\", \"lastModifiedDate\" : \"2000-01-23T04:56:07.000+00:00\", \"lastModifiedBy\" : \"lastModifiedBy\", \"name\" : \"name\", \"id\" : 0 } ]"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * PUT /api-client/{id} : Update an existing API client + * Update an existing API client. + * + * @param id The id of an API client. (required) + * @param apiClientModel (required) + * @return Successful operation. (status code 204) + */ + @Operation( + operationId = "updateApiClient", + summary = "Update an existing API client", + description = "Update an existing API client.", + tags = { "api-client" }, + responses = { + @ApiResponse(responseCode = "204", description = "Successful operation.") + } + ) + @RequestMapping( + method = RequestMethod.PUT, + value = "/api-client/{id}", + consumes = { "application/json" } + ) + + default ResponseEntity updateApiClient( + @Parameter(name = "id", description = "The id of an API client.", required = true, in = ParameterIn.PATH) @PathVariable("id") Long id, + @Parameter(name = "ApiClientModel", description = "", required = true) @Valid @RequestBody ApiClientModel apiClientModel + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/generated/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/ApiCollectionApi.java b/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/generated/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/ApiCollectionApi.java index 7b99b8e1992..fd0741edbab 100644 --- a/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/generated/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/ApiCollectionApi.java +++ b/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/generated/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/ApiCollectionApi.java @@ -32,7 +32,7 @@ import java.util.Optional; import jakarta.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-11-07T12:07:57.901582+01:00[Europe/Zagreb]", comments = "Generator version: 7.9.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-11-15T12:48:42.005777+01:00[Europe/Zagreb]", comments = "Generator version: 7.9.0") @Validated @Tag(name = "api-collection", description = "The Automation API Platform Collection Internal API") public interface ApiCollectionApi { diff --git a/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/generated/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/ApiCollectionEndpointApi.java b/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/generated/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/ApiCollectionEndpointApi.java index 16a6b9938c6..8cfe17558ce 100644 --- a/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/generated/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/ApiCollectionEndpointApi.java +++ b/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/generated/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/ApiCollectionEndpointApi.java @@ -32,7 +32,7 @@ import java.util.Optional; import jakarta.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-11-07T12:07:57.901582+01:00[Europe/Zagreb]", comments = "Generator version: 7.9.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-11-15T12:48:42.005777+01:00[Europe/Zagreb]", comments = "Generator version: 7.9.0") @Validated @Tag(name = "api-collection-endpoint", description = "The Automation API Platform Collection Endpoint Internal API") public interface ApiCollectionEndpointApi { diff --git a/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/generated/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/ApiCollectionTagApi.java b/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/generated/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/ApiCollectionTagApi.java index 4c7ecfab96c..fc81b0b3fb7 100644 --- a/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/generated/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/ApiCollectionTagApi.java +++ b/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/generated/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/ApiCollectionTagApi.java @@ -32,7 +32,7 @@ import java.util.Optional; import jakarta.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-11-07T12:07:57.901582+01:00[Europe/Zagreb]", comments = "Generator version: 7.9.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-11-15T12:48:42.005777+01:00[Europe/Zagreb]", comments = "Generator version: 7.9.0") @Validated @Tag(name = "api-collection-tag", description = "The Automation API Platform Collection Tag Internal API") public interface ApiCollectionTagApi { diff --git a/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/generated/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/model/ApiClientModel.java b/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/generated/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/model/ApiClientModel.java new file mode 100644 index 00000000000..5d916f32e48 --- /dev/null +++ b/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/generated/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/model/ApiClientModel.java @@ -0,0 +1,271 @@ +package com.bytechef.ee.automation.apiplatform.configuration.web.rest.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.time.LocalDateTime; +import org.springframework.format.annotation.DateTimeFormat; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * Contains generated key required for calling API. + */ + +@Schema(name = "ApiClient", description = "Contains generated key required for calling API.") +@JsonTypeName("ApiClient") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-11-15T12:48:42.005777+01:00[Europe/Zagreb]", comments = "Generator version: 7.9.0") +public class ApiClientModel { + + private String createdBy; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private LocalDateTime createdDate; + + private Long id; + + private String lastModifiedBy; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private LocalDateTime lastModifiedDate; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private LocalDateTime lastUsedDate; + + private String name; + + private String secretKey; + + public ApiClientModel() { + super(); + } + + /** + * Constructor with only required parameters + */ + public ApiClientModel(String name, String secretKey) { + this.name = name; + this.secretKey = secretKey; + } + + public ApiClientModel createdBy(String createdBy) { + this.createdBy = createdBy; + return this; + } + + /** + * The created by. + * @return createdBy + */ + + @Schema(name = "createdBy", accessMode = Schema.AccessMode.READ_ONLY, description = "The created by.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("createdBy") + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public ApiClientModel createdDate(LocalDateTime createdDate) { + this.createdDate = createdDate; + return this; + } + + /** + * The created date. + * @return createdDate + */ + @Valid + @Schema(name = "createdDate", accessMode = Schema.AccessMode.READ_ONLY, description = "The created date.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("createdDate") + public LocalDateTime getCreatedDate() { + return createdDate; + } + + public void setCreatedDate(LocalDateTime createdDate) { + this.createdDate = createdDate; + } + + public ApiClientModel id(Long id) { + this.id = id; + return this; + } + + /** + * The id of an API key. + * @return id + */ + + @Schema(name = "id", accessMode = Schema.AccessMode.READ_ONLY, description = "The id of an API key.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("id") + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public ApiClientModel lastModifiedBy(String lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + return this; + } + + /** + * The last modified by. + * @return lastModifiedBy + */ + + @Schema(name = "lastModifiedBy", accessMode = Schema.AccessMode.READ_ONLY, description = "The last modified by.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("lastModifiedBy") + public String getLastModifiedBy() { + return lastModifiedBy; + } + + public void setLastModifiedBy(String lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + } + + public ApiClientModel lastModifiedDate(LocalDateTime lastModifiedDate) { + this.lastModifiedDate = lastModifiedDate; + return this; + } + + /** + * The last modified date. + * @return lastModifiedDate + */ + @Valid + @Schema(name = "lastModifiedDate", accessMode = Schema.AccessMode.READ_ONLY, description = "The last modified date.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("lastModifiedDate") + public LocalDateTime getLastModifiedDate() { + return lastModifiedDate; + } + + public void setLastModifiedDate(LocalDateTime lastModifiedDate) { + this.lastModifiedDate = lastModifiedDate; + } + + public ApiClientModel lastUsedDate(LocalDateTime lastUsedDate) { + this.lastUsedDate = lastUsedDate; + return this; + } + + /** + * The last used date. + * @return lastUsedDate + */ + @Valid + @Schema(name = "lastUsedDate", accessMode = Schema.AccessMode.READ_ONLY, description = "The last used date.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("lastUsedDate") + public LocalDateTime getLastUsedDate() { + return lastUsedDate; + } + + public void setLastUsedDate(LocalDateTime lastUsedDate) { + this.lastUsedDate = lastUsedDate; + } + + public ApiClientModel name(String name) { + this.name = name; + return this; + } + + /** + * The name of an API key. + * @return name + */ + @NotNull + @Schema(name = "name", description = "The name of an API key.", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public ApiClientModel secretKey(String secretKey) { + this.secretKey = secretKey; + return this; + } + + /** + * The preview of secret API key. + * @return secretKey + */ + + @Schema(name = "secretKey", accessMode = Schema.AccessMode.READ_ONLY, description = "The preview of secret API key.", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("secretKey") + public String getSecretKey() { + return secretKey; + } + + public void setSecretKey(String secretKey) { + this.secretKey = secretKey; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApiClientModel _apiClient = (ApiClientModel) o; + return Objects.equals(this.createdBy, _apiClient.createdBy) && + Objects.equals(this.createdDate, _apiClient.createdDate) && + Objects.equals(this.id, _apiClient.id) && + Objects.equals(this.lastModifiedBy, _apiClient.lastModifiedBy) && + Objects.equals(this.lastModifiedDate, _apiClient.lastModifiedDate) && + Objects.equals(this.lastUsedDate, _apiClient.lastUsedDate) && + Objects.equals(this.name, _apiClient.name) && + Objects.equals(this.secretKey, _apiClient.secretKey); + } + + @Override + public int hashCode() { + return Objects.hash(createdBy, createdDate, id, lastModifiedBy, lastModifiedDate, lastUsedDate, name, secretKey); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApiClientModel {\n"); + sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n"); + sb.append(" createdDate: ").append(toIndentedString(createdDate)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" lastModifiedBy: ").append(toIndentedString(lastModifiedBy)).append("\n"); + sb.append(" lastModifiedDate: ").append(toIndentedString(lastModifiedDate)).append("\n"); + sb.append(" lastUsedDate: ").append(toIndentedString(lastUsedDate)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" secretKey: ").append(toIndentedString(secretKey)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/generated/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/model/ApiCollectionEndpointModel.java b/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/generated/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/model/ApiCollectionEndpointModel.java index 92f18c31782..ad370ea1c78 100644 --- a/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/generated/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/model/ApiCollectionEndpointModel.java +++ b/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/generated/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/model/ApiCollectionEndpointModel.java @@ -25,7 +25,7 @@ @Schema(name = "ApiCollectionEndpoint", description = "An API collection endpoint.") @JsonTypeName("ApiCollectionEndpoint") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-11-07T12:07:57.901582+01:00[Europe/Zagreb]", comments = "Generator version: 7.9.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-11-15T12:48:42.005777+01:00[Europe/Zagreb]", comments = "Generator version: 7.9.0") public class ApiCollectionEndpointModel { private Long apiCollectionId; diff --git a/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/generated/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/model/ApiCollectionModel.java b/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/generated/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/model/ApiCollectionModel.java index 433f43b91ba..bc667c22249 100644 --- a/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/generated/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/model/ApiCollectionModel.java +++ b/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/generated/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/model/ApiCollectionModel.java @@ -28,7 +28,7 @@ @Schema(name = "ApiCollection", description = "An API collection.") @JsonTypeName("ApiCollection") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-11-07T12:07:57.901582+01:00[Europe/Zagreb]", comments = "Generator version: 7.9.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-11-15T12:48:42.005777+01:00[Europe/Zagreb]", comments = "Generator version: 7.9.0") public class ApiCollectionModel { private Integer collectionVersion; diff --git a/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/generated/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/model/CreateApiClient200ResponseModel.java b/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/generated/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/model/CreateApiClient200ResponseModel.java new file mode 100644 index 00000000000..a709513d474 --- /dev/null +++ b/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/generated/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/model/CreateApiClient200ResponseModel.java @@ -0,0 +1,85 @@ +package com.bytechef.ee.automation.apiplatform.configuration.web.rest.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * CreateApiClient200ResponseModel + */ + +@JsonTypeName("createApiClient_200_response") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-11-15T12:48:42.005777+01:00[Europe/Zagreb]", comments = "Generator version: 7.9.0") +public class CreateApiClient200ResponseModel { + + private String secretKey; + + public CreateApiClient200ResponseModel secretKey(String secretKey) { + this.secretKey = secretKey; + return this; + } + + /** + * The secret API key. + * @return secretKey + */ + + @Schema(name = "secretKey", description = "The secret API key.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("secretKey") + public String getSecretKey() { + return secretKey; + } + + public void setSecretKey(String secretKey) { + this.secretKey = secretKey; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateApiClient200ResponseModel createApiClient200Response = (CreateApiClient200ResponseModel) o; + return Objects.equals(this.secretKey, createApiClient200Response.secretKey); + } + + @Override + public int hashCode() { + return Objects.hash(secretKey); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateApiClient200ResponseModel {\n"); + sb.append(" secretKey: ").append(toIndentedString(secretKey)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/generated/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/model/HttpMethodModel.java b/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/generated/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/model/HttpMethodModel.java index 3f8ab50a16b..dfd35f3d0cb 100644 --- a/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/generated/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/model/HttpMethodModel.java +++ b/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/generated/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/model/HttpMethodModel.java @@ -20,7 +20,7 @@ * The endpoint HTTP method. */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-11-07T12:07:57.901582+01:00[Europe/Zagreb]", comments = "Generator version: 7.9.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-11-15T12:48:42.005777+01:00[Europe/Zagreb]", comments = "Generator version: 7.9.0") public enum HttpMethodModel { DELETE("DELETE"), From f99b9d784f6b8584ca7962c726698a2c86304a7e Mon Sep 17 00:00:00 2001 From: Ivica Cardic Date: Fri, 15 Nov 2024 06:55:40 +0100 Subject: [PATCH 10/18] 1023 - client - Generate --- .../api-platform/.openapi-generator/FILES | 3 + .../api-platform/apis/ApiClientApi.ts | 229 ++++++++++++++++++ .../automation/api-platform/apis/index.ts | 1 + .../api-platform/models/ApiClient.ts | 116 +++++++++ .../models/CreateApiClient200Response.ts | 65 +++++ .../automation/api-platform/models/index.ts | 2 + .../automation/api-platform/runtime.ts | 4 +- 7 files changed, 418 insertions(+), 2 deletions(-) create mode 100644 client/src/middleware/automation/api-platform/apis/ApiClientApi.ts create mode 100644 client/src/middleware/automation/api-platform/models/ApiClient.ts create mode 100644 client/src/middleware/automation/api-platform/models/CreateApiClient200Response.ts diff --git a/client/src/middleware/automation/api-platform/.openapi-generator/FILES b/client/src/middleware/automation/api-platform/.openapi-generator/FILES index b7e46d5a761..f7033b402df 100644 --- a/client/src/middleware/automation/api-platform/.openapi-generator/FILES +++ b/client/src/middleware/automation/api-platform/.openapi-generator/FILES @@ -1,10 +1,13 @@ +apis/ApiClientApi.ts apis/ApiCollectionApi.ts apis/ApiCollectionEndpointApi.ts apis/ApiCollectionTagApi.ts apis/index.ts index.ts +models/ApiClient.ts models/ApiCollection.ts models/ApiCollectionEndpoint.ts +models/CreateApiClient200Response.ts models/Environment.ts models/HttpMethod.ts models/ProjectBasic.ts diff --git a/client/src/middleware/automation/api-platform/apis/ApiClientApi.ts b/client/src/middleware/automation/api-platform/apis/ApiClientApi.ts new file mode 100644 index 00000000000..68b89a6b042 --- /dev/null +++ b/client/src/middleware/automation/api-platform/apis/ApiClientApi.ts @@ -0,0 +1,229 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * The Automation API Platform Internal API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ApiClient, + CreateApiClient200Response, +} from '../models/index'; +import { + ApiClientFromJSON, + ApiClientToJSON, + CreateApiClient200ResponseFromJSON, + CreateApiClient200ResponseToJSON, +} from '../models/index'; + +export interface CreateApiClientRequest { + apiClient: Omit; +} + +export interface DeleteApiClientRequest { + id: number; +} + +export interface GetApiClientRequest { + id: number; +} + +export interface UpdateApiClientRequest { + id: number; + apiClient: Omit; +} + +/** + * + */ +export class ApiClientApi extends runtime.BaseAPI { + + /** + * Create a new API client. + * Create a new API client + */ + async createApiClientRaw(requestParameters: CreateApiClientRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['apiClient'] == null) { + throw new runtime.RequiredError( + 'apiClient', + 'Required parameter "apiClient" was null or undefined when calling createApiClient().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/api-clients`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ApiClientToJSON(requestParameters['apiClient']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CreateApiClient200ResponseFromJSON(jsonValue)); + } + + /** + * Create a new API client. + * Create a new API client + */ + async createApiClient(requestParameters: CreateApiClientRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.createApiClientRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Delete an API client. + * Delete an API client + */ + async deleteApiClientRaw(requestParameters: DeleteApiClientRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling deleteApiClient().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/api-client/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Delete an API client. + * Delete an API client + */ + async deleteApiClient(requestParameters: DeleteApiClientRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.deleteApiClientRaw(requestParameters, initOverrides); + } + + /** + * Get an API client by id. + * Get an API client by id + */ + async getApiClientRaw(requestParameters: GetApiClientRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling getApiClient().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/api-client/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ApiClientFromJSON(jsonValue)); + } + + /** + * Get an API client by id. + * Get an API client by id + */ + async getApiClient(requestParameters: GetApiClientRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getApiClientRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Get API clients. + * Get API clients + */ + async getApiClientsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/api-clients`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ApiClientFromJSON)); + } + + /** + * Get API clients. + * Get API clients + */ + async getApiClients(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.getApiClientsRaw(initOverrides); + return await response.value(); + } + + /** + * Update an existing API client. + * Update an existing API client + */ + async updateApiClientRaw(requestParameters: UpdateApiClientRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling updateApiClient().' + ); + } + + if (requestParameters['apiClient'] == null) { + throw new runtime.RequiredError( + 'apiClient', + 'Required parameter "apiClient" was null or undefined when calling updateApiClient().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/api-client/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: ApiClientToJSON(requestParameters['apiClient']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Update an existing API client. + * Update an existing API client + */ + async updateApiClient(requestParameters: UpdateApiClientRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.updateApiClientRaw(requestParameters, initOverrides); + } + +} diff --git a/client/src/middleware/automation/api-platform/apis/index.ts b/client/src/middleware/automation/api-platform/apis/index.ts index e5671619707..6a154a8bf80 100644 --- a/client/src/middleware/automation/api-platform/apis/index.ts +++ b/client/src/middleware/automation/api-platform/apis/index.ts @@ -1,5 +1,6 @@ /* tslint:disable */ /* eslint-disable */ +export * from './ApiClientApi'; export * from './ApiCollectionApi'; export * from './ApiCollectionEndpointApi'; export * from './ApiCollectionTagApi'; diff --git a/client/src/middleware/automation/api-platform/models/ApiClient.ts b/client/src/middleware/automation/api-platform/models/ApiClient.ts new file mode 100644 index 00000000000..55bc7674dcb --- /dev/null +++ b/client/src/middleware/automation/api-platform/models/ApiClient.ts @@ -0,0 +1,116 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * The Automation API Platform Internal API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Contains generated key required for calling API. + * @export + * @interface ApiClient + */ +export interface ApiClient { + /** + * The created by. + * @type {string} + * @memberof ApiClient + */ + readonly createdBy?: string; + /** + * The created date. + * @type {Date} + * @memberof ApiClient + */ + readonly createdDate?: Date; + /** + * The id of an API key. + * @type {number} + * @memberof ApiClient + */ + readonly id?: number; + /** + * The last modified by. + * @type {string} + * @memberof ApiClient + */ + readonly lastModifiedBy?: string; + /** + * The last modified date. + * @type {Date} + * @memberof ApiClient + */ + readonly lastModifiedDate?: Date; + /** + * The last used date. + * @type {Date} + * @memberof ApiClient + */ + readonly lastUsedDate?: Date; + /** + * The name of an API key. + * @type {string} + * @memberof ApiClient + */ + name: string; + /** + * The preview of secret API key. + * @type {string} + * @memberof ApiClient + */ + readonly secretKey: string; +} + +/** + * Check if a given object implements the ApiClient interface. + */ +export function instanceOfApiClient(value: object): value is ApiClient { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('secretKey' in value) || value['secretKey'] === undefined) return false; + return true; +} + +export function ApiClientFromJSON(json: any): ApiClient { + return ApiClientFromJSONTyped(json, false); +} + +export function ApiClientFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiClient { + if (json == null) { + return json; + } + return { + + 'createdBy': json['createdBy'] == null ? undefined : json['createdBy'], + 'createdDate': json['createdDate'] == null ? undefined : (new Date(json['createdDate'])), + 'id': json['id'] == null ? undefined : json['id'], + 'lastModifiedBy': json['lastModifiedBy'] == null ? undefined : json['lastModifiedBy'], + 'lastModifiedDate': json['lastModifiedDate'] == null ? undefined : (new Date(json['lastModifiedDate'])), + 'lastUsedDate': json['lastUsedDate'] == null ? undefined : (new Date(json['lastUsedDate'])), + 'name': json['name'], + 'secretKey': json['secretKey'], + }; +} + + export function ApiClientToJSON(json: any): ApiClient { + return ApiClientToJSONTyped(json, false); + } + + export function ApiClientToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + }; +} + diff --git a/client/src/middleware/automation/api-platform/models/CreateApiClient200Response.ts b/client/src/middleware/automation/api-platform/models/CreateApiClient200Response.ts new file mode 100644 index 00000000000..5065c01e25c --- /dev/null +++ b/client/src/middleware/automation/api-platform/models/CreateApiClient200Response.ts @@ -0,0 +1,65 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * The Automation API Platform Internal API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface CreateApiClient200Response + */ +export interface CreateApiClient200Response { + /** + * The secret API key. + * @type {string} + * @memberof CreateApiClient200Response + */ + secretKey?: string; +} + +/** + * Check if a given object implements the CreateApiClient200Response interface. + */ +export function instanceOfCreateApiClient200Response(value: object): value is CreateApiClient200Response { + return true; +} + +export function CreateApiClient200ResponseFromJSON(json: any): CreateApiClient200Response { + return CreateApiClient200ResponseFromJSONTyped(json, false); +} + +export function CreateApiClient200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateApiClient200Response { + if (json == null) { + return json; + } + return { + + 'secretKey': json['secretKey'] == null ? undefined : json['secretKey'], + }; +} + + export function CreateApiClient200ResponseToJSON(json: any): CreateApiClient200Response { + return CreateApiClient200ResponseToJSONTyped(json, false); + } + + export function CreateApiClient200ResponseToJSONTyped(value?: CreateApiClient200Response | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'secretKey': value['secretKey'], + }; +} + diff --git a/client/src/middleware/automation/api-platform/models/index.ts b/client/src/middleware/automation/api-platform/models/index.ts index a1f38e26589..8bc10c23c65 100644 --- a/client/src/middleware/automation/api-platform/models/index.ts +++ b/client/src/middleware/automation/api-platform/models/index.ts @@ -1,7 +1,9 @@ /* tslint:disable */ /* eslint-disable */ +export * from './ApiClient'; export * from './ApiCollection'; export * from './ApiCollectionEndpoint'; +export * from './CreateApiClient200Response'; export * from './Environment'; export * from './HttpMethod'; export * from './ProjectBasic'; diff --git a/client/src/middleware/automation/api-platform/runtime.ts b/client/src/middleware/automation/api-platform/runtime.ts index 3198a90a2c7..18c1555028e 100644 --- a/client/src/middleware/automation/api-platform/runtime.ts +++ b/client/src/middleware/automation/api-platform/runtime.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,7 +13,7 @@ */ -export const BASE_PATH = "/api/automation/internal".replace(/\/+$/, ""); +export const BASE_PATH = "/api/automation/api-platform/internal".replace(/\/+$/, ""); export interface ConfigurationParameters { basePath?: string; // override base path From 5d9c66c4bd53dbc9eda8abf64d4790e62aa8dfab Mon Sep 17 00:00:00 2001 From: Ivica Cardic Date: Thu, 14 Nov 2024 07:14:42 +0100 Subject: [PATCH 11/18] 1023 - client - Add API clients UI for API platform --- client/src/App.tsx | 2 +- .../ApiPlatformLeftSidebarNav.tsx | 109 +++++++++ .../api-platform/api-clients/ApiClients.tsx | 65 ++++++ .../components/ApiClientDialog.tsx | 188 ++++++++++++++++ .../api-clients/components/ApiClientTable.tsx | 212 ++++++++++++++++++ .../api-collections/ApiCollections.tsx | 126 +++-------- .../components/ApiCollectionsFilterTitle.tsx | 2 +- .../api-keys/components/ApiKeyDialog.tsx | 6 +- client/src/routes.tsx | 17 ++ .../platform/apiClients.mutations.ts | 51 +++++ .../queries/platform/apiClients.queries.ts | 14 ++ 11 files changed, 688 insertions(+), 104 deletions(-) create mode 100644 client/src/ee/pages/automation/api-platform/ApiPlatformLeftSidebarNav.tsx create mode 100644 client/src/ee/pages/automation/api-platform/api-clients/ApiClients.tsx create mode 100644 client/src/ee/pages/automation/api-platform/api-clients/components/ApiClientDialog.tsx create mode 100644 client/src/ee/pages/automation/api-platform/api-clients/components/ApiClientTable.tsx create mode 100644 client/src/shared/mutations/platform/apiClients.mutations.ts create mode 100644 client/src/shared/queries/platform/apiClients.queries.ts diff --git a/client/src/App.tsx b/client/src/App.tsx index 51dcf59b085..5d0cd7987e9 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -52,7 +52,7 @@ const automationNavigation: NavigationType[] = [ name: 'Project Instances', }, { - href: '/automation/api-platform/api-collections', + href: '/automation/api-platform', icon: LandmarkIcon, name: 'API Collections', }, diff --git a/client/src/ee/pages/automation/api-platform/ApiPlatformLeftSidebarNav.tsx b/client/src/ee/pages/automation/api-platform/ApiPlatformLeftSidebarNav.tsx new file mode 100644 index 00000000000..9f31c19a9f0 --- /dev/null +++ b/client/src/ee/pages/automation/api-platform/ApiPlatformLeftSidebarNav.tsx @@ -0,0 +1,109 @@ +import {Type} from '@/ee/pages/automation/api-platform/api-collections/ApiCollections'; +import {LeftSidebarNav, LeftSidebarNavItem} from '@/shared/layout/LeftSidebarNav'; +import {Project, Tag} from '@/shared/middleware/automation/configuration'; +import {TagIcon} from 'lucide-react'; +import {useLocation} from 'react-router-dom'; + +interface ApiPlatformLeftSidebarNavProps { + environment?: number; + filterData?: {id?: number; type: Type}; + projects: Project[] | undefined; + tags: Tag[] | undefined; +} + +const ApiPlatformLeftSidebarNav = ({environment, filterData, projects, tags}: ApiPlatformLeftSidebarNavProps) => { + const location = useLocation(); + + return ( + <> + + {[{label: 'All Environments'}, {label: 'Test', value: 1}, {label: 'Production', value: 2}]?.map( + (item) => ( + + ) + )} + + } + title="Environments" + /> + + + + + {projects && + projects?.map((item) => ( + + ))} + + } + title="Projects" + /> + + + {tags && !!tags.length ? ( + tags?.map((item) => ( + } + item={{ + current: filterData?.id === item.id && filterData?.type === Type.Tag, + id: item.id!, + name: item.name, + }} + key={item.id} + toLink={`?tagId=${item.id}&environment=${environment ?? ''}`} + /> + )) + ) : ( + No defined tags. + )} + + } + title="Tags" + /> + + + } + /> + + ); +}; + +export default ApiPlatformLeftSidebarNav; diff --git a/client/src/ee/pages/automation/api-platform/api-clients/ApiClients.tsx b/client/src/ee/pages/automation/api-platform/api-clients/ApiClients.tsx new file mode 100644 index 00000000000..0b314a51994 --- /dev/null +++ b/client/src/ee/pages/automation/api-platform/api-clients/ApiClients.tsx @@ -0,0 +1,65 @@ +import EmptyList from '@/components/EmptyList'; +import PageLoader from '@/components/PageLoader'; +import {Button} from '@/components/ui/button'; +import ApiPlatformLeftSidebarNav from '@/ee/pages/automation/api-platform/ApiPlatformLeftSidebarNav'; +import ApiClientDialog from '@/ee/pages/automation/api-platform/api-clients/components/ApiClientDialog'; +import ApiClientTable from '@/ee/pages/automation/api-platform/api-clients/components/ApiClientTable'; +import {useGetApiCollectionTagsQuery} from '@/ee/queries/apiCollectionTags.queries'; +import {useWorkspaceStore} from '@/pages/automation/stores/useWorkspaceStore'; +import Header from '@/shared/layout/Header'; +import LayoutContainer from '@/shared/layout/LayoutContainer'; +import {useGetWorkspaceProjectsQuery} from '@/shared/queries/automation/projects.queries'; +import {useGetApiClientsQuery} from '@/shared/queries/platform/apiClients.queries'; +import {KeyIcon} from 'lucide-react'; +import {useState} from 'react'; + +const ApiClients = () => { + const [showEditDialog, setShowEditDialog] = useState(false); + + const {currentWorkspaceId} = useWorkspaceStore(); + + const {data: apiKeys, error: apiKeysError, isLoading: apiKeysLoading} = useGetApiClientsQuery(); + + const {data: projects} = useGetWorkspaceProjectsQuery({ + id: currentWorkspaceId!, + projectInstances: true, + }); + + const {data: tags} = useGetApiCollectionTagsQuery(); + + return ( + + 0 && New API Client} /> + } + title="API Clients" + /> + } + leftSidebarBody={} + leftSidebarHeader={
} + leftSidebarWidth="64" + > + {apiKeys && apiKeys.length > 0 ? ( + + ) : ( + setShowEditDialog(true)}>New API Client} + icon={} + message="Get started by creating a new API client." + title="No API Clients" + /> + )} + + {showEditDialog && setShowEditDialog(false)} />} + + + ); +}; + +export default ApiClients; diff --git a/client/src/ee/pages/automation/api-platform/api-clients/components/ApiClientDialog.tsx b/client/src/ee/pages/automation/api-platform/api-clients/components/ApiClientDialog.tsx new file mode 100644 index 00000000000..a248b70eb21 --- /dev/null +++ b/client/src/ee/pages/automation/api-platform/api-clients/components/ApiClientDialog.tsx @@ -0,0 +1,188 @@ +import {Button} from '@/components/ui/button'; +import { + Dialog, + DialogClose, + DialogContent, + DialogFooter, + DialogHeader, + DialogTitle, + DialogTrigger, +} from '@/components/ui/dialog'; +import {Form, FormControl, FormField, FormItem, FormLabel, FormMessage} from '@/components/ui/form'; +import {Input} from '@/components/ui/input'; +import {useToast} from '@/hooks/use-toast'; +import {ApiClient} from '@/middleware/automation/api-platform'; +import {useCreateApiClientMutation, useUpdateApiClientMutation} from '@/shared/mutations/platform/apiClients.mutations'; +import {ApiClientKeys} from '@/shared/queries/platform/apiClients.queries'; +import {zodResolver} from '@hookform/resolvers/zod'; +import {useQueryClient} from '@tanstack/react-query'; +import {useCopyToClipboard} from '@uidotdev/usehooks'; +import {ClipboardIcon} from 'lucide-react'; +import {ReactNode, useState} from 'react'; +import {useForm} from 'react-hook-form'; +import {z} from 'zod'; + +const formSchema = z.object({ + name: z.string().min(2, { + message: 'Name must be at least 2 characters.', + }), +}); + +interface ApiClientDialogProps { + apiClient?: ApiClient; + onClose?: () => void; + triggerNode?: ReactNode; +} + +const ApiClientDialog = ({apiClient, onClose, triggerNode}: ApiClientDialogProps) => { + const [isOpen, setIsOpen] = useState(!triggerNode); + const [secretApiKey, setSecretApiKey] = useState(); + + /* eslint-disable @typescript-eslint/no-unused-vars */ + const [_, copyToClipboard] = useCopyToClipboard(); + const {toast} = useToast(); + + const form = useForm>({ + defaultValues: { + name: apiClient?.name || '', + }, + resolver: zodResolver(formSchema), + }); + + const {control, getValues, handleSubmit, reset} = form; + + const queryClient = useQueryClient(); + + const createApiClientMutation = useCreateApiClientMutation({ + onSuccess: (result: {secretKey?: string}) => { + queryClient.invalidateQueries({ + queryKey: ApiClientKeys.apiClients, + }); + + setSecretApiKey(result.secretKey); + + reset(); + }, + }); + const updateApiClientMutation = useUpdateApiClientMutation({ + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: ApiClientKeys.apiClients, + }); + + closeDialog(); + }, + }); + + function closeDialog() { + setIsOpen(false); + + if (onClose) { + onClose(); + } + + reset(); + setSecretApiKey(undefined); + } + + function saveApiClient() { + if (apiClient?.id) { + updateApiClientMutation.mutate({ + ...apiClient, + ...getValues(), + } as ApiClient); + } else { + createApiClientMutation.mutate({ + ...apiClient, + ...getValues(), + } as ApiClient); + } + } + + return ( + { + if (isOpen) { + setIsOpen(isOpen); + } else { + closeDialog(); + } + }} + open={isOpen} + > + {triggerNode && {triggerNode}} + + +
+ + +
+ + {secretApiKey + ? 'Save your secret API key' + : `${apiClient?.id ? 'Edit' : 'Create'} API Client`} + +
+
+ + {secretApiKey ? ( +
+

+ Please save this secret API key somewhere safe and accessible. For security reasons, + you won't be able to view it again through your ByteChef account. If you lose + this secret API key, you'll need to generate a new one. +

+ +
+ + + +
+
+ ) : ( + <> + ( + + Name + + + + + + + + )} + /> + + )} + + + + + + + {!secretApiKey && ( + + )} + + + +
+
+ ); +}; + +export default ApiClientDialog; diff --git a/client/src/ee/pages/automation/api-platform/api-clients/components/ApiClientTable.tsx b/client/src/ee/pages/automation/api-platform/api-clients/components/ApiClientTable.tsx new file mode 100644 index 00000000000..e2dd895ca4a --- /dev/null +++ b/client/src/ee/pages/automation/api-platform/api-clients/components/ApiClientTable.tsx @@ -0,0 +1,212 @@ +import { + AlertDialog, + AlertDialogAction, + AlertDialogCancel, + AlertDialogContent, + AlertDialogDescription, + AlertDialogFooter, + AlertDialogHeader, + AlertDialogTitle, +} from '@/components/ui/alert-dialog'; +import {Button} from '@/components/ui/button'; +import {Table, TableBody, TableCell, TableHead, TableHeader, TableRow} from '@/components/ui/table'; +import ApiClientDialog from '@/ee/pages/automation/api-platform/api-clients/components/ApiClientDialog'; +import {ApiClient} from '@/middleware/automation/api-platform'; +import {useDeleteApiClientMutation} from '@/shared/mutations/platform/apiClients.mutations'; +import {ApiClientKeys} from '@/shared/queries/platform/apiClients.queries'; +import {useQueryClient} from '@tanstack/react-query'; +import {createColumnHelper, flexRender, getCoreRowModel, useReactTable} from '@tanstack/react-table'; +import {EditIcon, Trash2Icon} from 'lucide-react'; +import {useMemo, useState} from 'react'; +import {twMerge} from 'tailwind-merge'; + +const columnHelper = createColumnHelper(); + +interface ApiClientTableProps { + apiClients: ApiClient[]; +} + +const ApiClientDeleteDialog = ({apiClientId, onClose}: {apiClientId: number; onClose: () => void}) => { + const queryClient = useQueryClient(); + + const deleteApiClientMutation = useDeleteApiClientMutation({ + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: ApiClientKeys.apiClients, + }); + + onClose(); + }, + }); + + const handleClick = () => { + deleteApiClientMutation.mutate(apiClientId); + }; + + return ( + + + + Are you absolutely sure? + + + This action cannot be undone. This will permanently delete the project and workflows it + contains. + + + + + Cancel + + + Delete + + + + + ); +}; + +const ApiClientTable = ({apiClients}: ApiClientTableProps) => { + const [currentApiClient, setCurrentApiClient] = useState(); + const [showDeleteDialog, setShowDeleteDialog] = useState(false); + const [showEditDialog, setShowEditDialog] = useState(false); + + const columns = useMemo( + () => [ + columnHelper.accessor('name', { + cell: (info) => info.getValue() ?? '', + header: 'Name', + }), + columnHelper.accessor('secretKey', { + cell: (info) => info.getValue() ?? '', + header: 'Secret Key', + }), + columnHelper.accessor('createdDate', { + cell: (info) => `${info.getValue()?.toLocaleDateString()} ${info.getValue()?.toLocaleTimeString()}`, + header: 'Created Date', + }), + columnHelper.accessor('lastUsedDate', { + cell: (info) => + `${info.getValue()?.toLocaleDateString() ?? ''} ${info.getValue()?.toLocaleTimeString() ?? ''}`, + header: 'Last Used Date', + }), + columnHelper.display({ + cell: (info) => ( + <> + + + + + ), + header: '', + id: 'actions', + }), + ], + [] + ); + + const reactTable = useReactTable({ + columns, + data: apiClients, + getCoreRowModel: getCoreRowModel(), + }); + + const headerGroups = reactTable.getHeaderGroups(); + const rows = reactTable.getRowModel().rows; + + return ( +
+

+ API clients and their secret API keys are listed below. Please note that we do not display your secret + API keys again after you generate them. +

+ +

+ Do not expose it in the browser or other client-side code. In order to protect the security of your + account, ByteChef may also automatically disable any API key that we have found has leaked publicly. +

+ + + + {headerGroups.map((headerGroup) => ( + + {headerGroup.headers.map((header) => ( + + {!header.isPlaceholder && + flexRender(header.column.columnDef.header, header.getContext())} + + ))} + + ))} + + + + {rows.map((row) => ( + + {row.getVisibleCells().map((cell) => ( + { + if (cell.id.endsWith('actions')) { + /* eslint-disable-next-line @typescript-eslint/no-explicit-any */ + const target = event.target as any; + + if (target.getAttribute('data-action') === 'delete') { + setCurrentApiClient(apiClients[target.getAttribute('data-index')]); + + setShowDeleteDialog(true); + } else if (target.getAttribute('data-action') === 'edit') { + setCurrentApiClient(apiClients[target.getAttribute('data-index')]); + + setShowEditDialog(true); + } + } + }} + > + {flexRender(cell.column.columnDef.cell, cell.getContext())} + + ))} + + ))} + +
+ + {showDeleteDialog && currentApiClient && ( + setShowDeleteDialog(false)} /> + )} + + {showEditDialog && ( + setShowEditDialog(false)} /> + )} +
+ ); +}; + +export default ApiClientTable; diff --git a/client/src/ee/pages/automation/api-platform/api-collections/ApiCollections.tsx b/client/src/ee/pages/automation/api-platform/api-collections/ApiCollections.tsx index d902ec0df01..869e28c45a2 100644 --- a/client/src/ee/pages/automation/api-platform/api-collections/ApiCollections.tsx +++ b/client/src/ee/pages/automation/api-platform/api-collections/ApiCollections.tsx @@ -1,6 +1,7 @@ import EmptyList from '@/components/EmptyList'; import PageLoader from '@/components/PageLoader'; import {Button} from '@/components/ui/button'; +import ApiPlatformLeftSidebarNav from '@/ee/pages/automation/api-platform/ApiPlatformLeftSidebarNav'; import ApiCollectionDialog from '@/ee/pages/automation/api-platform/api-collections/components/ApiCollectionDialog'; import ApiCollectionsFilterTitle from '@/ee/pages/automation/api-platform/api-collections/components/ApiCollectionsFilterTitle'; import {useGetApiCollectionTagsQuery} from '@/ee/queries/apiCollectionTags.queries'; @@ -9,37 +10,38 @@ import {Environment} from '@/middleware/automation/api-platform'; import {useWorkspaceStore} from '@/pages/automation/stores/useWorkspaceStore'; import Header from '@/shared/layout/Header'; import LayoutContainer from '@/shared/layout/LayoutContainer'; -import {LeftSidebarNav, LeftSidebarNavItem} from '@/shared/layout/LeftSidebarNav'; import {useGetWorkspaceProjectsQuery} from '@/shared/queries/automation/projects.queries'; -import {Link2Icon, TagIcon} from 'lucide-react'; -import {useState} from 'react'; -import {useSearchParams} from 'react-router-dom'; +import {Link2Icon} from 'lucide-react'; +import {useLocation, useSearchParams} from 'react-router-dom'; import ApiCollectionList from './components/ApiCollectionList'; export enum Type { + ApiKeys, Project, Tag, } const ApiCollections = () => { - const [searchParams] = useSearchParams(); - - const [environment, setEnvironment] = useState( - searchParams.get('environment') ? parseInt(searchParams.get('environment')!) : undefined - ); - + console.log('ApiCollections'); const {currentWorkspaceId} = useWorkspaceStore(); - const filterData = - searchParams.get('projectId') || searchParams.get('tagId') - ? { - id: searchParams.get('projectId') - ? parseInt(searchParams.get('projectId')!) - : parseInt(searchParams.get('tagId')!), - type: searchParams.get('tagId') ? Type.Tag : Type.Project, - } - : {type: Type.Project}; + const location = useLocation(); + const [searchParams] = useSearchParams(); + + const environment = searchParams.get('environment') ? parseInt(searchParams.get('environment')!) : undefined; + const filterData = location.pathname.includes('api-keys') + ? { + type: Type.ApiKeys, + } + : searchParams.get('projectId') || searchParams.get('tagId') + ? { + id: searchParams.get('projectId') + ? parseInt(searchParams.get('projectId')!) + : parseInt(searchParams.get('tagId')!), + type: searchParams.get('tagId') ? Type.Tag : Type.Project, + } + : {type: Type.Project}; const { data: projects, @@ -85,86 +87,12 @@ const ApiCollections = () => { ) } leftSidebarBody={ - <> - - {[ - {label: 'All Environments'}, - {label: 'Test', value: 1}, - {label: 'Production', value: 2}, - ]?.map((item) => ( - { - setEnvironment(id as number); - }, - }} - key={item.value ?? ''} - toLink={`?environment=${item.value ?? ''}${filterData.id ? `&${filterData.type === Type.Project ? 'projectId' : 'tagId'}=${filterData.id}` : ''}`} - /> - ))} - - } - title="Environments" - /> - - - - - {projects && - projects?.map((item) => ( - - ))} - - } - title="Projects" - /> - - - {!tagsIsLoading && - (tags && !!tags.length ? ( - tags?.map((item) => ( - } - item={{ - current: filterData?.id === item.id && filterData.type === Type.Tag, - id: item.id!, - name: item.name, - }} - key={item.id} - toLink={`?tagId=${item.id}&environment=${environment ?? ''}`} - /> - )) - ) : ( - No defined tags. - ))} - - } - title="Tags" - /> - + } leftSidebarHeader={
} leftSidebarWidth="64" diff --git a/client/src/ee/pages/automation/api-platform/api-collections/components/ApiCollectionsFilterTitle.tsx b/client/src/ee/pages/automation/api-platform/api-collections/components/ApiCollectionsFilterTitle.tsx index 00745ed57d7..5bf2a7aa053 100644 --- a/client/src/ee/pages/automation/api-platform/api-collections/components/ApiCollectionsFilterTitle.tsx +++ b/client/src/ee/pages/automation/api-platform/api-collections/components/ApiCollectionsFilterTitle.tsx @@ -1,5 +1,5 @@ import {Badge} from '@/components/ui/badge'; -import {Type} from '@/pages/automation/project-instances/ProjectInstances'; +import {Type} from '@/ee/pages/automation/api-platform/api-collections/ApiCollections'; import {Project, Tag} from '@/shared/middleware/automation/configuration'; import {ReactNode} from 'react'; import {useSearchParams} from 'react-router-dom'; diff --git a/client/src/pages/platform/settings/api-keys/components/ApiKeyDialog.tsx b/client/src/pages/platform/settings/api-keys/components/ApiKeyDialog.tsx index 0db5290753c..1c7cf6698bc 100644 --- a/client/src/pages/platform/settings/api-keys/components/ApiKeyDialog.tsx +++ b/client/src/pages/platform/settings/api-keys/components/ApiKeyDialog.tsx @@ -126,9 +126,9 @@ const ApiKeyDialog = ({apiKey, onClose, triggerNode}: ApiKeyDialogProps) => { {secretApiKey ? (

- Please save this secret API Key somewhere safe and accessible. For security reasons, + Please save this secret API key somewhere safe and accessible. For security reasons, you won't be able to view it again through your ByteChef account. If you lose - this secret API Key, you'll need to generate a new one. + this secret API key, you'll need to generate a new one.

@@ -138,7 +138,7 @@ const ApiKeyDialog = ({apiKey, onClose, triggerNode}: ApiKeyDialogProps) => { onClick={() => { copyToClipboard(secretApiKey); - toast({description: 'The secret API Key is copied.'}); + toast({description: 'The secret API key is copied.'}); }} > Copy diff --git a/client/src/routes.tsx b/client/src/routes.tsx index 1029f9c8fd6..5ee97687cce 100644 --- a/client/src/routes.tsx +++ b/client/src/routes.tsx @@ -1,4 +1,5 @@ import App from '@/App'; +import ApiClients from '@/ee/pages/automation/api-platform/api-clients/ApiClients'; import ApiCollections from '@/ee/pages/automation/api-platform/api-collections/ApiCollections'; import ApiConnectors from '@/ee/pages/settings/platform/api-connectors/ApiConnectors'; import Activate from '@/pages/account/public/Activate'; @@ -213,6 +214,12 @@ export const getRouter = (queryClient: QueryClient) => }, { children: [ + { + index: true, + loader: async () => { + return redirect('api-collections'); + }, + }, { element: ( @@ -223,6 +230,16 @@ export const getRouter = (queryClient: QueryClient) => ), path: 'api-collections', }, + { + element: ( + + + + + + ), + path: 'api-clients', + }, ], path: 'api-platform', }, diff --git a/client/src/shared/mutations/platform/apiClients.mutations.ts b/client/src/shared/mutations/platform/apiClients.mutations.ts new file mode 100644 index 00000000000..f5920d3e5be --- /dev/null +++ b/client/src/shared/mutations/platform/apiClients.mutations.ts @@ -0,0 +1,51 @@ +import {ApiClient, ApiClientApi, CreateApiClient200Response} from '@/middleware/automation/api-platform'; +import {useMutation} from '@tanstack/react-query'; + +interface CreateApiClientMutationProps { + onError?: (error: Error, variables: ApiClient) => void; + onSuccess?: (result: CreateApiClient200Response, variables: ApiClient) => void; +} + +export const useCreateApiClientMutation = (mutationProps?: CreateApiClientMutationProps) => + useMutation({ + mutationFn: (apiClient: ApiClient) => { + return new ApiClientApi().createApiClient({ + apiClient, + }); + }, + onError: mutationProps?.onError, + onSuccess: mutationProps?.onSuccess, + }); + +interface DeleteApiClientMutationProps { + onError?: (error: Error, variables: number) => void; + onSuccess?: (result: void, variables: number) => void; +} + +export const useDeleteApiClientMutation = (mutationProps?: DeleteApiClientMutationProps) => + useMutation({ + mutationFn: (id: number) => { + return new ApiClientApi().deleteApiClient({ + id, + }); + }, + onError: mutationProps?.onError, + onSuccess: mutationProps?.onSuccess, + }); + +interface UpdateApiClientMutationProps { + onError?: (error: Error, variables: ApiClient) => void; + onSuccess?: (result: void, variables: ApiClient) => void; +} + +export const useUpdateApiClientMutation = (mutationProps?: UpdateApiClientMutationProps) => + useMutation({ + mutationFn: (apiClient: ApiClient) => { + return new ApiClientApi().updateApiClient({ + apiClient, + id: apiClient.id!, + }); + }, + onError: mutationProps?.onError, + onSuccess: mutationProps?.onSuccess, + }); diff --git a/client/src/shared/queries/platform/apiClients.queries.ts b/client/src/shared/queries/platform/apiClients.queries.ts new file mode 100644 index 00000000000..c53002eba6b --- /dev/null +++ b/client/src/shared/queries/platform/apiClients.queries.ts @@ -0,0 +1,14 @@ +import {ApiClient, ApiClientApi} from '@/middleware/automation/api-platform'; + +/* eslint-disable sort-keys */ +import {useQuery} from '@tanstack/react-query'; + +export const ApiClientKeys = { + apiClients: ['apiClients'] as const, +}; + +export const useGetApiClientsQuery = () => + useQuery({ + queryKey: ApiClientKeys.apiClients, + queryFn: () => new ApiClientApi().getApiClients(), + }); From 4613b694f537a373ad688148d0d0b4311ef7a1ed Mon Sep 17 00:00:00 2001 From: Ivica Cardic Date: Fri, 15 Nov 2024 22:44:57 +0100 Subject: [PATCH 12/18] =?UTF-8?q?1023=20-=20Set=20public=20base=20endpoint?= =?UTF-8?q?=20for=20=20API=20platform=20to=20=E2=80=98/api/o/=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../handler/ApiPlatformHandlerController.java | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-rest/src/main/java/com/bytechef/ee/automation/apiplatform/handler/ApiPlatformHandlerController.java b/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-rest/src/main/java/com/bytechef/ee/automation/apiplatform/handler/ApiPlatformHandlerController.java index fde0bd2e3d5..edc909f6449 100644 --- a/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-rest/src/main/java/com/bytechef/ee/automation/apiplatform/handler/ApiPlatformHandlerController.java +++ b/server/ee/libs/automation/automation-api-platform/automation-api-platform-handler/automation-api-platform-handler-rest/src/main/java/com/bytechef/ee/automation/apiplatform/handler/ApiPlatformHandlerController.java @@ -32,7 +32,7 @@ import java.util.Map; import java.util.stream.Collectors; import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Controller; import org.springframework.util.AntPathMatcher; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.GetMapping; @@ -40,31 +40,27 @@ import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; /** * @version ee * * @author Ivica Cardic */ -@RestController -@RequestMapping("${openapi.openAPIDefinition.base-path.automation:}" - + ApiPlatformHandlerController.API_PLATFORM_ROOT_PATH + "/**") +@Controller +@RequestMapping(ApiPlatformHandlerController.API_PLATFORM_BASE_PATH + "/**") @ConditionalOnCoordinator public class ApiPlatformHandlerController extends AbstractWebhookTriggerController { private static final AntPathMatcher PATH_MATCHER = new AntPathMatcher(); - protected static final String API_PLATFORM_ROOT_PATH = "/o"; + protected static final String API_PLATFORM_BASE_PATH = "/api/o"; private final ApiCollectionService apiCollectionService; private final ApiCollectionEndpointService apiCollectionEndpointService; private final ApiPlatformHandlerExecutor apiPlatformHandlerExecutor; - private final String basePath; @SuppressFBWarnings("EI") public ApiPlatformHandlerController( - @Value("${openapi.openAPIDefinition.base-path.automation:}") String basePath, ApiCollectionService apiCollectionService, ApiCollectionEndpointService apiCollectionEndpointService, ApiPlatformHandlerExecutor apiPlatformHandlerExecutor, FilesFileStorage filesFileStorage, InstanceAccessorRegistry instanceAccessorRegistry, TriggerDefinitionService triggerDefinitionService, @@ -75,7 +71,6 @@ public ApiPlatformHandlerController( this.apiCollectionService = apiCollectionService; this.apiCollectionEndpointService = apiCollectionEndpointService; this.apiPlatformHandlerExecutor = apiPlatformHandlerExecutor; - this.basePath = basePath; } @DeleteMapping(produces = "application/json") @@ -109,7 +104,7 @@ private Object doHandle(HttpServletRequest request) { String requestURI = request.getRequestURI(); - String path = requestURI.replace(basePath + API_PLATFORM_ROOT_PATH, ""); + String path = requestURI.replace(API_PLATFORM_BASE_PATH, ""); ApiCollectionEndpoint apiCollectionEndpoint = getApiCollectionEndpoint(path, getEnvironment(request)); From 0f650b820f92b1849af959a73b3bf21fdc48daa5 Mon Sep 17 00:00:00 2001 From: Ivica Cardic Date: Fri, 15 Nov 2024 22:37:17 +0100 Subject: [PATCH 13/18] 1023 - Rename --- .../mapper/ApiCollectionEndpointMapper.java | 4 ++-- .../web/rest/mapper/ApiCollectionMapper.java | 4 ++-- ....java => ApiPlatformMapperSpringConfig.java} | 8 ++++---- .../rest/mapper/ApiConnectorEndpointMapper.java | 4 ++-- .../web/rest/mapper/ApiConnectorMapper.java | 6 +++--- ...java => ApiConnectorMapperSpringConfig.java} | 8 ++++---- .../web/rest/mapper/ProjectInstanceMapper.java | 8 ++++---- ...ctInstanceWorkflowConnectionModelMapper.java | 4 ++-- .../mapper/ProjectInstanceWorkflowMapper.java | 6 +++--- .../web/rest/mapper/ProjectMapper.java | 6 +++--- .../web/rest/mapper/ProjectVersionMapper.java | 4 ++-- .../web/rest/mapper/ProjectWorkflowMapper.java | 6 +++--- .../web/rest/mapper/WorkspaceMapper.java | 4 ++-- ...ProjectConfigurationMapperSpringConfig.java} | 12 ++++++------ .../rest/mapper/WorkspaceConnectionMapper.java | 4 ++-- ...g.java => ConnectionMapperSpringConfig.java} | 10 ++++++---- .../rest/mapper/WorkflowExecutionMapper.java | 6 +++--- ...=> WorkflowExecutionMapperSpringConfig.java} | 17 +++++++++-------- .../web/rest/mapper/IntegrationMapper.java | 4 ++-- ...nPublicConfigurationMapperSpringConfig.java} | 8 ++++---- .../web/rest/mapper/AppEventMapper.java | 4 ++-- .../IntegrationInstanceConfigurationMapper.java | 8 ++++---- ...figurationWorkflowConnectionModelMapper.java | 4 ++-- ...tionInstanceConfigurationWorkflowMapper.java | 6 +++--- .../rest/mapper/IntegrationInstanceMapper.java | 10 +++++----- .../IntegrationInstanceWorkflowMapper.java | 6 +++--- .../web/rest/mapper/IntegrationMapper.java | 6 +++--- .../rest/mapper/IntegrationVersionMapper.java | 4 ++-- .../rest/mapper/IntegrationWorkflowMapper.java | 6 +++--- ...grationConfigurationMapperSpringConfig.java} | 12 ++++++------ .../web/rest/mapper/ConnectedUserMapper.java | 4 ++-- ...ava => ConnectedUserMapperSpringConfig.java} | 8 ++++---- .../web/rest/mapper/ConnectionMapper.java | 4 ++-- .../web/rest/mapper/ConnectionModelMapper.java | 4 ++-- ...g.java => ConnectionMapperSpringConfig.java} | 9 +++++---- .../web/rest/AppEventTriggerApiController.java | 2 ++ .../web/rest/RequestTriggerApiController.java | 2 ++ ...countingAccountUnifiedOutputModelMapper.java | 4 ++-- ...ccountingCreateUpdateAccountModelMapper.java | 4 ++-- .../CrmAccountUnifiedOutputModelMapper.java | 4 ++-- .../CrmCreateUpdateAccountModelMapper.java | 4 ++-- .../crm/mapper/CrmLifecycleStageMapper.java | 4 ++-- .../mapper/CrmLifecycleStageModelMapper.java | 4 ++-- ...istAccountsPageableParameterModelMapper.java | 4 ++-- .../web/rest/mapper/JsonNullableMapper.java | 4 ++-- ...UnifiedConfigurationMapperSpringConfig.java} | 4 ++-- .../rest/mapper/WorkflowExecutionMapper.java | 6 +++--- ...=> WorkflowExecutionMapperSpringConfig.java} | 17 +++++++++-------- ...omponentDefinitionIntTestConfiguration.java} | 2 +- .../facade/ActionDefinitionFacadeIntTest.java | 5 +++-- .../web/rest/mapper/ActionDefinitionMapper.java | 6 +++--- .../web/rest/mapper/AuthorizationMapper.java | 4 ++-- .../rest/mapper/ComponentDefinitionMapper.java | 6 +++--- .../rest/mapper/ConnectionDefinitionMapper.java | 8 ++++---- .../web/rest/mapper/HelpMapper.java | 6 +++--- .../web/rest/mapper/JsonNullableMapper.java | 4 ++-- .../OAuth2AuthorizationParametersMapper.java | 4 ++-- .../web/rest/mapper/OptionMapper.java | 4 ++-- .../web/rest/mapper/PropertyMapper.java | 6 +++--- .../web/rest/mapper/ResourcesMapper.java | 6 +++--- .../web/rest/mapper/ScriptExecutionMapper.java | 4 ++-- .../mapper/TaskDispatcherDefinitionMapper.java | 6 +++--- .../rest/mapper/TriggerDefinitionMapper.java | 6 +++--- ...eWorkflowNodeParameter200ResponseMapper.java | 4 ++-- .../rest/mapper/WorkflowConnectionMapper.java | 4 ++-- .../web/rest/mapper/WorkflowMapper.java | 8 ++++---- .../rest/mapper/WorkflowNodeOutputMapper.java | 4 ++-- .../mapper/WorkflowNodeTestOutputMapper.java | 4 ++-- .../web/rest/mapper/WorkflowTaskMapper.java | 6 +++--- ...rkflowTestConfigurationConnectionMapper.java | 4 ++-- .../mapper/WorkflowTestConfigurationMapper.java | 4 ++-- .../web/rest/mapper/WorkflowTriggerMapper.java | 4 ++-- ...orkflowConfigurationMapperSpringConfig.java} | 8 ++++---- .../web/rest/mapper/CustomComponentMapper.java | 4 ++-- ...a => CustomComponentMapperSpringConfig.java} | 8 ++++---- ...ation.java => FileStorageConfiguration.java} | 8 +++++--- ...eyAuthenticationFilterBeforeContributor.java | 2 -- .../user/web/rest/mapper/ApiKeyMapper.java | 4 ++-- .../user/web/rest/mapper/AuthorityMapper.java | 4 ++-- .../user/web/rest/mapper/SigningKeyMapper.java | 4 ++-- ...gConfig.java => UserMapperSpringConfig.java} | 8 ++++---- .../{rest => }/WebhookTriggerController.java | 7 ++++--- .../rest/WebhookTriggerControllerIntTest.java | 1 + .../execution/web/rest/mapper/JobMapper.java | 4 ++-- .../web/rest/mapper/TaskExecutionMapper.java | 4 ++-- .../web/rest/mapper/TriggerExecutionMapper.java | 4 ++-- ...=> WorkflowExecutionMapperSpringConfig.java} | 11 ++++++----- .../mapper/WorkflowTestExecutionMapper.java | 4 ++-- ...java => WorkflowTestMapperSpringConfig.java} | 10 +++++----- 89 files changed, 259 insertions(+), 246 deletions(-) rename server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/mapper/config/{AutomationApiPlatformMapperSpringConfig.java => ApiPlatformMapperSpringConfig.java} (72%) rename server/ee/libs/platform/platform-api-connector/platform-api-connector-configuration/platform-api-connector-configuration-rest/src/main/java/com/bytechef/ee/platform/apiconnector/configuration/web/rest/mapper/config/{PlatformApiConnectorMapperSpringConfig.java => ApiConnectorMapperSpringConfig.java} (72%) rename server/libs/automation/automation-configuration/automation-configuration-rest/automation-configuration-rest-api/src/main/java/com/bytechef/automation/configuration/web/rest/mapper/config/{AutomationConfigurationMapperSpringConfig.java => ProjectConfigurationMapperSpringConfig.java} (68%) rename server/libs/automation/automation-connection/automation-connection-rest/src/main/java/com/bytechef/automation/connection/web/rest/mapper/config/{AutomationConnectionMapperSpringConfig.java => ConnectionMapperSpringConfig.java} (70%) rename server/libs/automation/automation-workflow/automation-workflow-execution/automation-workflow-execution-rest/src/main/java/com/bytechef/automation/workflow/execution/web/rest/mapper/config/{AutomationWorkflowExecutionMapperSpringConfig.java => WorkflowExecutionMapperSpringConfig.java} (57%) rename server/libs/embedded/embedded-configuration/embedded-configuration-public-rest/src/main/java/com/bytechef/embedded/configuration/public_/web/rest/mapper/config/{EmbeddedPublicConfigurationMapperSpringConfig.java => IntegrationPublicConfigurationMapperSpringConfig.java} (78%) rename server/libs/embedded/embedded-configuration/embedded-configuration-rest/embedded-configuration-rest-api/src/main/java/com/bytechef/embedded/configuration/web/rest/mapper/config/{EmbeddedConfigurationMapperSpringConfig.java => IntegrationConfigurationMapperSpringConfig.java} (68%) rename server/libs/embedded/embedded-connected-user/embedded-connected-user-rest/src/main/java/com/bytechef/embedded/connected/user/web/rest/mapper/config/{EmbeddedConnectedUserMapperSpringConfig.java => ConnectedUserMapperSpringConfig.java} (75%) rename server/libs/embedded/embedded-connection/embedded-connection-rest/src/main/java/com/bytechef/embedded/connection/web/rest/mapper/config/{EmbeddedConnectionMapperSpringConfig.java => ConnectionMapperSpringConfig.java} (69%) rename server/libs/embedded/embedded-unified/embedded-unified-rest/src/main/java/com/bytechef/embedded/unified/web/rest/mapper/config/{EmbeddedUnifiedConfigurationMapperSpringConfig.java => UnifiedConfigurationMapperSpringConfig.java} (86%) rename server/libs/embedded/embedded-workflow/embedded-workflow-execution/embedded-workflow-execution-rest/src/main/java/com/bytechef/embedded/workflow/execution/web/rest/mapper/config/{EmbeddedWorkflowExecutionMapperSpringConfig.java => WorkflowExecutionMapperSpringConfig.java} (57%) rename server/libs/platform/platform-component/platform-component-service/src/test/java/com/bytechef/platform/component/config/{PlatformIntTestConfiguration.java => ComponentDefinitionIntTestConfiguration.java} (95%) rename server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/config/{PlatformConfigurationMapperSpringConfig.java => WorkflowConfigurationMapperSpringConfig.java} (76%) rename server/libs/platform/platform-custom-component/platform-custom-component-configuration/platform-custom-component-configuration-rest/src/main/java/com/bytechef/platform/customcomponent/configuration/web/rest/mapper/config/{PlatformCustomComponentMapperSpringConfig.java => CustomComponentMapperSpringConfig.java} (79%) rename server/libs/platform/platform-file-storage/platform-file-storage-impl/src/main/java/com/bytechef/platform/file/storage/config/{PlatformFileStorageConfiguration.java => FileStorageConfiguration.java} (95%) rename server/libs/platform/platform-user/platform-user-rest/platform-user-rest-api/src/main/java/com/bytechef/platform/user/web/rest/mapper/config/{PlatformUserMapperSpringConfig.java => UserMapperSpringConfig.java} (74%) rename server/libs/platform/platform-webhook/platform-webhook-rest/platform-webhook-rest-impl/src/main/java/com/bytechef/platform/webhook/web/{rest => }/WebhookTriggerController.java (96%) rename server/libs/platform/platform-workflow/platform-workflow-execution/platform-workflow-execution-rest/platform-workflow-execution-rest-api/src/main/java/com/bytechef/platform/workflow/execution/web/rest/mapper/config/{PlatformWorkflowExecutionMapperSpringConfig.java => WorkflowExecutionMapperSpringConfig.java} (66%) rename server/libs/platform/platform-workflow/platform-workflow-test/platform-workflow-test-rest/src/main/java/com/bytechef/platform/workflow/test/web/rest/mapper/config/{PlatformWorkflowTestMapperSpringConfig.java => WorkflowTestMapperSpringConfig.java} (71%) diff --git a/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/mapper/ApiCollectionEndpointMapper.java b/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/mapper/ApiCollectionEndpointMapper.java index 7b9ae742e2f..f6e48820113 100644 --- a/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/mapper/ApiCollectionEndpointMapper.java +++ b/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/mapper/ApiCollectionEndpointMapper.java @@ -8,7 +8,7 @@ package com.bytechef.ee.automation.apiplatform.configuration.web.rest.mapper; import com.bytechef.ee.automation.apiplatform.configuration.dto.ApiCollectionEndpointDTO; -import com.bytechef.ee.automation.apiplatform.configuration.web.rest.mapper.config.AutomationApiPlatformMapperSpringConfig; +import com.bytechef.ee.automation.apiplatform.configuration.web.rest.mapper.config.ApiPlatformMapperSpringConfig; import com.bytechef.ee.automation.apiplatform.configuration.web.rest.model.ApiCollectionEndpointModel; import org.mapstruct.InheritInverseConfiguration; import org.mapstruct.Mapper; @@ -21,7 +21,7 @@ * * @author Ivica Cardic */ -@Mapper(config = AutomationApiPlatformMapperSpringConfig.class) +@Mapper(config = ApiPlatformMapperSpringConfig.class) public interface ApiCollectionEndpointMapper extends Converter { @Override diff --git a/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/mapper/ApiCollectionMapper.java b/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/mapper/ApiCollectionMapper.java index 8259e6e4e12..cd0e1f6053a 100644 --- a/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/mapper/ApiCollectionMapper.java +++ b/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/mapper/ApiCollectionMapper.java @@ -12,7 +12,7 @@ import com.bytechef.automation.configuration.web.rest.model.ProjectBasicModel; import com.bytechef.automation.configuration.web.rest.model.ProjectInstanceBasicModel; import com.bytechef.ee.automation.apiplatform.configuration.dto.ApiCollectionDTO; -import com.bytechef.ee.automation.apiplatform.configuration.web.rest.mapper.config.AutomationApiPlatformMapperSpringConfig; +import com.bytechef.ee.automation.apiplatform.configuration.web.rest.mapper.config.ApiPlatformMapperSpringConfig; import com.bytechef.ee.automation.apiplatform.configuration.web.rest.model.ApiCollectionModel; import org.mapstruct.InheritInverseConfiguration; import org.mapstruct.Mapper; @@ -25,7 +25,7 @@ * * @author Ivica Cardic */ -@Mapper(config = AutomationApiPlatformMapperSpringConfig.class) +@Mapper(config = ApiPlatformMapperSpringConfig.class) public interface ApiCollectionMapper extends Converter { @Override diff --git a/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/mapper/config/AutomationApiPlatformMapperSpringConfig.java b/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/mapper/config/ApiPlatformMapperSpringConfig.java similarity index 72% rename from server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/mapper/config/AutomationApiPlatformMapperSpringConfig.java rename to server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/mapper/config/ApiPlatformMapperSpringConfig.java index c8867a61a0f..b5b07c59658 100644 --- a/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/mapper/config/AutomationApiPlatformMapperSpringConfig.java +++ b/server/ee/libs/automation/automation-api-platform/automation-api-platform-configuration/automation-api-platform-configuration-rest/src/main/java/com/bytechef/ee/automation/apiplatform/configuration/web/rest/mapper/config/ApiPlatformMapperSpringConfig.java @@ -7,7 +7,7 @@ package com.bytechef.ee.automation.apiplatform.configuration.web.rest.mapper.config; -import com.bytechef.ee.automation.apiplatform.configuration.web.rest.adapter.AutomationApiPlatformConversionServiceAdapter; +import com.bytechef.ee.automation.apiplatform.configuration.web.rest.adapter.ApiPlatformConversionServiceAdapter; import com.bytechef.platform.tag.web.rest.mapper.config.TagMapperSpringConfig; import org.mapstruct.MapperConfig; import org.mapstruct.extensions.spring.SpringMapperConfig; @@ -18,10 +18,10 @@ * @author Ivica Cardic */ @MapperConfig(componentModel = "spring", uses = { - AutomationApiPlatformConversionServiceAdapter.class, TagMapperSpringConfig.class + ApiPlatformConversionServiceAdapter.class, TagMapperSpringConfig.class }) @SpringMapperConfig( conversionServiceAdapterPackage = "com.bytechef.ee.automation.apiplatform.configuration.web.rest.adapter", - conversionServiceAdapterClassName = "AutomationApiPlatformConversionServiceAdapter") -public interface AutomationApiPlatformMapperSpringConfig { + conversionServiceAdapterClassName = "ApiPlatformConversionServiceAdapter") +public interface ApiPlatformMapperSpringConfig { } diff --git a/server/ee/libs/platform/platform-api-connector/platform-api-connector-configuration/platform-api-connector-configuration-rest/src/main/java/com/bytechef/ee/platform/apiconnector/configuration/web/rest/mapper/ApiConnectorEndpointMapper.java b/server/ee/libs/platform/platform-api-connector/platform-api-connector-configuration/platform-api-connector-configuration-rest/src/main/java/com/bytechef/ee/platform/apiconnector/configuration/web/rest/mapper/ApiConnectorEndpointMapper.java index 49193cfd6d0..f68ff1286a7 100644 --- a/server/ee/libs/platform/platform-api-connector/platform-api-connector-configuration/platform-api-connector-configuration-rest/src/main/java/com/bytechef/ee/platform/apiconnector/configuration/web/rest/mapper/ApiConnectorEndpointMapper.java +++ b/server/ee/libs/platform/platform-api-connector/platform-api-connector-configuration/platform-api-connector-configuration-rest/src/main/java/com/bytechef/ee/platform/apiconnector/configuration/web/rest/mapper/ApiConnectorEndpointMapper.java @@ -8,7 +8,7 @@ package com.bytechef.ee.platform.apiconnector.configuration.web.rest.mapper; import com.bytechef.ee.platform.apiconnector.configuration.domain.ApiConnectorEndpoint; -import com.bytechef.ee.platform.apiconnector.configuration.web.rest.mapper.config.PlatformApiConnectorMapperSpringConfig; +import com.bytechef.ee.platform.apiconnector.configuration.web.rest.mapper.config.ApiConnectorMapperSpringConfig; import com.bytechef.ee.platform.apiconnector.configuration.web.rest.model.ApiConnectorEndpointModel; import org.mapstruct.InheritInverseConfiguration; import org.mapstruct.Mapper; @@ -22,7 +22,7 @@ * @author Ivica Cardic */ -@Mapper(config = PlatformApiConnectorMapperSpringConfig.class) +@Mapper(config = ApiConnectorMapperSpringConfig.class) public interface ApiConnectorEndpointMapper extends Converter { @Override diff --git a/server/ee/libs/platform/platform-api-connector/platform-api-connector-configuration/platform-api-connector-configuration-rest/src/main/java/com/bytechef/ee/platform/apiconnector/configuration/web/rest/mapper/ApiConnectorMapper.java b/server/ee/libs/platform/platform-api-connector/platform-api-connector-configuration/platform-api-connector-configuration-rest/src/main/java/com/bytechef/ee/platform/apiconnector/configuration/web/rest/mapper/ApiConnectorMapper.java index 144c9b9733b..a39e1ec1e67 100644 --- a/server/ee/libs/platform/platform-api-connector/platform-api-connector-configuration/platform-api-connector-configuration-rest/src/main/java/com/bytechef/ee/platform/apiconnector/configuration/web/rest/mapper/ApiConnectorMapper.java +++ b/server/ee/libs/platform/platform-api-connector/platform-api-connector-configuration/platform-api-connector-configuration-rest/src/main/java/com/bytechef/ee/platform/apiconnector/configuration/web/rest/mapper/ApiConnectorMapper.java @@ -9,7 +9,7 @@ import com.bytechef.ee.platform.apiconnector.configuration.domain.ApiConnector; import com.bytechef.ee.platform.apiconnector.configuration.dto.ApiConnectorDTO; -import com.bytechef.ee.platform.apiconnector.configuration.web.rest.mapper.config.PlatformApiConnectorMapperSpringConfig; +import com.bytechef.ee.platform.apiconnector.configuration.web.rest.mapper.config.ApiConnectorMapperSpringConfig; import com.bytechef.ee.platform.apiconnector.configuration.web.rest.model.ApiConnectorModel; import org.mapstruct.InheritInverseConfiguration; import org.mapstruct.Mapper; @@ -24,7 +24,7 @@ */ public class ApiConnectorMapper { - @Mapper(config = PlatformApiConnectorMapperSpringConfig.class) + @Mapper(config = ApiConnectorMapperSpringConfig.class) public interface ApiConnectorToApiConnectorModelMapper extends Converter { @Override @@ -41,7 +41,7 @@ public interface ApiConnectorToApiConnectorModelMapper extends Converter { @Override diff --git a/server/ee/libs/platform/platform-api-connector/platform-api-connector-configuration/platform-api-connector-configuration-rest/src/main/java/com/bytechef/ee/platform/apiconnector/configuration/web/rest/mapper/config/PlatformApiConnectorMapperSpringConfig.java b/server/ee/libs/platform/platform-api-connector/platform-api-connector-configuration/platform-api-connector-configuration-rest/src/main/java/com/bytechef/ee/platform/apiconnector/configuration/web/rest/mapper/config/ApiConnectorMapperSpringConfig.java similarity index 72% rename from server/ee/libs/platform/platform-api-connector/platform-api-connector-configuration/platform-api-connector-configuration-rest/src/main/java/com/bytechef/ee/platform/apiconnector/configuration/web/rest/mapper/config/PlatformApiConnectorMapperSpringConfig.java rename to server/ee/libs/platform/platform-api-connector/platform-api-connector-configuration/platform-api-connector-configuration-rest/src/main/java/com/bytechef/ee/platform/apiconnector/configuration/web/rest/mapper/config/ApiConnectorMapperSpringConfig.java index 61803457da0..ce5c8da13c1 100644 --- a/server/ee/libs/platform/platform-api-connector/platform-api-connector-configuration/platform-api-connector-configuration-rest/src/main/java/com/bytechef/ee/platform/apiconnector/configuration/web/rest/mapper/config/PlatformApiConnectorMapperSpringConfig.java +++ b/server/ee/libs/platform/platform-api-connector/platform-api-connector-configuration/platform-api-connector-configuration-rest/src/main/java/com/bytechef/ee/platform/apiconnector/configuration/web/rest/mapper/config/ApiConnectorMapperSpringConfig.java @@ -7,7 +7,7 @@ package com.bytechef.ee.platform.apiconnector.configuration.web.rest.mapper.config; -import com.bytechef.ee.platform.apiconnector.configuration.web.rest.adapter.PlatformApiConnectorConversionServiceAdapter; +import com.bytechef.ee.platform.apiconnector.configuration.web.rest.adapter.ApiConnectorConversionServiceAdapter; import org.mapstruct.MapperConfig; import org.mapstruct.extensions.spring.SpringMapperConfig; @@ -17,10 +17,10 @@ * @author Ivica Cardic */ @MapperConfig(componentModel = "spring", uses = { - PlatformApiConnectorConversionServiceAdapter.class + ApiConnectorConversionServiceAdapter.class }) @SpringMapperConfig( conversionServiceAdapterPackage = "com.bytechef.ee.platform.apiconnector.configuration.web.rest.adapter", - conversionServiceAdapterClassName = "PlatformApiConnectorConversionServiceAdapter") -public interface PlatformApiConnectorMapperSpringConfig { + conversionServiceAdapterClassName = "ApiConnectorConversionServiceAdapter") +public interface ApiConnectorMapperSpringConfig { } diff --git a/server/libs/automation/automation-configuration/automation-configuration-rest/automation-configuration-rest-api/src/main/java/com/bytechef/automation/configuration/web/rest/mapper/ProjectInstanceMapper.java b/server/libs/automation/automation-configuration/automation-configuration-rest/automation-configuration-rest-api/src/main/java/com/bytechef/automation/configuration/web/rest/mapper/ProjectInstanceMapper.java index 864d34d7883..faa0a279799 100644 --- a/server/libs/automation/automation-configuration/automation-configuration-rest/automation-configuration-rest-api/src/main/java/com/bytechef/automation/configuration/web/rest/mapper/ProjectInstanceMapper.java +++ b/server/libs/automation/automation-configuration/automation-configuration-rest/automation-configuration-rest-api/src/main/java/com/bytechef/automation/configuration/web/rest/mapper/ProjectInstanceMapper.java @@ -18,7 +18,7 @@ import com.bytechef.automation.configuration.domain.ProjectInstance; import com.bytechef.automation.configuration.dto.ProjectInstanceDTO; -import com.bytechef.automation.configuration.web.rest.mapper.config.AutomationConfigurationMapperSpringConfig; +import com.bytechef.automation.configuration.web.rest.mapper.config.ProjectConfigurationMapperSpringConfig; import com.bytechef.automation.configuration.web.rest.model.ProjectInstanceBasicModel; import com.bytechef.automation.configuration.web.rest.model.ProjectInstanceModel; import org.mapstruct.InheritInverseConfiguration; @@ -32,7 +32,7 @@ */ public class ProjectInstanceMapper { - @Mapper(config = AutomationConfigurationMapperSpringConfig.class) + @Mapper(config = ProjectConfigurationMapperSpringConfig.class) public interface ProjectInstanceBasicToProjectInstanceModelMapper extends Converter { @@ -41,7 +41,7 @@ public interface ProjectInstanceBasicToProjectInstanceModelMapper ProjectInstanceBasicModel convert(ProjectInstance projectInstanc); } - @Mapper(config = AutomationConfigurationMapperSpringConfig.class) + @Mapper(config = ProjectConfigurationMapperSpringConfig.class) public interface ProjectInstanceToProjectInstanceModelMapper extends Converter { @@ -53,7 +53,7 @@ public interface ProjectInstanceToProjectInstanceModelMapper ProjectInstanceModel convert(ProjectInstance projectInstance); } - @Mapper(config = AutomationConfigurationMapperSpringConfig.class) + @Mapper(config = ProjectConfigurationMapperSpringConfig.class) public interface ProjectInstanceDTOToProjectInstanceModelMapper extends Converter { diff --git a/server/libs/automation/automation-configuration/automation-configuration-rest/automation-configuration-rest-api/src/main/java/com/bytechef/automation/configuration/web/rest/mapper/ProjectInstanceWorkflowConnectionModelMapper.java b/server/libs/automation/automation-configuration/automation-configuration-rest/automation-configuration-rest-api/src/main/java/com/bytechef/automation/configuration/web/rest/mapper/ProjectInstanceWorkflowConnectionModelMapper.java index a8c10255d58..67e7bab831f 100644 --- a/server/libs/automation/automation-configuration/automation-configuration-rest/automation-configuration-rest-api/src/main/java/com/bytechef/automation/configuration/web/rest/mapper/ProjectInstanceWorkflowConnectionModelMapper.java +++ b/server/libs/automation/automation-configuration/automation-configuration-rest/automation-configuration-rest-api/src/main/java/com/bytechef/automation/configuration/web/rest/mapper/ProjectInstanceWorkflowConnectionModelMapper.java @@ -17,7 +17,7 @@ package com.bytechef.automation.configuration.web.rest.mapper; import com.bytechef.automation.configuration.domain.ProjectInstanceWorkflowConnection; -import com.bytechef.automation.configuration.web.rest.mapper.config.AutomationConfigurationMapperSpringConfig; +import com.bytechef.automation.configuration.web.rest.mapper.config.ProjectConfigurationMapperSpringConfig; import com.bytechef.automation.configuration.web.rest.model.ProjectInstanceWorkflowConnectionModel; import org.mapstruct.Mapper; import org.springframework.core.convert.converter.Converter; @@ -25,7 +25,7 @@ /** * @author Ivica Cardic */ -@Mapper(config = AutomationConfigurationMapperSpringConfig.class) +@Mapper(config = ProjectConfigurationMapperSpringConfig.class) public interface ProjectInstanceWorkflowConnectionModelMapper extends Converter { diff --git a/server/libs/automation/automation-configuration/automation-configuration-rest/automation-configuration-rest-api/src/main/java/com/bytechef/automation/configuration/web/rest/mapper/ProjectInstanceWorkflowMapper.java b/server/libs/automation/automation-configuration/automation-configuration-rest/automation-configuration-rest-api/src/main/java/com/bytechef/automation/configuration/web/rest/mapper/ProjectInstanceWorkflowMapper.java index f07026d0afa..569c454185f 100644 --- a/server/libs/automation/automation-configuration/automation-configuration-rest/automation-configuration-rest-api/src/main/java/com/bytechef/automation/configuration/web/rest/mapper/ProjectInstanceWorkflowMapper.java +++ b/server/libs/automation/automation-configuration/automation-configuration-rest/automation-configuration-rest-api/src/main/java/com/bytechef/automation/configuration/web/rest/mapper/ProjectInstanceWorkflowMapper.java @@ -18,7 +18,7 @@ import com.bytechef.automation.configuration.domain.ProjectInstanceWorkflow; import com.bytechef.automation.configuration.dto.ProjectInstanceWorkflowDTO; -import com.bytechef.automation.configuration.web.rest.mapper.config.AutomationConfigurationMapperSpringConfig; +import com.bytechef.automation.configuration.web.rest.mapper.config.ProjectConfigurationMapperSpringConfig; import com.bytechef.automation.configuration.web.rest.model.ProjectInstanceWorkflowModel; import org.mapstruct.InheritInverseConfiguration; import org.mapstruct.Mapper; @@ -31,7 +31,7 @@ */ public class ProjectInstanceWorkflowMapper { - @Mapper(config = AutomationConfigurationMapperSpringConfig.class) + @Mapper(config = ProjectConfigurationMapperSpringConfig.class) public interface ProjectInstanceWorkflowToProjectInstanceWorkflowModelMapper extends Converter { @@ -46,7 +46,7 @@ public interface ProjectInstanceWorkflowToProjectInstanceWorkflowModelMapper ProjectInstanceWorkflow invertConvert(ProjectInstanceWorkflowModel projectInstanceWorkflowModel); } - @Mapper(config = AutomationConfigurationMapperSpringConfig.class) + @Mapper(config = ProjectConfigurationMapperSpringConfig.class) public interface ProjectInstanceWorkflowDTOToProjectInstanceWorkflowModelMapper extends Converter { diff --git a/server/libs/automation/automation-configuration/automation-configuration-rest/automation-configuration-rest-api/src/main/java/com/bytechef/automation/configuration/web/rest/mapper/ProjectMapper.java b/server/libs/automation/automation-configuration/automation-configuration-rest/automation-configuration-rest-api/src/main/java/com/bytechef/automation/configuration/web/rest/mapper/ProjectMapper.java index 17038ed392c..31fb8245896 100644 --- a/server/libs/automation/automation-configuration/automation-configuration-rest/automation-configuration-rest-api/src/main/java/com/bytechef/automation/configuration/web/rest/mapper/ProjectMapper.java +++ b/server/libs/automation/automation-configuration/automation-configuration-rest/automation-configuration-rest-api/src/main/java/com/bytechef/automation/configuration/web/rest/mapper/ProjectMapper.java @@ -18,7 +18,7 @@ import com.bytechef.automation.configuration.domain.Project; import com.bytechef.automation.configuration.dto.ProjectDTO; -import com.bytechef.automation.configuration.web.rest.mapper.config.AutomationConfigurationMapperSpringConfig; +import com.bytechef.automation.configuration.web.rest.mapper.config.ProjectConfigurationMapperSpringConfig; import com.bytechef.automation.configuration.web.rest.model.ProjectBasicModel; import com.bytechef.automation.configuration.web.rest.model.ProjectModel; import org.mapstruct.InheritInverseConfiguration; @@ -32,14 +32,14 @@ */ public class ProjectMapper { - @Mapper(config = AutomationConfigurationMapperSpringConfig.class) + @Mapper(config = ProjectConfigurationMapperSpringConfig.class) public interface ProjectToProjectBasicModelMapper extends Converter { @Override ProjectBasicModel convert(Project project); } - @Mapper(config = AutomationConfigurationMapperSpringConfig.class) + @Mapper(config = ProjectConfigurationMapperSpringConfig.class) public interface ProjectDTOToProjectModelMapper extends Converter { @Override diff --git a/server/libs/automation/automation-configuration/automation-configuration-rest/automation-configuration-rest-api/src/main/java/com/bytechef/automation/configuration/web/rest/mapper/ProjectVersionMapper.java b/server/libs/automation/automation-configuration/automation-configuration-rest/automation-configuration-rest-api/src/main/java/com/bytechef/automation/configuration/web/rest/mapper/ProjectVersionMapper.java index 6881d092456..3d9667a6e4b 100644 --- a/server/libs/automation/automation-configuration/automation-configuration-rest/automation-configuration-rest-api/src/main/java/com/bytechef/automation/configuration/web/rest/mapper/ProjectVersionMapper.java +++ b/server/libs/automation/automation-configuration/automation-configuration-rest/automation-configuration-rest-api/src/main/java/com/bytechef/automation/configuration/web/rest/mapper/ProjectVersionMapper.java @@ -17,7 +17,7 @@ package com.bytechef.automation.configuration.web.rest.mapper; import com.bytechef.automation.configuration.domain.ProjectVersion; -import com.bytechef.automation.configuration.web.rest.mapper.config.AutomationConfigurationMapperSpringConfig; +import com.bytechef.automation.configuration.web.rest.mapper.config.ProjectConfigurationMapperSpringConfig; import com.bytechef.automation.configuration.web.rest.model.ProjectVersionModel; import org.mapstruct.Mapper; import org.springframework.core.convert.converter.Converter; @@ -25,7 +25,7 @@ /** * @author Ivica Cardic */ -@Mapper(config = AutomationConfigurationMapperSpringConfig.class) +@Mapper(config = ProjectConfigurationMapperSpringConfig.class) public interface ProjectVersionMapper extends Converter { @Override diff --git a/server/libs/automation/automation-configuration/automation-configuration-rest/automation-configuration-rest-api/src/main/java/com/bytechef/automation/configuration/web/rest/mapper/ProjectWorkflowMapper.java b/server/libs/automation/automation-configuration/automation-configuration-rest/automation-configuration-rest-api/src/main/java/com/bytechef/automation/configuration/web/rest/mapper/ProjectWorkflowMapper.java index e6f3c270629..85c14f8775e 100644 --- a/server/libs/automation/automation-configuration/automation-configuration-rest/automation-configuration-rest-api/src/main/java/com/bytechef/automation/configuration/web/rest/mapper/ProjectWorkflowMapper.java +++ b/server/libs/automation/automation-configuration/automation-configuration-rest/automation-configuration-rest-api/src/main/java/com/bytechef/automation/configuration/web/rest/mapper/ProjectWorkflowMapper.java @@ -17,7 +17,7 @@ package com.bytechef.automation.configuration.web.rest.mapper; import com.bytechef.automation.configuration.dto.ProjectWorkflowDTO; -import com.bytechef.automation.configuration.web.rest.mapper.config.AutomationConfigurationMapperSpringConfig; +import com.bytechef.automation.configuration.web.rest.mapper.config.ProjectConfigurationMapperSpringConfig; import com.bytechef.automation.configuration.web.rest.model.WorkflowBasicModel; import com.bytechef.automation.configuration.web.rest.model.WorkflowModel; import com.bytechef.platform.configuration.web.rest.mapper.util.WorkflowMapperUtils; @@ -32,7 +32,7 @@ */ public abstract class ProjectWorkflowMapper { - @Mapper(config = AutomationConfigurationMapperSpringConfig.class) + @Mapper(config = ProjectConfigurationMapperSpringConfig.class) public abstract static class ProjectWorkflowDTOToWorkflowModelMapper implements Converter { @@ -50,7 +50,7 @@ public void afterMapping(ProjectWorkflowDTO workflowDTO, @MappingTarget Workflow } } - @Mapper(config = AutomationConfigurationMapperSpringConfig.class) + @Mapper(config = ProjectConfigurationMapperSpringConfig.class) public abstract static class ProjectWorkflowModelToWorkflowBasicModel implements Converter { diff --git a/server/libs/automation/automation-configuration/automation-configuration-rest/automation-configuration-rest-api/src/main/java/com/bytechef/automation/configuration/web/rest/mapper/WorkspaceMapper.java b/server/libs/automation/automation-configuration/automation-configuration-rest/automation-configuration-rest-api/src/main/java/com/bytechef/automation/configuration/web/rest/mapper/WorkspaceMapper.java index 9a9cf4f13be..f66a92affa8 100644 --- a/server/libs/automation/automation-configuration/automation-configuration-rest/automation-configuration-rest-api/src/main/java/com/bytechef/automation/configuration/web/rest/mapper/WorkspaceMapper.java +++ b/server/libs/automation/automation-configuration/automation-configuration-rest/automation-configuration-rest-api/src/main/java/com/bytechef/automation/configuration/web/rest/mapper/WorkspaceMapper.java @@ -17,7 +17,7 @@ package com.bytechef.automation.configuration.web.rest.mapper; import com.bytechef.automation.configuration.domain.Workspace; -import com.bytechef.automation.configuration.web.rest.mapper.config.AutomationConfigurationMapperSpringConfig; +import com.bytechef.automation.configuration.web.rest.mapper.config.ProjectConfigurationMapperSpringConfig; import com.bytechef.automation.configuration.web.rest.model.WorkspaceModel; import org.mapstruct.InheritInverseConfiguration; import org.mapstruct.Mapper; @@ -27,7 +27,7 @@ /** * @author Ivica Cardic */ -@Mapper(config = AutomationConfigurationMapperSpringConfig.class) +@Mapper(config = ProjectConfigurationMapperSpringConfig.class) public interface WorkspaceMapper extends Converter { @Override diff --git a/server/libs/automation/automation-configuration/automation-configuration-rest/automation-configuration-rest-api/src/main/java/com/bytechef/automation/configuration/web/rest/mapper/config/AutomationConfigurationMapperSpringConfig.java b/server/libs/automation/automation-configuration/automation-configuration-rest/automation-configuration-rest-api/src/main/java/com/bytechef/automation/configuration/web/rest/mapper/config/ProjectConfigurationMapperSpringConfig.java similarity index 68% rename from server/libs/automation/automation-configuration/automation-configuration-rest/automation-configuration-rest-api/src/main/java/com/bytechef/automation/configuration/web/rest/mapper/config/AutomationConfigurationMapperSpringConfig.java rename to server/libs/automation/automation-configuration/automation-configuration-rest/automation-configuration-rest-api/src/main/java/com/bytechef/automation/configuration/web/rest/mapper/config/ProjectConfigurationMapperSpringConfig.java index a3372f3a769..868a79b58f1 100644 --- a/server/libs/automation/automation-configuration/automation-configuration-rest/automation-configuration-rest-api/src/main/java/com/bytechef/automation/configuration/web/rest/mapper/config/AutomationConfigurationMapperSpringConfig.java +++ b/server/libs/automation/automation-configuration/automation-configuration-rest/automation-configuration-rest-api/src/main/java/com/bytechef/automation/configuration/web/rest/mapper/config/ProjectConfigurationMapperSpringConfig.java @@ -16,9 +16,9 @@ package com.bytechef.automation.configuration.web.rest.mapper.config; -import com.bytechef.automation.configuration.web.rest.adapter.AutomationConfigurationConversionServiceAdapter; +import com.bytechef.automation.configuration.web.rest.adapter.ProjectConfigurationConversionServiceAdapter; import com.bytechef.platform.category.web.rest.adapter.CategoryConversionServiceAdapter; -import com.bytechef.platform.configuration.web.rest.adapter.PlatformConfigurationConversionServiceAdapter; +import com.bytechef.platform.configuration.web.rest.adapter.WorkflowConfigurationConversionServiceAdapter; import com.bytechef.platform.tag.web.rest.adapter.TagConversionServiceAdapter; import org.mapstruct.MapperConfig; import org.mapstruct.extensions.spring.SpringMapperConfig; @@ -27,11 +27,11 @@ * @author Ivica Cardic */ @MapperConfig(componentModel = "spring", uses = { - AutomationConfigurationConversionServiceAdapter.class, CategoryConversionServiceAdapter.class, - PlatformConfigurationConversionServiceAdapter.class, TagConversionServiceAdapter.class + ProjectConfigurationConversionServiceAdapter.class, CategoryConversionServiceAdapter.class, + WorkflowConfigurationConversionServiceAdapter.class, TagConversionServiceAdapter.class }) @SpringMapperConfig( conversionServiceAdapterPackage = "com.bytechef.automation.configuration.web.rest.adapter", - conversionServiceAdapterClassName = "AutomationConfigurationConversionServiceAdapter") -public interface AutomationConfigurationMapperSpringConfig { + conversionServiceAdapterClassName = "ProjectConfigurationConversionServiceAdapter") +public interface ProjectConfigurationMapperSpringConfig { } diff --git a/server/libs/automation/automation-connection/automation-connection-rest/src/main/java/com/bytechef/automation/connection/web/rest/mapper/WorkspaceConnectionMapper.java b/server/libs/automation/automation-connection/automation-connection-rest/src/main/java/com/bytechef/automation/connection/web/rest/mapper/WorkspaceConnectionMapper.java index 0c3d4a82810..14e308f07fb 100644 --- a/server/libs/automation/automation-connection/automation-connection-rest/src/main/java/com/bytechef/automation/connection/web/rest/mapper/WorkspaceConnectionMapper.java +++ b/server/libs/automation/automation-connection/automation-connection-rest/src/main/java/com/bytechef/automation/connection/web/rest/mapper/WorkspaceConnectionMapper.java @@ -16,7 +16,7 @@ package com.bytechef.automation.connection.web.rest.mapper; -import com.bytechef.automation.connection.web.rest.mapper.config.AutomationConnectionMapperSpringConfig; +import com.bytechef.automation.connection.web.rest.mapper.config.ConnectionMapperSpringConfig; import com.bytechef.automation.connection.web.rest.model.ConnectionModel; import com.bytechef.platform.connection.dto.ConnectionDTO; import org.mapstruct.InheritInverseConfiguration; @@ -28,7 +28,7 @@ /** * @author Ivica Cardic */ -@Mapper(config = AutomationConnectionMapperSpringConfig.class) +@Mapper(config = ConnectionMapperSpringConfig.class) public interface WorkspaceConnectionMapper extends Converter { @Override diff --git a/server/libs/automation/automation-connection/automation-connection-rest/src/main/java/com/bytechef/automation/connection/web/rest/mapper/config/AutomationConnectionMapperSpringConfig.java b/server/libs/automation/automation-connection/automation-connection-rest/src/main/java/com/bytechef/automation/connection/web/rest/mapper/config/ConnectionMapperSpringConfig.java similarity index 70% rename from server/libs/automation/automation-connection/automation-connection-rest/src/main/java/com/bytechef/automation/connection/web/rest/mapper/config/AutomationConnectionMapperSpringConfig.java rename to server/libs/automation/automation-connection/automation-connection-rest/src/main/java/com/bytechef/automation/connection/web/rest/mapper/config/ConnectionMapperSpringConfig.java index 2841ebc22c4..0edecde0abc 100644 --- a/server/libs/automation/automation-connection/automation-connection-rest/src/main/java/com/bytechef/automation/connection/web/rest/mapper/config/AutomationConnectionMapperSpringConfig.java +++ b/server/libs/automation/automation-connection/automation-connection-rest/src/main/java/com/bytechef/automation/connection/web/rest/mapper/config/ConnectionMapperSpringConfig.java @@ -16,7 +16,7 @@ package com.bytechef.automation.connection.web.rest.mapper.config; -import com.bytechef.automation.connection.web.rest.adapter.AutomationConnectionConversionServiceAdapter; +import com.bytechef.automation.connection.web.rest.adapter.ProjectConnectionConversionServiceAdapter; import org.mapstruct.MapperConfig; import org.mapstruct.extensions.spring.SpringMapperConfig; @@ -24,10 +24,12 @@ * @author Ivica Cardic */ @MapperConfig(componentModel = "spring", uses = { - AutomationConnectionConversionServiceAdapter.class, + ProjectConnectionConversionServiceAdapter.class, }) @SpringMapperConfig( + conversionServiceAdapterPackage = "com.bytechef.automation.connection.web.rest.adapter", - conversionServiceAdapterClassName = "AutomationConnectionConversionServiceAdapter") -public interface AutomationConnectionMapperSpringConfig { + conversionServiceAdapterClassName = "ProjectConnectionConversionServiceAdapter", + conversionServiceBeanName = "com.bytechef.automation.connection.web.rest.mapper.config.ConnectionMapperSpringConfig") +public interface ConnectionMapperSpringConfig { } diff --git a/server/libs/automation/automation-workflow/automation-workflow-execution/automation-workflow-execution-rest/src/main/java/com/bytechef/automation/workflow/execution/web/rest/mapper/WorkflowExecutionMapper.java b/server/libs/automation/automation-workflow/automation-workflow-execution/automation-workflow-execution-rest/src/main/java/com/bytechef/automation/workflow/execution/web/rest/mapper/WorkflowExecutionMapper.java index 586775a7133..a03cab58165 100644 --- a/server/libs/automation/automation-workflow/automation-workflow-execution/automation-workflow-execution-rest/src/main/java/com/bytechef/automation/workflow/execution/web/rest/mapper/WorkflowExecutionMapper.java +++ b/server/libs/automation/automation-workflow/automation-workflow-execution/automation-workflow-execution-rest/src/main/java/com/bytechef/automation/workflow/execution/web/rest/mapper/WorkflowExecutionMapper.java @@ -17,7 +17,7 @@ package com.bytechef.automation.workflow.execution.web.rest.mapper; import com.bytechef.automation.workflow.execution.dto.WorkflowExecution; -import com.bytechef.automation.workflow.execution.web.rest.mapper.config.AutomationWorkflowExecutionMapperSpringConfig; +import com.bytechef.automation.workflow.execution.web.rest.mapper.config.WorkflowExecutionMapperSpringConfig; import com.bytechef.automation.workflow.execution.web.rest.model.WorkflowExecutionBasicModel; import com.bytechef.automation.workflow.execution.web.rest.model.WorkflowExecutionModel; import org.mapstruct.Mapper; @@ -29,7 +29,7 @@ public class WorkflowExecutionMapper { @Mapper( - config = AutomationWorkflowExecutionMapperSpringConfig.class, implementationName = "AutomationImpl") + config = WorkflowExecutionMapperSpringConfig.class, implementationName = "AutomationImpl") public interface WorkflowExecutionDTOToWorkflowExecutionModelMapper extends Converter { @@ -38,7 +38,7 @@ public interface WorkflowExecutionDTOToWorkflowExecutionModelMapper } @Mapper( - config = AutomationWorkflowExecutionMapperSpringConfig.class, implementationName = "AutomationImpl") + config = WorkflowExecutionMapperSpringConfig.class, implementationName = "AutomationImpl") public interface WorkflowExecutionDTOToWorkflowExecutionBasicModelMapper extends Converter { diff --git a/server/libs/automation/automation-workflow/automation-workflow-execution/automation-workflow-execution-rest/src/main/java/com/bytechef/automation/workflow/execution/web/rest/mapper/config/AutomationWorkflowExecutionMapperSpringConfig.java b/server/libs/automation/automation-workflow/automation-workflow-execution/automation-workflow-execution-rest/src/main/java/com/bytechef/automation/workflow/execution/web/rest/mapper/config/WorkflowExecutionMapperSpringConfig.java similarity index 57% rename from server/libs/automation/automation-workflow/automation-workflow-execution/automation-workflow-execution-rest/src/main/java/com/bytechef/automation/workflow/execution/web/rest/mapper/config/AutomationWorkflowExecutionMapperSpringConfig.java rename to server/libs/automation/automation-workflow/automation-workflow-execution/automation-workflow-execution-rest/src/main/java/com/bytechef/automation/workflow/execution/web/rest/mapper/config/WorkflowExecutionMapperSpringConfig.java index a9cc86efd4e..af67fa9f57a 100644 --- a/server/libs/automation/automation-workflow/automation-workflow-execution/automation-workflow-execution-rest/src/main/java/com/bytechef/automation/workflow/execution/web/rest/mapper/config/AutomationWorkflowExecutionMapperSpringConfig.java +++ b/server/libs/automation/automation-workflow/automation-workflow-execution/automation-workflow-execution-rest/src/main/java/com/bytechef/automation/workflow/execution/web/rest/mapper/config/WorkflowExecutionMapperSpringConfig.java @@ -16,10 +16,10 @@ package com.bytechef.automation.workflow.execution.web.rest.mapper.config; -import com.bytechef.automation.configuration.web.rest.adapter.AutomationConfigurationConversionServiceAdapter; -import com.bytechef.automation.workflow.execution.web.rest.adapter.AutomationWorkflowExecutionConversionServiceAdapter; -import com.bytechef.platform.configuration.web.rest.adapter.PlatformConfigurationConversionServiceAdapter; -import com.bytechef.platform.workflow.execution.web.rest.adapter.PlatformWorkflowExecutionConversionServiceAdapter; +import com.bytechef.automation.configuration.web.rest.adapter.ProjectConfigurationConversionServiceAdapter; +import com.bytechef.automation.workflow.execution.web.rest.adapter.ProjectWorkflowExecutionConversionServiceAdapter; +import com.bytechef.platform.configuration.web.rest.adapter.WorkflowConfigurationConversionServiceAdapter; +import com.bytechef.platform.workflow.execution.web.rest.adapter.WorkflowExecutionConversionServiceAdapter; import org.mapstruct.MapperConfig; import org.mapstruct.extensions.spring.SpringMapperConfig; @@ -27,11 +27,12 @@ * @author Ivica Cardic */ @MapperConfig(componentModel = "spring", uses = { - AutomationConfigurationConversionServiceAdapter.class, AutomationWorkflowExecutionConversionServiceAdapter.class, - PlatformConfigurationConversionServiceAdapter.class, PlatformWorkflowExecutionConversionServiceAdapter.class, + ProjectConfigurationConversionServiceAdapter.class, ProjectWorkflowExecutionConversionServiceAdapter.class, + WorkflowConfigurationConversionServiceAdapter.class, WorkflowExecutionConversionServiceAdapter.class, }) @SpringMapperConfig( conversionServiceAdapterPackage = "com.bytechef.automation.workflow.execution.web.rest.adapter", - conversionServiceAdapterClassName = "AutomationWorkflowExecutionConversionServiceAdapter") -public interface AutomationWorkflowExecutionMapperSpringConfig { + conversionServiceAdapterClassName = "ProjectWorkflowExecutionConversionServiceAdapter", + conversionServiceBeanName = "com.bytechef.automation.workflow.execution.web.rest.mapper.config.WorkflowExecutionMapperSpringConfig") +public interface WorkflowExecutionMapperSpringConfig { } diff --git a/server/libs/embedded/embedded-configuration/embedded-configuration-public-rest/src/main/java/com/bytechef/embedded/configuration/public_/web/rest/mapper/IntegrationMapper.java b/server/libs/embedded/embedded-configuration/embedded-configuration-public-rest/src/main/java/com/bytechef/embedded/configuration/public_/web/rest/mapper/IntegrationMapper.java index 0626f8ecdcf..5fbb5512338 100644 --- a/server/libs/embedded/embedded-configuration/embedded-configuration-public-rest/src/main/java/com/bytechef/embedded/configuration/public_/web/rest/mapper/IntegrationMapper.java +++ b/server/libs/embedded/embedded-configuration/embedded-configuration-public-rest/src/main/java/com/bytechef/embedded/configuration/public_/web/rest/mapper/IntegrationMapper.java @@ -17,13 +17,13 @@ package com.bytechef.embedded.configuration.public_.web.rest.mapper; import com.bytechef.embedded.configuration.dto.IntegrationDTO; -import com.bytechef.embedded.configuration.public_.web.rest.mapper.config.EmbeddedPublicConfigurationMapperSpringConfig; +import com.bytechef.embedded.configuration.public_.web.rest.mapper.config.IntegrationPublicConfigurationMapperSpringConfig; import com.bytechef.embedded.configuration.public_.web.rest.model.IntegrationModel; import org.mapstruct.Mapper; import org.mapstruct.Mapping; import org.springframework.core.convert.converter.Converter; -@Mapper(config = EmbeddedPublicConfigurationMapperSpringConfig.class) +@Mapper(config = IntegrationPublicConfigurationMapperSpringConfig.class) public interface IntegrationMapper extends Converter { @Override diff --git a/server/libs/embedded/embedded-configuration/embedded-configuration-public-rest/src/main/java/com/bytechef/embedded/configuration/public_/web/rest/mapper/config/EmbeddedPublicConfigurationMapperSpringConfig.java b/server/libs/embedded/embedded-configuration/embedded-configuration-public-rest/src/main/java/com/bytechef/embedded/configuration/public_/web/rest/mapper/config/IntegrationPublicConfigurationMapperSpringConfig.java similarity index 78% rename from server/libs/embedded/embedded-configuration/embedded-configuration-public-rest/src/main/java/com/bytechef/embedded/configuration/public_/web/rest/mapper/config/EmbeddedPublicConfigurationMapperSpringConfig.java rename to server/libs/embedded/embedded-configuration/embedded-configuration-public-rest/src/main/java/com/bytechef/embedded/configuration/public_/web/rest/mapper/config/IntegrationPublicConfigurationMapperSpringConfig.java index e3b7e75b213..d6a54450d8a 100644 --- a/server/libs/embedded/embedded-configuration/embedded-configuration-public-rest/src/main/java/com/bytechef/embedded/configuration/public_/web/rest/mapper/config/EmbeddedPublicConfigurationMapperSpringConfig.java +++ b/server/libs/embedded/embedded-configuration/embedded-configuration-public-rest/src/main/java/com/bytechef/embedded/configuration/public_/web/rest/mapper/config/IntegrationPublicConfigurationMapperSpringConfig.java @@ -16,7 +16,7 @@ package com.bytechef.embedded.configuration.public_.web.rest.mapper.config; -import com.bytechef.embedded.configuration.public_.web.rest.adapter.EmbeddedPublicConfigurationConversionServiceAdapter; +import com.bytechef.embedded.configuration.public_.web.rest.adapter.IntegrationPublicConfigurationConversionServiceAdapter; import org.mapstruct.MapperConfig; import org.mapstruct.extensions.spring.SpringMapperConfig; @@ -24,10 +24,10 @@ * @author Ivica Cardic */ @MapperConfig(componentModel = "spring", uses = { - EmbeddedPublicConfigurationConversionServiceAdapter.class + IntegrationPublicConfigurationConversionServiceAdapter.class }) @SpringMapperConfig( conversionServiceAdapterPackage = "com.bytechef.embedded.configuration.public_.web.rest.adapter", - conversionServiceAdapterClassName = "EmbeddedPublicConfigurationConversionServiceAdapter") -public interface EmbeddedPublicConfigurationMapperSpringConfig { + conversionServiceAdapterClassName = "IntegrationPublicConfigurationConversionServiceAdapter") +public interface IntegrationPublicConfigurationMapperSpringConfig { } diff --git a/server/libs/embedded/embedded-configuration/embedded-configuration-rest/embedded-configuration-rest-api/src/main/java/com/bytechef/embedded/configuration/web/rest/mapper/AppEventMapper.java b/server/libs/embedded/embedded-configuration/embedded-configuration-rest/embedded-configuration-rest-api/src/main/java/com/bytechef/embedded/configuration/web/rest/mapper/AppEventMapper.java index 73e7ba7648b..18572383dad 100644 --- a/server/libs/embedded/embedded-configuration/embedded-configuration-rest/embedded-configuration-rest-api/src/main/java/com/bytechef/embedded/configuration/web/rest/mapper/AppEventMapper.java +++ b/server/libs/embedded/embedded-configuration/embedded-configuration-rest/embedded-configuration-rest-api/src/main/java/com/bytechef/embedded/configuration/web/rest/mapper/AppEventMapper.java @@ -17,7 +17,7 @@ package com.bytechef.embedded.configuration.web.rest.mapper; import com.bytechef.embedded.configuration.domain.AppEvent; -import com.bytechef.embedded.configuration.web.rest.mapper.config.EmbeddedConfigurationMapperSpringConfig; +import com.bytechef.embedded.configuration.web.rest.mapper.config.IntegrationConfigurationMapperSpringConfig; import com.bytechef.embedded.configuration.web.rest.model.AppEventModel; import org.mapstruct.InheritInverseConfiguration; import org.mapstruct.Mapper; @@ -27,7 +27,7 @@ /** * @author Ivica Cardic */ -@Mapper(config = EmbeddedConfigurationMapperSpringConfig.class) +@Mapper(config = IntegrationConfigurationMapperSpringConfig.class) public interface AppEventMapper extends Converter { @Override diff --git a/server/libs/embedded/embedded-configuration/embedded-configuration-rest/embedded-configuration-rest-api/src/main/java/com/bytechef/embedded/configuration/web/rest/mapper/IntegrationInstanceConfigurationMapper.java b/server/libs/embedded/embedded-configuration/embedded-configuration-rest/embedded-configuration-rest-api/src/main/java/com/bytechef/embedded/configuration/web/rest/mapper/IntegrationInstanceConfigurationMapper.java index d99f3530c26..5eb1ce5bad9 100644 --- a/server/libs/embedded/embedded-configuration/embedded-configuration-rest/embedded-configuration-rest-api/src/main/java/com/bytechef/embedded/configuration/web/rest/mapper/IntegrationInstanceConfigurationMapper.java +++ b/server/libs/embedded/embedded-configuration/embedded-configuration-rest/embedded-configuration-rest-api/src/main/java/com/bytechef/embedded/configuration/web/rest/mapper/IntegrationInstanceConfigurationMapper.java @@ -18,7 +18,7 @@ import com.bytechef.embedded.configuration.domain.IntegrationInstanceConfiguration; import com.bytechef.embedded.configuration.dto.IntegrationInstanceConfigurationDTO; -import com.bytechef.embedded.configuration.web.rest.mapper.config.EmbeddedConfigurationMapperSpringConfig; +import com.bytechef.embedded.configuration.web.rest.mapper.config.IntegrationConfigurationMapperSpringConfig; import com.bytechef.embedded.configuration.web.rest.model.IntegrationInstanceConfigurationBasicModel; import com.bytechef.embedded.configuration.web.rest.model.IntegrationInstanceConfigurationModel; import org.mapstruct.InheritInverseConfiguration; @@ -32,7 +32,7 @@ */ public class IntegrationInstanceConfigurationMapper { - @Mapper(config = EmbeddedConfigurationMapperSpringConfig.class) + @Mapper(config = IntegrationConfigurationMapperSpringConfig.class) public interface IntegrationInstanceConfigurationBasicToIntegrationInstanceModelMapper extends Converter { @@ -40,7 +40,7 @@ public interface IntegrationInstanceConfigurationBasicToIntegrationInstanceModel IntegrationInstanceConfigurationBasicModel convert(IntegrationInstanceConfiguration integrationInstance); } - @Mapper(config = EmbeddedConfigurationMapperSpringConfig.class) + @Mapper(config = IntegrationConfigurationMapperSpringConfig.class) public interface IntegrationInstanceConfigurationToIntegrationInstanceModelMapper extends Converter { @@ -53,7 +53,7 @@ public interface IntegrationInstanceConfigurationToIntegrationInstanceModelMappe IntegrationInstanceConfigurationModel convert(IntegrationInstanceConfiguration integrationInstance); } - @Mapper(config = EmbeddedConfigurationMapperSpringConfig.class) + @Mapper(config = IntegrationConfigurationMapperSpringConfig.class) public interface IntegrationInstanceConfigurationDTOToIntegrationInstanceModelMapper extends Converter { diff --git a/server/libs/embedded/embedded-configuration/embedded-configuration-rest/embedded-configuration-rest-api/src/main/java/com/bytechef/embedded/configuration/web/rest/mapper/IntegrationInstanceConfigurationWorkflowConnectionModelMapper.java b/server/libs/embedded/embedded-configuration/embedded-configuration-rest/embedded-configuration-rest-api/src/main/java/com/bytechef/embedded/configuration/web/rest/mapper/IntegrationInstanceConfigurationWorkflowConnectionModelMapper.java index b697855fdc4..5ed764bc271 100644 --- a/server/libs/embedded/embedded-configuration/embedded-configuration-rest/embedded-configuration-rest-api/src/main/java/com/bytechef/embedded/configuration/web/rest/mapper/IntegrationInstanceConfigurationWorkflowConnectionModelMapper.java +++ b/server/libs/embedded/embedded-configuration/embedded-configuration-rest/embedded-configuration-rest-api/src/main/java/com/bytechef/embedded/configuration/web/rest/mapper/IntegrationInstanceConfigurationWorkflowConnectionModelMapper.java @@ -17,7 +17,7 @@ package com.bytechef.embedded.configuration.web.rest.mapper; import com.bytechef.embedded.configuration.domain.IntegrationInstanceConfigurationWorkflowConnection; -import com.bytechef.embedded.configuration.web.rest.mapper.config.EmbeddedConfigurationMapperSpringConfig; +import com.bytechef.embedded.configuration.web.rest.mapper.config.IntegrationConfigurationMapperSpringConfig; import com.bytechef.embedded.configuration.web.rest.model.IntegrationInstanceConfigurationWorkflowConnectionModel; import org.mapstruct.Mapper; import org.springframework.core.convert.converter.Converter; @@ -25,7 +25,7 @@ /** * @author Ivica Cardic */ -@Mapper(config = EmbeddedConfigurationMapperSpringConfig.class) +@Mapper(config = IntegrationConfigurationMapperSpringConfig.class) public interface IntegrationInstanceConfigurationWorkflowConnectionModelMapper extends Converter { diff --git a/server/libs/embedded/embedded-configuration/embedded-configuration-rest/embedded-configuration-rest-api/src/main/java/com/bytechef/embedded/configuration/web/rest/mapper/IntegrationInstanceConfigurationWorkflowMapper.java b/server/libs/embedded/embedded-configuration/embedded-configuration-rest/embedded-configuration-rest-api/src/main/java/com/bytechef/embedded/configuration/web/rest/mapper/IntegrationInstanceConfigurationWorkflowMapper.java index 27f2d4a4b20..22f8560dd42 100644 --- a/server/libs/embedded/embedded-configuration/embedded-configuration-rest/embedded-configuration-rest-api/src/main/java/com/bytechef/embedded/configuration/web/rest/mapper/IntegrationInstanceConfigurationWorkflowMapper.java +++ b/server/libs/embedded/embedded-configuration/embedded-configuration-rest/embedded-configuration-rest-api/src/main/java/com/bytechef/embedded/configuration/web/rest/mapper/IntegrationInstanceConfigurationWorkflowMapper.java @@ -18,7 +18,7 @@ import com.bytechef.embedded.configuration.domain.IntegrationInstanceConfigurationWorkflow; import com.bytechef.embedded.configuration.dto.IntegrationInstanceConfigurationWorkflowDTO; -import com.bytechef.embedded.configuration.web.rest.mapper.config.EmbeddedConfigurationMapperSpringConfig; +import com.bytechef.embedded.configuration.web.rest.mapper.config.IntegrationConfigurationMapperSpringConfig; import com.bytechef.embedded.configuration.web.rest.model.IntegrationInstanceConfigurationWorkflowModel; import org.mapstruct.InheritInverseConfiguration; import org.mapstruct.Mapper; @@ -31,7 +31,7 @@ */ public class IntegrationInstanceConfigurationWorkflowMapper { - @Mapper(config = EmbeddedConfigurationMapperSpringConfig.class) + @Mapper(config = IntegrationConfigurationMapperSpringConfig.class) public interface IntegrationInstanceWorkflowToIntegrationInstanceWorkflowModelMapper extends Converter { @@ -47,7 +47,7 @@ IntegrationInstanceConfigurationWorkflow invertConvert( IntegrationInstanceConfigurationWorkflowModel integrationInstanceConfigurationWorkflowModel); } - @Mapper(config = EmbeddedConfigurationMapperSpringConfig.class) + @Mapper(config = IntegrationConfigurationMapperSpringConfig.class) public interface IntegrationInstanceWorkflowDTOToIntegrationInstanceWorkflowModelMapper extends Converter { diff --git a/server/libs/embedded/embedded-configuration/embedded-configuration-rest/embedded-configuration-rest-api/src/main/java/com/bytechef/embedded/configuration/web/rest/mapper/IntegrationInstanceMapper.java b/server/libs/embedded/embedded-configuration/embedded-configuration-rest/embedded-configuration-rest-api/src/main/java/com/bytechef/embedded/configuration/web/rest/mapper/IntegrationInstanceMapper.java index e16361fef9e..8fc1c1ab11a 100644 --- a/server/libs/embedded/embedded-configuration/embedded-configuration-rest/embedded-configuration-rest-api/src/main/java/com/bytechef/embedded/configuration/web/rest/mapper/IntegrationInstanceMapper.java +++ b/server/libs/embedded/embedded-configuration/embedded-configuration-rest/embedded-configuration-rest-api/src/main/java/com/bytechef/embedded/configuration/web/rest/mapper/IntegrationInstanceMapper.java @@ -18,7 +18,7 @@ import com.bytechef.embedded.configuration.domain.IntegrationInstance; import com.bytechef.embedded.configuration.dto.IntegrationInstanceDTO; -import com.bytechef.embedded.configuration.web.rest.mapper.config.EmbeddedConfigurationMapperSpringConfig; +import com.bytechef.embedded.configuration.web.rest.mapper.config.IntegrationConfigurationMapperSpringConfig; import com.bytechef.embedded.configuration.web.rest.model.IntegrationInstanceBasicModel; import com.bytechef.embedded.configuration.web.rest.model.IntegrationInstanceModel; import org.mapstruct.InheritInverseConfiguration; @@ -32,7 +32,7 @@ */ public class IntegrationInstanceMapper { - @Mapper(config = EmbeddedConfigurationMapperSpringConfig.class) + @Mapper(config = IntegrationConfigurationMapperSpringConfig.class) public interface IntegrationInstanceToIntegrationInstanceBasicModelMapper extends Converter { @@ -41,7 +41,7 @@ public interface IntegrationInstanceToIntegrationInstanceBasicModelMapper IntegrationInstanceBasicModel convert(IntegrationInstance integrationInstanc); } - @Mapper(config = EmbeddedConfigurationMapperSpringConfig.class) + @Mapper(config = IntegrationConfigurationMapperSpringConfig.class) public interface IntegrationInstanceToIntegrationInstanceModelMapper extends Converter { @@ -56,7 +56,7 @@ public interface IntegrationInstanceToIntegrationInstanceModelMapper IntegrationInstance invertConvert(IntegrationInstanceModel integrationInstanceModel); } - @Mapper(config = EmbeddedConfigurationMapperSpringConfig.class) + @Mapper(config = IntegrationConfigurationMapperSpringConfig.class) public interface IntegrationInstanceDTOToIntegrationInstanceBasicModelMapper extends Converter { @@ -64,7 +64,7 @@ public interface IntegrationInstanceDTOToIntegrationInstanceBasicModelMapper IntegrationInstanceBasicModel convert(IntegrationInstanceDTO integrationInstance); } - @Mapper(config = EmbeddedConfigurationMapperSpringConfig.class) + @Mapper(config = IntegrationConfigurationMapperSpringConfig.class) public interface IntegrationInstanceDTOToIntegrationInstanceModelMapper extends Converter { diff --git a/server/libs/embedded/embedded-configuration/embedded-configuration-rest/embedded-configuration-rest-api/src/main/java/com/bytechef/embedded/configuration/web/rest/mapper/IntegrationInstanceWorkflowMapper.java b/server/libs/embedded/embedded-configuration/embedded-configuration-rest/embedded-configuration-rest-api/src/main/java/com/bytechef/embedded/configuration/web/rest/mapper/IntegrationInstanceWorkflowMapper.java index c1a01057c6d..0b8dd4bb84f 100644 --- a/server/libs/embedded/embedded-configuration/embedded-configuration-rest/embedded-configuration-rest-api/src/main/java/com/bytechef/embedded/configuration/web/rest/mapper/IntegrationInstanceWorkflowMapper.java +++ b/server/libs/embedded/embedded-configuration/embedded-configuration-rest/embedded-configuration-rest-api/src/main/java/com/bytechef/embedded/configuration/web/rest/mapper/IntegrationInstanceWorkflowMapper.java @@ -18,7 +18,7 @@ import com.bytechef.embedded.configuration.domain.IntegrationInstanceWorkflow; import com.bytechef.embedded.configuration.dto.IntegrationInstanceWorkflowDTO; -import com.bytechef.embedded.configuration.web.rest.mapper.config.EmbeddedConfigurationMapperSpringConfig; +import com.bytechef.embedded.configuration.web.rest.mapper.config.IntegrationConfigurationMapperSpringConfig; import com.bytechef.embedded.configuration.web.rest.model.IntegrationInstanceWorkflowModel; import org.mapstruct.Mapper; import org.mapstruct.Mapping; @@ -29,7 +29,7 @@ */ public class IntegrationInstanceWorkflowMapper { - @Mapper(config = EmbeddedConfigurationMapperSpringConfig.class) + @Mapper(config = IntegrationConfigurationMapperSpringConfig.class) public interface IntegrationInstanceWorkflowDToIntegrationInstanceWorkflowModelMapper extends Converter { @@ -38,7 +38,7 @@ public interface IntegrationInstanceWorkflowDToIntegrationInstanceWorkflowModelM IntegrationInstanceWorkflowModel convert(IntegrationInstanceWorkflow integrationInstanceWorkflow); } - @Mapper(config = EmbeddedConfigurationMapperSpringConfig.class) + @Mapper(config = IntegrationConfigurationMapperSpringConfig.class) public interface IntegrationInstanceWorkflowDTOToIntegrationInstanceWorkflowModelMapper extends Converter { diff --git a/server/libs/embedded/embedded-configuration/embedded-configuration-rest/embedded-configuration-rest-api/src/main/java/com/bytechef/embedded/configuration/web/rest/mapper/IntegrationMapper.java b/server/libs/embedded/embedded-configuration/embedded-configuration-rest/embedded-configuration-rest-api/src/main/java/com/bytechef/embedded/configuration/web/rest/mapper/IntegrationMapper.java index 57534e5640a..c6c369cab27 100644 --- a/server/libs/embedded/embedded-configuration/embedded-configuration-rest/embedded-configuration-rest-api/src/main/java/com/bytechef/embedded/configuration/web/rest/mapper/IntegrationMapper.java +++ b/server/libs/embedded/embedded-configuration/embedded-configuration-rest/embedded-configuration-rest-api/src/main/java/com/bytechef/embedded/configuration/web/rest/mapper/IntegrationMapper.java @@ -18,7 +18,7 @@ import com.bytechef.embedded.configuration.domain.Integration; import com.bytechef.embedded.configuration.dto.IntegrationDTO; -import com.bytechef.embedded.configuration.web.rest.mapper.config.EmbeddedConfigurationMapperSpringConfig; +import com.bytechef.embedded.configuration.web.rest.mapper.config.IntegrationConfigurationMapperSpringConfig; import com.bytechef.embedded.configuration.web.rest.model.IntegrationBasicModel; import com.bytechef.embedded.configuration.web.rest.model.IntegrationModel; import org.mapstruct.InheritInverseConfiguration; @@ -32,14 +32,14 @@ */ public class IntegrationMapper { - @Mapper(config = EmbeddedConfigurationMapperSpringConfig.class) + @Mapper(config = IntegrationConfigurationMapperSpringConfig.class) public interface IntegrationToIntegrationBasicModelMapper extends Converter { @Override IntegrationBasicModel convert(Integration integration); } - @Mapper(config = EmbeddedConfigurationMapperSpringConfig.class) + @Mapper(config = IntegrationConfigurationMapperSpringConfig.class) public interface IntegrationDTOToIntegrationModelMapper extends Converter { @Override diff --git a/server/libs/embedded/embedded-configuration/embedded-configuration-rest/embedded-configuration-rest-api/src/main/java/com/bytechef/embedded/configuration/web/rest/mapper/IntegrationVersionMapper.java b/server/libs/embedded/embedded-configuration/embedded-configuration-rest/embedded-configuration-rest-api/src/main/java/com/bytechef/embedded/configuration/web/rest/mapper/IntegrationVersionMapper.java index 6866ccd5a8f..cb7e5f49582 100644 --- a/server/libs/embedded/embedded-configuration/embedded-configuration-rest/embedded-configuration-rest-api/src/main/java/com/bytechef/embedded/configuration/web/rest/mapper/IntegrationVersionMapper.java +++ b/server/libs/embedded/embedded-configuration/embedded-configuration-rest/embedded-configuration-rest-api/src/main/java/com/bytechef/embedded/configuration/web/rest/mapper/IntegrationVersionMapper.java @@ -17,7 +17,7 @@ package com.bytechef.embedded.configuration.web.rest.mapper; import com.bytechef.embedded.configuration.domain.IntegrationVersion; -import com.bytechef.embedded.configuration.web.rest.mapper.config.EmbeddedConfigurationMapperSpringConfig; +import com.bytechef.embedded.configuration.web.rest.mapper.config.IntegrationConfigurationMapperSpringConfig; import com.bytechef.embedded.configuration.web.rest.model.IntegrationVersionModel; import org.mapstruct.Mapper; import org.springframework.core.convert.converter.Converter; @@ -25,7 +25,7 @@ /** * @author Ivica Cardic */ -@Mapper(config = EmbeddedConfigurationMapperSpringConfig.class) +@Mapper(config = IntegrationConfigurationMapperSpringConfig.class) public interface IntegrationVersionMapper extends Converter { @Override diff --git a/server/libs/embedded/embedded-configuration/embedded-configuration-rest/embedded-configuration-rest-api/src/main/java/com/bytechef/embedded/configuration/web/rest/mapper/IntegrationWorkflowMapper.java b/server/libs/embedded/embedded-configuration/embedded-configuration-rest/embedded-configuration-rest-api/src/main/java/com/bytechef/embedded/configuration/web/rest/mapper/IntegrationWorkflowMapper.java index 15537065bcf..64b83f1e181 100644 --- a/server/libs/embedded/embedded-configuration/embedded-configuration-rest/embedded-configuration-rest-api/src/main/java/com/bytechef/embedded/configuration/web/rest/mapper/IntegrationWorkflowMapper.java +++ b/server/libs/embedded/embedded-configuration/embedded-configuration-rest/embedded-configuration-rest-api/src/main/java/com/bytechef/embedded/configuration/web/rest/mapper/IntegrationWorkflowMapper.java @@ -17,7 +17,7 @@ package com.bytechef.embedded.configuration.web.rest.mapper; import com.bytechef.embedded.configuration.dto.IntegrationWorkflowDTO; -import com.bytechef.embedded.configuration.web.rest.mapper.config.EmbeddedConfigurationMapperSpringConfig; +import com.bytechef.embedded.configuration.web.rest.mapper.config.IntegrationConfigurationMapperSpringConfig; import com.bytechef.embedded.configuration.web.rest.model.WorkflowBasicModel; import com.bytechef.embedded.configuration.web.rest.model.WorkflowModel; import com.bytechef.platform.configuration.web.rest.mapper.util.WorkflowMapperUtils; @@ -32,7 +32,7 @@ */ public abstract class IntegrationWorkflowMapper { - @Mapper(config = EmbeddedConfigurationMapperSpringConfig.class) + @Mapper(config = IntegrationConfigurationMapperSpringConfig.class) public abstract static class IntegrationWorkflowDTOToWorkflowModelMapper implements Converter { @@ -50,7 +50,7 @@ public void afterMapping(IntegrationWorkflowDTO workflowDTO, @MappingTarget Work } } - @Mapper(config = EmbeddedConfigurationMapperSpringConfig.class) + @Mapper(config = IntegrationConfigurationMapperSpringConfig.class) public abstract static class IntegrationWorkflowModelToWorkflowBasicModel implements Converter { diff --git a/server/libs/embedded/embedded-configuration/embedded-configuration-rest/embedded-configuration-rest-api/src/main/java/com/bytechef/embedded/configuration/web/rest/mapper/config/EmbeddedConfigurationMapperSpringConfig.java b/server/libs/embedded/embedded-configuration/embedded-configuration-rest/embedded-configuration-rest-api/src/main/java/com/bytechef/embedded/configuration/web/rest/mapper/config/IntegrationConfigurationMapperSpringConfig.java similarity index 68% rename from server/libs/embedded/embedded-configuration/embedded-configuration-rest/embedded-configuration-rest-api/src/main/java/com/bytechef/embedded/configuration/web/rest/mapper/config/EmbeddedConfigurationMapperSpringConfig.java rename to server/libs/embedded/embedded-configuration/embedded-configuration-rest/embedded-configuration-rest-api/src/main/java/com/bytechef/embedded/configuration/web/rest/mapper/config/IntegrationConfigurationMapperSpringConfig.java index fbb14964abf..d7194c6f470 100644 --- a/server/libs/embedded/embedded-configuration/embedded-configuration-rest/embedded-configuration-rest-api/src/main/java/com/bytechef/embedded/configuration/web/rest/mapper/config/EmbeddedConfigurationMapperSpringConfig.java +++ b/server/libs/embedded/embedded-configuration/embedded-configuration-rest/embedded-configuration-rest-api/src/main/java/com/bytechef/embedded/configuration/web/rest/mapper/config/IntegrationConfigurationMapperSpringConfig.java @@ -16,9 +16,9 @@ package com.bytechef.embedded.configuration.web.rest.mapper.config; -import com.bytechef.embedded.configuration.web.rest.adapter.EmbeddedConfigurationConversionServiceAdapter; +import com.bytechef.embedded.configuration.web.rest.adapter.IntegrationConfigurationConversionServiceAdapter; import com.bytechef.platform.category.web.rest.adapter.CategoryConversionServiceAdapter; -import com.bytechef.platform.configuration.web.rest.adapter.PlatformConfigurationConversionServiceAdapter; +import com.bytechef.platform.configuration.web.rest.adapter.WorkflowConfigurationConversionServiceAdapter; import com.bytechef.platform.tag.web.rest.adapter.TagConversionServiceAdapter; import org.mapstruct.MapperConfig; import org.mapstruct.extensions.spring.SpringMapperConfig; @@ -27,11 +27,11 @@ * @author Ivica Cardic */ @MapperConfig(componentModel = "spring", uses = { - CategoryConversionServiceAdapter.class, EmbeddedConfigurationConversionServiceAdapter.class, - PlatformConfigurationConversionServiceAdapter.class, TagConversionServiceAdapter.class + CategoryConversionServiceAdapter.class, IntegrationConfigurationConversionServiceAdapter.class, + WorkflowConfigurationConversionServiceAdapter.class, TagConversionServiceAdapter.class }) @SpringMapperConfig( conversionServiceAdapterPackage = "com.bytechef.embedded.configuration.web.rest.adapter", - conversionServiceAdapterClassName = "EmbeddedConfigurationConversionServiceAdapter") -public interface EmbeddedConfigurationMapperSpringConfig { + conversionServiceAdapterClassName = "IntegrationConfigurationConversionServiceAdapter") +public interface IntegrationConfigurationMapperSpringConfig { } diff --git a/server/libs/embedded/embedded-connected-user/embedded-connected-user-rest/src/main/java/com/bytechef/embedded/connected/user/web/rest/mapper/ConnectedUserMapper.java b/server/libs/embedded/embedded-connected-user/embedded-connected-user-rest/src/main/java/com/bytechef/embedded/connected/user/web/rest/mapper/ConnectedUserMapper.java index 3edbb56622f..4003835a1ee 100644 --- a/server/libs/embedded/embedded-connected-user/embedded-connected-user-rest/src/main/java/com/bytechef/embedded/connected/user/web/rest/mapper/ConnectedUserMapper.java +++ b/server/libs/embedded/embedded-connected-user/embedded-connected-user-rest/src/main/java/com/bytechef/embedded/connected/user/web/rest/mapper/ConnectedUserMapper.java @@ -17,7 +17,7 @@ package com.bytechef.embedded.connected.user.web.rest.mapper; import com.bytechef.embedded.connected.user.dto.ConnectedUserDTO; -import com.bytechef.embedded.connected.user.web.rest.mapper.config.EmbeddedConnectedUserMapperSpringConfig; +import com.bytechef.embedded.connected.user.web.rest.mapper.config.ConnectedUserMapperSpringConfig; import com.bytechef.embedded.connected.user.web.rest.model.ConnectedUserModel; import org.mapstruct.Mapper; import org.springframework.core.convert.converter.Converter; @@ -25,7 +25,7 @@ /** * @author Ivica Cardic */ -@Mapper(config = EmbeddedConnectedUserMapperSpringConfig.class) +@Mapper(config = ConnectedUserMapperSpringConfig.class) public interface ConnectedUserMapper extends Converter { @Override diff --git a/server/libs/embedded/embedded-connected-user/embedded-connected-user-rest/src/main/java/com/bytechef/embedded/connected/user/web/rest/mapper/config/EmbeddedConnectedUserMapperSpringConfig.java b/server/libs/embedded/embedded-connected-user/embedded-connected-user-rest/src/main/java/com/bytechef/embedded/connected/user/web/rest/mapper/config/ConnectedUserMapperSpringConfig.java similarity index 75% rename from server/libs/embedded/embedded-connected-user/embedded-connected-user-rest/src/main/java/com/bytechef/embedded/connected/user/web/rest/mapper/config/EmbeddedConnectedUserMapperSpringConfig.java rename to server/libs/embedded/embedded-connected-user/embedded-connected-user-rest/src/main/java/com/bytechef/embedded/connected/user/web/rest/mapper/config/ConnectedUserMapperSpringConfig.java index 6a73b593d66..34212448595 100644 --- a/server/libs/embedded/embedded-connected-user/embedded-connected-user-rest/src/main/java/com/bytechef/embedded/connected/user/web/rest/mapper/config/EmbeddedConnectedUserMapperSpringConfig.java +++ b/server/libs/embedded/embedded-connected-user/embedded-connected-user-rest/src/main/java/com/bytechef/embedded/connected/user/web/rest/mapper/config/ConnectedUserMapperSpringConfig.java @@ -16,7 +16,7 @@ package com.bytechef.embedded.connected.user.web.rest.mapper.config; -import com.bytechef.embedded.configuration.web.rest.adapter.EmbeddedConnectedUserConversionServiceAdapter; +import com.bytechef.embedded.configuration.web.rest.adapter.ConnectedUserConversionServiceAdapter; import org.mapstruct.MapperConfig; import org.mapstruct.extensions.spring.SpringMapperConfig; @@ -24,10 +24,10 @@ * @author Ivica Cardic */ @MapperConfig(componentModel = "spring", uses = { - EmbeddedConnectedUserConversionServiceAdapter.class + ConnectedUserConversionServiceAdapter.class }) @SpringMapperConfig( conversionServiceAdapterPackage = "com.bytechef.embedded.configuration.web.rest.adapter", - conversionServiceAdapterClassName = "EmbeddedConnectedUserConversionServiceAdapter") -public interface EmbeddedConnectedUserMapperSpringConfig { + conversionServiceAdapterClassName = "ConnectedUserConversionServiceAdapter") +public interface ConnectedUserMapperSpringConfig { } diff --git a/server/libs/embedded/embedded-connection/embedded-connection-rest/src/main/java/com/bytechef/embedded/connection/web/rest/mapper/ConnectionMapper.java b/server/libs/embedded/embedded-connection/embedded-connection-rest/src/main/java/com/bytechef/embedded/connection/web/rest/mapper/ConnectionMapper.java index f81c35a6f00..fbfdafe2a0e 100644 --- a/server/libs/embedded/embedded-connection/embedded-connection-rest/src/main/java/com/bytechef/embedded/connection/web/rest/mapper/ConnectionMapper.java +++ b/server/libs/embedded/embedded-connection/embedded-connection-rest/src/main/java/com/bytechef/embedded/connection/web/rest/mapper/ConnectionMapper.java @@ -16,7 +16,7 @@ package com.bytechef.embedded.connection.web.rest.mapper; -import com.bytechef.embedded.connection.web.rest.mapper.config.EmbeddedConnectionMapperSpringConfig; +import com.bytechef.embedded.connection.web.rest.mapper.config.ConnectionMapperSpringConfig; import com.bytechef.embedded.connection.web.rest.model.ConnectionModel; import com.bytechef.platform.connection.dto.ConnectionDTO; import org.mapstruct.Mapper; @@ -25,7 +25,7 @@ /** * @author Ivica Cardic */ -@Mapper(config = EmbeddedConnectionMapperSpringConfig.class) +@Mapper(config = ConnectionMapperSpringConfig.class) public interface ConnectionMapper extends Converter { @Override diff --git a/server/libs/embedded/embedded-connection/embedded-connection-rest/src/main/java/com/bytechef/embedded/connection/web/rest/mapper/ConnectionModelMapper.java b/server/libs/embedded/embedded-connection/embedded-connection-rest/src/main/java/com/bytechef/embedded/connection/web/rest/mapper/ConnectionModelMapper.java index 307224ef4a3..08002bf5f21 100644 --- a/server/libs/embedded/embedded-connection/embedded-connection-rest/src/main/java/com/bytechef/embedded/connection/web/rest/mapper/ConnectionModelMapper.java +++ b/server/libs/embedded/embedded-connection/embedded-connection-rest/src/main/java/com/bytechef/embedded/connection/web/rest/mapper/ConnectionModelMapper.java @@ -16,7 +16,7 @@ package com.bytechef.embedded.connection.web.rest.mapper; -import com.bytechef.embedded.connection.web.rest.mapper.config.EmbeddedConnectionMapperSpringConfig; +import com.bytechef.embedded.connection.web.rest.mapper.config.ConnectionMapperSpringConfig; import com.bytechef.embedded.connection.web.rest.model.ConnectionModel; import com.bytechef.platform.connection.dto.ConnectionDTO; import org.mapstruct.Mapper; @@ -25,7 +25,7 @@ /** * @author Ivica Cardic */ -@Mapper(config = EmbeddedConnectionMapperSpringConfig.class) +@Mapper(config = ConnectionMapperSpringConfig.class) public interface ConnectionModelMapper extends Converter { @Override diff --git a/server/libs/embedded/embedded-connection/embedded-connection-rest/src/main/java/com/bytechef/embedded/connection/web/rest/mapper/config/EmbeddedConnectionMapperSpringConfig.java b/server/libs/embedded/embedded-connection/embedded-connection-rest/src/main/java/com/bytechef/embedded/connection/web/rest/mapper/config/ConnectionMapperSpringConfig.java similarity index 69% rename from server/libs/embedded/embedded-connection/embedded-connection-rest/src/main/java/com/bytechef/embedded/connection/web/rest/mapper/config/EmbeddedConnectionMapperSpringConfig.java rename to server/libs/embedded/embedded-connection/embedded-connection-rest/src/main/java/com/bytechef/embedded/connection/web/rest/mapper/config/ConnectionMapperSpringConfig.java index 1083a2cd777..d659eab6395 100644 --- a/server/libs/embedded/embedded-connection/embedded-connection-rest/src/main/java/com/bytechef/embedded/connection/web/rest/mapper/config/EmbeddedConnectionMapperSpringConfig.java +++ b/server/libs/embedded/embedded-connection/embedded-connection-rest/src/main/java/com/bytechef/embedded/connection/web/rest/mapper/config/ConnectionMapperSpringConfig.java @@ -16,7 +16,7 @@ package com.bytechef.embedded.connection.web.rest.mapper.config; -import com.bytechef.embedded.connection.web.rest.adapter.EmbeddedConnectionConversionServiceAdapter; +import com.bytechef.embedded.connection.web.rest.adapter.IntegrationConnectionConversionServiceAdapter; import org.mapstruct.MapperConfig; import org.mapstruct.extensions.spring.SpringMapperConfig; @@ -24,10 +24,11 @@ * @author Ivica Cardic */ @MapperConfig(componentModel = "spring", uses = { - EmbeddedConnectionConversionServiceAdapter.class + IntegrationConnectionConversionServiceAdapter.class }) @SpringMapperConfig( conversionServiceAdapterPackage = "com.bytechef.embedded.connection.web.rest.adapter", - conversionServiceAdapterClassName = "EmbeddedConnectionConversionServiceAdapter") -public interface EmbeddedConnectionMapperSpringConfig { + conversionServiceAdapterClassName = "IntegrationConnectionConversionServiceAdapter", + conversionServiceBeanName = "com.bytechef.embedded.connection.web.rest.mapper.config.ConnectionMapperSpringConfig") +public interface ConnectionMapperSpringConfig { } diff --git a/server/libs/embedded/embedded-execution/embedded-execution-public-rest/src/main/java/com/bytechef/embedded/execution/public_/web/rest/AppEventTriggerApiController.java b/server/libs/embedded/embedded-execution/embedded-execution-public-rest/src/main/java/com/bytechef/embedded/execution/public_/web/rest/AppEventTriggerApiController.java index 494e9188512..37ecc88b38c 100644 --- a/server/libs/embedded/embedded-execution/embedded-execution-public-rest/src/main/java/com/bytechef/embedded/execution/public_/web/rest/AppEventTriggerApiController.java +++ b/server/libs/embedded/embedded-execution/embedded-execution-public-rest/src/main/java/com/bytechef/embedded/execution/public_/web/rest/AppEventTriggerApiController.java @@ -54,6 +54,7 @@ import java.util.Objects; import org.apache.commons.lang3.StringUtils; import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Controller; import org.springframework.web.bind.WebDataBinder; import org.springframework.web.bind.annotation.InitBinder; import org.springframework.web.bind.annotation.RequestMapping; @@ -61,6 +62,7 @@ /** * @author Ivica Cardic */ +@Controller @RequestMapping("${openapi.openAPIDefinition.base-path.embedded:}/v1") @ConditionalOnCoordinator public class AppEventTriggerApiController extends AbstractWebhookTriggerController implements AppEventTriggerApi { diff --git a/server/libs/embedded/embedded-execution/embedded-execution-public-rest/src/main/java/com/bytechef/embedded/execution/public_/web/rest/RequestTriggerApiController.java b/server/libs/embedded/embedded-execution/embedded-execution-public-rest/src/main/java/com/bytechef/embedded/execution/public_/web/rest/RequestTriggerApiController.java index 7415e265eb0..32b305765ef 100644 --- a/server/libs/embedded/embedded-execution/embedded-execution-public-rest/src/main/java/com/bytechef/embedded/execution/public_/web/rest/RequestTriggerApiController.java +++ b/server/libs/embedded/embedded-execution/embedded-execution-public-rest/src/main/java/com/bytechef/embedded/execution/public_/web/rest/RequestTriggerApiController.java @@ -45,6 +45,7 @@ import java.util.Objects; import org.apache.commons.lang3.StringUtils; import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Controller; import org.springframework.web.bind.WebDataBinder; import org.springframework.web.bind.annotation.InitBinder; import org.springframework.web.bind.annotation.RequestMapping; @@ -52,6 +53,7 @@ /** * @author Ivica Cardic */ +@Controller @RequestMapping("${openapi.openAPIDefinition.base-path.embedded:}/v1") @ConditionalOnCoordinator public class RequestTriggerApiController extends AbstractWebhookTriggerController implements RequestTriggerApi { diff --git a/server/libs/embedded/embedded-unified/embedded-unified-rest/src/main/java/com/bytechef/embedded/unified/web/rest/accounting/mapper/AccountingAccountUnifiedOutputModelMapper.java b/server/libs/embedded/embedded-unified/embedded-unified-rest/src/main/java/com/bytechef/embedded/unified/web/rest/accounting/mapper/AccountingAccountUnifiedOutputModelMapper.java index 21b27f35834..74a91681439 100644 --- a/server/libs/embedded/embedded-unified/embedded-unified-rest/src/main/java/com/bytechef/embedded/unified/web/rest/accounting/mapper/AccountingAccountUnifiedOutputModelMapper.java +++ b/server/libs/embedded/embedded-unified/embedded-unified-rest/src/main/java/com/bytechef/embedded/unified/web/rest/accounting/mapper/AccountingAccountUnifiedOutputModelMapper.java @@ -19,11 +19,11 @@ import com.bytechef.component.definition.unified.accounting.model.AccountUnifiedOutputModel; import com.bytechef.embedded.unified.web.rest.accounting.model.AccountModel; import com.bytechef.embedded.unified.web.rest.mapper.JsonNullableMapper; -import com.bytechef.embedded.unified.web.rest.mapper.config.EmbeddedUnifiedConfigurationMapperSpringConfig; +import com.bytechef.embedded.unified.web.rest.mapper.config.UnifiedConfigurationMapperSpringConfig; import org.mapstruct.Mapper; import org.springframework.core.convert.converter.Converter; -@Mapper(config = EmbeddedUnifiedConfigurationMapperSpringConfig.class, uses = { +@Mapper(config = UnifiedConfigurationMapperSpringConfig.class, uses = { JsonNullableMapper.class }) public interface AccountingAccountUnifiedOutputModelMapper extends Converter { diff --git a/server/libs/embedded/embedded-unified/embedded-unified-rest/src/main/java/com/bytechef/embedded/unified/web/rest/accounting/mapper/AccountingCreateUpdateAccountModelMapper.java b/server/libs/embedded/embedded-unified/embedded-unified-rest/src/main/java/com/bytechef/embedded/unified/web/rest/accounting/mapper/AccountingCreateUpdateAccountModelMapper.java index 25e6151d1fd..cf43ad64db9 100644 --- a/server/libs/embedded/embedded-unified/embedded-unified-rest/src/main/java/com/bytechef/embedded/unified/web/rest/accounting/mapper/AccountingCreateUpdateAccountModelMapper.java +++ b/server/libs/embedded/embedded-unified/embedded-unified-rest/src/main/java/com/bytechef/embedded/unified/web/rest/accounting/mapper/AccountingCreateUpdateAccountModelMapper.java @@ -19,11 +19,11 @@ import com.bytechef.component.definition.unified.accounting.model.AccountUnifiedInputModel; import com.bytechef.embedded.unified.web.rest.accounting.model.CreateUpdateAccountModel; import com.bytechef.embedded.unified.web.rest.mapper.JsonNullableMapper; -import com.bytechef.embedded.unified.web.rest.mapper.config.EmbeddedUnifiedConfigurationMapperSpringConfig; +import com.bytechef.embedded.unified.web.rest.mapper.config.UnifiedConfigurationMapperSpringConfig; import org.mapstruct.Mapper; import org.springframework.core.convert.converter.Converter; -@Mapper(config = EmbeddedUnifiedConfigurationMapperSpringConfig.class, uses = { +@Mapper(config = UnifiedConfigurationMapperSpringConfig.class, uses = { JsonNullableMapper.class }) public interface AccountingCreateUpdateAccountModelMapper diff --git a/server/libs/embedded/embedded-unified/embedded-unified-rest/src/main/java/com/bytechef/embedded/unified/web/rest/crm/mapper/CrmAccountUnifiedOutputModelMapper.java b/server/libs/embedded/embedded-unified/embedded-unified-rest/src/main/java/com/bytechef/embedded/unified/web/rest/crm/mapper/CrmAccountUnifiedOutputModelMapper.java index 8dd3817408a..d5472cf8570 100644 --- a/server/libs/embedded/embedded-unified/embedded-unified-rest/src/main/java/com/bytechef/embedded/unified/web/rest/crm/mapper/CrmAccountUnifiedOutputModelMapper.java +++ b/server/libs/embedded/embedded-unified/embedded-unified-rest/src/main/java/com/bytechef/embedded/unified/web/rest/crm/mapper/CrmAccountUnifiedOutputModelMapper.java @@ -19,11 +19,11 @@ import com.bytechef.component.definition.unified.crm.model.AccountUnifiedOutputModel; import com.bytechef.embedded.unified.web.rest.crm.model.AccountModel; import com.bytechef.embedded.unified.web.rest.mapper.JsonNullableMapper; -import com.bytechef.embedded.unified.web.rest.mapper.config.EmbeddedUnifiedConfigurationMapperSpringConfig; +import com.bytechef.embedded.unified.web.rest.mapper.config.UnifiedConfigurationMapperSpringConfig; import org.mapstruct.Mapper; import org.springframework.core.convert.converter.Converter; -@Mapper(config = EmbeddedUnifiedConfigurationMapperSpringConfig.class, uses = { +@Mapper(config = UnifiedConfigurationMapperSpringConfig.class, uses = { JsonNullableMapper.class, CrmLifecycleStageMapper.class }) public interface CrmAccountUnifiedOutputModelMapper extends Converter { diff --git a/server/libs/embedded/embedded-unified/embedded-unified-rest/src/main/java/com/bytechef/embedded/unified/web/rest/crm/mapper/CrmCreateUpdateAccountModelMapper.java b/server/libs/embedded/embedded-unified/embedded-unified-rest/src/main/java/com/bytechef/embedded/unified/web/rest/crm/mapper/CrmCreateUpdateAccountModelMapper.java index 4cffac63f21..cb12e9e5680 100644 --- a/server/libs/embedded/embedded-unified/embedded-unified-rest/src/main/java/com/bytechef/embedded/unified/web/rest/crm/mapper/CrmCreateUpdateAccountModelMapper.java +++ b/server/libs/embedded/embedded-unified/embedded-unified-rest/src/main/java/com/bytechef/embedded/unified/web/rest/crm/mapper/CrmCreateUpdateAccountModelMapper.java @@ -19,11 +19,11 @@ import com.bytechef.component.definition.unified.crm.model.AccountUnifiedInputModel; import com.bytechef.embedded.unified.web.rest.crm.model.CreateUpdateAccountModel; import com.bytechef.embedded.unified.web.rest.mapper.JsonNullableMapper; -import com.bytechef.embedded.unified.web.rest.mapper.config.EmbeddedUnifiedConfigurationMapperSpringConfig; +import com.bytechef.embedded.unified.web.rest.mapper.config.UnifiedConfigurationMapperSpringConfig; import org.mapstruct.Mapper; import org.springframework.core.convert.converter.Converter; -@Mapper(config = EmbeddedUnifiedConfigurationMapperSpringConfig.class, uses = { +@Mapper(config = UnifiedConfigurationMapperSpringConfig.class, uses = { JsonNullableMapper.class, CrmLifecycleStageModelMapper.class }) public interface CrmCreateUpdateAccountModelMapper diff --git a/server/libs/embedded/embedded-unified/embedded-unified-rest/src/main/java/com/bytechef/embedded/unified/web/rest/crm/mapper/CrmLifecycleStageMapper.java b/server/libs/embedded/embedded-unified/embedded-unified-rest/src/main/java/com/bytechef/embedded/unified/web/rest/crm/mapper/CrmLifecycleStageMapper.java index adc179da1cb..b66b6a3ada2 100644 --- a/server/libs/embedded/embedded-unified/embedded-unified-rest/src/main/java/com/bytechef/embedded/unified/web/rest/crm/mapper/CrmLifecycleStageMapper.java +++ b/server/libs/embedded/embedded-unified/embedded-unified-rest/src/main/java/com/bytechef/embedded/unified/web/rest/crm/mapper/CrmLifecycleStageMapper.java @@ -19,12 +19,12 @@ import com.bytechef.component.definition.unified.crm.model.common.LifecycleStage; import com.bytechef.embedded.unified.web.rest.crm.model.LifecycleStageModel; import com.bytechef.embedded.unified.web.rest.mapper.JsonNullableMapper; -import com.bytechef.embedded.unified.web.rest.mapper.config.EmbeddedUnifiedConfigurationMapperSpringConfig; +import com.bytechef.embedded.unified.web.rest.mapper.config.UnifiedConfigurationMapperSpringConfig; import org.mapstruct.Mapper; import org.openapitools.jackson.nullable.JsonNullable; import org.springframework.core.convert.converter.Converter; -@Mapper(config = EmbeddedUnifiedConfigurationMapperSpringConfig.class, uses = { +@Mapper(config = UnifiedConfigurationMapperSpringConfig.class, uses = { JsonNullableMapper.class }) public interface CrmLifecycleStageMapper extends Converter { diff --git a/server/libs/embedded/embedded-unified/embedded-unified-rest/src/main/java/com/bytechef/embedded/unified/web/rest/crm/mapper/CrmLifecycleStageModelMapper.java b/server/libs/embedded/embedded-unified/embedded-unified-rest/src/main/java/com/bytechef/embedded/unified/web/rest/crm/mapper/CrmLifecycleStageModelMapper.java index b1f36144c46..3c5679f083a 100644 --- a/server/libs/embedded/embedded-unified/embedded-unified-rest/src/main/java/com/bytechef/embedded/unified/web/rest/crm/mapper/CrmLifecycleStageModelMapper.java +++ b/server/libs/embedded/embedded-unified/embedded-unified-rest/src/main/java/com/bytechef/embedded/unified/web/rest/crm/mapper/CrmLifecycleStageModelMapper.java @@ -19,12 +19,12 @@ import com.bytechef.component.definition.unified.crm.model.common.LifecycleStage; import com.bytechef.embedded.unified.web.rest.crm.model.LifecycleStageModel; import com.bytechef.embedded.unified.web.rest.mapper.JsonNullableMapper; -import com.bytechef.embedded.unified.web.rest.mapper.config.EmbeddedUnifiedConfigurationMapperSpringConfig; +import com.bytechef.embedded.unified.web.rest.mapper.config.UnifiedConfigurationMapperSpringConfig; import org.mapstruct.Mapper; import org.openapitools.jackson.nullable.JsonNullable; import org.springframework.core.convert.converter.Converter; -@Mapper(config = EmbeddedUnifiedConfigurationMapperSpringConfig.class, uses = { +@Mapper(config = UnifiedConfigurationMapperSpringConfig.class, uses = { JsonNullableMapper.class }) public interface CrmLifecycleStageModelMapper extends Converter { diff --git a/server/libs/embedded/embedded-unified/embedded-unified-rest/src/main/java/com/bytechef/embedded/unified/web/rest/crm/mapper/CrmListAccountsPageableParameterModelMapper.java b/server/libs/embedded/embedded-unified/embedded-unified-rest/src/main/java/com/bytechef/embedded/unified/web/rest/crm/mapper/CrmListAccountsPageableParameterModelMapper.java index 723fb9005ea..d57e2b81ed0 100644 --- a/server/libs/embedded/embedded-unified/embedded-unified-rest/src/main/java/com/bytechef/embedded/unified/web/rest/crm/mapper/CrmListAccountsPageableParameterModelMapper.java +++ b/server/libs/embedded/embedded-unified/embedded-unified-rest/src/main/java/com/bytechef/embedded/unified/web/rest/crm/mapper/CrmListAccountsPageableParameterModelMapper.java @@ -19,11 +19,11 @@ import com.bytechef.embedded.unified.pagination.CursorPageRequest; import com.bytechef.embedded.unified.web.rest.crm.model.ListAccountsPageableParameterModel; import com.bytechef.embedded.unified.web.rest.mapper.JsonNullableMapper; -import com.bytechef.embedded.unified.web.rest.mapper.config.EmbeddedUnifiedConfigurationMapperSpringConfig; +import com.bytechef.embedded.unified.web.rest.mapper.config.UnifiedConfigurationMapperSpringConfig; import org.mapstruct.Mapper; import org.springframework.core.convert.converter.Converter; -@Mapper(config = EmbeddedUnifiedConfigurationMapperSpringConfig.class, uses = { +@Mapper(config = UnifiedConfigurationMapperSpringConfig.class, uses = { JsonNullableMapper.class }) public interface CrmListAccountsPageableParameterModelMapper diff --git a/server/libs/embedded/embedded-unified/embedded-unified-rest/src/main/java/com/bytechef/embedded/unified/web/rest/mapper/JsonNullableMapper.java b/server/libs/embedded/embedded-unified/embedded-unified-rest/src/main/java/com/bytechef/embedded/unified/web/rest/mapper/JsonNullableMapper.java index 44f1815a661..70ee2c5c533 100644 --- a/server/libs/embedded/embedded-unified/embedded-unified-rest/src/main/java/com/bytechef/embedded/unified/web/rest/mapper/JsonNullableMapper.java +++ b/server/libs/embedded/embedded-unified/embedded-unified-rest/src/main/java/com/bytechef/embedded/unified/web/rest/mapper/JsonNullableMapper.java @@ -16,7 +16,7 @@ package com.bytechef.embedded.unified.web.rest.mapper; -import com.bytechef.embedded.unified.web.rest.mapper.config.EmbeddedUnifiedConfigurationMapperSpringConfig; +import com.bytechef.embedded.unified.web.rest.mapper.config.UnifiedConfigurationMapperSpringConfig; import java.math.BigDecimal; import java.time.LocalDateTime; import java.util.Map; @@ -24,7 +24,7 @@ import org.openapitools.jackson.nullable.JsonNullable; @Mapper( - config = EmbeddedUnifiedConfigurationMapperSpringConfig.class, + config = UnifiedConfigurationMapperSpringConfig.class, implementationName = "EmbeddedUnifiedJsonNullableMapper") public interface JsonNullableMapper { diff --git a/server/libs/embedded/embedded-unified/embedded-unified-rest/src/main/java/com/bytechef/embedded/unified/web/rest/mapper/config/EmbeddedUnifiedConfigurationMapperSpringConfig.java b/server/libs/embedded/embedded-unified/embedded-unified-rest/src/main/java/com/bytechef/embedded/unified/web/rest/mapper/config/UnifiedConfigurationMapperSpringConfig.java similarity index 86% rename from server/libs/embedded/embedded-unified/embedded-unified-rest/src/main/java/com/bytechef/embedded/unified/web/rest/mapper/config/EmbeddedUnifiedConfigurationMapperSpringConfig.java rename to server/libs/embedded/embedded-unified/embedded-unified-rest/src/main/java/com/bytechef/embedded/unified/web/rest/mapper/config/UnifiedConfigurationMapperSpringConfig.java index 5e01893027c..d096359e1e3 100644 --- a/server/libs/embedded/embedded-unified/embedded-unified-rest/src/main/java/com/bytechef/embedded/unified/web/rest/mapper/config/EmbeddedUnifiedConfigurationMapperSpringConfig.java +++ b/server/libs/embedded/embedded-unified/embedded-unified-rest/src/main/java/com/bytechef/embedded/unified/web/rest/mapper/config/UnifiedConfigurationMapperSpringConfig.java @@ -25,6 +25,6 @@ @MapperConfig(componentModel = "spring") @SpringMapperConfig( conversionServiceAdapterPackage = "com.bytechef.embedded.unified.web.rest.adapter", - conversionServiceAdapterClassName = "EmbeddedUnifiedConversionServiceAdapter") -public interface EmbeddedUnifiedConfigurationMapperSpringConfig { + conversionServiceAdapterClassName = "UnifiedConversionServiceAdapter") +public interface UnifiedConfigurationMapperSpringConfig { } diff --git a/server/libs/embedded/embedded-workflow/embedded-workflow-execution/embedded-workflow-execution-rest/src/main/java/com/bytechef/embedded/workflow/execution/web/rest/mapper/WorkflowExecutionMapper.java b/server/libs/embedded/embedded-workflow/embedded-workflow-execution/embedded-workflow-execution-rest/src/main/java/com/bytechef/embedded/workflow/execution/web/rest/mapper/WorkflowExecutionMapper.java index aef49e1f035..0f18824d428 100644 --- a/server/libs/embedded/embedded-workflow/embedded-workflow-execution/embedded-workflow-execution-rest/src/main/java/com/bytechef/embedded/workflow/execution/web/rest/mapper/WorkflowExecutionMapper.java +++ b/server/libs/embedded/embedded-workflow/embedded-workflow-execution/embedded-workflow-execution-rest/src/main/java/com/bytechef/embedded/workflow/execution/web/rest/mapper/WorkflowExecutionMapper.java @@ -17,7 +17,7 @@ package com.bytechef.embedded.workflow.execution.web.rest.mapper; import com.bytechef.embedded.workflow.execution.dto.WorkflowExecution; -import com.bytechef.embedded.workflow.execution.web.rest.mapper.config.EmbeddedWorkflowExecutionMapperSpringConfig; +import com.bytechef.embedded.workflow.execution.web.rest.mapper.config.WorkflowExecutionMapperSpringConfig; import com.bytechef.embedded.workflow.execution.web.rest.model.WorkflowExecutionBasicModel; import com.bytechef.embedded.workflow.execution.web.rest.model.WorkflowExecutionModel; import org.mapstruct.Mapper; @@ -28,7 +28,7 @@ */ public class WorkflowExecutionMapper { - @Mapper(config = EmbeddedWorkflowExecutionMapperSpringConfig.class, implementationName = "EmbeddedImpl") + @Mapper(config = WorkflowExecutionMapperSpringConfig.class, implementationName = "EmbeddedImpl") public interface WorkflowExecutionDTOToWorkflowExecutionModelMapper extends Converter { @@ -36,7 +36,7 @@ public interface WorkflowExecutionDTOToWorkflowExecutionModelMapper WorkflowExecutionModel convert(WorkflowExecution workflowExecution); } - @Mapper(config = EmbeddedWorkflowExecutionMapperSpringConfig.class, implementationName = "EmbeddedImpl") + @Mapper(config = WorkflowExecutionMapperSpringConfig.class, implementationName = "EmbeddedImpl") public interface WorkflowExecutionDTOToWorkflowExecutionBasicModelMapper extends Converter { diff --git a/server/libs/embedded/embedded-workflow/embedded-workflow-execution/embedded-workflow-execution-rest/src/main/java/com/bytechef/embedded/workflow/execution/web/rest/mapper/config/EmbeddedWorkflowExecutionMapperSpringConfig.java b/server/libs/embedded/embedded-workflow/embedded-workflow-execution/embedded-workflow-execution-rest/src/main/java/com/bytechef/embedded/workflow/execution/web/rest/mapper/config/WorkflowExecutionMapperSpringConfig.java similarity index 57% rename from server/libs/embedded/embedded-workflow/embedded-workflow-execution/embedded-workflow-execution-rest/src/main/java/com/bytechef/embedded/workflow/execution/web/rest/mapper/config/EmbeddedWorkflowExecutionMapperSpringConfig.java rename to server/libs/embedded/embedded-workflow/embedded-workflow-execution/embedded-workflow-execution-rest/src/main/java/com/bytechef/embedded/workflow/execution/web/rest/mapper/config/WorkflowExecutionMapperSpringConfig.java index acabeb53bd8..c0555412008 100644 --- a/server/libs/embedded/embedded-workflow/embedded-workflow-execution/embedded-workflow-execution-rest/src/main/java/com/bytechef/embedded/workflow/execution/web/rest/mapper/config/EmbeddedWorkflowExecutionMapperSpringConfig.java +++ b/server/libs/embedded/embedded-workflow/embedded-workflow-execution/embedded-workflow-execution-rest/src/main/java/com/bytechef/embedded/workflow/execution/web/rest/mapper/config/WorkflowExecutionMapperSpringConfig.java @@ -16,10 +16,10 @@ package com.bytechef.embedded.workflow.execution.web.rest.mapper.config; -import com.bytechef.embedded.configuration.web.rest.adapter.EmbeddedConfigurationConversionServiceAdapter; -import com.bytechef.embedded.workflow.execution.web.rest.adapter.EmbeddedWorkflowExecutionConversionServiceAdapter; -import com.bytechef.platform.configuration.web.rest.adapter.PlatformConfigurationConversionServiceAdapter; -import com.bytechef.platform.workflow.execution.web.rest.adapter.PlatformWorkflowExecutionConversionServiceAdapter; +import com.bytechef.embedded.configuration.web.rest.adapter.IntegrationConfigurationConversionServiceAdapter; +import com.bytechef.embedded.workflow.execution.web.rest.adapter.IntegrationWorkflowExecutionConversionServiceAdapter; +import com.bytechef.platform.configuration.web.rest.adapter.WorkflowConfigurationConversionServiceAdapter; +import com.bytechef.platform.workflow.execution.web.rest.adapter.WorkflowExecutionConversionServiceAdapter; import org.mapstruct.MapperConfig; import org.mapstruct.extensions.spring.SpringMapperConfig; @@ -27,11 +27,12 @@ * @author Ivica Cardic */ @MapperConfig(componentModel = "spring", uses = { - EmbeddedConfigurationConversionServiceAdapter.class, EmbeddedWorkflowExecutionConversionServiceAdapter.class, - PlatformConfigurationConversionServiceAdapter.class, PlatformWorkflowExecutionConversionServiceAdapter.class + IntegrationConfigurationConversionServiceAdapter.class, IntegrationWorkflowExecutionConversionServiceAdapter.class, + WorkflowConfigurationConversionServiceAdapter.class, WorkflowExecutionConversionServiceAdapter.class }) @SpringMapperConfig( conversionServiceAdapterPackage = "com.bytechef.embedded.workflow.execution.web.rest.adapter", - conversionServiceAdapterClassName = "EmbeddedWorkflowExecutionConversionServiceAdapter") -public interface EmbeddedWorkflowExecutionMapperSpringConfig { + conversionServiceAdapterClassName = "IntegrationWorkflowExecutionConversionServiceAdapter", + conversionServiceBeanName = "com.bytechef.embedded.workflow.execution.web.rest.mapper.config.WorkflowExecutionMapperSpringConfig") +public interface WorkflowExecutionMapperSpringConfig { } diff --git a/server/libs/platform/platform-component/platform-component-service/src/test/java/com/bytechef/platform/component/config/PlatformIntTestConfiguration.java b/server/libs/platform/platform-component/platform-component-service/src/test/java/com/bytechef/platform/component/config/ComponentDefinitionIntTestConfiguration.java similarity index 95% rename from server/libs/platform/platform-component/platform-component-service/src/test/java/com/bytechef/platform/component/config/PlatformIntTestConfiguration.java rename to server/libs/platform/platform-component/platform-component-service/src/test/java/com/bytechef/platform/component/config/ComponentDefinitionIntTestConfiguration.java index cd96c694bad..bf8a14243e9 100644 --- a/server/libs/platform/platform-component/platform-component-service/src/test/java/com/bytechef/platform/component/config/PlatformIntTestConfiguration.java +++ b/server/libs/platform/platform-component/platform-component-service/src/test/java/com/bytechef/platform/component/config/ComponentDefinitionIntTestConfiguration.java @@ -29,6 +29,6 @@ @EnableAutoConfiguration @Import(LiquibaseConfiguration.class) @Configuration -public class PlatformIntTestConfiguration { +public class ComponentDefinitionIntTestConfiguration { } diff --git a/server/libs/platform/platform-component/platform-component-service/src/test/java/com/bytechef/platform/component/facade/ActionDefinitionFacadeIntTest.java b/server/libs/platform/platform-component/platform-component-service/src/test/java/com/bytechef/platform/component/facade/ActionDefinitionFacadeIntTest.java index 9fba1c00c83..723e2384697 100644 --- a/server/libs/platform/platform-component/platform-component-service/src/test/java/com/bytechef/platform/component/facade/ActionDefinitionFacadeIntTest.java +++ b/server/libs/platform/platform-component/platform-component-service/src/test/java/com/bytechef/platform/component/facade/ActionDefinitionFacadeIntTest.java @@ -18,8 +18,8 @@ import com.bytechef.component.definition.Context.Http; import com.bytechef.component.http.client.action.HttpClientGetAction; +import com.bytechef.platform.component.config.ComponentDefinitionIntTestConfiguration; import com.bytechef.platform.component.config.JacksonConfiguration; -import com.bytechef.platform.component.config.PlatformIntTestConfiguration; import com.bytechef.platform.component.definition.ContextFactory; import com.bytechef.platform.component.helper.TokenRefreshHelper; import com.bytechef.platform.component.service.ActionDefinitionService; @@ -42,7 +42,8 @@ @ComponentScan("com.bytechef.platform.component") @SpringBootTest( classes = { - JacksonConfiguration.class, PostgreSQLContainerConfiguration.class, PlatformIntTestConfiguration.class + JacksonConfiguration.class, PostgreSQLContainerConfiguration.class, + ComponentDefinitionIntTestConfiguration.class }) public class ActionDefinitionFacadeIntTest { diff --git a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/ActionDefinitionMapper.java b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/ActionDefinitionMapper.java index cd16a02a06f..82033d8ce70 100644 --- a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/ActionDefinitionMapper.java +++ b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/ActionDefinitionMapper.java @@ -17,7 +17,7 @@ package com.bytechef.platform.configuration.web.rest.mapper; import com.bytechef.platform.component.domain.ActionDefinition; -import com.bytechef.platform.configuration.web.rest.mapper.config.PlatformConfigurationMapperSpringConfig; +import com.bytechef.platform.configuration.web.rest.mapper.config.WorkflowConfigurationMapperSpringConfig; import com.bytechef.platform.configuration.web.rest.model.ActionDefinitionBasicModel; import com.bytechef.platform.configuration.web.rest.model.ActionDefinitionModel; import org.mapstruct.Mapper; @@ -28,7 +28,7 @@ */ public class ActionDefinitionMapper { - @Mapper(config = PlatformConfigurationMapperSpringConfig.class) + @Mapper(config = WorkflowConfigurationMapperSpringConfig.class) public interface ActionDefinitionToActionDefinitionModelMapper extends Converter { @@ -36,7 +36,7 @@ public interface ActionDefinitionToActionDefinitionModelMapper ActionDefinitionModel convert(ActionDefinition actionDefinition); } - @Mapper(config = PlatformConfigurationMapperSpringConfig.class) + @Mapper(config = WorkflowConfigurationMapperSpringConfig.class) public interface ActionDefinitionToActionDefinitionBasicModelMapper extends Converter { diff --git a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/AuthorizationMapper.java b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/AuthorizationMapper.java index dedba9a8d28..86d4833dd49 100644 --- a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/AuthorizationMapper.java +++ b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/AuthorizationMapper.java @@ -17,7 +17,7 @@ package com.bytechef.platform.configuration.web.rest.mapper; import com.bytechef.platform.component.domain.Authorization; -import com.bytechef.platform.configuration.web.rest.mapper.config.PlatformConfigurationMapperSpringConfig; +import com.bytechef.platform.configuration.web.rest.mapper.config.WorkflowConfigurationMapperSpringConfig; import com.bytechef.platform.configuration.web.rest.model.AuthorizationModel; import org.mapstruct.Mapper; import org.springframework.core.convert.converter.Converter; @@ -26,7 +26,7 @@ /** * @author Ivica Cardic */ -@Mapper(config = PlatformConfigurationMapperSpringConfig.class) +@Mapper(config = WorkflowConfigurationMapperSpringConfig.class) public interface AuthorizationMapper extends Converter { @Override diff --git a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/ComponentDefinitionMapper.java b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/ComponentDefinitionMapper.java index 7ac585a6bc5..0d5f33c36c8 100644 --- a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/ComponentDefinitionMapper.java +++ b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/ComponentDefinitionMapper.java @@ -17,7 +17,7 @@ package com.bytechef.platform.configuration.web.rest.mapper; import com.bytechef.platform.component.domain.ComponentDefinition; -import com.bytechef.platform.configuration.web.rest.mapper.config.PlatformConfigurationMapperSpringConfig; +import com.bytechef.platform.configuration.web.rest.mapper.config.WorkflowConfigurationMapperSpringConfig; import com.bytechef.platform.configuration.web.rest.model.ComponentDefinitionBasicModel; import com.bytechef.platform.configuration.web.rest.model.ComponentDefinitionModel; import org.mapstruct.Mapper; @@ -25,14 +25,14 @@ public class ComponentDefinitionMapper { - @Mapper(config = PlatformConfigurationMapperSpringConfig.class) + @Mapper(config = WorkflowConfigurationMapperSpringConfig.class) public interface ComponentDefinitionToComponentDefinitionModelMapper extends Converter { ComponentDefinitionModel convert(ComponentDefinition componentDefinition); } - @Mapper(config = PlatformConfigurationMapperSpringConfig.class) + @Mapper(config = WorkflowConfigurationMapperSpringConfig.class) public interface ComponentDefinitionToComponentDefinitionBasicModelMapper extends Converter { diff --git a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/ConnectionDefinitionMapper.java b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/ConnectionDefinitionMapper.java index ba61801f8b6..53d44aa0981 100644 --- a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/ConnectionDefinitionMapper.java +++ b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/ConnectionDefinitionMapper.java @@ -18,7 +18,7 @@ import com.bytechef.platform.component.domain.ConnectionDefinition; import com.bytechef.platform.component.domain.ConnectionDefinitionBasic; -import com.bytechef.platform.configuration.web.rest.mapper.config.PlatformConfigurationMapperSpringConfig; +import com.bytechef.platform.configuration.web.rest.mapper.config.WorkflowConfigurationMapperSpringConfig; import com.bytechef.platform.configuration.web.rest.model.ConnectionDefinitionBasicModel; import com.bytechef.platform.configuration.web.rest.model.ConnectionDefinitionModel; import org.mapstruct.Mapper; @@ -30,7 +30,7 @@ */ public class ConnectionDefinitionMapper { - @Mapper(config = PlatformConfigurationMapperSpringConfig.class) + @Mapper(config = WorkflowConfigurationMapperSpringConfig.class) public interface ConnectionDefinitionBasicToConnectionDefinitionModelMapper extends Converter { @@ -38,7 +38,7 @@ public interface ConnectionDefinitionBasicToConnectionDefinitionModelMapper ConnectionDefinitionBasicModel convert(ConnectionDefinitionBasic connectionDefinition); } - @Mapper(config = PlatformConfigurationMapperSpringConfig.class) + @Mapper(config = WorkflowConfigurationMapperSpringConfig.class) public interface ConnectionDefinitionToConnectionDefinitionModelMapper extends Converter { @@ -47,7 +47,7 @@ public interface ConnectionDefinitionToConnectionDefinitionModelMapper ConnectionDefinitionModel convert(ConnectionDefinition connectionDefinition); } - @Mapper(config = PlatformConfigurationMapperSpringConfig.class) + @Mapper(config = WorkflowConfigurationMapperSpringConfig.class) public interface ConnectionDefinitionToConnectionDefinitionBasicModelMapper extends Converter { diff --git a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/HelpMapper.java b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/HelpMapper.java index 35ee6586f69..7d376017668 100644 --- a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/HelpMapper.java +++ b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/HelpMapper.java @@ -17,7 +17,7 @@ package com.bytechef.platform.configuration.web.rest.mapper; import com.bytechef.platform.component.domain.Help; -import com.bytechef.platform.configuration.web.rest.mapper.config.PlatformConfigurationMapperSpringConfig; +import com.bytechef.platform.configuration.web.rest.mapper.config.WorkflowConfigurationMapperSpringConfig; import com.bytechef.platform.configuration.web.rest.model.HelpModel; import org.mapstruct.Mapper; import org.springframework.core.convert.converter.Converter; @@ -27,14 +27,14 @@ */ public class HelpMapper { - @Mapper(config = PlatformConfigurationMapperSpringConfig.class) + @Mapper(config = WorkflowConfigurationMapperSpringConfig.class) interface ComponentHelpMapper extends Converter { @Override HelpModel convert(Help help); } - @Mapper(config = PlatformConfigurationMapperSpringConfig.class) + @Mapper(config = WorkflowConfigurationMapperSpringConfig.class) interface TaskDispatcherHelpMapper extends Converter { diff --git a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/JsonNullableMapper.java b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/JsonNullableMapper.java index 2c6c18744e2..ac2fb62d084 100644 --- a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/JsonNullableMapper.java +++ b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/JsonNullableMapper.java @@ -16,14 +16,14 @@ package com.bytechef.platform.configuration.web.rest.mapper; -import com.bytechef.platform.configuration.web.rest.mapper.config.PlatformConfigurationMapperSpringConfig; +import com.bytechef.platform.configuration.web.rest.mapper.config.WorkflowConfigurationMapperSpringConfig; import org.mapstruct.Mapper; import org.openapitools.jackson.nullable.JsonNullable; /** * @author Ivica Cardic */ -@Mapper(config = PlatformConfigurationMapperSpringConfig.class) +@Mapper(config = WorkflowConfigurationMapperSpringConfig.class) public interface JsonNullableMapper { default JsonNullable mapToJsonNullable(Object value) { diff --git a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/OAuth2AuthorizationParametersMapper.java b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/OAuth2AuthorizationParametersMapper.java index a792c1cf95d..16e5224fe77 100644 --- a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/OAuth2AuthorizationParametersMapper.java +++ b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/OAuth2AuthorizationParametersMapper.java @@ -17,7 +17,7 @@ package com.bytechef.platform.configuration.web.rest.mapper; import com.bytechef.platform.component.domain.OAuth2AuthorizationParameters; -import com.bytechef.platform.configuration.web.rest.mapper.config.PlatformConfigurationMapperSpringConfig; +import com.bytechef.platform.configuration.web.rest.mapper.config.WorkflowConfigurationMapperSpringConfig; import com.bytechef.platform.configuration.web.rest.model.OAuth2AuthorizationParametersModel; import org.mapstruct.Mapper; import org.springframework.core.convert.converter.Converter; @@ -25,7 +25,7 @@ /** * @author Ivica Cardic */ -@Mapper(config = PlatformConfigurationMapperSpringConfig.class) +@Mapper(config = WorkflowConfigurationMapperSpringConfig.class) public interface OAuth2AuthorizationParametersMapper extends Converter { diff --git a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/OptionMapper.java b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/OptionMapper.java index 3c5c7b600d8..02d9b035c12 100644 --- a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/OptionMapper.java +++ b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/OptionMapper.java @@ -17,7 +17,7 @@ package com.bytechef.platform.configuration.web.rest.mapper; import com.bytechef.platform.component.domain.Option; -import com.bytechef.platform.configuration.web.rest.mapper.config.PlatformConfigurationMapperSpringConfig; +import com.bytechef.platform.configuration.web.rest.mapper.config.WorkflowConfigurationMapperSpringConfig; import com.bytechef.platform.configuration.web.rest.model.OptionModel; import org.mapstruct.Mapper; import org.springframework.core.convert.converter.Converter; @@ -25,7 +25,7 @@ /** * @author Ivica Cardic */ -@Mapper(config = PlatformConfigurationMapperSpringConfig.class, uses = { +@Mapper(config = WorkflowConfigurationMapperSpringConfig.class, uses = { JsonNullableMapper.class }) public interface OptionMapper extends Converter { diff --git a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/PropertyMapper.java b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/PropertyMapper.java index 60b4ff693df..0531b1214ef 100644 --- a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/PropertyMapper.java +++ b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/PropertyMapper.java @@ -31,7 +31,7 @@ import com.bytechef.platform.component.domain.Property; import com.bytechef.platform.component.domain.StringProperty; import com.bytechef.platform.component.domain.TimeProperty; -import com.bytechef.platform.configuration.web.rest.mapper.config.PlatformConfigurationMapperSpringConfig; +import com.bytechef.platform.configuration.web.rest.mapper.config.WorkflowConfigurationMapperSpringConfig; import com.bytechef.platform.configuration.web.rest.model.ArrayPropertyModel; import com.bytechef.platform.configuration.web.rest.model.BooleanPropertyModel; import com.bytechef.platform.configuration.web.rest.model.DatePropertyModel; @@ -58,7 +58,7 @@ */ public class PropertyMapper { - @Mapper(config = PlatformConfigurationMapperSpringConfig.class, uses = { + @Mapper(config = WorkflowConfigurationMapperSpringConfig.class, uses = { JsonNullableMapper.class }) public interface ComponentPropertyMapper extends Converter, Property.PropertyVisitor { @@ -163,7 +163,7 @@ default List map(List properties) { } } - @Mapper(config = PlatformConfigurationMapperSpringConfig.class, uses = { + @Mapper(config = WorkflowConfigurationMapperSpringConfig.class, uses = { JsonNullableMapper.class }) public interface TaskDispatcherPropertyMapper diff --git a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/ResourcesMapper.java b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/ResourcesMapper.java index 18496396b8a..031283974fc 100644 --- a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/ResourcesMapper.java +++ b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/ResourcesMapper.java @@ -17,7 +17,7 @@ package com.bytechef.platform.configuration.web.rest.mapper; import com.bytechef.platform.component.domain.Resources; -import com.bytechef.platform.configuration.web.rest.mapper.config.PlatformConfigurationMapperSpringConfig; +import com.bytechef.platform.configuration.web.rest.mapper.config.WorkflowConfigurationMapperSpringConfig; import com.bytechef.platform.configuration.web.rest.model.ResourcesModel; import org.mapstruct.Mapper; import org.springframework.core.convert.converter.Converter; @@ -27,14 +27,14 @@ */ public interface ResourcesMapper { - @Mapper(config = PlatformConfigurationMapperSpringConfig.class) + @Mapper(config = WorkflowConfigurationMapperSpringConfig.class) interface ComponentResourcesMapper extends Converter { @Override ResourcesModel convert(Resources resources); } - @Mapper(config = PlatformConfigurationMapperSpringConfig.class) + @Mapper(config = WorkflowConfigurationMapperSpringConfig.class) interface TaskDispatcherResourcesMapper extends Converter { diff --git a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/ScriptExecutionMapper.java b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/ScriptExecutionMapper.java index 7232d6fe2a7..3657bf4957e 100644 --- a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/ScriptExecutionMapper.java +++ b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/ScriptExecutionMapper.java @@ -17,7 +17,7 @@ package com.bytechef.platform.configuration.web.rest.mapper; import com.bytechef.platform.configuration.dto.ScriptTestExecutionDTO; -import com.bytechef.platform.configuration.web.rest.mapper.config.PlatformConfigurationMapperSpringConfig; +import com.bytechef.platform.configuration.web.rest.mapper.config.WorkflowConfigurationMapperSpringConfig; import com.bytechef.platform.configuration.web.rest.model.ScriptTestExecutionModel; import org.mapstruct.Mapper; import org.springframework.core.convert.converter.Converter; @@ -25,7 +25,7 @@ /** * @author Ivica Cardic */ -@Mapper(config = PlatformConfigurationMapperSpringConfig.class) +@Mapper(config = WorkflowConfigurationMapperSpringConfig.class) public interface ScriptExecutionMapper extends Converter { @Override diff --git a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/TaskDispatcherDefinitionMapper.java b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/TaskDispatcherDefinitionMapper.java index 0ff848950af..60b9aa9c1df 100644 --- a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/TaskDispatcherDefinitionMapper.java +++ b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/TaskDispatcherDefinitionMapper.java @@ -16,7 +16,7 @@ package com.bytechef.platform.configuration.web.rest.mapper; -import com.bytechef.platform.configuration.web.rest.mapper.config.PlatformConfigurationMapperSpringConfig; +import com.bytechef.platform.configuration.web.rest.mapper.config.WorkflowConfigurationMapperSpringConfig; import com.bytechef.platform.configuration.web.rest.model.TaskDispatcherDefinitionBasicModel; import com.bytechef.platform.configuration.web.rest.model.TaskDispatcherDefinitionModel; import com.bytechef.platform.workflow.task.dispatcher.registry.domain.TaskDispatcherDefinition; @@ -28,7 +28,7 @@ */ public class TaskDispatcherDefinitionMapper { - @Mapper(config = PlatformConfigurationMapperSpringConfig.class) + @Mapper(config = WorkflowConfigurationMapperSpringConfig.class) public interface TaskDispatcherDefinitionToTaskDispatcherDefinitionModelMapper extends Converter { @@ -36,7 +36,7 @@ public interface TaskDispatcherDefinitionToTaskDispatcherDefinitionModelMapper TaskDispatcherDefinitionModel convert(TaskDispatcherDefinition taskDispatcherDefinition); } - @Mapper(config = PlatformConfigurationMapperSpringConfig.class) + @Mapper(config = WorkflowConfigurationMapperSpringConfig.class) public interface TaskDispatcherDefinitionToTaskDispatcherDefinitionBasicModelMapper extends Converter { diff --git a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/TriggerDefinitionMapper.java b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/TriggerDefinitionMapper.java index d7fb508a5d1..c2f7e515496 100644 --- a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/TriggerDefinitionMapper.java +++ b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/TriggerDefinitionMapper.java @@ -17,7 +17,7 @@ package com.bytechef.platform.configuration.web.rest.mapper; import com.bytechef.platform.component.domain.TriggerDefinition; -import com.bytechef.platform.configuration.web.rest.mapper.config.PlatformConfigurationMapperSpringConfig; +import com.bytechef.platform.configuration.web.rest.mapper.config.WorkflowConfigurationMapperSpringConfig; import com.bytechef.platform.configuration.web.rest.model.TriggerDefinitionBasicModel; import com.bytechef.platform.configuration.web.rest.model.TriggerDefinitionModel; import org.mapstruct.Mapper; @@ -28,7 +28,7 @@ */ public class TriggerDefinitionMapper { - @Mapper(config = PlatformConfigurationMapperSpringConfig.class) + @Mapper(config = WorkflowConfigurationMapperSpringConfig.class) public interface TriggerDefinitionToTriggerDefinitionModelMapper extends Converter { @@ -36,7 +36,7 @@ public interface TriggerDefinitionToTriggerDefinitionModelMapper TriggerDefinitionModel convert(TriggerDefinition triggerDefinition); } - @Mapper(config = PlatformConfigurationMapperSpringConfig.class) + @Mapper(config = WorkflowConfigurationMapperSpringConfig.class) public interface TriggerDefinitionToTriggerDefinitionBasicModelMapper extends Converter { diff --git a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/UpdateWorkflowNodeParameter200ResponseMapper.java b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/UpdateWorkflowNodeParameter200ResponseMapper.java index 950b0dd1917..1598b609b80 100644 --- a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/UpdateWorkflowNodeParameter200ResponseMapper.java +++ b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/UpdateWorkflowNodeParameter200ResponseMapper.java @@ -17,7 +17,7 @@ package com.bytechef.platform.configuration.web.rest.mapper; import com.bytechef.platform.configuration.dto.UpdateParameterResultDTO; -import com.bytechef.platform.configuration.web.rest.mapper.config.PlatformConfigurationMapperSpringConfig; +import com.bytechef.platform.configuration.web.rest.mapper.config.WorkflowConfigurationMapperSpringConfig; import com.bytechef.platform.configuration.web.rest.model.UpdateWorkflowNodeParameter200ResponseModel; import org.mapstruct.Mapper; import org.springframework.core.convert.converter.Converter; @@ -25,7 +25,7 @@ /** * @author Ivica Cardic */ -@Mapper(config = PlatformConfigurationMapperSpringConfig.class) +@Mapper(config = WorkflowConfigurationMapperSpringConfig.class) public interface UpdateWorkflowNodeParameter200ResponseMapper extends Converter { diff --git a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/WorkflowConnectionMapper.java b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/WorkflowConnectionMapper.java index 83bf5860ebc..f886b5d6a01 100644 --- a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/WorkflowConnectionMapper.java +++ b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/WorkflowConnectionMapper.java @@ -17,7 +17,7 @@ package com.bytechef.platform.configuration.web.rest.mapper; import com.bytechef.platform.configuration.domain.WorkflowConnection; -import com.bytechef.platform.configuration.web.rest.mapper.config.PlatformConfigurationMapperSpringConfig; +import com.bytechef.platform.configuration.web.rest.mapper.config.WorkflowConfigurationMapperSpringConfig; import com.bytechef.platform.configuration.web.rest.model.WorkflowConnectionModel; import org.mapstruct.Mapper; import org.springframework.core.convert.converter.Converter; @@ -25,7 +25,7 @@ /** * @author Ivica Cardic */ -@Mapper(config = PlatformConfigurationMapperSpringConfig.class) +@Mapper(config = WorkflowConfigurationMapperSpringConfig.class) public interface WorkflowConnectionMapper extends Converter { @Override diff --git a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/WorkflowMapper.java b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/WorkflowMapper.java index 06541e2da8a..4280094432d 100644 --- a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/WorkflowMapper.java +++ b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/WorkflowMapper.java @@ -18,7 +18,7 @@ import com.bytechef.atlas.configuration.domain.Workflow; import com.bytechef.platform.configuration.dto.WorkflowDTO; -import com.bytechef.platform.configuration.web.rest.mapper.config.PlatformConfigurationMapperSpringConfig; +import com.bytechef.platform.configuration.web.rest.mapper.config.WorkflowConfigurationMapperSpringConfig; import com.bytechef.platform.configuration.web.rest.mapper.util.WorkflowMapperUtils; import com.bytechef.platform.configuration.web.rest.model.WorkflowBasicModel; import com.bytechef.platform.configuration.web.rest.model.WorkflowModel; @@ -33,7 +33,7 @@ */ public abstract class WorkflowMapper { - @Mapper(config = PlatformConfigurationMapperSpringConfig.class, implementationName = "PlatformImpl") + @Mapper(config = WorkflowConfigurationMapperSpringConfig.class, implementationName = "PlatformImpl") public abstract static class WorkflowToWorkflowModelMapper implements Converter { @Override @@ -45,7 +45,7 @@ public abstract static class WorkflowToWorkflowModelMapper implements Converter< public abstract WorkflowModel convert(Workflow workflow); } - @Mapper(config = PlatformConfigurationMapperSpringConfig.class, implementationName = "PlatformImpl") + @Mapper(config = WorkflowConfigurationMapperSpringConfig.class, implementationName = "PlatformImpl") public abstract static class WorkflowDTOToWorkflowModelMapper implements Converter { @Override @@ -62,7 +62,7 @@ public void afterMapping(WorkflowDTO workflowDTO, @MappingTarget WorkflowModel w } } - @Mapper(config = PlatformConfigurationMapperSpringConfig.class, implementationName = "PlatformImpl") + @Mapper(config = WorkflowConfigurationMapperSpringConfig.class, implementationName = "PlatformImpl") public abstract static class WorkflowModelToWorkflowBasicModel implements Converter { @Override diff --git a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/WorkflowNodeOutputMapper.java b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/WorkflowNodeOutputMapper.java index 48bcf931f65..82b6bfc01cb 100644 --- a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/WorkflowNodeOutputMapper.java +++ b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/WorkflowNodeOutputMapper.java @@ -17,7 +17,7 @@ package com.bytechef.platform.configuration.web.rest.mapper; import com.bytechef.platform.configuration.dto.WorkflowNodeOutputDTO; -import com.bytechef.platform.configuration.web.rest.mapper.config.PlatformConfigurationMapperSpringConfig; +import com.bytechef.platform.configuration.web.rest.mapper.config.WorkflowConfigurationMapperSpringConfig; import com.bytechef.platform.configuration.web.rest.model.WorkflowNodeOutputModel; import org.mapstruct.Mapper; import org.springframework.core.convert.converter.Converter; @@ -25,7 +25,7 @@ /** * @author Ivica Cardic */ -@Mapper(config = PlatformConfigurationMapperSpringConfig.class) +@Mapper(config = WorkflowConfigurationMapperSpringConfig.class) public interface WorkflowNodeOutputMapper extends Converter { @Override diff --git a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/WorkflowNodeTestOutputMapper.java b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/WorkflowNodeTestOutputMapper.java index 37f738f8303..807367b11bb 100644 --- a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/WorkflowNodeTestOutputMapper.java +++ b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/WorkflowNodeTestOutputMapper.java @@ -17,7 +17,7 @@ package com.bytechef.platform.configuration.web.rest.mapper; import com.bytechef.platform.configuration.domain.WorkflowNodeTestOutput; -import com.bytechef.platform.configuration.web.rest.mapper.config.PlatformConfigurationMapperSpringConfig; +import com.bytechef.platform.configuration.web.rest.mapper.config.WorkflowConfigurationMapperSpringConfig; import com.bytechef.platform.configuration.web.rest.model.WorkflowNodeTestOutputModel; import org.mapstruct.Mapper; import org.springframework.core.convert.converter.Converter; @@ -25,7 +25,7 @@ /** * @author Ivica Cardic */ -@Mapper(config = PlatformConfigurationMapperSpringConfig.class) +@Mapper(config = WorkflowConfigurationMapperSpringConfig.class) public interface WorkflowNodeTestOutputMapper extends Converter { @Override diff --git a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/WorkflowTaskMapper.java b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/WorkflowTaskMapper.java index bb88b75708e..116a9eda788 100644 --- a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/WorkflowTaskMapper.java +++ b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/WorkflowTaskMapper.java @@ -18,7 +18,7 @@ import com.bytechef.atlas.configuration.domain.WorkflowTask; import com.bytechef.platform.configuration.dto.WorkflowTaskDTO; -import com.bytechef.platform.configuration.web.rest.mapper.config.PlatformConfigurationMapperSpringConfig; +import com.bytechef.platform.configuration.web.rest.mapper.config.WorkflowConfigurationMapperSpringConfig; import com.bytechef.platform.configuration.web.rest.model.WorkflowTaskModel; import java.util.List; import org.mapstruct.IterableMapping; @@ -32,7 +32,7 @@ */ public class WorkflowTaskMapper { - @Mapper(config = PlatformConfigurationMapperSpringConfig.class, implementationName = "PlatformImpl") + @Mapper(config = WorkflowConfigurationMapperSpringConfig.class, implementationName = "PlatformImpl") public interface WorkflowTaskToWorkflowTaskModelMapper extends Converter { @Named(value = "workflowTaskToWorkflowTaskModelMapper") @@ -45,7 +45,7 @@ public interface WorkflowTaskToWorkflowTaskModelMapper extends Converter map(List workflowTasks); } - @Mapper(config = PlatformConfigurationMapperSpringConfig.class, implementationName = "PlatformImpl") + @Mapper(config = WorkflowConfigurationMapperSpringConfig.class, implementationName = "PlatformImpl") public interface WorkflowTaskDTOToWorkflowTaskModelMapper extends Converter { @Named(value = "workflowTaskDTOToWorkflowTaskModelMapper") diff --git a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/WorkflowTestConfigurationConnectionMapper.java b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/WorkflowTestConfigurationConnectionMapper.java index 1d039aa5799..616eda01b3a 100644 --- a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/WorkflowTestConfigurationConnectionMapper.java +++ b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/WorkflowTestConfigurationConnectionMapper.java @@ -17,7 +17,7 @@ package com.bytechef.platform.configuration.web.rest.mapper; import com.bytechef.platform.configuration.domain.WorkflowTestConfigurationConnection; -import com.bytechef.platform.configuration.web.rest.mapper.config.PlatformConfigurationMapperSpringConfig; +import com.bytechef.platform.configuration.web.rest.mapper.config.WorkflowConfigurationMapperSpringConfig; import com.bytechef.platform.configuration.web.rest.model.WorkflowTestConfigurationConnectionModel; import org.mapstruct.Mapper; import org.springframework.core.convert.converter.Converter; @@ -25,7 +25,7 @@ /** * @author Ivica Cardic */ -@Mapper(config = PlatformConfigurationMapperSpringConfig.class) +@Mapper(config = WorkflowConfigurationMapperSpringConfig.class) public interface WorkflowTestConfigurationConnectionMapper extends Converter { diff --git a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/WorkflowTestConfigurationMapper.java b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/WorkflowTestConfigurationMapper.java index da9e51b8980..d22ee8523aa 100644 --- a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/WorkflowTestConfigurationMapper.java +++ b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/WorkflowTestConfigurationMapper.java @@ -17,7 +17,7 @@ package com.bytechef.platform.configuration.web.rest.mapper; import com.bytechef.platform.configuration.domain.WorkflowTestConfiguration; -import com.bytechef.platform.configuration.web.rest.mapper.config.PlatformConfigurationMapperSpringConfig; +import com.bytechef.platform.configuration.web.rest.mapper.config.WorkflowConfigurationMapperSpringConfig; import com.bytechef.platform.configuration.web.rest.model.WorkflowTestConfigurationModel; import org.mapstruct.InheritInverseConfiguration; import org.mapstruct.Mapper; @@ -28,7 +28,7 @@ /** * @author Ivica Cardic */ -@Mapper(config = PlatformConfigurationMapperSpringConfig.class) +@Mapper(config = WorkflowConfigurationMapperSpringConfig.class) public interface WorkflowTestConfigurationMapper extends Converter { diff --git a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/WorkflowTriggerMapper.java b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/WorkflowTriggerMapper.java index e88fad5c97f..2e2037c3e9a 100644 --- a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/WorkflowTriggerMapper.java +++ b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/WorkflowTriggerMapper.java @@ -17,7 +17,7 @@ package com.bytechef.platform.configuration.web.rest.mapper; import com.bytechef.platform.configuration.domain.WorkflowTrigger; -import com.bytechef.platform.configuration.web.rest.mapper.config.PlatformConfigurationMapperSpringConfig; +import com.bytechef.platform.configuration.web.rest.mapper.config.WorkflowConfigurationMapperSpringConfig; import com.bytechef.platform.configuration.web.rest.model.WorkflowTriggerModel; import org.mapstruct.Mapper; import org.mapstruct.Mapping; @@ -26,7 +26,7 @@ /** * @author Ivica Cardic */ -@Mapper(config = PlatformConfigurationMapperSpringConfig.class, implementationName = "PlatformImpl") +@Mapper(config = WorkflowConfigurationMapperSpringConfig.class, implementationName = "PlatformImpl") public interface WorkflowTriggerMapper extends Converter { @Mapping(target = "connections", ignore = true) diff --git a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/config/PlatformConfigurationMapperSpringConfig.java b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/config/WorkflowConfigurationMapperSpringConfig.java similarity index 76% rename from server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/config/PlatformConfigurationMapperSpringConfig.java rename to server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/config/WorkflowConfigurationMapperSpringConfig.java index 510c7cb8742..dc13e64ba87 100644 --- a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/config/PlatformConfigurationMapperSpringConfig.java +++ b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-api/src/main/java/com/bytechef/platform/configuration/web/rest/mapper/config/WorkflowConfigurationMapperSpringConfig.java @@ -16,16 +16,16 @@ package com.bytechef.platform.configuration.web.rest.mapper.config; -import com.bytechef.platform.configuration.web.rest.adapter.PlatformConfigurationConversionServiceAdapter; +import com.bytechef.platform.configuration.web.rest.adapter.WorkflowConfigurationConversionServiceAdapter; import org.mapstruct.MapperConfig; import org.mapstruct.extensions.spring.SpringMapperConfig; /** * @author Ivica Cardic */ -@MapperConfig(componentModel = "spring", uses = PlatformConfigurationConversionServiceAdapter.class) +@MapperConfig(componentModel = "spring", uses = WorkflowConfigurationConversionServiceAdapter.class) @SpringMapperConfig( conversionServiceAdapterPackage = "com.bytechef.platform.configuration.web.rest.adapter", - conversionServiceAdapterClassName = "PlatformConfigurationConversionServiceAdapter") -public interface PlatformConfigurationMapperSpringConfig { + conversionServiceAdapterClassName = "WorkflowConfigurationConversionServiceAdapter") +public interface WorkflowConfigurationMapperSpringConfig { } diff --git a/server/libs/platform/platform-custom-component/platform-custom-component-configuration/platform-custom-component-configuration-rest/src/main/java/com/bytechef/platform/customcomponent/configuration/web/rest/mapper/CustomComponentMapper.java b/server/libs/platform/platform-custom-component/platform-custom-component-configuration/platform-custom-component-configuration-rest/src/main/java/com/bytechef/platform/customcomponent/configuration/web/rest/mapper/CustomComponentMapper.java index ab36afa4b67..a0dfb1d2573 100644 --- a/server/libs/platform/platform-custom-component/platform-custom-component-configuration/platform-custom-component-configuration-rest/src/main/java/com/bytechef/platform/customcomponent/configuration/web/rest/mapper/CustomComponentMapper.java +++ b/server/libs/platform/platform-custom-component/platform-custom-component-configuration/platform-custom-component-configuration-rest/src/main/java/com/bytechef/platform/customcomponent/configuration/web/rest/mapper/CustomComponentMapper.java @@ -17,7 +17,7 @@ package com.bytechef.platform.customcomponent.configuration.web.rest.mapper; import com.bytechef.platform.customcomponent.configuration.domain.CustomComponent; -import com.bytechef.platform.customcomponent.configuration.web.rest.mapper.config.PlatformCustomComponentMapperSpringConfig; +import com.bytechef.platform.customcomponent.configuration.web.rest.mapper.config.CustomComponentMapperSpringConfig; import com.bytechef.platform.customcomponent.configuration.web.rest.model.CustomComponentModel; import org.mapstruct.InheritInverseConfiguration; import org.mapstruct.Mapper; @@ -28,7 +28,7 @@ /** * @author Ivica Cardic */ -@Mapper(config = PlatformCustomComponentMapperSpringConfig.class) +@Mapper(config = CustomComponentMapperSpringConfig.class) public interface CustomComponentMapper extends Converter { @Override diff --git a/server/libs/platform/platform-custom-component/platform-custom-component-configuration/platform-custom-component-configuration-rest/src/main/java/com/bytechef/platform/customcomponent/configuration/web/rest/mapper/config/PlatformCustomComponentMapperSpringConfig.java b/server/libs/platform/platform-custom-component/platform-custom-component-configuration/platform-custom-component-configuration-rest/src/main/java/com/bytechef/platform/customcomponent/configuration/web/rest/mapper/config/CustomComponentMapperSpringConfig.java similarity index 79% rename from server/libs/platform/platform-custom-component/platform-custom-component-configuration/platform-custom-component-configuration-rest/src/main/java/com/bytechef/platform/customcomponent/configuration/web/rest/mapper/config/PlatformCustomComponentMapperSpringConfig.java rename to server/libs/platform/platform-custom-component/platform-custom-component-configuration/platform-custom-component-configuration-rest/src/main/java/com/bytechef/platform/customcomponent/configuration/web/rest/mapper/config/CustomComponentMapperSpringConfig.java index d3e28c53bfc..70a170fe76e 100644 --- a/server/libs/platform/platform-custom-component/platform-custom-component-configuration/platform-custom-component-configuration-rest/src/main/java/com/bytechef/platform/customcomponent/configuration/web/rest/mapper/config/PlatformCustomComponentMapperSpringConfig.java +++ b/server/libs/platform/platform-custom-component/platform-custom-component-configuration/platform-custom-component-configuration-rest/src/main/java/com/bytechef/platform/customcomponent/configuration/web/rest/mapper/config/CustomComponentMapperSpringConfig.java @@ -16,7 +16,7 @@ package com.bytechef.platform.customcomponent.configuration.web.rest.mapper.config; -import com.bytechef.platform.customcomponent.configuration.web.rest.adapter.PlatformCustomComponentConversionServiceAdapter; +import com.bytechef.platform.customcomponent.configuration.web.rest.adapter.CustomComponentConversionServiceAdapter; import org.mapstruct.MapperConfig; import org.mapstruct.extensions.spring.SpringMapperConfig; @@ -24,10 +24,10 @@ * @author Ivica Cardic */ @MapperConfig(componentModel = "spring", uses = { - PlatformCustomComponentConversionServiceAdapter.class + CustomComponentConversionServiceAdapter.class }) @SpringMapperConfig( conversionServiceAdapterPackage = "com.bytechef.platform.customcomponent.configuration.web.rest.adapter", - conversionServiceAdapterClassName = "PlatformCustomComponentConversionServiceAdapter") -public interface PlatformCustomComponentMapperSpringConfig { + conversionServiceAdapterClassName = "CustomComponentConversionServiceAdapter") +public interface CustomComponentMapperSpringConfig { } diff --git a/server/libs/platform/platform-file-storage/platform-file-storage-impl/src/main/java/com/bytechef/platform/file/storage/config/PlatformFileStorageConfiguration.java b/server/libs/platform/platform-file-storage/platform-file-storage-impl/src/main/java/com/bytechef/platform/file/storage/config/FileStorageConfiguration.java similarity index 95% rename from server/libs/platform/platform-file-storage/platform-file-storage-impl/src/main/java/com/bytechef/platform/file/storage/config/PlatformFileStorageConfiguration.java rename to server/libs/platform/platform-file-storage/platform-file-storage-impl/src/main/java/com/bytechef/platform/file/storage/config/FileStorageConfiguration.java index 33856adaade..074b0d4557a 100644 --- a/server/libs/platform/platform-file-storage/platform-file-storage-impl/src/main/java/com/bytechef/platform/file/storage/config/PlatformFileStorageConfiguration.java +++ b/server/libs/platform/platform-file-storage/platform-file-storage-impl/src/main/java/com/bytechef/platform/file/storage/config/FileStorageConfiguration.java @@ -39,16 +39,18 @@ * @author Ivica Cardic */ @Configuration -public class PlatformFileStorageConfiguration { +public class FileStorageConfiguration { - private static final Logger logger = LoggerFactory.getLogger(PlatformFileStorageConfiguration.class); + private static final Logger logger = LoggerFactory.getLogger(FileStorageConfiguration.class); private final ApplicationProperties applicationProperties; private final AwsFileStorageService awsFileStorageService; @SuppressFBWarnings("EI") - public PlatformFileStorageConfiguration(ApplicationProperties applicationProperties, + public FileStorageConfiguration( + ApplicationProperties applicationProperties, @Autowired(required = false) AwsFileStorageService awsFileStorageService) { + this.applicationProperties = applicationProperties; this.awsFileStorageService = awsFileStorageService; } diff --git a/server/libs/platform/platform-security/platform-security-web/platform-security-web-impl/src/main/java/com/bytechef/platform/security/web/filter/ApiKeyAuthenticationFilterBeforeContributor.java b/server/libs/platform/platform-security/platform-security-web/platform-security-web-impl/src/main/java/com/bytechef/platform/security/web/filter/ApiKeyAuthenticationFilterBeforeContributor.java index 0cedaf84728..bd0cc199813 100644 --- a/server/libs/platform/platform-security/platform-security-web/platform-security-web-impl/src/main/java/com/bytechef/platform/security/web/filter/ApiKeyAuthenticationFilterBeforeContributor.java +++ b/server/libs/platform/platform-security/platform-security-web/platform-security-web-impl/src/main/java/com/bytechef/platform/security/web/filter/ApiKeyAuthenticationFilterBeforeContributor.java @@ -18,7 +18,6 @@ import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import jakarta.servlet.Filter; -import org.springframework.core.annotation.Order; import org.springframework.security.authentication.AuthenticationManager; import org.springframework.security.web.authentication.www.BasicAuthenticationFilter; import org.springframework.stereotype.Component; @@ -27,7 +26,6 @@ * @author Ivica Cardic */ @Component("com.bytechef.platform.security.web.filter.ApiKeyAuthenticationFilterBeforeContributor") -@Order public class ApiKeyAuthenticationFilterBeforeContributor implements FilterBeforeContributor { @Override diff --git a/server/libs/platform/platform-user/platform-user-rest/platform-user-rest-api/src/main/java/com/bytechef/platform/user/web/rest/mapper/ApiKeyMapper.java b/server/libs/platform/platform-user/platform-user-rest/platform-user-rest-api/src/main/java/com/bytechef/platform/user/web/rest/mapper/ApiKeyMapper.java index d2c7ab71b11..80d15447119 100644 --- a/server/libs/platform/platform-user/platform-user-rest/platform-user-rest-api/src/main/java/com/bytechef/platform/user/web/rest/mapper/ApiKeyMapper.java +++ b/server/libs/platform/platform-user/platform-user-rest/platform-user-rest-api/src/main/java/com/bytechef/platform/user/web/rest/mapper/ApiKeyMapper.java @@ -17,7 +17,7 @@ package com.bytechef.platform.user.web.rest.mapper; import com.bytechef.platform.user.domain.ApiKey; -import com.bytechef.platform.user.web.rest.mapper.config.PlatformUserMapperSpringConfig; +import com.bytechef.platform.user.web.rest.mapper.config.UserMapperSpringConfig; import com.bytechef.platform.user.web.rest.model.ApiKeyModel; import org.mapstruct.InheritInverseConfiguration; import org.mapstruct.Mapper; @@ -28,7 +28,7 @@ /** * @author Ivica Cardic */ -@Mapper(config = PlatformUserMapperSpringConfig.class) +@Mapper(config = UserMapperSpringConfig.class) public interface ApiKeyMapper extends Converter { @Override diff --git a/server/libs/platform/platform-user/platform-user-rest/platform-user-rest-api/src/main/java/com/bytechef/platform/user/web/rest/mapper/AuthorityMapper.java b/server/libs/platform/platform-user/platform-user-rest/platform-user-rest-api/src/main/java/com/bytechef/platform/user/web/rest/mapper/AuthorityMapper.java index d828fd487ee..2c09b01ba27 100644 --- a/server/libs/platform/platform-user/platform-user-rest/platform-user-rest-api/src/main/java/com/bytechef/platform/user/web/rest/mapper/AuthorityMapper.java +++ b/server/libs/platform/platform-user/platform-user-rest/platform-user-rest-api/src/main/java/com/bytechef/platform/user/web/rest/mapper/AuthorityMapper.java @@ -17,7 +17,7 @@ package com.bytechef.platform.user.web.rest.mapper; import com.bytechef.platform.user.domain.Authority; -import com.bytechef.platform.user.web.rest.mapper.config.PlatformUserMapperSpringConfig; +import com.bytechef.platform.user.web.rest.mapper.config.UserMapperSpringConfig; import com.bytechef.platform.user.web.rest.model.AuthorityModel; import org.mapstruct.Mapper; import org.springframework.core.convert.converter.Converter; @@ -25,7 +25,7 @@ /** * @author Ivica Cardic */ -@Mapper(config = PlatformUserMapperSpringConfig.class) +@Mapper(config = UserMapperSpringConfig.class) public interface AuthorityMapper extends Converter { @Override diff --git a/server/libs/platform/platform-user/platform-user-rest/platform-user-rest-api/src/main/java/com/bytechef/platform/user/web/rest/mapper/SigningKeyMapper.java b/server/libs/platform/platform-user/platform-user-rest/platform-user-rest-api/src/main/java/com/bytechef/platform/user/web/rest/mapper/SigningKeyMapper.java index 372675abb9b..4a6e9323a24 100644 --- a/server/libs/platform/platform-user/platform-user-rest/platform-user-rest-api/src/main/java/com/bytechef/platform/user/web/rest/mapper/SigningKeyMapper.java +++ b/server/libs/platform/platform-user/platform-user-rest/platform-user-rest-api/src/main/java/com/bytechef/platform/user/web/rest/mapper/SigningKeyMapper.java @@ -17,7 +17,7 @@ package com.bytechef.platform.user.web.rest.mapper; import com.bytechef.platform.user.domain.SigningKey; -import com.bytechef.platform.user.web.rest.mapper.config.PlatformUserMapperSpringConfig; +import com.bytechef.platform.user.web.rest.mapper.config.UserMapperSpringConfig; import com.bytechef.platform.user.web.rest.model.SigningKeyModel; import org.mapstruct.InheritInverseConfiguration; import org.mapstruct.Mapper; @@ -28,7 +28,7 @@ /** * @author Ivica Cardic */ -@Mapper(config = PlatformUserMapperSpringConfig.class) +@Mapper(config = UserMapperSpringConfig.class) public interface SigningKeyMapper extends Converter { @Override diff --git a/server/libs/platform/platform-user/platform-user-rest/platform-user-rest-api/src/main/java/com/bytechef/platform/user/web/rest/mapper/config/PlatformUserMapperSpringConfig.java b/server/libs/platform/platform-user/platform-user-rest/platform-user-rest-api/src/main/java/com/bytechef/platform/user/web/rest/mapper/config/UserMapperSpringConfig.java similarity index 74% rename from server/libs/platform/platform-user/platform-user-rest/platform-user-rest-api/src/main/java/com/bytechef/platform/user/web/rest/mapper/config/PlatformUserMapperSpringConfig.java rename to server/libs/platform/platform-user/platform-user-rest/platform-user-rest-api/src/main/java/com/bytechef/platform/user/web/rest/mapper/config/UserMapperSpringConfig.java index 9793b3ecfa8..8ce82225820 100644 --- a/server/libs/platform/platform-user/platform-user-rest/platform-user-rest-api/src/main/java/com/bytechef/platform/user/web/rest/mapper/config/PlatformUserMapperSpringConfig.java +++ b/server/libs/platform/platform-user/platform-user-rest/platform-user-rest-api/src/main/java/com/bytechef/platform/user/web/rest/mapper/config/UserMapperSpringConfig.java @@ -16,16 +16,16 @@ package com.bytechef.platform.user.web.rest.mapper.config; -import com.bytechef.platform.user.web.rest.adapter.PlatformUserConversionServiceAdapter; +import com.bytechef.platform.user.web.rest.adapter.UserConversionServiceAdapter; import org.mapstruct.MapperConfig; import org.mapstruct.extensions.spring.SpringMapperConfig; /** * @author Ivica Cardic */ -@MapperConfig(componentModel = "spring", uses = PlatformUserConversionServiceAdapter.class) +@MapperConfig(componentModel = "spring", uses = UserConversionServiceAdapter.class) @SpringMapperConfig( conversionServiceAdapterPackage = "com.bytechef.platform.user.web.rest.adapter", - conversionServiceAdapterClassName = "PlatformUserConversionServiceAdapter") -public interface PlatformUserMapperSpringConfig { + conversionServiceAdapterClassName = "UserConversionServiceAdapter") +public interface UserMapperSpringConfig { } diff --git a/server/libs/platform/platform-webhook/platform-webhook-rest/platform-webhook-rest-impl/src/main/java/com/bytechef/platform/webhook/web/rest/WebhookTriggerController.java b/server/libs/platform/platform-webhook/platform-webhook-rest/platform-webhook-rest-impl/src/main/java/com/bytechef/platform/webhook/web/WebhookTriggerController.java similarity index 96% rename from server/libs/platform/platform-webhook/platform-webhook-rest/platform-webhook-rest-impl/src/main/java/com/bytechef/platform/webhook/web/rest/WebhookTriggerController.java rename to server/libs/platform/platform-webhook/platform-webhook-rest/platform-webhook-rest-impl/src/main/java/com/bytechef/platform/webhook/web/WebhookTriggerController.java index f7295f2163d..18c27ceb7ba 100644 --- a/server/libs/platform/platform-webhook/platform-webhook-rest/platform-webhook-rest-impl/src/main/java/com/bytechef/platform/webhook/web/rest/WebhookTriggerController.java +++ b/server/libs/platform/platform-webhook/platform-webhook-rest/platform-webhook-rest-impl/src/main/java/com/bytechef/platform/webhook/web/WebhookTriggerController.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.bytechef.platform.webhook.web.rest; +package com.bytechef.platform.webhook.web; import com.bytechef.atlas.configuration.service.WorkflowService; import com.bytechef.atlas.coordinator.annotation.ConditionalOnCoordinator; @@ -26,22 +26,23 @@ import com.bytechef.platform.file.storage.FilesFileStorage; import com.bytechef.platform.tenant.util.TenantUtils; import com.bytechef.platform.webhook.executor.WorkflowExecutor; +import com.bytechef.platform.webhook.web.rest.AbstractWebhookTriggerController; import com.bytechef.platform.workflow.execution.WorkflowExecutionId; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import jakarta.servlet.http.HttpServletRequest; import java.util.Objects; import org.springframework.http.HttpHeaders; import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Controller; import org.springframework.util.MultiValueMapAdapter; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RestController; /** * @author Ivica Cardic */ -@RestController +@Controller @ConditionalOnCoordinator public class WebhookTriggerController extends AbstractWebhookTriggerController { diff --git a/server/libs/platform/platform-webhook/platform-webhook-rest/platform-webhook-rest-impl/src/test/java/com/bytechef/platform/webhook/web/rest/WebhookTriggerControllerIntTest.java b/server/libs/platform/platform-webhook/platform-webhook-rest/platform-webhook-rest-impl/src/test/java/com/bytechef/platform/webhook/web/rest/WebhookTriggerControllerIntTest.java index 2c819be4523..13678e84ca6 100644 --- a/server/libs/platform/platform-webhook/platform-webhook-rest/platform-webhook-rest-impl/src/test/java/com/bytechef/platform/webhook/web/rest/WebhookTriggerControllerIntTest.java +++ b/server/libs/platform/platform-webhook/platform-webhook-rest/platform-webhook-rest-impl/src/test/java/com/bytechef/platform/webhook/web/rest/WebhookTriggerControllerIntTest.java @@ -16,6 +16,7 @@ package com.bytechef.platform.webhook.web.rest; +import com.bytechef.platform.webhook.web.WebhookTriggerController; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; diff --git a/server/libs/platform/platform-workflow/platform-workflow-execution/platform-workflow-execution-rest/platform-workflow-execution-rest-api/src/main/java/com/bytechef/platform/workflow/execution/web/rest/mapper/JobMapper.java b/server/libs/platform/platform-workflow/platform-workflow-execution/platform-workflow-execution-rest/platform-workflow-execution-rest-api/src/main/java/com/bytechef/platform/workflow/execution/web/rest/mapper/JobMapper.java index 7d5a7b9f2af..91da86e738a 100644 --- a/server/libs/platform/platform-workflow/platform-workflow-execution/platform-workflow-execution-rest/platform-workflow-execution-rest-api/src/main/java/com/bytechef/platform/workflow/execution/web/rest/mapper/JobMapper.java +++ b/server/libs/platform/platform-workflow/platform-workflow-execution/platform-workflow-execution-rest/platform-workflow-execution-rest-api/src/main/java/com/bytechef/platform/workflow/execution/web/rest/mapper/JobMapper.java @@ -17,7 +17,7 @@ package com.bytechef.platform.workflow.execution.web.rest.mapper; import com.bytechef.platform.workflow.execution.dto.JobDTO; -import com.bytechef.platform.workflow.execution.web.rest.mapper.config.PlatformWorkflowExecutionMapperSpringConfig; +import com.bytechef.platform.workflow.execution.web.rest.mapper.config.WorkflowExecutionMapperSpringConfig; import com.bytechef.platform.workflow.execution.web.rest.model.JobModel; import org.mapstruct.Mapper; import org.springframework.core.convert.converter.Converter; @@ -25,7 +25,7 @@ /** * @author Ivica Cardic */ -@Mapper(config = PlatformWorkflowExecutionMapperSpringConfig.class) +@Mapper(config = WorkflowExecutionMapperSpringConfig.class) public interface JobMapper extends Converter { @Override diff --git a/server/libs/platform/platform-workflow/platform-workflow-execution/platform-workflow-execution-rest/platform-workflow-execution-rest-api/src/main/java/com/bytechef/platform/workflow/execution/web/rest/mapper/TaskExecutionMapper.java b/server/libs/platform/platform-workflow/platform-workflow-execution/platform-workflow-execution-rest/platform-workflow-execution-rest-api/src/main/java/com/bytechef/platform/workflow/execution/web/rest/mapper/TaskExecutionMapper.java index 454ce005d03..0b062c9be9f 100644 --- a/server/libs/platform/platform-workflow/platform-workflow-execution/platform-workflow-execution-rest/platform-workflow-execution-rest-api/src/main/java/com/bytechef/platform/workflow/execution/web/rest/mapper/TaskExecutionMapper.java +++ b/server/libs/platform/platform-workflow/platform-workflow-execution/platform-workflow-execution-rest/platform-workflow-execution-rest-api/src/main/java/com/bytechef/platform/workflow/execution/web/rest/mapper/TaskExecutionMapper.java @@ -17,7 +17,7 @@ package com.bytechef.platform.workflow.execution.web.rest.mapper; import com.bytechef.platform.workflow.execution.dto.TaskExecutionDTO; -import com.bytechef.platform.workflow.execution.web.rest.mapper.config.PlatformWorkflowExecutionMapperSpringConfig; +import com.bytechef.platform.workflow.execution.web.rest.mapper.config.WorkflowExecutionMapperSpringConfig; import com.bytechef.platform.workflow.execution.web.rest.model.TaskExecutionModel; import java.util.Optional; import org.mapstruct.Mapper; @@ -26,7 +26,7 @@ /** * @author Ivica Cardic */ -@Mapper(config = PlatformWorkflowExecutionMapperSpringConfig.class) +@Mapper(config = WorkflowExecutionMapperSpringConfig.class) public interface TaskExecutionMapper extends Converter { @Override diff --git a/server/libs/platform/platform-workflow/platform-workflow-execution/platform-workflow-execution-rest/platform-workflow-execution-rest-api/src/main/java/com/bytechef/platform/workflow/execution/web/rest/mapper/TriggerExecutionMapper.java b/server/libs/platform/platform-workflow/platform-workflow-execution/platform-workflow-execution-rest/platform-workflow-execution-rest-api/src/main/java/com/bytechef/platform/workflow/execution/web/rest/mapper/TriggerExecutionMapper.java index 575068e7150..edd4ec91e8d 100644 --- a/server/libs/platform/platform-workflow/platform-workflow-execution/platform-workflow-execution-rest/platform-workflow-execution-rest-api/src/main/java/com/bytechef/platform/workflow/execution/web/rest/mapper/TriggerExecutionMapper.java +++ b/server/libs/platform/platform-workflow/platform-workflow-execution/platform-workflow-execution-rest/platform-workflow-execution-rest-api/src/main/java/com/bytechef/platform/workflow/execution/web/rest/mapper/TriggerExecutionMapper.java @@ -17,7 +17,7 @@ package com.bytechef.platform.workflow.execution.web.rest.mapper; import com.bytechef.platform.workflow.execution.dto.TriggerExecutionDTO; -import com.bytechef.platform.workflow.execution.web.rest.mapper.config.PlatformWorkflowExecutionMapperSpringConfig; +import com.bytechef.platform.workflow.execution.web.rest.mapper.config.WorkflowExecutionMapperSpringConfig; import com.bytechef.platform.workflow.execution.web.rest.model.TriggerExecutionModel; import java.util.Optional; import org.mapstruct.Mapper; @@ -27,7 +27,7 @@ /** * @author Ivica Cardic */ -@Mapper(config = PlatformWorkflowExecutionMapperSpringConfig.class) +@Mapper(config = WorkflowExecutionMapperSpringConfig.class) public interface TriggerExecutionMapper extends Converter { @Override diff --git a/server/libs/platform/platform-workflow/platform-workflow-execution/platform-workflow-execution-rest/platform-workflow-execution-rest-api/src/main/java/com/bytechef/platform/workflow/execution/web/rest/mapper/config/PlatformWorkflowExecutionMapperSpringConfig.java b/server/libs/platform/platform-workflow/platform-workflow-execution/platform-workflow-execution-rest/platform-workflow-execution-rest-api/src/main/java/com/bytechef/platform/workflow/execution/web/rest/mapper/config/WorkflowExecutionMapperSpringConfig.java similarity index 66% rename from server/libs/platform/platform-workflow/platform-workflow-execution/platform-workflow-execution-rest/platform-workflow-execution-rest-api/src/main/java/com/bytechef/platform/workflow/execution/web/rest/mapper/config/PlatformWorkflowExecutionMapperSpringConfig.java rename to server/libs/platform/platform-workflow/platform-workflow-execution/platform-workflow-execution-rest/platform-workflow-execution-rest-api/src/main/java/com/bytechef/platform/workflow/execution/web/rest/mapper/config/WorkflowExecutionMapperSpringConfig.java index 0c5db613e97..9fbed89cd00 100644 --- a/server/libs/platform/platform-workflow/platform-workflow-execution/platform-workflow-execution-rest/platform-workflow-execution-rest-api/src/main/java/com/bytechef/platform/workflow/execution/web/rest/mapper/config/PlatformWorkflowExecutionMapperSpringConfig.java +++ b/server/libs/platform/platform-workflow/platform-workflow-execution/platform-workflow-execution-rest/platform-workflow-execution-rest-api/src/main/java/com/bytechef/platform/workflow/execution/web/rest/mapper/config/WorkflowExecutionMapperSpringConfig.java @@ -16,8 +16,8 @@ package com.bytechef.platform.workflow.execution.web.rest.mapper.config; -import com.bytechef.platform.configuration.web.rest.adapter.PlatformConfigurationConversionServiceAdapter; -import com.bytechef.platform.workflow.execution.web.rest.adapter.PlatformWorkflowExecutionConversionServiceAdapter; +import com.bytechef.platform.configuration.web.rest.adapter.WorkflowConfigurationConversionServiceAdapter; +import com.bytechef.platform.workflow.execution.web.rest.adapter.WorkflowExecutionConversionServiceAdapter; import org.mapstruct.MapperConfig; import org.mapstruct.extensions.spring.SpringMapperConfig; @@ -25,10 +25,11 @@ * @author Ivica Cardic */ @MapperConfig(componentModel = "spring", uses = { - PlatformConfigurationConversionServiceAdapter.class, PlatformWorkflowExecutionConversionServiceAdapter.class + WorkflowConfigurationConversionServiceAdapter.class, WorkflowExecutionConversionServiceAdapter.class }) @SpringMapperConfig( conversionServiceAdapterPackage = "com.bytechef.platform.workflow.execution.web.rest.adapter", - conversionServiceAdapterClassName = "PlatformWorkflowExecutionConversionServiceAdapter") -public interface PlatformWorkflowExecutionMapperSpringConfig { + conversionServiceAdapterClassName = "WorkflowExecutionConversionServiceAdapter", + conversionServiceBeanName = "com.bytechef.platform.workflow.execution.web.rest.mapper.config.WorkflowExecutionMapperSpringConfig") +public interface WorkflowExecutionMapperSpringConfig { } diff --git a/server/libs/platform/platform-workflow/platform-workflow-test/platform-workflow-test-rest/src/main/java/com/bytechef/platform/workflow/test/web/rest/mapper/WorkflowTestExecutionMapper.java b/server/libs/platform/platform-workflow/platform-workflow-test/platform-workflow-test-rest/src/main/java/com/bytechef/platform/workflow/test/web/rest/mapper/WorkflowTestExecutionMapper.java index f9eb01423ce..deeeb579e0d 100644 --- a/server/libs/platform/platform-workflow/platform-workflow-test/platform-workflow-test-rest/src/main/java/com/bytechef/platform/workflow/test/web/rest/mapper/WorkflowTestExecutionMapper.java +++ b/server/libs/platform/platform-workflow/platform-workflow-test/platform-workflow-test-rest/src/main/java/com/bytechef/platform/workflow/test/web/rest/mapper/WorkflowTestExecutionMapper.java @@ -17,7 +17,7 @@ package com.bytechef.platform.workflow.test.web.rest.mapper; import com.bytechef.platform.workflow.test.dto.WorkflowTestExecution; -import com.bytechef.platform.workflow.test.web.rest.mapper.config.PlatformWorkflowTestMapperSpringConfig; +import com.bytechef.platform.workflow.test.web.rest.mapper.config.WorkflowTestMapperSpringConfig; import com.bytechef.platform.workflow.test.web.rest.model.WorkflowTestExecutionModel; import org.mapstruct.Mapper; import org.springframework.core.convert.converter.Converter; @@ -25,7 +25,7 @@ /** * @author Ivica Cardic */ -@Mapper(config = PlatformWorkflowTestMapperSpringConfig.class) +@Mapper(config = WorkflowTestMapperSpringConfig.class) public interface WorkflowTestExecutionMapper extends Converter { @Override diff --git a/server/libs/platform/platform-workflow/platform-workflow-test/platform-workflow-test-rest/src/main/java/com/bytechef/platform/workflow/test/web/rest/mapper/config/PlatformWorkflowTestMapperSpringConfig.java b/server/libs/platform/platform-workflow/platform-workflow-test/platform-workflow-test-rest/src/main/java/com/bytechef/platform/workflow/test/web/rest/mapper/config/WorkflowTestMapperSpringConfig.java similarity index 71% rename from server/libs/platform/platform-workflow/platform-workflow-test/platform-workflow-test-rest/src/main/java/com/bytechef/platform/workflow/test/web/rest/mapper/config/PlatformWorkflowTestMapperSpringConfig.java rename to server/libs/platform/platform-workflow/platform-workflow-test/platform-workflow-test-rest/src/main/java/com/bytechef/platform/workflow/test/web/rest/mapper/config/WorkflowTestMapperSpringConfig.java index 330d5171a8f..510e5708794 100644 --- a/server/libs/platform/platform-workflow/platform-workflow-test/platform-workflow-test-rest/src/main/java/com/bytechef/platform/workflow/test/web/rest/mapper/config/PlatformWorkflowTestMapperSpringConfig.java +++ b/server/libs/platform/platform-workflow/platform-workflow-test/platform-workflow-test-rest/src/main/java/com/bytechef/platform/workflow/test/web/rest/mapper/config/WorkflowTestMapperSpringConfig.java @@ -16,8 +16,8 @@ package com.bytechef.platform.workflow.test.web.rest.mapper.config; -import com.bytechef.platform.workflow.execution.web.rest.adapter.PlatformWorkflowExecutionConversionServiceAdapter; -import com.bytechef.platform.workflow.test.web.rest.adapter.PlatformWorkflowTestConversionServiceAdapter; +import com.bytechef.platform.workflow.execution.web.rest.adapter.WorkflowExecutionConversionServiceAdapter; +import com.bytechef.platform.workflow.test.web.rest.adapter.WorkflowTestConversionServiceAdapter; import org.mapstruct.MapperConfig; import org.mapstruct.extensions.spring.SpringMapperConfig; @@ -25,10 +25,10 @@ * @author Ivica Cardic */ @MapperConfig(componentModel = "spring", uses = { - PlatformWorkflowExecutionConversionServiceAdapter.class, PlatformWorkflowTestConversionServiceAdapter.class + WorkflowExecutionConversionServiceAdapter.class, WorkflowTestConversionServiceAdapter.class }) @SpringMapperConfig( conversionServiceAdapterPackage = "com.bytechef.platform.workflow.test.web.rest.adapter", - conversionServiceAdapterClassName = "PlatformWorkflowTestConversionServiceAdapter") -public interface PlatformWorkflowTestMapperSpringConfig { + conversionServiceAdapterClassName = "WorkflowTestConversionServiceAdapter") +public interface WorkflowTestMapperSpringConfig { } From e85a5834c1826f3d24eb55a434277d49de9e23ac Mon Sep 17 00:00:00 2001 From: Ivica Cardic Date: Fri, 15 Nov 2024 22:38:14 +0100 Subject: [PATCH 14/18] 1023 - SF --- .../component/init/openapi/ComponentInitOpenApiGenerator.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/commands/component/init/openapi/src/main/java/com/bytechef/cli/command/component/init/openapi/ComponentInitOpenApiGenerator.java b/cli/commands/component/init/openapi/src/main/java/com/bytechef/cli/command/component/init/openapi/ComponentInitOpenApiGenerator.java index 5e345081e0a..f8dca0b6a46 100644 --- a/cli/commands/component/init/openapi/src/main/java/com/bytechef/cli/command/component/init/openapi/ComponentInitOpenApiGenerator.java +++ b/cli/commands/component/init/openapi/src/main/java/com/bytechef/cli/command/component/init/openapi/ComponentInitOpenApiGenerator.java @@ -1780,8 +1780,8 @@ private CodeBlock getSchemaCodeBlock( } } else { builder.add( - getExtensionsCodeBlock(propertyName, propertyDescription, required, schema, outputSchema, - extensionMap)); + getExtensionsCodeBlock( + propertyName, propertyDescription, required, schema, outputSchema, extensionMap)); } return builder.build(); From c80117a2862f2a871840ca230cbf74d7ed1ad545 Mon Sep 17 00:00:00 2001 From: Ivica Cardic Date: Sun, 17 Nov 2024 20:15:42 +0100 Subject: [PATCH 15/18] 1746 - client - Add detailed messages when the project list is empty --- client/src/components/ComboBox/ComboBox.tsx | 13 +++++++++++-- ...ojectInstanceDialogBasicStepProjectsComboBox.tsx | 1 + 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/client/src/components/ComboBox/ComboBox.tsx b/client/src/components/ComboBox/ComboBox.tsx index b6be76ec7ed..6f262655a03 100644 --- a/client/src/components/ComboBox/ComboBox.tsx +++ b/client/src/components/ComboBox/ComboBox.tsx @@ -17,6 +17,7 @@ export type ComboBoxItemType = { export interface ComboBoxProps { disabled?: boolean; + emptyMessage?: string; items: ComboBoxItemType[]; maxHeight?: boolean; name?: string; @@ -26,7 +27,15 @@ export interface ComboBoxProps { value?: any; } -const ComboBox: React.FC = ({disabled, items, name, onBlur, onChange, value}: ComboBoxProps) => { +const ComboBox: React.FC = ({ + disabled, + emptyMessage, + items, + name, + onBlur, + onChange, + value, +}: ComboBoxProps) => { const [open, setOpen] = useState(false); const commandItems = items.map((comboBoxItem) => ( @@ -84,7 +93,7 @@ const ComboBox: React.FC = ({disabled, items, name, onBlur, onCha - No item found. + {emptyMessage ?? 'No item found.'} {commandItems} diff --git a/client/src/pages/automation/project-instances/components/project-instance-dialog/ProjectInstanceDialogBasicStepProjectsComboBox.tsx b/client/src/pages/automation/project-instances/components/project-instance-dialog/ProjectInstanceDialogBasicStepProjectsComboBox.tsx index 708113c436a..de480e5017f 100644 --- a/client/src/pages/automation/project-instances/components/project-instance-dialog/ProjectInstanceDialogBasicStepProjectsComboBox.tsx +++ b/client/src/pages/automation/project-instances/components/project-instance-dialog/ProjectInstanceDialogBasicStepProjectsComboBox.tsx @@ -30,6 +30,7 @@ const ProjectInstanceDialogBasicStepProjectsComboBox = ({ return projects ? ( ({ From 952c7efbb09699ab487bb1896976367af155f7f9 Mon Sep 17 00:00:00 2001 From: Ivica Cardic Date: Sun, 17 Nov 2024 20:15:58 +0100 Subject: [PATCH 16/18] 520 - client - Add detailed messages when the integration list is empty --- ...nInstanceConfigurationDialogBasicStepIntegrationsComboBox.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/client/src/pages/embedded/integration-instance-configurations/components/integration-instance-configuration-dialog/IntegrationInstanceConfigurationDialogBasicStepIntegrationsComboBox.tsx b/client/src/pages/embedded/integration-instance-configurations/components/integration-instance-configuration-dialog/IntegrationInstanceConfigurationDialogBasicStepIntegrationsComboBox.tsx index 1feb7e30505..a976243c468 100644 --- a/client/src/pages/embedded/integration-instance-configurations/components/integration-instance-configuration-dialog/IntegrationInstanceConfigurationDialogBasicStepIntegrationsComboBox.tsx +++ b/client/src/pages/embedded/integration-instance-configurations/components/integration-instance-configuration-dialog/IntegrationInstanceConfigurationDialogBasicStepIntegrationsComboBox.tsx @@ -39,6 +39,7 @@ const IntegrationInstanceConfigurationDialogBasicStepIntegrationsComboBox = ({ return integrations && componentDefinitions ? ( { const componentDefinition = componentDefinitions.filter( (componentDefinition) => componentDefinition.name === integration.componentName From 63f0ef23b08a4c2dd51dac063fad2b2126a20456 Mon Sep 17 00:00:00 2001 From: Ivica Cardic Date: Sun, 17 Nov 2024 20:13:36 +0100 Subject: [PATCH 17/18] 1380 - client - Update borders by replacing border-muted with border-*-border --- client/src/App.tsx | 2 +- client/src/components/TagList.tsx | 4 ++-- .../api-clients/components/ApiClientTable.tsx | 6 +++--- .../api-platform/api-collections/ApiCollections.tsx | 1 - .../components/ApiCollectionEndpointList.tsx | 2 +- .../api-collections/components/ApiCollectionList.tsx | 2 +- .../components/ApiCollectionListItem.tsx | 6 ++++-- .../components/ApiCollectionsFilterTitle.tsx | 2 +- .../components/ApiConnectorEndpointList.tsx | 2 +- client/src/pages/account/settings/Appearance.tsx | 6 +++--- client/src/pages/account/settings/Sessions.tsx | 4 ++-- .../components/connection-list/ConnectionList.tsx | 2 +- .../components/connection-list/ConnectionListItem.tsx | 2 +- .../automation/project-instances/ProjectInstances.tsx | 2 +- .../project-instance-list/ProjectInstanceList.tsx | 4 ++-- .../project-instance-list/ProjectInstanceListItem.tsx | 6 ++++-- client/src/pages/automation/project/Project.tsx | 2 +- .../components/project-header/ProjectHeader.tsx | 2 +- .../projects/components/project-list/ProjectList.tsx | 2 +- .../components/project-list/ProjectListItem.tsx | 4 ++-- .../components/WorkflowExecutionsTable.tsx | 8 ++++++-- .../WorkflowExecutionSheet.tsx | 2 +- .../WorkflowExecutionSheetAccordion.tsx | 8 ++++---- .../embedded/app-events/components/AppEventList.tsx | 2 +- .../connected-users/components/ConnectedUserTable.tsx | 6 +++--- .../components/connection-list/ConnectionList.tsx | 2 +- .../components/connection-list/ConnectionListItem.tsx | 2 +- .../IntegrationInstanceConfigurations.tsx | 2 +- .../IntegrationInstanceConfigurationList.tsx | 4 ++-- .../IntegrationInstanceConfigurationListItem.tsx | 6 ++++-- client/src/pages/embedded/integration/Integration.tsx | 2 +- .../integration-header/IntegrationHeader.tsx | 2 +- .../components/integration-list/IntegrationList.tsx | 2 +- .../integration-list/IntegrationListItem.tsx | 2 +- .../components/WorkflowExecutionsTable.tsx | 10 +++++++--- .../WorkflowExecutionSheet.tsx | 2 +- .../WorkflowExecutionSheetAccordion.tsx | 8 ++++---- .../settings/api-keys/components/ApiKeyTable.tsx | 6 +++--- .../components/CurrentOperationSelect.tsx | 2 +- .../platform/workflow-editor/components/DataPill.tsx | 2 +- .../workflow-editor/components/DataPillPanel.tsx | 4 ++-- .../components/DataPillPanelBodyInputsItem.tsx | 6 +++--- .../components/DataPillPanelBodyPropertiesItem.tsx | 6 +++--- .../components/Properties/ArrayProperty.tsx | 2 +- .../components/Properties/ObjectProperty.tsx | 2 +- .../PropertyCodeEditor/PropertyCodeEditorSheet.tsx | 4 ++-- .../workflow-editor/components/SchemaProperties.tsx | 4 ++-- .../components/WorkflowInputsSheetTable.tsx | 4 ++-- .../components/WorkflowNodeDetailsPanel.tsx | 2 +- .../WorkflowNodesPopoverMenuOperationList.tsx | 2 +- .../components/WorkflowNodesSidebar.tsx | 2 +- .../components/WorkflowOutputsSheetTable.tsx | 4 ++-- .../components/node-details-tabs/OutputTab.tsx | 2 +- .../signing-keys/components/SigningKeyTable.tsx | 6 +++--- client/src/shared/layout/LayoutContainer.tsx | 2 +- .../shared/layout/desktop-sidebar/DesktopSidebar.tsx | 2 +- 56 files changed, 105 insertions(+), 92 deletions(-) diff --git a/client/src/App.tsx b/client/src/App.tsx index 5d0cd7987e9..ab91d903b94 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -230,7 +230,7 @@ function App() { {ai.enabled && showCopilot && ( -