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 18cf017f9e9..bb50772d5e4 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 @@ -548,7 +548,7 @@ private MethodSpec createOptionsMethod(String propertyName, ClassName returnType .addParameter(ParameterSpec.builder( ParameterizedTypeName.get(ClassName.get(Map.class), ClassName.get(String.class), ClassName.get(String.class)), - "dependencyPaths") + "lookupDependsOnPaths") .build()) .addParameter(ParameterSpec.builder(String.class, "searchText") .build()) @@ -573,7 +573,7 @@ private MethodSpec createPropertiesMethod(String propertyName) { .addParameter(ParameterSpec.builder( ParameterizedTypeName.get(ClassName.get(Map.class), ClassName.get(String.class), ClassName.get(String.class)), - "dependencyPaths") + "lookupDependsOnPaths") .build()) .addParameter(ParameterSpec.builder(Context.class, "context") .build()) diff --git a/docs/src/content/docs/reference/components/mailerlite.md b/docs/src/content/docs/reference/components/mailerlite.md new file mode 100644 index 00000000000..0265470184e --- /dev/null +++ b/docs/src/content/docs/reference/components/mailerlite.md @@ -0,0 +1,320 @@ +--- +title: "MailerLite" +description: "MailerLite is an intuitive email marketing platform that offers automation, landing pages, and subscriber management for businesses and creators." +--- + +MailerLite is an intuitive email marketing platform that offers automation, landing pages, and subscriber management for businesses and creators. + + +Categories: Marketing Automation + + +Type: mailerLite/v1 + +
+ + + +## Connections + +Version: 1 + + +### bearer_token + +#### Properties + +| Name | Label | Type | Description | Required | +|:---------------:|:--------------:|:------------:|:-------------------:|:--------:| +| token | API Token | STRING | API Token needed for authorization. | true | + + + + + +
+ + + +## Actions + + +### Add Subscriber to Group +Name: addSubscriberToGroup + +Adding a subscriber to a selected group. + +#### Properties + +| Name | Label | Type | Description | Required | +|:---------------:|:--------------:|:------------:|:-------------------:|:--------:| +| subscriber_id | Subscriber Email | STRING | ID of the user that will be added to the selected group. | true | +| group_id | Group ID | STRING | ID of the group to which the user will be added. | true | + +#### Example JSON Structure +```json +{ + "label" : "Add Subscriber to Group", + "name" : "addSubscriberToGroup", + "parameters" : { + "subscriber_id" : "", + "group_id" : "" + }, + "type" : "mailerLite/v1/addSubscriberToGroup" +} +``` + +#### Output + + + +Type: OBJECT + + +#### Properties + +| Name | Type | Description | +|:------------:|:------------:|:-------------------:| +| data | OBJECT
Properties {STRING\(id), STRING\(name), INTEGER\(active_count), INTEGER\(sent_count), INTEGER\(opens_count), {NUMBER\(float), STRING\(string)}\(open_rate), INTEGER\(clicks_count), {NUMBER\(float), STRING\(string)}\(click_rate), INTEGER\(unsubscribed_count), INTEGER\(unconfirmed_count), INTEGER\(bounced_count), INTEGER\(junk_count), STRING\(created_at)}
| | + + + + +#### Output Example +```json +{ + "data" : { + "id" : "", + "name" : "", + "active_count" : 1, + "sent_count" : 1, + "opens_count" : 1, + "open_rate" : { + "float" : 0.0, + "string" : "" + }, + "clicks_count" : 1, + "click_rate" : { + "float" : 0.0, + "string" : "" + }, + "unsubscribed_count" : 1, + "unconfirmed_count" : 1, + "bounced_count" : 1, + "junk_count" : 1, + "created_at" : "" + } +} +``` + + +### Create or Update Subscriber +Name: createOrUpdateSubscriber + +Create new user or update an existing user. + +#### Properties + +| Name | Label | Type | Description | Required | +|:---------------:|:--------------:|:------------:|:-------------------:|:--------:| +| email | null | STRING | The email address of the subscriber. | true | +| group_id | Group ID | STRING | ID of the group to which you want to add the subscriber to. | false | + +#### Example JSON Structure +```json +{ + "label" : "Create or Update Subscriber", + "name" : "createOrUpdateSubscriber", + "parameters" : { + "email" : "", + "group_id" : "" + }, + "type" : "mailerLite/v1/createOrUpdateSubscriber" +} +``` + +#### Output + + + +Type: OBJECT + + +#### Properties + +| Name | Type | Description | +|:------------:|:------------:|:-------------------:| +| data | OBJECT
Properties {STRING\(id), STRING\(email), STRING\(status), STRING\(source), INTEGER\(sent), INTEGER\(opens_count), INTEGER\(clicks_count), INTEGER\(open_rate), INTEGER\(click_rate), STRING\(subscribed_at), STRING\(created_at), STRING\(updated_at), []\(fields), []\(groups)}
| | + + + + +#### Output Example +```json +{ + "data" : { + "id" : "", + "email" : "", + "status" : "", + "source" : "", + "sent" : 1, + "opens_count" : 1, + "clicks_count" : 1, + "open_rate" : 1, + "click_rate" : 1, + "subscribed_at" : "", + "created_at" : "", + "updated_at" : "", + "fields" : [ ], + "groups" : [ ] + } +} +``` + + +### Remove Subscriber from Group +Name: removeSubscriberFromGroup + +Remove selected subscriber from the group. + +#### Properties + +| Name | Label | Type | Description | Required | +|:---------------:|:--------------:|:------------:|:-------------------:|:--------:| +| subscriber_id | Subscriber | STRING | ID of the user that will be added to the selected group. | true | +| group_id | Group ID | STRING | ID of the group to which the user will be added. | true | + +#### Example JSON Structure +```json +{ + "label" : "Remove Subscriber from Group", + "name" : "removeSubscriberFromGroup", + "parameters" : { + "subscriber_id" : "", + "group_id" : "" + }, + "type" : "mailerLite/v1/removeSubscriberFromGroup" +} +``` + +#### Output + +This action does not produce any output. + + + + + + +## Triggers + + +### Subscriber Added to the Group +Name: subscriberAddedToGroup + +Triggers when a subscriber is added to the group. + +Type: DYNAMIC_WEBHOOK + + +#### Output + + + +Type: OBJECT + + +#### Properties + +| Name | Type | Description | +|:------------:|:------------:|:-------------------:| +| data | OBJECT
Properties {STRING\(account_id), STRING\(id), STRING\(email), STRING\(status), STRING\(source), INTEGER\(sent), INTEGER\(opens_count), INTEGER\(clicks_count), INTEGER\(open_rate), INTEGER\(click_rate), STRING\(subscribed_at), STRING\(created_at), STRING\(updated_at), []\(fields), []\(groups)}
| | + + + + +#### JSON Example +```json +{ + "label" : "Subscriber Added to the Group", + "name" : "subscriberAddedToGroup", + "type" : "mailerLite/v1/subscriberAddedToGroup" +} +``` + + +### Subscriber Created +Name: subscriberCreated + +Triggers when a subscriber is created. + +Type: DYNAMIC_WEBHOOK + + +#### Output + + + +Type: OBJECT + + +#### Properties + +| Name | Type | Description | +|:------------:|:------------:|:-------------------:| +| data | OBJECT
Properties {STRING\(id), STRING\(email), STRING\(status), STRING\(source), INTEGER\(sent), INTEGER\(opens_count), INTEGER\(clicks_count), INTEGER\(open_rate), INTEGER\(click_rate), {}\(ip_address), STRING\(subscribed_at), STRING\(unsubscribed_at), STRING\(created_at), STRING\(updated_at), STRING\(deleted_at), STRING\(forget_at), []\(fields), []\(groups), STRING\(account_id)}
| | + + + + +#### JSON Example +```json +{ + "label" : "Subscriber Created", + "name" : "subscriberCreated", + "type" : "mailerLite/v1/subscriberCreated" +} +``` + + +### Subscriber Unsubscribed +Name: subscriberUnsubscribed + +Triggers when a subscriber unsubscribes. + +Type: DYNAMIC_WEBHOOK + + +#### Output + + + +Type: OBJECT + + +#### Properties + +| Name | Type | Description | +|:------------:|:------------:|:-------------------:| +| data | OBJECT
Properties {STRING\(account_id), STRING\(id), STRING\(email), STRING\(status), STRING\(source), INTEGER\(sent), INTEGER\(opens_count), INTEGER\(clicks_count), INTEGER\(open_rate), INTEGER\(click_rate), STRING\(subscribed_at), STRING\(created_at), STRING\(updated_at), []\(fields), []\(groups)}
| | + + + + +#### JSON Example +```json +{ + "label" : "Subscriber Unsubscribed", + "name" : "subscriberUnsubscribed", + "type" : "mailerLite/v1/subscriberUnsubscribed" +} +``` + + +
+ +
+ +# Additional instructions +
+ diff --git a/server/apps/server-app/build.gradle.kts b/server/apps/server-app/build.gradle.kts index cd1276ef96f..89dcbe2e88e 100644 --- a/server/apps/server-app/build.gradle.kts +++ b/server/apps/server-app/build.gradle.kts @@ -230,6 +230,7 @@ dependencies { implementation(project(":server:libs:modules:components:keap")) implementation(project(":server:libs:modules:components:logger")) implementation(project(":server:libs:modules:components:mailchimp")) + implementation(project(":server:libs:modules:components:mailerlite")) implementation(project(":server:libs:modules:components:map")) implementation(project(":server:libs:modules:components:math-helper")) implementation(project(":server:libs:modules:components:microsoft:microsoft-excel")) diff --git a/server/ee/apps/worker-app/build.gradle.kts b/server/ee/apps/worker-app/build.gradle.kts index 04c422f3650..3906ab0ee5f 100644 --- a/server/ee/apps/worker-app/build.gradle.kts +++ b/server/ee/apps/worker-app/build.gradle.kts @@ -150,6 +150,7 @@ dependencies { implementation(project(":server:libs:modules:components:keap")) implementation(project(":server:libs:modules:components:logger")) implementation(project(":server:libs:modules:components:mailchimp")) + implementation(project(":server:libs:modules:components:mailerlite")) implementation(project(":server:libs:modules:components:map")) implementation(project(":server:libs:modules:components:math-helper")) implementation(project(":server:libs:modules:components:microsoft:microsoft-excel")) diff --git a/server/libs/modules/components/accelo/src/main/java/com/bytechef/component/accelo/util/AbstractAcceloUtils.java b/server/libs/modules/components/accelo/src/main/java/com/bytechef/component/accelo/util/AbstractAcceloUtils.java index 520e3d3d9b5..d9d651721bd 100644 --- a/server/libs/modules/components/accelo/src/main/java/com/bytechef/component/accelo/util/AbstractAcceloUtils.java +++ b/server/libs/modules/components/accelo/src/main/java/com/bytechef/component/accelo/util/AbstractAcceloUtils.java @@ -30,7 +30,7 @@ public abstract class AbstractAcceloUtils { public static List> getCompanyIdOptions( Parameters inputParameters, - Parameters connectionParameters, Map dependencyPaths, String searchText, + Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return List.of(); diff --git a/server/libs/modules/components/accelo/src/main/java/com/bytechef/component/accelo/util/AcceloUtils.java b/server/libs/modules/components/accelo/src/main/java/com/bytechef/component/accelo/util/AcceloUtils.java index f273b044c1f..e46e7477727 100644 --- a/server/libs/modules/components/accelo/src/main/java/com/bytechef/component/accelo/util/AcceloUtils.java +++ b/server/libs/modules/components/accelo/src/main/java/com/bytechef/component/accelo/util/AcceloUtils.java @@ -41,13 +41,14 @@ private AcceloUtils() { } public static List> getAgainstIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, ActionContext context) { String againstType = inputParameters.getRequiredString(AGAINST_TYPE); if (Objects.equals("company", againstType)) { - return getCompanyIdOptions(inputParameters, connectionParameters, dependencyPaths, searchText, context); + return getCompanyIdOptions(inputParameters, connectionParameters, lookupDependsOnPaths, searchText, + context); } else { Map body = context .http(http -> http.get(againstType + "s")) @@ -70,7 +71,7 @@ public static List> getAgainstIdOptions( } public static List> getCompanyIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { Map body = context diff --git a/server/libs/modules/components/ai/universal/universal-image/src/main/java/com/bytechef/component/ai/universal/image/util/AiImageUtils.java b/server/libs/modules/components/ai/universal/universal-image/src/main/java/com/bytechef/component/ai/universal/image/util/AiImageUtils.java index 99e1acc12bd..8534c07dda0 100644 --- a/server/libs/modules/components/ai/universal/universal-image/src/main/java/com/bytechef/component/ai/universal/image/util/AiImageUtils.java +++ b/server/libs/modules/components/ai/universal/universal-image/src/main/java/com/bytechef/component/ai/universal/image/util/AiImageUtils.java @@ -46,7 +46,7 @@ private AiImageUtils() { } public static List> getModelOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, ActionContext context) { Provider provider = Provider.valueOf(inputParameters.getRequiredString(PROVIDER)); diff --git a/server/libs/modules/components/ai/universal/universal-text/src/main/java/com/bytechef/component/ai/universal/text/util/AiTextUtils.java b/server/libs/modules/components/ai/universal/universal-text/src/main/java/com/bytechef/component/ai/universal/text/util/AiTextUtils.java index 0a31ec16f00..090c03f825c 100644 --- a/server/libs/modules/components/ai/universal/universal-text/src/main/java/com/bytechef/component/ai/universal/text/util/AiTextUtils.java +++ b/server/libs/modules/components/ai/universal/universal-text/src/main/java/com/bytechef/component/ai/universal/text/util/AiTextUtils.java @@ -68,7 +68,7 @@ private AiTextUtils() { } public static List> getModelOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, ActionContext context) { Provider provider = Provider.valueOf(inputParameters.getRequiredString(PROVIDER)); diff --git a/server/libs/modules/components/airtable/src/main/java/com/bytechef/component/airtable/util/AbstractAirtableUtils.java b/server/libs/modules/components/airtable/src/main/java/com/bytechef/component/airtable/util/AbstractAirtableUtils.java index 7783f44e9ed..dd1a2750bcc 100644 --- a/server/libs/modules/components/airtable/src/main/java/com/bytechef/component/airtable/util/AbstractAirtableUtils.java +++ b/server/libs/modules/components/airtable/src/main/java/com/bytechef/component/airtable/util/AbstractAirtableUtils.java @@ -31,7 +31,7 @@ public abstract class AbstractAirtableUtils { public static List> getBaseIdOptions( Parameters inputParameters, - Parameters connectionParameters, Map dependencyPaths, String searchText, + Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return List.of(); @@ -39,7 +39,7 @@ public static List> getBaseIdOptions( public static List> getTableIdOptions( Parameters inputParameters, - Parameters connectionParameters, Map dependencyPaths, String searchText, + Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return List.of(); diff --git a/server/libs/modules/components/airtable/src/main/java/com/bytechef/component/airtable/util/AirtableUtils.java b/server/libs/modules/components/airtable/src/main/java/com/bytechef/component/airtable/util/AirtableUtils.java index 541034cba32..1e639375e9d 100644 --- a/server/libs/modules/components/airtable/src/main/java/com/bytechef/component/airtable/util/AirtableUtils.java +++ b/server/libs/modules/components/airtable/src/main/java/com/bytechef/component/airtable/util/AirtableUtils.java @@ -54,7 +54,7 @@ private AirtableUtils() { private static final List SKIP_FIELDS = List.of("singleCollaborator", "multipleCollaborators"); public static List> getBaseIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { Map body = context diff --git a/server/libs/modules/components/aitable/src/main/java/com/bytechef/component/aitable/util/AITableUtils.java b/server/libs/modules/components/aitable/src/main/java/com/bytechef/component/aitable/util/AITableUtils.java index 708d0726a5e..33dd94c7b41 100644 --- a/server/libs/modules/components/aitable/src/main/java/com/bytechef/component/aitable/util/AITableUtils.java +++ b/server/libs/modules/components/aitable/src/main/java/com/bytechef/component/aitable/util/AITableUtils.java @@ -55,7 +55,7 @@ private AITableUtils() { } public static List> createPropertiesForRecord( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, ActionContext context) { List datasheetFields = createDatasheetFields(inputParameters, context); @@ -172,7 +172,7 @@ yield date(name) } public static List> getDatasheetIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, ActionContext context) { String spaceId = inputParameters.getRequiredString(SPACE_ID); diff --git a/server/libs/modules/components/apollo/src/main/java/com/bytechef/component/apollo/util/AbstractApolloUtils.java b/server/libs/modules/components/apollo/src/main/java/com/bytechef/component/apollo/util/AbstractApolloUtils.java index aa27c110896..723d1aa9b56 100644 --- a/server/libs/modules/components/apollo/src/main/java/com/bytechef/component/apollo/util/AbstractApolloUtils.java +++ b/server/libs/modules/components/apollo/src/main/java/com/bytechef/component/apollo/util/AbstractApolloUtils.java @@ -30,7 +30,7 @@ public abstract class AbstractApolloUtils { public static List> getAccountIdOptions( Parameters inputParameters, - Parameters connectionParameters, Map dependencyPaths, String searchText, + Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return List.of(); @@ -38,7 +38,7 @@ public static List> getAccountIdOptions( public static List> getOwnerIdOptions( Parameters inputParameters, - Parameters connectionParameters, Map dependencyPaths, String searchText, + Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return List.of(); @@ -46,7 +46,7 @@ public static List> getOwnerIdOptions( public static List> getOpportunityIdOptions( Parameters inputParameters, - Parameters connectionParameters, Map dependencyPaths, String searchText, + Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return List.of(); diff --git a/server/libs/modules/components/apollo/src/main/java/com/bytechef/component/apollo/util/ApolloUtils.java b/server/libs/modules/components/apollo/src/main/java/com/bytechef/component/apollo/util/ApolloUtils.java index e1c208bfd6b..fdb83c023ac 100644 --- a/server/libs/modules/components/apollo/src/main/java/com/bytechef/component/apollo/util/ApolloUtils.java +++ b/server/libs/modules/components/apollo/src/main/java/com/bytechef/component/apollo/util/ApolloUtils.java @@ -36,21 +36,21 @@ private ApolloUtils() { } public static List> getAccountIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return getOptions("/mixed_companies/search", "organizations", context); } public static List> getOwnerIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return getOptions("/users/search", "users", context); } public static List> getOpportunityIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return getOptions("/opportunities/search", "opportunities", context); diff --git a/server/libs/modules/components/asana/src/main/java/com/bytechef/component/asana/util/AbstractAsanaUtils.java b/server/libs/modules/components/asana/src/main/java/com/bytechef/component/asana/util/AbstractAsanaUtils.java index a76b60aa03d..56e382d3a6a 100644 --- a/server/libs/modules/components/asana/src/main/java/com/bytechef/component/asana/util/AbstractAsanaUtils.java +++ b/server/libs/modules/components/asana/src/main/java/com/bytechef/component/asana/util/AbstractAsanaUtils.java @@ -30,7 +30,7 @@ public abstract class AbstractAsanaUtils { public static List> getProjectOptions( Parameters inputParameters, - Parameters connectionParameters, Map dependencyPaths, String searchText, + Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return List.of(); @@ -38,7 +38,7 @@ public static List> getProjectOptions( public static List> getAssigneeOptions( Parameters inputParameters, - Parameters connectionParameters, Map dependencyPaths, String searchText, + Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return List.of(); @@ -46,7 +46,7 @@ public static List> getAssigneeOptions( public static List> getTeamOptions( Parameters inputParameters, - Parameters connectionParameters, Map dependencyPaths, String searchText, + Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return List.of(); @@ -54,7 +54,7 @@ public static List> getTeamOptions( public static List> getTagsOptions( Parameters inputParameters, - Parameters connectionParameters, Map dependencyPaths, String searchText, + Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return List.of(); @@ -62,7 +62,7 @@ public static List> getTagsOptions( public static List> getWorkspaceOptions( Parameters inputParameters, - Parameters connectionParameters, Map dependencyPaths, String searchText, + Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return List.of(); diff --git a/server/libs/modules/components/asana/src/main/java/com/bytechef/component/asana/util/AsanaUtils.java b/server/libs/modules/components/asana/src/main/java/com/bytechef/component/asana/util/AsanaUtils.java index bc4c7f468b8..da3c6d56817 100644 --- a/server/libs/modules/components/asana/src/main/java/com/bytechef/component/asana/util/AsanaUtils.java +++ b/server/libs/modules/components/asana/src/main/java/com/bytechef/component/asana/util/AsanaUtils.java @@ -37,7 +37,7 @@ private AsanaUtils() { } public static List> getAssigneeOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { Map>> body = context @@ -50,7 +50,7 @@ public static List> getAssigneeOptions( } public static List> getProjectOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { Map>> body = context @@ -63,7 +63,7 @@ public static List> getProjectOptions( } public static List> getTagsOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { Map>> body = context.http(http -> http.get("/tags")) @@ -75,7 +75,7 @@ public static List> getTagsOptions( } public static List> getTeamOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { Map>> body = context @@ -90,7 +90,7 @@ public static List> getTeamOptions( } public static List> getWorkspaceOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { Map>> body = context.http(http -> http.get("/workspaces")) diff --git a/server/libs/modules/components/baserow/src/main/java/com/bytechef/component/baserow/util/BaserowPropertiesUtils.java b/server/libs/modules/components/baserow/src/main/java/com/bytechef/component/baserow/util/BaserowPropertiesUtils.java index 372f005e070..dac3824b95c 100644 --- a/server/libs/modules/components/baserow/src/main/java/com/bytechef/component/baserow/util/BaserowPropertiesUtils.java +++ b/server/libs/modules/components/baserow/src/main/java/com/bytechef/component/baserow/util/BaserowPropertiesUtils.java @@ -50,7 +50,7 @@ private BaserowPropertiesUtils() { } public static List> createPropertiesForRow( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, ActionContext context) { List> tableFields = diff --git a/server/libs/modules/components/box/src/main/java/com/bytechef/component/box/util/BoxUtils.java b/server/libs/modules/components/box/src/main/java/com/bytechef/component/box/util/BoxUtils.java index 5e99ce9eb9d..719f93788fb 100644 --- a/server/libs/modules/components/box/src/main/java/com/bytechef/component/box/util/BoxUtils.java +++ b/server/libs/modules/components/box/src/main/java/com/bytechef/component/box/util/BoxUtils.java @@ -44,7 +44,7 @@ private BoxUtils() { } public static List> getFileIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, ActionContext context) { String parentFolder = inputParameters.getRequiredString(ID); @@ -59,7 +59,7 @@ public static List> getFileIdOptions( } public static List> getRootFolderOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { Map body = context.http(http -> http.get("/folders/0/items")) diff --git a/server/libs/modules/components/brevo/src/main/java/com/bytechef/component/brevo/util/BrevoUtils.java b/server/libs/modules/components/brevo/src/main/java/com/bytechef/component/brevo/util/BrevoUtils.java index d9ec01643b0..1c178ef5c9a 100644 --- a/server/libs/modules/components/brevo/src/main/java/com/bytechef/component/brevo/util/BrevoUtils.java +++ b/server/libs/modules/components/brevo/src/main/java/com/bytechef/component/brevo/util/BrevoUtils.java @@ -38,7 +38,7 @@ private BrevoUtils() { } public static List> getContactsOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { Map body = context @@ -63,7 +63,7 @@ public static List> getContactsOptions( } public static List> getSendersOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { Map>> body = context diff --git a/server/libs/modules/components/clickup/src/main/java/com/bytechef/component/clickup/util/AbstractClickupUtils.java b/server/libs/modules/components/clickup/src/main/java/com/bytechef/component/clickup/util/AbstractClickupUtils.java index 16ed1d8376c..d163af737ee 100644 --- a/server/libs/modules/components/clickup/src/main/java/com/bytechef/component/clickup/util/AbstractClickupUtils.java +++ b/server/libs/modules/components/clickup/src/main/java/com/bytechef/component/clickup/util/AbstractClickupUtils.java @@ -30,7 +30,7 @@ public abstract class AbstractClickupUtils { public static List> getListIdOptions( Parameters inputParameters, - Parameters connectionParameters, Map dependencyPaths, String searchText, + Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return List.of(); @@ -38,7 +38,7 @@ public static List> getListIdOptions( public static List> getSpaceIdOptions( Parameters inputParameters, - Parameters connectionParameters, Map dependencyPaths, String searchText, + Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return List.of(); @@ -46,7 +46,7 @@ public static List> getSpaceIdOptions( public static List> getFolderIdOptions( Parameters inputParameters, - Parameters connectionParameters, Map dependencyPaths, String searchText, + Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return List.of(); diff --git a/server/libs/modules/components/clickup/src/main/java/com/bytechef/component/clickup/util/ClickupUtils.java b/server/libs/modules/components/clickup/src/main/java/com/bytechef/component/clickup/util/ClickupUtils.java index ea04d592a40..31aa6df0198 100644 --- a/server/libs/modules/components/clickup/src/main/java/com/bytechef/component/clickup/util/ClickupUtils.java +++ b/server/libs/modules/components/clickup/src/main/java/com/bytechef/component/clickup/util/ClickupUtils.java @@ -43,7 +43,7 @@ private ClickupUtils() { } public static List> getListIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { List> options = new ArrayList<>(); @@ -67,7 +67,7 @@ private static List> getFolderlessLists(Context context, String s } public static List> getFolderIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return getOptions( @@ -76,7 +76,7 @@ public static List> getFolderIdOptions( } public static List> getSpaceIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return getOptions( @@ -85,7 +85,7 @@ public static List> getSpaceIdOptions( } public static List> getWorkspaceIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return getOptions(fetchDataFromHttpEndpoint("/team", context), "teams"); diff --git a/server/libs/modules/components/copper/src/main/java/com/bytechef/component/copper/util/CopperOptionUtils.java b/server/libs/modules/components/copper/src/main/java/com/bytechef/component/copper/util/CopperOptionUtils.java index 70066552e22..6cf9965657e 100644 --- a/server/libs/modules/components/copper/src/main/java/com/bytechef/component/copper/util/CopperOptionUtils.java +++ b/server/libs/modules/components/copper/src/main/java/com/bytechef/component/copper/util/CopperOptionUtils.java @@ -54,7 +54,7 @@ private static List> createOptions(List> valu @SuppressWarnings("unchecked") public static List> getActivityTypeOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, ActionContext context) { Map>> body = null; @@ -84,7 +84,7 @@ public static List> getActivityTypeOptions( } public static List> getCompanyIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, ActionContext context) { List> body = context.http(http -> http.post("/companies/search")) @@ -96,7 +96,7 @@ public static List> getCompanyIdOptions( } public static List> getContactTypesOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, ActionContext context) { List> body = context.http(http -> http.get("/contact_types")) @@ -109,7 +109,7 @@ public static List> getContactTypesOptions( @SuppressWarnings("unchecked") public static List> getParentOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, ActionContext context) { String parentType = inputParameters.getRequiredString(TYPE); @@ -140,7 +140,7 @@ public static List> getParentOptions( } public static List> getTagsOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, ActionContext context) { List> body = context.http(http -> http.get("/tags")) @@ -160,7 +160,7 @@ public static List> getTagsOptions( } public static List> getUserOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, ActionContext context) { List> body = context.http(http -> http.post("/users/search")) diff --git a/server/libs/modules/components/discord/src/main/java/com/bytechef/component/discord/util/AbstractDiscordUtils.java b/server/libs/modules/components/discord/src/main/java/com/bytechef/component/discord/util/AbstractDiscordUtils.java index e823d59a85b..dee889b1890 100644 --- a/server/libs/modules/components/discord/src/main/java/com/bytechef/component/discord/util/AbstractDiscordUtils.java +++ b/server/libs/modules/components/discord/src/main/java/com/bytechef/component/discord/util/AbstractDiscordUtils.java @@ -30,7 +30,7 @@ public abstract class AbstractDiscordUtils { public static List> getGuildIdOptions( Parameters inputParameters, - Parameters connectionParameters, Map dependencyPaths, String searchText, + Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return List.of(); @@ -38,7 +38,7 @@ public static List> getGuildIdOptions( public static List> getChannelIdOptions( Parameters inputParameters, - Parameters connectionParameters, Map dependencyPaths, String searchText, + Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return List.of(); diff --git a/server/libs/modules/components/discord/src/main/java/com/bytechef/component/discord/util/DiscordUtils.java b/server/libs/modules/components/discord/src/main/java/com/bytechef/component/discord/util/DiscordUtils.java index 7ad3148f9de..061fec3b0df 100644 --- a/server/libs/modules/components/discord/src/main/java/com/bytechef/component/discord/util/DiscordUtils.java +++ b/server/libs/modules/components/discord/src/main/java/com/bytechef/component/discord/util/DiscordUtils.java @@ -39,7 +39,7 @@ private DiscordUtils() { } public static List> getChannelIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { List> body = context.http(http -> http @@ -60,7 +60,7 @@ public static Map getDMChannel(Parameters inputParameters, Actio } public static List> getGuildIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { List> body = context.http(http -> http.get("/users/@me/guilds")) @@ -72,7 +72,7 @@ public static List> getGuildIdOptions( } public static List> getGuildMemberIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, ActionContext context) { List> body = context.http(http -> http diff --git a/server/libs/modules/components/encharge/src/main/java/com/bytechef/component/encharge/util/EnchargeUtils.java b/server/libs/modules/components/encharge/src/main/java/com/bytechef/component/encharge/util/EnchargeUtils.java index c764422e058..a4c9e481e46 100644 --- a/server/libs/modules/components/encharge/src/main/java/com/bytechef/component/encharge/util/EnchargeUtils.java +++ b/server/libs/modules/components/encharge/src/main/java/com/bytechef/component/encharge/util/EnchargeUtils.java @@ -41,7 +41,7 @@ private EnchargeUtils() { http -> http.get("/people/all"); public static List> getUserEmailOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, ActionContext context) { Map body = context.http(GET_PEOPLE_CONTEXT_FUNCTION) diff --git a/server/libs/modules/components/gitlab/src/main/java/com/bytechef/component/gitlab/util/AbstractGitlabUtils.java b/server/libs/modules/components/gitlab/src/main/java/com/bytechef/component/gitlab/util/AbstractGitlabUtils.java index 2f643df52f1..6e75e0fbdbc 100644 --- a/server/libs/modules/components/gitlab/src/main/java/com/bytechef/component/gitlab/util/AbstractGitlabUtils.java +++ b/server/libs/modules/components/gitlab/src/main/java/com/bytechef/component/gitlab/util/AbstractGitlabUtils.java @@ -30,7 +30,7 @@ public abstract class AbstractGitlabUtils { public static List> getProjectIdOptions( Parameters inputParameters, - Parameters connectionParameters, Map dependencyPaths, String searchText, + Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return List.of(); @@ -38,7 +38,7 @@ public static List> getProjectIdOptions( public static List> getIssueIdOptions( Parameters inputParameters, - Parameters connectionParameters, Map dependencyPaths, String searchText, + Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return List.of(); diff --git a/server/libs/modules/components/google/google-calendar/src/main/java/com/bytechef/component/google/calendar/util/GoogleCalendarUtils.java b/server/libs/modules/components/google/google-calendar/src/main/java/com/bytechef/component/google/calendar/util/GoogleCalendarUtils.java index b7c9bd85681..cda7718f18d 100644 --- a/server/libs/modules/components/google/google-calendar/src/main/java/com/bytechef/component/google/calendar/util/GoogleCalendarUtils.java +++ b/server/libs/modules/components/google/google-calendar/src/main/java/com/bytechef/component/google/calendar/util/GoogleCalendarUtils.java @@ -104,7 +104,7 @@ public static CustomEvent createCustomEvent(Event event) { } public static List> getCalendarIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) throws IOException { List calendarListEntries = GoogleServices.getCalendar(connectionParameters) @@ -220,7 +220,7 @@ public static Event getEvent(Parameters inputParameters, Parameters connectionPa } public static List> getEventIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) throws IOException { Calendar calendar = GoogleServices.getCalendar(connectionParameters); diff --git a/server/libs/modules/components/google/google-forms/src/main/java/com/bytechef/component/google/forms/util/GoogleFormsUtils.java b/server/libs/modules/components/google/google-forms/src/main/java/com/bytechef/component/google/forms/util/GoogleFormsUtils.java index bd7665c2fe1..46ce2c51369 100644 --- a/server/libs/modules/components/google/google-forms/src/main/java/com/bytechef/component/google/forms/util/GoogleFormsUtils.java +++ b/server/libs/modules/components/google/google-forms/src/main/java/com/bytechef/component/google/forms/util/GoogleFormsUtils.java @@ -88,7 +88,7 @@ public static Map getForm(String formId, Context context) { } public static List> getResponseIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { List> formResponses = new ArrayList<>(); diff --git a/server/libs/modules/components/google/google-mail/src/main/java/com/bytechef/component/google/mail/util/GoogleMailUtils.java b/server/libs/modules/components/google/google-mail/src/main/java/com/bytechef/component/google/mail/util/GoogleMailUtils.java index 93fc023ef4b..125cfc7df9e 100644 --- a/server/libs/modules/components/google/google-mail/src/main/java/com/bytechef/component/google/mail/util/GoogleMailUtils.java +++ b/server/libs/modules/components/google/google-mail/src/main/java/com/bytechef/component/google/mail/util/GoogleMailUtils.java @@ -287,7 +287,7 @@ private static MimeMessage getMimeMessage(Parameters inputParameters, Message me } public static List> getLabelOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, ActionContext context) throws IOException { @@ -319,7 +319,7 @@ public static Message getMessage(Parameters inputParameters, Gmail service) thro } public static List> getMessageIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, ActionContext context) throws IOException { @@ -477,7 +477,7 @@ private static MessagePartBody getAttachment(Gmail service, String messageId, St } public static List> getThreadIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, ActionContext context) throws IOException { List threads = GoogleServices.getMail(connectionParameters) diff --git a/server/libs/modules/components/google/google-sheets/src/main/java/com/bytechef/component/google/sheets/util/GoogleSheetsUtils.java b/server/libs/modules/components/google/google-sheets/src/main/java/com/bytechef/component/google/sheets/util/GoogleSheetsUtils.java index f8a3b3902af..74361cb139f 100644 --- a/server/libs/modules/components/google/google-sheets/src/main/java/com/bytechef/component/google/sheets/util/GoogleSheetsUtils.java +++ b/server/libs/modules/components/google/google-sheets/src/main/java/com/bytechef/component/google/sheets/util/GoogleSheetsUtils.java @@ -89,7 +89,7 @@ public static String createRange(String sheetName, Integer rowNumber) { } public static List> createPropertiesToUpdateRow( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, ActionContext actionContext) throws Exception { boolean isFirstRowHeader = inputParameters.getRequiredBoolean(IS_THE_FIRST_ROW_HEADER); @@ -169,7 +169,7 @@ public static List> createPropertiesToUpdateRow( } public static ActionPropertiesFunction createPropertiesForNewRows(boolean insertOneRow) { - return (inputParameters, connectionParameters, dependencyPaths, context) -> { + return (inputParameters, connectionParameters, lookupDependsOnPaths, context) -> { boolean isFirstRowHeader = inputParameters.getRequiredBoolean(IS_THE_FIRST_ROW_HEADER); @@ -303,7 +303,7 @@ public static List getRowValues(Parameters inputParameters) { } public static List> getSheetIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, ActionContext context) throws Exception { List> options = new ArrayList<>(); @@ -324,7 +324,7 @@ public static List> getSheetIdOptions( } public static List> getSheetNameOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) throws Exception { List> options = new ArrayList<>(); diff --git a/server/libs/modules/components/google/google-tasks/src/main/java/com/bytechef/component/google/tasks/util/GoogleTasksUtils.java b/server/libs/modules/components/google/google-tasks/src/main/java/com/bytechef/component/google/tasks/util/GoogleTasksUtils.java index 6a6ef7cedab..54e135ba226 100644 --- a/server/libs/modules/components/google/google-tasks/src/main/java/com/bytechef/component/google/tasks/util/GoogleTasksUtils.java +++ b/server/libs/modules/components/google/google-tasks/src/main/java/com/bytechef/component/google/tasks/util/GoogleTasksUtils.java @@ -37,7 +37,7 @@ private GoogleTasksUtils() { } public static List> getListsIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, ActionContext actionContext) { Map response = actionContext @@ -50,7 +50,7 @@ public static List> getListsIdOptions( } public static List> getTasksIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, ActionContext actionContext) { Map response = actionContext diff --git a/server/libs/modules/components/hubspot/src/main/java/com/bytechef/component/hubspot/util/AbstractHubspotUtils.java b/server/libs/modules/components/hubspot/src/main/java/com/bytechef/component/hubspot/util/AbstractHubspotUtils.java index 29b023ec1d4..f945464717d 100644 --- a/server/libs/modules/components/hubspot/src/main/java/com/bytechef/component/hubspot/util/AbstractHubspotUtils.java +++ b/server/libs/modules/components/hubspot/src/main/java/com/bytechef/component/hubspot/util/AbstractHubspotUtils.java @@ -30,7 +30,7 @@ public abstract class AbstractHubspotUtils { public static List> getTicketIdOptions( Parameters inputParameters, - Parameters connectionParameters, Map dependencyPaths, String searchText, + Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return List.of(); @@ -38,7 +38,7 @@ public static List> getTicketIdOptions( public static List> getDealstageOptions( Parameters inputParameters, - Parameters connectionParameters, Map dependencyPaths, String searchText, + Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return List.of(); @@ -46,7 +46,7 @@ public static List> getDealstageOptions( public static List> getHubspotOwnerIdOptions( Parameters inputParameters, - Parameters connectionParameters, Map dependencyPaths, String searchText, + Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return List.of(); @@ -54,7 +54,7 @@ public static List> getHubspotOwnerIdOptions( public static List> getContactIdOptions( Parameters inputParameters, - Parameters connectionParameters, Map dependencyPaths, String searchText, + Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return List.of(); @@ -62,7 +62,7 @@ public static List> getContactIdOptions( public static List> getPipelineOptions( Parameters inputParameters, - Parameters connectionParameters, Map dependencyPaths, String searchText, + Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return List.of(); diff --git a/server/libs/modules/components/hubspot/src/main/java/com/bytechef/component/hubspot/util/HubspotUtils.java b/server/libs/modules/components/hubspot/src/main/java/com/bytechef/component/hubspot/util/HubspotUtils.java index fb0a18f6b53..0fa62e7abb4 100644 --- a/server/libs/modules/components/hubspot/src/main/java/com/bytechef/component/hubspot/util/HubspotUtils.java +++ b/server/libs/modules/components/hubspot/src/main/java/com/bytechef/component/hubspot/util/HubspotUtils.java @@ -49,7 +49,7 @@ public static Map extractFirstContentMap(TriggerDefinition.Webho } public static List> getContactIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { Map response = context @@ -76,7 +76,7 @@ public static List> getContactIdOptions( } public static List> getDealstageOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { Map itemMap = inputParameters.getMap("__item"); @@ -97,7 +97,7 @@ public static List> getDealstageOptions( } public static List> getHubspotOwnerIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { Map body = @@ -111,7 +111,7 @@ public static List> getHubspotOwnerIdOptions( } public static List> getPipelineOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { Map body = diff --git a/server/libs/modules/components/hunter/src/main/java/com/bytechef/component/hunter/util/AbstractHunterUtils.java b/server/libs/modules/components/hunter/src/main/java/com/bytechef/component/hunter/util/AbstractHunterUtils.java index 2c696f5f2cf..98db16ee7e4 100644 --- a/server/libs/modules/components/hunter/src/main/java/com/bytechef/component/hunter/util/AbstractHunterUtils.java +++ b/server/libs/modules/components/hunter/src/main/java/com/bytechef/component/hunter/util/AbstractHunterUtils.java @@ -30,7 +30,7 @@ public abstract class AbstractHunterUtils { public static List> getLeadListIdOptions( Parameters inputParameters, - Parameters connectionParameters, Map dependencyPaths, String searchText, + Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return List.of(); diff --git a/server/libs/modules/components/hunter/src/main/java/com/bytechef/component/hunter/util/HunterUtils.java b/server/libs/modules/components/hunter/src/main/java/com/bytechef/component/hunter/util/HunterUtils.java index ef37e84c101..679e5f1b741 100644 --- a/server/libs/modules/components/hunter/src/main/java/com/bytechef/component/hunter/util/HunterUtils.java +++ b/server/libs/modules/components/hunter/src/main/java/com/bytechef/component/hunter/util/HunterUtils.java @@ -36,7 +36,7 @@ private HunterUtils() { } public static List> getLeadListIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { Map> body = context diff --git a/server/libs/modules/components/intercom/src/main/java/com/bytechef/component/intercom/util/IntercomUtils.java b/server/libs/modules/components/intercom/src/main/java/com/bytechef/component/intercom/util/IntercomUtils.java index e57a8a86515..059861cb567 100644 --- a/server/libs/modules/components/intercom/src/main/java/com/bytechef/component/intercom/util/IntercomUtils.java +++ b/server/libs/modules/components/intercom/src/main/java/com/bytechef/component/intercom/util/IntercomUtils.java @@ -69,7 +69,7 @@ public static Map getAdminId(Context context) { } public static List> getContactIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, ActionContext context) { Map body = context.http(GET_CONTACTS_CONTEXT_FUNCTION) diff --git a/server/libs/modules/components/jira/src/main/java/com/bytechef/component/jira/util/JiraOptionsUtils.java b/server/libs/modules/components/jira/src/main/java/com/bytechef/component/jira/util/JiraOptionsUtils.java index d65b85c69f9..4bf34dca577 100644 --- a/server/libs/modules/components/jira/src/main/java/com/bytechef/component/jira/util/JiraOptionsUtils.java +++ b/server/libs/modules/components/jira/src/main/java/com/bytechef/component/jira/util/JiraOptionsUtils.java @@ -46,7 +46,7 @@ private JiraOptionsUtils() { } public static List> getIssueIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, ActionContext context) { String encode = URLEncoder.encode( @@ -72,7 +72,7 @@ public static List> getIssueIdOptions( } public static List> getIssueTypesIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { List body = context @@ -86,7 +86,7 @@ public static List> getIssueTypesIdOptions( } public static List> getPriorityIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, ActionContext context) { List body = context @@ -99,7 +99,7 @@ public static List> getPriorityIdOptions( } public static List> getProjectIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { Map body = context @@ -122,7 +122,7 @@ public static List> getProjectIdOptions( } public static List> getUserIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, ActionContext context) { List body = context diff --git a/server/libs/modules/components/jotform/src/main/java/com/bytechef/component/jotform/util/AbstractJotformUtils.java b/server/libs/modules/components/jotform/src/main/java/com/bytechef/component/jotform/util/AbstractJotformUtils.java index 85b608de9da..94f0fea01de 100644 --- a/server/libs/modules/components/jotform/src/main/java/com/bytechef/component/jotform/util/AbstractJotformUtils.java +++ b/server/libs/modules/components/jotform/src/main/java/com/bytechef/component/jotform/util/AbstractJotformUtils.java @@ -30,7 +30,7 @@ public abstract class AbstractJotformUtils { public static List> getFormIdOptions( Parameters inputParameters, - Parameters connectionParameters, Map dependencyPaths, String searchText, + Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return List.of(); diff --git a/server/libs/modules/components/jotform/src/main/java/com/bytechef/component/jotform/util/JotformUtils.java b/server/libs/modules/components/jotform/src/main/java/com/bytechef/component/jotform/util/JotformUtils.java index a549324cf9f..7d9872f8030 100644 --- a/server/libs/modules/components/jotform/src/main/java/com/bytechef/component/jotform/util/JotformUtils.java +++ b/server/libs/modules/components/jotform/src/main/java/com/bytechef/component/jotform/util/JotformUtils.java @@ -36,7 +36,7 @@ private JotformUtils() { } public static List> getFormIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { Map body = context.http(http -> http.get("/user/forms")) diff --git a/server/libs/modules/components/keap/src/main/java/com/bytechef/component/keap/util/KeapUtils.java b/server/libs/modules/components/keap/src/main/java/com/bytechef/component/keap/util/KeapUtils.java index f8d8cb9fc65..1f57dbed53f 100644 --- a/server/libs/modules/components/keap/src/main/java/com/bytechef/component/keap/util/KeapUtils.java +++ b/server/libs/modules/components/keap/src/main/java/com/bytechef/component/keap/util/KeapUtils.java @@ -36,7 +36,7 @@ private KeapUtils() { } public static List> getCompanyIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, ActionContext context) { Map body = context diff --git a/server/libs/modules/components/mailerlite/build.gradle.kts b/server/libs/modules/components/mailerlite/build.gradle.kts new file mode 100644 index 00000000000..bf2a7f56ed1 --- /dev/null +++ b/server/libs/modules/components/mailerlite/build.gradle.kts @@ -0,0 +1,2 @@ +version="1.0" + diff --git a/server/libs/modules/components/mailerlite/src/main/java/com/bytechef/component/mailerlite/MailerLiteComponentHandler.java b/server/libs/modules/components/mailerlite/src/main/java/com/bytechef/component/mailerlite/MailerLiteComponentHandler.java new file mode 100644 index 00000000000..0ce74170a4e --- /dev/null +++ b/server/libs/modules/components/mailerlite/src/main/java/com/bytechef/component/mailerlite/MailerLiteComponentHandler.java @@ -0,0 +1,60 @@ +/* + * 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.mailerlite; + +import static com.bytechef.component.definition.ComponentDsl.component; + +import com.bytechef.component.ComponentHandler; +import com.bytechef.component.definition.ComponentCategory; +import com.bytechef.component.definition.ComponentDefinition; +import com.bytechef.component.mailerlite.action.MailerLiteAddSubscriberToGroupAction; +import com.bytechef.component.mailerlite.action.MailerLiteCreateOrUpdateSubscriberAction; +import com.bytechef.component.mailerlite.action.MailerLiteRemoveSubscriberFromGroupAction; +import com.bytechef.component.mailerlite.connection.MailerLiteConnection; +import com.bytechef.component.mailerlite.trigger.MailerLiteSubscriberAddedToGroupTrigger; +import com.bytechef.component.mailerlite.trigger.MailerLiteSubscriberCreatedTrigger; +import com.bytechef.component.mailerlite.trigger.MailerLiteSubscriberUnsubscribedTrigger; +import com.google.auto.service.AutoService; + +/** + * @author Nikolina Spehar + */ +@AutoService(ComponentHandler.class) +public class MailerLiteComponentHandler implements ComponentHandler { + + private static final ComponentDefinition COMPONENT_DEFINITION = component("mailerLite") + .title("MailerLite") + .description( + "MailerLite is an intuitive email marketing platform that offers automation, landing pages, and " + + "subscriber management for businesses and creators.") + .icon("path:assets/mailerlite.svg") + .categories(ComponentCategory.MARKETING_AUTOMATION) + .connection(MailerLiteConnection.CONNECTION_DEFINITION) + .actions( + MailerLiteAddSubscriberToGroupAction.ACTION_DEFINITION, + MailerLiteCreateOrUpdateSubscriberAction.ACTION_DEFINITION, + MailerLiteRemoveSubscriberFromGroupAction.ACTION_DEFINITION) + .triggers( + MailerLiteSubscriberAddedToGroupTrigger.TRIGGER_DEFINITION, + MailerLiteSubscriberCreatedTrigger.TRIGGER_DEFINITION, + MailerLiteSubscriberUnsubscribedTrigger.TRIGGER_DEFINITION); + + @Override + public ComponentDefinition getDefinition() { + return COMPONENT_DEFINITION; + } +} diff --git a/server/libs/modules/components/mailerlite/src/main/java/com/bytechef/component/mailerlite/action/MailerLiteAddSubscriberToGroupAction.java b/server/libs/modules/components/mailerlite/src/main/java/com/bytechef/component/mailerlite/action/MailerLiteAddSubscriberToGroupAction.java new file mode 100644 index 00000000000..730760d07fb --- /dev/null +++ b/server/libs/modules/components/mailerlite/src/main/java/com/bytechef/component/mailerlite/action/MailerLiteAddSubscriberToGroupAction.java @@ -0,0 +1,107 @@ +/* + * 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.mailerlite.action; + +import static com.bytechef.component.definition.ComponentDsl.action; +import static com.bytechef.component.definition.ComponentDsl.integer; +import static com.bytechef.component.definition.ComponentDsl.number; +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.Context.Http.responseType; +import static com.bytechef.component.mailerlite.constant.MailerLiteConstants.DATA; +import static com.bytechef.component.mailerlite.constant.MailerLiteConstants.GROUP_ID; +import static com.bytechef.component.mailerlite.constant.MailerLiteConstants.ID; +import static com.bytechef.component.mailerlite.constant.MailerLiteConstants.NAME; +import static com.bytechef.component.mailerlite.constant.MailerLiteConstants.SUBSCRIBER_ID; + +import com.bytechef.component.definition.ComponentDsl.ModifiableActionDefinition; +import com.bytechef.component.definition.Context; +import com.bytechef.component.definition.Context.Http.ResponseType; +import com.bytechef.component.definition.OptionsDataSource.ActionOptionsFunction; +import com.bytechef.component.definition.Parameters; +import com.bytechef.component.definition.TypeReference; +import com.bytechef.component.mailerlite.util.MailerLiteUtils; + +/** + * @author Nikolina Spehar + */ +public class MailerLiteAddSubscriberToGroupAction { + + public static final ModifiableActionDefinition ACTION_DEFINITION = action("addSubscriberToGroup") + .title("Add Subscriber to Group") + .description("Adding a subscriber to a selected group.") + .properties( + string(SUBSCRIBER_ID) + .label("Subscriber Email") + .description("ID of the user that will be added to the selected group.") + .options((ActionOptionsFunction) MailerLiteUtils::getSubscriberIdOptions) + .required(true), + string(GROUP_ID) + .label("Group ID") + .description("ID of the group to which the user will be added.") + .options((ActionOptionsFunction) MailerLiteUtils::getGroupIdOptions) + .required(true)) + .output( + outputSchema( + object() + .properties( + object(DATA) + .properties( + string(ID) + .description("ID of the group to which the user was added."), + string(NAME) + .description("The name of the group to which the user was added."), + integer("active_count") + .description("Number of active subscribers in the group."), + integer("sent_count") + .description("Number of sent email messages in the group."), + integer("opens_count") + .description("Number of opened email messages in the group."), + object("open_rate") + .properties( + number("float"), + string("string")), + integer("clicks_count"), + object("click_rate") + .properties( + number("float"), + string("string")), + integer("unsubscribed_count") + .description("Number of subscribers that unsubscribed from the group."), + integer("unconfirmed_count") + .description("Number of unconfirmed subscribers in the group."), + integer("bounced_count") + .description("Number of subscribers that were bounced from the group."), + integer("junk_count") + .description("Number of email messages that were sent to junk."), + string("created_at") + .description("The date and time the group was created."))))) + .perform(MailerLiteAddSubscriberToGroupAction::perform); + + private MailerLiteAddSubscriberToGroupAction() { + } + + public static Object perform(Parameters inputParameters, Parameters connectionParameters, Context context) { + return context.http(http -> http.post( + "/subscribers/" + inputParameters.getRequiredString(SUBSCRIBER_ID) + "/groups/" + + inputParameters.getRequiredString(GROUP_ID))) + .configuration(responseType(ResponseType.JSON)) + .execute() + .getBody(new TypeReference<>() {}); + } +} diff --git a/server/libs/modules/components/mailerlite/src/main/java/com/bytechef/component/mailerlite/action/MailerLiteCreateOrUpdateSubscriberAction.java b/server/libs/modules/components/mailerlite/src/main/java/com/bytechef/component/mailerlite/action/MailerLiteCreateOrUpdateSubscriberAction.java new file mode 100644 index 00000000000..dac4609dac4 --- /dev/null +++ b/server/libs/modules/components/mailerlite/src/main/java/com/bytechef/component/mailerlite/action/MailerLiteCreateOrUpdateSubscriberAction.java @@ -0,0 +1,100 @@ +/* + * 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.mailerlite.action; + +import static com.bytechef.component.definition.ComponentDsl.action; +import static com.bytechef.component.definition.ComponentDsl.array; +import static com.bytechef.component.definition.ComponentDsl.integer; +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.Context.Http.responseType; +import static com.bytechef.component.mailerlite.constant.MailerLiteConstants.DATA; +import static com.bytechef.component.mailerlite.constant.MailerLiteConstants.EMAIL; +import static com.bytechef.component.mailerlite.constant.MailerLiteConstants.GROUPS; +import static com.bytechef.component.mailerlite.constant.MailerLiteConstants.GROUP_ID; +import static com.bytechef.component.mailerlite.constant.MailerLiteConstants.ID; + +import com.bytechef.component.definition.ComponentDsl.ModifiableActionDefinition; +import com.bytechef.component.definition.Context; +import com.bytechef.component.definition.Context.Http.Body; +import com.bytechef.component.definition.Context.Http.ResponseType; +import com.bytechef.component.definition.OptionsDataSource.ActionOptionsFunction; +import com.bytechef.component.definition.Parameters; +import com.bytechef.component.definition.TypeReference; +import com.bytechef.component.mailerlite.util.MailerLiteUtils; +import java.util.List; +import java.util.Map; + +/** + * @author Nikolina Spehar + */ +public class MailerLiteCreateOrUpdateSubscriberAction { + + public static final ModifiableActionDefinition ACTION_DEFINITION = action("createOrUpdateSubscriber") + .title("Create or Update Subscriber") + .description("Create new user or update an existing user.") + .properties( + string(EMAIL) + .description("The email address of the subscriber.") + .required(true), + string(GROUP_ID) + .label("Group ID") + .description("ID of the group to which you want to add the subscriber to.") + .options((ActionOptionsFunction) MailerLiteUtils::getGroupIdOptions) + .required(false)) + .output( + outputSchema( + object() + .properties( + object(DATA) + .properties( + string(ID) + .description("ID of the user that was created or updated."), + string(EMAIL) + .description("The email address of the subscriber."), + string("status"), + string("source"), + integer("sent") + .description("The number of messages that were sent to the subscriber."), + integer("opens_count") + .description("Number of email messages the user has opened."), + integer("clicks_count"), + integer("open_rate"), + integer("click_rate"), + string("subscribed_at"), + string("created_at"), + string("updated_at"), + array("fields"), + array("groups"))))) + .perform(MailerLiteCreateOrUpdateSubscriberAction::perform); + + private MailerLiteCreateOrUpdateSubscriberAction() { + } + + public static Object perform(Parameters inputParameters, Parameters connectionParameters, Context context) { + return context.http(http -> http.post("/subscribers")) + .configuration(responseType(ResponseType.JSON)) + .body( + Body.of( + Map.of( + EMAIL, inputParameters.getRequiredString(EMAIL), + GROUPS, List.of(inputParameters.getRequiredString(GROUP_ID))))) + .execute() + .getBody(new TypeReference<>() {}); + } +} diff --git a/server/libs/modules/components/mailerlite/src/main/java/com/bytechef/component/mailerlite/action/MailerLiteRemoveSubscriberFromGroupAction.java b/server/libs/modules/components/mailerlite/src/main/java/com/bytechef/component/mailerlite/action/MailerLiteRemoveSubscriberFromGroupAction.java new file mode 100644 index 00000000000..d9f23b12a2b --- /dev/null +++ b/server/libs/modules/components/mailerlite/src/main/java/com/bytechef/component/mailerlite/action/MailerLiteRemoveSubscriberFromGroupAction.java @@ -0,0 +1,62 @@ +/* + * 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.mailerlite.action; + +import static com.bytechef.component.definition.ComponentDsl.action; +import static com.bytechef.component.definition.ComponentDsl.string; +import static com.bytechef.component.mailerlite.constant.MailerLiteConstants.GROUP_ID; +import static com.bytechef.component.mailerlite.constant.MailerLiteConstants.SUBSCRIBER_ID; + +import com.bytechef.component.definition.ComponentDsl.ModifiableActionDefinition; +import com.bytechef.component.definition.Context; +import com.bytechef.component.definition.OptionsDataSource.ActionOptionsFunction; +import com.bytechef.component.definition.Parameters; +import com.bytechef.component.mailerlite.util.MailerLiteUtils; + +/** + * @author Nikolina Spehar + */ +public class MailerLiteRemoveSubscriberFromGroupAction { + + public static final ModifiableActionDefinition ACTION_DEFINITION = action("removeSubscriberFromGroup") + .title("Remove Subscriber from Group") + .description("Remove selected subscriber from the group.") + .properties( + string(SUBSCRIBER_ID) + .label("Subscriber") + .description("ID of the user that will be added to the selected group.") + .options((ActionOptionsFunction) MailerLiteUtils::getSubscriberIdOptions) + .required(true), + string(GROUP_ID) + .label("Group ID") + .description("ID of the group to which the user will be added.") + .options((ActionOptionsFunction) MailerLiteUtils::getGroupIdOptions) + .required(true)) + .perform(MailerLiteRemoveSubscriberFromGroupAction::perform); + + private MailerLiteRemoveSubscriberFromGroupAction() { + } + + public static Object perform(Parameters inputParameters, Parameters connectionParameters, Context context) { + context.http(http -> http.delete( + "/subscribers/%s/groups/%s".formatted( + inputParameters.getRequiredString(SUBSCRIBER_ID), inputParameters.getRequiredString(GROUP_ID)))) + .execute(); + + return null; + } +} diff --git a/server/libs/modules/components/mailerlite/src/main/java/com/bytechef/component/mailerlite/connection/MailerLiteConnection.java b/server/libs/modules/components/mailerlite/src/main/java/com/bytechef/component/mailerlite/connection/MailerLiteConnection.java new file mode 100644 index 00000000000..742abf2ab30 --- /dev/null +++ b/server/libs/modules/components/mailerlite/src/main/java/com/bytechef/component/mailerlite/connection/MailerLiteConnection.java @@ -0,0 +1,44 @@ +/* + * 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.mailerlite.connection; + +import static com.bytechef.component.definition.Authorization.TOKEN; +import static com.bytechef.component.definition.ComponentDsl.authorization; +import static com.bytechef.component.definition.ComponentDsl.connection; +import static com.bytechef.component.definition.ComponentDsl.string; + +import com.bytechef.component.definition.Authorization.AuthorizationType; +import com.bytechef.component.definition.ComponentDsl.ModifiableConnectionDefinition; + +/** + * @author Nikolina Spehar + */ +public class MailerLiteConnection { + + public static final ModifiableConnectionDefinition CONNECTION_DEFINITION = connection() + .baseUri((connectionParameters, context) -> "https://connect.mailerlite.com/api") + .authorizations( + authorization(AuthorizationType.BEARER_TOKEN) + .properties( + string(TOKEN) + .label("API Token") + .description("API Token needed for authorization.") + .required(true))); + + private MailerLiteConnection() { + } +} diff --git a/server/libs/modules/components/mailerlite/src/main/java/com/bytechef/component/mailerlite/constant/MailerLiteConstants.java b/server/libs/modules/components/mailerlite/src/main/java/com/bytechef/component/mailerlite/constant/MailerLiteConstants.java new file mode 100644 index 00000000000..72e9a8299f0 --- /dev/null +++ b/server/libs/modules/components/mailerlite/src/main/java/com/bytechef/component/mailerlite/constant/MailerLiteConstants.java @@ -0,0 +1,38 @@ +/* + * 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.mailerlite.constant; + +/** + * @author Nikolina Spehar + */ +public class MailerLiteConstants { + + public static final String DATA = "data"; + public static final String EMAIL = "email"; + public static final String EVENTS = "events"; + public static final String GROUP = "group"; + public static final String GROUP_ID = "group_id"; + public static final String GROUPS = "groups"; + public static final String ID = "id"; + public static final String NAME = "name"; + public static final String SUBSCRIBER_ID = "subscriber_id"; + public static final String TRIGGER_NAME = "name"; + public static final String URL = "url"; + + private MailerLiteConstants() { + } +} diff --git a/server/libs/modules/components/mailerlite/src/main/java/com/bytechef/component/mailerlite/trigger/MailerLiteSubscriberAddedToGroupTrigger.java b/server/libs/modules/components/mailerlite/src/main/java/com/bytechef/component/mailerlite/trigger/MailerLiteSubscriberAddedToGroupTrigger.java new file mode 100644 index 00000000000..36d3ce48c44 --- /dev/null +++ b/server/libs/modules/components/mailerlite/src/main/java/com/bytechef/component/mailerlite/trigger/MailerLiteSubscriberAddedToGroupTrigger.java @@ -0,0 +1,109 @@ +/* + * 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.mailerlite.trigger; + +import static com.bytechef.component.definition.ComponentDsl.array; +import static com.bytechef.component.definition.ComponentDsl.integer; +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.mailerlite.constant.MailerLiteConstants.DATA; +import static com.bytechef.component.mailerlite.constant.MailerLiteConstants.EMAIL; +import static com.bytechef.component.mailerlite.constant.MailerLiteConstants.ID; +import static com.bytechef.component.mailerlite.util.MailerLiteUtils.getContent; +import static com.bytechef.component.mailerlite.util.MailerLiteUtils.subscribeWebhook; +import static com.bytechef.component.mailerlite.util.MailerLiteUtils.unsubscribeWebhook; + +import com.bytechef.component.definition.ComponentDsl.ModifiableTriggerDefinition; +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 java.util.Map; + +/** + * @author Nikolina Spehar + */ +public class MailerLiteSubscriberAddedToGroupTrigger { + + public static final ModifiableTriggerDefinition TRIGGER_DEFINITION = trigger("subscriberAddedToGroup") + .title("Subscriber Added to the Group") + .description("Triggers when a subscriber is added to the group.") + .type(TriggerType.DYNAMIC_WEBHOOK) + .properties() + .output( + outputSchema( + object() + .properties( + object(DATA) + .properties( + string("account_id") + .description("ID of the account that subscriber subscribed to."), + string("id") + .description("ID of the user that was created or updated."), + string(EMAIL) + .description("The email address of the subscriber."), + string("status"), + string("source"), + integer("sent") + .description("The number of messages that were sent to the subscriber."), + integer("opens_count") + .description("Number of email messages the user has opened."), + integer("clicks_count"), + integer("open_rate"), + integer("click_rate"), + string("subscribed_at"), + string("created_at"), + string("updated_at"), + array("fields"), + array("groups"))))) + .webhookEnable(MailerLiteSubscriberAddedToGroupTrigger::webhookEnable) + .webhookDisable(MailerLiteSubscriberAddedToGroupTrigger::webhookDisable) + .webhookRequest(MailerLiteSubscriberAddedToGroupTrigger::webhookRequest); + + private MailerLiteSubscriberAddedToGroupTrigger() { + } + + protected static WebhookEnableOutput webhookEnable( + Parameters inputParameters, Parameters connectionParameters, String webhookUrl, + String workflowExecutionId, TriggerContext context) { + + return new WebhookEnableOutput( + Map.of( + ID, subscribeWebhook(TRIGGER_DEFINITION.getName(), "subscriber.added_to_group", webhookUrl, context)), + null); + } + + protected static void webhookDisable( + Parameters inputParameters, Parameters connectionParameters, Parameters outputParameters, + String workflowExecutionId, TriggerContext context) { + + unsubscribeWebhook(outputParameters.getString(ID), context); + } + + protected static Map webhookRequest( + Parameters inputParameters, Parameters connectionParameters, HttpHeaders headers, HttpParameters parameters, + WebhookBody body, WebhookMethod method, WebhookEnableOutput output, TriggerContext context) { + + return getContent(body); + } +} diff --git a/server/libs/modules/components/mailerlite/src/main/java/com/bytechef/component/mailerlite/trigger/MailerLiteSubscriberCreatedTrigger.java b/server/libs/modules/components/mailerlite/src/main/java/com/bytechef/component/mailerlite/trigger/MailerLiteSubscriberCreatedTrigger.java new file mode 100644 index 00000000000..098dfbfab4a --- /dev/null +++ b/server/libs/modules/components/mailerlite/src/main/java/com/bytechef/component/mailerlite/trigger/MailerLiteSubscriberCreatedTrigger.java @@ -0,0 +1,112 @@ +/* + * 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.mailerlite.trigger; + +import static com.bytechef.component.definition.ComponentDsl.array; +import static com.bytechef.component.definition.ComponentDsl.integer; +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.mailerlite.constant.MailerLiteConstants.DATA; +import static com.bytechef.component.mailerlite.constant.MailerLiteConstants.EMAIL; +import static com.bytechef.component.mailerlite.constant.MailerLiteConstants.ID; +import static com.bytechef.component.mailerlite.util.MailerLiteUtils.getContent; +import static com.bytechef.component.mailerlite.util.MailerLiteUtils.subscribeWebhook; +import static com.bytechef.component.mailerlite.util.MailerLiteUtils.unsubscribeWebhook; + +import com.bytechef.component.definition.ComponentDsl.ModifiableTriggerDefinition; +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 java.util.Map; + +/** + * @author Nikolina Spehar + */ +public class MailerLiteSubscriberCreatedTrigger { + + public static final ModifiableTriggerDefinition TRIGGER_DEFINITION = trigger("subscriberCreated") + .title("Subscriber Created") + .description("Triggers when a subscriber is created.") + .type(TriggerType.DYNAMIC_WEBHOOK) + .properties() + .output( + outputSchema( + object() + .properties( + object(DATA) + .properties( + string("id") + .description("ID of the user that was created or updated."), + string(EMAIL) + .description("The email address of the subscriber."), + string("status"), + string("source"), + integer("sent") + .description("The number of messages that were sent to the subscriber."), + integer("opens_count") + .description("Number of email messages the user has opened."), + integer("clicks_count"), + integer("open_rate"), + integer("click_rate"), + object("ip_address"), + string("subscribed_at"), + string("unsubscribed_at"), + string("created_at"), + string("updated_at"), + string("deleted_at"), + string("forget_at"), + array("fields"), + array("groups"), + string("account_id") + .description("ID of the account that subscriber subscribed to."))))) + .webhookEnable(MailerLiteSubscriberCreatedTrigger::webhookEnable) + .webhookDisable(MailerLiteSubscriberCreatedTrigger::webhookDisable) + .webhookRequest(MailerLiteSubscriberCreatedTrigger::webhookRequest); + + private MailerLiteSubscriberCreatedTrigger() { + } + + protected static WebhookEnableOutput webhookEnable( + Parameters inputParameters, Parameters connectionParameters, String webhookUrl, + String workflowExecutionId, TriggerContext context) { + + return new WebhookEnableOutput( + Map.of(ID, subscribeWebhook(TRIGGER_DEFINITION.getName(), "subscriber.created", webhookUrl, context)), + null); + } + + protected static void webhookDisable( + Parameters inputParameters, Parameters connectionParameters, Parameters outputParameters, + String workflowExecutionId, TriggerContext context) { + + unsubscribeWebhook(outputParameters.getString(ID), context); + } + + protected static Map webhookRequest( + Parameters inputParameters, Parameters connectionParameters, HttpHeaders headers, HttpParameters parameters, + WebhookBody body, WebhookMethod method, WebhookEnableOutput output, TriggerContext context) { + + return getContent(body); + } +} diff --git a/server/libs/modules/components/mailerlite/src/main/java/com/bytechef/component/mailerlite/trigger/MailerLiteSubscriberUnsubscribedTrigger.java b/server/libs/modules/components/mailerlite/src/main/java/com/bytechef/component/mailerlite/trigger/MailerLiteSubscriberUnsubscribedTrigger.java new file mode 100644 index 00000000000..2f4d6f1819a --- /dev/null +++ b/server/libs/modules/components/mailerlite/src/main/java/com/bytechef/component/mailerlite/trigger/MailerLiteSubscriberUnsubscribedTrigger.java @@ -0,0 +1,108 @@ +/* + * 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.mailerlite.trigger; + +import static com.bytechef.component.definition.ComponentDsl.array; +import static com.bytechef.component.definition.ComponentDsl.integer; +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.mailerlite.constant.MailerLiteConstants.DATA; +import static com.bytechef.component.mailerlite.constant.MailerLiteConstants.EMAIL; +import static com.bytechef.component.mailerlite.constant.MailerLiteConstants.ID; +import static com.bytechef.component.mailerlite.util.MailerLiteUtils.getContent; +import static com.bytechef.component.mailerlite.util.MailerLiteUtils.subscribeWebhook; +import static com.bytechef.component.mailerlite.util.MailerLiteUtils.unsubscribeWebhook; + +import com.bytechef.component.definition.ComponentDsl.ModifiableTriggerDefinition; +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 java.util.Map; + +/** + * @author Nikolina Spehar + */ +public class MailerLiteSubscriberUnsubscribedTrigger { + + public static final ModifiableTriggerDefinition TRIGGER_DEFINITION = trigger("subscriberUnsubscribed") + .title("Subscriber Unsubscribed") + .description("Triggers when a subscriber unsubscribes.") + .type(TriggerType.DYNAMIC_WEBHOOK) + .properties() + .output( + outputSchema( + object() + .properties( + object(DATA) + .properties( + string("account_id") + .description("ID of the account that subscriber subscribed to."), + string("id") + .description("ID of the user that was created or updated."), + string(EMAIL) + .description("The email address of the subscriber."), + string("status"), + string("source"), + integer("sent") + .description("The number of messages that were sent to the subscriber."), + integer("opens_count") + .description("Number of email messages the user has opened."), + integer("clicks_count"), + integer("open_rate"), + integer("click_rate"), + string("subscribed_at"), + string("created_at"), + string("updated_at"), + array("fields"), + array("groups"))))) + .webhookEnable(MailerLiteSubscriberUnsubscribedTrigger::webhookEnable) + .webhookDisable(MailerLiteSubscriberUnsubscribedTrigger::webhookDisable) + .webhookRequest(MailerLiteSubscriberUnsubscribedTrigger::webhookRequest); + + private MailerLiteSubscriberUnsubscribedTrigger() { + } + + protected static WebhookEnableOutput webhookEnable( + Parameters inputParameters, Parameters connectionParameters, String webhookUrl, + String workflowExecutionId, TriggerContext context) { + + return new WebhookEnableOutput( + Map.of(ID, subscribeWebhook(TRIGGER_DEFINITION.getName(), "subscriber.unsubscribed", webhookUrl, context)), + null); + } + + protected static void webhookDisable( + Parameters inputParameters, Parameters connectionParameters, Parameters outputParameters, + String workflowExecutionId, TriggerContext context) { + + unsubscribeWebhook(outputParameters.getString(ID), context); + } + + protected static Map webhookRequest( + Parameters inputParameters, Parameters connectionParameters, HttpHeaders headers, HttpParameters parameters, + WebhookBody body, WebhookMethod method, WebhookEnableOutput output, TriggerContext context) { + + return getContent(body); + } +} diff --git a/server/libs/modules/components/mailerlite/src/main/java/com/bytechef/component/mailerlite/util/MailerLiteUtils.java b/server/libs/modules/components/mailerlite/src/main/java/com/bytechef/component/mailerlite/util/MailerLiteUtils.java new file mode 100644 index 00000000000..59206da1ec2 --- /dev/null +++ b/server/libs/modules/components/mailerlite/src/main/java/com/bytechef/component/mailerlite/util/MailerLiteUtils.java @@ -0,0 +1,125 @@ +/* + * 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.mailerlite.util; + +import static com.bytechef.component.definition.ComponentDsl.option; +import static com.bytechef.component.definition.Context.Http.responseType; +import static com.bytechef.component.mailerlite.constant.MailerLiteConstants.DATA; +import static com.bytechef.component.mailerlite.constant.MailerLiteConstants.EMAIL; +import static com.bytechef.component.mailerlite.constant.MailerLiteConstants.EVENTS; +import static com.bytechef.component.mailerlite.constant.MailerLiteConstants.ID; +import static com.bytechef.component.mailerlite.constant.MailerLiteConstants.NAME; +import static com.bytechef.component.mailerlite.constant.MailerLiteConstants.TRIGGER_NAME; +import static com.bytechef.component.mailerlite.constant.MailerLiteConstants.URL; + +import com.bytechef.component.definition.Context; +import com.bytechef.component.definition.Context.ContextFunction; +import com.bytechef.component.definition.Context.Http; +import com.bytechef.component.definition.Context.Http.Body; +import com.bytechef.component.definition.Context.Http.Executor; +import com.bytechef.component.definition.Context.Http.ResponseType; +import com.bytechef.component.definition.Option; +import com.bytechef.component.definition.Parameters; +import com.bytechef.component.definition.TriggerContext; +import com.bytechef.component.definition.TriggerDefinition.WebhookBody; +import com.bytechef.component.definition.TypeReference; +import com.bytechef.component.exception.ProviderException; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** + * @author Nikolina Spehar + */ +public class MailerLiteUtils { + + protected static final ContextFunction GET_GROUPS_CONTEXT_FUNCTION = + http -> http.get("/groups"); + + protected static final ContextFunction GET_SUBSCRIBERS_CONTEXT_FUNCTION = + http -> http.get("/subscribers"); + + public static Map getContent(WebhookBody body) { + + return body.getContent(new TypeReference<>() {}); + } + + public static List> getGroupIdOptions( + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, + String searchText, Context context) { + + Map body = context.http(GET_GROUPS_CONTEXT_FUNCTION) + .configuration(responseType(Http.ResponseType.JSON)) + .execute() + .getBody(new TypeReference<>() {}); + + return getOptions(body.get(DATA), NAME); + } + + public static List> getSubscriberIdOptions( + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, + String searchText, Context context) { + + Map body = context.http(GET_SUBSCRIBERS_CONTEXT_FUNCTION) + .configuration(responseType(Http.ResponseType.JSON)) + .execute() + .getBody(new TypeReference<>() {}); + + return getOptions(body.get(DATA), EMAIL); + } + + public static String subscribeWebhook( + String triggerName, String events, String webhookUrl, TriggerContext context) { + + Map body = context + .http(http -> http.post("/webhooks")) + .body( + Body.of( + Map.of( + TRIGGER_NAME, triggerName, + EVENTS, List.of(events), + URL, webhookUrl))) + .configuration(responseType(ResponseType.JSON)) + .execute() + .getBody(new TypeReference<>() {}); + + if (body.get("data") instanceof Map data) { + return (String) data.get(ID); + } + + throw new ProviderException("Failed to subscribe to webhook."); + } + + public static void unsubscribeWebhook(String webhookId, TriggerContext context) { + context.http(http -> http.delete("/webhooks/" + webhookId)) + .execute(); + } + + private static List> getOptions(Object data, String label) { + List> options = new ArrayList<>(); + + if (data instanceof List dataList) { + for (Object optionObject : dataList) { + if (optionObject instanceof Map option) { + options.add(option((String) option.get(label), (String) option.get(ID))); + } + } + } + + return options; + } +} diff --git a/server/libs/modules/components/mailerlite/src/main/resources/README.md b/server/libs/modules/components/mailerlite/src/main/resources/README.md new file mode 100644 index 00000000000..e69de29bb2d diff --git a/server/libs/modules/components/mailerlite/src/main/resources/assets/mailerlite.svg b/server/libs/modules/components/mailerlite/src/main/resources/assets/mailerlite.svg new file mode 100644 index 00000000000..d85c21ec06b --- /dev/null +++ b/server/libs/modules/components/mailerlite/src/main/resources/assets/mailerlite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/server/libs/modules/components/mailerlite/src/test/java/com/bytechef/component/mailerlite/MailerLiteComponentHandlerTest.java b/server/libs/modules/components/mailerlite/src/test/java/com/bytechef/component/mailerlite/MailerLiteComponentHandlerTest.java new file mode 100644 index 00000000000..f33562f6268 --- /dev/null +++ b/server/libs/modules/components/mailerlite/src/test/java/com/bytechef/component/mailerlite/MailerLiteComponentHandlerTest.java @@ -0,0 +1,31 @@ +/* + * 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.mailerlite; + +import com.bytechef.test.jsonasssert.JsonFileAssert; +import org.junit.jupiter.api.Test; + +/** + * @author Nikolina Spehar + */ +class MailerLiteComponentHandlerTest { + + @Test + void testGetComponentDefinition() { + JsonFileAssert.assertEquals("definition/mailerlite_v1.json", new MailerLiteComponentHandler().getDefinition()); + } +} diff --git a/server/libs/modules/components/mailerlite/src/test/java/com/bytechef/component/mailerlite/action/MailerLiteAddSubscriberToGroupActionTest.java b/server/libs/modules/components/mailerlite/src/test/java/com/bytechef/component/mailerlite/action/MailerLiteAddSubscriberToGroupActionTest.java new file mode 100644 index 00000000000..54f97c34022 --- /dev/null +++ b/server/libs/modules/components/mailerlite/src/test/java/com/bytechef/component/mailerlite/action/MailerLiteAddSubscriberToGroupActionTest.java @@ -0,0 +1,63 @@ +/* + * 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.mailerlite.action; + +import static com.bytechef.component.mailerlite.constant.MailerLiteConstants.GROUP_ID; +import static com.bytechef.component.mailerlite.constant.MailerLiteConstants.SUBSCRIBER_ID; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +import com.bytechef.component.definition.Context; +import com.bytechef.component.definition.Context.Http; +import com.bytechef.component.definition.Context.Http.Executor; +import com.bytechef.component.definition.Context.Http.Response; +import com.bytechef.component.definition.Parameters; +import com.bytechef.component.definition.TypeReference; +import com.bytechef.component.test.definition.MockParametersFactory; +import java.util.Map; +import org.junit.jupiter.api.Test; + +/** + * @author Nikolina Spehar + */ +class MailerLiteAddSubscriberToGroupActionTest { + + private final Context mockedContext = mock(Context.class); + private final Executor mockedExecutor = mock(Http.Executor.class); + private final Object mockedObject = mock(Object.class); + private final Parameters mockedParameters = MockParametersFactory.create( + Map.of(SUBSCRIBER_ID, "subscriber_id1", GROUP_ID, "id1")); + private final Response mockedResponse = mock(Response.class); + + @Test + void perform() { + when(mockedContext.http(any())) + .thenReturn(mockedExecutor); + when(mockedExecutor.configuration(any())) + .thenReturn(mockedExecutor); + when(mockedExecutor.execute()) + .thenReturn(mockedResponse); + when(mockedResponse.getBody(any(TypeReference.class))) + .thenReturn(mockedObject); + + Object result = MailerLiteAddSubscriberToGroupAction.perform(mockedParameters, mockedParameters, mockedContext); + + assertEquals(mockedObject, result); + } +} diff --git a/server/libs/modules/components/mailerlite/src/test/java/com/bytechef/component/mailerlite/action/MailerLiteCreateOrUpdateSubscriberActionTest.java b/server/libs/modules/components/mailerlite/src/test/java/com/bytechef/component/mailerlite/action/MailerLiteCreateOrUpdateSubscriberActionTest.java new file mode 100644 index 00000000000..9b8ed1b2195 --- /dev/null +++ b/server/libs/modules/components/mailerlite/src/test/java/com/bytechef/component/mailerlite/action/MailerLiteCreateOrUpdateSubscriberActionTest.java @@ -0,0 +1,74 @@ +/* + * 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.mailerlite.action; + +import static com.bytechef.component.mailerlite.constant.MailerLiteConstants.EMAIL; +import static com.bytechef.component.mailerlite.constant.MailerLiteConstants.GROUP_ID; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +import com.bytechef.component.definition.Context; +import com.bytechef.component.definition.Context.Http; +import com.bytechef.component.definition.Context.Http.Body; +import com.bytechef.component.definition.Context.Http.Executor; +import com.bytechef.component.definition.Context.Http.Response; +import com.bytechef.component.definition.Parameters; +import com.bytechef.component.definition.TypeReference; +import com.bytechef.component.test.definition.MockParametersFactory; +import java.util.List; +import java.util.Map; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; + +/** + * @author Nikolina Spehar + */ +class MailerLiteCreateOrUpdateSubscriberActionTest { + + private final ArgumentCaptor bodyArgumentCaptor = ArgumentCaptor.forClass(Body.class); + private final Context mockedContext = mock(Context.class); + private final Executor mockedExecutor = mock(Http.Executor.class); + private final Object mockedObject = mock(Object.class); + private final Response mockedResponse = mock(Response.class); + private final Parameters mockedParameters = MockParametersFactory.create( + Map.of(EMAIL, "testTest@gmail.com", GROUP_ID, "id1")); + + @Test + void perform() { + when(mockedContext.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(mockedObject); + + Object result = MailerLiteCreateOrUpdateSubscriberAction.perform( + mockedParameters, mockedParameters, mockedContext); + + assertEquals(mockedObject, result); + + Body body = bodyArgumentCaptor.getValue(); + + assertEquals(Map.of(EMAIL, "testTest@gmail.com", "groups", List.of("id1")), body.getContent()); + } +} diff --git a/server/libs/modules/components/mailerlite/src/test/java/com/bytechef/component/mailerlite/action/MailerLiteRemoveSubscriberFromGroupActionTest.java b/server/libs/modules/components/mailerlite/src/test/java/com/bytechef/component/mailerlite/action/MailerLiteRemoveSubscriberFromGroupActionTest.java new file mode 100644 index 00000000000..09a53f02b93 --- /dev/null +++ b/server/libs/modules/components/mailerlite/src/test/java/com/bytechef/component/mailerlite/action/MailerLiteRemoveSubscriberFromGroupActionTest.java @@ -0,0 +1,58 @@ +/* + * 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.mailerlite.action; + +import static com.bytechef.component.mailerlite.constant.MailerLiteConstants.GROUP_ID; +import static com.bytechef.component.mailerlite.constant.MailerLiteConstants.SUBSCRIBER_ID; +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.when; + +import com.bytechef.component.definition.Context; +import com.bytechef.component.definition.Context.Http; +import com.bytechef.component.definition.Context.Http.Executor; +import com.bytechef.component.definition.Context.Http.Response; +import com.bytechef.component.definition.Parameters; +import com.bytechef.component.test.definition.MockParametersFactory; +import java.util.Map; +import org.junit.jupiter.api.Test; + +/** + * @author Nikolina Spehar + */ +class MailerLiteRemoveSubscriberFromGroupActionTest { + + private final Context mockedContext = mock(Context.class); + private final Executor mockedExecutor = mock(Http.Executor.class); + private final Response mockedResponse = mock(Response.class); + private final Parameters mockedParameters = MockParametersFactory.create( + Map.of(SUBSCRIBER_ID, "subscriber_id1", GROUP_ID, "id1")); + + @Test + void perform() { + when(mockedContext.http(any())) + .thenReturn(mockedExecutor); + when(mockedExecutor.execute()) + .thenReturn(mockedResponse); + + Object result = + MailerLiteRemoveSubscriberFromGroupAction.perform(mockedParameters, mockedParameters, mockedContext); + + assertNull(result); + } +} diff --git a/server/libs/modules/components/mailerlite/src/test/java/com/bytechef/component/mailerlite/trigger/AbstractsMailerLiteTriggerTest.java b/server/libs/modules/components/mailerlite/src/test/java/com/bytechef/component/mailerlite/trigger/AbstractsMailerLiteTriggerTest.java new file mode 100644 index 00000000000..13415170934 --- /dev/null +++ b/server/libs/modules/components/mailerlite/src/test/java/com/bytechef/component/mailerlite/trigger/AbstractsMailerLiteTriggerTest.java @@ -0,0 +1,62 @@ +/* + * 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.mailerlite.trigger; + +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.mockStatic; + +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.WebhookBody; +import com.bytechef.component.definition.TriggerDefinition.WebhookEnableOutput; +import com.bytechef.component.definition.TriggerDefinition.WebhookMethod; +import com.bytechef.component.mailerlite.util.MailerLiteUtils; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.mockito.ArgumentCaptor; +import org.mockito.MockedStatic; + +/** + * @author Nikolina Spehar + */ +abstract class AbstractsMailerLiteTriggerTest { + protected WebhookEnableOutput mockedWebhookEnableOutput = mock(WebhookEnableOutput.class); + protected WebhookBody mockedWebhookBody = mock(WebhookBody.class); + protected HttpHeaders mockedHttpHeaders = mock(HttpHeaders.class); + protected HttpParameters mockedHttpParameters = mock(HttpParameters.class); + protected WebhookMethod mockedWebhookMethod = mock(WebhookMethod.class); + protected Parameters mockedParameters = mock(Parameters.class); + protected TriggerContext mockedTriggerContext = mock(TriggerContext.class); + protected MockedStatic mailerLiteUtilsMockedStatic; + protected ArgumentCaptor stringArgumentCaptor = ArgumentCaptor.forClass(String.class); + protected ArgumentCaptor triggerContextArgumentCaptor = + ArgumentCaptor.forClass(TriggerContext.class); + protected ArgumentCaptor webhookBodyArgumentCaptor = ArgumentCaptor.forClass(WebhookBody.class); + protected String workflowExecutionId = "testWorkflowExecutionId"; + + @BeforeEach + void beforeEach() { + mailerLiteUtilsMockedStatic = mockStatic(MailerLiteUtils.class); + } + + @AfterEach + void afterEach() { + mailerLiteUtilsMockedStatic.close(); + } +} diff --git a/server/libs/modules/components/mailerlite/src/test/java/com/bytechef/component/mailerlite/trigger/MailerLiteSubscriberAddedToGroupTriggerTest.java b/server/libs/modules/components/mailerlite/src/test/java/com/bytechef/component/mailerlite/trigger/MailerLiteSubscriberAddedToGroupTriggerTest.java new file mode 100644 index 00000000000..db73b9c1185 --- /dev/null +++ b/server/libs/modules/components/mailerlite/src/test/java/com/bytechef/component/mailerlite/trigger/MailerLiteSubscriberAddedToGroupTriggerTest.java @@ -0,0 +1,83 @@ +/* + * 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.mailerlite.trigger; + +import static com.bytechef.component.mailerlite.constant.MailerLiteConstants.ID; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import com.bytechef.component.definition.TriggerDefinition.WebhookEnableOutput; +import com.bytechef.component.mailerlite.util.MailerLiteUtils; +import com.bytechef.component.test.definition.MockParametersFactory; +import java.util.List; +import java.util.Map; +import org.junit.jupiter.api.Test; + +/** + * @author Nikolina Spehar + */ +class MailerLiteSubscriberAddedToGroupTriggerTest extends AbstractsMailerLiteTriggerTest { + + @Test + void testWebhookEnable() { + String webhookUrl = "testWebhookUrl"; + + mailerLiteUtilsMockedStatic.when( + () -> MailerLiteUtils.subscribeWebhook( + stringArgumentCaptor.capture(), stringArgumentCaptor.capture(), stringArgumentCaptor.capture(), + triggerContextArgumentCaptor.capture())) + .thenReturn("123"); + + WebhookEnableOutput webhookEnableOutput = MailerLiteSubscriberAddedToGroupTrigger.webhookEnable( + mockedParameters, mockedParameters, webhookUrl, workflowExecutionId, mockedTriggerContext); + + WebhookEnableOutput expectedWebhookEnableOutput = new WebhookEnableOutput(Map.of(ID, "123"), null); + + assertEquals(expectedWebhookEnableOutput, webhookEnableOutput); + + assertEquals( + List.of("subscriberAddedToGroup", "subscriber.added_to_group", webhookUrl), + stringArgumentCaptor.getAllValues()); + assertEquals(mockedTriggerContext, triggerContextArgumentCaptor.getValue()); + } + + @Test + void testWebhookDisable() { + mockedParameters = MockParametersFactory.create(Map.of(ID, "123")); + + MailerLiteSubscriberAddedToGroupTrigger.webhookDisable( + mockedParameters, mockedParameters, mockedParameters, workflowExecutionId, mockedTriggerContext); + + mailerLiteUtilsMockedStatic + .verify(() -> MailerLiteUtils.unsubscribeWebhook("123", mockedTriggerContext)); + } + + @Test + void testWebhookRequest() { + Map content = Map.of("id", 123); + + mailerLiteUtilsMockedStatic.when( + () -> MailerLiteUtils.getContent(webhookBodyArgumentCaptor.capture())) + .thenReturn(content); + + Map result = MailerLiteSubscriberAddedToGroupTrigger.webhookRequest( + mockedParameters, mockedParameters, mockedHttpHeaders, mockedHttpParameters, mockedWebhookBody, + mockedWebhookMethod, mockedWebhookEnableOutput, mockedTriggerContext); + + assertEquals(content, result); + assertEquals(mockedWebhookBody, webhookBodyArgumentCaptor.getValue()); + } +} diff --git a/server/libs/modules/components/mailerlite/src/test/java/com/bytechef/component/mailerlite/trigger/MailerLiteSubscriberCreatedTriggerTest.java b/server/libs/modules/components/mailerlite/src/test/java/com/bytechef/component/mailerlite/trigger/MailerLiteSubscriberCreatedTriggerTest.java new file mode 100644 index 00000000000..18e9c6a9610 --- /dev/null +++ b/server/libs/modules/components/mailerlite/src/test/java/com/bytechef/component/mailerlite/trigger/MailerLiteSubscriberCreatedTriggerTest.java @@ -0,0 +1,83 @@ +/* + * 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.mailerlite.trigger; + +import static com.bytechef.component.mailerlite.constant.MailerLiteConstants.ID; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import com.bytechef.component.definition.TriggerDefinition.WebhookEnableOutput; +import com.bytechef.component.mailerlite.util.MailerLiteUtils; +import com.bytechef.component.test.definition.MockParametersFactory; +import java.util.List; +import java.util.Map; +import org.junit.jupiter.api.Test; + +/** + * @author Nikolina Spehar + */ +class MailerLiteSubscriberCreatedTriggerTest extends AbstractsMailerLiteTriggerTest { + + @Test + void testWebhookEnable() { + String webhookUrl = "testWebhookUrl"; + + mailerLiteUtilsMockedStatic.when( + () -> MailerLiteUtils.subscribeWebhook( + stringArgumentCaptor.capture(), stringArgumentCaptor.capture(), stringArgumentCaptor.capture(), + triggerContextArgumentCaptor.capture())) + .thenReturn("123"); + + WebhookEnableOutput webhookEnableOutput = MailerLiteSubscriberCreatedTrigger.webhookEnable( + mockedParameters, mockedParameters, webhookUrl, workflowExecutionId, mockedTriggerContext); + + WebhookEnableOutput expectedWebhookEnableOutput = new WebhookEnableOutput(Map.of(ID, "123"), null); + + assertEquals(expectedWebhookEnableOutput, webhookEnableOutput); + + assertEquals(List.of("subscriberCreated", "subscriber.created", webhookUrl), + stringArgumentCaptor.getAllValues()); + assertEquals(mockedTriggerContext, triggerContextArgumentCaptor.getValue()); + } + + @Test + void testWebhookDisable() { + mockedParameters = MockParametersFactory.create(Map.of(ID, "123")); + + MailerLiteSubscriberCreatedTrigger.webhookDisable( + mockedParameters, mockedParameters, mockedParameters, workflowExecutionId, mockedTriggerContext); + + mailerLiteUtilsMockedStatic + .verify(() -> MailerLiteUtils.unsubscribeWebhook("123", mockedTriggerContext)); + } + + @Test + void testWebhookRequest() { + Map content = Map.of("id", 123); + + mailerLiteUtilsMockedStatic.when( + () -> MailerLiteUtils.getContent(webhookBodyArgumentCaptor.capture())) + .thenReturn(content); + + Map result = MailerLiteSubscriberCreatedTrigger.webhookRequest( + mockedParameters, mockedParameters, mockedHttpHeaders, mockedHttpParameters, mockedWebhookBody, + mockedWebhookMethod, mockedWebhookEnableOutput, mockedTriggerContext); + + assertEquals(content, result); + assertEquals(mockedWebhookBody, webhookBodyArgumentCaptor.getValue()); + } + +} diff --git a/server/libs/modules/components/mailerlite/src/test/java/com/bytechef/component/mailerlite/trigger/MailerLiteSubscriberUnsubscribedTriggerTest.java b/server/libs/modules/components/mailerlite/src/test/java/com/bytechef/component/mailerlite/trigger/MailerLiteSubscriberUnsubscribedTriggerTest.java new file mode 100644 index 00000000000..058179fdf19 --- /dev/null +++ b/server/libs/modules/components/mailerlite/src/test/java/com/bytechef/component/mailerlite/trigger/MailerLiteSubscriberUnsubscribedTriggerTest.java @@ -0,0 +1,82 @@ +/* + * 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.mailerlite.trigger; + +import static com.bytechef.component.mailerlite.constant.MailerLiteConstants.ID; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import com.bytechef.component.definition.TriggerDefinition.WebhookEnableOutput; +import com.bytechef.component.mailerlite.util.MailerLiteUtils; +import com.bytechef.component.test.definition.MockParametersFactory; +import java.util.List; +import java.util.Map; +import org.junit.jupiter.api.Test; + +/** + * @author Nikolina Spehar + */ +class MailerLiteSubscriberUnsubscribedTriggerTest extends AbstractsMailerLiteTriggerTest { + + @Test + void webhookEnable() { + String webhookUrl = "testWebhookUrl"; + + mailerLiteUtilsMockedStatic.when( + () -> MailerLiteUtils.subscribeWebhook( + stringArgumentCaptor.capture(), stringArgumentCaptor.capture(), stringArgumentCaptor.capture(), + triggerContextArgumentCaptor.capture())) + .thenReturn("123"); + + WebhookEnableOutput webhookEnableOutput = MailerLiteSubscriberUnsubscribedTrigger.webhookEnable( + mockedParameters, mockedParameters, webhookUrl, workflowExecutionId, mockedTriggerContext); + + WebhookEnableOutput expectedWebhookEnableOutput = new WebhookEnableOutput(Map.of(ID, "123"), null); + + assertEquals(expectedWebhookEnableOutput, webhookEnableOutput); + + assertEquals(List.of("subscriberUnsubscribed", "subscriber.unsubscribed", webhookUrl), + stringArgumentCaptor.getAllValues()); + assertEquals(mockedTriggerContext, triggerContextArgumentCaptor.getValue()); + } + + @Test + void webhookDisable() { + mockedParameters = MockParametersFactory.create(Map.of(ID, "123")); + + MailerLiteSubscriberUnsubscribedTrigger.webhookDisable( + mockedParameters, mockedParameters, mockedParameters, workflowExecutionId, mockedTriggerContext); + + mailerLiteUtilsMockedStatic + .verify(() -> MailerLiteUtils.unsubscribeWebhook("123", mockedTriggerContext)); + } + + @Test + void webhookRequest() { + Map content = Map.of("id", 123); + + mailerLiteUtilsMockedStatic.when( + () -> MailerLiteUtils.getContent(webhookBodyArgumentCaptor.capture())) + .thenReturn(content); + + Map result = MailerLiteSubscriberUnsubscribedTrigger.webhookRequest( + mockedParameters, mockedParameters, mockedHttpHeaders, mockedHttpParameters, mockedWebhookBody, + mockedWebhookMethod, mockedWebhookEnableOutput, mockedTriggerContext); + + assertEquals(content, result); + assertEquals(mockedWebhookBody, webhookBodyArgumentCaptor.getValue()); + } +} diff --git a/server/libs/modules/components/mailerlite/src/test/java/com/bytechef/component/mailerlite/util/MailerLiteUtilsTest.java b/server/libs/modules/components/mailerlite/src/test/java/com/bytechef/component/mailerlite/util/MailerLiteUtilsTest.java new file mode 100644 index 00000000000..342b3bdfcc1 --- /dev/null +++ b/server/libs/modules/components/mailerlite/src/test/java/com/bytechef/component/mailerlite/util/MailerLiteUtilsTest.java @@ -0,0 +1,170 @@ +/* + * 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.mailerlite.util; + +import static com.bytechef.component.definition.ComponentDsl.option; +import static com.bytechef.component.mailerlite.constant.MailerLiteConstants.DATA; +import static com.bytechef.component.mailerlite.constant.MailerLiteConstants.EVENTS; +import static com.bytechef.component.mailerlite.constant.MailerLiteConstants.GROUP; +import static com.bytechef.component.mailerlite.constant.MailerLiteConstants.ID; +import static com.bytechef.component.mailerlite.constant.MailerLiteConstants.TRIGGER_NAME; +import static com.bytechef.component.mailerlite.constant.MailerLiteConstants.URL; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + +import com.bytechef.component.definition.Context; +import com.bytechef.component.definition.Context.Http.Body; +import com.bytechef.component.definition.Context.Http.Executor; +import com.bytechef.component.definition.Context.Http.Response; +import com.bytechef.component.definition.Option; +import com.bytechef.component.definition.Parameters; +import com.bytechef.component.definition.TriggerContext; +import com.bytechef.component.definition.TriggerDefinition; +import com.bytechef.component.definition.TypeReference; +import com.bytechef.component.test.definition.MockParametersFactory; +import java.util.List; +import java.util.Map; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; + +/** + * @author Nikolina Spehar + */ +class MailerLiteUtilsTest { + + private final ArgumentCaptor bodyArgumentCaptor = ArgumentCaptor.forClass(Body.class); + private final Context mockedContext = mock(Context.class); + private final Executor mockedExecutor = mock(Executor.class); + private final Parameters mockedParameters = MockParametersFactory.create(Map.of()); + private final Response mockedResponse = mock(Response.class); + private final TriggerContext mockedTriggerContext = mock(TriggerContext.class); + private final TriggerDefinition.WebhookBody mockedWebhookBody = mock(TriggerDefinition.WebhookBody.class); + private final Map>> responseMap = Map.of( + "data", List.of( + Map.of("email", "test1@gmail.com", + "id", "test_id1", + "name", "group1"), + Map.of("email", "test2@gmail.com", + "id", "test_id2", + "name", "group2"))); + + @Test + void testGetGroupIdOptions() { + List> result = httpCall(GROUP); + + List> expected = List.of( + option("group1", "test_id1"), + option("group2", "test_id2")); + + assertEquals(expected, result); + } + + @Test + void testGetSubscriberIdOptions() { + List> result = httpCall("subscribers"); + + List> expected = List.of( + option("test1@gmail.com", "test_id1"), + option("test2@gmail.com", "test_id2")); + + assertEquals(expected, result); + } + + private List> httpCall(String option) { + when(mockedContext.http(any())) + .thenReturn(mockedExecutor); + when(mockedExecutor.configuration(any())) + .thenReturn(mockedExecutor); + when(mockedExecutor.body(any())) + .thenReturn(mockedExecutor); + when(mockedExecutor.execute()) + .thenReturn(mockedResponse); + when(mockedResponse.getBody(any(TypeReference.class))) + .thenReturn(responseMap); + + List> result; + + if (option.equals(GROUP)) { + result = MailerLiteUtils.getGroupIdOptions( + mockedParameters, mockedParameters, Map.of(), "", mockedContext); + } else { + result = MailerLiteUtils.getSubscriberIdOptions( + mockedParameters, mockedParameters, Map.of(), "", mockedContext); + } + + return result; + } + + @Test + void testGetContent() { + Map content = Map.of(); + + when(mockedWebhookBody.getContent(any(TypeReference.class))) + .thenReturn(content); + + assertEquals(content, MailerLiteUtils.getContent(mockedWebhookBody)); + } + + @Test + void testSubscribeWebhook() { + 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(DATA, Map.of(ID, "123"))); + + String triggerTestName = "triggerTest"; + String testEvent = "testEvent"; + String testWebhookUrl = "testWebhookUrl"; + + String id = MailerLiteUtils.subscribeWebhook( + triggerTestName, testEvent, testWebhookUrl, mockedTriggerContext); + + assertEquals("123", id); + + Body body = bodyArgumentCaptor.getValue(); + + Map expectedBody = Map.of( + TRIGGER_NAME, triggerTestName, + EVENTS, List.of(testEvent), + URL, testWebhookUrl); + + assertEquals(expectedBody, body.getContent()); + } + + @Test + void testUnsubscribeWebhook() { + when(mockedTriggerContext.http(any())) + .thenReturn(mockedExecutor); + when(mockedExecutor.execute()) + .thenReturn(mockedResponse); + + MailerLiteUtils.unsubscribeWebhook("123", mockedTriggerContext); + + verify(mockedTriggerContext, times(1)).http(any()); + verify(mockedExecutor, times(1)).execute(); + } +} diff --git a/server/libs/modules/components/mailerlite/src/test/resources/definition/mailerlite_v1.json b/server/libs/modules/components/mailerlite/src/test/resources/definition/mailerlite_v1.json new file mode 100644 index 00000000000..5d63ae7c85a --- /dev/null +++ b/server/libs/modules/components/mailerlite/src/test/resources/definition/mailerlite_v1.json @@ -0,0 +1,3928 @@ +{ + "componentCategories" : [ { + "name" : "marketing-automation", + "label" : "Marketing Automation" + } ], + "customAction" : null, + "customActionHelp" : null, + "description" : "MailerLite is an intuitive email marketing platform that offers automation, landing pages, and subscriber management for businesses and creators.", + "icon" : "path:assets/mailerlite.svg", + "tags" : null, + "metadata" : null, + "name" : "mailerLite", + "resources" : null, + "version" : 1, + "title" : "MailerLite", + "actions" : [ { + "batch" : null, + "deprecated" : null, + "description" : "Adding a subscriber to a selected group.", + "help" : null, + "metadata" : null, + "name" : "addSubscriberToGroup", + "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" : "data", + "type" : "OBJECT", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "additionalProperties" : null, + "multipleValues" : null, + "options" : null, + "properties" : [ { + "advancedOption" : null, + "description" : "ID of the group to which the user was added.", + "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" : "The name of the group to which the user was added.", + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "name", + "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" : "Number of active subscribers in the group.", + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "active_count", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : "Number of sent email messages in the group.", + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "sent_count", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : "Number of opened email messages in the group.", + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "opens_count", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "open_rate", + "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" : "float", + "type" : "NUMBER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxNumberPrecision" : null, + "maxValue" : null, + "minNumberPrecision" : null, + "minValue" : null, + "numberPrecision" : null, + "options" : null, + "controlType" : "NUMBER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "string", + "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" : "clicks_count", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "click_rate", + "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" : "float", + "type" : "NUMBER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxNumberPrecision" : null, + "maxValue" : null, + "minNumberPrecision" : null, + "minValue" : null, + "numberPrecision" : null, + "options" : null, + "controlType" : "NUMBER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "string", + "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" : "Number of subscribers that unsubscribed from the group.", + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "unsubscribed_count", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : "Number of unconfirmed subscribers in the group.", + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "unconfirmed_count", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : "Number of subscribers that were bounced from the group.", + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "bounced_count", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : "Number of email messages that were sent to junk.", + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "junk_count", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : "The date and time the group was created.", + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "created_at", + "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 + } ], + "controlType" : "OBJECT_BUILDER", + "optionsDataSource" : null + }, + "sampleOutput" : null, + "placeholder" : 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" : "data", + "type" : "OBJECT", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "additionalProperties" : null, + "multipleValues" : null, + "options" : null, + "properties" : [ { + "advancedOption" : null, + "description" : "ID of the group to which the user was added.", + "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" : "The name of the group to which the user was added.", + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "name", + "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" : "Number of active subscribers in the group.", + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "active_count", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : "Number of sent email messages in the group.", + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "sent_count", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : "Number of opened email messages in the group.", + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "opens_count", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "open_rate", + "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" : "float", + "type" : "NUMBER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxNumberPrecision" : null, + "maxValue" : null, + "minNumberPrecision" : null, + "minValue" : null, + "numberPrecision" : null, + "options" : null, + "controlType" : "NUMBER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "string", + "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" : "clicks_count", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "click_rate", + "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" : "float", + "type" : "NUMBER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxNumberPrecision" : null, + "maxValue" : null, + "minNumberPrecision" : null, + "minValue" : null, + "numberPrecision" : null, + "options" : null, + "controlType" : "NUMBER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "string", + "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" : "Number of subscribers that unsubscribed from the group.", + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "unsubscribed_count", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : "Number of unconfirmed subscribers in the group.", + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "unconfirmed_count", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : "Number of subscribers that were bounced from the group.", + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "bounced_count", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : "Number of email messages that were sent to junk.", + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "junk_count", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : "The date and time the group was created.", + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "created_at", + "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 + } ], + "controlType" : "OBJECT_BUILDER", + "optionsDataSource" : null + }, + "sampleOutput" : null + }, + "properties" : [ { + "advancedOption" : null, + "description" : "ID of the user that will be added to the selected group.", + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : true, + "name" : "subscriber_id", + "type" : "STRING", + "defaultValue" : null, + "exampleValue" : null, + "label" : "Subscriber Email", + "placeholder" : null, + "controlType" : "SELECT", + "languageId" : null, + "maxLength" : null, + "minLength" : null, + "options" : null, + "optionsDataSource" : { + "optionsLookupDependsOn" : null, + "options" : { } + } + }, { + "advancedOption" : null, + "description" : "ID of the group to which the user will be added.", + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : true, + "name" : "group_id", + "type" : "STRING", + "defaultValue" : null, + "exampleValue" : null, + "label" : "Group ID", + "placeholder" : null, + "controlType" : "SELECT", + "languageId" : null, + "maxLength" : null, + "minLength" : null, + "options" : null, + "optionsDataSource" : { + "optionsLookupDependsOn" : null, + "options" : { } + } + } ], + "title" : "Add Subscriber to Group", + "perform" : { }, + "workflowNodeDescription" : null, + "processErrorResponse" : null + }, { + "batch" : null, + "deprecated" : null, + "description" : "Create new user or update an existing user.", + "help" : null, + "metadata" : null, + "name" : "createOrUpdateSubscriber", + "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" : "data", + "type" : "OBJECT", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "additionalProperties" : null, + "multipleValues" : null, + "options" : null, + "properties" : [ { + "advancedOption" : null, + "description" : "ID of the user that was created or updated.", + "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" : "The email address of the subscriber.", + "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" : "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" : "source", + "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" : "The number of messages that were sent to the subscriber.", + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "sent", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : "Number of email messages the user has opened.", + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "opens_count", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "clicks_count", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "open_rate", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "click_rate", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "subscribed_at", + "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" : "created_at", + "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" : "updated_at", + "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" : "fields", + "type" : "ARRAY", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "items" : null, + "maxItems" : null, + "minItems" : null, + "multipleValues" : null, + "options" : null, + "controlType" : "ARRAY_BUILDER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "groups", + "type" : "ARRAY", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "items" : null, + "maxItems" : null, + "minItems" : null, + "multipleValues" : null, + "options" : null, + "controlType" : "ARRAY_BUILDER", + "optionsDataSource" : null + } ], + "controlType" : "OBJECT_BUILDER", + "optionsDataSource" : null + } ], + "controlType" : "OBJECT_BUILDER", + "optionsDataSource" : null + }, + "sampleOutput" : null, + "placeholder" : 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" : "data", + "type" : "OBJECT", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "additionalProperties" : null, + "multipleValues" : null, + "options" : null, + "properties" : [ { + "advancedOption" : null, + "description" : "ID of the user that was created or updated.", + "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" : "The email address of the subscriber.", + "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" : "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" : "source", + "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" : "The number of messages that were sent to the subscriber.", + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "sent", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : "Number of email messages the user has opened.", + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "opens_count", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "clicks_count", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "open_rate", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "click_rate", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "subscribed_at", + "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" : "created_at", + "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" : "updated_at", + "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" : "fields", + "type" : "ARRAY", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "items" : null, + "maxItems" : null, + "minItems" : null, + "multipleValues" : null, + "options" : null, + "controlType" : "ARRAY_BUILDER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "groups", + "type" : "ARRAY", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "items" : null, + "maxItems" : null, + "minItems" : null, + "multipleValues" : null, + "options" : null, + "controlType" : "ARRAY_BUILDER", + "optionsDataSource" : null + } ], + "controlType" : "OBJECT_BUILDER", + "optionsDataSource" : null + } ], + "controlType" : "OBJECT_BUILDER", + "optionsDataSource" : null + }, + "sampleOutput" : null + }, + "properties" : [ { + "advancedOption" : null, + "description" : "The email address of the subscriber.", + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : true, + "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" : "ID of the group to which you want to add the subscriber to.", + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : false, + "name" : "group_id", + "type" : "STRING", + "defaultValue" : null, + "exampleValue" : null, + "label" : "Group ID", + "placeholder" : null, + "controlType" : "SELECT", + "languageId" : null, + "maxLength" : null, + "minLength" : null, + "options" : null, + "optionsDataSource" : { + "optionsLookupDependsOn" : null, + "options" : { } + } + } ], + "title" : "Create or Update Subscriber", + "perform" : { }, + "workflowNodeDescription" : null, + "processErrorResponse" : null + }, { + "batch" : null, + "deprecated" : null, + "description" : "Remove selected subscriber from the group.", + "help" : null, + "metadata" : null, + "name" : "removeSubscriberFromGroup", + "outputDefinition" : null, + "properties" : [ { + "advancedOption" : null, + "description" : "ID of the user that will be added to the selected group.", + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : true, + "name" : "subscriber_id", + "type" : "STRING", + "defaultValue" : null, + "exampleValue" : null, + "label" : "Subscriber", + "placeholder" : null, + "controlType" : "SELECT", + "languageId" : null, + "maxLength" : null, + "minLength" : null, + "options" : null, + "optionsDataSource" : { + "optionsLookupDependsOn" : null, + "options" : { } + } + }, { + "advancedOption" : null, + "description" : "ID of the group to which the user will be added.", + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : true, + "name" : "group_id", + "type" : "STRING", + "defaultValue" : null, + "exampleValue" : null, + "label" : "Group ID", + "placeholder" : null, + "controlType" : "SELECT", + "languageId" : null, + "maxLength" : null, + "minLength" : null, + "options" : null, + "optionsDataSource" : { + "optionsLookupDependsOn" : null, + "options" : { } + } + } ], + "title" : "Remove Subscriber from Group", + "perform" : { }, + "workflowNodeDescription" : null, + "processErrorResponse" : null + } ], + "clusterElements" : null, + "unifiedApi" : null, + "triggers" : [ { + "batch" : null, + "deprecated" : null, + "description" : "Triggers when a subscriber is added to the group.", + "help" : null, + "name" : "subscriberAddedToGroup", + "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" : "data", + "type" : "OBJECT", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "additionalProperties" : null, + "multipleValues" : null, + "options" : null, + "properties" : [ { + "advancedOption" : null, + "description" : "ID of the account that subscriber subscribed to.", + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "account_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" : "ID of the user that was created or updated.", + "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" : "The email address of the subscriber.", + "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" : "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" : "source", + "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" : "The number of messages that were sent to the subscriber.", + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "sent", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : "Number of email messages the user has opened.", + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "opens_count", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "clicks_count", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "open_rate", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "click_rate", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "subscribed_at", + "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" : "created_at", + "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" : "updated_at", + "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" : "fields", + "type" : "ARRAY", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "items" : null, + "maxItems" : null, + "minItems" : null, + "multipleValues" : null, + "options" : null, + "controlType" : "ARRAY_BUILDER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "groups", + "type" : "ARRAY", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "items" : null, + "maxItems" : null, + "minItems" : null, + "multipleValues" : null, + "options" : null, + "controlType" : "ARRAY_BUILDER", + "optionsDataSource" : null + } ], + "controlType" : "OBJECT_BUILDER", + "optionsDataSource" : null + } ], + "controlType" : "OBJECT_BUILDER", + "optionsDataSource" : null + }, + "sampleOutput" : null, + "placeholder" : 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" : "data", + "type" : "OBJECT", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "additionalProperties" : null, + "multipleValues" : null, + "options" : null, + "properties" : [ { + "advancedOption" : null, + "description" : "ID of the account that subscriber subscribed to.", + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "account_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" : "ID of the user that was created or updated.", + "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" : "The email address of the subscriber.", + "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" : "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" : "source", + "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" : "The number of messages that were sent to the subscriber.", + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "sent", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : "Number of email messages the user has opened.", + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "opens_count", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "clicks_count", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "open_rate", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "click_rate", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "subscribed_at", + "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" : "created_at", + "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" : "updated_at", + "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" : "fields", + "type" : "ARRAY", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "items" : null, + "maxItems" : null, + "minItems" : null, + "multipleValues" : null, + "options" : null, + "controlType" : "ARRAY_BUILDER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "groups", + "type" : "ARRAY", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "items" : null, + "maxItems" : null, + "minItems" : null, + "multipleValues" : null, + "options" : null, + "controlType" : "ARRAY_BUILDER", + "optionsDataSource" : null + } ], + "controlType" : "OBJECT_BUILDER", + "optionsDataSource" : null + } ], + "controlType" : "OBJECT_BUILDER", + "optionsDataSource" : null + }, + "sampleOutput" : null + }, + "properties" : [ ], + "title" : "Subscriber Added to the Group", + "type" : "DYNAMIC_WEBHOOK", + "webhookRawBody" : null, + "workflowSyncExecution" : null, + "poll" : null, + "deduplicate" : null, + "webhookDisable" : { }, + "webhookEnable" : { }, + "dynamicWebhookRefresh" : null, + "workflowNodeDescription" : null, + "processErrorResponse" : null, + "webhookRequest" : { }, + "listenerDisable" : null, + "listenerEnable" : null, + "webhookValidate" : null, + "webhookValidateOnEnable" : null + }, { + "batch" : null, + "deprecated" : null, + "description" : "Triggers when a subscriber is created.", + "help" : null, + "name" : "subscriberCreated", + "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" : "data", + "type" : "OBJECT", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "additionalProperties" : null, + "multipleValues" : null, + "options" : null, + "properties" : [ { + "advancedOption" : null, + "description" : "ID of the user that was created or updated.", + "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" : "The email address of the subscriber.", + "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" : "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" : "source", + "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" : "The number of messages that were sent to the subscriber.", + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "sent", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : "Number of email messages the user has opened.", + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "opens_count", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "clicks_count", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "open_rate", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "click_rate", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "ip_address", + "type" : "OBJECT", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "additionalProperties" : null, + "multipleValues" : null, + "options" : null, + "properties" : null, + "controlType" : "OBJECT_BUILDER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "subscribed_at", + "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" : "unsubscribed_at", + "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" : "created_at", + "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" : "updated_at", + "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" : "deleted_at", + "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" : "forget_at", + "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" : "fields", + "type" : "ARRAY", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "items" : null, + "maxItems" : null, + "minItems" : null, + "multipleValues" : null, + "options" : null, + "controlType" : "ARRAY_BUILDER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "groups", + "type" : "ARRAY", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "items" : null, + "maxItems" : null, + "minItems" : null, + "multipleValues" : null, + "options" : null, + "controlType" : "ARRAY_BUILDER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : "ID of the account that subscriber subscribed to.", + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "account_id", + "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 + } ], + "controlType" : "OBJECT_BUILDER", + "optionsDataSource" : null + }, + "sampleOutput" : null, + "placeholder" : 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" : "data", + "type" : "OBJECT", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "additionalProperties" : null, + "multipleValues" : null, + "options" : null, + "properties" : [ { + "advancedOption" : null, + "description" : "ID of the user that was created or updated.", + "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" : "The email address of the subscriber.", + "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" : "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" : "source", + "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" : "The number of messages that were sent to the subscriber.", + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "sent", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : "Number of email messages the user has opened.", + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "opens_count", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "clicks_count", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "open_rate", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "click_rate", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "ip_address", + "type" : "OBJECT", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "additionalProperties" : null, + "multipleValues" : null, + "options" : null, + "properties" : null, + "controlType" : "OBJECT_BUILDER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "subscribed_at", + "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" : "unsubscribed_at", + "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" : "created_at", + "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" : "updated_at", + "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" : "deleted_at", + "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" : "forget_at", + "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" : "fields", + "type" : "ARRAY", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "items" : null, + "maxItems" : null, + "minItems" : null, + "multipleValues" : null, + "options" : null, + "controlType" : "ARRAY_BUILDER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "groups", + "type" : "ARRAY", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "items" : null, + "maxItems" : null, + "minItems" : null, + "multipleValues" : null, + "options" : null, + "controlType" : "ARRAY_BUILDER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : "ID of the account that subscriber subscribed to.", + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "account_id", + "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 + } ], + "controlType" : "OBJECT_BUILDER", + "optionsDataSource" : null + }, + "sampleOutput" : null + }, + "properties" : [ ], + "title" : "Subscriber Created", + "type" : "DYNAMIC_WEBHOOK", + "webhookRawBody" : null, + "workflowSyncExecution" : null, + "poll" : null, + "deduplicate" : null, + "webhookDisable" : { }, + "webhookEnable" : { }, + "dynamicWebhookRefresh" : null, + "workflowNodeDescription" : null, + "processErrorResponse" : null, + "webhookRequest" : { }, + "listenerDisable" : null, + "listenerEnable" : null, + "webhookValidate" : null, + "webhookValidateOnEnable" : null + }, { + "batch" : null, + "deprecated" : null, + "description" : "Triggers when a subscriber unsubscribes.", + "help" : null, + "name" : "subscriberUnsubscribed", + "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" : "data", + "type" : "OBJECT", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "additionalProperties" : null, + "multipleValues" : null, + "options" : null, + "properties" : [ { + "advancedOption" : null, + "description" : "ID of the account that subscriber subscribed to.", + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "account_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" : "ID of the user that was created or updated.", + "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" : "The email address of the subscriber.", + "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" : "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" : "source", + "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" : "The number of messages that were sent to the subscriber.", + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "sent", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : "Number of email messages the user has opened.", + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "opens_count", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "clicks_count", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "open_rate", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "click_rate", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "subscribed_at", + "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" : "created_at", + "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" : "updated_at", + "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" : "fields", + "type" : "ARRAY", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "items" : null, + "maxItems" : null, + "minItems" : null, + "multipleValues" : null, + "options" : null, + "controlType" : "ARRAY_BUILDER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "groups", + "type" : "ARRAY", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "items" : null, + "maxItems" : null, + "minItems" : null, + "multipleValues" : null, + "options" : null, + "controlType" : "ARRAY_BUILDER", + "optionsDataSource" : null + } ], + "controlType" : "OBJECT_BUILDER", + "optionsDataSource" : null + } ], + "controlType" : "OBJECT_BUILDER", + "optionsDataSource" : null + }, + "sampleOutput" : null, + "placeholder" : 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" : "data", + "type" : "OBJECT", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "additionalProperties" : null, + "multipleValues" : null, + "options" : null, + "properties" : [ { + "advancedOption" : null, + "description" : "ID of the account that subscriber subscribed to.", + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "account_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" : "ID of the user that was created or updated.", + "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" : "The email address of the subscriber.", + "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" : "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" : "source", + "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" : "The number of messages that were sent to the subscriber.", + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "sent", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : "Number of email messages the user has opened.", + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "opens_count", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "clicks_count", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "open_rate", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "click_rate", + "type" : "INTEGER", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "maxValue" : null, + "minValue" : null, + "options" : null, + "controlType" : "INTEGER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "subscribed_at", + "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" : "created_at", + "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" : "updated_at", + "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" : "fields", + "type" : "ARRAY", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "items" : null, + "maxItems" : null, + "minItems" : null, + "multipleValues" : null, + "options" : null, + "controlType" : "ARRAY_BUILDER", + "optionsDataSource" : null + }, { + "advancedOption" : null, + "description" : null, + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : null, + "name" : "groups", + "type" : "ARRAY", + "defaultValue" : null, + "exampleValue" : null, + "label" : null, + "placeholder" : null, + "items" : null, + "maxItems" : null, + "minItems" : null, + "multipleValues" : null, + "options" : null, + "controlType" : "ARRAY_BUILDER", + "optionsDataSource" : null + } ], + "controlType" : "OBJECT_BUILDER", + "optionsDataSource" : null + } ], + "controlType" : "OBJECT_BUILDER", + "optionsDataSource" : null + }, + "sampleOutput" : null + }, + "properties" : [ ], + "title" : "Subscriber Unsubscribed", + "type" : "DYNAMIC_WEBHOOK", + "webhookRawBody" : null, + "workflowSyncExecution" : null, + "poll" : null, + "deduplicate" : null, + "webhookDisable" : { }, + "webhookEnable" : { }, + "dynamicWebhookRefresh" : null, + "workflowNodeDescription" : null, + "processErrorResponse" : null, + "webhookRequest" : { }, + "listenerDisable" : null, + "listenerEnable" : null, + "webhookValidate" : null, + "webhookValidateOnEnable" : null + } ], + "connection" : { + "authorizations" : [ { + "detectOn" : null, + "description" : null, + "name" : "bearer_token", + "properties" : [ { + "advancedOption" : null, + "description" : "API Token needed for authorization.", + "displayCondition" : null, + "expressionEnabled" : null, + "hidden" : null, + "metadata" : { }, + "required" : true, + "name" : "token", + "type" : "STRING", + "defaultValue" : null, + "exampleValue" : null, + "label" : "API Token", + "placeholder" : null, + "controlType" : "TEXT", + "languageId" : null, + "maxLength" : null, + "minLength" : null, + "options" : null, + "optionsDataSource" : null + } ], + "refreshOn" : null, + "title" : null, + "type" : "BEARER_TOKEN", + "acquire" : null, + "apply" : null, + "authorizationCallback" : null, + "authorizationUrl" : null, + "clientId" : null, + "clientSecret" : null, + "oauth2AuthorizationExtraQueryParameters" : null, + "pkce" : null, + "refresh" : null, + "refreshUrl" : null, + "scopes" : null, + "refreshToken" : null, + "tokenUrl" : null + } ], + "properties" : null, + "version" : 1, + "authorizationRequired" : null, + "baseUri" : { }, + "test" : null + } +} \ No newline at end of file diff --git a/server/libs/modules/components/monday/src/main/java/com/bytechef/component/monday/util/MondayOptionUtils.java b/server/libs/modules/components/monday/src/main/java/com/bytechef/component/monday/util/MondayOptionUtils.java index 35628665519..74cd561bd1c 100644 --- a/server/libs/modules/components/monday/src/main/java/com/bytechef/component/monday/util/MondayOptionUtils.java +++ b/server/libs/modules/components/monday/src/main/java/com/bytechef/component/monday/util/MondayOptionUtils.java @@ -44,7 +44,7 @@ private MondayOptionUtils() { } public static List> getBoardIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { String query = "query{boards(workspace_ids: [%s], order_by: created_at){id name}}" @@ -66,7 +66,7 @@ public static List> getBoardIdOptions( } public static List> getBoardItemsOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { String query = "query{boards(ids: [%s]){items_page{items{id name}}}}" @@ -100,7 +100,7 @@ public static List> getColumnTypeOptions() { } public static List> getGroupIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { String query = @@ -125,7 +125,7 @@ public static List> getGroupIdOptions( } public static List> getWorkspaceIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { String query = "query{workspaces{id name}}"; diff --git a/server/libs/modules/components/monday/src/main/java/com/bytechef/component/monday/util/MondayPropertiesUtils.java b/server/libs/modules/components/monday/src/main/java/com/bytechef/component/monday/util/MondayPropertiesUtils.java index 868e86e490f..c68174abce0 100644 --- a/server/libs/modules/components/monday/src/main/java/com/bytechef/component/monday/util/MondayPropertiesUtils.java +++ b/server/libs/modules/components/monday/src/main/java/com/bytechef/component/monday/util/MondayPropertiesUtils.java @@ -70,7 +70,7 @@ public class MondayPropertiesUtils { public static List> createPropertiesForItem( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, ActionContext context) { List boardColumns = getBoardColumns(inputParameters.getRequiredString(BOARD_ID), context); diff --git a/server/libs/modules/components/nifty/src/main/java/com/bytechef/component/nifty/util/AbstractNiftyUtils.java b/server/libs/modules/components/nifty/src/main/java/com/bytechef/component/nifty/util/AbstractNiftyUtils.java index af6acf5c39e..2c2961e2048 100644 --- a/server/libs/modules/components/nifty/src/main/java/com/bytechef/component/nifty/util/AbstractNiftyUtils.java +++ b/server/libs/modules/components/nifty/src/main/java/com/bytechef/component/nifty/util/AbstractNiftyUtils.java @@ -30,7 +30,7 @@ public abstract class AbstractNiftyUtils { public static List> getTaskIdOptions( Parameters inputParameters, - Parameters connectionParameters, Map dependencyPaths, String searchText, + Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return List.of(); @@ -38,7 +38,7 @@ public static List> getTaskIdOptions( public static List> getTaskGroupIdOptions( Parameters inputParameters, - Parameters connectionParameters, Map dependencyPaths, String searchText, + Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return List.of(); @@ -46,7 +46,7 @@ public static List> getTaskGroupIdOptions( public static List> getProjectIdOptions( Parameters inputParameters, - Parameters connectionParameters, Map dependencyPaths, String searchText, + Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return List.of(); @@ -54,7 +54,7 @@ public static List> getProjectIdOptions( public static List> getTemplateIdOptions( Parameters inputParameters, - Parameters connectionParameters, Map dependencyPaths, String searchText, + Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return List.of(); diff --git a/server/libs/modules/components/nifty/src/main/java/com/bytechef/component/nifty/util/NiftyUtils.java b/server/libs/modules/components/nifty/src/main/java/com/bytechef/component/nifty/util/NiftyUtils.java index 32346a1ce91..e77d1323834 100644 --- a/server/libs/modules/components/nifty/src/main/java/com/bytechef/component/nifty/util/NiftyUtils.java +++ b/server/libs/modules/components/nifty/src/main/java/com/bytechef/component/nifty/util/NiftyUtils.java @@ -41,7 +41,7 @@ private NiftyUtils() { } public static List> getAppIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, TriggerContext triggerContext) { Map body = triggerContext.http(http -> http.get("/apps")) @@ -64,7 +64,7 @@ public static List> getAppIdOptions( } public static List> getTaskGroupIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { Map body = context @@ -78,7 +78,7 @@ public static List> getTaskGroupIdOptions( } public static List> getProjectIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { Map body = context.http(http -> http.get("/projects")) @@ -90,7 +90,7 @@ public static List> getProjectIdOptions( } public static List> getTemplateIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { Map body = context.http(http -> http.get("/templates")) @@ -103,7 +103,7 @@ public static List> getTemplateIdOptions( } public static List> getTaskIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { Map body = context.http(http -> http.get("/tasks")) diff --git a/server/libs/modules/components/reckon/src/main/java/com/bytechef/component/reckon/util/AbstractReckonUtils.java b/server/libs/modules/components/reckon/src/main/java/com/bytechef/component/reckon/util/AbstractReckonUtils.java index f7bbbd06a44..eab2caaa13b 100644 --- a/server/libs/modules/components/reckon/src/main/java/com/bytechef/component/reckon/util/AbstractReckonUtils.java +++ b/server/libs/modules/components/reckon/src/main/java/com/bytechef/component/reckon/util/AbstractReckonUtils.java @@ -30,7 +30,7 @@ public abstract class AbstractReckonUtils { public static List> getBookIdOptions( Parameters inputParameters, - Parameters connectionParameters, Map dependencyPaths, String searchText, + Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return List.of(); @@ -38,7 +38,7 @@ public static List> getBookIdOptions( public static List> getCustomerOptions( Parameters inputParameters, - Parameters connectionParameters, Map dependencyPaths, String searchText, + Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return List.of(); @@ -46,7 +46,7 @@ public static List> getCustomerOptions( public static List> getSupplierOptions( Parameters inputParameters, - Parameters connectionParameters, Map dependencyPaths, String searchText, + Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return List.of(); diff --git a/server/libs/modules/components/reckon/src/main/java/com/bytechef/component/reckon/util/ReckonUtils.java b/server/libs/modules/components/reckon/src/main/java/com/bytechef/component/reckon/util/ReckonUtils.java index a6e72f8fce9..3fbe54d6665 100644 --- a/server/libs/modules/components/reckon/src/main/java/com/bytechef/component/reckon/util/ReckonUtils.java +++ b/server/libs/modules/components/reckon/src/main/java/com/bytechef/component/reckon/util/ReckonUtils.java @@ -47,7 +47,7 @@ private ReckonUtils() { } public static List> getBookIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { Map>> body = context @@ -61,7 +61,7 @@ public static List> getBookIdOptions( } public static List> getCustomerOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { Map>> body = context @@ -75,7 +75,7 @@ public static List> getCustomerOptions( } public static List> getSupplierOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { Map>> body = context diff --git a/server/libs/modules/components/shopify/src/main/java/com/bytechef/component/shopify/util/AbstractShopifyUtils.java b/server/libs/modules/components/shopify/src/main/java/com/bytechef/component/shopify/util/AbstractShopifyUtils.java index 7ab8ea89b4f..ca2f92cd8b0 100644 --- a/server/libs/modules/components/shopify/src/main/java/com/bytechef/component/shopify/util/AbstractShopifyUtils.java +++ b/server/libs/modules/components/shopify/src/main/java/com/bytechef/component/shopify/util/AbstractShopifyUtils.java @@ -30,7 +30,7 @@ public abstract class AbstractShopifyUtils { public static List> getProductIdOptions( Parameters inputParameters, - Parameters connectionParameters, Map dependencyPaths, String searchText, + Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return List.of(); @@ -38,7 +38,7 @@ public static List> getProductIdOptions( public static List> getOrderIdOptions( Parameters inputParameters, - Parameters connectionParameters, Map dependencyPaths, String searchText, + Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return List.of(); @@ -46,7 +46,7 @@ public static List> getOrderIdOptions( public static List> getVariantIdOptions( Parameters inputParameters, - Parameters connectionParameters, Map dependencyPaths, String searchText, + Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return List.of(); diff --git a/server/libs/modules/components/shopify/src/main/java/com/bytechef/component/shopify/util/ShopifyUtils.java b/server/libs/modules/components/shopify/src/main/java/com/bytechef/component/shopify/util/ShopifyUtils.java index d5284896d35..66fe4f5d8b9 100644 --- a/server/libs/modules/components/shopify/src/main/java/com/bytechef/component/shopify/util/ShopifyUtils.java +++ b/server/libs/modules/components/shopify/src/main/java/com/bytechef/component/shopify/util/ShopifyUtils.java @@ -38,7 +38,7 @@ private ShopifyUtils() { } public static List> getOrderIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { Map>> body = context @@ -57,7 +57,7 @@ public static List> getOrderIdOptions( } public static List> getProductIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { Map>> body = context @@ -76,12 +76,12 @@ public static List> getProductIdOptions( } public static List> getVariantIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { Map>> body = context.http( http -> http.get( - "/products/" + inputParameters.getRequiredFromPath(dependencyPaths.get(PRODUCT_ID), String.class) + + "/products/" + inputParameters.getRequiredFromPath(lookupDependsOnPaths.get(PRODUCT_ID), String.class) + "/variants.json")) .configuration(Http.responseType(Http.ResponseType.JSON)) .execute() diff --git a/server/libs/modules/components/slack/src/main/java/com/bytechef/component/slack/util/SlackUtils.java b/server/libs/modules/components/slack/src/main/java/com/bytechef/component/slack/util/SlackUtils.java index 4530dfd2031..56480be6eeb 100644 --- a/server/libs/modules/components/slack/src/main/java/com/bytechef/component/slack/util/SlackUtils.java +++ b/server/libs/modules/components/slack/src/main/java/com/bytechef/component/slack/util/SlackUtils.java @@ -56,7 +56,7 @@ public static Object sendMessage( } public static List> getChannelOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, ActionContext context) { Map body = context @@ -79,7 +79,7 @@ public static List> getChannelOptions( } public static List> getUserOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, ActionContext context) { Map body = context diff --git a/server/libs/modules/components/spotify/src/main/java/com/bytechef/component/spotify/util/AbstractSpotifyUtils.java b/server/libs/modules/components/spotify/src/main/java/com/bytechef/component/spotify/util/AbstractSpotifyUtils.java index 72d8c9d6400..474425b1283 100644 --- a/server/libs/modules/components/spotify/src/main/java/com/bytechef/component/spotify/util/AbstractSpotifyUtils.java +++ b/server/libs/modules/components/spotify/src/main/java/com/bytechef/component/spotify/util/AbstractSpotifyUtils.java @@ -30,7 +30,7 @@ public abstract class AbstractSpotifyUtils { public static List> getPlaylistIdOptions( Parameters inputParameters, - Parameters connectionParameters, Map dependencyPaths, String searchText, + Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return List.of(); diff --git a/server/libs/modules/components/spotify/src/main/java/com/bytechef/component/spotify/util/SpotifyUtils.java b/server/libs/modules/components/spotify/src/main/java/com/bytechef/component/spotify/util/SpotifyUtils.java index e119c106225..9c3bd865801 100644 --- a/server/libs/modules/components/spotify/src/main/java/com/bytechef/component/spotify/util/SpotifyUtils.java +++ b/server/libs/modules/components/spotify/src/main/java/com/bytechef/component/spotify/util/SpotifyUtils.java @@ -49,7 +49,7 @@ public static String getCurrentUserId(ActionContext actionContext) { } public static List> getPlaylistIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { Map body = context diff --git a/server/libs/modules/components/stripe/src/main/java/com/bytechef/component/stripe/util/AbstractStripeUtils.java b/server/libs/modules/components/stripe/src/main/java/com/bytechef/component/stripe/util/AbstractStripeUtils.java index da8182b3d35..e185c1a3954 100644 --- a/server/libs/modules/components/stripe/src/main/java/com/bytechef/component/stripe/util/AbstractStripeUtils.java +++ b/server/libs/modules/components/stripe/src/main/java/com/bytechef/component/stripe/util/AbstractStripeUtils.java @@ -30,7 +30,7 @@ public abstract class AbstractStripeUtils { public static List> getCustomerOptions( Parameters inputParameters, - Parameters connectionParameters, Map dependencyPaths, String searchText, + Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return List.of(); diff --git a/server/libs/modules/components/stripe/src/main/java/com/bytechef/component/stripe/util/StripeUtils.java b/server/libs/modules/components/stripe/src/main/java/com/bytechef/component/stripe/util/StripeUtils.java index 6921f18fa66..133ed8213e3 100644 --- a/server/libs/modules/components/stripe/src/main/java/com/bytechef/component/stripe/util/StripeUtils.java +++ b/server/libs/modules/components/stripe/src/main/java/com/bytechef/component/stripe/util/StripeUtils.java @@ -42,7 +42,7 @@ private StripeUtils() { } public static List> getCustomerOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { Map body = context.http( diff --git a/server/libs/modules/components/teamwork/src/main/java/com/bytechef/component/teamwork/util/AbstractTeamworkUtils.java b/server/libs/modules/components/teamwork/src/main/java/com/bytechef/component/teamwork/util/AbstractTeamworkUtils.java index 20ec5763e6f..2e4f1f65900 100644 --- a/server/libs/modules/components/teamwork/src/main/java/com/bytechef/component/teamwork/util/AbstractTeamworkUtils.java +++ b/server/libs/modules/components/teamwork/src/main/java/com/bytechef/component/teamwork/util/AbstractTeamworkUtils.java @@ -30,7 +30,7 @@ public abstract class AbstractTeamworkUtils { public static List> getTasklistIdOptions( Parameters inputParameters, - Parameters connectionParameters, Map dependencyPaths, String searchText, + Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return List.of(); diff --git a/server/libs/modules/components/teamwork/src/main/java/com/bytechef/component/teamwork/util/TeamworkUtils.java b/server/libs/modules/components/teamwork/src/main/java/com/bytechef/component/teamwork/util/TeamworkUtils.java index 16ea269910a..1c8c2a15286 100644 --- a/server/libs/modules/components/teamwork/src/main/java/com/bytechef/component/teamwork/util/TeamworkUtils.java +++ b/server/libs/modules/components/teamwork/src/main/java/com/bytechef/component/teamwork/util/TeamworkUtils.java @@ -36,7 +36,7 @@ private TeamworkUtils() { } public static List> getTasklistIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { Map body = context.http(http -> http.get("/tasklists")) diff --git a/server/libs/modules/components/todoist/src/main/java/com/bytechef/component/todoist/util/AbstractTodoistUtils.java b/server/libs/modules/components/todoist/src/main/java/com/bytechef/component/todoist/util/AbstractTodoistUtils.java index 633217e1053..805ab54ed05 100644 --- a/server/libs/modules/components/todoist/src/main/java/com/bytechef/component/todoist/util/AbstractTodoistUtils.java +++ b/server/libs/modules/components/todoist/src/main/java/com/bytechef/component/todoist/util/AbstractTodoistUtils.java @@ -30,7 +30,7 @@ public abstract class AbstractTodoistUtils { public static List> getTaskIdOptions( Parameters inputParameters, - Parameters connectionParameters, Map dependencyPaths, String searchText, + Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return List.of(); @@ -38,7 +38,7 @@ public static List> getTaskIdOptions( public static List> getProjectIdOptions( Parameters inputParameters, - Parameters connectionParameters, Map dependencyPaths, String searchText, + Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return List.of(); diff --git a/server/libs/modules/components/todoist/src/main/java/com/bytechef/component/todoist/util/TodoistUtils.java b/server/libs/modules/components/todoist/src/main/java/com/bytechef/component/todoist/util/TodoistUtils.java index 15d76c5cfad..f2c452a127d 100644 --- a/server/libs/modules/components/todoist/src/main/java/com/bytechef/component/todoist/util/TodoistUtils.java +++ b/server/libs/modules/components/todoist/src/main/java/com/bytechef/component/todoist/util/TodoistUtils.java @@ -37,7 +37,7 @@ private TodoistUtils() { public static List> getTaskIdOptions( Parameters inputParameters, - Parameters connectionParameters, Map dependencyPaths, String searchText, + Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return getOptions(context, "/tasks", "content"); @@ -45,7 +45,7 @@ public static List> getTaskIdOptions( public static List> getProjectIdOptions( Parameters inputParameters, - Parameters connectionParameters, Map dependencyPaths, String searchText, + Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return getOptions(context, "/projects", "name"); diff --git a/server/libs/modules/components/twilio/src/main/java/com/bytechef/component/twilio/util/TwilioUtils.java b/server/libs/modules/components/twilio/src/main/java/com/bytechef/component/twilio/util/TwilioUtils.java index a0673f50fa6..e079f437c6a 100644 --- a/server/libs/modules/components/twilio/src/main/java/com/bytechef/component/twilio/util/TwilioUtils.java +++ b/server/libs/modules/components/twilio/src/main/java/com/bytechef/component/twilio/util/TwilioUtils.java @@ -36,7 +36,7 @@ private TwilioUtils() { } public static List> getContentSidOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { Map body = context.http(http -> http.get("https://content.twilio.com/v1/Content")) diff --git a/server/libs/modules/components/webflow/src/main/java/com/bytechef/component/webflow/util/AbstractWebflowUtils.java b/server/libs/modules/components/webflow/src/main/java/com/bytechef/component/webflow/util/AbstractWebflowUtils.java index e26e593e958..8c4c7538d1c 100644 --- a/server/libs/modules/components/webflow/src/main/java/com/bytechef/component/webflow/util/AbstractWebflowUtils.java +++ b/server/libs/modules/components/webflow/src/main/java/com/bytechef/component/webflow/util/AbstractWebflowUtils.java @@ -30,7 +30,7 @@ public abstract class AbstractWebflowUtils { public static List> getSiteIdOptions( Parameters inputParameters, - Parameters connectionParameters, Map dependencyPaths, String searchText, + Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return List.of(); @@ -38,7 +38,7 @@ public static List> getSiteIdOptions( public static List> getCollectionIdOptions( Parameters inputParameters, - Parameters connectionParameters, Map dependencyPaths, String searchText, + Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return List.of(); @@ -46,7 +46,7 @@ public static List> getCollectionIdOptions( public static List> getOrderIdOptions( Parameters inputParameters, - Parameters connectionParameters, Map dependencyPaths, String searchText, + Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return List.of(); diff --git a/server/libs/modules/components/webflow/src/main/java/com/bytechef/component/webflow/util/WebflowUtils.java b/server/libs/modules/components/webflow/src/main/java/com/bytechef/component/webflow/util/WebflowUtils.java index 001f680bc95..27d1fc4e08b 100644 --- a/server/libs/modules/components/webflow/src/main/java/com/bytechef/component/webflow/util/WebflowUtils.java +++ b/server/libs/modules/components/webflow/src/main/java/com/bytechef/component/webflow/util/WebflowUtils.java @@ -41,7 +41,7 @@ private WebflowUtils() { } public static List> getItemIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { Map body = context diff --git a/server/libs/modules/components/xero/src/main/java/com/bytechef/component/xero/util/XeroUtils.java b/server/libs/modules/components/xero/src/main/java/com/bytechef/component/xero/util/XeroUtils.java index fc6e81e6b7f..a6f91c5015a 100644 --- a/server/libs/modules/components/xero/src/main/java/com/bytechef/component/xero/util/XeroUtils.java +++ b/server/libs/modules/components/xero/src/main/java/com/bytechef/component/xero/util/XeroUtils.java @@ -105,7 +105,7 @@ public static Object createInvoice( } public static List> getAccountCodeOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, ActionContext context) { Map body = context @@ -128,7 +128,7 @@ public static List> getAccountCodeOptions( } public static List> getBrandingThemeIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, ActionContext context) { Map body = context @@ -151,7 +151,7 @@ public static List> getBrandingThemeIdOptions( } public static List> getContactIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, ActionContext context) { Map body = context @@ -174,7 +174,7 @@ public static List> getContactIdOptions( } public static List> getCurrencyCodeOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, ActionContext context) { Map body = context diff --git a/server/libs/modules/components/zeplin/src/main/java/com/bytechef/component/zeplin/util/AbstractZeplinUtils.java b/server/libs/modules/components/zeplin/src/main/java/com/bytechef/component/zeplin/util/AbstractZeplinUtils.java index 6349ffa391d..fd6f178e9bf 100644 --- a/server/libs/modules/components/zeplin/src/main/java/com/bytechef/component/zeplin/util/AbstractZeplinUtils.java +++ b/server/libs/modules/components/zeplin/src/main/java/com/bytechef/component/zeplin/util/AbstractZeplinUtils.java @@ -30,7 +30,7 @@ public abstract class AbstractZeplinUtils { public static List> getProjectIdOptions( Parameters inputParameters, - Parameters connectionParameters, Map dependencyPaths, String searchText, + Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { return List.of(); 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 8be8858ae9e..d2a447e935e 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 @@ -37,7 +37,7 @@ private ZeplinUtils() { } public static List> getProjectIdOptions( - Parameters inputParameters, Parameters connectionParameters, Map dependencyPaths, + Parameters inputParameters, Parameters connectionParameters, Map lookupDependsOnPaths, String searchText, Context context) { List> body = context 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 1a6454f53e4..0df26cef942 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 @@ -75,16 +75,17 @@ public List executeDynamicProperties( Map inputParameters, List lookupDependsOnPaths, ComponentConnection connection, ActionContext context) { - WrapResult wrapResult = wrap(inputParameters, lookupDependsOnPaths, connection); + ConvertResult convertResult = convert(inputParameters, lookupDependsOnPaths, connection); try { ActionPropertiesFunction propertiesFunction = getComponentPropertiesFunction( - componentName, componentVersion, actionName, propertyName, wrapResult.inputParameters, - wrapResult.connectionParameters, wrapResult.lookupDependsOnPathsMap, context); + componentName, componentVersion, actionName, propertyName, convertResult.inputParameters, + convertResult.connectionParameters, convertResult.lookupDependsOnPathsMap, context); return propertiesFunction .apply( - wrapResult.inputParameters, wrapResult.connectionParameters, wrapResult.lookupDependsOnPathsMap, + convertResult.inputParameters, convertResult.connectionParameters, + convertResult.lookupDependsOnPathsMap, context) .stream() .map(valueProperty -> (Property) Property.toProperty(valueProperty)) @@ -152,16 +153,16 @@ public List