This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
commit ad7845d3fe0a319681dad10b8ab4323f51f8d249 Author: Claus Ibsen <[email protected]> AuthorDate: Fri Nov 27 16:27:48 2026 +0100 CAMEL-23832: camel-slack - improve the component and option descriptions This commit rewrites the component description and the texts of 9 endpoint options and 2 component options of slack. The channel text now says what the producer and the consumer expect (the consumer takes the name without #), the token text lists the scopes of both sides instead of only the consumer ones, and serverUrl, naturalOrder, conversationType and the deprecated username and icon options say which side uses them and when Slack applies them. Documentation only, no behavior change. The component JSON, the catalog copy, the doc page header and the DSL are regenerated. camel-slack is marked as done in tasks/component-descriptions.md. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Claus Ibsen <[email protected]> --- .../org/apache/camel/catalog/components/slack.json | 24 +++--- .../apache/camel/catalog/docs/slack-component.adoc | 2 +- .../org/apache/camel/component/slack/slack.json | 24 +++--- .../camel-slack/src/main/docs/slack-component.adoc | 2 +- .../camel/component/slack/SlackComponent.java | 18 ++--- .../camel/component/slack/SlackEndpoint.java | 72 ++++++++--------- .../component/ComponentsBuilderFactory.java | 3 +- .../dsl/SlackComponentBuilderFactory.java | 20 +++-- .../builder/endpoint/StaticEndpointBuilders.java | 20 +++-- .../endpoint/dsl/SlackEndpointBuilderFactory.java | 92 +++++++++++++++------- tasks/component-descriptions.md | 2 +- 11 files changed, 161 insertions(+), 118 deletions(-) diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/slack.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/slack.json index 8df99085642e..979d5565c39a 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/slack.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/slack.json @@ -3,7 +3,7 @@ "kind": "component", "name": "slack", "title": "Slack", - "description": "Send and receive messages to\/from Slack.", + "description": "Send messages to a Slack channel or user, and receive the new messages of a Slack conversation.", "deprecated": false, "firstVersion": "2.16.0", "label": "social", @@ -29,8 +29,8 @@ "autowiredEnabled": { "index": 2, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching t [...] "healthCheckConsumerEnabled": { "index": 3, "kind": "property", "displayName": "Health Check Consumer Enabled", "group": "health", "label": "health", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Used for enabling or disabling all consumer based health checks from this component" }, "healthCheckProducerEnabled": { "index": 4, "kind": "property", "displayName": "Health Check Producer Enabled", "group": "health", "label": "health", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Used for enabling or disabling all producer based health checks from this component. Notice: Camel has by default disabled all producer based health-checks. You can turn on producer [...] - "token": { "index": 5, "kind": "property", "displayName": "Token", "group": "token", "label": "token", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The token to access Slack. This app needs to have channels:history, groups:history, im:history, mpim:history, channels:read, groups:read, im:read and mpim:read permissions. The User OAuth Token is the kind of token needed." }, - "webhookUrl": { "index": 6, "kind": "property", "displayName": "Webhook Url", "group": "webhook", "label": "webhook", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The incoming webhook URL" } + "token": { "index": 5, "kind": "property", "displayName": "Token", "group": "token", "label": "token", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The OAuth token of a Slack app, a bot token (xoxb-) or a user token (xoxp-), that endpoints use unless they set their own token. The producer needs the chat:write scope, the consumer the history and read scopes of its conversationType, such a [...] + "webhookUrl": { "index": 6, "kind": "property", "displayName": "Webhook Url", "group": "webhook", "label": "webhook", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The URL of a Slack incoming webhook, such as https:\/\/hooks.slack.com\/services\/..., that the producers post the message to as JSON. Endpoints use it unless they set their own webhookUrl, and only when no token is set." } }, "bodyTypes": { "consumerOut": { "carriers": [ "pojo" ], "javaType": "com.slack.api.model.Message", "description": "One message per new message of the conversation, the most recent first, or the oldest first with naturalOrder; the first poll gives the last message of the history. The text is ${body.text}" }, @@ -38,21 +38,21 @@ "producerOut": { "carriers": [ "unchanged" ], "description": "Unchanged: the answer of Slack is not kept" } }, "properties": { - "channel": { "index": 0, "kind": "path", "displayName": "Channel", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The channel name (syntax #name) or slack user (syntax userName) to send a message directly to an user." }, - "token": { "index": 1, "kind": "parameter", "displayName": "Token", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "security": "secret", "description": "The token to access Slack. This app needs to have channels:history, groups:history, im:history, mpim:history, channels:read, groups:read, im:read and mpim:read permissions. The User OAuth Token is the kind of token needed." }, - "conversationType": { "index": 2, "kind": "parameter", "displayName": "Conversation Type", "group": "consumer", "label": "consumer", "required": false, "type": "enum", "javaType": "com.slack.api.model.ConversationType", "enum": [ "PUBLIC_CHANNEL", "PRIVATE_CHANNEL", "MPIM", "IM" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "PUBLIC_CHANNEL", "description": "Type of conversation" }, + "channel": { "index": 0, "kind": "path", "displayName": "Channel", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "For the producer, where the message goes: a channel name such as #general, a channel ID, or a user ID for a direct message, as chat.postMessage of Slack accepts. For the consumer, the name of the conversation without #, such as general, which it l [...] + "token": { "index": 1, "kind": "parameter", "displayName": "Token", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "security": "secret", "description": "The OAuth token of a Slack app, a bot token (xoxb-) or a user token (xoxp-). The producer posts with chat.postMessage, which needs the chat:write scope, and uses the token instead of webhookUrl when both are set. The consume [...] + "conversationType": { "index": 2, "kind": "parameter", "displayName": "Conversation Type", "group": "consumer", "label": "consumer", "required": false, "type": "enum", "javaType": "com.slack.api.model.ConversationType", "enum": [ "PUBLIC_CHANNEL", "PRIVATE_CHANNEL", "MPIM", "IM" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "PUBLIC_CHANNEL", "description": "The type of the conversation that the consumer reads, which it looks up by its name with conversa [...] "maxResults": { "index": 3, "kind": "parameter", "displayName": "Max Results", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "10", "description": "The maximum number of messages that the consumer requests from the conversation history at a time. When more new messages are available, the consumer reads the following pages in the same poll." }, - "naturalOrder": { "index": 4, "kind": "parameter", "displayName": "Natural Order", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Create exchanges in natural order (oldest to newest) or not" }, + "naturalOrder": { "index": 4, "kind": "parameter", "displayName": "Natural Order", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the consumer routes the new messages of a poll from the oldest to the newest. By default the most recent message comes first." }, "sendEmptyMessageWhenIdle": { "index": 5, "kind": "parameter", "displayName": "Send Empty Message When Idle", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If the polling consumer did not poll any files, you can enable this option to send an empty message (no body) instead." }, - "serverUrl": { "index": 6, "kind": "parameter", "displayName": "Server Url", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "https:\/\/slack.com", "description": "The Server URL of the Slack instance" }, + "serverUrl": { "index": 6, "kind": "parameter", "displayName": "Server Url", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "https:\/\/slack.com", "description": "The base URL of the Slack Web API. The consumer, and the producer with a token, call the API methods at this URL followed by \/api\/. Change it for a proxy or a test server only." }, "bridgeErrorHandler": { "index": 7, "kind": "parameter", "displayName": "Bridge Error Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming [...] "exceptionHandler": { "index": 8, "kind": "parameter", "displayName": "Exception Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.", "deprecated": false, "autowired": false, "secret": false, "description": "To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By def [...] "exchangePattern": { "index": 9, "kind": "parameter", "displayName": "Exchange Pattern", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "enum", "javaType": "org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut" ], "deprecated": false, "autowired": false, "secret": false, "description": "Sets the exchange pattern when the consumer creates an exchange." }, "pollStrategy": { "index": 10, "kind": "parameter", "displayName": "Poll Strategy", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.PollingConsumerPollStrategy", "deprecated": false, "autowired": false, "secret": false, "description": "A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom implementation to control error handling usually occurred during the po [...] - "iconEmoji": { "index": 11, "kind": "parameter", "displayName": "Icon Emoji", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": true, "autowired": false, "secret": false, "description": "Use a Slack emoji as an avatar" }, - "iconUrl": { "index": 12, "kind": "parameter", "displayName": "Icon Url", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": true, "autowired": false, "secret": false, "description": "The avatar that the component will use when sending message to a channel or user." }, - "username": { "index": 13, "kind": "parameter", "displayName": "Username", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": true, "autowired": false, "secret": true, "security": "secret", "description": "This is the username that the bot will have when sending messages to a channel or user." }, - "webhookUrl": { "index": 14, "kind": "parameter", "displayName": "Webhook Url", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The incoming webhook URL" }, + "iconEmoji": { "index": 11, "kind": "parameter", "displayName": "Icon Emoji", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": true, "autowired": false, "secret": false, "description": "An emoji, such as :ghost:, shown as the icon of the messages that the producer sends. Slack applies it only for a bot token with the chat:write.customize scope, or for a legacy incoming webhook." }, + "iconUrl": { "index": 12, "kind": "parameter", "displayName": "Icon Url", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": true, "autowired": false, "secret": false, "description": "The URL of an image shown as the icon of the messages that the producer sends. Slack applies it only for a bot token with the chat:write.customize scope, or for a legacy incoming webhook. iconEmoji takes precedence over it." }, + "username": { "index": 13, "kind": "parameter", "displayName": "Username", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": true, "autowired": false, "secret": true, "security": "secret", "description": "The name shown as the author of the messages that the producer sends. Slack applies it only for a bot token with the chat:write.customize scope, or for a legacy incoming webhook." }, + "webhookUrl": { "index": 14, "kind": "parameter", "displayName": "Webhook Url", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The URL of a Slack incoming webhook, such as https:\/\/hooks.slack.com\/services\/..., that the producer posts the message to as JSON. It is used only when no token is set. The consumer does not use it." }, "lazyStartProducer": { "index": 15, "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a produ [...] "backoffErrorThreshold": { "index": 16, "kind": "parameter", "displayName": "Backoff Error Threshold", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "description": "The number of subsequent error polls (failed due some error) that should happen before the backoffMultipler should kick-in." }, "backoffIdleThreshold": { "index": 17, "kind": "parameter", "displayName": "Backoff Idle Threshold", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "description": "The number of subsequent idle polls that should happen before the backoffMultipler should kick-in." }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/slack-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/slack-component.adoc index e40389c2ada0..1941676f79ec 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/slack-component.adoc +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/slack-component.adoc @@ -2,7 +2,7 @@ :doctitle: Slack :shortname: slack :artifactid: camel-slack -:description: Send and receive messages to/from Slack. +:description: Send messages to a Slack channel or user, and receive the new messages of a Slack conversation. :since: 2.16 :supportlevel: Stable :tabs-sync-option: diff --git a/components/camel-slack/src/generated/resources/META-INF/org/apache/camel/component/slack/slack.json b/components/camel-slack/src/generated/resources/META-INF/org/apache/camel/component/slack/slack.json index 8df99085642e..979d5565c39a 100644 --- a/components/camel-slack/src/generated/resources/META-INF/org/apache/camel/component/slack/slack.json +++ b/components/camel-slack/src/generated/resources/META-INF/org/apache/camel/component/slack/slack.json @@ -3,7 +3,7 @@ "kind": "component", "name": "slack", "title": "Slack", - "description": "Send and receive messages to\/from Slack.", + "description": "Send messages to a Slack channel or user, and receive the new messages of a Slack conversation.", "deprecated": false, "firstVersion": "2.16.0", "label": "social", @@ -29,8 +29,8 @@ "autowiredEnabled": { "index": 2, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching t [...] "healthCheckConsumerEnabled": { "index": 3, "kind": "property", "displayName": "Health Check Consumer Enabled", "group": "health", "label": "health", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Used for enabling or disabling all consumer based health checks from this component" }, "healthCheckProducerEnabled": { "index": 4, "kind": "property", "displayName": "Health Check Producer Enabled", "group": "health", "label": "health", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Used for enabling or disabling all producer based health checks from this component. Notice: Camel has by default disabled all producer based health-checks. You can turn on producer [...] - "token": { "index": 5, "kind": "property", "displayName": "Token", "group": "token", "label": "token", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The token to access Slack. This app needs to have channels:history, groups:history, im:history, mpim:history, channels:read, groups:read, im:read and mpim:read permissions. The User OAuth Token is the kind of token needed." }, - "webhookUrl": { "index": 6, "kind": "property", "displayName": "Webhook Url", "group": "webhook", "label": "webhook", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The incoming webhook URL" } + "token": { "index": 5, "kind": "property", "displayName": "Token", "group": "token", "label": "token", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The OAuth token of a Slack app, a bot token (xoxb-) or a user token (xoxp-), that endpoints use unless they set their own token. The producer needs the chat:write scope, the consumer the history and read scopes of its conversationType, such a [...] + "webhookUrl": { "index": 6, "kind": "property", "displayName": "Webhook Url", "group": "webhook", "label": "webhook", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The URL of a Slack incoming webhook, such as https:\/\/hooks.slack.com\/services\/..., that the producers post the message to as JSON. Endpoints use it unless they set their own webhookUrl, and only when no token is set." } }, "bodyTypes": { "consumerOut": { "carriers": [ "pojo" ], "javaType": "com.slack.api.model.Message", "description": "One message per new message of the conversation, the most recent first, or the oldest first with naturalOrder; the first poll gives the last message of the history. The text is ${body.text}" }, @@ -38,21 +38,21 @@ "producerOut": { "carriers": [ "unchanged" ], "description": "Unchanged: the answer of Slack is not kept" } }, "properties": { - "channel": { "index": 0, "kind": "path", "displayName": "Channel", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The channel name (syntax #name) or slack user (syntax userName) to send a message directly to an user." }, - "token": { "index": 1, "kind": "parameter", "displayName": "Token", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "security": "secret", "description": "The token to access Slack. This app needs to have channels:history, groups:history, im:history, mpim:history, channels:read, groups:read, im:read and mpim:read permissions. The User OAuth Token is the kind of token needed." }, - "conversationType": { "index": 2, "kind": "parameter", "displayName": "Conversation Type", "group": "consumer", "label": "consumer", "required": false, "type": "enum", "javaType": "com.slack.api.model.ConversationType", "enum": [ "PUBLIC_CHANNEL", "PRIVATE_CHANNEL", "MPIM", "IM" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "PUBLIC_CHANNEL", "description": "Type of conversation" }, + "channel": { "index": 0, "kind": "path", "displayName": "Channel", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "For the producer, where the message goes: a channel name such as #general, a channel ID, or a user ID for a direct message, as chat.postMessage of Slack accepts. For the consumer, the name of the conversation without #, such as general, which it l [...] + "token": { "index": 1, "kind": "parameter", "displayName": "Token", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "security": "secret", "description": "The OAuth token of a Slack app, a bot token (xoxb-) or a user token (xoxp-). The producer posts with chat.postMessage, which needs the chat:write scope, and uses the token instead of webhookUrl when both are set. The consume [...] + "conversationType": { "index": 2, "kind": "parameter", "displayName": "Conversation Type", "group": "consumer", "label": "consumer", "required": false, "type": "enum", "javaType": "com.slack.api.model.ConversationType", "enum": [ "PUBLIC_CHANNEL", "PRIVATE_CHANNEL", "MPIM", "IM" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "PUBLIC_CHANNEL", "description": "The type of the conversation that the consumer reads, which it looks up by its name with conversa [...] "maxResults": { "index": 3, "kind": "parameter", "displayName": "Max Results", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "10", "description": "The maximum number of messages that the consumer requests from the conversation history at a time. When more new messages are available, the consumer reads the following pages in the same poll." }, - "naturalOrder": { "index": 4, "kind": "parameter", "displayName": "Natural Order", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Create exchanges in natural order (oldest to newest) or not" }, + "naturalOrder": { "index": 4, "kind": "parameter", "displayName": "Natural Order", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the consumer routes the new messages of a poll from the oldest to the newest. By default the most recent message comes first." }, "sendEmptyMessageWhenIdle": { "index": 5, "kind": "parameter", "displayName": "Send Empty Message When Idle", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If the polling consumer did not poll any files, you can enable this option to send an empty message (no body) instead." }, - "serverUrl": { "index": 6, "kind": "parameter", "displayName": "Server Url", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "https:\/\/slack.com", "description": "The Server URL of the Slack instance" }, + "serverUrl": { "index": 6, "kind": "parameter", "displayName": "Server Url", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "https:\/\/slack.com", "description": "The base URL of the Slack Web API. The consumer, and the producer with a token, call the API methods at this URL followed by \/api\/. Change it for a proxy or a test server only." }, "bridgeErrorHandler": { "index": 7, "kind": "parameter", "displayName": "Bridge Error Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming [...] "exceptionHandler": { "index": 8, "kind": "parameter", "displayName": "Exception Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.", "deprecated": false, "autowired": false, "secret": false, "description": "To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By def [...] "exchangePattern": { "index": 9, "kind": "parameter", "displayName": "Exchange Pattern", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "enum", "javaType": "org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut" ], "deprecated": false, "autowired": false, "secret": false, "description": "Sets the exchange pattern when the consumer creates an exchange." }, "pollStrategy": { "index": 10, "kind": "parameter", "displayName": "Poll Strategy", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.PollingConsumerPollStrategy", "deprecated": false, "autowired": false, "secret": false, "description": "A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom implementation to control error handling usually occurred during the po [...] - "iconEmoji": { "index": 11, "kind": "parameter", "displayName": "Icon Emoji", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": true, "autowired": false, "secret": false, "description": "Use a Slack emoji as an avatar" }, - "iconUrl": { "index": 12, "kind": "parameter", "displayName": "Icon Url", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": true, "autowired": false, "secret": false, "description": "The avatar that the component will use when sending message to a channel or user." }, - "username": { "index": 13, "kind": "parameter", "displayName": "Username", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": true, "autowired": false, "secret": true, "security": "secret", "description": "This is the username that the bot will have when sending messages to a channel or user." }, - "webhookUrl": { "index": 14, "kind": "parameter", "displayName": "Webhook Url", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The incoming webhook URL" }, + "iconEmoji": { "index": 11, "kind": "parameter", "displayName": "Icon Emoji", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": true, "autowired": false, "secret": false, "description": "An emoji, such as :ghost:, shown as the icon of the messages that the producer sends. Slack applies it only for a bot token with the chat:write.customize scope, or for a legacy incoming webhook." }, + "iconUrl": { "index": 12, "kind": "parameter", "displayName": "Icon Url", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": true, "autowired": false, "secret": false, "description": "The URL of an image shown as the icon of the messages that the producer sends. Slack applies it only for a bot token with the chat:write.customize scope, or for a legacy incoming webhook. iconEmoji takes precedence over it." }, + "username": { "index": 13, "kind": "parameter", "displayName": "Username", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": true, "autowired": false, "secret": true, "security": "secret", "description": "The name shown as the author of the messages that the producer sends. Slack applies it only for a bot token with the chat:write.customize scope, or for a legacy incoming webhook." }, + "webhookUrl": { "index": 14, "kind": "parameter", "displayName": "Webhook Url", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The URL of a Slack incoming webhook, such as https:\/\/hooks.slack.com\/services\/..., that the producer posts the message to as JSON. It is used only when no token is set. The consumer does not use it." }, "lazyStartProducer": { "index": 15, "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a produ [...] "backoffErrorThreshold": { "index": 16, "kind": "parameter", "displayName": "Backoff Error Threshold", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "description": "The number of subsequent error polls (failed due some error) that should happen before the backoffMultipler should kick-in." }, "backoffIdleThreshold": { "index": 17, "kind": "parameter", "displayName": "Backoff Idle Threshold", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "description": "The number of subsequent idle polls that should happen before the backoffMultipler should kick-in." }, diff --git a/components/camel-slack/src/main/docs/slack-component.adoc b/components/camel-slack/src/main/docs/slack-component.adoc index e40389c2ada0..1941676f79ec 100644 --- a/components/camel-slack/src/main/docs/slack-component.adoc +++ b/components/camel-slack/src/main/docs/slack-component.adoc @@ -2,7 +2,7 @@ :doctitle: Slack :shortname: slack :artifactid: camel-slack -:description: Send and receive messages to/from Slack. +:description: Send messages to a Slack channel or user, and receive the new messages of a Slack conversation. :since: 2.16 :supportlevel: Stable :tabs-sync-option: diff --git a/components/camel-slack/src/main/java/org/apache/camel/component/slack/SlackComponent.java b/components/camel-slack/src/main/java/org/apache/camel/component/slack/SlackComponent.java index 73493f39f9ce..1e3b1dd164bc 100644 --- a/components/camel-slack/src/main/java/org/apache/camel/component/slack/SlackComponent.java +++ b/components/camel-slack/src/main/java/org/apache/camel/component/slack/SlackComponent.java @@ -27,10 +27,17 @@ import org.apache.camel.support.HealthCheckComponent; @Component("slack") public class SlackComponent extends HealthCheckComponent { - @Metadata(label = "webhook") + @Metadata(label = "webhook", + description = "The URL of a Slack incoming webhook, such as https://hooks.slack.com/services/..., that the" + + " producers post the message to as JSON. Endpoints use it unless they set their own" + + " webhookUrl, and only when no token is set.") private String webhookUrl; - @Metadata(label = "token") + @Metadata(label = "token", + description = "The OAuth token of a Slack app, a bot token (xoxb-) or a user token (xoxp-), that endpoints" + + " use unless they set their own token. The producer needs the chat:write scope, the consumer" + + " the history and read scopes of its conversationType, such as channels:history and" + + " channels:read.") private String token; public SlackComponent() { @@ -52,9 +59,6 @@ public class SlackComponent extends HealthCheckComponent { return webhookUrl; } - /** - * The incoming webhook URL - */ public void setWebhookUrl(String webhookUrl) { this.webhookUrl = webhookUrl; } @@ -63,10 +67,6 @@ public class SlackComponent extends HealthCheckComponent { return token; } - /** - * The token to access Slack. This app needs to have channels:history, groups:history, im:history, mpim:history, - * channels:read, groups:read, im:read and mpim:read permissions. The User OAuth Token is the kind of token needed. - */ public void setToken(String token) { this.token = token; } diff --git a/components/camel-slack/src/main/java/org/apache/camel/component/slack/SlackEndpoint.java b/components/camel-slack/src/main/java/org/apache/camel/component/slack/SlackEndpoint.java index dad140f3fd68..07e4ab4a372b 100644 --- a/components/camel-slack/src/main/java/org/apache/camel/component/slack/SlackEndpoint.java +++ b/components/camel-slack/src/main/java/org/apache/camel/component/slack/SlackEndpoint.java @@ -33,7 +33,7 @@ import org.apache.camel.support.ScheduledPollEndpoint; import org.apache.camel.util.ObjectHelper; /** - * Send and receive messages to/from Slack. + * Send messages to a Slack channel or user, and receive the new messages of a Slack conversation. */ @UriEndpoint(firstVersion = "2.16.0", scheme = "slack", title = "Slack", syntax = "slack:channel", category = { Category.SOCIAL }) @@ -55,31 +55,55 @@ public class SlackEndpoint extends ScheduledPollEndpoint { description = "Milliseconds before the next poll.") private long delay = SlackConsumer.DEFAULT_CONSUMER_DELAY; - @UriPath + @UriPath(description = "For the producer, where the message goes: a channel name such as #general, a channel ID, or a" + + " user ID for a direct message, as chat.postMessage of Slack accepts. For the consumer, the name" + + " of the conversation without #, such as general, which it looks up among the conversations" + + " of conversationType.") @Metadata(required = true) private String channel; - @UriParam(label = "producer") + @UriParam(label = "producer", + description = "The URL of a Slack incoming webhook, such as https://hooks.slack.com/services/..., that the" + + " producer posts the message to as JSON. It is used only when no token is set. The consumer" + + " does not use it.") private String webhookUrl; - @UriParam(label = "producer", security = "secret") + @UriParam(label = "producer", security = "secret", + description = "The name shown as the author of the messages that the producer sends. Slack applies it only" + + " for a bot token with the chat:write.customize scope, or for a legacy incoming webhook.") @Deprecated private String username; - @UriParam(label = "producer") + @UriParam(label = "producer", + description = "The URL of an image shown as the icon of the messages that the producer sends. Slack" + + " applies it only for a bot token with the chat:write.customize scope, or for a legacy" + + " incoming webhook. iconEmoji takes precedence over it.") @Deprecated private String iconUrl; - @UriParam(label = "producer") + @UriParam(label = "producer", + description = "An emoji, such as :ghost:, shown as the icon of the messages that the producer sends. Slack" + + " applies it only for a bot token with the chat:write.customize scope, or for a legacy" + + " incoming webhook.") @Deprecated private String iconEmoji; - @UriParam(security = "secret") + @UriParam(security = "secret", + description = "The OAuth token of a Slack app, a bot token (xoxb-) or a user token (xoxp-). The producer" + + " posts with chat.postMessage, which needs the chat:write scope, and uses the token instead" + + " of webhookUrl when both are set. The consumer requires it, with the history and read" + + " scopes of conversationType, such as channels:history and channels:read.") private String token; @UriParam(label = "consumer", defaultValue = "10") private String maxResults = "10"; - @UriParam(label = "consumer", defaultValue = "https://slack.com") + @UriParam(label = "consumer", defaultValue = "https://slack.com", + description = "The base URL of the Slack Web API. The consumer, and the producer with a token, call the" + + " API methods at this URL followed by /api/. Change it for a proxy or a test server only.") private String serverUrl = "https://slack.com"; @UriParam(label = "consumer", defaultValue = "false", javaType = "boolean", - description = "Create exchanges in natural order (oldest to newest) or not") + description = "Whether the consumer routes the new messages of a poll from the oldest to the newest. By" + + " default the most recent message comes first.") private boolean naturalOrder; @UriParam(label = "consumer", enums = "PUBLIC_CHANNEL,PRIVATE_CHANNEL,MPIM,IM", defaultValue = "PUBLIC_CHANNEL", - description = "Type of conversation") + description = "The type of the conversation that the consumer reads, which it looks up by its name with" + + " conversations.list of Slack: a public channel, a private channel, a group direct message" + + " (MPIM) or a direct message (IM). The token needs the scopes of that type, such as" + + " groups:history and groups:read for PRIVATE_CHANNEL.") private ConversationType conversationType = ConversationType.PUBLIC_CHANNEL; /** @@ -124,9 +148,6 @@ public class SlackEndpoint extends ScheduledPollEndpoint { return consumer; } - /** - * The incoming webhook URL - */ public void setWebhookUrl(String webhookUrl) { this.webhookUrl = webhookUrl; } @@ -139,9 +160,6 @@ public class SlackEndpoint extends ScheduledPollEndpoint { return channel; } - /** - * The channel name (syntax #name) or slack user (syntax @userName) to send a message directly to an user. - */ public void setChannel(String channel) { this.channel = channel; } @@ -150,9 +168,6 @@ public class SlackEndpoint extends ScheduledPollEndpoint { return username; } - /** - * This is the username that the bot will have when sending messages to a channel or user. - */ public void setUsername(String username) { this.username = username; } @@ -161,9 +176,6 @@ public class SlackEndpoint extends ScheduledPollEndpoint { return iconUrl; } - /** - * The avatar that the component will use when sending message to a channel or user. - */ public void setIconUrl(String iconUrl) { this.iconUrl = iconUrl; } @@ -172,9 +184,6 @@ public class SlackEndpoint extends ScheduledPollEndpoint { return iconEmoji; } - /** - * Use a Slack emoji as an avatar - */ public void setIconEmoji(String iconEmoji) { this.iconEmoji = iconEmoji; } @@ -183,10 +192,6 @@ public class SlackEndpoint extends ScheduledPollEndpoint { return token; } - /** - * The token to access Slack. This app needs to have channels:history, groups:history, im:history, mpim:history, - * channels:read, groups:read, im:read and mpim:read permissions. The User OAuth Token is the kind of token needed. - */ public void setToken(String token) { this.token = token; } @@ -207,16 +212,10 @@ public class SlackEndpoint extends ScheduledPollEndpoint { return serverUrl; } - /** - * The Server URL of the Slack instance - */ public void setServerUrl(String serverUrl) { this.serverUrl = serverUrl; } - /** - * Is consuming message in natural order - */ public void setNaturalOrder(boolean naturalOrder) { this.naturalOrder = naturalOrder; } @@ -225,9 +224,6 @@ public class SlackEndpoint extends ScheduledPollEndpoint { return naturalOrder; } - /** - * The type of the conversation - */ public void setConversationType(ConversationType conversationType) { this.conversationType = conversationType; } diff --git a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java index 9c7fc4b43ca4..0cb8e66c224b 100644 --- a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java +++ b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java @@ -4750,7 +4750,8 @@ public interface ComponentsBuilderFactory { } /** * Slack (camel-slack) - * Send and receive messages to/from Slack. + * Send messages to a Slack channel or user, and receive the new messages of + * a Slack conversation. * * Category: social * Since: 2.16 diff --git a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/SlackComponentBuilderFactory.java b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/SlackComponentBuilderFactory.java index b7fa1f8ade6e..7587814d0d07 100644 --- a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/SlackComponentBuilderFactory.java +++ b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/SlackComponentBuilderFactory.java @@ -24,7 +24,8 @@ import org.apache.camel.builder.component.ComponentBuilder; import org.apache.camel.component.slack.SlackComponent; /** - * Send and receive messages to/from Slack. + * Send messages to a Slack channel or user, and receive the new messages of a + * Slack conversation. * * Generated by camel build tools - do NOT edit this file! */ @@ -33,7 +34,8 @@ public interface SlackComponentBuilderFactory { /** * Slack (camel-slack) - * Send and receive messages to/from Slack. + * Send messages to a Slack channel or user, and receive the new messages of + * a Slack conversation. * * Category: social * Since: 2.16 @@ -164,10 +166,11 @@ public interface SlackComponentBuilderFactory { } /** - * The token to access Slack. This app needs to have channels:history, - * groups:history, im:history, mpim:history, channels:read, groups:read, - * im:read and mpim:read permissions. The User OAuth Token is the kind - * of token needed. + * The OAuth token of a Slack app, a bot token (xoxb-) or a user token + * (xoxp-), that endpoints use unless they set their own token. The + * producer needs the chat:write scope, the consumer the history and + * read scopes of its conversationType, such as channels:history and + * channels:read. * * The option is a: <code>java.lang.String</code> type. * @@ -182,7 +185,10 @@ public interface SlackComponentBuilderFactory { } /** - * The incoming webhook URL. + * The URL of a Slack incoming webhook, such as + * https://hooks.slack.com/services/..., that the producers post the + * message to as JSON. Endpoints use it unless they set their own + * webhookUrl, and only when no token is set. * * The option is a: <code>java.lang.String</code> type. * diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java index 265cbd303bd2..1a1d1f00b57d 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java @@ -16182,7 +16182,8 @@ public class StaticEndpointBuilders { } /** * Slack (camel-slack) - * Send and receive messages to/from Slack. + * Send messages to a Slack channel or user, and receive the new messages of + * a Slack conversation. * * Category: social * Since: 2.16 @@ -16191,8 +16192,11 @@ public class StaticEndpointBuilders { * Syntax: <code>slack:channel</code> * * Path parameter: channel (required) - * The channel name (syntax #name) or slack user (syntax userName) to send a - * message directly to an user. + * For the producer, where the message goes: a channel name such as + * #general, a channel ID, or a user ID for a direct message, as + * chat.postMessage of Slack accepts. For the consumer, the name of the + * conversation without #, such as general, which it looks up among the + * conversations of conversationType. * * @param path channel * @return the dsl builder @@ -16202,7 +16206,8 @@ public class StaticEndpointBuilders { } /** * Slack (camel-slack) - * Send and receive messages to/from Slack. + * Send messages to a Slack channel or user, and receive the new messages of + * a Slack conversation. * * Category: social * Since: 2.16 @@ -16211,8 +16216,11 @@ public class StaticEndpointBuilders { * Syntax: <code>slack:channel</code> * * Path parameter: channel (required) - * The channel name (syntax #name) or slack user (syntax userName) to send a - * message directly to an user. + * For the producer, where the message goes: a channel name such as + * #general, a channel ID, or a user ID for a direct message, as + * chat.postMessage of Slack accepts. For the consumer, the name of the + * conversation without #, such as general, which it looks up among the + * conversations of conversationType. * * @param componentName to use a custom component name for the endpoint * instead of the default name diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/SlackEndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/SlackEndpointBuilderFactory.java index d849687b5f1e..b53521e8553a 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/SlackEndpointBuilderFactory.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/SlackEndpointBuilderFactory.java @@ -27,7 +27,8 @@ import org.apache.camel.builder.EndpointProducerBuilder; import org.apache.camel.builder.endpoint.AbstractEndpointBuilder; /** - * Send and receive messages to/from Slack. + * Send messages to a Slack channel or user, and receive the new messages of a + * Slack conversation. * * Generated by camel build tools - do NOT edit this file! */ @@ -44,10 +45,11 @@ public interface SlackEndpointBuilderFactory { return (AdvancedSlackEndpointConsumerBuilder) this; } /** - * The token to access Slack. This app needs to have channels:history, - * groups:history, im:history, mpim:history, channels:read, groups:read, - * im:read and mpim:read permissions. The User OAuth Token is the kind - * of token needed. + * The OAuth token of a Slack app, a bot token (xoxb-) or a user token + * (xoxp-). The producer posts with chat.postMessage, which needs the + * chat:write scope, and uses the token instead of webhookUrl when both + * are set. The consumer requires it, with the history and read scopes + * of conversationType, such as channels:history and channels:read. * * The option is a: <code>java.lang.String</code> type. * @@ -61,7 +63,11 @@ public interface SlackEndpointBuilderFactory { return this; } /** - * Type of conversation. + * The type of the conversation that the consumer reads, which it looks + * up by its name with conversations.list of Slack: a public channel, a + * private channel, a group direct message (MPIM) or a direct message + * (IM). The token needs the scopes of that type, such as groups:history + * and groups:read for PRIVATE_CHANNEL. * * The option is a: <code>com.slack.api.model.ConversationType</code> * type. @@ -77,7 +83,11 @@ public interface SlackEndpointBuilderFactory { return this; } /** - * Type of conversation. + * The type of the conversation that the consumer reads, which it looks + * up by its name with conversations.list of Slack: a public channel, a + * private channel, a group direct message (MPIM) or a direct message + * (IM). The token needs the scopes of that type, such as groups:history + * and groups:read for PRIVATE_CHANNEL. * * The option will be converted to a * <code>com.slack.api.model.ConversationType</code> type. @@ -110,7 +120,8 @@ public interface SlackEndpointBuilderFactory { return this; } /** - * Create exchanges in natural order (oldest to newest) or not. + * Whether the consumer routes the new messages of a poll from the + * oldest to the newest. By default the most recent message comes first. * * The option is a: <code>boolean</code> type. * @@ -125,7 +136,8 @@ public interface SlackEndpointBuilderFactory { return this; } /** - * Create exchanges in natural order (oldest to newest) or not. + * Whether the consumer routes the new messages of a poll from the + * oldest to the newest. By default the most recent message comes first. * * The option will be converted to a <code>boolean</code> type. * @@ -172,7 +184,9 @@ public interface SlackEndpointBuilderFactory { return this; } /** - * The Server URL of the Slack instance. + * The base URL of the Slack Web API. The consumer, and the producer + * with a token, call the API methods at this URL followed by /api/. + * Change it for a proxy or a test server only. * * The option is a: <code>java.lang.String</code> type. * @@ -862,10 +876,11 @@ public interface SlackEndpointBuilderFactory { } /** - * The token to access Slack. This app needs to have channels:history, - * groups:history, im:history, mpim:history, channels:read, groups:read, - * im:read and mpim:read permissions. The User OAuth Token is the kind - * of token needed. + * The OAuth token of a Slack app, a bot token (xoxb-) or a user token + * (xoxp-). The producer posts with chat.postMessage, which needs the + * chat:write scope, and uses the token instead of webhookUrl when both + * are set. The consumer requires it, with the history and read scopes + * of conversationType, such as channels:history and channels:read. * * The option is a: <code>java.lang.String</code> type. * @@ -879,7 +894,9 @@ public interface SlackEndpointBuilderFactory { return this; } /** - * Use a Slack emoji as an avatar. + * An emoji, such as :ghost:, shown as the icon of the messages that the + * producer sends. Slack applies it only for a bot token with the + * chat:write.customize scope, or for a legacy incoming webhook. * * The option is a: <code>java.lang.String</code> type. * @@ -894,8 +911,10 @@ public interface SlackEndpointBuilderFactory { return this; } /** - * The avatar that the component will use when sending message to a - * channel or user. + * The URL of an image shown as the icon of the messages that the + * producer sends. Slack applies it only for a bot token with the + * chat:write.customize scope, or for a legacy incoming webhook. + * iconEmoji takes precedence over it. * * The option is a: <code>java.lang.String</code> type. * @@ -910,8 +929,9 @@ public interface SlackEndpointBuilderFactory { return this; } /** - * This is the username that the bot will have when sending messages to - * a channel or user. + * The name shown as the author of the messages that the producer sends. + * Slack applies it only for a bot token with the chat:write.customize + * scope, or for a legacy incoming webhook. * * The option is a: <code>java.lang.String</code> type. * @@ -926,7 +946,10 @@ public interface SlackEndpointBuilderFactory { return this; } /** - * The incoming webhook URL. + * The URL of a Slack incoming webhook, such as + * https://hooks.slack.com/services/..., that the producer posts the + * message to as JSON. It is used only when no token is set. The + * consumer does not use it. * * The option is a: <code>java.lang.String</code> type. * @@ -1009,10 +1032,11 @@ public interface SlackEndpointBuilderFactory { } /** - * The token to access Slack. This app needs to have channels:history, - * groups:history, im:history, mpim:history, channels:read, groups:read, - * im:read and mpim:read permissions. The User OAuth Token is the kind - * of token needed. + * The OAuth token of a Slack app, a bot token (xoxb-) or a user token + * (xoxp-). The producer posts with chat.postMessage, which needs the + * chat:write scope, and uses the token instead of webhookUrl when both + * are set. The consumer requires it, with the history and read scopes + * of conversationType, such as channels:history and channels:read. * * The option is a: <code>java.lang.String</code> type. * @@ -1043,7 +1067,8 @@ public interface SlackEndpointBuilderFactory { public interface SlackBuilders { /** * Slack (camel-slack) - * Send and receive messages to/from Slack. + * Send messages to a Slack channel or user, and receive the new + * messages of a Slack conversation. * * Category: social * Since: 2.16 @@ -1052,8 +1077,11 @@ public interface SlackEndpointBuilderFactory { * Syntax: <code>slack:channel</code> * * Path parameter: channel (required) - * The channel name (syntax #name) or slack user (syntax userName) to - * send a message directly to an user. + * For the producer, where the message goes: a channel name such as + * #general, a channel ID, or a user ID for a direct message, as + * chat.postMessage of Slack accepts. For the consumer, the name of the + * conversation without #, such as general, which it looks up among the + * conversations of conversationType. * * @param path channel * @return the dsl builder @@ -1063,7 +1091,8 @@ public interface SlackEndpointBuilderFactory { } /** * Slack (camel-slack) - * Send and receive messages to/from Slack. + * Send messages to a Slack channel or user, and receive the new + * messages of a Slack conversation. * * Category: social * Since: 2.16 @@ -1072,8 +1101,11 @@ public interface SlackEndpointBuilderFactory { * Syntax: <code>slack:channel</code> * * Path parameter: channel (required) - * The channel name (syntax #name) or slack user (syntax userName) to - * send a message directly to an user. + * For the producer, where the message goes: a channel name such as + * #general, a channel ID, or a user ID for a direct message, as + * chat.postMessage of Slack accepts. For the consumer, the name of the + * conversation without #, such as general, which it looks up among the + * conversations of conversationType. * * @param componentName to use a custom component name for the endpoint * instead of the default name diff --git a/tasks/component-descriptions.md b/tasks/component-descriptions.md index d736da4f58e2..41795a8f5374 100644 --- a/tasks/component-descriptions.md +++ b/tasks/component-descriptions.md @@ -335,7 +335,7 @@ or removes its row. | camel-shell | shell | | | camel-sjms | sjms | | | camel-sjms2 | sjms2 | yes | -| camel-slack | slack | | +| camel-slack | slack | yes | | camel-smb | smb | | | camel-smooks | smooks | | | camel-smpp | smpp, smpps | |
