Skip to content

Commit

Permalink
feat(element-template-generator): remove the value property and use t…
Browse files Browse the repository at this point in the history
…his annotation to other connetors
  • Loading branch information
mathias-vandaele committed Feb 14, 2025
1 parent c2d9063 commit ada930f
Show file tree
Hide file tree
Showing 28 changed files with 81 additions and 101 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,11 @@
"tooltip" : "<a href=\"https://docs.camunda.io/docs/next/apis-tools/camunda-api-rest/specifications/create-document-link/\">Camunda Document</a>",
"type" : "Dropdown",
"choices" : [ {
"name" : "S3",
"value" : "S3"
}, {
"name" : "Camunda Document",
"value" : "UPLOADED"
}, {
"name" : "S3",
"value" : "S3"
} ]
}, {
"id" : "input.documentS3Bucket",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,11 @@
"tooltip" : "<a href=\"https://docs.camunda.io/docs/next/apis-tools/camunda-api-rest/specifications/create-document-link/\">Camunda Document</a>",
"type" : "Dropdown",
"choices" : [ {
"name" : "S3",
"value" : "S3"
}, {
"name" : "Camunda Document",
"value" : "UPLOADED"
}, {
"name" : "S3",
"value" : "S3"
} ]
}, {
"id" : "input.documentS3Bucket",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
*/
package io.camunda.connector.textract.model;

import io.camunda.connector.generator.java.annotation.EnumValue;

public enum DocumentLocationType {
@EnumValue(label = "S3", order = 1)
S3,
@EnumValue(label = "Camunda Document", order = 0)
UPLOADED;
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@
*/
package io.camunda.connector.textract.model;

import io.camunda.connector.generator.java.annotation.EnumValue;

public enum TextractExecutionType {
@EnumValue(label = "Real-time", order = 1)
SYNC,
@EnumValue(label = "Polling", order = 2)
POLLING,
ASYNC
@EnumValue(label = "Asynchronous", order = 0)
ASYNC;
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ public record TextractRequestData(
type = TemplateProperty.PropertyType.Dropdown,
defaultValue = "ASYNC",
feel = FeelMode.disabled,
choices = {
@TemplateProperty.DropdownPropertyChoice(value = "ASYNC", label = "Asynchronous"),
@TemplateProperty.DropdownPropertyChoice(value = "SYNC", label = "Real-time"),
@TemplateProperty.DropdownPropertyChoice(value = "POLLING", label = "Polling")
},
description = "Endpoint inference type")
@NotNull
TextractExecutionType executionType,
Expand All @@ -36,12 +31,6 @@ public record TextractRequestData(
feel = FeelMode.disabled,
type = TemplateProperty.PropertyType.Dropdown,
defaultValue = "UPLOADED",
choices = {
@TemplateProperty.DropdownPropertyChoice(value = "S3", label = "S3"),
@TemplateProperty.DropdownPropertyChoice(
value = "UPLOADED",
label = "Camunda Document")
},
tooltip =
"<a href=\"https://docs.camunda.io/docs/next/apis-tools/camunda-api-rest/specifications/create-document-link/\">Camunda Document</a>",
condition =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,12 @@
"choices" : [ {
"name" : "TLS",
"value" : "TLS"
}, {
"name" : "None",
"value" : "NONE"
}, {
"name" : "SSL",
"value" : "SSL"
}, {
"name" : "None",
"value" : "NONE"
} ]
}, {
"id" : "data.folderToListen",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,12 @@
"choices" : [ {
"name" : "TLS",
"value" : "TLS"
}, {
"name" : "None",
"value" : "NONE"
}, {
"name" : "SSL",
"value" : "SSL"
}, {
"name" : "None",
"value" : "NONE"
} ]
}, {
"id" : "data.folderToListen",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,12 @@
"choices" : [ {
"name" : "TLS",
"value" : "TLS"
}, {
"name" : "None",
"value" : "NONE"
}, {
"name" : "SSL",
"value" : "SSL"
}, {
"name" : "None",
"value" : "NONE"
} ]
}, {
"id" : "data.folderToListen",
Expand Down
18 changes: 9 additions & 9 deletions connectors/email/element-templates/email-outbound-connector.json
Original file line number Diff line number Diff line change
Expand Up @@ -216,12 +216,12 @@
"choices" : [ {
"name" : "TLS",
"value" : "TLS"
}, {
"name" : "None",
"value" : "NONE"
}, {
"name" : "SSL",
"value" : "SSL"
}, {
"name" : "None",
"value" : "NONE"
} ]
}, {
"id" : "data.pop3Host",
Expand Down Expand Up @@ -287,12 +287,12 @@
"choices" : [ {
"name" : "TLS",
"value" : "TLS"
}, {
"name" : "None",
"value" : "NONE"
}, {
"name" : "SSL",
"value" : "SSL"
}, {
"name" : "None",
"value" : "NONE"
} ]
}, {
"id" : "data.smtpHost",
Expand Down Expand Up @@ -358,12 +358,12 @@
"choices" : [ {
"name" : "TLS",
"value" : "TLS"
}, {
"name" : "None",
"value" : "NONE"
}, {
"name" : "SSL",
"value" : "SSL"
}, {
"name" : "None",
"value" : "NONE"
} ]
}, {
"id" : "data.smtpActionDiscriminator",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,12 @@
"choices" : [ {
"name" : "TLS",
"value" : "TLS"
}, {
"name" : "None",
"value" : "NONE"
}, {
"name" : "SSL",
"value" : "SSL"
}, {
"name" : "None",
"value" : "NONE"
} ]
}, {
"id" : "data.folderToListen",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,12 @@
"choices" : [ {
"name" : "TLS",
"value" : "TLS"
}, {
"name" : "None",
"value" : "NONE"
}, {
"name" : "SSL",
"value" : "SSL"
}, {
"name" : "None",
"value" : "NONE"
} ]
}, {
"id" : "data.folderToListen",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,12 @@
"choices" : [ {
"name" : "TLS",
"value" : "TLS"
}, {
"name" : "None",
"value" : "NONE"
}, {
"name" : "SSL",
"value" : "SSL"
}, {
"name" : "None",
"value" : "NONE"
} ]
}, {
"id" : "data.pop3Host",
Expand Down Expand Up @@ -292,12 +292,12 @@
"choices" : [ {
"name" : "TLS",
"value" : "TLS"
}, {
"name" : "None",
"value" : "NONE"
}, {
"name" : "SSL",
"value" : "SSL"
}, {
"name" : "None",
"value" : "NONE"
} ]
}, {
"id" : "data.smtpHost",
Expand Down Expand Up @@ -363,12 +363,12 @@
"choices" : [ {
"name" : "TLS",
"value" : "TLS"
}, {
"name" : "None",
"value" : "NONE"
}, {
"name" : "SSL",
"value" : "SSL"
}, {
"name" : "None",
"value" : "NONE"
} ]
}, {
"id" : "data.smtpActionDiscriminator",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,12 @@
"choices" : [ {
"name" : "TLS",
"value" : "TLS"
}, {
"name" : "None",
"value" : "NONE"
}, {
"name" : "SSL",
"value" : "SSL"
}, {
"name" : "None",
"value" : "NONE"
} ]
}, {
"id" : "data.folderToListen",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@
*/
package io.camunda.connector.email.config;

import io.camunda.connector.generator.java.annotation.EnumValue;

public enum CryptographicProtocol {
@EnumValue(label = "None", order = 2)
NONE,
@EnumValue(label = "TLS", order = 0)
TLS,
@EnumValue(label = "SSL", order = 1)
SSL;
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@ public record ImapConfig(
type = TemplateProperty.PropertyType.Dropdown,
constraints = @TemplateProperty.PropertyConstraints(notEmpty = true),
defaultValue = "TLS",
choices = {
@TemplateProperty.DropdownPropertyChoice(label = "TLS", value = "TLS"),
@TemplateProperty.DropdownPropertyChoice(label = "None", value = "NONE"),
@TemplateProperty.DropdownPropertyChoice(label = "SSL", value = "SSL")
},
binding =
@TemplateProperty.PropertyBinding(
name = "data.imapConfig.imapCryptographicProtocol"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@ public record Pop3Config(
type = TemplateProperty.PropertyType.Dropdown,
constraints = @TemplateProperty.PropertyConstraints(notEmpty = true),
defaultValue = "TLS",
choices = {
@TemplateProperty.DropdownPropertyChoice(label = "TLS", value = "TLS"),
@TemplateProperty.DropdownPropertyChoice(label = "None", value = "NONE"),
@TemplateProperty.DropdownPropertyChoice(label = "SSL", value = "SSL")
},
binding =
@TemplateProperty.PropertyBinding(
name = "data.pop3Config.pop3CryptographicProtocol"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@ public record SmtpConfig(
type = TemplateProperty.PropertyType.Dropdown,
constraints = @TemplateProperty.PropertyConstraints(notEmpty = true),
defaultValue = "TLS",
choices = {
@TemplateProperty.DropdownPropertyChoice(label = "TLS", value = "TLS"),
@TemplateProperty.DropdownPropertyChoice(label = "None", value = "NONE"),
@TemplateProperty.DropdownPropertyChoice(label = "SSL", value = "SSL")
},
binding =
@TemplateProperty.PropertyBinding(
name = "data.smtpConfig.smtpCryptographicProtocol"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@
package io.camunda.connector.email.outbound.protocols.actions;

import com.fasterxml.jackson.annotation.JsonEnumDefaultValue;
import io.camunda.connector.generator.java.annotation.EnumValue;

public enum ContentType {
@JsonEnumDefaultValue
@EnumValue(label = "PLAIN", order = 0)
PLAIN("text/plain; charset=utf-8"),
@EnumValue(label = "HTML", order = 1)
HTML("text/html; charset=utf-8"),
@EnumValue(label = "HTML & Plaintext", order = 2)
MULTIPART("multipart/mixed; charset=utf-8");

private final String value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,6 @@ public record ImapListEmails(
type = TemplateProperty.PropertyType.Dropdown,
constraints = @TemplateProperty.PropertyConstraints(notEmpty = true),
defaultValue = "ASC",
choices = {
@TemplateProperty.DropdownPropertyChoice(label = "ASC", value = "ASC"),
@TemplateProperty.DropdownPropertyChoice(label = "DESC", value = "DESC")
},
binding = @TemplateProperty.PropertyBinding(name = "data.imapAction.sortOrder"))
@NotNull
SortOrder sortOrder)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ public record Pop3ListEmails(
type = TemplateProperty.PropertyType.Dropdown,
constraints = @TemplateProperty.PropertyConstraints(notEmpty = true),
defaultValue = "SENT_DATE",
choices = {
@TemplateProperty.DropdownPropertyChoice(label = "Sent Date", value = "SENT_DATE"),
@TemplateProperty.DropdownPropertyChoice(label = "Size", value = "SIZE")
},
binding = @TemplateProperty.PropertyBinding(name = "data.pop3Action.sortField"))
@NotNull
SortFieldPop3 sortField,
Expand All @@ -53,10 +49,6 @@ public record Pop3ListEmails(
type = TemplateProperty.PropertyType.Dropdown,
constraints = @TemplateProperty.PropertyConstraints(notEmpty = true),
defaultValue = "ASC",
choices = {
@TemplateProperty.DropdownPropertyChoice(label = "ASC", value = "ASC"),
@TemplateProperty.DropdownPropertyChoice(label = "DESC", value = "DESC")
},
binding = @TemplateProperty.PropertyBinding(name = "data.pop3Action.sortOrder"))
@NotNull
SortOrder sortOrder)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,6 @@ public record SmtpSendEmail(
id = "contentType",
defaultValue = "PLAIN",
type = TemplateProperty.PropertyType.Dropdown,
choices = {
@TemplateProperty.DropdownPropertyChoice(label = "PLAIN", value = "PLAIN"),
@TemplateProperty.DropdownPropertyChoice(label = "HTML", value = "HTML"),
@TemplateProperty.DropdownPropertyChoice(
label = "HTML & Plaintext",
value = "MULTIPART")
},
tooltip = "Email's contentType",
binding = @TemplateProperty.PropertyBinding(name = "data.smtpAction.contentType"))
@Valid
Expand Down
Loading

0 comments on commit ada930f

Please sign in to comment.