diff --git a/docs/src/content/docs/reference/components/zeplin.md b/docs/src/content/docs/reference/components/zeplin.md index c61261c2497..c1793ec5b28 100644 --- a/docs/src/content/docs/reference/components/zeplin.md +++ b/docs/src/content/docs/reference/components/zeplin.md @@ -42,6 +42,37 @@ Version: 1 ## Triggers +### Project Note +Triggers when new note is created, deleted or updated in specified project. + +#### Type: DYNAMIC_WEBHOOK +#### Properties + +| Name | Type | Control Type | Description | +|:--------------:|:------------:|:--------------------:|:-------------------:| +| Project | STRING | SELECT | | + + +### Output + + + +Type: OBJECT + + +#### Properties + +| Type | Control Type | +|:------------:|:--------------------:| +| {STRING\(id), STRING\(type), {STRING\(id), STRING\(status), [{STRING\(id), {STRING\(id), STRING\(email), STRING\(username)}\(author), STRING\(content)}]\(comments)}\(data)} | OBJECT_BUILDER | +| STRING | TEXT | +| STRING | TEXT | + + + + + +
diff --git a/server/libs/modules/components/zeplin/src/main/java/com/bytechef/component/zeplin/ZeplinComponentHandler.java b/server/libs/modules/components/zeplin/src/main/java/com/bytechef/component/zeplin/ZeplinComponentHandler.java index 04d0e66bf7f..781afe39f29 100644 --- a/server/libs/modules/components/zeplin/src/main/java/com/bytechef/component/zeplin/ZeplinComponentHandler.java +++ b/server/libs/modules/components/zeplin/src/main/java/com/bytechef/component/zeplin/ZeplinComponentHandler.java @@ -16,15 +16,20 @@ package com.bytechef.component.zeplin; +import static com.bytechef.component.zeplin.constant.ZeplinConstants.PROJECT_ID; + import com.bytechef.component.OpenApiComponentHandler; import com.bytechef.component.definition.ActionDefinition; import com.bytechef.component.definition.ComponentCategory; import com.bytechef.component.definition.ComponentDsl.ModifiableComponentDefinition; import com.bytechef.component.definition.ComponentDsl.ModifiableProperty; import com.bytechef.component.definition.ComponentDsl.ModifiableStringProperty; +import com.bytechef.component.definition.ComponentDsl.ModifiableTriggerDefinition; import com.bytechef.component.definition.OptionsDataSource.ActionOptionsFunction; +import com.bytechef.component.zeplin.trigger.ZeplinProjectNoteTrigger; import com.bytechef.component.zeplin.util.ZeplinUtils; import com.google.auto.service.AutoService; +import java.util.List; import java.util.Objects; /** @@ -33,6 +38,11 @@ @AutoService(OpenApiComponentHandler.class) public class ZeplinComponentHandler extends AbstractZeplinComponentHandler { + @Override + public List getTriggers() { + return List.of(ZeplinProjectNoteTrigger.TRIGGER_DEFINITION); + } + @Override public ModifiableComponentDefinition modifyComponent(ModifiableComponentDefinition modifiableComponentDefinition) { return modifiableComponentDefinition @@ -45,7 +55,7 @@ public ModifiableComponentDefinition modifyComponent(ModifiableComponentDefiniti public ModifiableProperty modifyProperty( ActionDefinition actionDefinition, ModifiableProperty modifiableProperty) { - if (Objects.equals(modifiableProperty.getName(), "project_id")) { + if (Objects.equals(modifiableProperty.getName(), PROJECT_ID)) { ((ModifiableStringProperty) modifiableProperty) .options((ActionOptionsFunction) ZeplinUtils::getProjectIdOptions); } diff --git a/server/libs/modules/components/zeplin/src/main/java/com/bytechef/component/zeplin/constant/ZeplinConstants.java b/server/libs/modules/components/zeplin/src/main/java/com/bytechef/component/zeplin/constant/ZeplinConstants.java new file mode 100644 index 00000000000..b9b2800eb0e --- /dev/null +++ b/server/libs/modules/components/zeplin/src/main/java/com/bytechef/component/zeplin/constant/ZeplinConstants.java @@ -0,0 +1,29 @@ +/* + * 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.component.zeplin.constant; + +/** + * @author Monika Kušter + */ +public class ZeplinConstants { + + private ZeplinConstants() { + } + + public static final String ID = "id"; + public static final String PROJECT_ID = "project_id"; +} diff --git a/server/libs/modules/components/zeplin/src/main/java/com/bytechef/component/zeplin/trigger/ZeplinProjectNoteTrigger.java b/server/libs/modules/components/zeplin/src/main/java/com/bytechef/component/zeplin/trigger/ZeplinProjectNoteTrigger.java new file mode 100644 index 00000000000..d6e26f261c4 --- /dev/null +++ b/server/libs/modules/components/zeplin/src/main/java/com/bytechef/component/zeplin/trigger/ZeplinProjectNoteTrigger.java @@ -0,0 +1,133 @@ +/* + * 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.component.zeplin.trigger; + +import static com.bytechef.component.definition.ComponentDsl.ModifiableTriggerDefinition; +import static com.bytechef.component.definition.ComponentDsl.array; +import static com.bytechef.component.definition.ComponentDsl.object; +import static com.bytechef.component.definition.ComponentDsl.outputSchema; +import static com.bytechef.component.definition.ComponentDsl.string; +import static com.bytechef.component.definition.ComponentDsl.trigger; +import static com.bytechef.component.zeplin.constant.ZeplinConstants.ID; +import static com.bytechef.component.zeplin.constant.ZeplinConstants.PROJECT_ID; + +import com.bytechef.component.definition.Context.Http; +import com.bytechef.component.definition.OptionsDataSource.TriggerOptionsFunction; +import com.bytechef.component.definition.Parameters; +import com.bytechef.component.definition.TriggerContext; +import com.bytechef.component.definition.TriggerDefinition.HttpHeaders; +import com.bytechef.component.definition.TriggerDefinition.HttpParameters; +import com.bytechef.component.definition.TriggerDefinition.TriggerType; +import com.bytechef.component.definition.TriggerDefinition.WebhookBody; +import com.bytechef.component.definition.TriggerDefinition.WebhookEnableOutput; +import com.bytechef.component.definition.TriggerDefinition.WebhookMethod; +import com.bytechef.component.definition.TriggerDefinition.WebhookValidateResponse; +import com.bytechef.component.definition.TypeReference; +import com.bytechef.component.zeplin.util.ZeplinUtils; +import java.util.List; +import java.util.Map; +import java.util.UUID; + +/** + * @author Monika Kušter + */ +public class ZeplinProjectNoteTrigger { + + public static final ModifiableTriggerDefinition TRIGGER_DEFINITION = trigger("projectNote") + .title("Project Note") + .description("Triggers when new note is created, deleted or updated in specified project.") + .properties( + string(PROJECT_ID) + .label("Project") + .options((TriggerOptionsFunction) ZeplinUtils::getProjectIdOptions) + .required(true)) + .type(TriggerType.DYNAMIC_WEBHOOK) + .output( + outputSchema( + object() + .properties( + object("context") + .properties( + string(ID), + string("type"), + object("data") + .properties( + string(ID), + string("status"), + array("comments") + .items( + object() + .properties( + string(ID), + object("author") + .properties( + string(ID), + string("email"), + string("username")), + string("content"))))), + string("action"), + string("event")))) + .webhookEnable(ZeplinProjectNoteTrigger::webhookEnable) + .webhookDisable(ZeplinProjectNoteTrigger::webhookDisable) + .webhookRequest(ZeplinProjectNoteTrigger::webhookRequest) + .webhookValidateOnEnable(ZeplinProjectNoteTrigger::webhookValidate); + + private ZeplinProjectNoteTrigger() { + } + + public static WebhookValidateResponse webhookValidate( + Parameters inputParameters, HttpHeaders headers, HttpParameters parameters, WebhookBody body, + WebhookMethod method, TriggerContext context) { + + return new WebhookValidateResponse(204); + } + + protected static WebhookEnableOutput webhookEnable( + Parameters inputParameters, Parameters connectionParameters, String webhookUrl, + String workflowExecutionId, TriggerContext triggerContext) { + + Map body = triggerContext + .http(http -> http.post("/projects/" + inputParameters.getRequiredString(PROJECT_ID) + "/webhooks")) + .body(Http.Body.of( + "url", webhookUrl, + "secret", UUID.randomUUID(), + "events", List.of("project.note"))) + .configuration(Http.responseType(Http.ResponseType.JSON)) + .execute() + .getBody(new TypeReference<>() {}); + + return new WebhookEnableOutput(Map.of(ID, body.get(ID)), null); + } + + protected static void webhookDisable( + Parameters inputParameters, Parameters connectionParameters, Parameters outputParameters, + String workflowExecutionId, TriggerContext triggerContext) { + + triggerContext.http(http -> http + .delete("/projects/" + inputParameters.getRequiredString(PROJECT_ID) + "/webhooks/" + + outputParameters.getRequiredString(ID))) + .configuration(Http.responseType(Http.ResponseType.JSON)) + .execute(); + } + + protected static Object webhookRequest( + Parameters inputParameters, Parameters connectionParameters, HttpHeaders headers, HttpParameters parameters, + WebhookBody body, WebhookMethod method, WebhookEnableOutput output, TriggerContext triggerContext) { + + return body.getContent(); + } +} diff --git a/server/libs/modules/components/zeplin/src/main/java/com/bytechef/component/zeplin/util/ZeplinUtils.java b/server/libs/modules/components/zeplin/src/main/java/com/bytechef/component/zeplin/util/ZeplinUtils.java index 28fa6783f8d..e4fd3560f5b 100644 --- a/server/libs/modules/components/zeplin/src/main/java/com/bytechef/component/zeplin/util/ZeplinUtils.java +++ b/server/libs/modules/components/zeplin/src/main/java/com/bytechef/component/zeplin/util/ZeplinUtils.java @@ -17,6 +17,7 @@ package com.bytechef.component.zeplin.util; import static com.bytechef.component.definition.ComponentDsl.option; +import static com.bytechef.component.zeplin.constant.ZeplinConstants.ID; import com.bytechef.component.definition.Context; import com.bytechef.component.definition.Context.Http; @@ -48,7 +49,7 @@ public static List> getProjectIdOptions( List> options = new ArrayList<>(); for (Map map : body) { - options.add(option((String) map.get("name"), (String) map.get("id"))); + options.add(option((String) map.get("name"), (String) map.get(ID))); } return options; diff --git a/server/libs/modules/components/zeplin/src/test/java/com/bytechef/component/zeplin/trigger/ZeplinProjectNoteTriggerTest.java b/server/libs/modules/components/zeplin/src/test/java/com/bytechef/component/zeplin/trigger/ZeplinProjectNoteTriggerTest.java new file mode 100644 index 00000000000..6be6757b299 --- /dev/null +++ b/server/libs/modules/components/zeplin/src/test/java/com/bytechef/component/zeplin/trigger/ZeplinProjectNoteTriggerTest.java @@ -0,0 +1,133 @@ +/* + * 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.component.zeplin.trigger; + +import static com.bytechef.component.zeplin.constant.ZeplinConstants.ID; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.mockStatic; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + +import com.bytechef.component.definition.Context.Http; +import com.bytechef.component.definition.Parameters; +import com.bytechef.component.definition.TriggerContext; +import com.bytechef.component.definition.TriggerDefinition; +import com.bytechef.component.definition.TriggerDefinition.HttpHeaders; +import com.bytechef.component.definition.TriggerDefinition.HttpParameters; +import com.bytechef.component.definition.TriggerDefinition.WebhookBody; +import com.bytechef.component.definition.TriggerDefinition.WebhookEnableOutput; +import com.bytechef.component.definition.TriggerDefinition.WebhookMethod; +import com.bytechef.component.definition.TypeReference; +import java.time.LocalDateTime; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.MockedStatic; + +/** + * @author Monika Kušter + */ +class ZeplinProjectNoteTriggerTest { + + private final ArgumentCaptor bodyArgumentCaptor = ArgumentCaptor.forClass(Http.Body.class); + private final Http.Executor mockedExecutor = mock(Http.Executor.class); + private final HttpHeaders mockedHttpHeaders = mock(HttpHeaders.class); + private final Object mockedObject = mock(Object.class); + private final HttpParameters mockedHttpParameters = mock(HttpParameters.class); + private final Parameters mockedParameters = mock(Parameters.class); + private final Http.Response mockedResponse = mock(Http.Response.class); + private final WebhookBody mockedWebhookBody = mock(WebhookBody.class); + private final WebhookEnableOutput mockedWebhookEnableOutput = mock(WebhookEnableOutput.class); + private final WebhookMethod mockedWebhookMethod = mock(WebhookMethod.class); + private final TriggerContext mockedTriggerContext = mock(TriggerContext.class); + private static final String TEST_WORKFLOW_EXECUTION_ID = "testWorkflowExecutionId"; + + @Test + void testWebhookEnable() { + when(mockedTriggerContext.http(any())) + .thenReturn(mockedExecutor); + when(mockedExecutor.body(bodyArgumentCaptor.capture())) + .thenReturn(mockedExecutor); + when(mockedExecutor.configuration(any())) + .thenReturn(mockedExecutor); + when(mockedExecutor.execute()) + .thenReturn(mockedResponse); + when(mockedResponse.getBody(any(TypeReference.class))) + .thenReturn(Map.of(ID, "abc")); + UUID uuid = UUID.randomUUID(); + + try (MockedStatic uuidMockedStatic = mockStatic(UUID.class)) { + + uuidMockedStatic.when(UUID::randomUUID) + .thenReturn(uuid); + + TriggerDefinition.WebhookEnableOutput webhookEnableOutput = ZeplinProjectNoteTrigger.webhookEnable( + mockedParameters, mockedParameters, "testWebhookUrl", TEST_WORKFLOW_EXECUTION_ID, mockedTriggerContext); + + Map parameters = webhookEnableOutput.parameters(); + LocalDateTime webhookExpirationDate = webhookEnableOutput.webhookExpirationDate(); + + Map expectedParameters = Map.of(ID, "abc"); + + assertEquals(expectedParameters, parameters); + assertNull(webhookExpirationDate); + + Http.Body body = bodyArgumentCaptor.getValue(); + + assertEquals( + Map.of("url", "testWebhookUrl", + "secret", uuid, + "events", List.of("project.note")), + body.getContent()); + } + } + + @Test + void testWebhookDisable() { + when(mockedTriggerContext.http(any())) + .thenReturn(mockedExecutor); + when(mockedExecutor.configuration(any())) + .thenReturn(mockedExecutor); + when(mockedExecutor.execute()) + .thenReturn(mockedResponse); + + ZeplinProjectNoteTrigger.webhookDisable( + mockedParameters, mockedParameters, mockedParameters, TEST_WORKFLOW_EXECUTION_ID, mockedTriggerContext); + + verify(mockedTriggerContext, times(1)).http(any()); + verify(mockedExecutor, times(1)).configuration(any()); + verify(mockedExecutor, times(1)).execute(); + } + + @Test + void testWebhookRequest() { + when(mockedWebhookBody.getContent()) + .thenReturn(mockedObject); + + Object result = ZeplinProjectNoteTrigger.webhookRequest( + mockedParameters, mockedParameters, mockedHttpHeaders, mockedHttpParameters, mockedWebhookBody, + mockedWebhookMethod, mockedWebhookEnableOutput, mockedTriggerContext); + + assertEquals(mockedObject, result); + } +} diff --git a/server/libs/modules/components/zeplin/src/test/resources/definition/zeplin_v1.json b/server/libs/modules/components/zeplin/src/test/resources/definition/zeplin_v1.json index 9e72cb7b5f4..79f6ead73f1 100644 --- a/server/libs/modules/components/zeplin/src/test/resources/definition/zeplin_v1.json +++ b/server/libs/modules/components/zeplin/src/test/resources/definition/zeplin_v1.json @@ -119,6 +119,746 @@ "perform" : null, "processErrorResponse" : null } ], + "triggers" : [ { + "batch" : null, + "deprecated" : null, + "description" : "Triggers when new note is created, deleted or updated in specified project.", + "help" : null, + "name" : "projectNote", + "outputDefinition" : { + "output" : null, + "outputResponse" : { + "outputSchema" : { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : null, + "type" : "OBJECT", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "additionalProperties" : null, + "multipleValues" : null, + "options" : null, + "properties" : [ { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "context", + "type" : "OBJECT", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "additionalProperties" : null, + "multipleValues" : null, + "options" : null, + "properties" : [ { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "id", + "type" : "STRING", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "controlType" : "TEXT", + "languageId" : null, + "maxLength" : null, + "minLength" : null, + "options" : null, + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "type", + "type" : "STRING", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "controlType" : "TEXT", + "languageId" : null, + "maxLength" : null, + "minLength" : null, + "options" : null, + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "data", + "type" : "OBJECT", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "additionalProperties" : null, + "multipleValues" : null, + "options" : null, + "properties" : [ { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "id", + "type" : "STRING", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "controlType" : "TEXT", + "languageId" : null, + "maxLength" : null, + "minLength" : null, + "options" : null, + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "status", + "type" : "STRING", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "controlType" : "TEXT", + "languageId" : null, + "maxLength" : null, + "minLength" : null, + "options" : null, + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "comments", + "type" : "ARRAY", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "items" : [ { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : null, + "type" : "OBJECT", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "additionalProperties" : null, + "multipleValues" : null, + "options" : null, + "properties" : [ { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "id", + "type" : "STRING", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "controlType" : "TEXT", + "languageId" : null, + "maxLength" : null, + "minLength" : null, + "options" : null, + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "author", + "type" : "OBJECT", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "additionalProperties" : null, + "multipleValues" : null, + "options" : null, + "properties" : [ { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "id", + "type" : "STRING", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "controlType" : "TEXT", + "languageId" : null, + "maxLength" : null, + "minLength" : null, + "options" : null, + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "email", + "type" : "STRING", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "controlType" : "TEXT", + "languageId" : null, + "maxLength" : null, + "minLength" : null, + "options" : null, + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "username", + "type" : "STRING", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "controlType" : "TEXT", + "languageId" : null, + "maxLength" : null, + "minLength" : null, + "options" : null, + "optionsDataSource" : null + } ], + "controlType" : "OBJECT_BUILDER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "content", + "type" : "STRING", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "controlType" : "TEXT", + "languageId" : null, + "maxLength" : null, + "minLength" : null, + "options" : null, + "optionsDataSource" : null + } ], + "controlType" : "OBJECT_BUILDER", + "optionsDataSource" : null + } ], + "maxItems" : null, + "minItems" : null, + "multipleValues" : null, + "options" : null, + "controlType" : "ARRAY_BUILDER", + "optionsDataSource" : null + } ], + "controlType" : "OBJECT_BUILDER", + "optionsDataSource" : null + } ], + "controlType" : "OBJECT_BUILDER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "action", + "type" : "STRING", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "controlType" : "TEXT", + "languageId" : null, + "maxLength" : null, + "minLength" : null, + "options" : null, + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "event", + "type" : "STRING", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "controlType" : "TEXT", + "languageId" : null, + "maxLength" : null, + "minLength" : null, + "options" : null, + "optionsDataSource" : null + } ], + "controlType" : "OBJECT_BUILDER", + "optionsDataSource" : null + }, + "sampleOutput" : null + }, + "outputSchema" : { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : null, + "type" : "OBJECT", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "additionalProperties" : null, + "multipleValues" : null, + "options" : null, + "properties" : [ { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "context", + "type" : "OBJECT", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "additionalProperties" : null, + "multipleValues" : null, + "options" : null, + "properties" : [ { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "id", + "type" : "STRING", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "controlType" : "TEXT", + "languageId" : null, + "maxLength" : null, + "minLength" : null, + "options" : null, + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "type", + "type" : "STRING", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "controlType" : "TEXT", + "languageId" : null, + "maxLength" : null, + "minLength" : null, + "options" : null, + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "data", + "type" : "OBJECT", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "additionalProperties" : null, + "multipleValues" : null, + "options" : null, + "properties" : [ { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "id", + "type" : "STRING", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "controlType" : "TEXT", + "languageId" : null, + "maxLength" : null, + "minLength" : null, + "options" : null, + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "status", + "type" : "STRING", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "controlType" : "TEXT", + "languageId" : null, + "maxLength" : null, + "minLength" : null, + "options" : null, + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "comments", + "type" : "ARRAY", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "items" : [ { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : null, + "type" : "OBJECT", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "additionalProperties" : null, + "multipleValues" : null, + "options" : null, + "properties" : [ { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "id", + "type" : "STRING", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "controlType" : "TEXT", + "languageId" : null, + "maxLength" : null, + "minLength" : null, + "options" : null, + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "author", + "type" : "OBJECT", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "additionalProperties" : null, + "multipleValues" : null, + "options" : null, + "properties" : [ { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "id", + "type" : "STRING", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "controlType" : "TEXT", + "languageId" : null, + "maxLength" : null, + "minLength" : null, + "options" : null, + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "email", + "type" : "STRING", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "controlType" : "TEXT", + "languageId" : null, + "maxLength" : null, + "minLength" : null, + "options" : null, + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "username", + "type" : "STRING", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "controlType" : "TEXT", + "languageId" : null, + "maxLength" : null, + "minLength" : null, + "options" : null, + "optionsDataSource" : null + } ], + "controlType" : "OBJECT_BUILDER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "content", + "type" : "STRING", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "controlType" : "TEXT", + "languageId" : null, + "maxLength" : null, + "minLength" : null, + "options" : null, + "optionsDataSource" : null + } ], + "controlType" : "OBJECT_BUILDER", + "optionsDataSource" : null + } ], + "maxItems" : null, + "minItems" : null, + "multipleValues" : null, + "options" : null, + "controlType" : "ARRAY_BUILDER", + "optionsDataSource" : null + } ], + "controlType" : "OBJECT_BUILDER", + "optionsDataSource" : null + } ], + "controlType" : "OBJECT_BUILDER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "action", + "type" : "STRING", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "controlType" : "TEXT", + "languageId" : null, + "maxLength" : null, + "minLength" : null, + "options" : null, + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "event", + "type" : "STRING", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "controlType" : "TEXT", + "languageId" : null, + "maxLength" : null, + "minLength" : null, + "options" : null, + "optionsDataSource" : null + } ], + "controlType" : "OBJECT_BUILDER", + "optionsDataSource" : null + }, + "sampleOutput" : null + }, + "properties" : [ { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : true, + "name" : "project_id", + "type" : "STRING", + "defaultValue" : null, + "exampleValue" : null, + "label" : "Project", + "placeholder" : null, + "controlType" : "SELECT", + "languageId" : null, + "maxLength" : null, + "minLength" : null, + "options" : null, + "optionsDataSource" : { + "optionsLookupDependsOn" : null, + "options" : { } + } + } ], + "title" : "Project Note", + "type" : "DYNAMIC_WEBHOOK", + "webhookRawBody" : null, + "workflowSyncExecution" : null, + "workflowNodeDescription" : null, + "processErrorResponse" : null, + "poll" : null, + "deduplicate" : null, + "webhookDisable" : { }, + "webhookEnable" : { }, + "dynamicWebhookRefresh" : null, + "listenerDisable" : null, + "listenerEnable" : null, + "webhookRequest" : { }, + "webhookValidate" : null, + "webhookValidateOnEnable" : { } + } ], + "dataStream" : null, + "unifiedApi" : null, "connection" : { "authorizations" : [ { "detectOn" : null, @@ -187,8 +927,5 @@ "authorizationRequired" : null, "baseUri" : { }, "test" : null - }, - "unifiedApi" : null, - "triggers" : [ ], - "dataStream" : null + } } \ No newline at end of file