diff --git a/docs/api-generated/connectors/connector-apis-passthru.asciidoc b/docs/api-generated/connectors/connector-apis-passthru.asciidoc index a478c7eb57512..5bd4a4bc44f45 100644 --- a/docs/api-generated/connectors/connector-apis-passthru.asciidoc +++ b/docs/api-generated/connectors/connector-apis-passthru.asciidoc @@ -951,7 +951,8 @@ Any modifications made to this file will be overwritten.
  • connector_response_properties_servicenow - Connector response properties for a ServiceNow ITSM connector
  • connector_response_properties_servicenow_itom - Connector response properties for a ServiceNow ITOM connector
  • connector_response_properties_servicenow_sir - Connector response properties for a ServiceNow SecOps connector
  • -
  • connector_response_properties_slack - Connector response properties for a Slack connector
  • +
  • connector_response_properties_slack_api - Connector response properties for a Slack connector
  • +
  • connector_response_properties_slack_webhook - Connector response properties for a Slack connector
  • connector_response_properties_swimlane - Connector response properties for a Swimlane connector
  • connector_response_properties_teams - Connector response properties for a Microsoft Teams connector
  • connector_response_properties_tines - Connector response properties for a Tines connector
  • @@ -1015,6 +1016,9 @@ Any modifications made to this file will be overwritten.
  • secrets_properties_opsgenie - Connector secrets properties for an Opsgenie connector
  • secrets_properties_resilient - Connector secrets properties for IBM Resilient connector
  • secrets_properties_servicenow - Connector secrets properties for ServiceNow ITOM, ServiceNow ITSM, and ServiceNow SecOps connectors
  • +
  • secrets_properties_slack - Connector secrets properties for a Slack connector
  • +
  • secrets_properties_slack_oneOf -
  • +
  • secrets_properties_slack_oneOf_1 -
  • secrets_properties_swimlane - Connector secrets properties for a Swimlane connector
  • updateConnector_400_response -
  • update_connector_request_cases_webhook - Update Webhook - Case Managment connector request
  • @@ -1025,6 +1029,7 @@ Any modifications made to this file will be overwritten.
  • update_connector_request_serverlog - Update server log connector request
  • update_connector_request_servicenow - Update ServiceNow ITSM connector or ServiceNow SecOps request
  • update_connector_request_servicenow_itom - Create ServiceNow ITOM connector request
  • +
  • update_connector_request_slack - Update Slack connector request
  • update_connector_request_swimlane - Update Swimlane connector request
  • @@ -1543,7 +1548,21 @@ Any modifications made to this file will be overwritten.
    -

    connector_response_properties_slack - Connector response properties for a Slack connector Up

    +

    connector_response_properties_slack_api - Connector response properties for a Slack connector Up

    +
    +
    +
    connector_type_id
    String The type of connector.
    +
    Enum:
    +
    .slack_api
    +
    id
    String The identifier for the connector.
    +
    is_deprecated
    Boolean Indicates whether the connector type is deprecated.
    +
    is_missing_secrets (optional)
    Boolean Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type.
    +
    is_preconfigured
    Boolean Indicates whether it is a preconfigured connector. If true, the config and is_missing_secrets properties are omitted from the response.
    +
    name
    String The display name for the connector.
    +
    +
    +
    +

    connector_response_properties_slack_webhook - Connector response properties for a Slack connector Up

    connector_type_id
    String The type of connector.
    @@ -1773,7 +1792,7 @@ Any modifications made to this file will be overwritten.
    Enum:
    .slack
    name
    String The display name for the connector.
    -
    secrets
    map[String, oas_any_type_not_mapped] Defines secrets for connectors when type is .slack.
    +
    secrets
    @@ -2220,6 +2239,28 @@ Any modifications made to this file will be overwritten.
    username (optional)
    String The username for HTTP basic authentication. This property is required when isOAuth is false.
    +
    +

    secrets_properties_slack - Connector secrets properties for a Slack connector Up

    +
    Defines secrets for connectors when type is .slack.
    +
    +
    token
    String The Slack bot user OAuth token.
    +
    webhookUrl
    String The Slack webhook url.
    +
    +
    +
    +

    secrets_properties_slack_oneOf - Up

    +
    +
    +
    token
    String The Slack bot user OAuth token.
    +
    +
    +
    +

    secrets_properties_slack_oneOf_1 - Up

    +
    +
    +
    webhookUrl
    String The Slack webhook url.
    +
    +

    secrets_properties_swimlane - Connector secrets properties for a Swimlane connector Up

    Defines secrets for connectors when type is .swimlane.
    @@ -2305,6 +2346,17 @@ Any modifications made to this file will be overwritten.
    secrets
    secrets_properties_servicenow
    +
    +

    update_connector_request_slack - Update Slack connector request Up

    +
    +
    +
    name
    String The display name for the connector.
    +
    config (optional)
    +
    Enum:
    +
    web_api
    webhook
    +
    secrets
    +
    +

    update_connector_request_swimlane - Update Swimlane connector request Up

    diff --git a/docs/management/connectors/action-types/slack.asciidoc b/docs/management/connectors/action-types/slack.asciidoc index 140ea742692b9..c5db456fc56a6 100644 --- a/docs/management/connectors/action-types/slack.asciidoc +++ b/docs/management/connectors/action-types/slack.asciidoc @@ -4,26 +4,29 @@ Slack ++++ -The Slack connector uses https://api.slack.com/incoming-webhooks[Slack Incoming Webhooks]. +The Slack connector uses incoming webhooks or an API method to send Slack messages. [float] [[define-slack-ui]] === Create connectors in {kib} -You can create connectors in *{stack-manage-app} > {connectors-ui}* -or as needed when you're creating a rule. For example: +You can create connectors in *{stack-manage-app} > {connectors-ui}* or as needed when you're creating a rule. +You can choose to use a webhook URL that's specific to a single channel. For example: [role="screenshot"] -image::management/connectors/images/slack-connector.png[Slack connector] +image::management/connectors/images/slack-webhook-connector.png[Slack connector] +// NOTE: This is an autogenerated screenshot. Do not edit it directly. -[float] -[[slack-connector-configuration]] -==== Connector configuration +Alternatively, you can create a connector that supports multiple channels. For example: + +[role="screenshot"] +image::management/connectors/images/slack-api-connector.png[Slack API connector] +// NOTE: This is an autogenerated screenshot. Do not edit it directly. -Slack connectors have the following configuration properties: +If you use the latter method, you choose your channel when you create a rule action. +Thus a connector can be used in multiple rules and actions to communicate with different channels. -Name:: The name of the connector. -Webhook URL:: The URL of the incoming webhook. See https://api.slack.com/messaging/webhooks#getting_started[Slack Incoming Webhooks] for instructions on generating this URL. If you are using the <> setting, make sure the hostname is added to the allowed hosts. +For Slack setup details, go to <>. [float] [[preconfigured-slack-configuration]] @@ -31,21 +34,30 @@ Webhook URL:: The URL of the incoming webhook. See https://api.slack.com/messa If you are running {kib} on-prem, you can define connectors by adding `xpack.actions.preconfigured` settings to your `kibana.yml` file. -For example: +.Example Slack connector with webhook [source,text] -- xpack.actions.preconfigured: my-slack: - name: preconfigured-slack-connector-type + name: preconfigured-slack-webhook-connector-type actionTypeId: .slack secrets: - webhookUrl: 'https://hooks.slack.com/services/abcd/efgh/ijklmnopqrstuvwxyz' + webhookUrl: 'https://hooks.slack.com/services/xxxx/xxxx/xxxx' <1> -- +<1> To obtain this value, go to <>. -Secrets defines sensitive information for the connector type. - -`webhookUrl`:: A string that corresponds to *Webhook URL*. +.Example Slack connector with web API +[source,text] +-- +xpack.actions.preconfigured: + my-slack: + name: preconfigured-slack-api-connector-type + actionTypeId: .slack_api + secrets: + token: 'xoxb-xxxx-xxxx-xxxx' <1> +-- +<1> To obtain this value, go to <>. [float] [[slack-action-configuration]] @@ -55,30 +67,46 @@ You can test connectors with the <> or as you're creating or editing the connector in {kib}. For example: [role="screenshot"] -image::management/connectors/images/slack-params-test.png[Slack params test] +image::management/connectors/images/slack-api-params.png[Slack API connector test] +// NOTE: This is an autogenerated screenshot. Do not edit it directly. Slack actions have the following properties: -Message:: The message text, converted to the `text` field in the Webhook JSON payload. Currently only the text field is supported. Markdown, images, and other advanced formatting are not yet supported. +Channels:: +One or more channels that your Slack app has access to. +This option is available only in the web API type of connector. + +Message:: The Slack message text, which cannot contain Markdown, images, or other advanced formatting. [float] [[slack-connector-networking-configuration]] === Connector networking configuration -Use the <> to customize connector networking configurations, such as proxies, certificates, or TLS settings. You can set configurations that apply to all your connectors or use `xpack.actions.customHostSettings` to set per-host configurations. +Use the <> to customize connector networking configurations, such as proxies, certificates, or TLS settings. +You can set configurations that apply to all your connectors or use `xpack.actions.customHostSettings` to set per-host configurations. [float] [[configuring-slack]] -==== Configure a Slack account +=== Configure a Slack account -You need a https://api.slack.com/incoming-webhooks[Slack webhook URL] to -configure a Slack account. To create a webhook -URL, set up an an **Incoming Webhook Integration** through the Slack console: +Before you can create a Slack connector, you must configure your account and obtain the necessary URL or token. + +[float] +[[configuring-slack-webhook]] +==== Configure a Slack account for incoming webhooks . Log in to http://slack.com[slack.com] as a team administrator. -. Go to https://my.slack.com/services/new/incoming-webhook. -. Select a default channel for the integration. -+ -image::images/slack-add-webhook-integration.png[] -. Click *Add Incoming Webhook Integration*. +. Create a Slack app, enable incoming webhooks, then create an incoming webhook. Refer to https://api.slack.com/messaging/webhooks. . Copy the generated webhook URL so you can paste it into your Slack connector form. +. If you are using the <> setting, make sure the hostname from the URL is added to the allowed hosts. + +[float] +[[configuring-slack-web-api]] +==== Configure a Slack account for Web API + +. Create a Slack app. Refer to https://api.slack.com/authentication/basics#creating. +. Add scope: `channels:read`, `groups:read`, `chat:write` and `chat:write.public`. Refer to https://api.slack.com/authentication/basics#scopes. +. Install the app to a workspace. Refer to https://api.slack.com/authentication/basics#installing. +. Copy the `Bot User OAuth Token` so you can paste it into your Slack connector form. +. If you need to send messages to a private channel, you need to write `/invite @App_name` in it. + Putting "@" triggers Slack to start auto-suggesting, which is why it then becomes easy to find your app name in the list. diff --git a/docs/management/connectors/images/slack-api-connector.png b/docs/management/connectors/images/slack-api-connector.png new file mode 100644 index 0000000000000..41eef0b73d9c8 Binary files /dev/null and b/docs/management/connectors/images/slack-api-connector.png differ diff --git a/docs/management/connectors/images/slack-api-params.png b/docs/management/connectors/images/slack-api-params.png new file mode 100644 index 0000000000000..a3cbb42b5250f Binary files /dev/null and b/docs/management/connectors/images/slack-api-params.png differ diff --git a/docs/management/connectors/images/slack-connector.png b/docs/management/connectors/images/slack-connector.png deleted file mode 100644 index 7342d962d2a2b..0000000000000 Binary files a/docs/management/connectors/images/slack-connector.png and /dev/null differ diff --git a/docs/management/connectors/images/slack-params-test.png b/docs/management/connectors/images/slack-params-test.png deleted file mode 100644 index 603f66301af12..0000000000000 Binary files a/docs/management/connectors/images/slack-params-test.png and /dev/null differ diff --git a/docs/management/connectors/images/slack-webhook-connector.png b/docs/management/connectors/images/slack-webhook-connector.png new file mode 100644 index 0000000000000..ab793c7354de3 Binary files /dev/null and b/docs/management/connectors/images/slack-webhook-connector.png differ diff --git a/x-pack/plugins/actions/docs/openapi/bundled.json b/x-pack/plugins/actions/docs/openapi/bundled.json index aa9cdcd3d927e..524b09c965130 100644 --- a/x-pack/plugins/actions/docs/openapi/bundled.json +++ b/x-pack/plugins/actions/docs/openapi/bundled.json @@ -317,6 +317,9 @@ { "$ref": "#/components/schemas/update_connector_request_servicenow_itom" }, + { + "$ref": "#/components/schemas/update_connector_request_slack" + }, { "$ref": "#/components/schemas/update_connector_request_swimlane" } @@ -1948,8 +1951,32 @@ "secrets_properties_slack": { "title": "Connector secrets properties for a Slack connector", "description": "Defines secrets for connectors when type is `.slack`.", - "type": "object", - "additionalProperties": true + "oneOf": [ + { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "description": "The Slack bot user OAuth token." + } + } + }, + { + "type": "object", + "required": [ + "webhookUrl" + ], + "properties": { + "webhookUrl": { + "type": "string", + "description": "The Slack webhook url." + } + } + } + ] }, "create_connector_request_slack": { "title": "Create Slack connector request", @@ -3348,6 +3375,30 @@ } } }, + "update_connector_request_slack": { + "title": "Update Slack connector request", + "type": "object", + "required": [ + "name", + "secrets" + ], + "properties": { + "name": { + "type": "string", + "description": "The display name for the connector." + }, + "config": { + "type": "string", + "enum": [ + "web_api", + "webhook" + ] + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_slack" + } + } + }, "update_connector_request_swimlane": { "title": "Update Swimlane connector request", "type": "object", diff --git a/x-pack/plugins/actions/docs/openapi/bundled.yaml b/x-pack/plugins/actions/docs/openapi/bundled.yaml index ee6bbe629522b..2d02e0dd2b046 100644 --- a/x-pack/plugins/actions/docs/openapi/bundled.yaml +++ b/x-pack/plugins/actions/docs/openapi/bundled.yaml @@ -174,6 +174,7 @@ paths: - $ref: '#/components/schemas/update_connector_request_serverlog' - $ref: '#/components/schemas/update_connector_request_servicenow' - $ref: '#/components/schemas/update_connector_request_servicenow_itom' + - $ref: '#/components/schemas/update_connector_request_slack' - $ref: '#/components/schemas/update_connector_request_swimlane' examples: updateIndexConnectorRequest: @@ -1300,8 +1301,21 @@ components: secrets_properties_slack: title: Connector secrets properties for a Slack connector description: Defines secrets for connectors when type is `.slack`. - type: object - additionalProperties: true + oneOf: + - type: object + required: + - token + properties: + token: + type: string + description: The Slack bot user OAuth token. + - type: object + required: + - webhookUrl + properties: + webhookUrl: + type: string + description: The Slack webhook url. create_connector_request_slack: title: Create Slack connector request description: The Slack connector uses Slack Incoming Webhooks. @@ -2010,7 +2024,7 @@ components: name: type: string description: The display name for the connector. - connector_response_properties_slack: + connector_response_properties_slack_webhook: title: Connector response properties for a Slack connector type: object required: @@ -2037,6 +2051,33 @@ components: name: type: string description: The display name for the connector. + connector_response_properties_slack_api: + title: Connector response properties for a Slack connector + type: object + required: + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + properties: + connector_type_id: + type: string + description: The type of connector. + enum: + - .slack_api + id: + type: string + description: The identifier for the connector. + is_deprecated: + $ref: '#/components/schemas/is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/is_preconfigured' + name: + type: string + description: The display name for the connector. connector_response_properties_swimlane: title: Connector response properties for a Swimlane connector type: object @@ -2318,6 +2359,23 @@ components: description: The display name for the connector. secrets: $ref: '#/components/schemas/secrets_properties_servicenow' + update_connector_request_slack: + title: Update Slack connector request + type: object + required: + - name + - secrets + properties: + name: + type: string + description: The display name for the connector. + config: + type: string + enum: + - web_api + - webhook + secrets: + $ref: '#/components/schemas/secrets_properties_slack' update_connector_request_swimlane: title: Update Swimlane connector request type: object diff --git a/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_slack_api.yaml b/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_slack_api.yaml new file mode 100644 index 0000000000000..eab369907b5a5 --- /dev/null +++ b/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_slack_api.yaml @@ -0,0 +1,26 @@ +title: Connector response properties for a Slack connector +type: object +required: + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name +properties: + connector_type_id: + type: string + description: The type of connector. + enum: + - .slack_api + id: + type: string + description: The identifier for the connector. + is_deprecated: + $ref: 'is_deprecated.yaml' + is_missing_secrets: + $ref: 'is_missing_secrets.yaml' + is_preconfigured: + $ref: 'is_preconfigured.yaml' + name: + type: string + description: The display name for the connector. diff --git a/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_slack.yaml b/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_slack_webhook.yaml similarity index 94% rename from x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_slack.yaml rename to x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_slack_webhook.yaml index d0254e0518316..19ddc08fc125a 100644 --- a/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_slack.yaml +++ b/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_slack_webhook.yaml @@ -16,7 +16,7 @@ properties: type: string description: The identifier for the connector. is_deprecated: - $ref: 'is_deprecated.yaml' + $ref: 'is_deprecated.yaml' is_missing_secrets: $ref: 'is_missing_secrets.yaml' is_preconfigured: diff --git a/x-pack/plugins/actions/docs/openapi/components/schemas/create_connector_request_slack_api.yaml b/x-pack/plugins/actions/docs/openapi/components/schemas/create_connector_request_slack_api.yaml new file mode 100644 index 0000000000000..a16ba7416e7bc --- /dev/null +++ b/x-pack/plugins/actions/docs/openapi/components/schemas/create_connector_request_slack_api.yaml @@ -0,0 +1,20 @@ +title: Create Slack connector request +description: The Slack connector uses Slack Incoming Webhooks. +type: object +required: + - connector_type_id + - name + - secrets +properties: + connector_type_id: + type: string + description: The type of connector. + enum: + - .slack_api + example: .slack_api + name: + type: string + description: The display name for the connector. + example: my-connector + secrets: + $ref: 'secrets_properties_slack_api.yaml' diff --git a/x-pack/plugins/actions/docs/openapi/components/schemas/create_connector_request_slack.yaml b/x-pack/plugins/actions/docs/openapi/components/schemas/create_connector_request_slack_webhook.yaml similarity index 89% rename from x-pack/plugins/actions/docs/openapi/components/schemas/create_connector_request_slack.yaml rename to x-pack/plugins/actions/docs/openapi/components/schemas/create_connector_request_slack_webhook.yaml index 0634d48b543a1..1c046cc3f000c 100644 --- a/x-pack/plugins/actions/docs/openapi/components/schemas/create_connector_request_slack.yaml +++ b/x-pack/plugins/actions/docs/openapi/components/schemas/create_connector_request_slack_webhook.yaml @@ -17,4 +17,4 @@ properties: description: The display name for the connector. example: my-connector secrets: - $ref: 'secrets_properties_slack.yaml' \ No newline at end of file + $ref: 'secrets_properties_slack_webhook.yaml' diff --git a/x-pack/plugins/actions/docs/openapi/components/schemas/secrets_properties_slack.yaml b/x-pack/plugins/actions/docs/openapi/components/schemas/secrets_properties_slack.yaml deleted file mode 100644 index 4a681e8a195f3..0000000000000 --- a/x-pack/plugins/actions/docs/openapi/components/schemas/secrets_properties_slack.yaml +++ /dev/null @@ -1,5 +0,0 @@ -title: Connector secrets properties for a Slack connector -description: Defines secrets for connectors when type is `.slack`. -type: object -additionalProperties: true -# TO-DO: Add the properties for this connector. \ No newline at end of file diff --git a/x-pack/plugins/actions/docs/openapi/components/schemas/secrets_properties_slack_api.yaml b/x-pack/plugins/actions/docs/openapi/components/schemas/secrets_properties_slack_api.yaml new file mode 100644 index 0000000000000..d59845a876c77 --- /dev/null +++ b/x-pack/plugins/actions/docs/openapi/components/schemas/secrets_properties_slack_api.yaml @@ -0,0 +1,9 @@ +title: Connector secrets properties for a Web API Slack connector +description: Defines secrets for connectors when type is `.slack`. +required: + - token +type: object +properties: + token: + type: string + description: Slack bot user OAuth token. diff --git a/x-pack/plugins/actions/docs/openapi/components/schemas/secrets_properties_slack_webhook.yaml b/x-pack/plugins/actions/docs/openapi/components/schemas/secrets_properties_slack_webhook.yaml new file mode 100644 index 0000000000000..6b16601255d68 --- /dev/null +++ b/x-pack/plugins/actions/docs/openapi/components/schemas/secrets_properties_slack_webhook.yaml @@ -0,0 +1,9 @@ +title: Connector secrets properties for a Webhook Slack connector +description: Defines secrets for connectors when type is `.slack`. +required: + - webhookUrl +type: object +properties: + webhookUrl: + type: string + description: Slack webhook url. diff --git a/x-pack/plugins/actions/docs/openapi/components/schemas/update_connector_request_slack.yaml b/x-pack/plugins/actions/docs/openapi/components/schemas/update_connector_request_slack_api.yaml similarity index 54% rename from x-pack/plugins/actions/docs/openapi/components/schemas/update_connector_request_slack.yaml rename to x-pack/plugins/actions/docs/openapi/components/schemas/update_connector_request_slack_api.yaml index 6e1bf95b3944a..e85a0436a035b 100644 --- a/x-pack/plugins/actions/docs/openapi/components/schemas/update_connector_request_slack.yaml +++ b/x-pack/plugins/actions/docs/openapi/components/schemas/update_connector_request_slack_api.yaml @@ -8,4 +8,6 @@ properties: type: string description: The display name for the connector. secrets: - $ref: 'secrets_properties_slack.yaml' \ No newline at end of file + type: object + description: The secrets object containing the necessary fields for authentication. + $ref: 'secrets_properties_slack_api.yaml' diff --git a/x-pack/plugins/actions/docs/openapi/components/schemas/update_connector_request_slack_webhook.yaml b/x-pack/plugins/actions/docs/openapi/components/schemas/update_connector_request_slack_webhook.yaml new file mode 100644 index 0000000000000..4ed93f519f3c2 --- /dev/null +++ b/x-pack/plugins/actions/docs/openapi/components/schemas/update_connector_request_slack_webhook.yaml @@ -0,0 +1,13 @@ +title: Update Slack connector request +type: object +required: + - name + - secrets +properties: + name: + type: string + description: The display name for the connector. + secrets: + type: object + description: The secrets object containing the necessary fields for authentication. + $ref: 'secrets_properties_slack_webhook.yaml' diff --git a/x-pack/plugins/actions/docs/openapi/paths/s@{spaceid}@api@actions@connector@{connectorid}.yaml b/x-pack/plugins/actions/docs/openapi/paths/s@{spaceid}@api@actions@connector@{connectorid}.yaml index e2c679deea94b..3cee979ed3e91 100644 --- a/x-pack/plugins/actions/docs/openapi/paths/s@{spaceid}@api@actions@connector@{connectorid}.yaml +++ b/x-pack/plugins/actions/docs/openapi/paths/s@{spaceid}@api@actions@connector@{connectorid}.yaml @@ -104,7 +104,7 @@ put: - $ref: '../components/schemas/update_connector_request_serverlog.yaml' - $ref: '../components/schemas/update_connector_request_servicenow.yaml' - $ref: '../components/schemas/update_connector_request_servicenow_itom.yaml' -# - $ref: '../components/schemas/update_connector_request_slack.yaml' + - $ref: '../components/schemas/update_connector_request_slack.yaml' - $ref: '../components/schemas/update_connector_request_swimlane.yaml' # - $ref: '../components/schemas/update_connector_request_teams.yaml' # - $ref: '../components/schemas/update_connector_request_tines.yaml' diff --git a/x-pack/plugins/stack_connectors/public/connector_types/slack/action_form.test.tsx b/x-pack/plugins/stack_connectors/public/connector_types/slack/action_form.test.tsx index 32eb23f9a167f..cfa9014e5bb4c 100644 --- a/x-pack/plugins/stack_connectors/public/connector_types/slack/action_form.test.tsx +++ b/x-pack/plugins/stack_connectors/public/connector_types/slack/action_form.test.tsx @@ -172,6 +172,6 @@ describe('ActionForm - Slack API Connector', () => { ); - expect(await screen.findByText('Selected channel is required.')).toBeInTheDocument(); + expect(await screen.findByText('Channel is required.')).toBeInTheDocument(); }); }); diff --git a/x-pack/plugins/stack_connectors/public/connector_types/slack/slack.tsx b/x-pack/plugins/stack_connectors/public/connector_types/slack/slack.tsx index c1b4b72182fa9..8fe351407ab92 100644 --- a/x-pack/plugins/stack_connectors/public/connector_types/slack/slack.tsx +++ b/x-pack/plugins/stack_connectors/public/connector_types/slack/slack.tsx @@ -36,7 +36,7 @@ export function getConnectorType(): ConnectorTypeModel { expect(await connectorTypeModel.validateParams(actionParams)).toEqual({ errors: { text: [], - channels: ['Selected channel is required.'], + channels: ['Channel is required.'], }, }); }); diff --git a/x-pack/plugins/stack_connectors/public/connector_types/slack_api/translations.ts b/x-pack/plugins/stack_connectors/public/connector_types/slack_api/translations.ts index 2c3ea5276ab92..dda8807485347 100644 --- a/x-pack/plugins/stack_connectors/public/connector_types/slack_api/translations.ts +++ b/x-pack/plugins/stack_connectors/public/connector_types/slack_api/translations.ts @@ -16,7 +16,7 @@ export const MESSAGE_REQUIRED = i18n.translate( export const CHANNEL_REQUIRED = i18n.translate( 'xpack.stackConnectors.components.slack.error.requiredSlackChannel', { - defaultMessage: 'Selected channel is required.', + defaultMessage: 'Channel is required.', } ); export const TOKEN_LABEL = i18n.translate( @@ -31,7 +31,7 @@ export const WEB_API = i18n.translate('xpack.stackConnectors.components.slack.we export const SELECT_MESSAGE = i18n.translate( 'xpack.stackConnectors.components.slack.selectMessageText', { - defaultMessage: 'Send a message to a Slack channel or user.', + defaultMessage: 'Send messages to Slack channels.', } ); export const ACTION_TYPE_TITLE = i18n.translate( diff --git a/x-pack/plugins/triggers_actions_ui/README.md b/x-pack/plugins/triggers_actions_ui/README.md index 598322b4aea13..dcf378162516d 100644 --- a/x-pack/plugins/triggers_actions_ui/README.md +++ b/x-pack/plugins/triggers_actions_ui/README.md @@ -978,7 +978,7 @@ export function getActionType(): ActionTypeModel { selectMessage: i18n.translate( 'xpack.triggersActionsUI.components.builtinActionTypes.slackAction.selectMessageText', { - defaultMessage: 'Send a message to a Slack channel or user.', + defaultMessage: 'Send messages to Slack channels.', } ), actionTypeTitle: i18n.translate( diff --git a/x-pack/test/screenshot_creation/apps/response_ops_docs/stack_connectors/connector_types.ts b/x-pack/test/screenshot_creation/apps/response_ops_docs/stack_connectors/connector_types.ts index 4da22a8e807a8..7b4b35d64f389 100644 --- a/x-pack/test/screenshot_creation/apps/response_ops_docs/stack_connectors/connector_types.ts +++ b/x-pack/test/screenshot_creation/apps/response_ops_docs/stack_connectors/connector_types.ts @@ -83,6 +83,37 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await flyOutCancelButton.click(); }); + it('slack api connector screenshots', async () => { + await pageObjects.common.navigateToApp('connectors'); + await pageObjects.header.waitUntilLoadingHasFinished(); + await actions.common.openNewConnectorForm('slack'); + await testSubjects.click('.slack_apiButton'); + await testSubjects.setValue('nameInput', 'Slack api test connector'); + await testSubjects.setValue('secrets.token-input', 'xoxb-XXXX-XXXX-XXXX'); + await commonScreenshots.takeScreenshot('slack-api-connector', screenshotDirectories); + await testSubjects.click('create-connector-flyout-save-test-btn'); + await testSubjects.click('toastCloseButton'); + await pageObjects.common.closeToast(); + await commonScreenshots.takeScreenshot('slack-api-params', screenshotDirectories); + await testSubjects.click('euiFlyoutCloseButton'); + }); + + it('slack webhook connector screenshots', async () => { + await pageObjects.common.navigateToApp('connectors'); + await pageObjects.header.waitUntilLoadingHasFinished(); + await actions.common.openNewConnectorForm('slack'); + await testSubjects.setValue('nameInput', 'Slack webhook test connector'); + await testSubjects.setValue( + 'slackWebhookUrlInput', + 'https://hooks.slack.com/services/abcd/ljklmnopqrstuvwxz' + ); + await commonScreenshots.takeScreenshot('slack-webhook-connector', screenshotDirectories); + await testSubjects.click('create-connector-flyout-save-test-btn'); + await testSubjects.click('toastCloseButton'); + await commonScreenshots.takeScreenshot('slack-webhook-params', screenshotDirectories); + await testSubjects.click('euiFlyoutCloseButton'); + }); + it('email connector screenshots', async () => { await pageObjects.common.navigateToApp('connectors'); await pageObjects.header.waitUntilLoadingHasFinished();