diff --git a/.buildkite/pipeline-resource-definitions/kibana-serverless-release.yml b/.buildkite/pipeline-resource-definitions/kibana-serverless-release.yml new file mode 100644 index 0000000000000..5bcc818f1d801 --- /dev/null +++ b/.buildkite/pipeline-resource-definitions/kibana-serverless-release.yml @@ -0,0 +1,48 @@ +# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json +apiVersion: backstage.io/v1alpha1 +kind: Resource +metadata: + name: buildkite-pipeline-serverless-release + description: Initiate kibana serverless releases + links: + - title: Pipeline + url: https://buildkite.com/elastic/kibana-serverless-release +spec: + type: buildkite-pipeline + owner: 'group:kibana-operations' + system: buildkite + implementation: + apiVersion: buildkite.elastic.dev/v1 + kind: Pipeline + metadata: + name: kibana / serverless / release + description: Initiate kibana serverless releases + spec: + env: + SLACK_NOTIFICATIONS_CHANNEL: '#kibana-operations-alerts' + ELASTIC_SLACK_NOTIFICATIONS_ENABLED: 'false' + default_branch: main + allow_rebuilds: false + skip_intermediate_builds: false + repository: elastic/kibana + pipeline_file: .buildkite/pipelines/serverless_deployment/run_serverless_release_assistant.yml + provider_settings: + build_branches: false + build_pull_requests: false + publish_commit_status: false + trigger_mode: none + build_tags: false + prefix_pull_request_fork_branch_names: false + skip_pull_request_builds_for_existing_commits: false + teams: + kibana-release-operators: + access_level: MANAGE_BUILD_AND_READ + everyone: + access_level: READ_ONLY + schedules: + Weekly automated promotion to QA: + cronline: 0 6 * * 1 + message: Weekly automated promotion to QA + env: + AUTO_SELECT_COMMIT: 'true' + branch: main diff --git a/.buildkite/pipeline-resource-definitions/locations.yml b/.buildkite/pipeline-resource-definitions/locations.yml index 30c1ffc34e41e..ee90785fd1e88 100644 --- a/.buildkite/pipeline-resource-definitions/locations.yml +++ b/.buildkite/pipeline-resource-definitions/locations.yml @@ -7,3 +7,4 @@ spec: type: url targets: - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-migration-staging.yml + - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-serverless-release.yml diff --git a/.buildkite/pipelines/esql_grammar_sync.yml b/.buildkite/pipelines/esql_grammar_sync.yml new file mode 100644 index 0000000000000..f516d61ad6b4a --- /dev/null +++ b/.buildkite/pipelines/esql_grammar_sync.yml @@ -0,0 +1,6 @@ +steps: + - command: .buildkite/scripts/steps/esql_grammar_sync.sh + label: ES|QL Grammar Sync + timeout_in_minutes: 10 + agents: + queue: n2-2-spot diff --git a/.buildkite/pipelines/on_merge.yml b/.buildkite/pipelines/on_merge.yml index fcf4a82c0801c..910fa754095e2 100644 --- a/.buildkite/pipelines/on_merge.yml +++ b/.buildkite/pipelines/on_merge.yml @@ -307,6 +307,32 @@ steps: - exit_status: '*' limit: 1 + - command: .buildkite/scripts/steps/functional/defend_workflows.sh + label: 'Defend Workflows Cypress Tests' + agents: + queue: n2-4-virt + depends_on: + - build + timeout_in_minutes: 60 + parallelism: 16 + retry: + automatic: + - exit_status: '*' + limit: 1 + + - command: .buildkite/scripts/steps/functional/defend_workflows_serverless.sh + label: 'Defend Workflows Cypress Tests on Serverless' + agents: + queue: n2-4-virt + depends_on: + - build + timeout_in_minutes: 60 + parallelism: 10 + retry: + automatic: + - exit_status: '*' + limit: 1 + - command: '.buildkite/scripts/steps/functional/on_merge_unsupported_ftrs.sh' label: Trigger unsupported ftr tests timeout_in_minutes: 10 diff --git a/.buildkite/pipelines/security_solution/security_solution_cypress.yml b/.buildkite/pipelines/security_solution/security_solution_cypress.yml index fb744e8af9313..4d27fd954c110 100644 --- a/.buildkite/pipelines/security_solution/security_solution_cypress.yml +++ b/.buildkite/pipelines/security_solution/security_solution_cypress.yml @@ -26,17 +26,17 @@ steps: depends_on: build_image key: test_execution steps: - # - command: .buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/mki_security_solution_cypress.sh cypress:run:qa:serverless:explore - # label: 'Serverless MKI QA Explore - Security Solution Cypress Tests' - # agents: - # queue: n2-4-spot - # # TODO : Revise the timeout when the pipeline will be officially integrated with the quality gate. - # timeout_in_minutes: 300 - # parallelism: 4 - # retry: - # automatic: - # - exit_status: '*' - # limit: 1 + - command: .buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/mki_security_solution_cypress.sh cypress:run:qa:serverless:explore + label: 'Serverless MKI QA Explore - Security Solution Cypress Tests' + agents: + queue: n2-4-spot + # TODO : Revise the timeout when the pipeline will be officially integrated with the quality gate. + timeout_in_minutes: 300 + parallelism: 4 + retry: + automatic: + - exit_status: '*' + limit: 1 - command: .buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/mki_security_solution_cypress.sh cypress:run:qa:serverless:investigations label: 'Serverless MKI QA Investigations - Security Solution Cypress Tests' @@ -110,14 +110,14 @@ steps: - exit_status: '*' limit: 1 - # - command: .buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/mki_security_solution_cypress.sh cypress:run:qa:serverless:entity_analytics - # label: 'Serverless MKI QA Entity Analytics - Security Solution Cypress Tests' - # agents: - # queue: n2-4-spot - # # TODO : Revise the timeout when the pipeline will be officially integrated with the quality gate. - # timeout_in_minutes: 300 - # parallelism: 2 - # retry: - # automatic: - # - exit_status: '*' - # limit: 1 \ No newline at end of file + - command: .buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/mki_security_solution_cypress.sh cypress:run:qa:serverless:entity_analytics + label: 'Serverless MKI QA Entity Analytics - Security Solution Cypress Tests' + agents: + queue: n2-4-spot + # TODO : Revise the timeout when the pipeline will be officially integrated with the quality gate. + timeout_in_minutes: 300 + parallelism: 2 + retry: + automatic: + - exit_status: '*' + limit: 1 \ No newline at end of file diff --git a/.buildkite/pipelines/serverless_deployment/create_deployment_tag.yml b/.buildkite/pipelines/serverless_deployment/run_serverless_release_assistant.yml similarity index 90% rename from .buildkite/pipelines/serverless_deployment/create_deployment_tag.yml rename to .buildkite/pipelines/serverless_deployment/run_serverless_release_assistant.yml index 10ecc5590087f..555b50efb2294 100644 --- a/.buildkite/pipelines/serverless_deployment/create_deployment_tag.yml +++ b/.buildkite/pipelines/serverless_deployment/run_serverless_release_assistant.yml @@ -1,7 +1,12 @@ +## Lists potential commits for deployment ## Creates deploy@ tag on Kibana +## Then kicks of the deployment to QA agents: - queue: kibana-default + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-2 steps: - label: "List potential commits" diff --git a/.buildkite/scripts/steps/esql_grammar_sync.sh b/.buildkite/scripts/steps/esql_grammar_sync.sh new file mode 100644 index 0000000000000..f0f3ad80e05e3 --- /dev/null +++ b/.buildkite/scripts/steps/esql_grammar_sync.sh @@ -0,0 +1,128 @@ +#!/usr/bin/env bash +set -euo pipefail + +synchronize_lexer_grammar () { + license_header="$1" + source_file="$PARENT_DIR/elasticsearch/x-pack/plugin/esql/src/main/antlr/EsqlBaseLexer.g4" + destination_file="./packages/kbn-monaco/src/esql/antlr/esql_lexer.g4" + + # Copy the file + cp "$source_file" "$destination_file" + + # Insert the license header + temp_file=$(mktemp) + printf "%s\n\n// DO NOT MODIFY THIS FILE BY HAND. IT IS MANAGED BY A CI JOB.\n\n%s" "$license_header" "$(cat $destination_file)" > "$temp_file" + mv "$temp_file" "$destination_file" + + # Replace the line containing "lexer grammar" with "lexer grammar esql_lexer;" + sed -i -e 's/lexer grammar.*$/lexer grammar esql_lexer;/' "$destination_file" + + # Insert "options { caseInsensitive = true; }" one line below + sed -i -e '/lexer grammar esql_lexer;/a\ + options { caseInsensitive = true; }' "$destination_file" + + echo "File copied and modified successfully." +} + +synchronize_parser_grammar () { + license_header="$1" + source_file="$PARENT_DIR/elasticsearch/x-pack/plugin/esql/src/main/antlr/EsqlBaseParser.g4" + destination_file="./packages/kbn-monaco/src/esql/antlr/esql_parser.g4" + + # Copy the file + cp "$source_file" "$destination_file" + + # Insert the license header + temp_file=$(mktemp) + printf "%s\n\n// DO NOT MODIFY THIS FILE BY HAND. IT IS MANAGED BY A CI JOB.\n\n%s" "$license_header" "$(cat ${destination_file})" > "$temp_file" + mv "$temp_file" "$destination_file" + + # Replace the line containing "parser grammar" with "parser grammar esql_parser;" + sed -i -e 's/parser grammar.*$/parser grammar esql_parser;/' "$destination_file" + + # Replace options {tokenVocab=EsqlBaseLexer;} with options {tokenVocab=esql_lexer;} + sed -i -e 's/options {tokenVocab=EsqlBaseLexer;}/options {tokenVocab=esql_lexer;}/' "$destination_file" + + echo "File copied and modified successfully." +} + +report_main_step () { + echo "--- $1" +} + +main () { + cd "$PARENT_DIR" + + report_main_step "Cloning repositories" + + rm -rf elasticsearch + git clone https://github.com/elastic/elasticsearch --depth 1 + + rm -rf open-source + git clone https://github.com/elastic/open-source --depth 1 + + cd "$KIBANA_DIR" + + license_header=$(cat "$PARENT_DIR/open-source/legal/elastic-license-2.0-header.txt") + + report_main_step "Synchronizing lexer grammar..." + synchronize_lexer_grammar "$license_header" + + report_main_step "Synchronizing parser grammar..." + synchronize_parser_grammar "$license_header" + + # Check for differences + set +e + git diff --exit-code --quiet "$destination_file" + if [ $? -eq 0 ]; then + echo "No differences found. Our work is done here." + exit + fi + set -e + + report_main_step "Differences found. Checking for an existing pull request." + + KIBANA_MACHINE_USERNAME="kibanamachine" + git config --global user.name "$KIBANA_MACHINE_USERNAME" + git config --global user.email '42973632+kibanamachine@users.noreply.github.com' + + PR_TITLE='[ES|QL] Update grammars' + PR_BODY='This PR updates the ES|QL grammars (lexer and parser) to match the latest version in Elasticsearch.' + + # Check if a PR already exists + pr_search_result=$(gh pr list --search "$PR_TITLE" --state open --author "$KIBANA_MACHINE_USERNAME" --limit 1 --json title -q ".[].title") + + if [ "$pr_search_result" == "$PR_TITLE" ]; then + echo "PR already exists. Exiting." + exit + fi + + echo "No existing PR found. Proceeding." + + report_main_step "Building ANTLR artifacts." + + # Bootstrap Kibana + .buildkite/scripts/bootstrap.sh + + # Build ANTLR stuff + cd ./packages/kbn-monaco/src + yarn build:antlr4:esql + + # Make a commit + BRANCH_NAME="esql_grammar_sync_$(date +%s)" + + git checkout -b "$BRANCH_NAME" + + git add -A + git commit -m "Update ES|QL grammars" + + report_main_step "Changes committed. Creating pull request." + + git remote add kibanamachine https://github.com/kibanamachine/kibana.git + git push kibanamachine "$BRANCH_NAME" + + # Create a PR + gh pr create --draft --title "$PR_TITLE" --body "$PR_BODY" --base main --head "kibanamachine:${BRANCH_NAME}" --label 'release_note:skip' --label 'Team:Visualizations' +} + +main diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 1c33310d98de5..8f50910f78f03 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -685,6 +685,7 @@ packages/kbn-search-connectors @elastic/enterprise-search-frontend packages/kbn-search-errors @elastic/kibana-data-discovery examples/search_examples @elastic/kibana-data-discovery packages/kbn-search-index-documents @elastic/enterprise-search-frontend +x-pack/plugins/search_playground @elastic/enterprise-search-frontend packages/kbn-search-response-warnings @elastic/kibana-data-discovery x-pack/plugins/searchprofiler @elastic/kibana-management x-pack/test/security_api_integration/packages/helpers @elastic/kibana-security @@ -1174,6 +1175,8 @@ x-pack/plugins/observability_solution/infra/server/lib/alerting @elastic/obs-ux- /.bazelversion @elastic/kibana-operations /WORKSPACE.bazel @elastic/kibana-operations /.buildkite/ @elastic/kibana-operations +/.buildkite/scripts/steps/esql_grammar_sync.sh @elastic/kibana-visualizations +/.buildkite/pipelines/esql_grammar_sync.yml @elastic/kibana-visualizations /kbn_pm/ @elastic/kibana-operations /x-pack/dev-tools @elastic/kibana-operations /catalog-info.yaml @elastic/kibana-operations @elastic/kibana-tech-leads diff --git a/NOTICE.txt b/NOTICE.txt index 0f79b16b0b043..ed8b96176e920 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -1,6 +1,31 @@ Kibana source code with Kibana X-Pack source code Copyright 2012-2024 Elasticsearch B.V. +--- +Adapted from remote-web-worker, which was available under a "MIT" license. + +MIT License (MIT) + +Copyright (c) 2022 Jan Nicklas + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + --- Pretty handling of logarithmic axes. Copyright (c) 2007-2014 IOLA and Ole Laursen. diff --git a/api_docs/actions.devdocs.json b/api_docs/actions.devdocs.json index fa2885287bbcd..7cdb870059304 100644 --- a/api_docs/actions.devdocs.json +++ b/api_docs/actions.devdocs.json @@ -559,7 +559,39 @@ "label": "esClient", "description": [], "signature": [ - "{ create: { (this: That, params: ", + "{ search: { >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "SearchResponse", + ">; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "SearchResponse", + ", unknown>>; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "SearchResponse", + ">; }; create: { (this: That, params: ", "CreateRequest", " | ", "CreateRequest", @@ -663,39 +695,7 @@ "TransportRequestOptions", " | undefined): Promise<", "WriteResponseBase", - ">; }; search: { >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptionsWithOutMeta", - " | undefined): Promise<", - "SearchResponse", - ">; >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptionsWithMeta", - " | undefined): Promise<", - "TransportResult", - "<", - "SearchResponse", - ", unknown>>; >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptions", - " | undefined): Promise<", - "SearchResponse", - ">; }; helpers: ", + ">; }; helpers: ", "default", "; name: string | symbol; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kEsql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kInference]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kQueryRuleset]: symbol | null; [kRollup]: symbol | null; [kSearchApplication]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kSynonyms]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", "default", @@ -2077,7 +2077,7 @@ "id": "def-server.UnsecuredActionsClient.Unnamed.$1", "type": "Object", "tags": [], - "label": "params", + "label": "opts", "description": [], "signature": [ "UnsecuredActionsClientOpts" @@ -2090,6 +2090,46 @@ ], "returnComment": [] }, + { + "parentPluginId": "actions", + "id": "def-server.UnsecuredActionsClient.execute", + "type": "Function", + "tags": [], + "label": "execute", + "description": [], + "signature": [ + "({ requesterId, id, params, relatedSavedObjects, spaceId, }: UnsecuredExecuteOptions) => Promise<", + { + "pluginId": "actions", + "scope": "common", + "docId": "kibActionsPluginApi", + "section": "def-common.ActionTypeExecutorResult", + "text": "ActionTypeExecutorResult" + }, + ">" + ], + "path": "x-pack/plugins/actions/server/unsecured_actions_client/unsecured_actions_client.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "actions", + "id": "def-server.UnsecuredActionsClient.execute.$1", + "type": "CompoundType", + "tags": [], + "label": "{\n requesterId,\n id,\n params,\n relatedSavedObjects,\n spaceId,\n }", + "description": [], + "signature": [ + "UnsecuredExecuteOptions" + ], + "path": "x-pack/plugins/actions/server/unsecured_actions_client/unsecured_actions_client.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, { "parentPluginId": "actions", "id": "def-server.UnsecuredActionsClient.bulkEnqueueExecution", @@ -2141,6 +2181,46 @@ } ], "returnComment": [] + }, + { + "parentPluginId": "actions", + "id": "def-server.UnsecuredActionsClient.getAll", + "type": "Function", + "tags": [], + "label": "getAll", + "description": [], + "signature": [ + "(spaceId: string) => Promise<", + { + "pluginId": "actions", + "scope": "server", + "docId": "kibActionsPluginApi", + "section": "def-server.ConnectorWithExtraFindData", + "text": "ConnectorWithExtraFindData" + }, + "[]>" + ], + "path": "x-pack/plugins/actions/server/unsecured_actions_client/unsecured_actions_client.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "actions", + "id": "def-server.UnsecuredActionsClient.getAll.$1", + "type": "string", + "tags": [], + "label": "spaceId", + "description": [], + "signature": [ + "string" + ], + "path": "x-pack/plugins/actions/server/unsecured_actions_client/unsecured_actions_client.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] } ], "initialIsOpen": false @@ -2776,12 +2856,14 @@ { "parentPluginId": "actions", "id": "def-server.ActionTypeExecutorOptions.services", - "type": "Object", + "type": "CompoundType", "tags": [], "label": "services", "description": [], "signature": [ - "Services" + "Services", + " | ", + "UnsecuredServices" ], "path": "x-pack/plugins/actions/server/types.ts", "deprecated": false, @@ -3031,6 +3113,86 @@ "deprecated": false, "trackAdoption": false, "children": [ + { + "parentPluginId": "actions", + "id": "def-server.IUnsecuredActionsClient.getAll", + "type": "Function", + "tags": [], + "label": "getAll", + "description": [], + "signature": [ + "(spaceId: string) => Promise<", + { + "pluginId": "actions", + "scope": "server", + "docId": "kibActionsPluginApi", + "section": "def-server.ConnectorWithExtraFindData", + "text": "ConnectorWithExtraFindData" + }, + "[]>" + ], + "path": "x-pack/plugins/actions/server/unsecured_actions_client/unsecured_actions_client.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "actions", + "id": "def-server.IUnsecuredActionsClient.getAll.$1", + "type": "string", + "tags": [], + "label": "spaceId", + "description": [], + "signature": [ + "string" + ], + "path": "x-pack/plugins/actions/server/unsecured_actions_client/unsecured_actions_client.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "actions", + "id": "def-server.IUnsecuredActionsClient.execute", + "type": "Function", + "tags": [], + "label": "execute", + "description": [], + "signature": [ + "(opts: UnsecuredExecuteOptions) => Promise<", + { + "pluginId": "actions", + "scope": "common", + "docId": "kibActionsPluginApi", + "section": "def-common.ActionTypeExecutorResult", + "text": "ActionTypeExecutorResult" + }, + ">" + ], + "path": "x-pack/plugins/actions/server/unsecured_actions_client/unsecured_actions_client.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "actions", + "id": "def-server.IUnsecuredActionsClient.execute.$1", + "type": "CompoundType", + "tags": [], + "label": "opts", + "description": [], + "signature": [ + "UnsecuredExecuteOptions" + ], + "path": "x-pack/plugins/actions/server/unsecured_actions_client/unsecured_actions_client.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, { "parentPluginId": "actions", "id": "def-server.IUnsecuredActionsClient.bulkEnqueueExecution", @@ -3258,7 +3420,17 @@ "label": "ActionsClient", "description": [], "signature": [ - "{ create: ({ action: { actionTypeId, name, config, secrets }, options, }: ", + "{ execute: ({ actionId, params, source, relatedSavedObjects, }: Omit<", + "ExecuteOptions", + ", \"actionExecutionId\" | \"request\">) => Promise<", + { + "pluginId": "actions", + "scope": "common", + "docId": "kibActionsPluginApi", + "section": "def-common.ActionTypeExecutorResult", + "text": "ActionTypeExecutorResult" + }, + ">; create: ({ action: { actionTypeId, name, config, secrets }, options, }: ", "CreateOptions", ") => Promise<", "Connector", @@ -3280,17 +3452,7 @@ "Connector", "[]>; getOAuthAccessToken: ({ type, options }: Readonly<{} & { type: \"jwt\" | \"client\"; options: Readonly<{} & { tokenUrl: string; config: Readonly<{} & { clientId: string; jwtKeyId: string; userIdentifierValue: string; }>; secrets: Readonly<{ privateKeyPassword?: string | undefined; } & { clientSecret: string; privateKey: string; }>; }> | Readonly<{} & { tokenUrl: string; config: Readonly<{} & { clientId: string; tenantId: string; }>; secrets: Readonly<{} & { clientSecret: string; }>; scope: string; }>; }>, configurationUtilities: ", "ActionsConfigurationUtilities", - ") => Promise<{ accessToken: string | null; }>; delete: ({ id }: { id: string; }) => Promise<{}>; execute: ({ actionId, params, source, relatedSavedObjects, }: Omit<", - "ExecuteOptions", - ", \"request\" | \"actionExecutionId\">) => Promise<", - { - "pluginId": "actions", - "scope": "common", - "docId": "kibActionsPluginApi", - "section": "def-common.ActionTypeExecutorResult", - "text": "ActionTypeExecutorResult" - }, - ">; bulkEnqueueExecution: (options: ", + ") => Promise<{ accessToken: string | null; }>; delete: ({ id }: { id: string; }) => Promise<{}>; bulkEnqueueExecution: (options: ", "ExecuteOptions", "[]) => Promise<", "ExecutionResponse", diff --git a/api_docs/actions.mdx b/api_docs/actions.mdx index a55d2b2bad552..9d5dcfbe41365 100644 --- a/api_docs/actions.mdx +++ b/api_docs/actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/actions title: "actions" image: https://source.unsplash.com/400x175/?github description: API docs for the actions plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'actions'] --- import actionsObj from './actions.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-o | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 281 | 0 | 275 | 31 | +| 289 | 0 | 283 | 32 | ## Client diff --git a/api_docs/advanced_settings.mdx b/api_docs/advanced_settings.mdx index 9ae539de6436d..18fd27d837f29 100644 --- a/api_docs/advanced_settings.mdx +++ b/api_docs/advanced_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/advancedSettings title: "advancedSettings" image: https://source.unsplash.com/400x175/?github description: API docs for the advancedSettings plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'advancedSettings'] --- import advancedSettingsObj from './advanced_settings.devdocs.json'; diff --git a/api_docs/ai_assistant_management_observability.mdx b/api_docs/ai_assistant_management_observability.mdx index 73028deee33a6..f4dce542fe693 100644 --- a/api_docs/ai_assistant_management_observability.mdx +++ b/api_docs/ai_assistant_management_observability.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/aiAssistantManagementObservability title: "aiAssistantManagementObservability" image: https://source.unsplash.com/400x175/?github description: API docs for the aiAssistantManagementObservability plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiAssistantManagementObservability'] --- import aiAssistantManagementObservabilityObj from './ai_assistant_management_observability.devdocs.json'; diff --git a/api_docs/ai_assistant_management_selection.mdx b/api_docs/ai_assistant_management_selection.mdx index dd677d6fc92b0..3c07f88e30932 100644 --- a/api_docs/ai_assistant_management_selection.mdx +++ b/api_docs/ai_assistant_management_selection.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/aiAssistantManagementSelection title: "aiAssistantManagementSelection" image: https://source.unsplash.com/400x175/?github description: API docs for the aiAssistantManagementSelection plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiAssistantManagementSelection'] --- import aiAssistantManagementSelectionObj from './ai_assistant_management_selection.devdocs.json'; diff --git a/api_docs/aiops.mdx b/api_docs/aiops.mdx index ee4e4fbf3506c..3033ddf650b82 100644 --- a/api_docs/aiops.mdx +++ b/api_docs/aiops.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/aiops title: "aiops" image: https://source.unsplash.com/400x175/?github description: API docs for the aiops plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiops'] --- import aiopsObj from './aiops.devdocs.json'; diff --git a/api_docs/alerting.devdocs.json b/api_docs/alerting.devdocs.json index 37c8ab64a713b..a3bd6176a5750 100644 --- a/api_docs/alerting.devdocs.json +++ b/api_docs/alerting.devdocs.json @@ -2822,7 +2822,7 @@ "label": "actions", "description": [], "signature": [ - "Readonly<{ frequency?: Readonly<{} & { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; }> | undefined; alertsFilter?: Readonly<{ query?: Readonly<{ dsl?: string | undefined; } & { kql: string; filters: Readonly<{ query?: Record | undefined; $state?: Readonly<{} & { store: \"appState\" | \"globalState\"; }> | undefined; } & { meta: Record; }>[]; }> | undefined; timeframe?: Readonly<{} & { days: (2 | 7 | 6 | 5 | 4 | 3 | 1)[]; hours: Readonly<{} & { start: string; end: string; }>; timezone: string; }> | undefined; } & {}> | undefined; uuid?: string | undefined; useAlertDataForTemplate?: boolean | undefined; } & { id: string; params: Record; actionTypeId: string; group: string; }>[]" + "Readonly<{ frequency?: Readonly<{} & { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; }> | undefined; alertsFilter?: Readonly<{ query?: Readonly<{ dsl?: string | undefined; } & { kql: string; filters: Readonly<{ query?: Record | undefined; $state?: Readonly<{} & { store: \"appState\" | \"globalState\"; }> | undefined; } & { meta: Record; }>[]; }> | undefined; timeframe?: Readonly<{} & { days: (2 | 1 | 7 | 6 | 5 | 4 | 3)[]; hours: Readonly<{} & { start: string; end: string; }>; timezone: string; }> | undefined; } & {}> | undefined; uuid?: string | undefined; useAlertDataForTemplate?: boolean | undefined; } & { params: Record; id: string; actionTypeId: string; group: string; }>[]" ], "path": "x-pack/plugins/alerting/server/application/rule/types/rule.ts", "deprecated": false, @@ -3029,7 +3029,7 @@ "label": "monitoring", "description": [], "signature": [ - "Readonly<{} & { run: Readonly<{} & { history: Readonly<{ outcome?: Readonly<{ warning?: \"execute\" | \"license\" | \"validate\" | \"timeout\" | \"unknown\" | \"read\" | \"decrypt\" | \"disabled\" | \"maxExecutableActions\" | \"maxAlerts\" | \"maxQueuedActions\" | null | undefined; outcomeOrder?: number | undefined; outcomeMsg?: string[] | null | undefined; } & { outcome: \"warning\" | \"succeeded\" | \"failed\"; alertsCount: Readonly<{ recovered?: number | null | undefined; active?: number | null | undefined; new?: number | null | undefined; ignored?: number | null | undefined; } & {}>; }> | undefined; duration?: number | undefined; } & { timestamp: number; success: boolean; }>[]; calculated_metrics: Readonly<{ p50?: number | undefined; p95?: number | undefined; p99?: number | undefined; } & { success_ratio: number; }>; last_run: Readonly<{} & { timestamp: string; metrics: Readonly<{ duration?: number | undefined; total_search_duration_ms?: number | null | undefined; total_indexing_duration_ms?: number | null | undefined; total_alerts_detected?: number | null | undefined; total_alerts_created?: number | null | undefined; gap_duration_s?: number | null | undefined; } & {}>; }>; }>; }> | undefined" + "Readonly<{} & { run: Readonly<{} & { history: Readonly<{ outcome?: Readonly<{ warning?: \"execute\" | \"unknown\" | \"license\" | \"validate\" | \"timeout\" | \"read\" | \"decrypt\" | \"disabled\" | \"maxExecutableActions\" | \"maxAlerts\" | \"maxQueuedActions\" | null | undefined; outcomeOrder?: number | undefined; outcomeMsg?: string[] | null | undefined; } & { outcome: \"warning\" | \"succeeded\" | \"failed\"; alertsCount: Readonly<{ recovered?: number | null | undefined; active?: number | null | undefined; new?: number | null | undefined; ignored?: number | null | undefined; } & {}>; }> | undefined; duration?: number | undefined; } & { timestamp: number; success: boolean; }>[]; calculated_metrics: Readonly<{ p50?: number | undefined; p95?: number | undefined; p99?: number | undefined; } & { success_ratio: number; }>; last_run: Readonly<{} & { timestamp: string; metrics: Readonly<{ duration?: number | undefined; total_search_duration_ms?: number | null | undefined; total_indexing_duration_ms?: number | null | undefined; total_alerts_detected?: number | null | undefined; total_alerts_created?: number | null | undefined; gap_duration_s?: number | null | undefined; } & {}>; }>; }>; }> | undefined" ], "path": "x-pack/plugins/alerting/server/application/rule/types/rule.ts", "deprecated": false, @@ -3043,7 +3043,7 @@ "label": "snoozeSchedule", "description": [], "signature": [ - "Readonly<{ id?: string | undefined; skipRecurrences?: string[] | undefined; } & { duration: number; rRule: Readonly<{ count?: number | undefined; interval?: number | undefined; freq?: 0 | 2 | 6 | 5 | 4 | 3 | 1 | undefined; until?: string | undefined; byweekday?: (string | number)[] | undefined; bymonthday?: number[] | undefined; bymonth?: number[] | undefined; wkst?: \"MO\" | \"TU\" | \"WE\" | \"TH\" | \"FR\" | \"SA\" | \"SU\" | undefined; bysetpos?: number[] | undefined; byyearday?: number[] | undefined; byweekno?: number[] | undefined; byhour?: number[] | undefined; byminute?: number[] | undefined; bysecond?: number[] | undefined; } & { dtstart: string; tzid: string; }>; }>[] | undefined" + "Readonly<{ id?: string | undefined; skipRecurrences?: string[] | undefined; } & { duration: number; rRule: Readonly<{ count?: number | undefined; interval?: number | undefined; freq?: 0 | 2 | 1 | 6 | 5 | 4 | 3 | undefined; until?: string | undefined; byweekday?: (string | number)[] | undefined; bymonthday?: number[] | undefined; bymonth?: number[] | undefined; wkst?: \"MO\" | \"TU\" | \"WE\" | \"TH\" | \"FR\" | \"SA\" | \"SU\" | undefined; bysetpos?: number[] | undefined; byyearday?: number[] | undefined; byweekno?: number[] | undefined; byhour?: number[] | undefined; byminute?: number[] | undefined; bysecond?: number[] | undefined; } & { dtstart: string; tzid: string; }>; }>[] | undefined" ], "path": "x-pack/plugins/alerting/server/application/rule/types/rule.ts", "deprecated": false, @@ -3085,7 +3085,7 @@ "label": "lastRun", "description": [], "signature": [ - "Readonly<{ warning?: \"execute\" | \"license\" | \"validate\" | \"timeout\" | \"unknown\" | \"read\" | \"decrypt\" | \"disabled\" | \"maxExecutableActions\" | \"maxAlerts\" | \"maxQueuedActions\" | null | undefined; outcomeOrder?: number | undefined; outcomeMsg?: string[] | null | undefined; } & { outcome: \"warning\" | \"succeeded\" | \"failed\"; alertsCount: Readonly<{ recovered?: number | null | undefined; active?: number | null | undefined; new?: number | null | undefined; ignored?: number | null | undefined; } & {}>; }> | null | undefined" + "Readonly<{ warning?: \"execute\" | \"unknown\" | \"license\" | \"validate\" | \"timeout\" | \"read\" | \"decrypt\" | \"disabled\" | \"maxExecutableActions\" | \"maxAlerts\" | \"maxQueuedActions\" | null | undefined; outcomeOrder?: number | undefined; outcomeMsg?: string[] | null | undefined; } & { outcome: \"warning\" | \"succeeded\" | \"failed\"; alertsCount: Readonly<{ recovered?: number | null | undefined; active?: number | null | undefined; new?: number | null | undefined; ignored?: number | null | undefined; } & {}>; }> | null | undefined" ], "path": "x-pack/plugins/alerting/server/application/rule/types/rule.ts", "deprecated": false, @@ -3559,14 +3559,6 @@ "plugin": "infra", "path": "x-pack/plugins/observability_solution/infra/server/lib/alerting/log_threshold/log_threshold_executor.ts" }, - { - "plugin": "infra", - "path": "x-pack/plugins/observability_solution/infra/server/lib/alerting/inventory_metric_threshold/inventory_metric_threshold_executor.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/observability_solution/infra/server/lib/alerting/inventory_metric_threshold/inventory_metric_threshold_executor.ts" - }, { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_preview/api/preview_rules/route.ts" @@ -4620,7 +4612,7 @@ "label": "BulkEditOperation", "description": [], "signature": [ - "Readonly<{} & { value: string[]; operation: \"delete\" | \"add\" | \"set\"; field: \"tags\"; }> | Readonly<{} & { value: Readonly<{ frequency?: Readonly<{} & { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; }> | undefined; uuid?: string | undefined; } & { id: string; params: Record; group: string; }>[]; operation: \"add\" | \"set\"; field: \"actions\"; }> | Readonly<{} & { value: Readonly<{} & { interval: string; }>; operation: \"set\"; field: \"schedule\"; }> | Readonly<{} & { value: string | null; operation: \"set\"; field: \"throttle\"; }> | Readonly<{} & { value: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; operation: \"set\"; field: \"notifyWhen\"; }> | Readonly<{} & { value: Readonly<{ id?: string | undefined; } & { duration: number; rRule: Readonly<{ count?: number | undefined; interval?: number | undefined; freq?: 0 | 2 | 3 | 1 | undefined; until?: string | undefined; byweekday?: string[] | undefined; bymonthday?: number[] | undefined; bymonth?: number[] | undefined; } & { dtstart: string; tzid: string; }>; }>; operation: \"set\"; field: \"snoozeSchedule\"; }> | Readonly<{ value?: string[] | undefined; } & { operation: \"delete\"; field: \"snoozeSchedule\"; }> | Readonly<{} & { operation: \"set\"; field: \"apiKey\"; }>" + "Readonly<{} & { value: string[]; operation: \"delete\" | \"add\" | \"set\"; field: \"tags\"; }> | Readonly<{} & { value: Readonly<{ frequency?: Readonly<{} & { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; }> | undefined; uuid?: string | undefined; } & { params: Record; id: string; group: string; }>[]; operation: \"add\" | \"set\"; field: \"actions\"; }> | Readonly<{} & { value: Readonly<{} & { interval: string; }>; operation: \"set\"; field: \"schedule\"; }> | Readonly<{} & { value: string | null; operation: \"set\"; field: \"throttle\"; }> | Readonly<{} & { value: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; operation: \"set\"; field: \"notifyWhen\"; }> | Readonly<{} & { value: Readonly<{ id?: string | undefined; } & { duration: number; rRule: Readonly<{ count?: number | undefined; interval?: number | undefined; freq?: 0 | 2 | 1 | 3 | undefined; until?: string | undefined; byweekday?: string[] | undefined; bymonthday?: number[] | undefined; bymonth?: number[] | undefined; } & { dtstart: string; tzid: string; }>; }>; operation: \"set\"; field: \"snoozeSchedule\"; }> | Readonly<{ value?: string[] | undefined; } & { operation: \"delete\"; field: \"snoozeSchedule\"; }> | Readonly<{} & { operation: \"set\"; field: \"apiKey\"; }>" ], "path": "x-pack/plugins/alerting/server/application/rule/methods/bulk_edit/types/bulk_edit_rules_options.ts", "deprecated": false, @@ -8636,7 +8628,7 @@ "label": "status", "description": [], "signature": [ - "\"ok\" | \"error\" | \"active\" | \"warning\" | \"pending\" | \"unknown\"" + "\"unknown\" | \"ok\" | \"error\" | \"active\" | \"warning\" | \"pending\"" ], "path": "x-pack/plugins/alerting/common/rule.ts", "deprecated": false, @@ -10106,30 +10098,30 @@ }, { "parentPluginId": "alerting", - "id": "def-common.AlertInstanceContext", - "type": "Type", + "id": "def-common.ALERTING_FEATURE_ID", + "type": "string", "tags": [], - "label": "AlertInstanceContext", + "label": "ALERTING_FEATURE_ID", "description": [], "signature": [ - "{ [x: string]: unknown; }" + "\"alerts\"" ], - "path": "x-pack/packages/kbn-alerting-state-types/src/alert_instance.ts", + "path": "x-pack/plugins/alerting/common/index.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "alerting", - "id": "def-common.ALERTS_FEATURE_ID", - "type": "string", + "id": "def-common.AlertInstanceContext", + "type": "Type", "tags": [], - "label": "ALERTS_FEATURE_ID", + "label": "AlertInstanceContext", "description": [], "signature": [ - "\"alerts\"" + "{ [x: string]: unknown; }" ], - "path": "x-pack/plugins/alerting/common/index.ts", + "path": "x-pack/packages/kbn-alerting-state-types/src/alert_instance.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -10434,7 +10426,7 @@ "label": "IsoWeekday", "description": [], "signature": [ - "2 | 7 | 6 | 5 | 4 | 3 | 1" + "2 | 1 | 7 | 6 | 5 | 4 | 3" ], "path": "x-pack/plugins/alerting/common/iso_weekdays.ts", "deprecated": false, @@ -11232,7 +11224,7 @@ "label": "RuleAlertingOutcome", "description": [], "signature": [ - "\"warning\" | \"unknown\" | \"success\" | \"failure\"" + "\"unknown\" | \"warning\" | \"success\" | \"failure\"" ], "path": "x-pack/plugins/alerting/common/rule.ts", "deprecated": false, @@ -11247,7 +11239,7 @@ "label": "RuleExecutionStatuses", "description": [], "signature": [ - "\"ok\" | \"error\" | \"active\" | \"warning\" | \"pending\" | \"unknown\"" + "\"unknown\" | \"ok\" | \"error\" | \"active\" | \"warning\" | \"pending\"" ], "path": "x-pack/plugins/alerting/common/rule.ts", "deprecated": false, diff --git a/api_docs/alerting.mdx b/api_docs/alerting.mdx index ab9e501a8789c..e250b248d9c3c 100644 --- a/api_docs/alerting.mdx +++ b/api_docs/alerting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/alerting title: "alerting" image: https://source.unsplash.com/400x175/?github description: API docs for the alerting plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'alerting'] --- import alertingObj from './alerting.devdocs.json'; diff --git a/api_docs/apm.devdocs.json b/api_docs/apm.devdocs.json index b7cac2784d108..79aed0b4b88af 100644 --- a/api_docs/apm.devdocs.json +++ b/api_docs/apm.devdocs.json @@ -134,7 +134,7 @@ "section": "def-common.NonEmptyStringBrand", "text": "NonEmptyStringBrand" }, - ">; }; }) | ({ serviceName: string; } & { dashboardId?: undefined; } & { serviceOverviewTab?: \"errors\" | \"metrics\" | \"traces\" | \"logs\" | undefined; } & { query: { environment: \"ENVIRONMENT_NOT_DEFINED\" | \"ENVIRONMENT_ALL\" | ", + ">; }; }) | ({ serviceName: string; } & { dashboardId?: undefined; } & { serviceOverviewTab?: \"errors\" | \"metrics\" | \"traces\" | \"logs\" | \"transactions\" | undefined; } & { query: { environment: \"ENVIRONMENT_NOT_DEFINED\" | \"ENVIRONMENT_ALL\" | ", "Branded", "" + ", \"id\" | \"type\">" ], "path": "src/plugins/controls/common/control_group/control_group_persistence.ts", "deprecated": false, diff --git a/api_docs/controls.mdx b/api_docs/controls.mdx index 7c91a2a8fcf50..f1073ace8b3a7 100644 --- a/api_docs/controls.mdx +++ b/api_docs/controls.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/controls title: "controls" image: https://source.unsplash.com/400x175/?github description: API docs for the controls plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'controls'] --- import controlsObj from './controls.devdocs.json'; diff --git a/api_docs/custom_integrations.mdx b/api_docs/custom_integrations.mdx index 4937c961c3bb4..6674bb2382a93 100644 --- a/api_docs/custom_integrations.mdx +++ b/api_docs/custom_integrations.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/customIntegrations title: "customIntegrations" image: https://source.unsplash.com/400x175/?github description: API docs for the customIntegrations plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'customIntegrations'] --- import customIntegrationsObj from './custom_integrations.devdocs.json'; diff --git a/api_docs/dashboard.devdocs.json b/api_docs/dashboard.devdocs.json index bb7b6e100c934..a77f98f8ac102 100644 --- a/api_docs/dashboard.devdocs.json +++ b/api_docs/dashboard.devdocs.json @@ -209,10 +209,50 @@ "pluginId": "@kbn/presentation-publishing", "scope": "common", "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesUnifiedSearch", - "text": "PublishesUnifiedSearch" + "section": "def-common.PublishesTimeRange", + "text": "PublishesTimeRange" }, - " & ", + " & { isCompatibleWithUnifiedSearch?: (() => boolean) | undefined; filters$: ", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PublishingSubject", + "text": "PublishingSubject" + }, + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" + }, + "[] | undefined>; query$: ", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PublishingSubject", + "text": "PublishingSubject" + }, + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Query", + "text": "Query" + }, + " | ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.AggregateQuery", + "text": "AggregateQuery" + }, + " | undefined>; } & ", { "pluginId": "@kbn/presentation-publishing", "scope": "common", @@ -263,10 +303,50 @@ "pluginId": "@kbn/presentation-publishing", "scope": "common", "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesUnifiedSearch", - "text": "PublishesUnifiedSearch" + "section": "def-common.PublishesTimeRange", + "text": "PublishesTimeRange" }, - " & ", + " & { isCompatibleWithUnifiedSearch?: (() => boolean) | undefined; filters$: ", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PublishingSubject", + "text": "PublishingSubject" + }, + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" + }, + "[] | undefined>; query$: ", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PublishingSubject", + "text": "PublishingSubject" + }, + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Query", + "text": "Query" + }, + " | ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.AggregateQuery", + "text": "AggregateQuery" + }, + " | undefined>; } & ", { "pluginId": "@kbn/presentation-publishing", "scope": "common", @@ -689,10 +769,50 @@ "pluginId": "@kbn/presentation-publishing", "scope": "common", "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesUnifiedSearch", - "text": "PublishesUnifiedSearch" + "section": "def-common.PublishesTimeRange", + "text": "PublishesTimeRange" }, - " & ", + " & { isCompatibleWithUnifiedSearch?: (() => boolean) | undefined; filters$: ", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PublishingSubject", + "text": "PublishingSubject" + }, + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" + }, + "[] | undefined>; query$: ", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PublishingSubject", + "text": "PublishingSubject" + }, + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Query", + "text": "Query" + }, + " | ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.AggregateQuery", + "text": "AggregateQuery" + }, + " | undefined>; } & ", { "pluginId": "@kbn/presentation-publishing", "scope": "common", diff --git a/api_docs/dashboard.mdx b/api_docs/dashboard.mdx index a23432591a3bc..2b54cf17e68e9 100644 --- a/api_docs/dashboard.mdx +++ b/api_docs/dashboard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dashboard title: "dashboard" image: https://source.unsplash.com/400x175/?github description: API docs for the dashboard plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboard'] --- import dashboardObj from './dashboard.devdocs.json'; diff --git a/api_docs/dashboard_enhanced.mdx b/api_docs/dashboard_enhanced.mdx index 4fccf099e2783..ce614b418e108 100644 --- a/api_docs/dashboard_enhanced.mdx +++ b/api_docs/dashboard_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dashboardEnhanced title: "dashboardEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the dashboardEnhanced plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboardEnhanced'] --- import dashboardEnhancedObj from './dashboard_enhanced.devdocs.json'; diff --git a/api_docs/data.devdocs.json b/api_docs/data.devdocs.json index 7367306e4ee29..3024b1783752a 100644 --- a/api_docs/data.devdocs.json +++ b/api_docs/data.devdocs.json @@ -9278,15 +9278,7 @@ "label": "AggConfigOptions", "description": [], "signature": [ - "{ type: ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.IAggType", - "text": "IAggType" - }, - "; id?: string | undefined; params?: {} | ", + "{ params?: {} | ", { "pluginId": "@kbn/utility-types", "scope": "common", @@ -9294,7 +9286,15 @@ "section": "def-common.SerializableRecord", "text": "SerializableRecord" }, - " | undefined; enabled?: boolean | undefined; schema?: string | undefined; }" + " | undefined; id?: string | undefined; type: ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.IAggType", + "text": "IAggType" + }, + "; enabled?: boolean | undefined; schema?: string | undefined; }" ], "path": "src/plugins/data/common/search/aggs/agg_config.ts", "deprecated": false, @@ -16040,7 +16040,39 @@ "label": "elasticsearchClient", "description": [], "signature": [ - "{ create: { (this: That, params: ", + "{ search: { >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "SearchResponse", + ">; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "SearchResponse", + ", unknown>>; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "SearchResponse", + ">; }; create: { (this: That, params: ", "CreateRequest", " | ", "CreateRequest", @@ -16144,39 +16176,7 @@ "TransportRequestOptions", " | undefined): Promise<", "WriteResponseBase", - ">; }; search: { >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptionsWithOutMeta", - " | undefined): Promise<", - "SearchResponse", - ">; >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptionsWithMeta", - " | undefined): Promise<", - "TransportResult", - "<", - "SearchResponse", - ", unknown>>; >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptions", - " | undefined): Promise<", - "SearchResponse", - ">; }; helpers: ", + ">; }; helpers: ", "default", "; name: string | symbol; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kEsql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kInference]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kQueryRuleset]: symbol | null; [kRollup]: symbol | null; [kSearchApplication]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kSynonyms]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", "default", diff --git a/api_docs/data.mdx b/api_docs/data.mdx index 9076ae2aba23b..1e75dc4d36802 100644 --- a/api_docs/data.mdx +++ b/api_docs/data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/data title: "data" image: https://source.unsplash.com/400x175/?github description: API docs for the data plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data'] --- import dataObj from './data.devdocs.json'; diff --git a/api_docs/data_query.mdx b/api_docs/data_query.mdx index 8a53b86f28857..f1fb087d99d15 100644 --- a/api_docs/data_query.mdx +++ b/api_docs/data_query.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/data-query title: "data.query" image: https://source.unsplash.com/400x175/?github description: API docs for the data.query plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.query'] --- import dataQueryObj from './data_query.devdocs.json'; diff --git a/api_docs/data_search.devdocs.json b/api_docs/data_search.devdocs.json index fb9880d348172..177e3cf4d8c75 100644 --- a/api_docs/data_search.devdocs.json +++ b/api_docs/data_search.devdocs.json @@ -30757,15 +30757,7 @@ "label": "AggConfigOptions", "description": [], "signature": [ - "{ type: ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.IAggType", - "text": "IAggType" - }, - "; id?: string | undefined; params?: {} | ", + "{ params?: {} | ", { "pluginId": "@kbn/utility-types", "scope": "common", @@ -30773,7 +30765,15 @@ "section": "def-common.SerializableRecord", "text": "SerializableRecord" }, - " | undefined; enabled?: boolean | undefined; schema?: string | undefined; }" + " | undefined; id?: string | undefined; type: ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.IAggType", + "text": "IAggType" + }, + "; enabled?: boolean | undefined; schema?: string | undefined; }" ], "path": "src/plugins/data/common/search/aggs/agg_config.ts", "deprecated": false, @@ -31706,15 +31706,7 @@ "label": "CreateAggConfigParams", "description": [], "signature": [ - "{ type: string | ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.IAggType", - "text": "IAggType" - }, - "; id?: string | undefined; params?: {} | ", + "{ params?: {} | ", { "pluginId": "@kbn/utility-types", "scope": "common", @@ -31722,7 +31714,15 @@ "section": "def-common.SerializableRecord", "text": "SerializableRecord" }, - " | undefined; enabled?: boolean | undefined; schema?: string | undefined; }" + " | undefined; id?: string | undefined; type: string | ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.IAggType", + "text": "IAggType" + }, + "; enabled?: boolean | undefined; schema?: string | undefined; }" ], "path": "src/plugins/data/common/search/aggs/agg_configs.ts", "deprecated": false, diff --git a/api_docs/data_search.mdx b/api_docs/data_search.mdx index 9130305f7ce48..f9f70768b62c5 100644 --- a/api_docs/data_search.mdx +++ b/api_docs/data_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/data-search title: "data.search" image: https://source.unsplash.com/400x175/?github description: API docs for the data.search plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.search'] --- import dataSearchObj from './data_search.devdocs.json'; diff --git a/api_docs/data_view_editor.mdx b/api_docs/data_view_editor.mdx index fa925a361cf37..195048862c71c 100644 --- a/api_docs/data_view_editor.mdx +++ b/api_docs/data_view_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViewEditor title: "dataViewEditor" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViewEditor plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewEditor'] --- import dataViewEditorObj from './data_view_editor.devdocs.json'; diff --git a/api_docs/data_view_field_editor.mdx b/api_docs/data_view_field_editor.mdx index 1bec65f9d20d5..374bdfcb216ec 100644 --- a/api_docs/data_view_field_editor.mdx +++ b/api_docs/data_view_field_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViewFieldEditor title: "dataViewFieldEditor" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViewFieldEditor plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewFieldEditor'] --- import dataViewFieldEditorObj from './data_view_field_editor.devdocs.json'; diff --git a/api_docs/data_view_management.mdx b/api_docs/data_view_management.mdx index 6addd99b1c904..dd2872e101ea5 100644 --- a/api_docs/data_view_management.mdx +++ b/api_docs/data_view_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViewManagement title: "dataViewManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViewManagement plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewManagement'] --- import dataViewManagementObj from './data_view_management.devdocs.json'; diff --git a/api_docs/data_views.devdocs.json b/api_docs/data_views.devdocs.json index b9d5a2ad708a9..61472b2262a82 100644 --- a/api_docs/data_views.devdocs.json +++ b/api_docs/data_views.devdocs.json @@ -11000,7 +11000,39 @@ "label": "elasticsearchClient", "description": [], "signature": [ - "{ create: { (this: That, params: ", + "{ search: { >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "SearchResponse", + ">; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "SearchResponse", + ", unknown>>; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "SearchResponse", + ">; }; create: { (this: That, params: ", "CreateRequest", " | ", "CreateRequest", @@ -11104,39 +11136,7 @@ "TransportRequestOptions", " | undefined): Promise<", "WriteResponseBase", - ">; }; search: { >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptionsWithOutMeta", - " | undefined): Promise<", - "SearchResponse", - ">; >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptionsWithMeta", - " | undefined): Promise<", - "TransportResult", - "<", - "SearchResponse", - ", unknown>>; >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptions", - " | undefined): Promise<", - "SearchResponse", - ">; }; helpers: ", + ">; }; helpers: ", "default", "; name: string | symbol; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kEsql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kInference]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kQueryRuleset]: symbol | null; [kRollup]: symbol | null; [kSearchApplication]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kSynonyms]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", "default", diff --git a/api_docs/data_views.mdx b/api_docs/data_views.mdx index 6e2489908c9e2..8dbaf2e55f0b6 100644 --- a/api_docs/data_views.mdx +++ b/api_docs/data_views.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViews title: "dataViews" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViews plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViews'] --- import dataViewsObj from './data_views.devdocs.json'; diff --git a/api_docs/data_visualizer.mdx b/api_docs/data_visualizer.mdx index e5694662ba30c..3aa3da6be2fbb 100644 --- a/api_docs/data_visualizer.mdx +++ b/api_docs/data_visualizer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataVisualizer title: "dataVisualizer" image: https://source.unsplash.com/400x175/?github description: API docs for the dataVisualizer plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataVisualizer'] --- import dataVisualizerObj from './data_visualizer.devdocs.json'; diff --git a/api_docs/dataset_quality.mdx b/api_docs/dataset_quality.mdx index fd0dc23951655..bf78605333dbc 100644 --- a/api_docs/dataset_quality.mdx +++ b/api_docs/dataset_quality.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/datasetQuality title: "datasetQuality" image: https://source.unsplash.com/400x175/?github description: API docs for the datasetQuality plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'datasetQuality'] --- import datasetQualityObj from './dataset_quality.devdocs.json'; diff --git a/api_docs/deprecations_by_api.mdx b/api_docs/deprecations_by_api.mdx index 7b9ceb6cfe28a..eb8d02b4a32c1 100644 --- a/api_docs/deprecations_by_api.mdx +++ b/api_docs/deprecations_by_api.mdx @@ -7,7 +7,7 @@ id: kibDevDocsDeprecationsByApi slug: /kibana-dev-docs/api-meta/deprecated-api-list-by-api title: Deprecated API usage by API description: A list of deprecated APIs, which plugins are still referencing them, and when they need to be removed by. -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -113,7 +113,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | dataViewManagement | - | | | unifiedSearch | - | | | unifiedSearch | - | -| | dashboardEnhanced | - | | | embeddableEnhanced | - | | | visTypeGauge | - | | | visTypePie | - | @@ -130,6 +129,10 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | canvas | - | | | spaces, savedObjectsManagement | - | | | @kbn/core-elasticsearch-server-internal, @kbn/core-plugins-server-internal, enterpriseSearch, observabilityOnboarding, console | - | +| | reporting | - | +| | @kbn/reporting-export-types-csv, reporting | - | +| | @kbn/reporting-export-types-csv, reporting | - | +| | reporting | - | | | reporting | - | | | @kbn/reporting-export-types-pdf, reporting | - | | | @kbn/content-management-table-list-view, filesManagement | - | @@ -147,7 +150,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | fleet, apm, security, securitySolution | 8.8.0 | | | spaces, security, alerting | 8.8.0 | | | embeddable, presentationUtil, dashboard, lens, discover, graph, links | 8.8.0 | -| | @kbn/core-application-browser-internal, @kbn/core-application-browser-mocks, management, fleet, security, kibanaOverview, @kbn/core | 8.8.0 | +| | @kbn/core-application-browser-internal, @kbn/core-application-browser-mocks, management, fleet, searchPlayground, security, kibanaOverview, @kbn/core | 8.8.0 | | | security | 8.8.0 | | | apm | 8.8.0 | | | mapsEms | 8.8.0 | @@ -178,6 +181,7 @@ Safe to remove. | | data | | | data | | | data | +| | embeddableEnhanced | | | expressions | | | expressions | | | expressions | @@ -207,6 +211,7 @@ Safe to remove. | | taskManager | | | @kbn/core-saved-objects-api-browser | | | @kbn/core-saved-objects-api-browser | +| | @kbn/reporting-public | | | @kbn/storybook | | | @kbn/ui-theme | | | @kbn/ui-theme | \ No newline at end of file diff --git a/api_docs/deprecations_by_plugin.mdx b/api_docs/deprecations_by_plugin.mdx index c19eb35eac84a..e3a894f7045b8 100644 --- a/api_docs/deprecations_by_plugin.mdx +++ b/api_docs/deprecations_by_plugin.mdx @@ -7,7 +7,7 @@ id: kibDevDocsDeprecationsByPlugin slug: /kibana-dev-docs/api-meta/deprecated-api-list-by-plugin title: Deprecated API usage by plugin description: A list of deprecated APIs, which plugins are still referencing them, and when they need to be removed by. -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -340,6 +340,15 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] +## @kbn/reporting-export-types-csv + +| Deprecated API | Reference location(s) | Remove By | +| ---------------|-----------|-----------| +| | [csv_searchsource_immediate.ts](https://github.com/elastic/kibana/tree/main/packages/kbn-reporting/export_types/csv/csv_searchsource_immediate.ts#:~:text=JobParamsDownloadCSV), [csv_searchsource_immediate.ts](https://github.com/elastic/kibana/tree/main/packages/kbn-reporting/export_types/csv/csv_searchsource_immediate.ts#:~:text=JobParamsDownloadCSV), [csv_searchsource_immediate.ts](https://github.com/elastic/kibana/tree/main/packages/kbn-reporting/export_types/csv/csv_searchsource_immediate.ts#:~:text=JobParamsDownloadCSV), [csv_searchsource_immediate.ts](https://github.com/elastic/kibana/tree/main/packages/kbn-reporting/export_types/csv/csv_searchsource_immediate.ts#:~:text=JobParamsDownloadCSV) | - | +| | [csv_searchsource_immediate.ts](https://github.com/elastic/kibana/tree/main/packages/kbn-reporting/export_types/csv/csv_searchsource_immediate.ts#:~:text=CSV_SEARCHSOURCE_IMMEDIATE_TYPE), [csv_searchsource_immediate.ts](https://github.com/elastic/kibana/tree/main/packages/kbn-reporting/export_types/csv/csv_searchsource_immediate.ts#:~:text=CSV_SEARCHSOURCE_IMMEDIATE_TYPE), [csv_searchsource_immediate.ts](https://github.com/elastic/kibana/tree/main/packages/kbn-reporting/export_types/csv/csv_searchsource_immediate.ts#:~:text=CSV_SEARCHSOURCE_IMMEDIATE_TYPE), [csv_searchsource_immediate.ts](https://github.com/elastic/kibana/tree/main/packages/kbn-reporting/export_types/csv/csv_searchsource_immediate.ts#:~:text=CSV_SEARCHSOURCE_IMMEDIATE_TYPE) | - | + + + ## @kbn/reporting-export-types-pdf | Deprecated API | Reference location(s) | Remove By | @@ -571,7 +580,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [menu_item.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_edit_drilldown/menu_item.tsx#:~:text=EnhancedEmbeddableContext), [menu_item.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_edit_drilldown/menu_item.tsx#:~:text=EnhancedEmbeddableContext) | - | | | [flyout_create_drilldown.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_create_drilldown/flyout_create_drilldown.tsx#:~:text=toMountPoint), [flyout_create_drilldown.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_create_drilldown/flyout_create_drilldown.tsx#:~:text=toMountPoint), [flyout_edit_drilldown.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_edit_drilldown/flyout_edit_drilldown.tsx#:~:text=toMountPoint), [flyout_edit_drilldown.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_edit_drilldown/flyout_edit_drilldown.tsx#:~:text=toMountPoint) | - | | | [collect_config_container.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/abstract_dashboard_drilldown/components/collect_config_container.tsx#:~:text=savedObjects), [collect_config_container.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/abstract_dashboard_drilldown/components/collect_config_container.tsx#:~:text=savedObjects) | - | | | [collect_config_container.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/abstract_dashboard_drilldown/components/collect_config_container.tsx#:~:text=find) | - | @@ -987,7 +995,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [log_threshold_executor.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability_solution/infra/server/lib/alerting/log_threshold/log_threshold_executor.ts#:~:text=alertFactory), [log_threshold_executor.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability_solution/infra/server/lib/alerting/log_threshold/log_threshold_executor.ts#:~:text=alertFactory), [log_threshold_executor.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability_solution/infra/server/lib/alerting/log_threshold/log_threshold_executor.ts#:~:text=alertFactory), [inventory_metric_threshold_executor.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability_solution/infra/server/lib/alerting/inventory_metric_threshold/inventory_metric_threshold_executor.ts#:~:text=alertFactory), [inventory_metric_threshold_executor.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability_solution/infra/server/lib/alerting/inventory_metric_threshold/inventory_metric_threshold_executor.ts#:~:text=alertFactory) | - | +| | [log_threshold_executor.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability_solution/infra/server/lib/alerting/log_threshold/log_threshold_executor.ts#:~:text=alertFactory), [log_threshold_executor.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability_solution/infra/server/lib/alerting/log_threshold/log_threshold_executor.ts#:~:text=alertFactory), [log_threshold_executor.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability_solution/infra/server/lib/alerting/log_threshold/log_threshold_executor.ts#:~:text=alertFactory) | - | | | [common_providers.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability_solution/infra/public/apps/common_providers.tsx#:~:text=KibanaThemeProvider), [common_providers.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability_solution/infra/public/apps/common_providers.tsx#:~:text=KibanaThemeProvider), [common_providers.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability_solution/infra/public/apps/common_providers.tsx#:~:text=KibanaThemeProvider) | - | | | [saved_object_type.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability_solution/infra/server/lib/sources/saved_object_type.ts#:~:text=migrations) | - | @@ -1275,6 +1283,10 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| | | [job_failure.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/public/notifier/job_failure.tsx#:~:text=toMountPoint), [job_failure.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/public/notifier/job_failure.tsx#:~:text=toMountPoint), [job_failure.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/public/notifier/job_failure.tsx#:~:text=toMountPoint), [general_error.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/public/notifier/general_error.tsx#:~:text=toMountPoint), [general_error.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/public/notifier/general_error.tsx#:~:text=toMountPoint), [job_success.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/public/notifier/job_success.tsx#:~:text=toMountPoint), [job_success.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/public/notifier/job_success.tsx#:~:text=toMountPoint), [job_success.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/public/notifier/job_success.tsx#:~:text=toMountPoint), [job_warning_formulas.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/public/notifier/job_warning_formulas.tsx#:~:text=toMountPoint), [job_warning_formulas.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/public/notifier/job_warning_formulas.tsx#:~:text=toMountPoint)+ 7 more | - | +| | [core.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/server/core.ts#:~:text=CsvSearchSourceImmediateExportType), [core.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/server/core.ts#:~:text=CsvSearchSourceImmediateExportType) | - | +| | [csv_searchsource_immediate.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/server/routes/internal/generate/csv_searchsource_immediate.ts#:~:text=JobParamsDownloadCSV), [csv_searchsource_immediate.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/server/routes/internal/generate/csv_searchsource_immediate.ts#:~:text=JobParamsDownloadCSV) | - | +| | [csv_searchsource_immediate.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/server/routes/internal/generate/csv_searchsource_immediate.ts#:~:text=CSV_SEARCHSOURCE_IMMEDIATE_TYPE), [csv_searchsource_immediate.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/server/routes/internal/generate/csv_searchsource_immediate.ts#:~:text=CSV_SEARCHSOURCE_IMMEDIATE_TYPE), [csv_searchsource_immediate.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/server/routes/internal/generate/csv_searchsource_immediate.ts#:~:text=CSV_SEARCHSOURCE_IMMEDIATE_TYPE) | - | +| | [constants.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/common/constants.ts#:~:text=CSV_JOB_TYPE_DEPRECATED), [constants.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/common/constants.ts#:~:text=CSV_JOB_TYPE_DEPRECATED), [job_utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/common/job_utils.ts#:~:text=CSV_JOB_TYPE_DEPRECATED), [job_utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/common/job_utils.ts#:~:text=CSV_JOB_TYPE_DEPRECATED), [get_document_payload.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/server/routes/common/jobs/get_document_payload.ts#:~:text=CSV_JOB_TYPE_DEPRECATED), [get_document_payload.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/server/routes/common/jobs/get_document_payload.ts#:~:text=CSV_JOB_TYPE_DEPRECATED) | - | | | [core.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/server/core.ts#:~:text=PdfV1ExportType), [core.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/server/core.ts#:~:text=PdfV1ExportType) | - | | | [request_handler.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/server/routes/common/generate/request_handler.test.ts#:~:text=JobParamsPDFDeprecated), [request_handler.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/server/routes/common/generate/request_handler.test.ts#:~:text=JobParamsPDFDeprecated) | - | @@ -1375,6 +1387,14 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] +## searchPlayground + +| Deprecated API | Reference location(s) | Remove By | +| ---------------|-----------|-----------| +| | [application.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/search_playground/public/application.tsx#:~:text=appBasePath) | 8.8.0 | + + + ## searchprofiler | Deprecated API | Reference location(s) | Remove By | diff --git a/api_docs/deprecations_by_team.mdx b/api_docs/deprecations_by_team.mdx index 9bf6e76f4776c..ef1e5cd670e24 100644 --- a/api_docs/deprecations_by_team.mdx +++ b/api_docs/deprecations_by_team.mdx @@ -7,7 +7,7 @@ id: kibDevDocsDeprecationsDueByTeam slug: /kibana-dev-docs/api-meta/deprecations-due-by-team title: Deprecated APIs due to be removed, by team description: Lists the teams that are referencing deprecated APIs with a remove by date. -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -21,6 +21,14 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] +## @elastic/enterprise-search-frontend + +| Plugin | Deprecated API | Reference location(s) | Remove By | +| --------|-------|-----------|-----------| +| searchPlayground | | [application.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/search_playground/public/application.tsx#:~:text=appBasePath) | 8.8.0 | + + + ## @elastic/fleet | Plugin | Deprecated API | Reference location(s) | Remove By | diff --git a/api_docs/dev_tools.mdx b/api_docs/dev_tools.mdx index 9ef23d7e27eda..65a637136d144 100644 --- a/api_docs/dev_tools.mdx +++ b/api_docs/dev_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/devTools title: "devTools" image: https://source.unsplash.com/400x175/?github description: API docs for the devTools plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'devTools'] --- import devToolsObj from './dev_tools.devdocs.json'; diff --git a/api_docs/discover.mdx b/api_docs/discover.mdx index ce44c1be61742..aefa9104eb769 100644 --- a/api_docs/discover.mdx +++ b/api_docs/discover.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/discover title: "discover" image: https://source.unsplash.com/400x175/?github description: API docs for the discover plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discover'] --- import discoverObj from './discover.devdocs.json'; diff --git a/api_docs/discover_enhanced.mdx b/api_docs/discover_enhanced.mdx index 4376507895c86..66464cdc9af30 100644 --- a/api_docs/discover_enhanced.mdx +++ b/api_docs/discover_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/discoverEnhanced title: "discoverEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the discoverEnhanced plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discoverEnhanced'] --- import discoverEnhancedObj from './discover_enhanced.devdocs.json'; diff --git a/api_docs/ecs_data_quality_dashboard.mdx b/api_docs/ecs_data_quality_dashboard.mdx index 9354a97c849c8..204b28137e381 100644 --- a/api_docs/ecs_data_quality_dashboard.mdx +++ b/api_docs/ecs_data_quality_dashboard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ecsDataQualityDashboard title: "ecsDataQualityDashboard" image: https://source.unsplash.com/400x175/?github description: API docs for the ecsDataQualityDashboard plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ecsDataQualityDashboard'] --- import ecsDataQualityDashboardObj from './ecs_data_quality_dashboard.devdocs.json'; diff --git a/api_docs/elastic_assistant.devdocs.json b/api_docs/elastic_assistant.devdocs.json index 807dfdfa8fd50..b9377a42a87aa 100644 --- a/api_docs/elastic_assistant.devdocs.json +++ b/api_docs/elastic_assistant.devdocs.json @@ -252,7 +252,39 @@ "label": "esClient", "description": [], "signature": [ - "{ create: { (this: That, params: ", + "{ search: { >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "SearchResponse", + ">; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "SearchResponse", + ", unknown>>; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "SearchResponse", + ">; }; create: { (this: That, params: ", "CreateRequest", " | ", "CreateRequest", @@ -356,39 +388,7 @@ "TransportRequestOptions", " | undefined): Promise<", "WriteResponseBase", - ">; }; search: { >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptionsWithOutMeta", - " | undefined): Promise<", - "SearchResponse", - ">; >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptionsWithMeta", - " | undefined): Promise<", - "TransportResult", - "<", - "SearchResponse", - ", unknown>>; >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptions", - " | undefined): Promise<", - "SearchResponse", - ">; }; helpers: ", + ">; }; helpers: ", "default", "; name: string | symbol; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kEsql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kInference]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kQueryRuleset]: symbol | null; [kRollup]: symbol | null; [kSearchApplication]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kSynonyms]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", "default", @@ -1552,7 +1552,7 @@ "section": "def-common.KibanaRequest", "text": "KibanaRequest" }, - "" + "" ], "path": "x-pack/plugins/elastic_assistant/server/types.ts", "deprecated": false, diff --git a/api_docs/elastic_assistant.mdx b/api_docs/elastic_assistant.mdx index 50080287033e5..23eee26b6ec1c 100644 --- a/api_docs/elastic_assistant.mdx +++ b/api_docs/elastic_assistant.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/elasticAssistant title: "elasticAssistant" image: https://source.unsplash.com/400x175/?github description: API docs for the elasticAssistant plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'elasticAssistant'] --- import elasticAssistantObj from './elastic_assistant.devdocs.json'; diff --git a/api_docs/embeddable.devdocs.json b/api_docs/embeddable.devdocs.json index be0ffe3dc6c48..78d3cdb0400e2 100644 --- a/api_docs/embeddable.devdocs.json +++ b/api_docs/embeddable.devdocs.json @@ -2255,7 +2255,9 @@ "label": "viewMode", "description": [], "signature": [ - "{ readonly value: ", + "{ source: ", + "Observable", + " | undefined; readonly value: ", { "pluginId": "@kbn/presentation-publishing", "scope": "common", @@ -2263,9 +2265,7 @@ "section": "def-common.ViewMode", "text": "ViewMode" }, - "; source: ", - "Observable", - " | undefined; error: (err: any) => void; forEach: { (next: (value: ", + "; error: (err: any) => void; forEach: { (next: (value: ", { "pluginId": "@kbn/presentation-publishing", "scope": "common", @@ -2681,7 +2681,9 @@ "label": "dataViews", "description": [], "signature": [ - "{ readonly value: ", + "{ source: ", + "Observable", + " | undefined; readonly value: ", { "pluginId": "dataViews", "scope": "common", @@ -2689,9 +2691,7 @@ "section": "def-common.DataView", "text": "DataView" }, - "[] | undefined; source: ", - "Observable", - " | undefined; error: (err: any) => void; forEach: { (next: (value: ", + "[] | undefined; error: (err: any) => void; forEach: { (next: (value: ", { "pluginId": "dataViews", "scope": "common", @@ -3045,7 +3045,9 @@ "label": "query$", "description": [], "signature": [ - "{ readonly value: ", + "{ source: ", + "Observable", + " | undefined; readonly value: ", { "pluginId": "@kbn/es-query", "scope": "common", @@ -3061,9 +3063,7 @@ "section": "def-common.AggregateQuery", "text": "AggregateQuery" }, - " | undefined; source: ", - "Observable", - " | undefined; error: (err: any) => void; forEach: { (next: (value: ", + " | undefined; error: (err: any) => void; forEach: { (next: (value: ", { "pluginId": "@kbn/es-query", "scope": "common", @@ -3609,9 +3609,9 @@ "label": "panelTitle", "description": [], "signature": [ - "{ readonly value: string | undefined; source: ", + "{ source: ", "Observable", - " | undefined; error: (err: any) => void; forEach: { (next: (value: string | undefined) => void): Promise; (next: (value: string | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => string | undefined; pipe: { (): ", + " | undefined; readonly value: string | undefined; error: (err: any) => void; forEach: { (next: (value: string | undefined) => void): Promise; (next: (value: string | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => string | undefined; pipe: { (): ", "Observable", "; (op1: ", "OperatorFunction", @@ -3773,9 +3773,9 @@ "label": "dataLoading", "description": [], "signature": [ - "{ readonly value: boolean | undefined; source: ", + "{ source: ", "Observable", - " | undefined; error: (err: any) => void; forEach: { (next: (value: boolean | undefined) => void): Promise; (next: (value: boolean | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => boolean | undefined; pipe: { (): ", + " | undefined; readonly value: boolean | undefined; error: (err: any) => void; forEach: { (next: (value: boolean | undefined) => void): Promise; (next: (value: boolean | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => boolean | undefined; pipe: { (): ", "Observable", "; (op1: ", "OperatorFunction", @@ -3937,7 +3937,9 @@ "label": "filters$", "description": [], "signature": [ - "{ readonly value: ", + "{ source: ", + "Observable", + " | undefined; readonly value: ", { "pluginId": "@kbn/es-query", "scope": "common", @@ -3945,9 +3947,7 @@ "section": "def-common.Filter", "text": "Filter" }, - "[] | undefined; source: ", - "Observable", - " | undefined; error: (err: any) => void; forEach: { (next: (value: ", + "[] | undefined; error: (err: any) => void; forEach: { (next: (value: ", { "pluginId": "@kbn/es-query", "scope": "common", @@ -4301,7 +4301,9 @@ "label": "onPhaseChange", "description": [], "signature": [ - "{ readonly value: ", + "{ source: ", + "Observable", + " | undefined; readonly value: ", { "pluginId": "@kbn/presentation-publishing", "scope": "common", @@ -4309,9 +4311,7 @@ "section": "def-common.PhaseEvent", "text": "PhaseEvent" }, - " | undefined; source: ", - "Observable", - " | undefined; error: (err: any) => void; forEach: { (next: (value: ", + " | undefined; error: (err: any) => void; forEach: { (next: (value: ", { "pluginId": "@kbn/presentation-publishing", "scope": "common", @@ -4679,9 +4679,9 @@ "label": "blockingError", "description": [], "signature": [ - "{ readonly value: Error | undefined; source: ", + "{ source: ", "Observable", - " | undefined; error: (err: any) => void; forEach: { (next: (value: Error | undefined) => void): Promise; (next: (value: Error | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => Error | undefined; pipe: { (): ", + " | undefined; readonly value: Error | undefined; error: (err: any) => void; forEach: { (next: (value: Error | undefined) => void): Promise; (next: (value: Error | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => Error | undefined; pipe: { (): ", "Observable", "; (op1: ", "OperatorFunction", @@ -4860,7 +4860,7 @@ "signature": [ "string | undefined" ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_title.ts", + "path": "packages/presentation/presentation_publishing/interfaces/titles/publishes_panel_title.ts", "deprecated": false, "trackAdoption": false } @@ -4874,7 +4874,9 @@ "label": "timeRange$", "description": [], "signature": [ - "{ readonly value: ", + "{ source: ", + "Observable", + " | undefined; readonly value: ", { "pluginId": "@kbn/es-query", "scope": "common", @@ -4882,9 +4884,7 @@ "section": "def-common.TimeRange", "text": "TimeRange" }, - " | undefined; source: ", - "Observable", - " | undefined; error: (err: any) => void; forEach: { (next: (value: ", + " | undefined; error: (err: any) => void; forEach: { (next: (value: ", { "pluginId": "@kbn/es-query", "scope": "common", @@ -5238,9 +5238,9 @@ "label": "hidePanelTitle", "description": [], "signature": [ - "{ readonly value: boolean | undefined; source: ", + "{ source: ", "Observable", - " | undefined; error: (err: any) => void; forEach: { (next: (value: boolean | undefined) => void): Promise; (next: (value: boolean | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => boolean | undefined; pipe: { (): ", + " | undefined; readonly value: boolean | undefined; error: (err: any) => void; forEach: { (next: (value: boolean | undefined) => void): Promise; (next: (value: boolean | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => boolean | undefined; pipe: { (): ", "Observable", "; (op1: ", "OperatorFunction", @@ -5432,9 +5432,9 @@ "label": "panelDescription", "description": [], "signature": [ - "{ readonly value: string | undefined; source: ", + "{ source: ", "Observable", - " | undefined; error: (err: any) => void; forEach: { (next: (value: string | undefined) => void): Promise; (next: (value: string | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => string | undefined; pipe: { (): ", + " | undefined; readonly value: string | undefined; error: (err: any) => void; forEach: { (next: (value: string | undefined) => void): Promise; (next: (value: string | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => string | undefined; pipe: { (): ", "Observable", "; (op1: ", "OperatorFunction", @@ -5596,9 +5596,9 @@ "label": "disabledActionIds", "description": [], "signature": [ - "{ readonly value: string[] | undefined; source: ", + "{ source: ", "Observable", - " | undefined; error: (err: any) => void; forEach: { (next: (value: string[] | undefined) => void): Promise; (next: (value: string[] | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => string[] | undefined; pipe: { (): ", + " | undefined; readonly value: string[] | undefined; error: (err: any) => void; forEach: { (next: (value: string[] | undefined) => void): Promise; (next: (value: string[] | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => string[] | undefined; pipe: { (): ", "Observable", "; (op1: ", "OperatorFunction", @@ -5858,7 +5858,7 @@ "signature": [ "boolean | undefined" ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_title.ts", + "path": "packages/presentation/presentation_publishing/interfaces/titles/publishes_panel_title.ts", "deprecated": false, "trackAdoption": false } @@ -5905,7 +5905,7 @@ "signature": [ "string | undefined" ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_description.ts", + "path": "packages/presentation/presentation_publishing/interfaces/titles/publishes_panel_description.ts", "deprecated": false, "trackAdoption": false } @@ -5947,9 +5947,9 @@ "label": "savedObjectId", "description": [], "signature": [ - "{ readonly value: string | undefined; source: ", + "{ source: ", "Observable", - " | undefined; error: (err: any) => void; forEach: { (next: (value: string | undefined) => void): Promise; (next: (value: string | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => string | undefined; pipe: { (): ", + " | undefined; readonly value: string | undefined; error: (err: any) => void; forEach: { (next: (value: string | undefined) => void): Promise; (next: (value: string | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => string | undefined; pipe: { (): ", "Observable", "; (op1: ", "OperatorFunction", @@ -8100,79 +8100,6 @@ "returnComment": [], "initialIsOpen": false }, - { - "parentPluginId": "embeddable", - "id": "def-public.initializeReactEmbeddableTitles", - "type": "Function", - "tags": [], - "label": "initializeReactEmbeddableTitles", - "description": [], - "signature": [ - "(rawState: ", - { - "pluginId": "embeddable", - "scope": "public", - "docId": "kibEmbeddablePluginApi", - "section": "def-public.SerializedReactEmbeddableTitles", - "text": "SerializedReactEmbeddableTitles" - }, - ") => { titlesApi: ", - { - "pluginId": "embeddable", - "scope": "public", - "docId": "kibEmbeddablePluginApi", - "section": "def-public.ReactEmbeddableTitlesApi", - "text": "ReactEmbeddableTitlesApi" - }, - "; titleComparators: ", - "EmbeddableStateComparators", - "<", - { - "pluginId": "embeddable", - "scope": "public", - "docId": "kibEmbeddablePluginApi", - "section": "def-public.SerializedReactEmbeddableTitles", - "text": "SerializedReactEmbeddableTitles" - }, - ">; serializeTitles: () => ", - { - "pluginId": "embeddable", - "scope": "public", - "docId": "kibEmbeddablePluginApi", - "section": "def-public.SerializedReactEmbeddableTitles", - "text": "SerializedReactEmbeddableTitles" - }, - "; }" - ], - "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_titles.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "embeddable", - "id": "def-public.initializeReactEmbeddableTitles.$1", - "type": "Object", - "tags": [], - "label": "rawState", - "description": [], - "signature": [ - { - "pluginId": "embeddable", - "scope": "public", - "docId": "kibEmbeddablePluginApi", - "section": "def-public.SerializedReactEmbeddableTitles", - "text": "SerializedReactEmbeddableTitles" - } - ], - "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_titles.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, { "parentPluginId": "embeddable", "id": "def-public.isContextMenuTriggerContext", @@ -9387,60 +9314,6 @@ "returnComment": [], "initialIsOpen": false }, - { - "parentPluginId": "embeddable", - "id": "def-public.serializeReactEmbeddableTitles", - "type": "Function", - "tags": [], - "label": "serializeReactEmbeddableTitles", - "description": [], - "signature": [ - "(titlesApi: ", - { - "pluginId": "embeddable", - "scope": "public", - "docId": "kibEmbeddablePluginApi", - "section": "def-public.ReactEmbeddableTitlesApi", - "text": "ReactEmbeddableTitlesApi" - }, - ") => ", - { - "pluginId": "embeddable", - "scope": "public", - "docId": "kibEmbeddablePluginApi", - "section": "def-public.SerializedReactEmbeddableTitles", - "text": "SerializedReactEmbeddableTitles" - } - ], - "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_titles.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "embeddable", - "id": "def-public.serializeReactEmbeddableTitles.$1", - "type": "CompoundType", - "tags": [], - "label": "titlesApi", - "description": [], - "signature": [ - { - "pluginId": "embeddable", - "scope": "public", - "docId": "kibEmbeddablePluginApi", - "section": "def-public.ReactEmbeddableTitlesApi", - "text": "ReactEmbeddableTitlesApi" - } - ], - "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_titles.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, { "parentPluginId": "embeddable", "id": "def-public.shouldFetch$", @@ -9511,7 +9384,13 @@ "text": "PresentationContainer" }, " | undefined, comparators: ", - "EmbeddableStateComparators", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.StateComparators", + "text": "StateComparators" + }, ", deserializeState: (state: ", { "pluginId": "@kbn/presentation-containers", @@ -9575,7 +9454,13 @@ "label": "comparators", "description": [], "signature": [ - "EmbeddableStateComparators", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.StateComparators", + "text": "StateComparators" + }, "" ], "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_unsaved_changes.ts", @@ -13194,8 +13079,22 @@ "(initialState: StateType, buildApi: (apiRegistration: ", "ReactEmbeddableApiRegistration", ", comparators: ", - "EmbeddableStateComparators", - ") => ApiType) => Promise<{ Component: React.FC<{}>; api: ApiType; }>" + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.StateComparators", + "text": "StateComparators" + }, + ") => ApiType, uuid: string, parentApi?: ", + { + "pluginId": "@kbn/presentation-containers", + "scope": "common", + "docId": "kibKbnPresentationContainersPluginApi", + "section": "def-common.PresentationContainer", + "text": "PresentationContainer" + }, + " | undefined) => Promise<{ Component: React.FC<{}>; api: ApiType; }>" ], "path": "src/plugins/embeddable/public/react_embeddable_system/types.ts", "deprecated": false, @@ -13227,13 +13126,56 @@ "(apiRegistration: ", "ReactEmbeddableApiRegistration", ", comparators: ", - "EmbeddableStateComparators", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.StateComparators", + "text": "StateComparators" + }, ") => ApiType" ], "path": "src/plugins/embeddable/public/react_embeddable_system/types.ts", "deprecated": false, "trackAdoption": false, "isRequired": true + }, + { + "parentPluginId": "embeddable", + "id": "def-public.ReactEmbeddableFactory.buildEmbeddable.$3", + "type": "string", + "tags": [], + "label": "uuid", + "description": [], + "signature": [ + "string" + ], + "path": "src/plugins/embeddable/public/react_embeddable_system/types.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "embeddable", + "id": "def-public.ReactEmbeddableFactory.buildEmbeddable.$4", + "type": "CompoundType", + "tags": [], + "label": "parentApi", + "description": [], + "signature": [ + { + "pluginId": "@kbn/presentation-containers", + "scope": "common", + "docId": "kibKbnPresentationContainersPluginApi", + "section": "def-common.PresentationContainer", + "text": "PresentationContainer" + }, + " | undefined" + ], + "path": "src/plugins/embeddable/public/react_embeddable_system/types.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false } ], "returnComment": [] @@ -13413,62 +13355,6 @@ } ], "initialIsOpen": false - }, - { - "parentPluginId": "embeddable", - "id": "def-public.SerializedReactEmbeddableTitles", - "type": "Interface", - "tags": [], - "label": "SerializedReactEmbeddableTitles", - "description": [], - "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_titles.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "embeddable", - "id": "def-public.SerializedReactEmbeddableTitles.title", - "type": "string", - "tags": [], - "label": "title", - "description": [], - "signature": [ - "string | undefined" - ], - "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_titles.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "embeddable", - "id": "def-public.SerializedReactEmbeddableTitles.description", - "type": "string", - "tags": [], - "label": "description", - "description": [], - "signature": [ - "string | undefined" - ], - "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_titles.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "embeddable", - "id": "def-public.SerializedReactEmbeddableTitles.hidePanelTitles", - "type": "CompoundType", - "tags": [], - "label": "hidePanelTitles", - "description": [], - "signature": [ - "boolean | undefined" - ], - "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_titles.ts", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false } ], "enums": [ @@ -13625,7 +13511,7 @@ "section": "def-public.EmbeddableFactory", "text": "EmbeddableFactory" }, - ", \"create\" | \"type\" | \"latestVersion\" | \"isEditable\" | \"getDisplayName\"> & Partial, \"type\" | \"create\" | \"latestVersion\" | \"isEditable\" | \"getDisplayName\"> & Partial void; setHidePanelTitle: (hide: boolean | undefined) => void; } & ", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesPanelDescription", - "text": "PublishesPanelDescription" - }, - " & { setPanelDescription: (newTitle: string | undefined) => void; }" - ], - "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_titles.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, { "parentPluginId": "embeddable", "id": "def-public.SELECT_RANGE_TRIGGER", diff --git a/api_docs/embeddable.mdx b/api_docs/embeddable.mdx index 8e4bf6047845e..717eda5c54e00 100644 --- a/api_docs/embeddable.mdx +++ b/api_docs/embeddable.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/embeddable title: "embeddable" image: https://source.unsplash.com/400x175/?github description: API docs for the embeddable plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'embeddable'] --- import embeddableObj from './embeddable.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kib | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 562 | 1 | 460 | 11 | +| 555 | 1 | 453 | 10 | ## Client diff --git a/api_docs/embeddable_enhanced.devdocs.json b/api_docs/embeddable_enhanced.devdocs.json index 78396cc65de94..9900ae72dfb5d 100644 --- a/api_docs/embeddable_enhanced.devdocs.json +++ b/api_docs/embeddable_enhanced.devdocs.json @@ -42,71 +42,6 @@ ], "returnComment": [], "initialIsOpen": false - }, - { - "parentPluginId": "embeddableEnhanced", - "id": "def-public.isEnhancedEmbeddable", - "type": "Function", - "tags": [], - "label": "isEnhancedEmbeddable", - "description": [], - "signature": [ - "(maybeEnhancedEmbeddable: E) => maybeEnhancedEmbeddable is ", - { - "pluginId": "embeddableEnhanced", - "scope": "public", - "docId": "kibEmbeddableEnhancedPluginApi", - "section": "def-public.EnhancedEmbeddable", - "text": "EnhancedEmbeddable" - }, - " ? E : never>" - ], - "path": "x-pack/plugins/embeddable_enhanced/public/embeddables/is_enhanced_embeddable.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "embeddableEnhanced", - "id": "def-public.isEnhancedEmbeddable.$1", - "type": "Uncategorized", - "tags": [], - "label": "maybeEnhancedEmbeddable", - "description": [], - "signature": [ - "E" - ], - "path": "x-pack/plugins/embeddable_enhanced/public/embeddables/is_enhanced_embeddable.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false } ], "interfaces": [ @@ -122,16 +57,7 @@ "path": "x-pack/plugins/embeddable_enhanced/public/types.ts", "deprecated": true, "trackAdoption": false, - "references": [ - { - "plugin": "dashboardEnhanced", - "path": "x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_edit_drilldown/menu_item.tsx" - }, - { - "plugin": "dashboardEnhanced", - "path": "x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_edit_drilldown/menu_item.tsx" - } - ], + "references": [], "children": [ { "parentPluginId": "embeddableEnhanced", @@ -164,15 +90,14 @@ "section": "def-public.EmbeddableOutput", "text": "EmbeddableOutput" }, - ", any> & { enhancements: { dynamicActions: ", + ", any> & ", { - "pluginId": "uiActionsEnhanced", + "pluginId": "embeddableEnhanced", "scope": "public", - "docId": "kibUiActionsEnhancedPluginApi", - "section": "def-public.DynamicActionManager", - "text": "DynamicActionManager" - }, - "; }; }" + "docId": "kibEmbeddableEnhancedPluginApi", + "section": "def-public.HasDynamicActions", + "text": "HasDynamicActions" + } ], "path": "x-pack/plugins/embeddable_enhanced/public/types.ts", "deprecated": false, @@ -213,6 +138,418 @@ "path": "x-pack/plugins/embeddable_enhanced/public/embeddables/interfaces/has_dynamic_actions.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "embeddableEnhanced", + "id": "def-public.HasDynamicActions.setDynamicActions", + "type": "Function", + "tags": [], + "label": "setDynamicActions", + "description": [], + "signature": [ + "(newState: { dynamicActions: ", + { + "pluginId": "uiActionsEnhanced", + "scope": "common", + "docId": "kibUiActionsEnhancedPluginApi", + "section": "def-common.DynamicActionsState", + "text": "DynamicActionsState" + }, + "; } | undefined) => void" + ], + "path": "x-pack/plugins/embeddable_enhanced/public/embeddables/interfaces/has_dynamic_actions.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "embeddableEnhanced", + "id": "def-public.HasDynamicActions.setDynamicActions.$1", + "type": "Object", + "tags": [], + "label": "newState", + "description": [], + "signature": [ + "{ dynamicActions: ", + { + "pluginId": "uiActionsEnhanced", + "scope": "common", + "docId": "kibUiActionsEnhancedPluginApi", + "section": "def-common.DynamicActionsState", + "text": "DynamicActionsState" + }, + "; } | undefined" + ], + "path": "x-pack/plugins/embeddable_enhanced/public/embeddables/interfaces/has_dynamic_actions.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + } + ], + "returnComment": [] + }, + { + "parentPluginId": "embeddableEnhanced", + "id": "def-public.HasDynamicActions.dynamicActionsState$", + "type": "Object", + "tags": [], + "label": "dynamicActionsState$", + "description": [], + "signature": [ + "{ source: ", + "Observable", + " | undefined; readonly value: { dynamicActions: ", + { + "pluginId": "uiActionsEnhanced", + "scope": "common", + "docId": "kibUiActionsEnhancedPluginApi", + "section": "def-common.DynamicActionsState", + "text": "DynamicActionsState" + }, + "; } | undefined; error: (err: any) => void; forEach: { (next: (value: { dynamicActions: ", + { + "pluginId": "uiActionsEnhanced", + "scope": "common", + "docId": "kibUiActionsEnhancedPluginApi", + "section": "def-common.DynamicActionsState", + "text": "DynamicActionsState" + }, + "; } | undefined) => void): Promise; (next: (value: { dynamicActions: ", + { + "pluginId": "uiActionsEnhanced", + "scope": "common", + "docId": "kibUiActionsEnhancedPluginApi", + "section": "def-common.DynamicActionsState", + "text": "DynamicActionsState" + }, + "; } | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => { dynamicActions: ", + { + "pluginId": "uiActionsEnhanced", + "scope": "common", + "docId": "kibUiActionsEnhancedPluginApi", + "section": "def-common.DynamicActionsState", + "text": "DynamicActionsState" + }, + "; } | undefined; pipe: { (): ", + "Observable", + "<{ dynamicActions: ", + { + "pluginId": "uiActionsEnhanced", + "scope": "common", + "docId": "kibUiActionsEnhancedPluginApi", + "section": "def-common.DynamicActionsState", + "text": "DynamicActionsState" + }, + "; } | undefined>; (op1: ", + "OperatorFunction", + "<{ dynamicActions: ", + { + "pluginId": "uiActionsEnhanced", + "scope": "common", + "docId": "kibUiActionsEnhancedPluginApi", + "section": "def-common.DynamicActionsState", + "text": "DynamicActionsState" + }, + "; } | undefined, A>): ", + "Observable", + "; (op1: ", + "OperatorFunction", + "<{ dynamicActions: ", + { + "pluginId": "uiActionsEnhanced", + "scope": "common", + "docId": "kibUiActionsEnhancedPluginApi", + "section": "def-common.DynamicActionsState", + "text": "DynamicActionsState" + }, + "; } | undefined, A>, op2: ", + "OperatorFunction", + "): ", + "Observable", + "; (op1: ", + "OperatorFunction", + "<{ dynamicActions: ", + { + "pluginId": "uiActionsEnhanced", + "scope": "common", + "docId": "kibUiActionsEnhancedPluginApi", + "section": "def-common.DynamicActionsState", + "text": "DynamicActionsState" + }, + "; } | undefined, A>, op2: ", + "OperatorFunction", + ", op3: ", + "OperatorFunction", + "): ", + "Observable", + "; (op1: ", + "OperatorFunction", + "<{ dynamicActions: ", + { + "pluginId": "uiActionsEnhanced", + "scope": "common", + "docId": "kibUiActionsEnhancedPluginApi", + "section": "def-common.DynamicActionsState", + "text": "DynamicActionsState" + }, + "; } | undefined, A>, op2: ", + "OperatorFunction", + ", op3: ", + "OperatorFunction", + ", op4: ", + "OperatorFunction", + "): ", + "Observable", + "; (op1: ", + "OperatorFunction", + "<{ dynamicActions: ", + { + "pluginId": "uiActionsEnhanced", + "scope": "common", + "docId": "kibUiActionsEnhancedPluginApi", + "section": "def-common.DynamicActionsState", + "text": "DynamicActionsState" + }, + "; } | undefined, A>, op2: ", + "OperatorFunction", + ", op3: ", + "OperatorFunction", + ", op4: ", + "OperatorFunction", + ", op5: ", + "OperatorFunction", + "): ", + "Observable", + "; (op1: ", + "OperatorFunction", + "<{ dynamicActions: ", + { + "pluginId": "uiActionsEnhanced", + "scope": "common", + "docId": "kibUiActionsEnhancedPluginApi", + "section": "def-common.DynamicActionsState", + "text": "DynamicActionsState" + }, + "; } | undefined, A>, op2: ", + "OperatorFunction", + ", op3: ", + "OperatorFunction", + ", op4: ", + "OperatorFunction", + ", op5: ", + "OperatorFunction", + ", op6: ", + "OperatorFunction", + "): ", + "Observable", + "; (op1: ", + "OperatorFunction", + "<{ dynamicActions: ", + { + "pluginId": "uiActionsEnhanced", + "scope": "common", + "docId": "kibUiActionsEnhancedPluginApi", + "section": "def-common.DynamicActionsState", + "text": "DynamicActionsState" + }, + "; } | undefined, A>, op2: ", + "OperatorFunction", + ", op3: ", + "OperatorFunction", + ", op4: ", + "OperatorFunction", + ", op5: ", + "OperatorFunction", + ", op6: ", + "OperatorFunction", + ", op7: ", + "OperatorFunction", + "): ", + "Observable", + "; (op1: ", + "OperatorFunction", + "<{ dynamicActions: ", + { + "pluginId": "uiActionsEnhanced", + "scope": "common", + "docId": "kibUiActionsEnhancedPluginApi", + "section": "def-common.DynamicActionsState", + "text": "DynamicActionsState" + }, + "; } | undefined, A>, op2: ", + "OperatorFunction", + ", op3: ", + "OperatorFunction", + ", op4: ", + "OperatorFunction", + ", op5: ", + "OperatorFunction", + ", op6: ", + "OperatorFunction", + ", op7: ", + "OperatorFunction", + ", op8: ", + "OperatorFunction", + "): ", + "Observable", + "; (op1: ", + "OperatorFunction", + "<{ dynamicActions: ", + { + "pluginId": "uiActionsEnhanced", + "scope": "common", + "docId": "kibUiActionsEnhancedPluginApi", + "section": "def-common.DynamicActionsState", + "text": "DynamicActionsState" + }, + "; } | undefined, A>, op2: ", + "OperatorFunction", + ", op3: ", + "OperatorFunction", + ", op4: ", + "OperatorFunction", + ", op5: ", + "OperatorFunction", + ", op6: ", + "OperatorFunction", + ", op7: ", + "OperatorFunction", + ", op8: ", + "OperatorFunction", + ", op9: ", + "OperatorFunction", + "): ", + "Observable", + "; (op1: ", + "OperatorFunction", + "<{ dynamicActions: ", + { + "pluginId": "uiActionsEnhanced", + "scope": "common", + "docId": "kibUiActionsEnhancedPluginApi", + "section": "def-common.DynamicActionsState", + "text": "DynamicActionsState" + }, + "; } | undefined, A>, op2: ", + "OperatorFunction", + ", op3: ", + "OperatorFunction", + ", op4: ", + "OperatorFunction", + ", op5: ", + "OperatorFunction", + ", op6: ", + "OperatorFunction", + ", op7: ", + "OperatorFunction", + ", op8: ", + "OperatorFunction", + ", op9: ", + "OperatorFunction", + ", ...operations: ", + "OperatorFunction", + "[]): ", + "Observable", + "; }; complete: () => void; closed: boolean; observers: ", + "Observer", + "<{ dynamicActions: ", + { + "pluginId": "uiActionsEnhanced", + "scope": "common", + "docId": "kibUiActionsEnhancedPluginApi", + "section": "def-common.DynamicActionsState", + "text": "DynamicActionsState" + }, + "; } | undefined>[]; isStopped: boolean; hasError: boolean; thrownError: any; lift: (operator: ", + "Operator", + "<{ dynamicActions: ", + { + "pluginId": "uiActionsEnhanced", + "scope": "common", + "docId": "kibUiActionsEnhancedPluginApi", + "section": "def-common.DynamicActionsState", + "text": "DynamicActionsState" + }, + "; } | undefined, R>) => ", + "Observable", + "; unsubscribe: () => void; readonly observed: boolean; asObservable: () => ", + "Observable", + "<{ dynamicActions: ", + { + "pluginId": "uiActionsEnhanced", + "scope": "common", + "docId": "kibUiActionsEnhancedPluginApi", + "section": "def-common.DynamicActionsState", + "text": "DynamicActionsState" + }, + "; } | undefined>; operator: ", + "Operator", + " | undefined; subscribe: { (observerOrNext?: Partial<", + "Observer", + "<{ dynamicActions: ", + { + "pluginId": "uiActionsEnhanced", + "scope": "common", + "docId": "kibUiActionsEnhancedPluginApi", + "section": "def-common.DynamicActionsState", + "text": "DynamicActionsState" + }, + "; } | undefined>> | ((value: { dynamicActions: ", + { + "pluginId": "uiActionsEnhanced", + "scope": "common", + "docId": "kibUiActionsEnhancedPluginApi", + "section": "def-common.DynamicActionsState", + "text": "DynamicActionsState" + }, + "; } | undefined) => void) | undefined): ", + "Subscription", + "; (next?: ((value: { dynamicActions: ", + { + "pluginId": "uiActionsEnhanced", + "scope": "common", + "docId": "kibUiActionsEnhancedPluginApi", + "section": "def-common.DynamicActionsState", + "text": "DynamicActionsState" + }, + "; } | undefined) => void) | null | undefined, error?: ((error: any) => void) | null | undefined, complete?: (() => void) | null | undefined): ", + "Subscription", + "; }; toPromise: { (): Promise<{ dynamicActions: ", + { + "pluginId": "uiActionsEnhanced", + "scope": "common", + "docId": "kibUiActionsEnhancedPluginApi", + "section": "def-common.DynamicActionsState", + "text": "DynamicActionsState" + }, + "; } | undefined>; (PromiseCtor: PromiseConstructor): Promise<{ dynamicActions: ", + { + "pluginId": "uiActionsEnhanced", + "scope": "common", + "docId": "kibUiActionsEnhancedPluginApi", + "section": "def-common.DynamicActionsState", + "text": "DynamicActionsState" + }, + "; } | undefined>; (PromiseCtor: PromiseConstructorLike): Promise<{ dynamicActions: ", + { + "pluginId": "uiActionsEnhanced", + "scope": "common", + "docId": "kibUiActionsEnhancedPluginApi", + "section": "def-common.DynamicActionsState", + "text": "DynamicActionsState" + }, + "; } | undefined>; }; }" + ], + "path": "x-pack/plugins/embeddable_enhanced/public/embeddables/interfaces/has_dynamic_actions.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false @@ -358,15 +695,14 @@ "label": "EnhancedEmbeddable", "description": [], "signature": [ - "E & { enhancements: { dynamicActions: ", + "E & ", { - "pluginId": "uiActionsEnhanced", + "pluginId": "embeddableEnhanced", "scope": "public", - "docId": "kibUiActionsEnhancedPluginApi", - "section": "def-public.DynamicActionManager", - "text": "DynamicActionManager" - }, - "; }; }" + "docId": "kibEmbeddableEnhancedPluginApi", + "section": "def-public.HasDynamicActions", + "text": "HasDynamicActions" + } ], "path": "x-pack/plugins/embeddable_enhanced/public/types.ts", "deprecated": false, @@ -399,7 +735,92 @@ "path": "x-pack/plugins/embeddable_enhanced/public/plugin.ts", "deprecated": false, "trackAdoption": false, - "children": [], + "children": [ + { + "parentPluginId": "embeddableEnhanced", + "id": "def-public.StartContract.initializeReactEmbeddableDynamicActions", + "type": "Function", + "tags": [], + "label": "initializeReactEmbeddableDynamicActions", + "description": [], + "signature": [ + "(uuid: string, getTitle: () => string | undefined, state: ", + "DynamicActionsSerializedState", + ") => { dynamicActionsApi: ", + { + "pluginId": "embeddableEnhanced", + "scope": "public", + "docId": "kibEmbeddableEnhancedPluginApi", + "section": "def-public.HasDynamicActions", + "text": "HasDynamicActions" + }, + "; dynamicActionsComparator: ", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.StateComparators", + "text": "StateComparators" + }, + "<", + "DynamicActionsSerializedState", + ">; serializeDynamicActions: () => ", + "DynamicActionsSerializedState", + "; }" + ], + "path": "x-pack/plugins/embeddable_enhanced/public/plugin.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "embeddableEnhanced", + "id": "def-public.StartContract.initializeReactEmbeddableDynamicActions.$1", + "type": "string", + "tags": [], + "label": "uuid", + "description": [], + "signature": [ + "string" + ], + "path": "x-pack/plugins/embeddable_enhanced/public/plugin.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "embeddableEnhanced", + "id": "def-public.StartContract.initializeReactEmbeddableDynamicActions.$2", + "type": "Function", + "tags": [], + "label": "getTitle", + "description": [], + "signature": [ + "() => string | undefined" + ], + "path": "x-pack/plugins/embeddable_enhanced/public/plugin.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "embeddableEnhanced", + "id": "def-public.StartContract.initializeReactEmbeddableDynamicActions.$3", + "type": "Object", + "tags": [], + "label": "state", + "description": [], + "signature": [ + "DynamicActionsSerializedState" + ], + "path": "x-pack/plugins/embeddable_enhanced/public/plugin.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + } + ], "lifecycle": "start", "initialIsOpen": true } diff --git a/api_docs/embeddable_enhanced.mdx b/api_docs/embeddable_enhanced.mdx index 4b117f9c6c46b..d685a3350f9e6 100644 --- a/api_docs/embeddable_enhanced.mdx +++ b/api_docs/embeddable_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/embeddableEnhanced title: "embeddableEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the embeddableEnhanced plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'embeddableEnhanced'] --- import embeddableEnhancedObj from './embeddable_enhanced.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kib | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 18 | 0 | 18 | 0 | +| 23 | 0 | 23 | 1 | ## Client diff --git a/api_docs/encrypted_saved_objects.mdx b/api_docs/encrypted_saved_objects.mdx index 1566e05dd52d9..64ef863939eb6 100644 --- a/api_docs/encrypted_saved_objects.mdx +++ b/api_docs/encrypted_saved_objects.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/encryptedSavedObjects title: "encryptedSavedObjects" image: https://source.unsplash.com/400x175/?github description: API docs for the encryptedSavedObjects plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'encryptedSavedObjects'] --- import encryptedSavedObjectsObj from './encrypted_saved_objects.devdocs.json'; diff --git a/api_docs/enterprise_search.devdocs.json b/api_docs/enterprise_search.devdocs.json index de410fffcb09a..4318cb4035bcf 100644 --- a/api_docs/enterprise_search.devdocs.json +++ b/api_docs/enterprise_search.devdocs.json @@ -54,7 +54,7 @@ "label": "ConfigType", "description": [], "signature": [ - "{ readonly host?: string | undefined; readonly customHeaders?: Readonly<{} & {}> | undefined; readonly ssl: Readonly<{ certificateAuthorities?: string | string[] | undefined; } & { verificationMode: \"none\" | \"full\" | \"certificate\"; }>; readonly enabled: boolean; readonly ui: Readonly<{} & { enabled: boolean; }>; readonly accessCheckTimeout: number; readonly accessCheckTimeoutWarning: number; readonly canDeployEntSearch: boolean; readonly hasConnectors: boolean; readonly hasDefaultIngestPipeline: boolean; readonly hasDocumentLevelSecurityEnabled: boolean; readonly hasIncrementalSyncEnabled: boolean; readonly hasNativeConnectors: boolean; readonly hasWebCrawler: boolean; readonly isCloud: boolean; readonly showAIPlayground: boolean; }" + "{ readonly host?: string | undefined; readonly customHeaders?: Readonly<{} & {}> | undefined; readonly ssl: Readonly<{ certificateAuthorities?: string | string[] | undefined; } & { verificationMode: \"none\" | \"full\" | \"certificate\"; }>; readonly enabled: boolean; readonly ui: Readonly<{} & { enabled: boolean; }>; readonly accessCheckTimeout: number; readonly accessCheckTimeoutWarning: number; readonly canDeployEntSearch: boolean; readonly hasConnectors: boolean; readonly hasDefaultIngestPipeline: boolean; readonly hasDocumentLevelSecurityEnabled: boolean; readonly hasIncrementalSyncEnabled: boolean; readonly hasNativeConnectors: boolean; readonly hasWebCrawler: boolean; readonly isCloud: boolean; }" ], "path": "x-pack/plugins/enterprise_search/server/index.ts", "deprecated": false, @@ -237,15 +237,7 @@ "section": "def-common.Type", "text": "Type" }, - "; }>; showAIPlayground: ", - { - "pluginId": "@kbn/config-schema", - "scope": "common", - "docId": "kibKbnConfigSchemaPluginApi", - "section": "def-common.Type", - "text": "Type" - }, - "; }>" + "; }>; }>" ], "path": "x-pack/plugins/enterprise_search/server/index.ts", "deprecated": false, diff --git a/api_docs/enterprise_search.mdx b/api_docs/enterprise_search.mdx index 46c71a1ef63c3..5a8577a2ff7c9 100644 --- a/api_docs/enterprise_search.mdx +++ b/api_docs/enterprise_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/enterpriseSearch title: "enterpriseSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the enterpriseSearch plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'enterpriseSearch'] --- import enterpriseSearchObj from './enterprise_search.devdocs.json'; diff --git a/api_docs/es_ui_shared.mdx b/api_docs/es_ui_shared.mdx index feea055c7b568..4e82dfe5e345c 100644 --- a/api_docs/es_ui_shared.mdx +++ b/api_docs/es_ui_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/esUiShared title: "esUiShared" image: https://source.unsplash.com/400x175/?github description: API docs for the esUiShared plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'esUiShared'] --- import esUiSharedObj from './es_ui_shared.devdocs.json'; diff --git a/api_docs/event_annotation.mdx b/api_docs/event_annotation.mdx index fe78a380380a0..4a24b0ff73e9d 100644 --- a/api_docs/event_annotation.mdx +++ b/api_docs/event_annotation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/eventAnnotation title: "eventAnnotation" image: https://source.unsplash.com/400x175/?github description: API docs for the eventAnnotation plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventAnnotation'] --- import eventAnnotationObj from './event_annotation.devdocs.json'; diff --git a/api_docs/event_annotation_listing.mdx b/api_docs/event_annotation_listing.mdx index f7ff18f8cbbb5..aea5c38815881 100644 --- a/api_docs/event_annotation_listing.mdx +++ b/api_docs/event_annotation_listing.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/eventAnnotationListing title: "eventAnnotationListing" image: https://source.unsplash.com/400x175/?github description: API docs for the eventAnnotationListing plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventAnnotationListing'] --- import eventAnnotationListingObj from './event_annotation_listing.devdocs.json'; diff --git a/api_docs/event_log.devdocs.json b/api_docs/event_log.devdocs.json index 2bfc1785325d8..fff36d7a36df6 100644 --- a/api_docs/event_log.devdocs.json +++ b/api_docs/event_log.devdocs.json @@ -1450,7 +1450,7 @@ "label": "data", "description": [], "signature": [ - "(Readonly<{ log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; message?: string | undefined; tags?: string[] | undefined; rule?: Readonly<{ id?: string | undefined; name?: string | undefined; license?: string | undefined; uuid?: string | undefined; version?: string | undefined; category?: string | undefined; description?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; } & {}> | undefined; kibana?: Readonly<{ action?: Readonly<{ id?: string | undefined; name?: string | undefined; execution?: Readonly<{ source?: string | undefined; uuid?: string | undefined; gen_ai?: Readonly<{ usage?: Readonly<{ prompt_tokens?: string | number | undefined; completion_tokens?: string | number | undefined; total_tokens?: string | number | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; alerting?: Readonly<{ outcome?: string | undefined; summary?: Readonly<{ recovered?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; new?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; ongoing?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; } & {}> | undefined; status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; alert?: Readonly<{ rule?: Readonly<{ consumer?: string | undefined; revision?: string | number | undefined; execution?: Readonly<{ uuid?: string | undefined; status?: string | undefined; metrics?: Readonly<{ total_search_duration_ms?: string | number | undefined; total_indexing_duration_ms?: string | number | undefined; number_of_triggered_actions?: string | number | undefined; number_of_generated_actions?: string | number | undefined; alert_counts?: Readonly<{ recovered?: string | number | undefined; active?: string | number | undefined; new?: string | number | undefined; } & {}> | undefined; number_of_delayed_alerts?: string | number | undefined; number_of_searches?: string | number | undefined; es_search_duration_ms?: string | number | undefined; execution_gap_duration_s?: string | number | undefined; rule_type_run_duration_ms?: string | number | undefined; process_alerts_duration_ms?: string | number | undefined; trigger_actions_duration_ms?: string | number | undefined; process_rule_duration_ms?: string | number | undefined; claim_to_start_duration_ms?: string | number | undefined; persist_alerts_duration_ms?: string | number | undefined; prepare_rule_duration_ms?: string | number | undefined; prepare_to_run_duration_ms?: string | number | undefined; total_run_duration_ms?: string | number | undefined; total_enrichment_duration_ms?: string | number | undefined; } & {}> | undefined; status_order?: string | number | undefined; } & {}> | undefined; rule_type_id?: string | undefined; } & {}> | undefined; uuid?: string | undefined; flapping?: boolean | undefined; maintenance_window_ids?: string[] | undefined; } & {}> | undefined; version?: string | undefined; server_uuid?: string | undefined; task?: Readonly<{ id?: string | undefined; schedule_delay?: string | number | undefined; scheduled?: string | undefined; } & {}> | undefined; saved_objects?: Readonly<{ type?: string | undefined; id?: string | undefined; namespace?: string | undefined; rel?: string | undefined; type_id?: string | undefined; space_agnostic?: boolean | undefined; } & {}>[] | undefined; space_ids?: string[] | undefined; } & {}> | undefined; event?: Readonly<{ type?: string[] | undefined; reason?: string | undefined; action?: string | undefined; id?: string | undefined; start?: string | undefined; end?: string | undefined; outcome?: string | undefined; category?: string[] | undefined; duration?: string | number | undefined; timezone?: string | undefined; risk_score?: number | undefined; severity?: string | number | undefined; url?: string | undefined; created?: string | undefined; dataset?: string | undefined; code?: string | undefined; hash?: string | undefined; ingested?: string | undefined; kind?: string | undefined; module?: string | undefined; original?: string | undefined; provider?: string | undefined; reference?: string | undefined; risk_score_norm?: number | undefined; sequence?: string | number | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; user?: Readonly<{ id?: string | undefined; name?: string | undefined; } & {}> | undefined; } & {}> | undefined)[]" + "(Readonly<{ log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; error?: Readonly<{ id?: string | undefined; type?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; message?: string | undefined; tags?: string[] | undefined; rule?: Readonly<{ id?: string | undefined; name?: string | undefined; license?: string | undefined; uuid?: string | undefined; version?: string | undefined; category?: string | undefined; description?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; } & {}> | undefined; kibana?: Readonly<{ task?: Readonly<{ id?: string | undefined; schedule_delay?: string | number | undefined; scheduled?: string | undefined; } & {}> | undefined; action?: Readonly<{ id?: string | undefined; name?: string | undefined; execution?: Readonly<{ source?: string | undefined; uuid?: string | undefined; gen_ai?: Readonly<{ usage?: Readonly<{ prompt_tokens?: string | number | undefined; completion_tokens?: string | number | undefined; total_tokens?: string | number | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; alerting?: Readonly<{ outcome?: string | undefined; summary?: Readonly<{ recovered?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; new?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; ongoing?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; } & {}> | undefined; status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; alert?: Readonly<{ rule?: Readonly<{ consumer?: string | undefined; revision?: string | number | undefined; execution?: Readonly<{ uuid?: string | undefined; status?: string | undefined; metrics?: Readonly<{ total_search_duration_ms?: string | number | undefined; total_indexing_duration_ms?: string | number | undefined; number_of_triggered_actions?: string | number | undefined; number_of_generated_actions?: string | number | undefined; alert_counts?: Readonly<{ recovered?: string | number | undefined; active?: string | number | undefined; new?: string | number | undefined; } & {}> | undefined; number_of_delayed_alerts?: string | number | undefined; number_of_searches?: string | number | undefined; es_search_duration_ms?: string | number | undefined; execution_gap_duration_s?: string | number | undefined; rule_type_run_duration_ms?: string | number | undefined; process_alerts_duration_ms?: string | number | undefined; trigger_actions_duration_ms?: string | number | undefined; process_rule_duration_ms?: string | number | undefined; claim_to_start_duration_ms?: string | number | undefined; persist_alerts_duration_ms?: string | number | undefined; prepare_rule_duration_ms?: string | number | undefined; total_run_duration_ms?: string | number | undefined; total_enrichment_duration_ms?: string | number | undefined; } & {}> | undefined; status_order?: string | number | undefined; } & {}> | undefined; rule_type_id?: string | undefined; } & {}> | undefined; uuid?: string | undefined; flapping?: boolean | undefined; maintenance_window_ids?: string[] | undefined; } & {}> | undefined; version?: string | undefined; server_uuid?: string | undefined; saved_objects?: Readonly<{ id?: string | undefined; type?: string | undefined; namespace?: string | undefined; rel?: string | undefined; type_id?: string | undefined; space_agnostic?: boolean | undefined; } & {}>[] | undefined; space_ids?: string[] | undefined; } & {}> | undefined; event?: Readonly<{ id?: string | undefined; type?: string[] | undefined; reason?: string | undefined; action?: string | undefined; start?: string | undefined; end?: string | undefined; outcome?: string | undefined; category?: string[] | undefined; duration?: string | number | undefined; timezone?: string | undefined; risk_score?: number | undefined; severity?: string | number | undefined; url?: string | undefined; created?: string | undefined; dataset?: string | undefined; code?: string | undefined; hash?: string | undefined; ingested?: string | undefined; kind?: string | undefined; module?: string | undefined; original?: string | undefined; provider?: string | undefined; reference?: string | undefined; risk_score_norm?: number | undefined; sequence?: string | number | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; user?: Readonly<{ id?: string | undefined; name?: string | undefined; } & {}> | undefined; } & {}> | undefined)[]" ], "path": "x-pack/plugins/event_log/server/es/cluster_client_adapter.ts", "deprecated": false, @@ -1470,7 +1470,7 @@ "label": "IEvent", "description": [], "signature": [ - "DeepPartial | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; message?: string | undefined; tags?: string[] | undefined; rule?: Readonly<{ id?: string | undefined; name?: string | undefined; license?: string | undefined; uuid?: string | undefined; version?: string | undefined; category?: string | undefined; description?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; } & {}> | undefined; kibana?: Readonly<{ action?: Readonly<{ id?: string | undefined; name?: string | undefined; execution?: Readonly<{ source?: string | undefined; uuid?: string | undefined; gen_ai?: Readonly<{ usage?: Readonly<{ prompt_tokens?: string | number | undefined; completion_tokens?: string | number | undefined; total_tokens?: string | number | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; alerting?: Readonly<{ outcome?: string | undefined; summary?: Readonly<{ recovered?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; new?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; ongoing?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; } & {}> | undefined; status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; alert?: Readonly<{ rule?: Readonly<{ consumer?: string | undefined; revision?: string | number | undefined; execution?: Readonly<{ uuid?: string | undefined; status?: string | undefined; metrics?: Readonly<{ total_search_duration_ms?: string | number | undefined; total_indexing_duration_ms?: string | number | undefined; number_of_triggered_actions?: string | number | undefined; number_of_generated_actions?: string | number | undefined; alert_counts?: Readonly<{ recovered?: string | number | undefined; active?: string | number | undefined; new?: string | number | undefined; } & {}> | undefined; number_of_delayed_alerts?: string | number | undefined; number_of_searches?: string | number | undefined; es_search_duration_ms?: string | number | undefined; execution_gap_duration_s?: string | number | undefined; rule_type_run_duration_ms?: string | number | undefined; process_alerts_duration_ms?: string | number | undefined; trigger_actions_duration_ms?: string | number | undefined; process_rule_duration_ms?: string | number | undefined; claim_to_start_duration_ms?: string | number | undefined; persist_alerts_duration_ms?: string | number | undefined; prepare_rule_duration_ms?: string | number | undefined; prepare_to_run_duration_ms?: string | number | undefined; total_run_duration_ms?: string | number | undefined; total_enrichment_duration_ms?: string | number | undefined; } & {}> | undefined; status_order?: string | number | undefined; } & {}> | undefined; rule_type_id?: string | undefined; } & {}> | undefined; uuid?: string | undefined; flapping?: boolean | undefined; maintenance_window_ids?: string[] | undefined; } & {}> | undefined; version?: string | undefined; server_uuid?: string | undefined; task?: Readonly<{ id?: string | undefined; schedule_delay?: string | number | undefined; scheduled?: string | undefined; } & {}> | undefined; saved_objects?: Readonly<{ type?: string | undefined; id?: string | undefined; namespace?: string | undefined; rel?: string | undefined; type_id?: string | undefined; space_agnostic?: boolean | undefined; } & {}>[] | undefined; space_ids?: string[] | undefined; } & {}> | undefined; event?: Readonly<{ type?: string[] | undefined; reason?: string | undefined; action?: string | undefined; id?: string | undefined; start?: string | undefined; end?: string | undefined; outcome?: string | undefined; category?: string[] | undefined; duration?: string | number | undefined; timezone?: string | undefined; risk_score?: number | undefined; severity?: string | number | undefined; url?: string | undefined; created?: string | undefined; dataset?: string | undefined; code?: string | undefined; hash?: string | undefined; ingested?: string | undefined; kind?: string | undefined; module?: string | undefined; original?: string | undefined; provider?: string | undefined; reference?: string | undefined; risk_score_norm?: number | undefined; sequence?: string | number | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; user?: Readonly<{ id?: string | undefined; name?: string | undefined; } & {}> | undefined; } & {}>>> | undefined" + "DeepPartial | undefined; error?: Readonly<{ id?: string | undefined; type?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; message?: string | undefined; tags?: string[] | undefined; rule?: Readonly<{ id?: string | undefined; name?: string | undefined; license?: string | undefined; uuid?: string | undefined; version?: string | undefined; category?: string | undefined; description?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; } & {}> | undefined; kibana?: Readonly<{ task?: Readonly<{ id?: string | undefined; schedule_delay?: string | number | undefined; scheduled?: string | undefined; } & {}> | undefined; action?: Readonly<{ id?: string | undefined; name?: string | undefined; execution?: Readonly<{ source?: string | undefined; uuid?: string | undefined; gen_ai?: Readonly<{ usage?: Readonly<{ prompt_tokens?: string | number | undefined; completion_tokens?: string | number | undefined; total_tokens?: string | number | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; alerting?: Readonly<{ outcome?: string | undefined; summary?: Readonly<{ recovered?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; new?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; ongoing?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; } & {}> | undefined; status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; alert?: Readonly<{ rule?: Readonly<{ consumer?: string | undefined; revision?: string | number | undefined; execution?: Readonly<{ uuid?: string | undefined; status?: string | undefined; metrics?: Readonly<{ total_search_duration_ms?: string | number | undefined; total_indexing_duration_ms?: string | number | undefined; number_of_triggered_actions?: string | number | undefined; number_of_generated_actions?: string | number | undefined; alert_counts?: Readonly<{ recovered?: string | number | undefined; active?: string | number | undefined; new?: string | number | undefined; } & {}> | undefined; number_of_delayed_alerts?: string | number | undefined; number_of_searches?: string | number | undefined; es_search_duration_ms?: string | number | undefined; execution_gap_duration_s?: string | number | undefined; rule_type_run_duration_ms?: string | number | undefined; process_alerts_duration_ms?: string | number | undefined; trigger_actions_duration_ms?: string | number | undefined; process_rule_duration_ms?: string | number | undefined; claim_to_start_duration_ms?: string | number | undefined; persist_alerts_duration_ms?: string | number | undefined; prepare_rule_duration_ms?: string | number | undefined; total_run_duration_ms?: string | number | undefined; total_enrichment_duration_ms?: string | number | undefined; } & {}> | undefined; status_order?: string | number | undefined; } & {}> | undefined; rule_type_id?: string | undefined; } & {}> | undefined; uuid?: string | undefined; flapping?: boolean | undefined; maintenance_window_ids?: string[] | undefined; } & {}> | undefined; version?: string | undefined; server_uuid?: string | undefined; saved_objects?: Readonly<{ id?: string | undefined; type?: string | undefined; namespace?: string | undefined; rel?: string | undefined; type_id?: string | undefined; space_agnostic?: boolean | undefined; } & {}>[] | undefined; space_ids?: string[] | undefined; } & {}> | undefined; event?: Readonly<{ id?: string | undefined; type?: string[] | undefined; reason?: string | undefined; action?: string | undefined; start?: string | undefined; end?: string | undefined; outcome?: string | undefined; category?: string[] | undefined; duration?: string | number | undefined; timezone?: string | undefined; risk_score?: number | undefined; severity?: string | number | undefined; url?: string | undefined; created?: string | undefined; dataset?: string | undefined; code?: string | undefined; hash?: string | undefined; ingested?: string | undefined; kind?: string | undefined; module?: string | undefined; original?: string | undefined; provider?: string | undefined; reference?: string | undefined; risk_score_norm?: number | undefined; sequence?: string | number | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; user?: Readonly<{ id?: string | undefined; name?: string | undefined; } & {}> | undefined; } & {}>>> | undefined" ], "path": "x-pack/plugins/event_log/generated/schemas.ts", "deprecated": false, @@ -1485,7 +1485,7 @@ "label": "IValidatedEvent", "description": [], "signature": [ - "Readonly<{ log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; message?: string | undefined; tags?: string[] | undefined; rule?: Readonly<{ id?: string | undefined; name?: string | undefined; license?: string | undefined; uuid?: string | undefined; version?: string | undefined; category?: string | undefined; description?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; } & {}> | undefined; kibana?: Readonly<{ action?: Readonly<{ id?: string | undefined; name?: string | undefined; execution?: Readonly<{ source?: string | undefined; uuid?: string | undefined; gen_ai?: Readonly<{ usage?: Readonly<{ prompt_tokens?: string | number | undefined; completion_tokens?: string | number | undefined; total_tokens?: string | number | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; alerting?: Readonly<{ outcome?: string | undefined; summary?: Readonly<{ recovered?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; new?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; ongoing?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; } & {}> | undefined; status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; alert?: Readonly<{ rule?: Readonly<{ consumer?: string | undefined; revision?: string | number | undefined; execution?: Readonly<{ uuid?: string | undefined; status?: string | undefined; metrics?: Readonly<{ total_search_duration_ms?: string | number | undefined; total_indexing_duration_ms?: string | number | undefined; number_of_triggered_actions?: string | number | undefined; number_of_generated_actions?: string | number | undefined; alert_counts?: Readonly<{ recovered?: string | number | undefined; active?: string | number | undefined; new?: string | number | undefined; } & {}> | undefined; number_of_delayed_alerts?: string | number | undefined; number_of_searches?: string | number | undefined; es_search_duration_ms?: string | number | undefined; execution_gap_duration_s?: string | number | undefined; rule_type_run_duration_ms?: string | number | undefined; process_alerts_duration_ms?: string | number | undefined; trigger_actions_duration_ms?: string | number | undefined; process_rule_duration_ms?: string | number | undefined; claim_to_start_duration_ms?: string | number | undefined; persist_alerts_duration_ms?: string | number | undefined; prepare_rule_duration_ms?: string | number | undefined; prepare_to_run_duration_ms?: string | number | undefined; total_run_duration_ms?: string | number | undefined; total_enrichment_duration_ms?: string | number | undefined; } & {}> | undefined; status_order?: string | number | undefined; } & {}> | undefined; rule_type_id?: string | undefined; } & {}> | undefined; uuid?: string | undefined; flapping?: boolean | undefined; maintenance_window_ids?: string[] | undefined; } & {}> | undefined; version?: string | undefined; server_uuid?: string | undefined; task?: Readonly<{ id?: string | undefined; schedule_delay?: string | number | undefined; scheduled?: string | undefined; } & {}> | undefined; saved_objects?: Readonly<{ type?: string | undefined; id?: string | undefined; namespace?: string | undefined; rel?: string | undefined; type_id?: string | undefined; space_agnostic?: boolean | undefined; } & {}>[] | undefined; space_ids?: string[] | undefined; } & {}> | undefined; event?: Readonly<{ type?: string[] | undefined; reason?: string | undefined; action?: string | undefined; id?: string | undefined; start?: string | undefined; end?: string | undefined; outcome?: string | undefined; category?: string[] | undefined; duration?: string | number | undefined; timezone?: string | undefined; risk_score?: number | undefined; severity?: string | number | undefined; url?: string | undefined; created?: string | undefined; dataset?: string | undefined; code?: string | undefined; hash?: string | undefined; ingested?: string | undefined; kind?: string | undefined; module?: string | undefined; original?: string | undefined; provider?: string | undefined; reference?: string | undefined; risk_score_norm?: number | undefined; sequence?: string | number | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; user?: Readonly<{ id?: string | undefined; name?: string | undefined; } & {}> | undefined; } & {}> | undefined" + "Readonly<{ log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; error?: Readonly<{ id?: string | undefined; type?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; message?: string | undefined; tags?: string[] | undefined; rule?: Readonly<{ id?: string | undefined; name?: string | undefined; license?: string | undefined; uuid?: string | undefined; version?: string | undefined; category?: string | undefined; description?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; } & {}> | undefined; kibana?: Readonly<{ task?: Readonly<{ id?: string | undefined; schedule_delay?: string | number | undefined; scheduled?: string | undefined; } & {}> | undefined; action?: Readonly<{ id?: string | undefined; name?: string | undefined; execution?: Readonly<{ source?: string | undefined; uuid?: string | undefined; gen_ai?: Readonly<{ usage?: Readonly<{ prompt_tokens?: string | number | undefined; completion_tokens?: string | number | undefined; total_tokens?: string | number | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; alerting?: Readonly<{ outcome?: string | undefined; summary?: Readonly<{ recovered?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; new?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; ongoing?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; } & {}> | undefined; status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; alert?: Readonly<{ rule?: Readonly<{ consumer?: string | undefined; revision?: string | number | undefined; execution?: Readonly<{ uuid?: string | undefined; status?: string | undefined; metrics?: Readonly<{ total_search_duration_ms?: string | number | undefined; total_indexing_duration_ms?: string | number | undefined; number_of_triggered_actions?: string | number | undefined; number_of_generated_actions?: string | number | undefined; alert_counts?: Readonly<{ recovered?: string | number | undefined; active?: string | number | undefined; new?: string | number | undefined; } & {}> | undefined; number_of_delayed_alerts?: string | number | undefined; number_of_searches?: string | number | undefined; es_search_duration_ms?: string | number | undefined; execution_gap_duration_s?: string | number | undefined; rule_type_run_duration_ms?: string | number | undefined; process_alerts_duration_ms?: string | number | undefined; trigger_actions_duration_ms?: string | number | undefined; process_rule_duration_ms?: string | number | undefined; claim_to_start_duration_ms?: string | number | undefined; persist_alerts_duration_ms?: string | number | undefined; prepare_rule_duration_ms?: string | number | undefined; total_run_duration_ms?: string | number | undefined; total_enrichment_duration_ms?: string | number | undefined; } & {}> | undefined; status_order?: string | number | undefined; } & {}> | undefined; rule_type_id?: string | undefined; } & {}> | undefined; uuid?: string | undefined; flapping?: boolean | undefined; maintenance_window_ids?: string[] | undefined; } & {}> | undefined; version?: string | undefined; server_uuid?: string | undefined; saved_objects?: Readonly<{ id?: string | undefined; type?: string | undefined; namespace?: string | undefined; rel?: string | undefined; type_id?: string | undefined; space_agnostic?: boolean | undefined; } & {}>[] | undefined; space_ids?: string[] | undefined; } & {}> | undefined; event?: Readonly<{ id?: string | undefined; type?: string[] | undefined; reason?: string | undefined; action?: string | undefined; start?: string | undefined; end?: string | undefined; outcome?: string | undefined; category?: string[] | undefined; duration?: string | number | undefined; timezone?: string | undefined; risk_score?: number | undefined; severity?: string | number | undefined; url?: string | undefined; created?: string | undefined; dataset?: string | undefined; code?: string | undefined; hash?: string | undefined; ingested?: string | undefined; kind?: string | undefined; module?: string | undefined; original?: string | undefined; provider?: string | undefined; reference?: string | undefined; risk_score_norm?: number | undefined; sequence?: string | number | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; user?: Readonly<{ id?: string | undefined; name?: string | undefined; } & {}> | undefined; } & {}> | undefined" ], "path": "x-pack/plugins/event_log/generated/schemas.ts", "deprecated": false, diff --git a/api_docs/event_log.mdx b/api_docs/event_log.mdx index 78533243c1d24..51e6cba0908d6 100644 --- a/api_docs/event_log.mdx +++ b/api_docs/event_log.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/eventLog title: "eventLog" image: https://source.unsplash.com/400x175/?github description: API docs for the eventLog plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventLog'] --- import eventLogObj from './event_log.devdocs.json'; diff --git a/api_docs/exploratory_view.devdocs.json b/api_docs/exploratory_view.devdocs.json index fecfc6b9a5772..35b2749ca0e3f 100644 --- a/api_docs/exploratory_view.devdocs.json +++ b/api_docs/exploratory_view.devdocs.json @@ -1161,7 +1161,7 @@ "section": "def-common.AppUpdater", "text": "AppUpdater" }, - ">; }) => void; setIsSidebarEnabled: (isEnabled: boolean) => void; }" + ">; }) => void; }" ], "path": "x-pack/plugins/observability_solution/exploratory_view/public/plugin.ts", "deprecated": false, diff --git a/api_docs/exploratory_view.mdx b/api_docs/exploratory_view.mdx index 9e669c763d245..2c99390dc1870 100644 --- a/api_docs/exploratory_view.mdx +++ b/api_docs/exploratory_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/exploratoryView title: "exploratoryView" image: https://source.unsplash.com/400x175/?github description: API docs for the exploratoryView plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'exploratoryView'] --- import exploratoryViewObj from './exploratory_view.devdocs.json'; diff --git a/api_docs/expression_error.mdx b/api_docs/expression_error.mdx index b636a334d37f8..3d951051e8e4d 100644 --- a/api_docs/expression_error.mdx +++ b/api_docs/expression_error.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionError title: "expressionError" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionError plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionError'] --- import expressionErrorObj from './expression_error.devdocs.json'; diff --git a/api_docs/expression_gauge.mdx b/api_docs/expression_gauge.mdx index 6c920df92509d..154aac3084f1a 100644 --- a/api_docs/expression_gauge.mdx +++ b/api_docs/expression_gauge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionGauge title: "expressionGauge" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionGauge plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionGauge'] --- import expressionGaugeObj from './expression_gauge.devdocs.json'; diff --git a/api_docs/expression_heatmap.mdx b/api_docs/expression_heatmap.mdx index 58adb22711627..4a47e730922f4 100644 --- a/api_docs/expression_heatmap.mdx +++ b/api_docs/expression_heatmap.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionHeatmap title: "expressionHeatmap" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionHeatmap plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionHeatmap'] --- import expressionHeatmapObj from './expression_heatmap.devdocs.json'; diff --git a/api_docs/expression_image.mdx b/api_docs/expression_image.mdx index 9c85ac3cea2f9..95a01dd3b061d 100644 --- a/api_docs/expression_image.mdx +++ b/api_docs/expression_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionImage title: "expressionImage" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionImage plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionImage'] --- import expressionImageObj from './expression_image.devdocs.json'; diff --git a/api_docs/expression_legacy_metric_vis.mdx b/api_docs/expression_legacy_metric_vis.mdx index 6c39f8b074be8..bac522654c9a5 100644 --- a/api_docs/expression_legacy_metric_vis.mdx +++ b/api_docs/expression_legacy_metric_vis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionLegacyMetricVis title: "expressionLegacyMetricVis" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionLegacyMetricVis plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionLegacyMetricVis'] --- import expressionLegacyMetricVisObj from './expression_legacy_metric_vis.devdocs.json'; diff --git a/api_docs/expression_metric.mdx b/api_docs/expression_metric.mdx index dce3f90841c5a..5d46e48c5e18f 100644 --- a/api_docs/expression_metric.mdx +++ b/api_docs/expression_metric.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionMetric title: "expressionMetric" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionMetric plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionMetric'] --- import expressionMetricObj from './expression_metric.devdocs.json'; diff --git a/api_docs/expression_metric_vis.mdx b/api_docs/expression_metric_vis.mdx index 498f17ebc7366..d467a5b61e6dd 100644 --- a/api_docs/expression_metric_vis.mdx +++ b/api_docs/expression_metric_vis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionMetricVis title: "expressionMetricVis" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionMetricVis plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionMetricVis'] --- import expressionMetricVisObj from './expression_metric_vis.devdocs.json'; diff --git a/api_docs/expression_partition_vis.mdx b/api_docs/expression_partition_vis.mdx index edf777544375a..50dcd46111cd5 100644 --- a/api_docs/expression_partition_vis.mdx +++ b/api_docs/expression_partition_vis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionPartitionVis title: "expressionPartitionVis" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionPartitionVis plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionPartitionVis'] --- import expressionPartitionVisObj from './expression_partition_vis.devdocs.json'; diff --git a/api_docs/expression_repeat_image.mdx b/api_docs/expression_repeat_image.mdx index b0b695fd5e961..955dcddd8e69b 100644 --- a/api_docs/expression_repeat_image.mdx +++ b/api_docs/expression_repeat_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionRepeatImage title: "expressionRepeatImage" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionRepeatImage plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionRepeatImage'] --- import expressionRepeatImageObj from './expression_repeat_image.devdocs.json'; diff --git a/api_docs/expression_reveal_image.mdx b/api_docs/expression_reveal_image.mdx index 5d3694074707b..7e61973e6b115 100644 --- a/api_docs/expression_reveal_image.mdx +++ b/api_docs/expression_reveal_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionRevealImage title: "expressionRevealImage" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionRevealImage plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionRevealImage'] --- import expressionRevealImageObj from './expression_reveal_image.devdocs.json'; diff --git a/api_docs/expression_shape.mdx b/api_docs/expression_shape.mdx index 00c32e470a43c..24f1ea2981ea4 100644 --- a/api_docs/expression_shape.mdx +++ b/api_docs/expression_shape.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionShape title: "expressionShape" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionShape plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionShape'] --- import expressionShapeObj from './expression_shape.devdocs.json'; diff --git a/api_docs/expression_tagcloud.mdx b/api_docs/expression_tagcloud.mdx index e10dca8bdca16..a28282433c6f1 100644 --- a/api_docs/expression_tagcloud.mdx +++ b/api_docs/expression_tagcloud.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionTagcloud title: "expressionTagcloud" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionTagcloud plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionTagcloud'] --- import expressionTagcloudObj from './expression_tagcloud.devdocs.json'; diff --git a/api_docs/expression_x_y.mdx b/api_docs/expression_x_y.mdx index 9b1e0fb4f683f..a517871dc8384 100644 --- a/api_docs/expression_x_y.mdx +++ b/api_docs/expression_x_y.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionXY title: "expressionXY" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionXY plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionXY'] --- import expressionXYObj from './expression_x_y.devdocs.json'; diff --git a/api_docs/expressions.devdocs.json b/api_docs/expressions.devdocs.json index 51da6e6c8d2bd..550863a9a75e6 100644 --- a/api_docs/expressions.devdocs.json +++ b/api_docs/expressions.devdocs.json @@ -11948,7 +11948,7 @@ "\nThis type represents the `type` of any `DatatableColumn` in a `Datatable`.\nits duplicated from KBN_FIELD_TYPES" ], "signature": [ - "\"string\" | \"number\" | \"boolean\" | \"object\" | \"nested\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"date\" | \"murmur3\" | \"histogram\" | \"conflict\" | \"unknown\" | \"_source\" | \"attachment\" | \"null\"" + "\"string\" | \"number\" | \"boolean\" | \"object\" | \"unknown\" | \"nested\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"date\" | \"murmur3\" | \"histogram\" | \"conflict\" | \"_source\" | \"attachment\" | \"null\"" ], "path": "src/plugins/expressions/common/expression_types/specs/datatable.ts", "deprecated": false, @@ -21850,7 +21850,7 @@ "\nThis type represents the `type` of any `DatatableColumn` in a `Datatable`.\nits duplicated from KBN_FIELD_TYPES" ], "signature": [ - "\"string\" | \"number\" | \"boolean\" | \"object\" | \"nested\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"date\" | \"murmur3\" | \"histogram\" | \"conflict\" | \"unknown\" | \"_source\" | \"attachment\" | \"null\"" + "\"string\" | \"number\" | \"boolean\" | \"object\" | \"unknown\" | \"nested\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"date\" | \"murmur3\" | \"histogram\" | \"conflict\" | \"_source\" | \"attachment\" | \"null\"" ], "path": "src/plugins/expressions/common/expression_types/specs/datatable.ts", "deprecated": false, @@ -30273,9 +30273,27 @@ "type": "CompoundType", "tags": [], "label": "type", - "description": [], + "description": [ + "\nThe Kibana normalized type of the column" + ], + "signature": [ + "\"string\" | \"number\" | \"boolean\" | \"object\" | \"unknown\" | \"nested\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"date\" | \"murmur3\" | \"histogram\" | \"conflict\" | \"_source\" | \"attachment\" | \"null\"" + ], + "path": "src/plugins/expressions/common/expression_types/specs/datatable.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "expressions", + "id": "def-common.DatatableColumnMeta.esType", + "type": "string", + "tags": [], + "label": "esType", + "description": [ + "\nThe original type of the column from ES" + ], "signature": [ - "\"string\" | \"number\" | \"boolean\" | \"object\" | \"nested\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"date\" | \"murmur3\" | \"histogram\" | \"conflict\" | \"unknown\" | \"_source\" | \"attachment\" | \"null\"" + "string | undefined" ], "path": "src/plugins/expressions/common/expression_types/specs/datatable.ts", "deprecated": false, @@ -36545,7 +36563,7 @@ "\nThis type represents the `type` of any `DatatableColumn` in a `Datatable`.\nits duplicated from KBN_FIELD_TYPES" ], "signature": [ - "\"string\" | \"number\" | \"boolean\" | \"object\" | \"nested\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"date\" | \"murmur3\" | \"histogram\" | \"conflict\" | \"unknown\" | \"_source\" | \"attachment\" | \"null\"" + "\"string\" | \"number\" | \"boolean\" | \"object\" | \"unknown\" | \"nested\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"date\" | \"murmur3\" | \"histogram\" | \"conflict\" | \"_source\" | \"attachment\" | \"null\"" ], "path": "src/plugins/expressions/common/expression_types/specs/datatable.ts", "deprecated": false, diff --git a/api_docs/expressions.mdx b/api_docs/expressions.mdx index 31618a2e60228..1ee0227b3d464 100644 --- a/api_docs/expressions.mdx +++ b/api_docs/expressions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressions title: "expressions" image: https://source.unsplash.com/400x175/?github description: API docs for the expressions plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressions'] --- import expressionsObj from './expressions.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/k | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 2216 | 17 | 1757 | 5 | +| 2217 | 17 | 1756 | 5 | ## Client diff --git a/api_docs/features.mdx b/api_docs/features.mdx index 0f04d30368de4..a81cf86fe9c3f 100644 --- a/api_docs/features.mdx +++ b/api_docs/features.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/features title: "features" image: https://source.unsplash.com/400x175/?github description: API docs for the features plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'features'] --- import featuresObj from './features.devdocs.json'; diff --git a/api_docs/field_formats.mdx b/api_docs/field_formats.mdx index f9a53a61906f5..25818fef82cfe 100644 --- a/api_docs/field_formats.mdx +++ b/api_docs/field_formats.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fieldFormats title: "fieldFormats" image: https://source.unsplash.com/400x175/?github description: API docs for the fieldFormats plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fieldFormats'] --- import fieldFormatsObj from './field_formats.devdocs.json'; diff --git a/api_docs/file_upload.mdx b/api_docs/file_upload.mdx index 8b5032359c794..695599f405faa 100644 --- a/api_docs/file_upload.mdx +++ b/api_docs/file_upload.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fileUpload title: "fileUpload" image: https://source.unsplash.com/400x175/?github description: API docs for the fileUpload plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fileUpload'] --- import fileUploadObj from './file_upload.devdocs.json'; diff --git a/api_docs/files.devdocs.json b/api_docs/files.devdocs.json index 832bdba87c188..05b4118d5b628 100644 --- a/api_docs/files.devdocs.json +++ b/api_docs/files.devdocs.json @@ -839,7 +839,39 @@ "\nAn elasticsearch client that will be used to interact with the cluster." ], "signature": [ - "{ create: { (this: That, params: ", + "{ search: { >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "SearchResponse", + ">; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "SearchResponse", + ", unknown>>; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "SearchResponse", + ">; }; create: { (this: That, params: ", "CreateRequest", " | ", "CreateRequest", @@ -943,39 +975,7 @@ "TransportRequestOptions", " | undefined): Promise<", "WriteResponseBase", - ">; }; search: { >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptionsWithOutMeta", - " | undefined): Promise<", - "SearchResponse", - ">; >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptionsWithMeta", - " | undefined): Promise<", - "TransportResult", - "<", - "SearchResponse", - ", unknown>>; >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptions", - " | undefined): Promise<", - "SearchResponse", - ">; }; helpers: ", + ">; }; helpers: ", "default", "; name: string | symbol; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kEsql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kInference]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kQueryRuleset]: symbol | null; [kRollup]: symbol | null; [kSearchApplication]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kSynonyms]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", "default", diff --git a/api_docs/files.mdx b/api_docs/files.mdx index 6153701a54eed..8c9fef631e543 100644 --- a/api_docs/files.mdx +++ b/api_docs/files.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/files title: "files" image: https://source.unsplash.com/400x175/?github description: API docs for the files plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'files'] --- import filesObj from './files.devdocs.json'; diff --git a/api_docs/files_management.mdx b/api_docs/files_management.mdx index 0401941d8ee6e..eccb2a8c4ae74 100644 --- a/api_docs/files_management.mdx +++ b/api_docs/files_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/filesManagement title: "filesManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the filesManagement plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'filesManagement'] --- import filesManagementObj from './files_management.devdocs.json'; diff --git a/api_docs/fleet.devdocs.json b/api_docs/fleet.devdocs.json index 1c0182a2a705d..d8691a1f2d603 100644 --- a/api_docs/fleet.devdocs.json +++ b/api_docs/fleet.devdocs.json @@ -10606,7 +10606,39 @@ "label": "esClient", "description": [], "signature": [ - "{ create: { (this: That, params: ", + "{ search: { >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "SearchResponse", + ">; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "SearchResponse", + ", unknown>>; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "SearchResponse", + ">; }; create: { (this: That, params: ", "CreateRequest", " | ", "CreateRequest", @@ -10710,39 +10742,7 @@ "TransportRequestOptions", " | undefined): Promise<", "WriteResponseBase", - ">; }; search: { >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptionsWithOutMeta", - " | undefined): Promise<", - "SearchResponse", - ">; >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptionsWithMeta", - " | undefined): Promise<", - "TransportResult", - "<", - "SearchResponse", - ", unknown>>; >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptions", - " | undefined): Promise<", - "SearchResponse", - ">; }; helpers: ", + ">; }; helpers: ", "default", "; name: string | symbol; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kEsql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kInference]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kQueryRuleset]: symbol | null; [kRollup]: symbol | null; [kSearchApplication]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kSynonyms]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", "default", @@ -11977,7 +11977,39 @@ "label": "esClient", "description": [], "signature": [ - "{ create: { (this: That, params: ", + "{ search: { >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "SearchResponse", + ">; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "SearchResponse", + ", unknown>>; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "SearchResponse", + ">; }; create: { (this: That, params: ", "CreateRequest", " | ", "CreateRequest", @@ -12081,39 +12113,7 @@ "TransportRequestOptions", " | undefined): Promise<", "WriteResponseBase", - ">; }; search: { >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptionsWithOutMeta", - " | undefined): Promise<", - "SearchResponse", - ">; >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptionsWithMeta", - " | undefined): Promise<", - "TransportResult", - "<", - "SearchResponse", - ", unknown>>; >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptions", - " | undefined): Promise<", - "SearchResponse", - ">; }; helpers: ", + ">; }; helpers: ", "default", "; name: string | symbol; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kEsql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kInference]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kQueryRuleset]: symbol | null; [kRollup]: symbol | null; [kSearchApplication]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kSynonyms]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", "default", @@ -13361,7 +13361,39 @@ "label": "esClient", "description": [], "signature": [ - "{ create: { (this: That, params: ", + "{ search: { >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "SearchResponse", + ">; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "SearchResponse", + ", unknown>>; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "SearchResponse", + ">; }; create: { (this: That, params: ", "CreateRequest", " | ", "CreateRequest", @@ -13465,39 +13497,7 @@ "TransportRequestOptions", " | undefined): Promise<", "WriteResponseBase", - ">; }; search: { >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptionsWithOutMeta", - " | undefined): Promise<", - "SearchResponse", - ">; >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptionsWithMeta", - " | undefined): Promise<", - "TransportResult", - "<", - "SearchResponse", - ", unknown>>; >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptions", - " | undefined): Promise<", - "SearchResponse", - ">; }; helpers: ", + ">; }; helpers: ", "default", "; name: string | symbol; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kEsql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kInference]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kQueryRuleset]: symbol | null; [kRollup]: symbol | null; [kSearchApplication]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kSynonyms]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", "default", @@ -14742,7 +14742,39 @@ "label": "esClient", "description": [], "signature": [ - "{ create: { (this: That, params: ", + "{ search: { >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "SearchResponse", + ">; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "SearchResponse", + ", unknown>>; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "SearchResponse", + ">; }; create: { (this: That, params: ", "CreateRequest", " | ", "CreateRequest", @@ -14846,39 +14878,7 @@ "TransportRequestOptions", " | undefined): Promise<", "WriteResponseBase", - ">; }; search: { >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptionsWithOutMeta", - " | undefined): Promise<", - "SearchResponse", - ">; >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptionsWithMeta", - " | undefined): Promise<", - "TransportResult", - "<", - "SearchResponse", - ", unknown>>; >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptions", - " | undefined): Promise<", - "SearchResponse", - ">; }; helpers: ", + ">; }; helpers: ", "default", "; name: string | symbol; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kEsql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kInference]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kQueryRuleset]: symbol | null; [kRollup]: symbol | null; [kSearchApplication]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kSynonyms]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", "default", @@ -16126,7 +16126,39 @@ "label": "esClient", "description": [], "signature": [ - "{ create: { (this: That, params: ", + "{ search: { >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "SearchResponse", + ">; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "SearchResponse", + ", unknown>>; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "SearchResponse", + ">; }; create: { (this: That, params: ", "CreateRequest", " | ", "CreateRequest", @@ -16230,39 +16262,7 @@ "TransportRequestOptions", " | undefined): Promise<", "WriteResponseBase", - ">; }; search: { >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptionsWithOutMeta", - " | undefined): Promise<", - "SearchResponse", - ">; >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptionsWithMeta", - " | undefined): Promise<", - "TransportResult", - "<", - "SearchResponse", - ", unknown>>; >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptions", - " | undefined): Promise<", - "SearchResponse", - ">; }; helpers: ", + ">; }; helpers: ", "default", "; name: string | symbol; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kEsql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kInference]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kQueryRuleset]: symbol | null; [kRollup]: symbol | null; [kSearchApplication]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kSynonyms]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", "default", @@ -18851,7 +18851,7 @@ "label": "installType", "description": [], "signature": [ - "\"update\" | \"unknown\" | \"reinstall\" | \"reupdate\" | \"rollback\" | \"install\"" + "\"unknown\" | \"update\" | \"reinstall\" | \"reupdate\" | \"rollback\" | \"install\"" ], "path": "x-pack/plugins/fleet/common/types/models/epm.ts", "deprecated": false, @@ -21167,7 +21167,7 @@ "label": "installType", "description": [], "signature": [ - "\"update\" | \"unknown\" | \"reinstall\" | \"reupdate\" | \"rollback\" | \"install\"" + "\"unknown\" | \"update\" | \"reinstall\" | \"reupdate\" | \"rollback\" | \"install\"" ], "path": "x-pack/plugins/fleet/common/types/rest_spec/epm.ts", "deprecated": false, diff --git a/api_docs/fleet.mdx b/api_docs/fleet.mdx index c293041f7b3e0..679fa260ec86c 100644 --- a/api_docs/fleet.mdx +++ b/api_docs/fleet.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fleet title: "fleet" image: https://source.unsplash.com/400x175/?github description: API docs for the fleet plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fleet'] --- import fleetObj from './fleet.devdocs.json'; diff --git a/api_docs/global_search.mdx b/api_docs/global_search.mdx index 0187aa9e65450..88c98adc40847 100644 --- a/api_docs/global_search.mdx +++ b/api_docs/global_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/globalSearch title: "globalSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the globalSearch plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'globalSearch'] --- import globalSearchObj from './global_search.devdocs.json'; diff --git a/api_docs/guided_onboarding.mdx b/api_docs/guided_onboarding.mdx index 78762fab6e536..5759502d80349 100644 --- a/api_docs/guided_onboarding.mdx +++ b/api_docs/guided_onboarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/guidedOnboarding title: "guidedOnboarding" image: https://source.unsplash.com/400x175/?github description: API docs for the guidedOnboarding plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'guidedOnboarding'] --- import guidedOnboardingObj from './guided_onboarding.devdocs.json'; diff --git a/api_docs/home.devdocs.json b/api_docs/home.devdocs.json index 6eb5464f42f2f..c19eb9f27097c 100644 --- a/api_docs/home.devdocs.json +++ b/api_docs/home.devdocs.json @@ -1869,7 +1869,7 @@ "label": "InstructionsSchema", "description": [], "signature": [ - "{ readonly params?: Readonly<{ defaultValue?: any; } & { type: \"string\" | \"number\"; id: string; label: string; }>[] | undefined; readonly instructionSets: Readonly<{ title?: string | undefined; callOut?: Readonly<{ message?: string | undefined; iconType?: string | undefined; } & { title: string; }> | undefined; statusCheck?: Readonly<{ error?: string | undefined; text?: string | undefined; title?: string | undefined; success?: string | undefined; btnLabel?: string | undefined; } & { esHitsCheck: Readonly<{} & { index: string | string[]; query: Record; }>; }> | undefined; } & { instructionVariants: Readonly<{ initialSelected?: boolean | undefined; } & { id: string; instructions: Readonly<{ title?: string | undefined; textPre?: string | undefined; commands?: string[] | undefined; textPost?: string | undefined; customComponentName?: string | undefined; } & {}>[]; }>[]; }>[]; }" + "{ readonly params?: Readonly<{ defaultValue?: any; } & { id: string; type: \"string\" | \"number\"; label: string; }>[] | undefined; readonly instructionSets: Readonly<{ title?: string | undefined; callOut?: Readonly<{ message?: string | undefined; iconType?: string | undefined; } & { title: string; }> | undefined; statusCheck?: Readonly<{ error?: string | undefined; text?: string | undefined; title?: string | undefined; success?: string | undefined; btnLabel?: string | undefined; } & { esHitsCheck: Readonly<{} & { index: string | string[]; query: Record; }>; }> | undefined; } & { instructionVariants: Readonly<{ initialSelected?: boolean | undefined; } & { id: string; instructions: Readonly<{ title?: string | undefined; textPre?: string | undefined; commands?: string[] | undefined; textPost?: string | undefined; customComponentName?: string | undefined; } & {}>[]; }>[]; }>[]; }" ], "path": "src/plugins/home/server/services/tutorials/lib/tutorial_schema.ts", "deprecated": false, @@ -1892,7 +1892,7 @@ "section": "def-common.Writable", "text": "Writable" }, - "[]; previewImagePath: string; overviewDashboard: string; defaultIndex: string; dataIndices: Readonly<{ indexSettings?: Record | undefined; isDataStream?: boolean | undefined; } & { id: string; fields: Record; timeFields: string[]; dataPath: string; currentTimeMarker: string; preserveDayOfWeekTimeOfDay: boolean; }>[]; }>>[]; addSavedObjectsToSampleDataset: (id: string, savedObjects: ", + "[]; previewImagePath: string; overviewDashboard: string; defaultIndex: string; dataIndices: Readonly<{ indexSettings?: Record | undefined; isDataStream?: boolean | undefined; } & { id: string; fields: Record; timeFields: string[]; dataPath: string; currentTimeMarker: string; preserveDayOfWeekTimeOfDay: boolean; }>[]; }>>[]; addSavedObjectsToSampleDataset: (id: string, savedObjects: ", { "pluginId": "@kbn/core-saved-objects-common", "scope": "common", @@ -1941,7 +1941,7 @@ "section": "def-common.Writable", "text": "Writable" }, - "[]; previewImagePath: string; overviewDashboard: string; defaultIndex: string; dataIndices: Readonly<{ indexSettings?: Record | undefined; isDataStream?: boolean | undefined; } & { id: string; fields: Record; timeFields: string[]; dataPath: string; currentTimeMarker: string; preserveDayOfWeekTimeOfDay: boolean; }>[]; }>>" + "[]; previewImagePath: string; overviewDashboard: string; defaultIndex: string; dataIndices: Readonly<{ indexSettings?: Record | undefined; isDataStream?: boolean | undefined; } & { id: string; fields: Record; timeFields: string[]; dataPath: string; currentTimeMarker: string; preserveDayOfWeekTimeOfDay: boolean; }>[]; }>>" ], "path": "src/plugins/home/server/services/sample_data/lib/sample_dataset_registry_types.ts", "deprecated": false, @@ -2013,7 +2013,7 @@ "section": "def-server.TutorialContext", "text": "TutorialContext" }, - ") => Readonly<{ savedObjects?: any[] | undefined; euiIconType?: string | undefined; isBeta?: boolean | undefined; previewImagePath?: string | undefined; moduleName?: string | undefined; completionTimeMinutes?: number | undefined; elasticCloud?: Readonly<{ params?: Readonly<{ defaultValue?: any; } & { type: \"string\" | \"number\"; id: string; label: string; }>[] | undefined; } & { instructionSets: Readonly<{ title?: string | undefined; callOut?: Readonly<{ message?: string | undefined; iconType?: string | undefined; } & { title: string; }> | undefined; statusCheck?: Readonly<{ error?: string | undefined; text?: string | undefined; title?: string | undefined; success?: string | undefined; btnLabel?: string | undefined; } & { esHitsCheck: Readonly<{} & { index: string | string[]; query: Record; }>; }> | undefined; } & { instructionVariants: Readonly<{ initialSelected?: boolean | undefined; } & { id: string; instructions: Readonly<{ title?: string | undefined; textPre?: string | undefined; commands?: string[] | undefined; textPost?: string | undefined; customComponentName?: string | undefined; } & {}>[]; }>[]; }>[]; }> | undefined; onPremElasticCloud?: Readonly<{ params?: Readonly<{ defaultValue?: any; } & { type: \"string\" | \"number\"; id: string; label: string; }>[] | undefined; } & { instructionSets: Readonly<{ title?: string | undefined; callOut?: Readonly<{ message?: string | undefined; iconType?: string | undefined; } & { title: string; }> | undefined; statusCheck?: Readonly<{ error?: string | undefined; text?: string | undefined; title?: string | undefined; success?: string | undefined; btnLabel?: string | undefined; } & { esHitsCheck: Readonly<{} & { index: string | string[]; query: Record; }>; }> | undefined; } & { instructionVariants: Readonly<{ initialSelected?: boolean | undefined; } & { id: string; instructions: Readonly<{ title?: string | undefined; textPre?: string | undefined; commands?: string[] | undefined; textPost?: string | undefined; customComponentName?: string | undefined; } & {}>[]; }>[]; }>[]; }> | undefined; artifacts?: Readonly<{ application?: Readonly<{} & { path: string; label: string; }> | undefined; exportedFields?: Readonly<{} & { documentationUrl: string; }> | undefined; } & { dashboards: Readonly<{ linkLabel?: string | undefined; } & { id: string; isOverview: boolean; }>[]; }> | undefined; savedObjectsInstallMsg?: string | undefined; customStatusCheckName?: string | undefined; integrationBrowserCategories?: string[] | undefined; eprPackageOverlap?: string | undefined; } & { id: string; name: string; category: \"security\" | \"metrics\" | \"other\" | \"logging\"; shortDescription: string; longDescription: string; onPrem: Readonly<{ params?: Readonly<{ defaultValue?: any; } & { type: \"string\" | \"number\"; id: string; label: string; }>[] | undefined; } & { instructionSets: Readonly<{ title?: string | undefined; callOut?: Readonly<{ message?: string | undefined; iconType?: string | undefined; } & { title: string; }> | undefined; statusCheck?: Readonly<{ error?: string | undefined; text?: string | undefined; title?: string | undefined; success?: string | undefined; btnLabel?: string | undefined; } & { esHitsCheck: Readonly<{} & { index: string | string[]; query: Record; }>; }> | undefined; } & { instructionVariants: Readonly<{ initialSelected?: boolean | undefined; } & { id: string; instructions: Readonly<{ title?: string | undefined; textPre?: string | undefined; commands?: string[] | undefined; textPost?: string | undefined; customComponentName?: string | undefined; } & {}>[]; }>[]; }>[]; }>; }>" + ") => Readonly<{ savedObjects?: any[] | undefined; euiIconType?: string | undefined; isBeta?: boolean | undefined; previewImagePath?: string | undefined; moduleName?: string | undefined; completionTimeMinutes?: number | undefined; elasticCloud?: Readonly<{ params?: Readonly<{ defaultValue?: any; } & { id: string; type: \"string\" | \"number\"; label: string; }>[] | undefined; } & { instructionSets: Readonly<{ title?: string | undefined; callOut?: Readonly<{ message?: string | undefined; iconType?: string | undefined; } & { title: string; }> | undefined; statusCheck?: Readonly<{ error?: string | undefined; text?: string | undefined; title?: string | undefined; success?: string | undefined; btnLabel?: string | undefined; } & { esHitsCheck: Readonly<{} & { index: string | string[]; query: Record; }>; }> | undefined; } & { instructionVariants: Readonly<{ initialSelected?: boolean | undefined; } & { id: string; instructions: Readonly<{ title?: string | undefined; textPre?: string | undefined; commands?: string[] | undefined; textPost?: string | undefined; customComponentName?: string | undefined; } & {}>[]; }>[]; }>[]; }> | undefined; onPremElasticCloud?: Readonly<{ params?: Readonly<{ defaultValue?: any; } & { id: string; type: \"string\" | \"number\"; label: string; }>[] | undefined; } & { instructionSets: Readonly<{ title?: string | undefined; callOut?: Readonly<{ message?: string | undefined; iconType?: string | undefined; } & { title: string; }> | undefined; statusCheck?: Readonly<{ error?: string | undefined; text?: string | undefined; title?: string | undefined; success?: string | undefined; btnLabel?: string | undefined; } & { esHitsCheck: Readonly<{} & { index: string | string[]; query: Record; }>; }> | undefined; } & { instructionVariants: Readonly<{ initialSelected?: boolean | undefined; } & { id: string; instructions: Readonly<{ title?: string | undefined; textPre?: string | undefined; commands?: string[] | undefined; textPost?: string | undefined; customComponentName?: string | undefined; } & {}>[]; }>[]; }>[]; }> | undefined; artifacts?: Readonly<{ application?: Readonly<{} & { path: string; label: string; }> | undefined; exportedFields?: Readonly<{} & { documentationUrl: string; }> | undefined; } & { dashboards: Readonly<{ linkLabel?: string | undefined; } & { id: string; isOverview: boolean; }>[]; }> | undefined; savedObjectsInstallMsg?: string | undefined; customStatusCheckName?: string | undefined; integrationBrowserCategories?: string[] | undefined; eprPackageOverlap?: string | undefined; } & { id: string; name: string; category: \"security\" | \"metrics\" | \"other\" | \"logging\"; shortDescription: string; longDescription: string; onPrem: Readonly<{ params?: Readonly<{ defaultValue?: any; } & { id: string; type: \"string\" | \"number\"; label: string; }>[] | undefined; } & { instructionSets: Readonly<{ title?: string | undefined; callOut?: Readonly<{ message?: string | undefined; iconType?: string | undefined; } & { title: string; }> | undefined; statusCheck?: Readonly<{ error?: string | undefined; text?: string | undefined; title?: string | undefined; success?: string | undefined; btnLabel?: string | undefined; } & { esHitsCheck: Readonly<{} & { index: string | string[]; query: Record; }>; }> | undefined; } & { instructionVariants: Readonly<{ initialSelected?: boolean | undefined; } & { id: string; instructions: Readonly<{ title?: string | undefined; textPre?: string | undefined; commands?: string[] | undefined; textPost?: string | undefined; customComponentName?: string | undefined; } & {}>[]; }>[]; }>[]; }>; }>" ], "path": "src/plugins/home/server/services/tutorials/lib/tutorials_registry_types.ts", "deprecated": false, @@ -2051,7 +2051,7 @@ "label": "TutorialSchema", "description": [], "signature": [ - "{ readonly savedObjects?: any[] | undefined; readonly euiIconType?: string | undefined; readonly isBeta?: boolean | undefined; readonly previewImagePath?: string | undefined; readonly moduleName?: string | undefined; readonly completionTimeMinutes?: number | undefined; readonly elasticCloud?: Readonly<{ params?: Readonly<{ defaultValue?: any; } & { type: \"string\" | \"number\"; id: string; label: string; }>[] | undefined; } & { instructionSets: Readonly<{ title?: string | undefined; callOut?: Readonly<{ message?: string | undefined; iconType?: string | undefined; } & { title: string; }> | undefined; statusCheck?: Readonly<{ error?: string | undefined; text?: string | undefined; title?: string | undefined; success?: string | undefined; btnLabel?: string | undefined; } & { esHitsCheck: Readonly<{} & { index: string | string[]; query: Record; }>; }> | undefined; } & { instructionVariants: Readonly<{ initialSelected?: boolean | undefined; } & { id: string; instructions: Readonly<{ title?: string | undefined; textPre?: string | undefined; commands?: string[] | undefined; textPost?: string | undefined; customComponentName?: string | undefined; } & {}>[]; }>[]; }>[]; }> | undefined; readonly onPremElasticCloud?: Readonly<{ params?: Readonly<{ defaultValue?: any; } & { type: \"string\" | \"number\"; id: string; label: string; }>[] | undefined; } & { instructionSets: Readonly<{ title?: string | undefined; callOut?: Readonly<{ message?: string | undefined; iconType?: string | undefined; } & { title: string; }> | undefined; statusCheck?: Readonly<{ error?: string | undefined; text?: string | undefined; title?: string | undefined; success?: string | undefined; btnLabel?: string | undefined; } & { esHitsCheck: Readonly<{} & { index: string | string[]; query: Record; }>; }> | undefined; } & { instructionVariants: Readonly<{ initialSelected?: boolean | undefined; } & { id: string; instructions: Readonly<{ title?: string | undefined; textPre?: string | undefined; commands?: string[] | undefined; textPost?: string | undefined; customComponentName?: string | undefined; } & {}>[]; }>[]; }>[]; }> | undefined; readonly artifacts?: Readonly<{ application?: Readonly<{} & { path: string; label: string; }> | undefined; exportedFields?: Readonly<{} & { documentationUrl: string; }> | undefined; } & { dashboards: Readonly<{ linkLabel?: string | undefined; } & { id: string; isOverview: boolean; }>[]; }> | undefined; readonly savedObjectsInstallMsg?: string | undefined; readonly customStatusCheckName?: string | undefined; readonly integrationBrowserCategories?: string[] | undefined; readonly eprPackageOverlap?: string | undefined; readonly id: string; readonly name: string; readonly category: \"security\" | \"metrics\" | \"other\" | \"logging\"; readonly shortDescription: string; readonly longDescription: string; readonly onPrem: Readonly<{ params?: Readonly<{ defaultValue?: any; } & { type: \"string\" | \"number\"; id: string; label: string; }>[] | undefined; } & { instructionSets: Readonly<{ title?: string | undefined; callOut?: Readonly<{ message?: string | undefined; iconType?: string | undefined; } & { title: string; }> | undefined; statusCheck?: Readonly<{ error?: string | undefined; text?: string | undefined; title?: string | undefined; success?: string | undefined; btnLabel?: string | undefined; } & { esHitsCheck: Readonly<{} & { index: string | string[]; query: Record; }>; }> | undefined; } & { instructionVariants: Readonly<{ initialSelected?: boolean | undefined; } & { id: string; instructions: Readonly<{ title?: string | undefined; textPre?: string | undefined; commands?: string[] | undefined; textPost?: string | undefined; customComponentName?: string | undefined; } & {}>[]; }>[]; }>[]; }>; }" + "{ readonly savedObjects?: any[] | undefined; readonly euiIconType?: string | undefined; readonly isBeta?: boolean | undefined; readonly previewImagePath?: string | undefined; readonly moduleName?: string | undefined; readonly completionTimeMinutes?: number | undefined; readonly elasticCloud?: Readonly<{ params?: Readonly<{ defaultValue?: any; } & { id: string; type: \"string\" | \"number\"; label: string; }>[] | undefined; } & { instructionSets: Readonly<{ title?: string | undefined; callOut?: Readonly<{ message?: string | undefined; iconType?: string | undefined; } & { title: string; }> | undefined; statusCheck?: Readonly<{ error?: string | undefined; text?: string | undefined; title?: string | undefined; success?: string | undefined; btnLabel?: string | undefined; } & { esHitsCheck: Readonly<{} & { index: string | string[]; query: Record; }>; }> | undefined; } & { instructionVariants: Readonly<{ initialSelected?: boolean | undefined; } & { id: string; instructions: Readonly<{ title?: string | undefined; textPre?: string | undefined; commands?: string[] | undefined; textPost?: string | undefined; customComponentName?: string | undefined; } & {}>[]; }>[]; }>[]; }> | undefined; readonly onPremElasticCloud?: Readonly<{ params?: Readonly<{ defaultValue?: any; } & { id: string; type: \"string\" | \"number\"; label: string; }>[] | undefined; } & { instructionSets: Readonly<{ title?: string | undefined; callOut?: Readonly<{ message?: string | undefined; iconType?: string | undefined; } & { title: string; }> | undefined; statusCheck?: Readonly<{ error?: string | undefined; text?: string | undefined; title?: string | undefined; success?: string | undefined; btnLabel?: string | undefined; } & { esHitsCheck: Readonly<{} & { index: string | string[]; query: Record; }>; }> | undefined; } & { instructionVariants: Readonly<{ initialSelected?: boolean | undefined; } & { id: string; instructions: Readonly<{ title?: string | undefined; textPre?: string | undefined; commands?: string[] | undefined; textPost?: string | undefined; customComponentName?: string | undefined; } & {}>[]; }>[]; }>[]; }> | undefined; readonly artifacts?: Readonly<{ application?: Readonly<{} & { path: string; label: string; }> | undefined; exportedFields?: Readonly<{} & { documentationUrl: string; }> | undefined; } & { dashboards: Readonly<{ linkLabel?: string | undefined; } & { id: string; isOverview: boolean; }>[]; }> | undefined; readonly savedObjectsInstallMsg?: string | undefined; readonly customStatusCheckName?: string | undefined; readonly integrationBrowserCategories?: string[] | undefined; readonly eprPackageOverlap?: string | undefined; readonly id: string; readonly name: string; readonly category: \"security\" | \"metrics\" | \"other\" | \"logging\"; readonly shortDescription: string; readonly longDescription: string; readonly onPrem: Readonly<{ params?: Readonly<{ defaultValue?: any; } & { id: string; type: \"string\" | \"number\"; label: string; }>[] | undefined; } & { instructionSets: Readonly<{ title?: string | undefined; callOut?: Readonly<{ message?: string | undefined; iconType?: string | undefined; } & { title: string; }> | undefined; statusCheck?: Readonly<{ error?: string | undefined; text?: string | undefined; title?: string | undefined; success?: string | undefined; btnLabel?: string | undefined; } & { esHitsCheck: Readonly<{} & { index: string | string[]; query: Record; }>; }> | undefined; } & { instructionVariants: Readonly<{ initialSelected?: boolean | undefined; } & { id: string; instructions: Readonly<{ title?: string | undefined; textPre?: string | undefined; commands?: string[] | undefined; textPost?: string | undefined; customComponentName?: string | undefined; } & {}>[]; }>[]; }>[]; }>; }" ], "path": "src/plugins/home/server/services/tutorials/lib/tutorial_schema.ts", "deprecated": false, @@ -2360,7 +2360,7 @@ "section": "def-common.Writable", "text": "Writable" }, - "[]; previewImagePath: string; overviewDashboard: string; defaultIndex: string; dataIndices: Readonly<{ indexSettings?: Record | undefined; isDataStream?: boolean | undefined; } & { id: string; fields: Record; timeFields: string[]; dataPath: string; currentTimeMarker: string; preserveDayOfWeekTimeOfDay: boolean; }>[]; }>>[]; addSavedObjectsToSampleDataset: (id: string, savedObjects: ", + "[]; previewImagePath: string; overviewDashboard: string; defaultIndex: string; dataIndices: Readonly<{ indexSettings?: Record | undefined; isDataStream?: boolean | undefined; } & { id: string; fields: Record; timeFields: string[]; dataPath: string; currentTimeMarker: string; preserveDayOfWeekTimeOfDay: boolean; }>[]; }>>[]; addSavedObjectsToSampleDataset: (id: string, savedObjects: ", { "pluginId": "@kbn/core-saved-objects-common", "scope": "common", diff --git a/api_docs/home.mdx b/api_docs/home.mdx index e81de47eb0f33..b512d5df3fb0f 100644 --- a/api_docs/home.mdx +++ b/api_docs/home.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/home title: "home" image: https://source.unsplash.com/400x175/?github description: API docs for the home plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'home'] --- import homeObj from './home.devdocs.json'; diff --git a/api_docs/image_embeddable.mdx b/api_docs/image_embeddable.mdx index 5dfdc3d51f47f..34800faec78b8 100644 --- a/api_docs/image_embeddable.mdx +++ b/api_docs/image_embeddable.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/imageEmbeddable title: "imageEmbeddable" image: https://source.unsplash.com/400x175/?github description: API docs for the imageEmbeddable plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'imageEmbeddable'] --- import imageEmbeddableObj from './image_embeddable.devdocs.json'; diff --git a/api_docs/index_lifecycle_management.mdx b/api_docs/index_lifecycle_management.mdx index 4946518e235f7..cca782888e886 100644 --- a/api_docs/index_lifecycle_management.mdx +++ b/api_docs/index_lifecycle_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/indexLifecycleManagement title: "indexLifecycleManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the indexLifecycleManagement plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexLifecycleManagement'] --- import indexLifecycleManagementObj from './index_lifecycle_management.devdocs.json'; diff --git a/api_docs/index_management.mdx b/api_docs/index_management.mdx index cd4fdbc94a815..8b934a43520e8 100644 --- a/api_docs/index_management.mdx +++ b/api_docs/index_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/indexManagement title: "indexManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the indexManagement plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexManagement'] --- import indexManagementObj from './index_management.devdocs.json'; diff --git a/api_docs/infra.mdx b/api_docs/infra.mdx index 6b4b05cc777e5..ae10696463e30 100644 --- a/api_docs/infra.mdx +++ b/api_docs/infra.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/infra title: "infra" image: https://source.unsplash.com/400x175/?github description: API docs for the infra plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'infra'] --- import infraObj from './infra.devdocs.json'; diff --git a/api_docs/ingest_pipelines.mdx b/api_docs/ingest_pipelines.mdx index 1a83709ba341b..3142b453a8b58 100644 --- a/api_docs/ingest_pipelines.mdx +++ b/api_docs/ingest_pipelines.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ingestPipelines title: "ingestPipelines" image: https://source.unsplash.com/400x175/?github description: API docs for the ingestPipelines plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ingestPipelines'] --- import ingestPipelinesObj from './ingest_pipelines.devdocs.json'; diff --git a/api_docs/inspector.mdx b/api_docs/inspector.mdx index ce116c407314e..f8c6910556978 100644 --- a/api_docs/inspector.mdx +++ b/api_docs/inspector.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/inspector title: "inspector" image: https://source.unsplash.com/400x175/?github description: API docs for the inspector plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'inspector'] --- import inspectorObj from './inspector.devdocs.json'; diff --git a/api_docs/interactive_setup.mdx b/api_docs/interactive_setup.mdx index 5952c3190dd91..e0d7b98f85196 100644 --- a/api_docs/interactive_setup.mdx +++ b/api_docs/interactive_setup.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/interactiveSetup title: "interactiveSetup" image: https://source.unsplash.com/400x175/?github description: API docs for the interactiveSetup plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'interactiveSetup'] --- import interactiveSetupObj from './interactive_setup.devdocs.json'; diff --git a/api_docs/kbn_ace.mdx b/api_docs/kbn_ace.mdx index 076949c1ea3f9..e1db577e2ad00 100644 --- a/api_docs/kbn_ace.mdx +++ b/api_docs/kbn_ace.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ace title: "@kbn/ace" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ace plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ace'] --- import kbnAceObj from './kbn_ace.devdocs.json'; diff --git a/api_docs/kbn_actions_types.mdx b/api_docs/kbn_actions_types.mdx index efce945a858a7..e530dc96b7e47 100644 --- a/api_docs/kbn_actions_types.mdx +++ b/api_docs/kbn_actions_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-actions-types title: "@kbn/actions-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/actions-types plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/actions-types'] --- import kbnActionsTypesObj from './kbn_actions_types.devdocs.json'; diff --git a/api_docs/kbn_aiops_components.mdx b/api_docs/kbn_aiops_components.mdx index 56f035f2a4aed..97d1096005f5c 100644 --- a/api_docs/kbn_aiops_components.mdx +++ b/api_docs/kbn_aiops_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-components title: "@kbn/aiops-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/aiops-components plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-components'] --- import kbnAiopsComponentsObj from './kbn_aiops_components.devdocs.json'; diff --git a/api_docs/kbn_aiops_utils.mdx b/api_docs/kbn_aiops_utils.mdx index b1232bb42256b..a44e59c265b3a 100644 --- a/api_docs/kbn_aiops_utils.mdx +++ b/api_docs/kbn_aiops_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-utils title: "@kbn/aiops-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/aiops-utils plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-utils'] --- import kbnAiopsUtilsObj from './kbn_aiops_utils.devdocs.json'; diff --git a/api_docs/kbn_alerting_api_integration_helpers.mdx b/api_docs/kbn_alerting_api_integration_helpers.mdx index d15f5f780eab7..95cdb689a47ab 100644 --- a/api_docs/kbn_alerting_api_integration_helpers.mdx +++ b/api_docs/kbn_alerting_api_integration_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerting-api-integration-helpers title: "@kbn/alerting-api-integration-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerting-api-integration-helpers plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerting-api-integration-helpers'] --- import kbnAlertingApiIntegrationHelpersObj from './kbn_alerting_api_integration_helpers.devdocs.json'; diff --git a/api_docs/kbn_alerting_state_types.mdx b/api_docs/kbn_alerting_state_types.mdx index cb4597f93c9f9..5549f2b8e5750 100644 --- a/api_docs/kbn_alerting_state_types.mdx +++ b/api_docs/kbn_alerting_state_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerting-state-types title: "@kbn/alerting-state-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerting-state-types plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerting-state-types'] --- import kbnAlertingStateTypesObj from './kbn_alerting_state_types.devdocs.json'; diff --git a/api_docs/kbn_alerting_types.mdx b/api_docs/kbn_alerting_types.mdx index df18c5cd0c981..75e9fb3d73ad1 100644 --- a/api_docs/kbn_alerting_types.mdx +++ b/api_docs/kbn_alerting_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerting-types title: "@kbn/alerting-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerting-types plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerting-types'] --- import kbnAlertingTypesObj from './kbn_alerting_types.devdocs.json'; diff --git a/api_docs/kbn_alerts_as_data_utils.mdx b/api_docs/kbn_alerts_as_data_utils.mdx index 8da39373e6d8b..643d693b26b7b 100644 --- a/api_docs/kbn_alerts_as_data_utils.mdx +++ b/api_docs/kbn_alerts_as_data_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerts-as-data-utils title: "@kbn/alerts-as-data-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerts-as-data-utils plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerts-as-data-utils'] --- import kbnAlertsAsDataUtilsObj from './kbn_alerts_as_data_utils.devdocs.json'; diff --git a/api_docs/kbn_alerts_ui_shared.mdx b/api_docs/kbn_alerts_ui_shared.mdx index c58e19b425764..ff4efa4cf9924 100644 --- a/api_docs/kbn_alerts_ui_shared.mdx +++ b/api_docs/kbn_alerts_ui_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerts-ui-shared title: "@kbn/alerts-ui-shared" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerts-ui-shared plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerts-ui-shared'] --- import kbnAlertsUiSharedObj from './kbn_alerts_ui_shared.devdocs.json'; diff --git a/api_docs/kbn_analytics.mdx b/api_docs/kbn_analytics.mdx index 15ffef473f07e..a2101e8c1ff95 100644 --- a/api_docs/kbn_analytics.mdx +++ b/api_docs/kbn_analytics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics title: "@kbn/analytics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics'] --- import kbnAnalyticsObj from './kbn_analytics.devdocs.json'; diff --git a/api_docs/kbn_analytics_client.mdx b/api_docs/kbn_analytics_client.mdx index ba9cb99d91bae..f6997e2e46298 100644 --- a/api_docs/kbn_analytics_client.mdx +++ b/api_docs/kbn_analytics_client.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-client title: "@kbn/analytics-client" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-client plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-client'] --- import kbnAnalyticsClientObj from './kbn_analytics_client.devdocs.json'; diff --git a/api_docs/kbn_analytics_collection_utils.mdx b/api_docs/kbn_analytics_collection_utils.mdx index 2a5a204d0f34d..499d836bb9d40 100644 --- a/api_docs/kbn_analytics_collection_utils.mdx +++ b/api_docs/kbn_analytics_collection_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-collection-utils title: "@kbn/analytics-collection-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-collection-utils plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-collection-utils'] --- import kbnAnalyticsCollectionUtilsObj from './kbn_analytics_collection_utils.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx index 560338dc6d1e4..25e3ba95014d0 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-browser title: "@kbn/analytics-shippers-elastic-v3-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-elastic-v3-browser plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-browser'] --- import kbnAnalyticsShippersElasticV3BrowserObj from './kbn_analytics_shippers_elastic_v3_browser.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx index f7952e2c5c72c..b3743f981e94d 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-common title: "@kbn/analytics-shippers-elastic-v3-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-elastic-v3-common plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-common'] --- import kbnAnalyticsShippersElasticV3CommonObj from './kbn_analytics_shippers_elastic_v3_common.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx index 9ed05bca3f66a..4d114cca341cd 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-server title: "@kbn/analytics-shippers-elastic-v3-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-elastic-v3-server plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-server'] --- import kbnAnalyticsShippersElasticV3ServerObj from './kbn_analytics_shippers_elastic_v3_server.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_fullstory.mdx b/api_docs/kbn_analytics_shippers_fullstory.mdx index a3d94355c7f64..35b09172ad803 100644 --- a/api_docs/kbn_analytics_shippers_fullstory.mdx +++ b/api_docs/kbn_analytics_shippers_fullstory.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-fullstory title: "@kbn/analytics-shippers-fullstory" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-fullstory plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-fullstory'] --- import kbnAnalyticsShippersFullstoryObj from './kbn_analytics_shippers_fullstory.devdocs.json'; diff --git a/api_docs/kbn_apm_config_loader.mdx b/api_docs/kbn_apm_config_loader.mdx index d9e442c62cdfc..e93fbd3b0303d 100644 --- a/api_docs/kbn_apm_config_loader.mdx +++ b/api_docs/kbn_apm_config_loader.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-config-loader title: "@kbn/apm-config-loader" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-config-loader plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-config-loader'] --- import kbnApmConfigLoaderObj from './kbn_apm_config_loader.devdocs.json'; diff --git a/api_docs/kbn_apm_synthtrace.mdx b/api_docs/kbn_apm_synthtrace.mdx index 23549c8770e57..1439cb08c9a92 100644 --- a/api_docs/kbn_apm_synthtrace.mdx +++ b/api_docs/kbn_apm_synthtrace.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-synthtrace title: "@kbn/apm-synthtrace" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-synthtrace plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-synthtrace'] --- import kbnApmSynthtraceObj from './kbn_apm_synthtrace.devdocs.json'; diff --git a/api_docs/kbn_apm_synthtrace_client.mdx b/api_docs/kbn_apm_synthtrace_client.mdx index db57e1f3f7bcc..7b354fa7bdf14 100644 --- a/api_docs/kbn_apm_synthtrace_client.mdx +++ b/api_docs/kbn_apm_synthtrace_client.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-synthtrace-client title: "@kbn/apm-synthtrace-client" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-synthtrace-client plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-synthtrace-client'] --- import kbnApmSynthtraceClientObj from './kbn_apm_synthtrace_client.devdocs.json'; diff --git a/api_docs/kbn_apm_utils.mdx b/api_docs/kbn_apm_utils.mdx index 3eaae317463bd..5f337f14dcfc5 100644 --- a/api_docs/kbn_apm_utils.mdx +++ b/api_docs/kbn_apm_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-utils title: "@kbn/apm-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-utils plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-utils'] --- import kbnApmUtilsObj from './kbn_apm_utils.devdocs.json'; diff --git a/api_docs/kbn_axe_config.mdx b/api_docs/kbn_axe_config.mdx index 6165e82df2816..b16db5dc816ee 100644 --- a/api_docs/kbn_axe_config.mdx +++ b/api_docs/kbn_axe_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-axe-config title: "@kbn/axe-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/axe-config plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/axe-config'] --- import kbnAxeConfigObj from './kbn_axe_config.devdocs.json'; diff --git a/api_docs/kbn_bfetch_error.mdx b/api_docs/kbn_bfetch_error.mdx index 477f14ca40041..4debcff433ed6 100644 --- a/api_docs/kbn_bfetch_error.mdx +++ b/api_docs/kbn_bfetch_error.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-bfetch-error title: "@kbn/bfetch-error" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/bfetch-error plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/bfetch-error'] --- import kbnBfetchErrorObj from './kbn_bfetch_error.devdocs.json'; diff --git a/api_docs/kbn_calculate_auto.mdx b/api_docs/kbn_calculate_auto.mdx index a03c5ba737739..a3446fb67d48f 100644 --- a/api_docs/kbn_calculate_auto.mdx +++ b/api_docs/kbn_calculate_auto.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-calculate-auto title: "@kbn/calculate-auto" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/calculate-auto plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/calculate-auto'] --- import kbnCalculateAutoObj from './kbn_calculate_auto.devdocs.json'; diff --git a/api_docs/kbn_calculate_width_from_char_count.mdx b/api_docs/kbn_calculate_width_from_char_count.mdx index 31c33dc95ab07..005685aaf6d61 100644 --- a/api_docs/kbn_calculate_width_from_char_count.mdx +++ b/api_docs/kbn_calculate_width_from_char_count.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-calculate-width-from-char-count title: "@kbn/calculate-width-from-char-count" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/calculate-width-from-char-count plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/calculate-width-from-char-count'] --- import kbnCalculateWidthFromCharCountObj from './kbn_calculate_width_from_char_count.devdocs.json'; diff --git a/api_docs/kbn_cases_components.mdx b/api_docs/kbn_cases_components.mdx index 98f91780ebd32..c8e85d87eac27 100644 --- a/api_docs/kbn_cases_components.mdx +++ b/api_docs/kbn_cases_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cases-components title: "@kbn/cases-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cases-components plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cases-components'] --- import kbnCasesComponentsObj from './kbn_cases_components.devdocs.json'; diff --git a/api_docs/kbn_cell_actions.mdx b/api_docs/kbn_cell_actions.mdx index 2e92bd9ae382e..2716728cc73b7 100644 --- a/api_docs/kbn_cell_actions.mdx +++ b/api_docs/kbn_cell_actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cell-actions title: "@kbn/cell-actions" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cell-actions plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cell-actions'] --- import kbnCellActionsObj from './kbn_cell_actions.devdocs.json'; diff --git a/api_docs/kbn_chart_expressions_common.mdx b/api_docs/kbn_chart_expressions_common.mdx index d103b24abdce6..a147b7be743a3 100644 --- a/api_docs/kbn_chart_expressions_common.mdx +++ b/api_docs/kbn_chart_expressions_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-chart-expressions-common title: "@kbn/chart-expressions-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/chart-expressions-common plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/chart-expressions-common'] --- import kbnChartExpressionsCommonObj from './kbn_chart_expressions_common.devdocs.json'; diff --git a/api_docs/kbn_chart_icons.mdx b/api_docs/kbn_chart_icons.mdx index e48898882fedd..91bd143e51856 100644 --- a/api_docs/kbn_chart_icons.mdx +++ b/api_docs/kbn_chart_icons.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-chart-icons title: "@kbn/chart-icons" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/chart-icons plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/chart-icons'] --- import kbnChartIconsObj from './kbn_chart_icons.devdocs.json'; diff --git a/api_docs/kbn_ci_stats_core.mdx b/api_docs/kbn_ci_stats_core.mdx index 80cdc64f337ad..5031064159767 100644 --- a/api_docs/kbn_ci_stats_core.mdx +++ b/api_docs/kbn_ci_stats_core.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-core title: "@kbn/ci-stats-core" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ci-stats-core plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-core'] --- import kbnCiStatsCoreObj from './kbn_ci_stats_core.devdocs.json'; diff --git a/api_docs/kbn_ci_stats_performance_metrics.mdx b/api_docs/kbn_ci_stats_performance_metrics.mdx index 13974fa21cf54..38e41a0567701 100644 --- a/api_docs/kbn_ci_stats_performance_metrics.mdx +++ b/api_docs/kbn_ci_stats_performance_metrics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-performance-metrics title: "@kbn/ci-stats-performance-metrics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ci-stats-performance-metrics plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-performance-metrics'] --- import kbnCiStatsPerformanceMetricsObj from './kbn_ci_stats_performance_metrics.devdocs.json'; diff --git a/api_docs/kbn_ci_stats_reporter.mdx b/api_docs/kbn_ci_stats_reporter.mdx index ea40b0541dd14..ed49ec09ed85e 100644 --- a/api_docs/kbn_ci_stats_reporter.mdx +++ b/api_docs/kbn_ci_stats_reporter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-reporter title: "@kbn/ci-stats-reporter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ci-stats-reporter plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-reporter'] --- import kbnCiStatsReporterObj from './kbn_ci_stats_reporter.devdocs.json'; diff --git a/api_docs/kbn_cli_dev_mode.mdx b/api_docs/kbn_cli_dev_mode.mdx index 68157522525e2..6cd930e32e981 100644 --- a/api_docs/kbn_cli_dev_mode.mdx +++ b/api_docs/kbn_cli_dev_mode.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cli-dev-mode title: "@kbn/cli-dev-mode" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cli-dev-mode plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cli-dev-mode'] --- import kbnCliDevModeObj from './kbn_cli_dev_mode.devdocs.json'; diff --git a/api_docs/kbn_code_editor.devdocs.json b/api_docs/kbn_code_editor.devdocs.json index c523a040f5128..20081cc83cffa 100644 --- a/api_docs/kbn_code_editor.devdocs.json +++ b/api_docs/kbn_code_editor.devdocs.json @@ -558,6 +558,22 @@ "path": "packages/shared-ux/code_editor/impl/code_editor.tsx", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "@kbn/code-editor", + "id": "def-common.CodeEditorProps.accessibilityOverlayEnabled", + "type": "CompoundType", + "tags": [], + "label": "accessibilityOverlayEnabled", + "description": [ + "\nEnables the editor to get disabled when pressing ESC to resolve focus trapping for accessibility." + ], + "signature": [ + "boolean | undefined" + ], + "path": "packages/shared-ux/code_editor/impl/code_editor.tsx", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false diff --git a/api_docs/kbn_code_editor.mdx b/api_docs/kbn_code_editor.mdx index 92dd9e7c3ff98..dc62a87be438f 100644 --- a/api_docs/kbn_code_editor.mdx +++ b/api_docs/kbn_code_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-code-editor title: "@kbn/code-editor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/code-editor plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/code-editor'] --- import kbnCodeEditorObj from './kbn_code_editor.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sh | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 37 | 0 | 15 | 0 | +| 38 | 0 | 15 | 0 | ## Common diff --git a/api_docs/kbn_code_editor_mock.mdx b/api_docs/kbn_code_editor_mock.mdx index 8b8882a1bc137..24de93b38c709 100644 --- a/api_docs/kbn_code_editor_mock.mdx +++ b/api_docs/kbn_code_editor_mock.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-code-editor-mock title: "@kbn/code-editor-mock" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/code-editor-mock plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/code-editor-mock'] --- import kbnCodeEditorMockObj from './kbn_code_editor_mock.devdocs.json'; diff --git a/api_docs/kbn_code_owners.mdx b/api_docs/kbn_code_owners.mdx index 9bc9adbbff856..5e3b78f5c2c5c 100644 --- a/api_docs/kbn_code_owners.mdx +++ b/api_docs/kbn_code_owners.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-code-owners title: "@kbn/code-owners" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/code-owners plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/code-owners'] --- import kbnCodeOwnersObj from './kbn_code_owners.devdocs.json'; diff --git a/api_docs/kbn_coloring.mdx b/api_docs/kbn_coloring.mdx index fac7cc9a5e385..068e5d6484b17 100644 --- a/api_docs/kbn_coloring.mdx +++ b/api_docs/kbn_coloring.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-coloring title: "@kbn/coloring" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/coloring plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/coloring'] --- import kbnColoringObj from './kbn_coloring.devdocs.json'; diff --git a/api_docs/kbn_config.mdx b/api_docs/kbn_config.mdx index 320a797b485df..f811f5f02321b 100644 --- a/api_docs/kbn_config.mdx +++ b/api_docs/kbn_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config title: "@kbn/config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/config plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config'] --- import kbnConfigObj from './kbn_config.devdocs.json'; diff --git a/api_docs/kbn_config_mocks.mdx b/api_docs/kbn_config_mocks.mdx index 8d8d08650af0c..9f1eaa93ea242 100644 --- a/api_docs/kbn_config_mocks.mdx +++ b/api_docs/kbn_config_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config-mocks title: "@kbn/config-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/config-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config-mocks'] --- import kbnConfigMocksObj from './kbn_config_mocks.devdocs.json'; diff --git a/api_docs/kbn_config_schema.mdx b/api_docs/kbn_config_schema.mdx index f6584c2bcfd92..02f93c3bba82f 100644 --- a/api_docs/kbn_config_schema.mdx +++ b/api_docs/kbn_config_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config-schema title: "@kbn/config-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/config-schema plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config-schema'] --- import kbnConfigSchemaObj from './kbn_config_schema.devdocs.json'; diff --git a/api_docs/kbn_content_management_content_editor.mdx b/api_docs/kbn_content_management_content_editor.mdx index 39498ad00b8d3..02ef512d17f1d 100644 --- a/api_docs/kbn_content_management_content_editor.mdx +++ b/api_docs/kbn_content_management_content_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-content-editor title: "@kbn/content-management-content-editor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-content-editor plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-content-editor'] --- import kbnContentManagementContentEditorObj from './kbn_content_management_content_editor.devdocs.json'; diff --git a/api_docs/kbn_content_management_tabbed_table_list_view.mdx b/api_docs/kbn_content_management_tabbed_table_list_view.mdx index ef4be81fbfad1..75136136208c9 100644 --- a/api_docs/kbn_content_management_tabbed_table_list_view.mdx +++ b/api_docs/kbn_content_management_tabbed_table_list_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-tabbed-table-list-view title: "@kbn/content-management-tabbed-table-list-view" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-tabbed-table-list-view plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-tabbed-table-list-view'] --- import kbnContentManagementTabbedTableListViewObj from './kbn_content_management_tabbed_table_list_view.devdocs.json'; diff --git a/api_docs/kbn_content_management_table_list_view.mdx b/api_docs/kbn_content_management_table_list_view.mdx index 6e5d2d77e2998..3c722ff313ee3 100644 --- a/api_docs/kbn_content_management_table_list_view.mdx +++ b/api_docs/kbn_content_management_table_list_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-table-list-view title: "@kbn/content-management-table-list-view" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-table-list-view plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-table-list-view'] --- import kbnContentManagementTableListViewObj from './kbn_content_management_table_list_view.devdocs.json'; diff --git a/api_docs/kbn_content_management_table_list_view_common.mdx b/api_docs/kbn_content_management_table_list_view_common.mdx index 2e2a26982284a..4b3803b6f5373 100644 --- a/api_docs/kbn_content_management_table_list_view_common.mdx +++ b/api_docs/kbn_content_management_table_list_view_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-table-list-view-common title: "@kbn/content-management-table-list-view-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-table-list-view-common plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-table-list-view-common'] --- import kbnContentManagementTableListViewCommonObj from './kbn_content_management_table_list_view_common.devdocs.json'; diff --git a/api_docs/kbn_content_management_table_list_view_table.mdx b/api_docs/kbn_content_management_table_list_view_table.mdx index 59bef63e1fab9..881da861b2e7b 100644 --- a/api_docs/kbn_content_management_table_list_view_table.mdx +++ b/api_docs/kbn_content_management_table_list_view_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-table-list-view-table title: "@kbn/content-management-table-list-view-table" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-table-list-view-table plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-table-list-view-table'] --- import kbnContentManagementTableListViewTableObj from './kbn_content_management_table_list_view_table.devdocs.json'; diff --git a/api_docs/kbn_content_management_utils.devdocs.json b/api_docs/kbn_content_management_utils.devdocs.json index 1441b673b2afc..414370f32e246 100644 --- a/api_docs/kbn_content_management_utils.devdocs.json +++ b/api_docs/kbn_content_management_utils.devdocs.json @@ -899,7 +899,7 @@ "section": "def-common.Type", "text": "Type" }, - "[]>; namespaces: ", + "[]>; namespaces: ", { "pluginId": "@kbn/config-schema", "scope": "common", @@ -3369,7 +3369,7 @@ "section": "def-common.Type", "text": "Type" }, - "[] | undefined>" + "[] | undefined>" ], "path": "packages/kbn-content-management-utils/src/schema.ts", "deprecated": false, @@ -3523,7 +3523,7 @@ "section": "def-common.Type", "text": "Type" }, - "[]>" + "[]>" ], "path": "packages/kbn-content-management-utils/src/schema.ts", "deprecated": false, @@ -3746,7 +3746,7 @@ "section": "def-common.Type", "text": "Type" }, - " | Readonly<{ name?: string | undefined; } & { type: string; id: string; }>[] | undefined>" + " | Readonly<{ name?: string | undefined; } & { id: string; type: string; }>[] | undefined>" ], "path": "packages/kbn-content-management-utils/src/schema.ts", "deprecated": false, @@ -3788,7 +3788,7 @@ "section": "def-common.Type", "text": "Type" }, - " | Readonly<{ name?: string | undefined; } & { type: string; id: string; }>[] | undefined>" + " | Readonly<{ name?: string | undefined; } & { id: string; type: string; }>[] | undefined>" ], "path": "packages/kbn-content-management-utils/src/schema.ts", "deprecated": false, @@ -3949,7 +3949,7 @@ "section": "def-common.Type", "text": "Type" }, - "[] | undefined>" + "[] | undefined>" ], "path": "packages/kbn-content-management-utils/src/schema.ts", "deprecated": false, @@ -4021,7 +4021,7 @@ "section": "def-common.Type", "text": "Type" }, - "; statusCode: number; }> | undefined; namespaces?: string[] | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; version?: string | undefined; originId?: string | undefined; } & { type: string; id: string; references: Readonly<{ name?: string | undefined; } & { type: string; id: string; }>[]; attributes: Readonly<{ [x: string]: any; } & {}>; }> | undefined>" + "; statusCode: number; }> | undefined; namespaces?: string[] | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; version?: string | undefined; originId?: string | undefined; } & { id: string; type: string; references: Readonly<{ name?: string | undefined; } & { id: string; type: string; }>[]; attributes: Readonly<{ [x: string]: any; } & {}>; }> | undefined>" ], "path": "packages/kbn-content-management-utils/src/schema.ts", "deprecated": false, diff --git a/api_docs/kbn_content_management_utils.mdx b/api_docs/kbn_content_management_utils.mdx index 9d61baf5b1939..67473abd39de5 100644 --- a/api_docs/kbn_content_management_utils.mdx +++ b/api_docs/kbn_content_management_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-utils title: "@kbn/content-management-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-utils plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-utils'] --- import kbnContentManagementUtilsObj from './kbn_content_management_utils.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_browser.mdx b/api_docs/kbn_core_analytics_browser.mdx index 13c8ad08de23b..f7ba7e2721cab 100644 --- a/api_docs/kbn_core_analytics_browser.mdx +++ b/api_docs/kbn_core_analytics_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser title: "@kbn/core-analytics-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-browser plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser'] --- import kbnCoreAnalyticsBrowserObj from './kbn_core_analytics_browser.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_browser_internal.mdx b/api_docs/kbn_core_analytics_browser_internal.mdx index 2a7419893a19c..d870c9bc95deb 100644 --- a/api_docs/kbn_core_analytics_browser_internal.mdx +++ b/api_docs/kbn_core_analytics_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser-internal title: "@kbn/core-analytics-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-browser-internal plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser-internal'] --- import kbnCoreAnalyticsBrowserInternalObj from './kbn_core_analytics_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_browser_mocks.mdx b/api_docs/kbn_core_analytics_browser_mocks.mdx index 50ca163885f57..724d63bcd3ae2 100644 --- a/api_docs/kbn_core_analytics_browser_mocks.mdx +++ b/api_docs/kbn_core_analytics_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser-mocks title: "@kbn/core-analytics-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-browser-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser-mocks'] --- import kbnCoreAnalyticsBrowserMocksObj from './kbn_core_analytics_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_server.mdx b/api_docs/kbn_core_analytics_server.mdx index aa38b611bb5cb..8a61b1a4492bd 100644 --- a/api_docs/kbn_core_analytics_server.mdx +++ b/api_docs/kbn_core_analytics_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server title: "@kbn/core-analytics-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-server plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server'] --- import kbnCoreAnalyticsServerObj from './kbn_core_analytics_server.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_server_internal.mdx b/api_docs/kbn_core_analytics_server_internal.mdx index 8d517f8a8f1a4..684dda54388b2 100644 --- a/api_docs/kbn_core_analytics_server_internal.mdx +++ b/api_docs/kbn_core_analytics_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server-internal title: "@kbn/core-analytics-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-server-internal plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server-internal'] --- import kbnCoreAnalyticsServerInternalObj from './kbn_core_analytics_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_server_mocks.mdx b/api_docs/kbn_core_analytics_server_mocks.mdx index 62c4489253d11..c93e27cdd5ce4 100644 --- a/api_docs/kbn_core_analytics_server_mocks.mdx +++ b/api_docs/kbn_core_analytics_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server-mocks title: "@kbn/core-analytics-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-server-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server-mocks'] --- import kbnCoreAnalyticsServerMocksObj from './kbn_core_analytics_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_application_browser.devdocs.json b/api_docs/kbn_core_application_browser.devdocs.json index a9eaf1ceaba35..9f4981d74adfd 100644 --- a/api_docs/kbn_core_application_browser.devdocs.json +++ b/api_docs/kbn_core_application_browser.devdocs.json @@ -1182,6 +1182,10 @@ "plugin": "fleet", "path": "x-pack/plugins/fleet/public/applications/integrations/index.tsx" }, + { + "plugin": "searchPlayground", + "path": "x-pack/plugins/search_playground/public/application.tsx" + }, { "plugin": "security", "path": "x-pack/plugins/security/public/authentication/logout/logout_app.test.ts" diff --git a/api_docs/kbn_core_application_browser.mdx b/api_docs/kbn_core_application_browser.mdx index 0411f00ec0c35..01a25e5d8f14d 100644 --- a/api_docs/kbn_core_application_browser.mdx +++ b/api_docs/kbn_core_application_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser title: "@kbn/core-application-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-browser plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-browser'] --- import kbnCoreApplicationBrowserObj from './kbn_core_application_browser.devdocs.json'; diff --git a/api_docs/kbn_core_application_browser_internal.mdx b/api_docs/kbn_core_application_browser_internal.mdx index b807402358ef9..415b680294f3e 100644 --- a/api_docs/kbn_core_application_browser_internal.mdx +++ b/api_docs/kbn_core_application_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser-internal title: "@kbn/core-application-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-browser-internal plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-browser-internal'] --- import kbnCoreApplicationBrowserInternalObj from './kbn_core_application_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_application_browser_mocks.mdx b/api_docs/kbn_core_application_browser_mocks.mdx index 24226e6594b37..6578ff2dc37ba 100644 --- a/api_docs/kbn_core_application_browser_mocks.mdx +++ b/api_docs/kbn_core_application_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser-mocks title: "@kbn/core-application-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-browser-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-browser-mocks'] --- import kbnCoreApplicationBrowserMocksObj from './kbn_core_application_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_application_common.mdx b/api_docs/kbn_core_application_common.mdx index d76cbf93c1e46..2da7c71c023bc 100644 --- a/api_docs/kbn_core_application_common.mdx +++ b/api_docs/kbn_core_application_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-common title: "@kbn/core-application-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-common plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-common'] --- import kbnCoreApplicationCommonObj from './kbn_core_application_common.devdocs.json'; diff --git a/api_docs/kbn_core_apps_browser_internal.mdx b/api_docs/kbn_core_apps_browser_internal.mdx index 2d6144acf8846..3321a25cd3aa0 100644 --- a/api_docs/kbn_core_apps_browser_internal.mdx +++ b/api_docs/kbn_core_apps_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-apps-browser-internal title: "@kbn/core-apps-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-apps-browser-internal plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-apps-browser-internal'] --- import kbnCoreAppsBrowserInternalObj from './kbn_core_apps_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_apps_browser_mocks.mdx b/api_docs/kbn_core_apps_browser_mocks.mdx index 44691eb7157aa..7c2a0e0fcb69b 100644 --- a/api_docs/kbn_core_apps_browser_mocks.mdx +++ b/api_docs/kbn_core_apps_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-apps-browser-mocks title: "@kbn/core-apps-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-apps-browser-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-apps-browser-mocks'] --- import kbnCoreAppsBrowserMocksObj from './kbn_core_apps_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_apps_server_internal.mdx b/api_docs/kbn_core_apps_server_internal.mdx index 9f66b4fc26731..d04c29629b793 100644 --- a/api_docs/kbn_core_apps_server_internal.mdx +++ b/api_docs/kbn_core_apps_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-apps-server-internal title: "@kbn/core-apps-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-apps-server-internal plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-apps-server-internal'] --- import kbnCoreAppsServerInternalObj from './kbn_core_apps_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_base_browser_mocks.mdx b/api_docs/kbn_core_base_browser_mocks.mdx index abbf34a9edef9..56944c9d0abab 100644 --- a/api_docs/kbn_core_base_browser_mocks.mdx +++ b/api_docs/kbn_core_base_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-browser-mocks title: "@kbn/core-base-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-browser-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-browser-mocks'] --- import kbnCoreBaseBrowserMocksObj from './kbn_core_base_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_base_common.mdx b/api_docs/kbn_core_base_common.mdx index 0d53d32cb7914..cb529117fccae 100644 --- a/api_docs/kbn_core_base_common.mdx +++ b/api_docs/kbn_core_base_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-common title: "@kbn/core-base-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-common plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-common'] --- import kbnCoreBaseCommonObj from './kbn_core_base_common.devdocs.json'; diff --git a/api_docs/kbn_core_base_server_internal.mdx b/api_docs/kbn_core_base_server_internal.mdx index 19d2da7126f23..1fa2e35577eb3 100644 --- a/api_docs/kbn_core_base_server_internal.mdx +++ b/api_docs/kbn_core_base_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-server-internal title: "@kbn/core-base-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-server-internal plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-server-internal'] --- import kbnCoreBaseServerInternalObj from './kbn_core_base_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_base_server_mocks.mdx b/api_docs/kbn_core_base_server_mocks.mdx index c0cf74a950dd4..f90c61e83c3d6 100644 --- a/api_docs/kbn_core_base_server_mocks.mdx +++ b/api_docs/kbn_core_base_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-server-mocks title: "@kbn/core-base-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-server-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-server-mocks'] --- import kbnCoreBaseServerMocksObj from './kbn_core_base_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_browser_mocks.mdx b/api_docs/kbn_core_capabilities_browser_mocks.mdx index 3dfb954361eea..21c30f29da6f0 100644 --- a/api_docs/kbn_core_capabilities_browser_mocks.mdx +++ b/api_docs/kbn_core_capabilities_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-browser-mocks title: "@kbn/core-capabilities-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-browser-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-browser-mocks'] --- import kbnCoreCapabilitiesBrowserMocksObj from './kbn_core_capabilities_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_common.mdx b/api_docs/kbn_core_capabilities_common.mdx index 8421b4db1a8d6..9c8f65958fbba 100644 --- a/api_docs/kbn_core_capabilities_common.mdx +++ b/api_docs/kbn_core_capabilities_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-common title: "@kbn/core-capabilities-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-common plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-common'] --- import kbnCoreCapabilitiesCommonObj from './kbn_core_capabilities_common.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_server.mdx b/api_docs/kbn_core_capabilities_server.mdx index f5ec34d9fe52d..f4cae47f4e070 100644 --- a/api_docs/kbn_core_capabilities_server.mdx +++ b/api_docs/kbn_core_capabilities_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-server title: "@kbn/core-capabilities-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-server plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-server'] --- import kbnCoreCapabilitiesServerObj from './kbn_core_capabilities_server.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_server_mocks.mdx b/api_docs/kbn_core_capabilities_server_mocks.mdx index cbe8fe7b0a887..5e1736fae6481 100644 --- a/api_docs/kbn_core_capabilities_server_mocks.mdx +++ b/api_docs/kbn_core_capabilities_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-server-mocks title: "@kbn/core-capabilities-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-server-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-server-mocks'] --- import kbnCoreCapabilitiesServerMocksObj from './kbn_core_capabilities_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_chrome_browser.devdocs.json b/api_docs/kbn_core_chrome_browser.devdocs.json index f8bfcffadc9e9..8bbcd01c1ea9f 100644 --- a/api_docs/kbn_core_chrome_browser.devdocs.json +++ b/api_docs/kbn_core_chrome_browser.devdocs.json @@ -3696,53 +3696,7 @@ "label": "AppDeepLinkId", "description": [], "signature": [ - { - "pluginId": "@kbn/deeplinks-analytics", - "scope": "common", - "docId": "kibKbnDeeplinksAnalyticsPluginApi", - "section": "def-common.AppId", - "text": "AppId" - }, - " | ", - { - "pluginId": "@kbn/deeplinks-devtools", - "scope": "common", - "docId": "kibKbnDeeplinksDevtoolsPluginApi", - "section": "def-common.DeepLinkId", - "text": "DeepLinkId" - }, - " | ", - { - "pluginId": "@kbn/deeplinks-ml", - "scope": "common", - "docId": "kibKbnDeeplinksMlPluginApi", - "section": "def-common.DeepLinkId", - "text": "DeepLinkId" - }, - " | ", - { - "pluginId": "@kbn/deeplinks-management", - "scope": "common", - "docId": "kibKbnDeeplinksManagementPluginApi", - "section": "def-common.DeepLinkId", - "text": "DeepLinkId" - }, - " | ", - { - "pluginId": "@kbn/deeplinks-search", - "scope": "common", - "docId": "kibKbnDeeplinksSearchPluginApi", - "section": "def-common.DeepLinkId", - "text": "DeepLinkId" - }, - " | ", - { - "pluginId": "@kbn/deeplinks-observability", - "scope": "common", - "docId": "kibKbnDeeplinksObservabilityPluginApi", - "section": "def-common.DeepLinkId", - "text": "DeepLinkId" - } + "\"fleet\" | \"ml\" | \"monitoring\" | \"metrics\" | \"management\" | \"synthetics\" | \"apm\" | \"logs\" | \"dashboards\" | \"home\" | \"integrations\" | \"discover\" | \"observability-overview\" | \"dev_tools\" | \"visualize\" | \"dev_tools:console\" | \"dev_tools:searchprofiler\" | \"dev_tools:painless_lab\" | \"dev_tools:grokdebugger\" | \"ml:notifications\" | \"ml:nodes\" | \"ml:overview\" | \"ml:memoryUsage\" | \"ml:settings\" | \"ml:dataVisualizer\" | \"ml:anomalyDetection\" | \"ml:anomalyExplorer\" | \"ml:singleMetricViewer\" | \"ml:dataDrift\" | \"ml:dataFrameAnalytics\" | \"ml:resultExplorer\" | \"ml:analyticsMap\" | \"ml:aiOps\" | \"ml:logRateAnalysis\" | \"ml:logPatternAnalysis\" | \"ml:changePointDetections\" | \"ml:modelManagement\" | \"ml:nodesOverview\" | \"ml:esqlDataVisualizer\" | \"ml:fileUpload\" | \"ml:indexDataVisualizer\" | \"ml:calendarSettings\" | \"ml:filterListsSettings\" | \"osquery\" | \"management:transform\" | \"management:watcher\" | \"management:cases\" | \"management:tags\" | \"management:maintenanceWindows\" | \"management:settings\" | \"management:dataViews\" | \"management:spaces\" | \"management:users\" | \"management:migrate_data\" | \"management:search_sessions\" | \"management:filesManagement\" | \"management:roles\" | \"management:reporting\" | \"management:aiAssistantManagementSelection\" | \"management:aiAssistantManagementObservability\" | \"management:api_keys\" | \"management:cross_cluster_replication\" | \"management:license_management\" | \"management:index_lifecycle_management\" | \"management:index_management\" | \"management:ingest_pipelines\" | \"management:jobsListLink\" | \"management:objects\" | \"management:pipelines\" | \"management:remote_clusters\" | \"management:role_mappings\" | \"management:rollup_jobs\" | \"management:snapshot_restore\" | \"management:triggersActions\" | \"management:triggersActionsConnectors\" | \"management:upgrade_assistant\" | \"serverlessElasticsearch\" | \"serverlessConnectors\" | \"observability-logs-explorer\" | \"observabilityOnboarding\" | \"slo\" | \"logs:settings\" | \"logs:stream\" | \"logs:log-categories\" | \"logs:anomalies\" | \"observability-overview:cases\" | \"observability-overview:rules\" | \"observability-overview:alerts\" | \"observability-overview:cases_create\" | \"observability-overview:cases_configure\" | \"metrics:settings\" | \"metrics:hosts\" | \"metrics:inventory\" | \"metrics:metrics-explorer\" | \"metrics:assetDetails\" | \"apm:traces\" | \"apm:dependencies\" | \"apm:service-map\" | \"apm:settings\" | \"apm:services\" | \"apm:service-groups-list\" | \"apm:storage-explorer\" | \"synthetics:overview\" | \"synthetics:certificates\" | \"securitySolutionUI\" | \"securitySolutionUI:\" | \"securitySolutionUI:cases\" | \"securitySolutionUI:rules\" | \"securitySolutionUI:alerts\" | \"securitySolutionUI:policy\" | \"securitySolutionUI:overview\" | \"securitySolutionUI:dashboards\" | \"securitySolutionUI:cases_create\" | \"securitySolutionUI:cases_configure\" | \"securitySolutionUI:hosts\" | \"securitySolutionUI:users\" | \"securitySolutionUI:cloud_defend-policies\" | \"securitySolutionUI:cloud_security_posture-dashboard\" | \"securitySolutionUI:cloud_security_posture-findings\" | \"securitySolutionUI:cloud_security_posture-benchmarks\" | \"securitySolutionUI:kubernetes\" | \"securitySolutionUI:network\" | \"securitySolutionUI:sessions\" | \"securitySolutionUI:explore\" | \"securitySolutionUI:assets\" | \"securitySolutionUI:cloud_defend\" | \"securitySolutionUI:administration\" | \"securitySolutionUI:blocklist\" | \"securitySolutionUI:cloud_security_posture-rules\" | \"securitySolutionUI:data_quality\" | \"securitySolutionUI:detections\" | \"securitySolutionUI:detection_response\" | \"securitySolutionUI:endpoints\" | \"securitySolutionUI:event_filters\" | \"securitySolutionUI:exceptions\" | \"securitySolutionUI:host_isolation_exceptions\" | \"securitySolutionUI:hosts-anomalies\" | \"securitySolutionUI:hosts-risk\" | \"securitySolutionUI:hosts-events\" | \"securitySolutionUI:investigations\" | \"securitySolutionUI:get_started\" | \"securitySolutionUI:machine_learning-landing\" | \"securitySolutionUI:network-anomalies\" | \"securitySolutionUI:network-dns\" | \"securitySolutionUI:network-events\" | \"securitySolutionUI:network-http\" | \"securitySolutionUI:network-tls\" | \"securitySolutionUI:response_actions_history\" | \"securitySolutionUI:rules-add\" | \"securitySolutionUI:rules-create\" | \"securitySolutionUI:rules-landing\" | \"securitySolutionUI:threat_intelligence\" | \"securitySolutionUI:timelines\" | \"securitySolutionUI:timelines-templates\" | \"securitySolutionUI:trusted_apps\" | \"securitySolutionUI:uncommon_processes\" | \"securitySolutionUI:users-anomalies\" | \"securitySolutionUI:users-authentications\" | \"securitySolutionUI:users-events\" | \"securitySolutionUI:users-risk\" | \"securitySolutionUI:entity_analytics\" | \"securitySolutionUI:entity_analytics-management\" | \"securitySolutionUI:coverage-overview\" | \"fleet:settings\" | \"fleet:policies\" | \"fleet:data_streams\" | \"fleet:enrollment_tokens\" | \"fleet:uninstall_tokens\" | \"fleet:agents\"" ], "path": "packages/core/chrome/core-chrome-browser/src/project_navigation.ts", "deprecated": false, @@ -3757,7 +3711,7 @@ "label": "AppId", "description": [], "signature": [ - "\"ml\" | \"dev_tools\" | ", + "\"fleet\" | \"ml\" | \"home\" | \"dev_tools\" | ", { "pluginId": "@kbn/deeplinks-analytics", "scope": "common", @@ -3780,7 +3734,8 @@ "docId": "kibKbnDeeplinksObservabilityPluginApi", "section": "def-common.AppId", "text": "AppId" - } + }, + " | \"securitySolutionUI\"" ], "path": "packages/core/chrome/core-chrome-browser/src/project_navigation.ts", "deprecated": false, diff --git a/api_docs/kbn_core_chrome_browser.mdx b/api_docs/kbn_core_chrome_browser.mdx index 0805fd9fdaee6..4bd0a141e7649 100644 --- a/api_docs/kbn_core_chrome_browser.mdx +++ b/api_docs/kbn_core_chrome_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-chrome-browser title: "@kbn/core-chrome-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-chrome-browser plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-chrome-browser'] --- import kbnCoreChromeBrowserObj from './kbn_core_chrome_browser.devdocs.json'; diff --git a/api_docs/kbn_core_chrome_browser_mocks.mdx b/api_docs/kbn_core_chrome_browser_mocks.mdx index f48e747746ce7..8434a3c1ce5f6 100644 --- a/api_docs/kbn_core_chrome_browser_mocks.mdx +++ b/api_docs/kbn_core_chrome_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-chrome-browser-mocks title: "@kbn/core-chrome-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-chrome-browser-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-chrome-browser-mocks'] --- import kbnCoreChromeBrowserMocksObj from './kbn_core_chrome_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_config_server_internal.mdx b/api_docs/kbn_core_config_server_internal.mdx index c302a2e6b35c1..818d126d0bbf6 100644 --- a/api_docs/kbn_core_config_server_internal.mdx +++ b/api_docs/kbn_core_config_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-config-server-internal title: "@kbn/core-config-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-config-server-internal plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-config-server-internal'] --- import kbnCoreConfigServerInternalObj from './kbn_core_config_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_browser.mdx b/api_docs/kbn_core_custom_branding_browser.mdx index a95551e055044..011e4f91c8c96 100644 --- a/api_docs/kbn_core_custom_branding_browser.mdx +++ b/api_docs/kbn_core_custom_branding_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-browser title: "@kbn/core-custom-branding-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-browser plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-browser'] --- import kbnCoreCustomBrandingBrowserObj from './kbn_core_custom_branding_browser.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_browser_internal.mdx b/api_docs/kbn_core_custom_branding_browser_internal.mdx index a2aaac6407013..3fa54be1e7189 100644 --- a/api_docs/kbn_core_custom_branding_browser_internal.mdx +++ b/api_docs/kbn_core_custom_branding_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-browser-internal title: "@kbn/core-custom-branding-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-browser-internal plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-browser-internal'] --- import kbnCoreCustomBrandingBrowserInternalObj from './kbn_core_custom_branding_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_browser_mocks.mdx b/api_docs/kbn_core_custom_branding_browser_mocks.mdx index da0d3cc0b83de..dbcb157a91006 100644 --- a/api_docs/kbn_core_custom_branding_browser_mocks.mdx +++ b/api_docs/kbn_core_custom_branding_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-browser-mocks title: "@kbn/core-custom-branding-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-browser-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-browser-mocks'] --- import kbnCoreCustomBrandingBrowserMocksObj from './kbn_core_custom_branding_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_common.mdx b/api_docs/kbn_core_custom_branding_common.mdx index 633456323ad69..0851789021347 100644 --- a/api_docs/kbn_core_custom_branding_common.mdx +++ b/api_docs/kbn_core_custom_branding_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-common title: "@kbn/core-custom-branding-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-common plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-common'] --- import kbnCoreCustomBrandingCommonObj from './kbn_core_custom_branding_common.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_server.mdx b/api_docs/kbn_core_custom_branding_server.mdx index 9f034d528e08f..b7942570b312b 100644 --- a/api_docs/kbn_core_custom_branding_server.mdx +++ b/api_docs/kbn_core_custom_branding_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-server title: "@kbn/core-custom-branding-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-server plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-server'] --- import kbnCoreCustomBrandingServerObj from './kbn_core_custom_branding_server.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_server_internal.mdx b/api_docs/kbn_core_custom_branding_server_internal.mdx index ca65e01f97eb5..df15192d02e77 100644 --- a/api_docs/kbn_core_custom_branding_server_internal.mdx +++ b/api_docs/kbn_core_custom_branding_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-server-internal title: "@kbn/core-custom-branding-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-server-internal plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-server-internal'] --- import kbnCoreCustomBrandingServerInternalObj from './kbn_core_custom_branding_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_server_mocks.mdx b/api_docs/kbn_core_custom_branding_server_mocks.mdx index c078ff208ce63..03746daa2fd6c 100644 --- a/api_docs/kbn_core_custom_branding_server_mocks.mdx +++ b/api_docs/kbn_core_custom_branding_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-server-mocks title: "@kbn/core-custom-branding-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-server-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-server-mocks'] --- import kbnCoreCustomBrandingServerMocksObj from './kbn_core_custom_branding_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_browser.mdx b/api_docs/kbn_core_deprecations_browser.mdx index 63db33eb212b8..04ec34f5596d2 100644 --- a/api_docs/kbn_core_deprecations_browser.mdx +++ b/api_docs/kbn_core_deprecations_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser title: "@kbn/core-deprecations-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-browser plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser'] --- import kbnCoreDeprecationsBrowserObj from './kbn_core_deprecations_browser.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_browser_internal.mdx b/api_docs/kbn_core_deprecations_browser_internal.mdx index 4f8bd78323832..9e941a44a24c5 100644 --- a/api_docs/kbn_core_deprecations_browser_internal.mdx +++ b/api_docs/kbn_core_deprecations_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser-internal title: "@kbn/core-deprecations-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-browser-internal plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser-internal'] --- import kbnCoreDeprecationsBrowserInternalObj from './kbn_core_deprecations_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_browser_mocks.mdx b/api_docs/kbn_core_deprecations_browser_mocks.mdx index 10e96f6a5673f..0231a99b553b2 100644 --- a/api_docs/kbn_core_deprecations_browser_mocks.mdx +++ b/api_docs/kbn_core_deprecations_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser-mocks title: "@kbn/core-deprecations-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-browser-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser-mocks'] --- import kbnCoreDeprecationsBrowserMocksObj from './kbn_core_deprecations_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_common.mdx b/api_docs/kbn_core_deprecations_common.mdx index 7d7de6c6777b8..e4924d224d47c 100644 --- a/api_docs/kbn_core_deprecations_common.mdx +++ b/api_docs/kbn_core_deprecations_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-common title: "@kbn/core-deprecations-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-common plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-common'] --- import kbnCoreDeprecationsCommonObj from './kbn_core_deprecations_common.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_server.mdx b/api_docs/kbn_core_deprecations_server.mdx index 70830d07ec418..6d6655b667bf3 100644 --- a/api_docs/kbn_core_deprecations_server.mdx +++ b/api_docs/kbn_core_deprecations_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server title: "@kbn/core-deprecations-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-server plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-server'] --- import kbnCoreDeprecationsServerObj from './kbn_core_deprecations_server.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_server_internal.mdx b/api_docs/kbn_core_deprecations_server_internal.mdx index 8b9b1b392959e..d2df287f9d402 100644 --- a/api_docs/kbn_core_deprecations_server_internal.mdx +++ b/api_docs/kbn_core_deprecations_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server-internal title: "@kbn/core-deprecations-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-server-internal plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-server-internal'] --- import kbnCoreDeprecationsServerInternalObj from './kbn_core_deprecations_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_server_mocks.mdx b/api_docs/kbn_core_deprecations_server_mocks.mdx index 19debbbd3b2ae..162c9aa7471c1 100644 --- a/api_docs/kbn_core_deprecations_server_mocks.mdx +++ b/api_docs/kbn_core_deprecations_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server-mocks title: "@kbn/core-deprecations-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-server-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-server-mocks'] --- import kbnCoreDeprecationsServerMocksObj from './kbn_core_deprecations_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_browser.mdx b/api_docs/kbn_core_doc_links_browser.mdx index 2a409e4ca7a4c..71a4543443ad2 100644 --- a/api_docs/kbn_core_doc_links_browser.mdx +++ b/api_docs/kbn_core_doc_links_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-browser title: "@kbn/core-doc-links-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-browser plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-browser'] --- import kbnCoreDocLinksBrowserObj from './kbn_core_doc_links_browser.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_browser_mocks.mdx b/api_docs/kbn_core_doc_links_browser_mocks.mdx index 004e94d25928b..5ddbdc97c26d9 100644 --- a/api_docs/kbn_core_doc_links_browser_mocks.mdx +++ b/api_docs/kbn_core_doc_links_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-browser-mocks title: "@kbn/core-doc-links-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-browser-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-browser-mocks'] --- import kbnCoreDocLinksBrowserMocksObj from './kbn_core_doc_links_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_server.mdx b/api_docs/kbn_core_doc_links_server.mdx index e4e23084bd51a..73f603c0e94d3 100644 --- a/api_docs/kbn_core_doc_links_server.mdx +++ b/api_docs/kbn_core_doc_links_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-server title: "@kbn/core-doc-links-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-server plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-server'] --- import kbnCoreDocLinksServerObj from './kbn_core_doc_links_server.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_server_mocks.mdx b/api_docs/kbn_core_doc_links_server_mocks.mdx index b475efb49a91a..4dcb0a7979634 100644 --- a/api_docs/kbn_core_doc_links_server_mocks.mdx +++ b/api_docs/kbn_core_doc_links_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-server-mocks title: "@kbn/core-doc-links-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-server-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-server-mocks'] --- import kbnCoreDocLinksServerMocksObj from './kbn_core_doc_links_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_client_server_internal.mdx b/api_docs/kbn_core_elasticsearch_client_server_internal.mdx index adef72554f66f..e4b03275e7519 100644 --- a/api_docs/kbn_core_elasticsearch_client_server_internal.mdx +++ b/api_docs/kbn_core_elasticsearch_client_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-client-server-internal title: "@kbn/core-elasticsearch-client-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-client-server-internal plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-client-server-internal'] --- import kbnCoreElasticsearchClientServerInternalObj from './kbn_core_elasticsearch_client_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_client_server_mocks.devdocs.json b/api_docs/kbn_core_elasticsearch_client_server_mocks.devdocs.json index 23b3ff9711e14..0c3acda84f80c 100644 --- a/api_docs/kbn_core_elasticsearch_client_server_mocks.devdocs.json +++ b/api_docs/kbn_core_elasticsearch_client_server_mocks.devdocs.json @@ -271,7 +271,23 @@ "label": "asInternalUser", "description": [], "signature": [ - "{ create: ", + "{ search: ", + { + "pluginId": "@kbn/core-elasticsearch-client-server-mocks", + "scope": "common", + "docId": "kibKbnCoreElasticsearchClientServerMocksPluginApi", + "section": "def-common.ClientApiMockInstance", + "text": "ClientApiMockInstance" + }, + ">, [params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined]>; create: ", { "pluginId": "@kbn/core-elasticsearch-client-server-mocks", "scope": "common", @@ -335,22 +351,6 @@ "DeleteRequest", ", options?: ", "TransportRequestOptions", - " | undefined]>; search: ", - { - "pluginId": "@kbn/core-elasticsearch-client-server-mocks", - "scope": "common", - "docId": "kibKbnCoreElasticsearchClientServerMocksPluginApi", - "section": "def-common.ClientApiMockInstance", - "text": "ClientApiMockInstance" - }, - ">, [params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptions", " | undefined]>; helpers: ", { "pluginId": "@kbn/core-elasticsearch-client-server-mocks", @@ -1444,7 +1444,23 @@ "label": "asInternalUser", "description": [], "signature": [ - "{ create: ", + "{ search: ", + { + "pluginId": "@kbn/core-elasticsearch-client-server-mocks", + "scope": "common", + "docId": "kibKbnCoreElasticsearchClientServerMocksPluginApi", + "section": "def-common.ClientApiMockInstance", + "text": "ClientApiMockInstance" + }, + ">, [params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined]>; create: ", { "pluginId": "@kbn/core-elasticsearch-client-server-mocks", "scope": "common", @@ -1508,22 +1524,6 @@ "DeleteRequest", ", options?: ", "TransportRequestOptions", - " | undefined]>; search: ", - { - "pluginId": "@kbn/core-elasticsearch-client-server-mocks", - "scope": "common", - "docId": "kibKbnCoreElasticsearchClientServerMocksPluginApi", - "section": "def-common.ClientApiMockInstance", - "text": "ClientApiMockInstance" - }, - ">, [params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptions", " | undefined]>; helpers: ", { "pluginId": "@kbn/core-elasticsearch-client-server-mocks", @@ -2571,7 +2571,23 @@ "label": "asCurrentUser", "description": [], "signature": [ - "{ create: ", + "{ search: ", + { + "pluginId": "@kbn/core-elasticsearch-client-server-mocks", + "scope": "common", + "docId": "kibKbnCoreElasticsearchClientServerMocksPluginApi", + "section": "def-common.ClientApiMockInstance", + "text": "ClientApiMockInstance" + }, + ">, [params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined]>; create: ", { "pluginId": "@kbn/core-elasticsearch-client-server-mocks", "scope": "common", @@ -2635,22 +2651,6 @@ "DeleteRequest", ", options?: ", "TransportRequestOptions", - " | undefined]>; search: ", - { - "pluginId": "@kbn/core-elasticsearch-client-server-mocks", - "scope": "common", - "docId": "kibKbnCoreElasticsearchClientServerMocksPluginApi", - "section": "def-common.ClientApiMockInstance", - "text": "ClientApiMockInstance" - }, - ">, [params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptions", " | undefined]>; helpers: ", { "pluginId": "@kbn/core-elasticsearch-client-server-mocks", @@ -3789,7 +3789,23 @@ "label": "ElasticsearchClientMock", "description": [], "signature": [ - "{ create: ", + "{ search: ", + { + "pluginId": "@kbn/core-elasticsearch-client-server-mocks", + "scope": "common", + "docId": "kibKbnCoreElasticsearchClientServerMocksPluginApi", + "section": "def-common.ClientApiMockInstance", + "text": "ClientApiMockInstance" + }, + ">, [params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined]>; create: ", { "pluginId": "@kbn/core-elasticsearch-client-server-mocks", "scope": "common", @@ -3853,22 +3869,6 @@ "DeleteRequest", ", options?: ", "TransportRequestOptions", - " | undefined]>; search: ", - { - "pluginId": "@kbn/core-elasticsearch-client-server-mocks", - "scope": "common", - "docId": "kibKbnCoreElasticsearchClientServerMocksPluginApi", - "section": "def-common.ClientApiMockInstance", - "text": "ClientApiMockInstance" - }, - ">, [params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptions", " | undefined]>; helpers: ", { "pluginId": "@kbn/core-elasticsearch-client-server-mocks", diff --git a/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx b/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx index b13f5959169df..fd08cf7c4459e 100644 --- a/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx +++ b/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-client-server-mocks title: "@kbn/core-elasticsearch-client-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-client-server-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-client-server-mocks'] --- import kbnCoreElasticsearchClientServerMocksObj from './kbn_core_elasticsearch_client_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_server.devdocs.json b/api_docs/kbn_core_elasticsearch_server.devdocs.json index 95638838cf385..6e7bde4d64942 100644 --- a/api_docs/kbn_core_elasticsearch_server.devdocs.json +++ b/api_docs/kbn_core_elasticsearch_server.devdocs.json @@ -1068,7 +1068,39 @@ "\nA {@link ElasticsearchClient | client} to be used to query the ES cluster on behalf of the Kibana internal user" ], "signature": [ - "{ create: { (this: That, params: ", + "{ search: { >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "SearchResponse", + ">; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "SearchResponse", + ", unknown>>; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "SearchResponse", + ">; }; create: { (this: That, params: ", "CreateRequest", " | ", "CreateRequest", @@ -1172,39 +1204,7 @@ "TransportRequestOptions", " | undefined): Promise<", "WriteResponseBase", - ">; }; search: { >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptionsWithOutMeta", - " | undefined): Promise<", - "SearchResponse", - ">; >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptionsWithMeta", - " | undefined): Promise<", - "TransportResult", - "<", - "SearchResponse", - ", unknown>>; >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptions", - " | undefined): Promise<", - "SearchResponse", - ">; }; helpers: ", + ">; }; helpers: ", "default", "; name: string | symbol; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kEsql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kInference]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kQueryRuleset]: symbol | null; [kRollup]: symbol | null; [kSearchApplication]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kSynonyms]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", "default", @@ -2416,6 +2416,22 @@ "deprecated": false, "trackAdoption": false, "children": [ + { + "parentPluginId": "@kbn/core-elasticsearch-server", + "id": "def-common.IElasticsearchConfig.healthCheckStartupDelay", + "type": "Object", + "tags": [], + "label": "healthCheckStartupDelay", + "description": [ + "\nThe interval between health check requests Kibana sends to the Elasticsearch before the first green signal." + ], + "signature": [ + "moment.Duration" + ], + "path": "packages/core/elasticsearch/core-elasticsearch-server/src/elasticsearch_config.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "@kbn/core-elasticsearch-server", "id": "def-common.IElasticsearchConfig.healthCheckDelay", @@ -2423,7 +2439,7 @@ "tags": [], "label": "healthCheckDelay", "description": [ - "\nThe interval between health check requests Kibana sends to the Elasticsearch." + "\nThe interval between health check requests Kibana sends to the Elasticsearch after the first green signal." ], "signature": [ "moment.Duration" @@ -2770,7 +2786,39 @@ "\nA {@link ElasticsearchClient | client} to be used to query the elasticsearch cluster\non behalf of the internal Kibana user." ], "signature": [ - "{ create: { (this: That, params: ", + "{ search: { >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "SearchResponse", + ">; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "SearchResponse", + ", unknown>>; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "SearchResponse", + ">; }; create: { (this: That, params: ", "CreateRequest", " | ", "CreateRequest", @@ -2874,39 +2922,7 @@ "TransportRequestOptions", " | undefined): Promise<", "WriteResponseBase", - ">; }; search: { >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptionsWithOutMeta", - " | undefined): Promise<", - "SearchResponse", - ">; >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptionsWithMeta", - " | undefined): Promise<", - "TransportResult", - "<", - "SearchResponse", - ", unknown>>; >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptions", - " | undefined): Promise<", - "SearchResponse", - ">; }; helpers: ", + ">; }; helpers: ", "default", "; name: string | symbol; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kEsql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kInference]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kQueryRuleset]: symbol | null; [kRollup]: symbol | null; [kSearchApplication]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kSynonyms]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", "default", @@ -4008,7 +4024,39 @@ "\nA {@link ElasticsearchClient | client} to be used to query the elasticsearch cluster\non behalf of the user that initiated the request to the Kibana server." ], "signature": [ - "{ create: { (this: That, params: ", + "{ search: { >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "SearchResponse", + ">; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "SearchResponse", + ", unknown>>; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "SearchResponse", + ">; }; create: { (this: That, params: ", "CreateRequest", " | ", "CreateRequest", @@ -4112,39 +4160,7 @@ "TransportRequestOptions", " | undefined): Promise<", "WriteResponseBase", - ">; }; search: { >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptionsWithOutMeta", - " | undefined): Promise<", - "SearchResponse", - ">; >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptionsWithMeta", - " | undefined): Promise<", - "TransportResult", - "<", - "SearchResponse", - ", unknown>>; >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptions", - " | undefined): Promise<", - "SearchResponse", - ">; }; helpers: ", + ">; }; helpers: ", "default", "; name: string | symbol; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kEsql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kInference]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kQueryRuleset]: symbol | null; [kRollup]: symbol | null; [kSearchApplication]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kSynonyms]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", "default", @@ -5499,7 +5515,39 @@ "\nClient used to query the elasticsearch cluster.\n" ], "signature": [ - "{ create: { (this: That, params: ", + "{ search: { >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "SearchResponse", + ">; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "SearchResponse", + ", unknown>>; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "SearchResponse", + ">; }; create: { (this: That, params: ", "CreateRequest", " | ", "CreateRequest", @@ -5603,39 +5651,7 @@ "TransportRequestOptions", " | undefined): Promise<", "WriteResponseBase", - ">; }; search: { >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptionsWithOutMeta", - " | undefined): Promise<", - "SearchResponse", - ">; >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptionsWithMeta", - " | undefined): Promise<", - "TransportResult", - "<", - "SearchResponse", - ", unknown>>; >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptions", - " | undefined): Promise<", - "SearchResponse", - ">; }; helpers: ", + ">; }; helpers: ", "default", "; name: string | symbol; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kEsql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kInference]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kQueryRuleset]: symbol | null; [kRollup]: symbol | null; [kSearchApplication]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kSynonyms]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", "default", diff --git a/api_docs/kbn_core_elasticsearch_server.mdx b/api_docs/kbn_core_elasticsearch_server.mdx index 3fd584f993e62..070d55ed534c7 100644 --- a/api_docs/kbn_core_elasticsearch_server.mdx +++ b/api_docs/kbn_core_elasticsearch_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server title: "@kbn/core-elasticsearch-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-server plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server'] --- import kbnCoreElasticsearchServerObj from './kbn_core_elasticsearch_server.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 111 | 0 | 54 | 0 | +| 112 | 0 | 54 | 0 | ## Common diff --git a/api_docs/kbn_core_elasticsearch_server_internal.devdocs.json b/api_docs/kbn_core_elasticsearch_server_internal.devdocs.json index e45274c30243a..72a7d06e95829 100644 --- a/api_docs/kbn_core_elasticsearch_server_internal.devdocs.json +++ b/api_docs/kbn_core_elasticsearch_server_internal.devdocs.json @@ -60,7 +60,39 @@ "label": "client", "description": [], "signature": [ - "{ create: { (this: That, params: ", + "{ search: { >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "SearchResponse", + ">; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "SearchResponse", + ", unknown>>; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "SearchResponse", + ">; }; create: { (this: That, params: ", "CreateRequest", " | ", "CreateRequest", @@ -164,39 +196,7 @@ "TransportRequestOptions", " | undefined): Promise<", "WriteResponseBase", - ">; }; search: { >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptionsWithOutMeta", - " | undefined): Promise<", - "SearchResponse", - ">; >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptionsWithMeta", - " | undefined): Promise<", - "TransportResult", - "<", - "SearchResponse", - ", unknown>>; >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptions", - " | undefined): Promise<", - "SearchResponse", - ">; }; helpers: ", + ">; }; helpers: ", "default", "; name: string | symbol; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kEsql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kInference]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kQueryRuleset]: symbol | null; [kRollup]: symbol | null; [kSearchApplication]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kSynonyms]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", "default", @@ -1469,7 +1469,7 @@ "label": "pollEsNodesVersion", "description": [], "signature": [ - "({ internalClient, log, kibanaVersion, ignoreVersionMismatch, esVersionCheckInterval: healthCheckInterval, }: ", + "({ internalClient, log, kibanaVersion, ignoreVersionMismatch, healthCheckInterval, healthCheckStartupInterval, }: ", { "pluginId": "@kbn/core-elasticsearch-server-internal", "scope": "common", @@ -1498,7 +1498,7 @@ "id": "def-common.pollEsNodesVersion.$1", "type": "Object", "tags": [], - "label": "{\n internalClient,\n log,\n kibanaVersion,\n ignoreVersionMismatch,\n esVersionCheckInterval: healthCheckInterval,\n}", + "label": "{\n internalClient,\n log,\n kibanaVersion,\n ignoreVersionMismatch,\n healthCheckInterval,\n healthCheckStartupInterval,\n}", "description": [], "signature": [ { @@ -1805,7 +1805,39 @@ "label": "internalClient", "description": [], "signature": [ - "{ create: { (this: That, params: ", + "{ search: { >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "SearchResponse", + ">; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "SearchResponse", + ", unknown>>; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "SearchResponse", + ">; }; create: { (this: That, params: ", "CreateRequest", " | ", "CreateRequest", @@ -1909,39 +1941,7 @@ "TransportRequestOptions", " | undefined): Promise<", "WriteResponseBase", - ">; }; search: { >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptionsWithOutMeta", - " | undefined): Promise<", - "SearchResponse", - ">; >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptionsWithMeta", - " | undefined): Promise<", - "TransportResult", - "<", - "SearchResponse", - ", unknown>>; >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptions", - " | undefined): Promise<", - "SearchResponse", - ">; }; helpers: ", + ">; }; helpers: ", "default", "; name: string | symbol; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kEsql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kInference]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kQueryRuleset]: symbol | null; [kRollup]: symbol | null; [kSearchApplication]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kSynonyms]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", "default", @@ -3077,14 +3077,28 @@ }, { "parentPluginId": "@kbn/core-elasticsearch-server-internal", - "id": "def-common.PollEsNodesVersionOptions.esVersionCheckInterval", + "id": "def-common.PollEsNodesVersionOptions.healthCheckInterval", "type": "number", "tags": [], - "label": "esVersionCheckInterval", + "label": "healthCheckInterval", "description": [], "path": "packages/core/elasticsearch/core-elasticsearch-server-internal/src/version_check/ensure_es_version.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-elasticsearch-server-internal", + "id": "def-common.PollEsNodesVersionOptions.healthCheckStartupInterval", + "type": "number", + "tags": [], + "label": "healthCheckStartupInterval", + "description": [], + "signature": [ + "number | undefined" + ], + "path": "packages/core/elasticsearch/core-elasticsearch-server-internal/src/version_check/ensure_es_version.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false @@ -3100,7 +3114,7 @@ "label": "ElasticsearchConfigType", "description": [], "signature": [ - "{ readonly username?: string | undefined; readonly password?: string | undefined; readonly serviceAccountToken?: string | undefined; readonly ssl: Readonly<{ key?: string | undefined; certificateAuthorities?: string | string[] | undefined; certificate?: string | undefined; keyPassphrase?: string | undefined; } & { verificationMode: \"none\" | \"full\" | \"certificate\"; keystore: Readonly<{ path?: string | undefined; password?: string | undefined; } & {}>; truststore: Readonly<{ path?: string | undefined; password?: string | undefined; } & {}>; alwaysPresentCertificate: boolean; }>; readonly healthCheck: Readonly<{} & { delay: moment.Duration; }>; readonly hosts: string | string[]; readonly requestTimeout: moment.Duration; readonly compression: boolean; readonly apiVersion: string; readonly customHeaders: Record; readonly sniffOnStart: boolean; readonly sniffInterval: false | moment.Duration; readonly sniffOnConnectionFault: boolean; readonly maxSockets: number; readonly maxIdleSockets: number; readonly idleSocketTimeout: moment.Duration; readonly requestHeadersWhitelist: string | string[]; readonly shardTimeout: moment.Duration; readonly pingTimeout: moment.Duration; readonly logQueries: boolean; readonly ignoreVersionMismatch: boolean; readonly skipStartupConnectionCheck: boolean; readonly apisToRedactInLogs: Readonly<{ method?: string | undefined; } & { path: string; }>[]; }" + "{ readonly username?: string | undefined; readonly password?: string | undefined; readonly serviceAccountToken?: string | undefined; readonly ssl: Readonly<{ key?: string | undefined; certificateAuthorities?: string | string[] | undefined; certificate?: string | undefined; keyPassphrase?: string | undefined; } & { verificationMode: \"none\" | \"full\" | \"certificate\"; keystore: Readonly<{ path?: string | undefined; password?: string | undefined; } & {}>; truststore: Readonly<{ path?: string | undefined; password?: string | undefined; } & {}>; alwaysPresentCertificate: boolean; }>; readonly healthCheck: Readonly<{} & { delay: moment.Duration; startupDelay: moment.Duration; }>; readonly hosts: string | string[]; readonly requestTimeout: moment.Duration; readonly compression: boolean; readonly apiVersion: string; readonly customHeaders: Record; readonly sniffOnStart: boolean; readonly sniffInterval: false | moment.Duration; readonly sniffOnConnectionFault: boolean; readonly maxSockets: number; readonly maxIdleSockets: number; readonly idleSocketTimeout: moment.Duration; readonly requestHeadersWhitelist: string | string[]; readonly shardTimeout: moment.Duration; readonly pingTimeout: moment.Duration; readonly logQueries: boolean; readonly ignoreVersionMismatch: boolean; readonly skipStartupConnectionCheck: boolean; readonly apisToRedactInLogs: Readonly<{ method?: string | undefined; } & { path: string; }>[]; }" ], "path": "packages/core/elasticsearch/core-elasticsearch-server-internal/src/elasticsearch_config.ts", "deprecated": false, @@ -3390,6 +3404,14 @@ "section": "def-common.Type", "text": "Type" }, + "; startupDelay: ", + { + "pluginId": "@kbn/config-schema", + "scope": "common", + "docId": "kibKbnConfigSchemaPluginApi", + "section": "def-common.Type", + "text": "Type" + }, "; }>; ignoreVersionMismatch: ", { "pluginId": "@kbn/config-schema", diff --git a/api_docs/kbn_core_elasticsearch_server_internal.mdx b/api_docs/kbn_core_elasticsearch_server_internal.mdx index 447207f8961c3..310d289e9187c 100644 --- a/api_docs/kbn_core_elasticsearch_server_internal.mdx +++ b/api_docs/kbn_core_elasticsearch_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server-internal title: "@kbn/core-elasticsearch-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-server-internal plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server-internal'] --- import kbnCoreElasticsearchServerInternalObj from './kbn_core_elasticsearch_server_internal.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 42 | 0 | 37 | 3 | +| 43 | 0 | 38 | 3 | ## Common diff --git a/api_docs/kbn_core_elasticsearch_server_mocks.mdx b/api_docs/kbn_core_elasticsearch_server_mocks.mdx index 35c784e33ef9d..f3e387e6fce36 100644 --- a/api_docs/kbn_core_elasticsearch_server_mocks.mdx +++ b/api_docs/kbn_core_elasticsearch_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server-mocks title: "@kbn/core-elasticsearch-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-server-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server-mocks'] --- import kbnCoreElasticsearchServerMocksObj from './kbn_core_elasticsearch_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_environment_server_internal.mdx b/api_docs/kbn_core_environment_server_internal.mdx index abdba9a8f6adb..be2bb5d7059d6 100644 --- a/api_docs/kbn_core_environment_server_internal.mdx +++ b/api_docs/kbn_core_environment_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-environment-server-internal title: "@kbn/core-environment-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-environment-server-internal plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-environment-server-internal'] --- import kbnCoreEnvironmentServerInternalObj from './kbn_core_environment_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_environment_server_mocks.mdx b/api_docs/kbn_core_environment_server_mocks.mdx index 887f641b52ed6..d6814e95461c4 100644 --- a/api_docs/kbn_core_environment_server_mocks.mdx +++ b/api_docs/kbn_core_environment_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-environment-server-mocks title: "@kbn/core-environment-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-environment-server-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-environment-server-mocks'] --- import kbnCoreEnvironmentServerMocksObj from './kbn_core_environment_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_browser.mdx b/api_docs/kbn_core_execution_context_browser.mdx index dd0fa8fa6c745..e92b8d2249b0c 100644 --- a/api_docs/kbn_core_execution_context_browser.mdx +++ b/api_docs/kbn_core_execution_context_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser title: "@kbn/core-execution-context-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-browser plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser'] --- import kbnCoreExecutionContextBrowserObj from './kbn_core_execution_context_browser.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_browser_internal.mdx b/api_docs/kbn_core_execution_context_browser_internal.mdx index 273cb1141f983..a0da4c9505ad6 100644 --- a/api_docs/kbn_core_execution_context_browser_internal.mdx +++ b/api_docs/kbn_core_execution_context_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser-internal title: "@kbn/core-execution-context-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-browser-internal plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser-internal'] --- import kbnCoreExecutionContextBrowserInternalObj from './kbn_core_execution_context_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_browser_mocks.mdx b/api_docs/kbn_core_execution_context_browser_mocks.mdx index 1fdb8adb6e3bf..9ed79ecc6f27f 100644 --- a/api_docs/kbn_core_execution_context_browser_mocks.mdx +++ b/api_docs/kbn_core_execution_context_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser-mocks title: "@kbn/core-execution-context-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-browser-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser-mocks'] --- import kbnCoreExecutionContextBrowserMocksObj from './kbn_core_execution_context_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_common.mdx b/api_docs/kbn_core_execution_context_common.mdx index a9862266a30f3..242969fc14591 100644 --- a/api_docs/kbn_core_execution_context_common.mdx +++ b/api_docs/kbn_core_execution_context_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-common title: "@kbn/core-execution-context-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-common plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-common'] --- import kbnCoreExecutionContextCommonObj from './kbn_core_execution_context_common.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_server.mdx b/api_docs/kbn_core_execution_context_server.mdx index 88afd2db5b5d7..bb66141fdac73 100644 --- a/api_docs/kbn_core_execution_context_server.mdx +++ b/api_docs/kbn_core_execution_context_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server title: "@kbn/core-execution-context-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-server plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server'] --- import kbnCoreExecutionContextServerObj from './kbn_core_execution_context_server.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_server_internal.mdx b/api_docs/kbn_core_execution_context_server_internal.mdx index a56731c805805..3ad14ba59768a 100644 --- a/api_docs/kbn_core_execution_context_server_internal.mdx +++ b/api_docs/kbn_core_execution_context_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server-internal title: "@kbn/core-execution-context-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-server-internal plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server-internal'] --- import kbnCoreExecutionContextServerInternalObj from './kbn_core_execution_context_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_server_mocks.mdx b/api_docs/kbn_core_execution_context_server_mocks.mdx index 535429b0520e6..588f29a45292f 100644 --- a/api_docs/kbn_core_execution_context_server_mocks.mdx +++ b/api_docs/kbn_core_execution_context_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server-mocks title: "@kbn/core-execution-context-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-server-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server-mocks'] --- import kbnCoreExecutionContextServerMocksObj from './kbn_core_execution_context_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_fatal_errors_browser.mdx b/api_docs/kbn_core_fatal_errors_browser.mdx index 761638c40cb40..b5f272c03ba24 100644 --- a/api_docs/kbn_core_fatal_errors_browser.mdx +++ b/api_docs/kbn_core_fatal_errors_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-fatal-errors-browser title: "@kbn/core-fatal-errors-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-fatal-errors-browser plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-fatal-errors-browser'] --- import kbnCoreFatalErrorsBrowserObj from './kbn_core_fatal_errors_browser.devdocs.json'; diff --git a/api_docs/kbn_core_fatal_errors_browser_mocks.mdx b/api_docs/kbn_core_fatal_errors_browser_mocks.mdx index b67c3b945d7e3..dc82d74dfb5e6 100644 --- a/api_docs/kbn_core_fatal_errors_browser_mocks.mdx +++ b/api_docs/kbn_core_fatal_errors_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-fatal-errors-browser-mocks title: "@kbn/core-fatal-errors-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-fatal-errors-browser-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-fatal-errors-browser-mocks'] --- import kbnCoreFatalErrorsBrowserMocksObj from './kbn_core_fatal_errors_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_browser.mdx b/api_docs/kbn_core_http_browser.mdx index affb875753919..58dc9edc76423 100644 --- a/api_docs/kbn_core_http_browser.mdx +++ b/api_docs/kbn_core_http_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser title: "@kbn/core-http-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-browser plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser'] --- import kbnCoreHttpBrowserObj from './kbn_core_http_browser.devdocs.json'; diff --git a/api_docs/kbn_core_http_browser_internal.mdx b/api_docs/kbn_core_http_browser_internal.mdx index de45ec7788f13..105a880f23fc1 100644 --- a/api_docs/kbn_core_http_browser_internal.mdx +++ b/api_docs/kbn_core_http_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser-internal title: "@kbn/core-http-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-browser-internal plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser-internal'] --- import kbnCoreHttpBrowserInternalObj from './kbn_core_http_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_browser_mocks.mdx b/api_docs/kbn_core_http_browser_mocks.mdx index 8efc1c354708c..77286f79fabec 100644 --- a/api_docs/kbn_core_http_browser_mocks.mdx +++ b/api_docs/kbn_core_http_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser-mocks title: "@kbn/core-http-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-browser-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser-mocks'] --- import kbnCoreHttpBrowserMocksObj from './kbn_core_http_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_common.mdx b/api_docs/kbn_core_http_common.mdx index c62b86363dde6..933ab7c50e496 100644 --- a/api_docs/kbn_core_http_common.mdx +++ b/api_docs/kbn_core_http_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-common title: "@kbn/core-http-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-common plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-common'] --- import kbnCoreHttpCommonObj from './kbn_core_http_common.devdocs.json'; diff --git a/api_docs/kbn_core_http_context_server_mocks.mdx b/api_docs/kbn_core_http_context_server_mocks.mdx index 42ae1fe8f4821..4227d2e867378 100644 --- a/api_docs/kbn_core_http_context_server_mocks.mdx +++ b/api_docs/kbn_core_http_context_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-context-server-mocks title: "@kbn/core-http-context-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-context-server-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-context-server-mocks'] --- import kbnCoreHttpContextServerMocksObj from './kbn_core_http_context_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_request_handler_context_server.mdx b/api_docs/kbn_core_http_request_handler_context_server.mdx index e8ca816cae848..8e9fadde713b1 100644 --- a/api_docs/kbn_core_http_request_handler_context_server.mdx +++ b/api_docs/kbn_core_http_request_handler_context_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-request-handler-context-server title: "@kbn/core-http-request-handler-context-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-request-handler-context-server plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-request-handler-context-server'] --- import kbnCoreHttpRequestHandlerContextServerObj from './kbn_core_http_request_handler_context_server.devdocs.json'; diff --git a/api_docs/kbn_core_http_resources_server.mdx b/api_docs/kbn_core_http_resources_server.mdx index b0533e332681f..56714067fea94 100644 --- a/api_docs/kbn_core_http_resources_server.mdx +++ b/api_docs/kbn_core_http_resources_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-resources-server title: "@kbn/core-http-resources-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-resources-server plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-resources-server'] --- import kbnCoreHttpResourcesServerObj from './kbn_core_http_resources_server.devdocs.json'; diff --git a/api_docs/kbn_core_http_resources_server_internal.mdx b/api_docs/kbn_core_http_resources_server_internal.mdx index cdaf3d92055ed..d437947ebea20 100644 --- a/api_docs/kbn_core_http_resources_server_internal.mdx +++ b/api_docs/kbn_core_http_resources_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-resources-server-internal title: "@kbn/core-http-resources-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-resources-server-internal plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-resources-server-internal'] --- import kbnCoreHttpResourcesServerInternalObj from './kbn_core_http_resources_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_resources_server_mocks.mdx b/api_docs/kbn_core_http_resources_server_mocks.mdx index f0a4ffae1ab82..07175144e4a99 100644 --- a/api_docs/kbn_core_http_resources_server_mocks.mdx +++ b/api_docs/kbn_core_http_resources_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-resources-server-mocks title: "@kbn/core-http-resources-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-resources-server-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-resources-server-mocks'] --- import kbnCoreHttpResourcesServerMocksObj from './kbn_core_http_resources_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_router_server_internal.mdx b/api_docs/kbn_core_http_router_server_internal.mdx index 89ea51345e17f..7f942ad299d42 100644 --- a/api_docs/kbn_core_http_router_server_internal.mdx +++ b/api_docs/kbn_core_http_router_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-router-server-internal title: "@kbn/core-http-router-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-router-server-internal plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-router-server-internal'] --- import kbnCoreHttpRouterServerInternalObj from './kbn_core_http_router_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_router_server_mocks.mdx b/api_docs/kbn_core_http_router_server_mocks.mdx index f464679eabf8a..dae4c42ce3e0f 100644 --- a/api_docs/kbn_core_http_router_server_mocks.mdx +++ b/api_docs/kbn_core_http_router_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-router-server-mocks title: "@kbn/core-http-router-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-router-server-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-router-server-mocks'] --- import kbnCoreHttpRouterServerMocksObj from './kbn_core_http_router_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_server.devdocs.json b/api_docs/kbn_core_http_server.devdocs.json index 6880c7705fe27..89bb69db2598a 100644 --- a/api_docs/kbn_core_http_server.devdocs.json +++ b/api_docs/kbn_core_http_server.devdocs.json @@ -6830,6 +6830,18 @@ "plugin": "rollup", "path": "x-pack/plugins/rollup/server/routes/api/search/register_search_route.ts" }, + { + "plugin": "searchPlayground", + "path": "x-pack/plugins/search_playground/server/routes.ts" + }, + { + "plugin": "searchPlayground", + "path": "x-pack/plugins/search_playground/server/routes.ts" + }, + { + "plugin": "searchPlayground", + "path": "x-pack/plugins/search_playground/server/routes.ts" + }, { "plugin": "searchprofiler", "path": "x-pack/plugins/searchprofiler/server/routes/profile.ts" diff --git a/api_docs/kbn_core_http_server.mdx b/api_docs/kbn_core_http_server.mdx index b97274bc4565f..cf20a5290d15c 100644 --- a/api_docs/kbn_core_http_server.mdx +++ b/api_docs/kbn_core_http_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server title: "@kbn/core-http-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server'] --- import kbnCoreHttpServerObj from './kbn_core_http_server.devdocs.json'; diff --git a/api_docs/kbn_core_http_server_internal.mdx b/api_docs/kbn_core_http_server_internal.mdx index 014a585a70190..7771b8591686e 100644 --- a/api_docs/kbn_core_http_server_internal.mdx +++ b/api_docs/kbn_core_http_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server-internal title: "@kbn/core-http-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server-internal plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server-internal'] --- import kbnCoreHttpServerInternalObj from './kbn_core_http_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_server_mocks.mdx b/api_docs/kbn_core_http_server_mocks.mdx index 522cfc669f338..54b10489efc40 100644 --- a/api_docs/kbn_core_http_server_mocks.mdx +++ b/api_docs/kbn_core_http_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server-mocks title: "@kbn/core-http-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server-mocks'] --- import kbnCoreHttpServerMocksObj from './kbn_core_http_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_browser.mdx b/api_docs/kbn_core_i18n_browser.mdx index 128b5e5cd74e4..b90162fe79929 100644 --- a/api_docs/kbn_core_i18n_browser.mdx +++ b/api_docs/kbn_core_i18n_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-browser title: "@kbn/core-i18n-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-browser plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-browser'] --- import kbnCoreI18nBrowserObj from './kbn_core_i18n_browser.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_browser_mocks.mdx b/api_docs/kbn_core_i18n_browser_mocks.mdx index a1b1a5ee73f81..4ca1604a45bf6 100644 --- a/api_docs/kbn_core_i18n_browser_mocks.mdx +++ b/api_docs/kbn_core_i18n_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-browser-mocks title: "@kbn/core-i18n-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-browser-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-browser-mocks'] --- import kbnCoreI18nBrowserMocksObj from './kbn_core_i18n_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_server.mdx b/api_docs/kbn_core_i18n_server.mdx index e4f9c9d8ce32d..e2f8e68a0267e 100644 --- a/api_docs/kbn_core_i18n_server.mdx +++ b/api_docs/kbn_core_i18n_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-server title: "@kbn/core-i18n-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-server plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server'] --- import kbnCoreI18nServerObj from './kbn_core_i18n_server.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_server_internal.mdx b/api_docs/kbn_core_i18n_server_internal.mdx index 967e3818da2cd..a63ab319f42fc 100644 --- a/api_docs/kbn_core_i18n_server_internal.mdx +++ b/api_docs/kbn_core_i18n_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-server-internal title: "@kbn/core-i18n-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-server-internal plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server-internal'] --- import kbnCoreI18nServerInternalObj from './kbn_core_i18n_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_server_mocks.mdx b/api_docs/kbn_core_i18n_server_mocks.mdx index 0cd9988bd09d8..e412fd0126725 100644 --- a/api_docs/kbn_core_i18n_server_mocks.mdx +++ b/api_docs/kbn_core_i18n_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-server-mocks title: "@kbn/core-i18n-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-server-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server-mocks'] --- import kbnCoreI18nServerMocksObj from './kbn_core_i18n_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_injected_metadata_browser_mocks.mdx b/api_docs/kbn_core_injected_metadata_browser_mocks.mdx index 9fc3f87791376..d94fda28bdd95 100644 --- a/api_docs/kbn_core_injected_metadata_browser_mocks.mdx +++ b/api_docs/kbn_core_injected_metadata_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-injected-metadata-browser-mocks title: "@kbn/core-injected-metadata-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-injected-metadata-browser-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-injected-metadata-browser-mocks'] --- import kbnCoreInjectedMetadataBrowserMocksObj from './kbn_core_injected_metadata_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_integrations_browser_internal.mdx b/api_docs/kbn_core_integrations_browser_internal.mdx index e7cd8fff569b8..a10c5a576a822 100644 --- a/api_docs/kbn_core_integrations_browser_internal.mdx +++ b/api_docs/kbn_core_integrations_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-integrations-browser-internal title: "@kbn/core-integrations-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-integrations-browser-internal plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-integrations-browser-internal'] --- import kbnCoreIntegrationsBrowserInternalObj from './kbn_core_integrations_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_integrations_browser_mocks.mdx b/api_docs/kbn_core_integrations_browser_mocks.mdx index fcf884317a858..4d7b95a0e38b0 100644 --- a/api_docs/kbn_core_integrations_browser_mocks.mdx +++ b/api_docs/kbn_core_integrations_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-integrations-browser-mocks title: "@kbn/core-integrations-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-integrations-browser-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-integrations-browser-mocks'] --- import kbnCoreIntegrationsBrowserMocksObj from './kbn_core_integrations_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_browser.mdx b/api_docs/kbn_core_lifecycle_browser.mdx index 2b67bbdfef0f3..867677a071acb 100644 --- a/api_docs/kbn_core_lifecycle_browser.mdx +++ b/api_docs/kbn_core_lifecycle_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-browser title: "@kbn/core-lifecycle-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-browser plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-browser'] --- import kbnCoreLifecycleBrowserObj from './kbn_core_lifecycle_browser.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_browser_mocks.mdx b/api_docs/kbn_core_lifecycle_browser_mocks.mdx index ff6619e68a90e..feb5a7781f8a7 100644 --- a/api_docs/kbn_core_lifecycle_browser_mocks.mdx +++ b/api_docs/kbn_core_lifecycle_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-browser-mocks title: "@kbn/core-lifecycle-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-browser-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-browser-mocks'] --- import kbnCoreLifecycleBrowserMocksObj from './kbn_core_lifecycle_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_server.mdx b/api_docs/kbn_core_lifecycle_server.mdx index 58e8301155ce7..aebc155848904 100644 --- a/api_docs/kbn_core_lifecycle_server.mdx +++ b/api_docs/kbn_core_lifecycle_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-server title: "@kbn/core-lifecycle-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-server plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-server'] --- import kbnCoreLifecycleServerObj from './kbn_core_lifecycle_server.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_server_mocks.mdx b/api_docs/kbn_core_lifecycle_server_mocks.mdx index 7e19cb3cc2e56..1ea2fe63fb02e 100644 --- a/api_docs/kbn_core_lifecycle_server_mocks.mdx +++ b/api_docs/kbn_core_lifecycle_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-server-mocks title: "@kbn/core-lifecycle-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-server-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-server-mocks'] --- import kbnCoreLifecycleServerMocksObj from './kbn_core_lifecycle_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_logging_browser_mocks.mdx b/api_docs/kbn_core_logging_browser_mocks.mdx index 8ffda5e933dd0..ef62526bb8afa 100644 --- a/api_docs/kbn_core_logging_browser_mocks.mdx +++ b/api_docs/kbn_core_logging_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-browser-mocks title: "@kbn/core-logging-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-browser-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-browser-mocks'] --- import kbnCoreLoggingBrowserMocksObj from './kbn_core_logging_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_logging_common_internal.mdx b/api_docs/kbn_core_logging_common_internal.mdx index 0d751c4eacee4..9a7a2c2da6ab9 100644 --- a/api_docs/kbn_core_logging_common_internal.mdx +++ b/api_docs/kbn_core_logging_common_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-common-internal title: "@kbn/core-logging-common-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-common-internal plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-common-internal'] --- import kbnCoreLoggingCommonInternalObj from './kbn_core_logging_common_internal.devdocs.json'; diff --git a/api_docs/kbn_core_logging_server.mdx b/api_docs/kbn_core_logging_server.mdx index f7eea671193a5..c05a58a83e904 100644 --- a/api_docs/kbn_core_logging_server.mdx +++ b/api_docs/kbn_core_logging_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server title: "@kbn/core-logging-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-server plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server'] --- import kbnCoreLoggingServerObj from './kbn_core_logging_server.devdocs.json'; diff --git a/api_docs/kbn_core_logging_server_internal.mdx b/api_docs/kbn_core_logging_server_internal.mdx index 59810fdc020a1..003292be5967d 100644 --- a/api_docs/kbn_core_logging_server_internal.mdx +++ b/api_docs/kbn_core_logging_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server-internal title: "@kbn/core-logging-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-server-internal plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server-internal'] --- import kbnCoreLoggingServerInternalObj from './kbn_core_logging_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_logging_server_mocks.mdx b/api_docs/kbn_core_logging_server_mocks.mdx index 18ce627e174c7..cca8c1f8891c9 100644 --- a/api_docs/kbn_core_logging_server_mocks.mdx +++ b/api_docs/kbn_core_logging_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server-mocks title: "@kbn/core-logging-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-server-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server-mocks'] --- import kbnCoreLoggingServerMocksObj from './kbn_core_logging_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_collectors_server_internal.mdx b/api_docs/kbn_core_metrics_collectors_server_internal.mdx index acdb7a6f80f81..6bf06ea54ca6d 100644 --- a/api_docs/kbn_core_metrics_collectors_server_internal.mdx +++ b/api_docs/kbn_core_metrics_collectors_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-collectors-server-internal title: "@kbn/core-metrics-collectors-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-collectors-server-internal plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-collectors-server-internal'] --- import kbnCoreMetricsCollectorsServerInternalObj from './kbn_core_metrics_collectors_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_collectors_server_mocks.mdx b/api_docs/kbn_core_metrics_collectors_server_mocks.mdx index 781d8d0e7bfc9..b37bfc92f14a4 100644 --- a/api_docs/kbn_core_metrics_collectors_server_mocks.mdx +++ b/api_docs/kbn_core_metrics_collectors_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-collectors-server-mocks title: "@kbn/core-metrics-collectors-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-collectors-server-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-collectors-server-mocks'] --- import kbnCoreMetricsCollectorsServerMocksObj from './kbn_core_metrics_collectors_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_server.mdx b/api_docs/kbn_core_metrics_server.mdx index 4a8d098e4b3ef..e911a4cd05635 100644 --- a/api_docs/kbn_core_metrics_server.mdx +++ b/api_docs/kbn_core_metrics_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server title: "@kbn/core-metrics-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-server plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-server'] --- import kbnCoreMetricsServerObj from './kbn_core_metrics_server.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_server_internal.mdx b/api_docs/kbn_core_metrics_server_internal.mdx index 3ddacbedc2361..f94ad18b01575 100644 --- a/api_docs/kbn_core_metrics_server_internal.mdx +++ b/api_docs/kbn_core_metrics_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server-internal title: "@kbn/core-metrics-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-server-internal plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-server-internal'] --- import kbnCoreMetricsServerInternalObj from './kbn_core_metrics_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_server_mocks.mdx b/api_docs/kbn_core_metrics_server_mocks.mdx index 3669f9737a97b..7679f3b4e6f18 100644 --- a/api_docs/kbn_core_metrics_server_mocks.mdx +++ b/api_docs/kbn_core_metrics_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server-mocks title: "@kbn/core-metrics-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-server-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-server-mocks'] --- import kbnCoreMetricsServerMocksObj from './kbn_core_metrics_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_mount_utils_browser.mdx b/api_docs/kbn_core_mount_utils_browser.mdx index 9ef9a473b5cc4..15f377a744ddc 100644 --- a/api_docs/kbn_core_mount_utils_browser.mdx +++ b/api_docs/kbn_core_mount_utils_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-mount-utils-browser title: "@kbn/core-mount-utils-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-mount-utils-browser plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-mount-utils-browser'] --- import kbnCoreMountUtilsBrowserObj from './kbn_core_mount_utils_browser.devdocs.json'; diff --git a/api_docs/kbn_core_node_server.mdx b/api_docs/kbn_core_node_server.mdx index 5d9e63d8d6b52..d380a027592c9 100644 --- a/api_docs/kbn_core_node_server.mdx +++ b/api_docs/kbn_core_node_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server title: "@kbn/core-node-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-node-server plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server'] --- import kbnCoreNodeServerObj from './kbn_core_node_server.devdocs.json'; diff --git a/api_docs/kbn_core_node_server_internal.mdx b/api_docs/kbn_core_node_server_internal.mdx index 0d035650607a0..2d9d9c01ddcc3 100644 --- a/api_docs/kbn_core_node_server_internal.mdx +++ b/api_docs/kbn_core_node_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server-internal title: "@kbn/core-node-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-node-server-internal plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server-internal'] --- import kbnCoreNodeServerInternalObj from './kbn_core_node_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_node_server_mocks.mdx b/api_docs/kbn_core_node_server_mocks.mdx index 9fae27a83c9ec..c3c0633513f8e 100644 --- a/api_docs/kbn_core_node_server_mocks.mdx +++ b/api_docs/kbn_core_node_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server-mocks title: "@kbn/core-node-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-node-server-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server-mocks'] --- import kbnCoreNodeServerMocksObj from './kbn_core_node_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_notifications_browser.mdx b/api_docs/kbn_core_notifications_browser.mdx index 00fa34165bd10..a30ae302b1bfc 100644 --- a/api_docs/kbn_core_notifications_browser.mdx +++ b/api_docs/kbn_core_notifications_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser title: "@kbn/core-notifications-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-notifications-browser plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-notifications-browser'] --- import kbnCoreNotificationsBrowserObj from './kbn_core_notifications_browser.devdocs.json'; diff --git a/api_docs/kbn_core_notifications_browser_internal.mdx b/api_docs/kbn_core_notifications_browser_internal.mdx index fa34844c362dd..5628e2280c9fe 100644 --- a/api_docs/kbn_core_notifications_browser_internal.mdx +++ b/api_docs/kbn_core_notifications_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser-internal title: "@kbn/core-notifications-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-notifications-browser-internal plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-notifications-browser-internal'] --- import kbnCoreNotificationsBrowserInternalObj from './kbn_core_notifications_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_notifications_browser_mocks.mdx b/api_docs/kbn_core_notifications_browser_mocks.mdx index 8d06eff8a8d3b..38b7166253617 100644 --- a/api_docs/kbn_core_notifications_browser_mocks.mdx +++ b/api_docs/kbn_core_notifications_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser-mocks title: "@kbn/core-notifications-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-notifications-browser-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-notifications-browser-mocks'] --- import kbnCoreNotificationsBrowserMocksObj from './kbn_core_notifications_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_overlays_browser.mdx b/api_docs/kbn_core_overlays_browser.mdx index 2db9e8629db0d..69100a4d0e5b3 100644 --- a/api_docs/kbn_core_overlays_browser.mdx +++ b/api_docs/kbn_core_overlays_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser title: "@kbn/core-overlays-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-overlays-browser plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-overlays-browser'] --- import kbnCoreOverlaysBrowserObj from './kbn_core_overlays_browser.devdocs.json'; diff --git a/api_docs/kbn_core_overlays_browser_internal.mdx b/api_docs/kbn_core_overlays_browser_internal.mdx index 96b8508ef817a..a966cd655e0dd 100644 --- a/api_docs/kbn_core_overlays_browser_internal.mdx +++ b/api_docs/kbn_core_overlays_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser-internal title: "@kbn/core-overlays-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-overlays-browser-internal plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-overlays-browser-internal'] --- import kbnCoreOverlaysBrowserInternalObj from './kbn_core_overlays_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_overlays_browser_mocks.mdx b/api_docs/kbn_core_overlays_browser_mocks.mdx index 80e3edfcdce53..5e2c6240742fe 100644 --- a/api_docs/kbn_core_overlays_browser_mocks.mdx +++ b/api_docs/kbn_core_overlays_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser-mocks title: "@kbn/core-overlays-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-overlays-browser-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-overlays-browser-mocks'] --- import kbnCoreOverlaysBrowserMocksObj from './kbn_core_overlays_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_browser.mdx b/api_docs/kbn_core_plugins_browser.mdx index 0ae2258cf2e20..d7d13c696d7a9 100644 --- a/api_docs/kbn_core_plugins_browser.mdx +++ b/api_docs/kbn_core_plugins_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-browser title: "@kbn/core-plugins-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-browser plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-browser'] --- import kbnCorePluginsBrowserObj from './kbn_core_plugins_browser.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_browser_mocks.mdx b/api_docs/kbn_core_plugins_browser_mocks.mdx index 62d085ce906da..c87671079f648 100644 --- a/api_docs/kbn_core_plugins_browser_mocks.mdx +++ b/api_docs/kbn_core_plugins_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-browser-mocks title: "@kbn/core-plugins-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-browser-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-browser-mocks'] --- import kbnCorePluginsBrowserMocksObj from './kbn_core_plugins_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_contracts_browser.mdx b/api_docs/kbn_core_plugins_contracts_browser.mdx index 404958def29e5..1df4f562c06e1 100644 --- a/api_docs/kbn_core_plugins_contracts_browser.mdx +++ b/api_docs/kbn_core_plugins_contracts_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-contracts-browser title: "@kbn/core-plugins-contracts-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-contracts-browser plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-contracts-browser'] --- import kbnCorePluginsContractsBrowserObj from './kbn_core_plugins_contracts_browser.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_contracts_server.mdx b/api_docs/kbn_core_plugins_contracts_server.mdx index 57d1852fede27..04897c91207ff 100644 --- a/api_docs/kbn_core_plugins_contracts_server.mdx +++ b/api_docs/kbn_core_plugins_contracts_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-contracts-server title: "@kbn/core-plugins-contracts-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-contracts-server plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-contracts-server'] --- import kbnCorePluginsContractsServerObj from './kbn_core_plugins_contracts_server.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_server.mdx b/api_docs/kbn_core_plugins_server.mdx index eac8341e5fc91..ad119fc4c3719 100644 --- a/api_docs/kbn_core_plugins_server.mdx +++ b/api_docs/kbn_core_plugins_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-server title: "@kbn/core-plugins-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-server plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-server'] --- import kbnCorePluginsServerObj from './kbn_core_plugins_server.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_server_mocks.mdx b/api_docs/kbn_core_plugins_server_mocks.mdx index 9ff5c928ee676..09032e14786f9 100644 --- a/api_docs/kbn_core_plugins_server_mocks.mdx +++ b/api_docs/kbn_core_plugins_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-server-mocks title: "@kbn/core-plugins-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-server-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-server-mocks'] --- import kbnCorePluginsServerMocksObj from './kbn_core_plugins_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_preboot_server.mdx b/api_docs/kbn_core_preboot_server.mdx index 745ff0dffef1c..6afb7ef4cc1f2 100644 --- a/api_docs/kbn_core_preboot_server.mdx +++ b/api_docs/kbn_core_preboot_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-preboot-server title: "@kbn/core-preboot-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-preboot-server plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-preboot-server'] --- import kbnCorePrebootServerObj from './kbn_core_preboot_server.devdocs.json'; diff --git a/api_docs/kbn_core_preboot_server_mocks.mdx b/api_docs/kbn_core_preboot_server_mocks.mdx index 9af6460eb7a56..6023d27d2b9bb 100644 --- a/api_docs/kbn_core_preboot_server_mocks.mdx +++ b/api_docs/kbn_core_preboot_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-preboot-server-mocks title: "@kbn/core-preboot-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-preboot-server-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-preboot-server-mocks'] --- import kbnCorePrebootServerMocksObj from './kbn_core_preboot_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_rendering_browser_mocks.mdx b/api_docs/kbn_core_rendering_browser_mocks.mdx index 096d66ac736a0..63d89135d4051 100644 --- a/api_docs/kbn_core_rendering_browser_mocks.mdx +++ b/api_docs/kbn_core_rendering_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-browser-mocks title: "@kbn/core-rendering-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-rendering-browser-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-browser-mocks'] --- import kbnCoreRenderingBrowserMocksObj from './kbn_core_rendering_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_rendering_server_internal.mdx b/api_docs/kbn_core_rendering_server_internal.mdx index 73ad7bdfadde2..e6ca382897510 100644 --- a/api_docs/kbn_core_rendering_server_internal.mdx +++ b/api_docs/kbn_core_rendering_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-server-internal title: "@kbn/core-rendering-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-rendering-server-internal plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-server-internal'] --- import kbnCoreRenderingServerInternalObj from './kbn_core_rendering_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_rendering_server_mocks.mdx b/api_docs/kbn_core_rendering_server_mocks.mdx index 279401476bc15..1a7e2af58b5dc 100644 --- a/api_docs/kbn_core_rendering_server_mocks.mdx +++ b/api_docs/kbn_core_rendering_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-server-mocks title: "@kbn/core-rendering-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-rendering-server-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-server-mocks'] --- import kbnCoreRenderingServerMocksObj from './kbn_core_rendering_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_root_server_internal.devdocs.json b/api_docs/kbn_core_root_server_internal.devdocs.json index c5af081041ed3..e6a2510e0c9e3 100644 --- a/api_docs/kbn_core_root_server_internal.devdocs.json +++ b/api_docs/kbn_core_root_server_internal.devdocs.json @@ -135,7 +135,7 @@ "signature": [ "() => Promise<", "InternalCorePreboot", - ">" + " | undefined>" ], "path": "packages/core/root/core-root-server-internal/src/root/index.ts", "deprecated": false, @@ -337,7 +337,7 @@ "signature": [ "() => Promise<", "InternalCorePreboot", - ">" + " | undefined>" ], "path": "packages/core/root/core-root-server-internal/src/server.ts", "deprecated": false, diff --git a/api_docs/kbn_core_root_server_internal.mdx b/api_docs/kbn_core_root_server_internal.mdx index 8a963e7013b69..cbfe887985b55 100644 --- a/api_docs/kbn_core_root_server_internal.mdx +++ b/api_docs/kbn_core_root_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-root-server-internal title: "@kbn/core-root-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-root-server-internal plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-root-server-internal'] --- import kbnCoreRootServerInternalObj from './kbn_core_root_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_browser.mdx b/api_docs/kbn_core_saved_objects_api_browser.mdx index 658e7c7263886..586ee50a0d396 100644 --- a/api_docs/kbn_core_saved_objects_api_browser.mdx +++ b/api_docs/kbn_core_saved_objects_api_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-browser title: "@kbn/core-saved-objects-api-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-browser plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-browser'] --- import kbnCoreSavedObjectsApiBrowserObj from './kbn_core_saved_objects_api_browser.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_server.mdx b/api_docs/kbn_core_saved_objects_api_server.mdx index aa923151b7ab7..1207c3e8f5645 100644 --- a/api_docs/kbn_core_saved_objects_api_server.mdx +++ b/api_docs/kbn_core_saved_objects_api_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-server title: "@kbn/core-saved-objects-api-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-server plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-server'] --- import kbnCoreSavedObjectsApiServerObj from './kbn_core_saved_objects_api_server.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_server_mocks.mdx b/api_docs/kbn_core_saved_objects_api_server_mocks.mdx index 51b4f68cd7d66..567f71ec87326 100644 --- a/api_docs/kbn_core_saved_objects_api_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_api_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-server-mocks title: "@kbn/core-saved-objects-api-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-server-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-server-mocks'] --- import kbnCoreSavedObjectsApiServerMocksObj from './kbn_core_saved_objects_api_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_base_server_internal.mdx b/api_docs/kbn_core_saved_objects_base_server_internal.mdx index 1b495e1adad59..8aefed99587c2 100644 --- a/api_docs/kbn_core_saved_objects_base_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_base_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-base-server-internal title: "@kbn/core-saved-objects-base-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-base-server-internal plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-base-server-internal'] --- import kbnCoreSavedObjectsBaseServerInternalObj from './kbn_core_saved_objects_base_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_base_server_mocks.mdx b/api_docs/kbn_core_saved_objects_base_server_mocks.mdx index e843592fdff0e..30923673bdca5 100644 --- a/api_docs/kbn_core_saved_objects_base_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_base_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-base-server-mocks title: "@kbn/core-saved-objects-base-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-base-server-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-base-server-mocks'] --- import kbnCoreSavedObjectsBaseServerMocksObj from './kbn_core_saved_objects_base_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_browser.mdx b/api_docs/kbn_core_saved_objects_browser.mdx index 3b51357fbee81..8d4efee9a284b 100644 --- a/api_docs/kbn_core_saved_objects_browser.mdx +++ b/api_docs/kbn_core_saved_objects_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser title: "@kbn/core-saved-objects-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-browser plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser'] --- import kbnCoreSavedObjectsBrowserObj from './kbn_core_saved_objects_browser.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_browser_internal.mdx b/api_docs/kbn_core_saved_objects_browser_internal.mdx index 6a8e2a8d2d977..f291976560112 100644 --- a/api_docs/kbn_core_saved_objects_browser_internal.mdx +++ b/api_docs/kbn_core_saved_objects_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser-internal title: "@kbn/core-saved-objects-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-browser-internal plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser-internal'] --- import kbnCoreSavedObjectsBrowserInternalObj from './kbn_core_saved_objects_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_browser_mocks.mdx b/api_docs/kbn_core_saved_objects_browser_mocks.mdx index 5bf545d0914a6..9289546b9a83d 100644 --- a/api_docs/kbn_core_saved_objects_browser_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser-mocks title: "@kbn/core-saved-objects-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-browser-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser-mocks'] --- import kbnCoreSavedObjectsBrowserMocksObj from './kbn_core_saved_objects_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_common.mdx b/api_docs/kbn_core_saved_objects_common.mdx index 370789cb2b6fd..37ceb1fb4e583 100644 --- a/api_docs/kbn_core_saved_objects_common.mdx +++ b/api_docs/kbn_core_saved_objects_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-common title: "@kbn/core-saved-objects-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-common plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-common'] --- import kbnCoreSavedObjectsCommonObj from './kbn_core_saved_objects_common.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx b/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx index 2314bb6700fa7..b40f81af5c941 100644 --- a/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-import-export-server-internal title: "@kbn/core-saved-objects-import-export-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-import-export-server-internal plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-import-export-server-internal'] --- import kbnCoreSavedObjectsImportExportServerInternalObj from './kbn_core_saved_objects_import_export_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx b/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx index 5666b77cd08c5..b975b02f883e2 100644 --- a/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-import-export-server-mocks title: "@kbn/core-saved-objects-import-export-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-import-export-server-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-import-export-server-mocks'] --- import kbnCoreSavedObjectsImportExportServerMocksObj from './kbn_core_saved_objects_import_export_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_migration_server_internal.devdocs.json b/api_docs/kbn_core_saved_objects_migration_server_internal.devdocs.json index beff4bb8eaf4f..a1a5638f699bc 100644 --- a/api_docs/kbn_core_saved_objects_migration_server_internal.devdocs.json +++ b/api_docs/kbn_core_saved_objects_migration_server_internal.devdocs.json @@ -2391,7 +2391,39 @@ "label": "client", "description": [], "signature": [ - "{ create: { (this: That, params: ", + "{ search: { >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "SearchResponse", + ">; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "SearchResponse", + ", unknown>>; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "SearchResponse", + ">; }; create: { (this: That, params: ", "CreateRequest", " | ", "CreateRequest", @@ -2495,39 +2527,7 @@ "TransportRequestOptions", " | undefined): Promise<", "WriteResponseBase", - ">; }; search: { >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptionsWithOutMeta", - " | undefined): Promise<", - "SearchResponse", - ">; >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptionsWithMeta", - " | undefined): Promise<", - "TransportResult", - "<", - "SearchResponse", - ", unknown>>; >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptions", - " | undefined): Promise<", - "SearchResponse", - ">; }; helpers: ", + ">; }; helpers: ", "default", "; name: string | symbol; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kEsql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kInference]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kQueryRuleset]: symbol | null; [kRollup]: symbol | null; [kSearchApplication]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kSynonyms]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", "default", diff --git a/api_docs/kbn_core_saved_objects_migration_server_internal.mdx b/api_docs/kbn_core_saved_objects_migration_server_internal.mdx index 7c527e3009989..d69217b5ea93c 100644 --- a/api_docs/kbn_core_saved_objects_migration_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_migration_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-migration-server-internal title: "@kbn/core-saved-objects-migration-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-migration-server-internal plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-migration-server-internal'] --- import kbnCoreSavedObjectsMigrationServerInternalObj from './kbn_core_saved_objects_migration_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx b/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx index 6708ea4849a36..805ff905c1b35 100644 --- a/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-migration-server-mocks title: "@kbn/core-saved-objects-migration-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-migration-server-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-migration-server-mocks'] --- import kbnCoreSavedObjectsMigrationServerMocksObj from './kbn_core_saved_objects_migration_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_server.mdx b/api_docs/kbn_core_saved_objects_server.mdx index a08bea86a16f1..c8d11ae995309 100644 --- a/api_docs/kbn_core_saved_objects_server.mdx +++ b/api_docs/kbn_core_saved_objects_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server title: "@kbn/core-saved-objects-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-server plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-server'] --- import kbnCoreSavedObjectsServerObj from './kbn_core_saved_objects_server.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_server_internal.mdx b/api_docs/kbn_core_saved_objects_server_internal.mdx index 77e24106bab93..c124a53a479e0 100644 --- a/api_docs/kbn_core_saved_objects_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server-internal title: "@kbn/core-saved-objects-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-server-internal plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-server-internal'] --- import kbnCoreSavedObjectsServerInternalObj from './kbn_core_saved_objects_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_server_mocks.mdx b/api_docs/kbn_core_saved_objects_server_mocks.mdx index 47ddcf0541a25..2b649abbc0fee 100644 --- a/api_docs/kbn_core_saved_objects_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server-mocks title: "@kbn/core-saved-objects-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-server-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-server-mocks'] --- import kbnCoreSavedObjectsServerMocksObj from './kbn_core_saved_objects_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_utils_server.mdx b/api_docs/kbn_core_saved_objects_utils_server.mdx index ab1a3c3a72665..efd7574507424 100644 --- a/api_docs/kbn_core_saved_objects_utils_server.mdx +++ b/api_docs/kbn_core_saved_objects_utils_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-utils-server title: "@kbn/core-saved-objects-utils-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-utils-server plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-utils-server'] --- import kbnCoreSavedObjectsUtilsServerObj from './kbn_core_saved_objects_utils_server.devdocs.json'; diff --git a/api_docs/kbn_core_security_browser.mdx b/api_docs/kbn_core_security_browser.mdx index e586fed1d8faf..349f1dc86ee2f 100644 --- a/api_docs/kbn_core_security_browser.mdx +++ b/api_docs/kbn_core_security_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-browser title: "@kbn/core-security-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-browser plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-browser'] --- import kbnCoreSecurityBrowserObj from './kbn_core_security_browser.devdocs.json'; diff --git a/api_docs/kbn_core_security_browser_internal.mdx b/api_docs/kbn_core_security_browser_internal.mdx index 09b7348ef796c..2deade2130ec9 100644 --- a/api_docs/kbn_core_security_browser_internal.mdx +++ b/api_docs/kbn_core_security_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-browser-internal title: "@kbn/core-security-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-browser-internal plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-browser-internal'] --- import kbnCoreSecurityBrowserInternalObj from './kbn_core_security_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_security_browser_mocks.mdx b/api_docs/kbn_core_security_browser_mocks.mdx index 93f7d495e1847..5ea904f08562f 100644 --- a/api_docs/kbn_core_security_browser_mocks.mdx +++ b/api_docs/kbn_core_security_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-browser-mocks title: "@kbn/core-security-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-browser-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-browser-mocks'] --- import kbnCoreSecurityBrowserMocksObj from './kbn_core_security_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_security_common.mdx b/api_docs/kbn_core_security_common.mdx index 0af414220cfc0..fa528398fc8f4 100644 --- a/api_docs/kbn_core_security_common.mdx +++ b/api_docs/kbn_core_security_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-common title: "@kbn/core-security-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-common plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-common'] --- import kbnCoreSecurityCommonObj from './kbn_core_security_common.devdocs.json'; diff --git a/api_docs/kbn_core_security_server.mdx b/api_docs/kbn_core_security_server.mdx index 6a5ba2bd049a5..a07f37088667a 100644 --- a/api_docs/kbn_core_security_server.mdx +++ b/api_docs/kbn_core_security_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-server title: "@kbn/core-security-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-server plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-server'] --- import kbnCoreSecurityServerObj from './kbn_core_security_server.devdocs.json'; diff --git a/api_docs/kbn_core_security_server_internal.mdx b/api_docs/kbn_core_security_server_internal.mdx index a43622a9cad38..77dfba4fa219d 100644 --- a/api_docs/kbn_core_security_server_internal.mdx +++ b/api_docs/kbn_core_security_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-server-internal title: "@kbn/core-security-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-server-internal plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-server-internal'] --- import kbnCoreSecurityServerInternalObj from './kbn_core_security_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_security_server_mocks.mdx b/api_docs/kbn_core_security_server_mocks.mdx index 396e34dec7f5b..bb07555050bbc 100644 --- a/api_docs/kbn_core_security_server_mocks.mdx +++ b/api_docs/kbn_core_security_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-server-mocks title: "@kbn/core-security-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-server-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-server-mocks'] --- import kbnCoreSecurityServerMocksObj from './kbn_core_security_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_status_common.mdx b/api_docs/kbn_core_status_common.mdx index 99b844b5ab2e0..a0f99cf794265 100644 --- a/api_docs/kbn_core_status_common.mdx +++ b/api_docs/kbn_core_status_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-common title: "@kbn/core-status-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-common plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-common'] --- import kbnCoreStatusCommonObj from './kbn_core_status_common.devdocs.json'; diff --git a/api_docs/kbn_core_status_common_internal.mdx b/api_docs/kbn_core_status_common_internal.mdx index 41bd8658e6aab..6ad42b8d42f44 100644 --- a/api_docs/kbn_core_status_common_internal.mdx +++ b/api_docs/kbn_core_status_common_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-common-internal title: "@kbn/core-status-common-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-common-internal plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-common-internal'] --- import kbnCoreStatusCommonInternalObj from './kbn_core_status_common_internal.devdocs.json'; diff --git a/api_docs/kbn_core_status_server.mdx b/api_docs/kbn_core_status_server.mdx index 2f01c8404d194..a82c8b4420b84 100644 --- a/api_docs/kbn_core_status_server.mdx +++ b/api_docs/kbn_core_status_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-server title: "@kbn/core-status-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-server plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-server'] --- import kbnCoreStatusServerObj from './kbn_core_status_server.devdocs.json'; diff --git a/api_docs/kbn_core_status_server_internal.mdx b/api_docs/kbn_core_status_server_internal.mdx index 55b56a9f92572..6e4d2836a6455 100644 --- a/api_docs/kbn_core_status_server_internal.mdx +++ b/api_docs/kbn_core_status_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-server-internal title: "@kbn/core-status-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-server-internal plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-server-internal'] --- import kbnCoreStatusServerInternalObj from './kbn_core_status_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_status_server_mocks.mdx b/api_docs/kbn_core_status_server_mocks.mdx index 477c360be939c..710b0e0223449 100644 --- a/api_docs/kbn_core_status_server_mocks.mdx +++ b/api_docs/kbn_core_status_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-server-mocks title: "@kbn/core-status-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-server-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-server-mocks'] --- import kbnCoreStatusServerMocksObj from './kbn_core_status_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_deprecations_getters.mdx b/api_docs/kbn_core_test_helpers_deprecations_getters.mdx index 74bc82d4dd876..6e854a4666d8e 100644 --- a/api_docs/kbn_core_test_helpers_deprecations_getters.mdx +++ b/api_docs/kbn_core_test_helpers_deprecations_getters.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-deprecations-getters title: "@kbn/core-test-helpers-deprecations-getters" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-deprecations-getters plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-deprecations-getters'] --- import kbnCoreTestHelpersDeprecationsGettersObj from './kbn_core_test_helpers_deprecations_getters.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_http_setup_browser.mdx b/api_docs/kbn_core_test_helpers_http_setup_browser.mdx index bb7bf6c0c6afb..3d4d4bff4db1c 100644 --- a/api_docs/kbn_core_test_helpers_http_setup_browser.mdx +++ b/api_docs/kbn_core_test_helpers_http_setup_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-http-setup-browser title: "@kbn/core-test-helpers-http-setup-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-http-setup-browser plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-http-setup-browser'] --- import kbnCoreTestHelpersHttpSetupBrowserObj from './kbn_core_test_helpers_http_setup_browser.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_kbn_server.mdx b/api_docs/kbn_core_test_helpers_kbn_server.mdx index 3707271527b54..8210e49857e1d 100644 --- a/api_docs/kbn_core_test_helpers_kbn_server.mdx +++ b/api_docs/kbn_core_test_helpers_kbn_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-kbn-server title: "@kbn/core-test-helpers-kbn-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-kbn-server plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-kbn-server'] --- import kbnCoreTestHelpersKbnServerObj from './kbn_core_test_helpers_kbn_server.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_model_versions.mdx b/api_docs/kbn_core_test_helpers_model_versions.mdx index 733af81309140..5619d86690a06 100644 --- a/api_docs/kbn_core_test_helpers_model_versions.mdx +++ b/api_docs/kbn_core_test_helpers_model_versions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-model-versions title: "@kbn/core-test-helpers-model-versions" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-model-versions plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-model-versions'] --- import kbnCoreTestHelpersModelVersionsObj from './kbn_core_test_helpers_model_versions.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_so_type_serializer.mdx b/api_docs/kbn_core_test_helpers_so_type_serializer.mdx index 9e821753b66c9..9dd993cfb1d05 100644 --- a/api_docs/kbn_core_test_helpers_so_type_serializer.mdx +++ b/api_docs/kbn_core_test_helpers_so_type_serializer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-so-type-serializer title: "@kbn/core-test-helpers-so-type-serializer" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-so-type-serializer plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-so-type-serializer'] --- import kbnCoreTestHelpersSoTypeSerializerObj from './kbn_core_test_helpers_so_type_serializer.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_test_utils.mdx b/api_docs/kbn_core_test_helpers_test_utils.mdx index 431321822d690..18120c8ca5b9a 100644 --- a/api_docs/kbn_core_test_helpers_test_utils.mdx +++ b/api_docs/kbn_core_test_helpers_test_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-test-utils title: "@kbn/core-test-helpers-test-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-test-utils plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-test-utils'] --- import kbnCoreTestHelpersTestUtilsObj from './kbn_core_test_helpers_test_utils.devdocs.json'; diff --git a/api_docs/kbn_core_theme_browser.mdx b/api_docs/kbn_core_theme_browser.mdx index c7e1e85f12d61..b23668696e60f 100644 --- a/api_docs/kbn_core_theme_browser.mdx +++ b/api_docs/kbn_core_theme_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser title: "@kbn/core-theme-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-theme-browser plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser'] --- import kbnCoreThemeBrowserObj from './kbn_core_theme_browser.devdocs.json'; diff --git a/api_docs/kbn_core_theme_browser_mocks.mdx b/api_docs/kbn_core_theme_browser_mocks.mdx index fdb98aa7d5b44..52c917623937d 100644 --- a/api_docs/kbn_core_theme_browser_mocks.mdx +++ b/api_docs/kbn_core_theme_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser-mocks title: "@kbn/core-theme-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-theme-browser-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser-mocks'] --- import kbnCoreThemeBrowserMocksObj from './kbn_core_theme_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_browser.devdocs.json b/api_docs/kbn_core_ui_settings_browser.devdocs.json index 8165f9a3c7ea9..5514115a6eb09 100644 --- a/api_docs/kbn_core_ui_settings_browser.devdocs.json +++ b/api_docs/kbn_core_ui_settings_browser.devdocs.json @@ -597,7 +597,7 @@ "section": "def-common.UiSettingsType", "text": "UiSettingsType" }, - " | undefined; options?: string[] | number[] | undefined; value?: unknown; scope?: ", + " | undefined; value?: unknown; options?: string[] | number[] | undefined; scope?: ", { "pluginId": "@kbn/core-ui-settings-common", "scope": "common", diff --git a/api_docs/kbn_core_ui_settings_browser.mdx b/api_docs/kbn_core_ui_settings_browser.mdx index fa1f6d0278e70..252bffee7d24c 100644 --- a/api_docs/kbn_core_ui_settings_browser.mdx +++ b/api_docs/kbn_core_ui_settings_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser title: "@kbn/core-ui-settings-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-browser plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser'] --- import kbnCoreUiSettingsBrowserObj from './kbn_core_ui_settings_browser.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_browser_internal.mdx b/api_docs/kbn_core_ui_settings_browser_internal.mdx index 1ca7ab16c45d5..0fbd695414548 100644 --- a/api_docs/kbn_core_ui_settings_browser_internal.mdx +++ b/api_docs/kbn_core_ui_settings_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser-internal title: "@kbn/core-ui-settings-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-browser-internal plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser-internal'] --- import kbnCoreUiSettingsBrowserInternalObj from './kbn_core_ui_settings_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_browser_mocks.mdx b/api_docs/kbn_core_ui_settings_browser_mocks.mdx index 1696f28e6b22e..0492af0c6017e 100644 --- a/api_docs/kbn_core_ui_settings_browser_mocks.mdx +++ b/api_docs/kbn_core_ui_settings_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser-mocks title: "@kbn/core-ui-settings-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-browser-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser-mocks'] --- import kbnCoreUiSettingsBrowserMocksObj from './kbn_core_ui_settings_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_common.devdocs.json b/api_docs/kbn_core_ui_settings_common.devdocs.json index 6d75b9f2ec730..55ace6dd5b9ff 100644 --- a/api_docs/kbn_core_ui_settings_common.devdocs.json +++ b/api_docs/kbn_core_ui_settings_common.devdocs.json @@ -554,7 +554,7 @@ "\nDenotes the scope of the setting" ], "signature": [ - "\"global\" | \"namespace\"" + "\"namespace\" | \"global\"" ], "path": "packages/core/ui-settings/core-ui-settings-common/src/ui_settings.ts", "deprecated": false, diff --git a/api_docs/kbn_core_ui_settings_common.mdx b/api_docs/kbn_core_ui_settings_common.mdx index 4c16fbfebedff..953357af496e5 100644 --- a/api_docs/kbn_core_ui_settings_common.mdx +++ b/api_docs/kbn_core_ui_settings_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-common title: "@kbn/core-ui-settings-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-common plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-common'] --- import kbnCoreUiSettingsCommonObj from './kbn_core_ui_settings_common.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_server.mdx b/api_docs/kbn_core_ui_settings_server.mdx index 746def6720998..4ff71fbef5c2d 100644 --- a/api_docs/kbn_core_ui_settings_server.mdx +++ b/api_docs/kbn_core_ui_settings_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-server title: "@kbn/core-ui-settings-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-server plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server'] --- import kbnCoreUiSettingsServerObj from './kbn_core_ui_settings_server.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_server_internal.mdx b/api_docs/kbn_core_ui_settings_server_internal.mdx index 8a8a3745410ca..882f5e32c0281 100644 --- a/api_docs/kbn_core_ui_settings_server_internal.mdx +++ b/api_docs/kbn_core_ui_settings_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-server-internal title: "@kbn/core-ui-settings-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-server-internal plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server-internal'] --- import kbnCoreUiSettingsServerInternalObj from './kbn_core_ui_settings_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_server_mocks.mdx b/api_docs/kbn_core_ui_settings_server_mocks.mdx index 5bbf4dacb05a6..83d81a12af3d3 100644 --- a/api_docs/kbn_core_ui_settings_server_mocks.mdx +++ b/api_docs/kbn_core_ui_settings_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-server-mocks title: "@kbn/core-ui-settings-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-server-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server-mocks'] --- import kbnCoreUiSettingsServerMocksObj from './kbn_core_ui_settings_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_usage_data_server.mdx b/api_docs/kbn_core_usage_data_server.mdx index f7b51b8ab621a..ae6575f6957b5 100644 --- a/api_docs/kbn_core_usage_data_server.mdx +++ b/api_docs/kbn_core_usage_data_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server title: "@kbn/core-usage-data-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-usage-data-server plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server'] --- import kbnCoreUsageDataServerObj from './kbn_core_usage_data_server.devdocs.json'; diff --git a/api_docs/kbn_core_usage_data_server_internal.mdx b/api_docs/kbn_core_usage_data_server_internal.mdx index 71f016481d398..5d32e59d8fb25 100644 --- a/api_docs/kbn_core_usage_data_server_internal.mdx +++ b/api_docs/kbn_core_usage_data_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server-internal title: "@kbn/core-usage-data-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-usage-data-server-internal plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server-internal'] --- import kbnCoreUsageDataServerInternalObj from './kbn_core_usage_data_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_usage_data_server_mocks.mdx b/api_docs/kbn_core_usage_data_server_mocks.mdx index 308318e9ecfe0..4f65895bf8b07 100644 --- a/api_docs/kbn_core_usage_data_server_mocks.mdx +++ b/api_docs/kbn_core_usage_data_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server-mocks title: "@kbn/core-usage-data-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-usage-data-server-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server-mocks'] --- import kbnCoreUsageDataServerMocksObj from './kbn_core_usage_data_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_user_settings_server.mdx b/api_docs/kbn_core_user_settings_server.mdx index 5158a302bae9f..bba6ea461b54d 100644 --- a/api_docs/kbn_core_user_settings_server.mdx +++ b/api_docs/kbn_core_user_settings_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-settings-server title: "@kbn/core-user-settings-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-settings-server plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-settings-server'] --- import kbnCoreUserSettingsServerObj from './kbn_core_user_settings_server.devdocs.json'; diff --git a/api_docs/kbn_core_user_settings_server_internal.mdx b/api_docs/kbn_core_user_settings_server_internal.mdx index d27936cd915c2..d595fca44947c 100644 --- a/api_docs/kbn_core_user_settings_server_internal.mdx +++ b/api_docs/kbn_core_user_settings_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-settings-server-internal title: "@kbn/core-user-settings-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-settings-server-internal plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-settings-server-internal'] --- import kbnCoreUserSettingsServerInternalObj from './kbn_core_user_settings_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_user_settings_server_mocks.mdx b/api_docs/kbn_core_user_settings_server_mocks.mdx index 8ba0d706cc22c..65ac6af67b441 100644 --- a/api_docs/kbn_core_user_settings_server_mocks.mdx +++ b/api_docs/kbn_core_user_settings_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-settings-server-mocks title: "@kbn/core-user-settings-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-settings-server-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-settings-server-mocks'] --- import kbnCoreUserSettingsServerMocksObj from './kbn_core_user_settings_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_crypto.mdx b/api_docs/kbn_crypto.mdx index 62c317bf04c35..d4128b87bdfa1 100644 --- a/api_docs/kbn_crypto.mdx +++ b/api_docs/kbn_crypto.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-crypto title: "@kbn/crypto" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/crypto plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/crypto'] --- import kbnCryptoObj from './kbn_crypto.devdocs.json'; diff --git a/api_docs/kbn_crypto_browser.mdx b/api_docs/kbn_crypto_browser.mdx index 002058141b484..a3c643fd2ff3a 100644 --- a/api_docs/kbn_crypto_browser.mdx +++ b/api_docs/kbn_crypto_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-crypto-browser title: "@kbn/crypto-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/crypto-browser plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/crypto-browser'] --- import kbnCryptoBrowserObj from './kbn_crypto_browser.devdocs.json'; diff --git a/api_docs/kbn_custom_icons.mdx b/api_docs/kbn_custom_icons.mdx index 38ccea2cd4007..ea9cf2488f444 100644 --- a/api_docs/kbn_custom_icons.mdx +++ b/api_docs/kbn_custom_icons.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-custom-icons title: "@kbn/custom-icons" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/custom-icons plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/custom-icons'] --- import kbnCustomIconsObj from './kbn_custom_icons.devdocs.json'; diff --git a/api_docs/kbn_custom_integrations.mdx b/api_docs/kbn_custom_integrations.mdx index fc9efb25bd402..88edd778b985b 100644 --- a/api_docs/kbn_custom_integrations.mdx +++ b/api_docs/kbn_custom_integrations.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-custom-integrations title: "@kbn/custom-integrations" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/custom-integrations plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/custom-integrations'] --- import kbnCustomIntegrationsObj from './kbn_custom_integrations.devdocs.json'; diff --git a/api_docs/kbn_cypress_config.mdx b/api_docs/kbn_cypress_config.mdx index 06b446a7f3536..4f536ab5d98a9 100644 --- a/api_docs/kbn_cypress_config.mdx +++ b/api_docs/kbn_cypress_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cypress-config title: "@kbn/cypress-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cypress-config plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cypress-config'] --- import kbnCypressConfigObj from './kbn_cypress_config.devdocs.json'; diff --git a/api_docs/kbn_data_forge.mdx b/api_docs/kbn_data_forge.mdx index bffdd539ff1f4..881c9c519c81b 100644 --- a/api_docs/kbn_data_forge.mdx +++ b/api_docs/kbn_data_forge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-data-forge title: "@kbn/data-forge" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/data-forge plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/data-forge'] --- import kbnDataForgeObj from './kbn_data_forge.devdocs.json'; diff --git a/api_docs/kbn_data_service.mdx b/api_docs/kbn_data_service.mdx index 51521c06b5659..94501144c7cdf 100644 --- a/api_docs/kbn_data_service.mdx +++ b/api_docs/kbn_data_service.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-data-service title: "@kbn/data-service" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/data-service plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/data-service'] --- import kbnDataServiceObj from './kbn_data_service.devdocs.json'; diff --git a/api_docs/kbn_data_stream_adapter.mdx b/api_docs/kbn_data_stream_adapter.mdx index 1a7e61a048075..4bac50f6c185b 100644 --- a/api_docs/kbn_data_stream_adapter.mdx +++ b/api_docs/kbn_data_stream_adapter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-data-stream-adapter title: "@kbn/data-stream-adapter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/data-stream-adapter plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/data-stream-adapter'] --- import kbnDataStreamAdapterObj from './kbn_data_stream_adapter.devdocs.json'; diff --git a/api_docs/kbn_data_view_utils.mdx b/api_docs/kbn_data_view_utils.mdx index c3f929816cd0c..7ef95e9ce6075 100644 --- a/api_docs/kbn_data_view_utils.mdx +++ b/api_docs/kbn_data_view_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-data-view-utils title: "@kbn/data-view-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/data-view-utils plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/data-view-utils'] --- import kbnDataViewUtilsObj from './kbn_data_view_utils.devdocs.json'; diff --git a/api_docs/kbn_datemath.mdx b/api_docs/kbn_datemath.mdx index 6239dfc8bdfc7..2a4723736684a 100644 --- a/api_docs/kbn_datemath.mdx +++ b/api_docs/kbn_datemath.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-datemath title: "@kbn/datemath" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/datemath plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/datemath'] --- import kbnDatemathObj from './kbn_datemath.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_analytics.mdx b/api_docs/kbn_deeplinks_analytics.mdx index aa555b1f152b3..f458316649d60 100644 --- a/api_docs/kbn_deeplinks_analytics.mdx +++ b/api_docs/kbn_deeplinks_analytics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-analytics title: "@kbn/deeplinks-analytics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-analytics plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-analytics'] --- import kbnDeeplinksAnalyticsObj from './kbn_deeplinks_analytics.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_devtools.mdx b/api_docs/kbn_deeplinks_devtools.mdx index 064b441003d34..60e0ca24f5882 100644 --- a/api_docs/kbn_deeplinks_devtools.mdx +++ b/api_docs/kbn_deeplinks_devtools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-devtools title: "@kbn/deeplinks-devtools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-devtools plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-devtools'] --- import kbnDeeplinksDevtoolsObj from './kbn_deeplinks_devtools.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_fleet.devdocs.json b/api_docs/kbn_deeplinks_fleet.devdocs.json new file mode 100644 index 0000000000000..4a55c23d6c208 --- /dev/null +++ b/api_docs/kbn_deeplinks_fleet.devdocs.json @@ -0,0 +1,73 @@ +{ + "id": "@kbn/deeplinks-fleet", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [ + { + "parentPluginId": "@kbn/deeplinks-fleet", + "id": "def-common.AppId", + "type": "Type", + "tags": [], + "label": "AppId", + "description": [], + "signature": [ + "\"fleet\"" + ], + "path": "packages/deeplinks/fleet/deep_links.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/deeplinks-fleet", + "id": "def-common.DeepLinkId", + "type": "Type", + "tags": [], + "label": "DeepLinkId", + "description": [], + "signature": [ + "\"fleet\" | \"fleet:settings\" | \"fleet:policies\" | \"fleet:data_streams\" | \"fleet:enrollment_tokens\" | \"fleet:uninstall_tokens\" | \"fleet:agents\"" + ], + "path": "packages/deeplinks/fleet/deep_links.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/deeplinks-fleet", + "id": "def-common.LinkId", + "type": "Type", + "tags": [], + "label": "LinkId", + "description": [], + "signature": [ + "\"settings\" | \"policies\" | \"data_streams\" | \"enrollment_tokens\" | \"uninstall_tokens\" | \"agents\"" + ], + "path": "packages/deeplinks/fleet/deep_links.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_deeplinks_fleet.mdx b/api_docs/kbn_deeplinks_fleet.mdx new file mode 100644 index 0000000000000..216df355e772b --- /dev/null +++ b/api_docs/kbn_deeplinks_fleet.mdx @@ -0,0 +1,30 @@ +--- +#### +#### This document is auto-generated and is meant to be viewed inside our experimental, new docs system. +#### Reach out in #docs-engineering for more info. +#### +id: kibKbnDeeplinksFleetPluginApi +slug: /kibana-dev-docs/api/kbn-deeplinks-fleet +title: "@kbn/deeplinks-fleet" +image: https://source.unsplash.com/400x175/?github +description: API docs for the @kbn/deeplinks-fleet plugin +date: 2024-03-25 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-fleet'] +--- +import kbnDeeplinksFleetObj from './kbn_deeplinks_fleet.devdocs.json'; + + + +Contact [@elastic/fleet](https://github.com/orgs/elastic/teams/fleet) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 3 | 0 | 3 | 0 | + +## Common + +### Consts, variables and types + + diff --git a/api_docs/kbn_deeplinks_management.devdocs.json b/api_docs/kbn_deeplinks_management.devdocs.json index 9bd5bdc90e7a4..454be76704be6 100644 --- a/api_docs/kbn_deeplinks_management.devdocs.json +++ b/api_docs/kbn_deeplinks_management.devdocs.json @@ -45,7 +45,7 @@ "label": "DeepLinkId", "description": [], "signature": [ - "\"fleet\" | \"monitoring\" | \"management\" | \"integrations\" | \"osquery\" | \"management:transform\" | \"management:watcher\" | \"management:cases\" | \"management:tags\" | \"management:settings\" | \"management:dataViews\" | \"management:spaces\" | \"management:reporting\" | \"management:aiAssistantManagementSelection\" | \"management:aiAssistantManagementObservability\" | \"management:api_keys\" | \"management:cross_cluster_replication\" | \"management:index_lifecycle_management\" | \"management:index_management\" | \"management:ingest_pipelines\" | \"management:jobsListLink\" | \"management:objects\" | \"management:pipelines\" | \"management:remote_clusters\" | \"management:rollup_jobs\" | \"management:snapshot_restore\" | \"management:triggersActions\" | \"management:triggersActionsConnectors\"" + "\"fleet\" | \"monitoring\" | \"management\" | \"integrations\" | \"osquery\" | \"management:transform\" | \"management:watcher\" | \"management:cases\" | \"management:tags\" | \"management:maintenanceWindows\" | \"management:settings\" | \"management:dataViews\" | \"management:spaces\" | \"management:users\" | \"management:migrate_data\" | \"management:search_sessions\" | \"management:filesManagement\" | \"management:roles\" | \"management:reporting\" | \"management:aiAssistantManagementSelection\" | \"management:aiAssistantManagementObservability\" | \"management:api_keys\" | \"management:cross_cluster_replication\" | \"management:license_management\" | \"management:index_lifecycle_management\" | \"management:index_management\" | \"management:ingest_pipelines\" | \"management:jobsListLink\" | \"management:objects\" | \"management:pipelines\" | \"management:remote_clusters\" | \"management:role_mappings\" | \"management:rollup_jobs\" | \"management:snapshot_restore\" | \"management:triggersActions\" | \"management:triggersActionsConnectors\" | \"management:upgrade_assistant\"" ], "path": "packages/deeplinks/management/deep_links.ts", "deprecated": false, @@ -60,7 +60,7 @@ "label": "LinkId", "description": [], "signature": [ - "\"transform\" | \"watcher\" | \"cases\" | \"tags\" | \"settings\" | \"dataViews\" | \"spaces\" | \"reporting\" | \"aiAssistantManagementSelection\" | \"aiAssistantManagementObservability\" | \"api_keys\" | \"cross_cluster_replication\" | \"index_lifecycle_management\" | \"index_management\" | \"ingest_pipelines\" | \"jobsListLink\" | \"objects\" | \"pipelines\" | \"remote_clusters\" | \"rollup_jobs\" | \"snapshot_restore\" | \"triggersActions\" | \"triggersActionsConnectors\"" + "\"transform\" | \"watcher\" | \"cases\" | \"tags\" | \"maintenanceWindows\" | \"settings\" | \"dataViews\" | \"spaces\" | \"users\" | \"migrate_data\" | \"search_sessions\" | \"filesManagement\" | \"roles\" | \"reporting\" | \"aiAssistantManagementSelection\" | \"aiAssistantManagementObservability\" | \"api_keys\" | \"cross_cluster_replication\" | \"license_management\" | \"index_lifecycle_management\" | \"index_management\" | \"ingest_pipelines\" | \"jobsListLink\" | \"objects\" | \"pipelines\" | \"remote_clusters\" | \"role_mappings\" | \"rollup_jobs\" | \"snapshot_restore\" | \"triggersActions\" | \"triggersActionsConnectors\" | \"upgrade_assistant\"" ], "path": "packages/deeplinks/management/deep_links.ts", "deprecated": false, diff --git a/api_docs/kbn_deeplinks_management.mdx b/api_docs/kbn_deeplinks_management.mdx index eb80bd9326604..e0e35ef5cc17e 100644 --- a/api_docs/kbn_deeplinks_management.mdx +++ b/api_docs/kbn_deeplinks_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-management title: "@kbn/deeplinks-management" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-management plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-management'] --- import kbnDeeplinksManagementObj from './kbn_deeplinks_management.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_ml.devdocs.json b/api_docs/kbn_deeplinks_ml.devdocs.json index 3992cac4b2a4d..1269effb3879c 100644 --- a/api_docs/kbn_deeplinks_ml.devdocs.json +++ b/api_docs/kbn_deeplinks_ml.devdocs.json @@ -45,7 +45,7 @@ "label": "DeepLinkId", "description": [], "signature": [ - "\"ml\" | \"ml:nodes\" | \"ml:notifications\" | \"ml:overview\" | \"ml:memoryUsage\" | \"ml:settings\" | \"ml:dataVisualizer\" | \"ml:anomalyDetection\" | \"ml:anomalyExplorer\" | \"ml:singleMetricViewer\" | \"ml:dataDrift\" | \"ml:dataFrameAnalytics\" | \"ml:resultExplorer\" | \"ml:analyticsMap\" | \"ml:aiOps\" | \"ml:logRateAnalysis\" | \"ml:logPatternAnalysis\" | \"ml:changePointDetections\" | \"ml:modelManagement\" | \"ml:nodesOverview\" | \"ml:esqlDataVisualizer\" | \"ml:fileUpload\" | \"ml:indexDataVisualizer\" | \"ml:calendarSettings\" | \"ml:filterListsSettings\"" + "\"ml\" | \"ml:notifications\" | \"ml:nodes\" | \"ml:overview\" | \"ml:memoryUsage\" | \"ml:settings\" | \"ml:dataVisualizer\" | \"ml:anomalyDetection\" | \"ml:anomalyExplorer\" | \"ml:singleMetricViewer\" | \"ml:dataDrift\" | \"ml:dataFrameAnalytics\" | \"ml:resultExplorer\" | \"ml:analyticsMap\" | \"ml:aiOps\" | \"ml:logRateAnalysis\" | \"ml:logPatternAnalysis\" | \"ml:changePointDetections\" | \"ml:modelManagement\" | \"ml:nodesOverview\" | \"ml:esqlDataVisualizer\" | \"ml:fileUpload\" | \"ml:indexDataVisualizer\" | \"ml:calendarSettings\" | \"ml:filterListsSettings\"" ], "path": "packages/deeplinks/ml/deep_links.ts", "deprecated": false, @@ -60,7 +60,7 @@ "label": "LinkId", "description": [], "signature": [ - "\"nodes\" | \"notifications\" | \"overview\" | \"memoryUsage\" | \"settings\" | \"dataVisualizer\" | \"anomalyDetection\" | \"anomalyExplorer\" | \"singleMetricViewer\" | \"dataDrift\" | \"dataFrameAnalytics\" | \"resultExplorer\" | \"analyticsMap\" | \"aiOps\" | \"logRateAnalysis\" | \"logPatternAnalysis\" | \"changePointDetections\" | \"modelManagement\" | \"nodesOverview\" | \"esqlDataVisualizer\" | \"fileUpload\" | \"indexDataVisualizer\" | \"calendarSettings\" | \"filterListsSettings\"" + "\"notifications\" | \"nodes\" | \"overview\" | \"memoryUsage\" | \"settings\" | \"dataVisualizer\" | \"anomalyDetection\" | \"anomalyExplorer\" | \"singleMetricViewer\" | \"dataDrift\" | \"dataFrameAnalytics\" | \"resultExplorer\" | \"analyticsMap\" | \"aiOps\" | \"logRateAnalysis\" | \"logPatternAnalysis\" | \"changePointDetections\" | \"modelManagement\" | \"nodesOverview\" | \"esqlDataVisualizer\" | \"fileUpload\" | \"indexDataVisualizer\" | \"calendarSettings\" | \"filterListsSettings\"" ], "path": "packages/deeplinks/ml/deep_links.ts", "deprecated": false, diff --git a/api_docs/kbn_deeplinks_ml.mdx b/api_docs/kbn_deeplinks_ml.mdx index 0dc63bb568bba..19fdfb6418a01 100644 --- a/api_docs/kbn_deeplinks_ml.mdx +++ b/api_docs/kbn_deeplinks_ml.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-ml title: "@kbn/deeplinks-ml" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-ml plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-ml'] --- import kbnDeeplinksMlObj from './kbn_deeplinks_ml.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_observability.mdx b/api_docs/kbn_deeplinks_observability.mdx index d010068ac07dd..67e6927a77a26 100644 --- a/api_docs/kbn_deeplinks_observability.mdx +++ b/api_docs/kbn_deeplinks_observability.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-observability title: "@kbn/deeplinks-observability" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-observability plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-observability'] --- import kbnDeeplinksObservabilityObj from './kbn_deeplinks_observability.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_search.mdx b/api_docs/kbn_deeplinks_search.mdx index 31a298a0ad4b9..646164c22b5ff 100644 --- a/api_docs/kbn_deeplinks_search.mdx +++ b/api_docs/kbn_deeplinks_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-search title: "@kbn/deeplinks-search" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-search plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-search'] --- import kbnDeeplinksSearchObj from './kbn_deeplinks_search.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_security.devdocs.json b/api_docs/kbn_deeplinks_security.devdocs.json new file mode 100644 index 0000000000000..b70672d7c3c37 --- /dev/null +++ b/api_docs/kbn_deeplinks_security.devdocs.json @@ -0,0 +1,101 @@ +{ + "id": "@kbn/deeplinks-security", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [ + { + "parentPluginId": "@kbn/deeplinks-security", + "id": "def-common.SecurityPageName", + "type": "Enum", + "tags": [], + "label": "SecurityPageName", + "description": [], + "path": "packages/deeplinks/security/deep_links.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], + "misc": [ + { + "parentPluginId": "@kbn/deeplinks-security", + "id": "def-common.AppId", + "type": "Type", + "tags": [], + "label": "AppId", + "description": [], + "signature": [ + "\"securitySolutionUI\"" + ], + "path": "packages/deeplinks/security/index.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/deeplinks-security", + "id": "def-common.DeepLinkId", + "type": "Type", + "tags": [], + "label": "DeepLinkId", + "description": [], + "signature": [ + "\"securitySolutionUI\" | \"securitySolutionUI:\" | \"securitySolutionUI:cases\" | \"securitySolutionUI:rules\" | \"securitySolutionUI:alerts\" | \"securitySolutionUI:policy\" | \"securitySolutionUI:overview\" | \"securitySolutionUI:dashboards\" | \"securitySolutionUI:cases_create\" | \"securitySolutionUI:cases_configure\" | \"securitySolutionUI:hosts\" | \"securitySolutionUI:users\" | \"securitySolutionUI:cloud_defend-policies\" | \"securitySolutionUI:cloud_security_posture-dashboard\" | \"securitySolutionUI:cloud_security_posture-findings\" | \"securitySolutionUI:cloud_security_posture-benchmarks\" | \"securitySolutionUI:kubernetes\" | \"securitySolutionUI:network\" | \"securitySolutionUI:sessions\" | \"securitySolutionUI:explore\" | \"securitySolutionUI:assets\" | \"securitySolutionUI:cloud_defend\" | \"securitySolutionUI:administration\" | \"securitySolutionUI:blocklist\" | \"securitySolutionUI:cloud_security_posture-rules\" | \"securitySolutionUI:data_quality\" | \"securitySolutionUI:detections\" | \"securitySolutionUI:detection_response\" | \"securitySolutionUI:endpoints\" | \"securitySolutionUI:event_filters\" | \"securitySolutionUI:exceptions\" | \"securitySolutionUI:host_isolation_exceptions\" | \"securitySolutionUI:hosts-anomalies\" | \"securitySolutionUI:hosts-risk\" | \"securitySolutionUI:hosts-events\" | \"securitySolutionUI:investigations\" | \"securitySolutionUI:get_started\" | \"securitySolutionUI:machine_learning-landing\" | \"securitySolutionUI:network-anomalies\" | \"securitySolutionUI:network-dns\" | \"securitySolutionUI:network-events\" | \"securitySolutionUI:network-http\" | \"securitySolutionUI:network-tls\" | \"securitySolutionUI:response_actions_history\" | \"securitySolutionUI:rules-add\" | \"securitySolutionUI:rules-create\" | \"securitySolutionUI:rules-landing\" | \"securitySolutionUI:threat_intelligence\" | \"securitySolutionUI:timelines\" | \"securitySolutionUI:timelines-templates\" | \"securitySolutionUI:trusted_apps\" | \"securitySolutionUI:uncommon_processes\" | \"securitySolutionUI:users-anomalies\" | \"securitySolutionUI:users-authentications\" | \"securitySolutionUI:users-events\" | \"securitySolutionUI:users-risk\" | \"securitySolutionUI:entity_analytics\" | \"securitySolutionUI:entity_analytics-management\" | \"securitySolutionUI:coverage-overview\"" + ], + "path": "packages/deeplinks/security/index.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/deeplinks-security", + "id": "def-common.LinkId", + "type": "Type", + "tags": [], + "label": "LinkId", + "description": [], + "signature": [ + "\"\" | \"cases\" | \"rules\" | \"alerts\" | \"policy\" | \"overview\" | \"dashboards\" | \"cases_create\" | \"cases_configure\" | \"hosts\" | \"users\" | \"cloud_defend-policies\" | \"cloud_security_posture-dashboard\" | \"cloud_security_posture-findings\" | \"cloud_security_posture-benchmarks\" | \"kubernetes\" | \"network\" | \"sessions\" | \"explore\" | \"assets\" | \"cloud_defend\" | \"administration\" | \"blocklist\" | \"cloud_security_posture-rules\" | \"data_quality\" | \"detections\" | \"detection_response\" | \"endpoints\" | \"event_filters\" | \"exceptions\" | \"host_isolation_exceptions\" | \"hosts-anomalies\" | \"hosts-risk\" | \"hosts-events\" | \"investigations\" | \"get_started\" | \"machine_learning-landing\" | \"network-anomalies\" | \"network-dns\" | \"network-events\" | \"network-http\" | \"network-tls\" | \"response_actions_history\" | \"rules-add\" | \"rules-create\" | \"rules-landing\" | \"threat_intelligence\" | \"timelines\" | \"timelines-templates\" | \"trusted_apps\" | \"uncommon_processes\" | \"users-anomalies\" | \"users-authentications\" | \"users-events\" | \"users-risk\" | \"entity_analytics\" | \"entity_analytics-management\" | \"coverage-overview\"" + ], + "path": "packages/deeplinks/security/index.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/deeplinks-security", + "id": "def-common.SECURITY_APP_ID", + "type": "string", + "tags": [], + "label": "SECURITY_APP_ID", + "description": [], + "signature": [ + "\"securitySolutionUI\"" + ], + "path": "packages/deeplinks/security/index.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_deeplinks_security.mdx b/api_docs/kbn_deeplinks_security.mdx new file mode 100644 index 0000000000000..fcad11e847071 --- /dev/null +++ b/api_docs/kbn_deeplinks_security.mdx @@ -0,0 +1,33 @@ +--- +#### +#### This document is auto-generated and is meant to be viewed inside our experimental, new docs system. +#### Reach out in #docs-engineering for more info. +#### +id: kibKbnDeeplinksSecurityPluginApi +slug: /kibana-dev-docs/api/kbn-deeplinks-security +title: "@kbn/deeplinks-security" +image: https://source.unsplash.com/400x175/?github +description: API docs for the @kbn/deeplinks-security plugin +date: 2024-03-25 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-security'] +--- +import kbnDeeplinksSecurityObj from './kbn_deeplinks_security.devdocs.json'; + + + +Contact [@elastic/security-solution](https://github.com/orgs/elastic/teams/security-solution) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 5 | 0 | 5 | 0 | + +## Common + +### Enums + + +### Consts, variables and types + + diff --git a/api_docs/kbn_deeplinks_shared.devdocs.json b/api_docs/kbn_deeplinks_shared.devdocs.json new file mode 100644 index 0000000000000..3bec8dfd68c88 --- /dev/null +++ b/api_docs/kbn_deeplinks_shared.devdocs.json @@ -0,0 +1,58 @@ +{ + "id": "@kbn/deeplinks-shared", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [ + { + "parentPluginId": "@kbn/deeplinks-shared", + "id": "def-common.AppId", + "type": "Type", + "tags": [], + "label": "AppId", + "description": [], + "signature": [ + "\"home\"" + ], + "path": "packages/deeplinks/shared/deep_links.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/deeplinks-shared", + "id": "def-common.DeepLinkId", + "type": "Type", + "tags": [], + "label": "DeepLinkId", + "description": [], + "signature": [ + "\"home\"" + ], + "path": "packages/deeplinks/shared/deep_links.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_deeplinks_shared.mdx b/api_docs/kbn_deeplinks_shared.mdx new file mode 100644 index 0000000000000..77a88ea1d3057 --- /dev/null +++ b/api_docs/kbn_deeplinks_shared.mdx @@ -0,0 +1,30 @@ +--- +#### +#### This document is auto-generated and is meant to be viewed inside our experimental, new docs system. +#### Reach out in #docs-engineering for more info. +#### +id: kibKbnDeeplinksSharedPluginApi +slug: /kibana-dev-docs/api/kbn-deeplinks-shared +title: "@kbn/deeplinks-shared" +image: https://source.unsplash.com/400x175/?github +description: API docs for the @kbn/deeplinks-shared plugin +date: 2024-03-25 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-shared'] +--- +import kbnDeeplinksSharedObj from './kbn_deeplinks_shared.devdocs.json'; + + + +Contact [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 2 | 0 | 2 | 0 | + +## Common + +### Consts, variables and types + + diff --git a/api_docs/kbn_default_nav_analytics.mdx b/api_docs/kbn_default_nav_analytics.mdx index be262b0e2c6bd..65512482ddde6 100644 --- a/api_docs/kbn_default_nav_analytics.mdx +++ b/api_docs/kbn_default_nav_analytics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-default-nav-analytics title: "@kbn/default-nav-analytics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/default-nav-analytics plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/default-nav-analytics'] --- import kbnDefaultNavAnalyticsObj from './kbn_default_nav_analytics.devdocs.json'; diff --git a/api_docs/kbn_default_nav_devtools.mdx b/api_docs/kbn_default_nav_devtools.mdx index d11b431371304..3577900295e3a 100644 --- a/api_docs/kbn_default_nav_devtools.mdx +++ b/api_docs/kbn_default_nav_devtools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-default-nav-devtools title: "@kbn/default-nav-devtools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/default-nav-devtools plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/default-nav-devtools'] --- import kbnDefaultNavDevtoolsObj from './kbn_default_nav_devtools.devdocs.json'; diff --git a/api_docs/kbn_default_nav_management.mdx b/api_docs/kbn_default_nav_management.mdx index cf1b0d0bd1631..48f0dbfbd18d2 100644 --- a/api_docs/kbn_default_nav_management.mdx +++ b/api_docs/kbn_default_nav_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-default-nav-management title: "@kbn/default-nav-management" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/default-nav-management plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/default-nav-management'] --- import kbnDefaultNavManagementObj from './kbn_default_nav_management.devdocs.json'; diff --git a/api_docs/kbn_default_nav_ml.mdx b/api_docs/kbn_default_nav_ml.mdx index 2aac49d616635..647725e452eea 100644 --- a/api_docs/kbn_default_nav_ml.mdx +++ b/api_docs/kbn_default_nav_ml.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-default-nav-ml title: "@kbn/default-nav-ml" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/default-nav-ml plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/default-nav-ml'] --- import kbnDefaultNavMlObj from './kbn_default_nav_ml.devdocs.json'; diff --git a/api_docs/kbn_dev_cli_errors.mdx b/api_docs/kbn_dev_cli_errors.mdx index 76361240fd009..685a9e1bb7ef8 100644 --- a/api_docs/kbn_dev_cli_errors.mdx +++ b/api_docs/kbn_dev_cli_errors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-cli-errors title: "@kbn/dev-cli-errors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-cli-errors plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-cli-errors'] --- import kbnDevCliErrorsObj from './kbn_dev_cli_errors.devdocs.json'; diff --git a/api_docs/kbn_dev_cli_runner.mdx b/api_docs/kbn_dev_cli_runner.mdx index 0d35e72fc5f75..7f51d3a8cf9a7 100644 --- a/api_docs/kbn_dev_cli_runner.mdx +++ b/api_docs/kbn_dev_cli_runner.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-cli-runner title: "@kbn/dev-cli-runner" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-cli-runner plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-cli-runner'] --- import kbnDevCliRunnerObj from './kbn_dev_cli_runner.devdocs.json'; diff --git a/api_docs/kbn_dev_proc_runner.mdx b/api_docs/kbn_dev_proc_runner.mdx index 6b8b9c3642bed..3598ca4c090f3 100644 --- a/api_docs/kbn_dev_proc_runner.mdx +++ b/api_docs/kbn_dev_proc_runner.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-proc-runner title: "@kbn/dev-proc-runner" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-proc-runner plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-proc-runner'] --- import kbnDevProcRunnerObj from './kbn_dev_proc_runner.devdocs.json'; diff --git a/api_docs/kbn_dev_utils.mdx b/api_docs/kbn_dev_utils.mdx index f87870c2ea003..b5ec18b143bf1 100644 --- a/api_docs/kbn_dev_utils.mdx +++ b/api_docs/kbn_dev_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-utils title: "@kbn/dev-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-utils plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-utils'] --- import kbnDevUtilsObj from './kbn_dev_utils.devdocs.json'; diff --git a/api_docs/kbn_discover_utils.mdx b/api_docs/kbn_discover_utils.mdx index 648f6e5fa76f1..3d7ed291b0d6e 100644 --- a/api_docs/kbn_discover_utils.mdx +++ b/api_docs/kbn_discover_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-discover-utils title: "@kbn/discover-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/discover-utils plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/discover-utils'] --- import kbnDiscoverUtilsObj from './kbn_discover_utils.devdocs.json'; diff --git a/api_docs/kbn_doc_links.devdocs.json b/api_docs/kbn_doc_links.devdocs.json index ce27411085185..7c32860d8ad16 100644 --- a/api_docs/kbn_doc_links.devdocs.json +++ b/api_docs/kbn_doc_links.devdocs.json @@ -672,7 +672,7 @@ "label": "alerting", "description": [], "signature": [ - "{ readonly guide: string; readonly actionTypes: string; readonly apmRules: string; readonly emailAction: string; readonly emailActionConfig: string; readonly emailExchangeClientSecretConfig: string; readonly emailExchangeClientIdConfig: string; readonly generalSettings: string; readonly indexAction: string; readonly esQuery: string; readonly indexThreshold: string; readonly maintenanceWindows: string; readonly pagerDutyAction: string; readonly preconfiguredConnectors: string; readonly preconfiguredAlertHistoryConnector: string; readonly serviceNowAction: string; readonly serviceNowSIRAction: string; readonly setupPrerequisites: string; readonly slackAction: string; readonly slackApiAction: string; readonly teamsAction: string; readonly connectors: string; }" + "{ readonly guide: string; readonly actionTypes: string; readonly apmRulesErrorCount: string; readonly apmRulesTransactionDuration: string; readonly apmRulesTransactionError: string; readonly apmRulesAnomaly: string; readonly emailAction: string; readonly emailActionConfig: string; readonly emailExchangeClientSecretConfig: string; readonly emailExchangeClientIdConfig: string; readonly generalSettings: string; readonly indexAction: string; readonly esQuery: string; readonly indexThreshold: string; readonly maintenanceWindows: string; readonly pagerDutyAction: string; readonly preconfiguredConnectors: string; readonly preconfiguredAlertHistoryConnector: string; readonly serviceNowAction: string; readonly serviceNowSIRAction: string; readonly setupPrerequisites: string; readonly slackAction: string; readonly slackApiAction: string; readonly teamsAction: string; readonly connectors: string; }" ], "path": "packages/kbn-doc-links/src/types.ts", "deprecated": false, diff --git a/api_docs/kbn_doc_links.mdx b/api_docs/kbn_doc_links.mdx index b1b2f16c434b5..7a45da369d502 100644 --- a/api_docs/kbn_doc_links.mdx +++ b/api_docs/kbn_doc_links.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-doc-links title: "@kbn/doc-links" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/doc-links plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/doc-links'] --- import kbnDocLinksObj from './kbn_doc_links.devdocs.json'; diff --git a/api_docs/kbn_docs_utils.mdx b/api_docs/kbn_docs_utils.mdx index 2bf62cd875cf6..2df4768561d68 100644 --- a/api_docs/kbn_docs_utils.mdx +++ b/api_docs/kbn_docs_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-docs-utils title: "@kbn/docs-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/docs-utils plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/docs-utils'] --- import kbnDocsUtilsObj from './kbn_docs_utils.devdocs.json'; diff --git a/api_docs/kbn_dom_drag_drop.devdocs.json b/api_docs/kbn_dom_drag_drop.devdocs.json index cb21105a32b80..ec02b01549178 100644 --- a/api_docs/kbn_dom_drag_drop.devdocs.json +++ b/api_docs/kbn_dom_drag_drop.devdocs.json @@ -58,33 +58,33 @@ }, { "parentPluginId": "@kbn/dom-drag-drop", - "id": "def-common.DragDrop", + "id": "def-common.Draggable", "type": "Function", "tags": [ "constructor" ], - "label": "DragDrop", + "label": "Draggable", "description": [ - "\nDragDrop component" + "\nDraggable component" ], "signature": [ - "(props: BaseProps) => JSX.Element" + "({ reorderableGroup, ...props }: DraggableProps) => JSX.Element" ], - "path": "packages/kbn-dom-drag-drop/src/drag_drop.tsx", + "path": "packages/kbn-dom-drag-drop/src/draggable.tsx", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/dom-drag-drop", - "id": "def-common.DragDrop.$1", + "id": "def-common.Draggable.$1", "type": "Object", "tags": [], - "label": "props", + "label": "{ reorderableGroup, ...props }", "description": [], "signature": [ - "BaseProps" + "DraggableProps" ], - "path": "packages/kbn-dom-drag-drop/src/drag_drop.tsx", + "path": "packages/kbn-dom-drag-drop/src/draggable.tsx", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -146,6 +146,45 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/dom-drag-drop", + "id": "def-common.Droppable", + "type": "Function", + "tags": [ + "constructor" + ], + "label": "Droppable", + "description": [ + "\nDroppable component" + ], + "signature": [ + "(props: ", + "DroppableProps", + ") => JSX.Element" + ], + "path": "packages/kbn-dom-drag-drop/src/droppable.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/dom-drag-drop", + "id": "def-common.Droppable.$1", + "type": "Object", + "tags": [], + "label": "props", + "description": [], + "signature": [ + "DroppableProps" + ], + "path": "packages/kbn-dom-drag-drop/src/droppable.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/dom-drag-drop", "id": "def-common.ReorderProvider", @@ -227,9 +266,17 @@ "label": "RootDragDropProvider", "description": [], "signature": [ - "({\n children,\n dataTestSubj = DEFAULT_DATA_TEST_SUBJ,\n customMiddleware,\n}: { children: React.ReactNode; dataTestSubj?: string | undefined; customMiddleware?: ", + "({\n children,\n customMiddleware,\n initialState = {},\n}: { children: React.ReactNode; customMiddleware?: ", "CustomMiddleware", - " | undefined; }) => JSX.Element" + " | undefined; initialState?: Partial<", + { + "pluginId": "@kbn/dom-drag-drop", + "scope": "common", + "docId": "kibKbnDomDragDropPluginApi", + "section": "def-common.DragContextState", + "text": "DragContextState" + }, + "> | undefined; }) => JSX.Element" ], "path": "packages/kbn-dom-drag-drop/src/providers/providers.tsx", "deprecated": false, @@ -240,7 +287,7 @@ "id": "def-common.RootDragDropProvider.$1", "type": "Object", "tags": [], - "label": "{\n children,\n dataTestSubj = DEFAULT_DATA_TEST_SUBJ,\n customMiddleware,\n}", + "label": "{\n children,\n customMiddleware,\n initialState = {},\n}", "description": [], "path": "packages/kbn-dom-drag-drop/src/providers/providers.tsx", "deprecated": false, @@ -262,13 +309,14 @@ }, { "parentPluginId": "@kbn/dom-drag-drop", - "id": "def-common.RootDragDropProvider.$1.dataTestSubj", - "type": "string", + "id": "def-common.RootDragDropProvider.$1.customMiddleware", + "type": "Function", "tags": [], - "label": "dataTestSubj", + "label": "customMiddleware", "description": [], "signature": [ - "string | undefined" + "CustomMiddleware", + " | undefined" ], "path": "packages/kbn-dom-drag-drop/src/providers/providers.tsx", "deprecated": false, @@ -276,14 +324,21 @@ }, { "parentPluginId": "@kbn/dom-drag-drop", - "id": "def-common.RootDragDropProvider.$1.customMiddleware", - "type": "Function", + "id": "def-common.RootDragDropProvider.$1.initialState", + "type": "Object", "tags": [], - "label": "customMiddleware", + "label": "initialState", "description": [], "signature": [ - "CustomMiddleware", - " | undefined" + "Partial<", + { + "pluginId": "@kbn/dom-drag-drop", + "scope": "common", + "docId": "kibKbnDomDragDropPluginApi", + "section": "def-common.DragContextState", + "text": "DragContextState" + }, + "> | undefined" ], "path": "packages/kbn-dom-drag-drop/src/providers/providers.tsx", "deprecated": false, @@ -370,10 +425,10 @@ }, { "parentPluginId": "@kbn/dom-drag-drop", - "id": "def-common.DragContextState.activeDropTarget", + "id": "def-common.DragContextState.hoveredDropTarget", "type": "CompoundType", "tags": [], - "label": "activeDropTarget", + "label": "hoveredDropTarget", "description": [ "\ncurrently selected drop target" ], @@ -397,7 +452,7 @@ "signature": [ "Record | undefined" + "> | undefined" ], "path": "packages/kbn-dom-drag-drop/src/providers/types.tsx", "deprecated": false, @@ -644,7 +699,7 @@ "label": "getAdditionalClassesOnDroppable", "description": [], "signature": [ - "(dropType?: string | undefined) => \"domDragDrop-notCompatible\" | undefined" + "(dropType?: string | undefined) => \"domDroppable--incompatible\" | undefined" ], "path": "packages/kbn-dom-drag-drop/src/drop_targets/index.ts", "deprecated": false, @@ -675,7 +730,7 @@ "label": "getAdditionalClassesOnEnter", "description": [], "signature": [ - "(dropType?: string | undefined) => \"domDragDrop-isReplacing\" | undefined" + "(dropType?: string | undefined) => \"domDroppable--replacing\" | undefined" ], "path": "packages/kbn-dom-drag-drop/src/drop_targets/index.ts", "deprecated": false, diff --git a/api_docs/kbn_dom_drag_drop.mdx b/api_docs/kbn_dom_drag_drop.mdx index db0e67ce30edb..7ddbd9b57ffa3 100644 --- a/api_docs/kbn_dom_drag_drop.mdx +++ b/api_docs/kbn_dom_drag_drop.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dom-drag-drop title: "@kbn/dom-drag-drop" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dom-drag-drop plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dom-drag-drop'] --- import kbnDomDragDropObj from './kbn_dom_drag_drop.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/k | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 39 | 0 | 26 | 5 | +| 41 | 0 | 27 | 6 | ## Common diff --git a/api_docs/kbn_ebt_tools.mdx b/api_docs/kbn_ebt_tools.mdx index 7f0779895dc2f..244eaaa8b79c4 100644 --- a/api_docs/kbn_ebt_tools.mdx +++ b/api_docs/kbn_ebt_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ebt-tools title: "@kbn/ebt-tools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ebt-tools plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ebt-tools'] --- import kbnEbtToolsObj from './kbn_ebt_tools.devdocs.json'; diff --git a/api_docs/kbn_ecs_data_quality_dashboard.mdx b/api_docs/kbn_ecs_data_quality_dashboard.mdx index 03ceb3d544014..5e2396d33fcd8 100644 --- a/api_docs/kbn_ecs_data_quality_dashboard.mdx +++ b/api_docs/kbn_ecs_data_quality_dashboard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ecs-data-quality-dashboard title: "@kbn/ecs-data-quality-dashboard" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ecs-data-quality-dashboard plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ecs-data-quality-dashboard'] --- import kbnEcsDataQualityDashboardObj from './kbn_ecs_data_quality_dashboard.devdocs.json'; diff --git a/api_docs/kbn_elastic_agent_utils.mdx b/api_docs/kbn_elastic_agent_utils.mdx index 9d1c9fb1b2c6f..5d78eb149cbdd 100644 --- a/api_docs/kbn_elastic_agent_utils.mdx +++ b/api_docs/kbn_elastic_agent_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-elastic-agent-utils title: "@kbn/elastic-agent-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/elastic-agent-utils plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/elastic-agent-utils'] --- import kbnElasticAgentUtilsObj from './kbn_elastic_agent_utils.devdocs.json'; diff --git a/api_docs/kbn_elastic_assistant.devdocs.json b/api_docs/kbn_elastic_assistant.devdocs.json index 1a08ccdbd8e0a..ee1e394a5a2ef 100644 --- a/api_docs/kbn_elastic_assistant.devdocs.json +++ b/api_docs/kbn_elastic_assistant.devdocs.json @@ -1506,7 +1506,7 @@ "label": "apiConfig", "description": [], "signature": [ - "{ connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined" + "{ connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined" ], "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant_context/types.tsx", "deprecated": false, @@ -1793,7 +1793,7 @@ "label": "apiConfig", "description": [], "signature": [ - "{ connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined" + "{ connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined" ], "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_bulk_actions_conversations.ts", "deprecated": false, diff --git a/api_docs/kbn_elastic_assistant.mdx b/api_docs/kbn_elastic_assistant.mdx index ac2ee9c95d684..f08335aae2cec 100644 --- a/api_docs/kbn_elastic_assistant.mdx +++ b/api_docs/kbn_elastic_assistant.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-elastic-assistant title: "@kbn/elastic-assistant" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/elastic-assistant plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/elastic-assistant'] --- import kbnElasticAssistantObj from './kbn_elastic_assistant.devdocs.json'; diff --git a/api_docs/kbn_elastic_assistant_common.devdocs.json b/api_docs/kbn_elastic_assistant_common.devdocs.json index b4dee48863e55..79a19b081fcaf 100644 --- a/api_docs/kbn_elastic_assistant_common.devdocs.json +++ b/api_docs/kbn_elastic_assistant_common.devdocs.json @@ -574,7 +574,7 @@ "label": "ApiConfig", "description": [], "signature": [ - "{ connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }" + "{ connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", "deprecated": false, @@ -649,7 +649,7 @@ "label": "AppendConversationMessageResponse", "description": [], "signature": [ - "{ id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }" + "{ id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", "deprecated": false, @@ -726,7 +726,7 @@ "label": "BulkCrudActionResponse", "description": [], "signature": [ - "{ attributes: { results: { created: { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }; summary: { total: number; succeeded: number; failed: number; skipped: number; }; errors?: { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }[] | undefined; }; success?: boolean | undefined; status_code?: number | undefined; message?: string | undefined; conversations_count?: number | undefined; }" + "{ attributes: { results: { created: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }; summary: { total: number; succeeded: number; failed: number; skipped: number; }; errors?: { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }[] | undefined; }; success?: boolean | undefined; status_code?: number | undefined; message?: string | undefined; conversations_count?: number | undefined; }" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts", "deprecated": false, @@ -741,7 +741,7 @@ "label": "BulkCrudActionResults", "description": [], "signature": [ - "{ created: { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }" + "{ created: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts", "deprecated": false, @@ -835,7 +835,7 @@ "label": "ConversationCreateProps", "description": [], "signature": [ - "{ title: string; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }" + "{ title: string; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", "deprecated": false, @@ -880,7 +880,7 @@ "label": "ConversationResponse", "description": [], "signature": [ - "{ id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }" + "{ id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", "deprecated": false, @@ -910,7 +910,7 @@ "label": "ConversationUpdateProps", "description": [], "signature": [ - "{ id: string; title?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }" + "{ id: string; title?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", "deprecated": false, @@ -925,7 +925,7 @@ "label": "CreateConversationRequestBody", "description": [], "signature": [ - "{ title: string; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }" + "{ title: string; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", "deprecated": false, @@ -940,7 +940,7 @@ "label": "CreateConversationRequestBodyInput", "description": [], "signature": [ - "{ title: string; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }" + "{ title: string; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", "deprecated": false, @@ -955,7 +955,7 @@ "label": "CreateConversationResponse", "description": [], "signature": [ - "{ id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }" + "{ id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", "deprecated": false, @@ -1075,7 +1075,7 @@ "label": "DeleteConversationResponse", "description": [], "signature": [ - "{ id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }" + "{ id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", "deprecated": false, @@ -1327,7 +1327,7 @@ "label": "ExecuteConnectorRequestBody", "description": [], "signature": [ - "{ subAction: \"invokeAI\" | \"invokeStream\"; replacements: { value: string; uuid: string; }[]; llmType: \"bedrock\" | \"openai\"; conversationId?: string | undefined; message?: string | undefined; model?: string | undefined; alertsIndexPattern?: string | undefined; allow?: string[] | undefined; allowReplacement?: string[] | undefined; isEnabledKnowledgeBase?: boolean | undefined; isEnabledRAGAlerts?: boolean | undefined; size?: number | undefined; }" + "{ subAction: \"invokeAI\" | \"invokeStream\"; replacements: { value: string; uuid: string; }[]; conversationId?: string | undefined; message?: string | undefined; model?: string | undefined; alertsIndexPattern?: string | undefined; allow?: string[] | undefined; allowReplacement?: string[] | undefined; isEnabledKnowledgeBase?: boolean | undefined; isEnabledRAGAlerts?: boolean | undefined; size?: number | undefined; }" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.gen.ts", "deprecated": false, @@ -1342,7 +1342,7 @@ "label": "ExecuteConnectorRequestBodyInput", "description": [], "signature": [ - "{ subAction: \"invokeAI\" | \"invokeStream\"; replacements: { value: string; uuid: string; }[]; llmType: \"bedrock\" | \"openai\"; conversationId?: string | undefined; message?: string | undefined; model?: string | undefined; alertsIndexPattern?: string | undefined; allow?: string[] | undefined; allowReplacement?: string[] | undefined; isEnabledKnowledgeBase?: boolean | undefined; isEnabledRAGAlerts?: boolean | undefined; size?: number | undefined; }" + "{ subAction: \"invokeAI\" | \"invokeStream\"; replacements: { value: string; uuid: string; }[]; conversationId?: string | undefined; message?: string | undefined; model?: string | undefined; alertsIndexPattern?: string | undefined; allow?: string[] | undefined; allowReplacement?: string[] | undefined; isEnabledKnowledgeBase?: boolean | undefined; isEnabledRAGAlerts?: boolean | undefined; size?: number | undefined; }" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.gen.ts", "deprecated": false, @@ -1432,7 +1432,7 @@ "label": "FindConversationsResponse", "description": [], "signature": [ - "{ page: number; perPage: number; total: number; data: { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; }" + "{ page: number; perPage: number; total: number; data: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; }" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/find_conversations_route.gen.ts", "deprecated": false, @@ -1507,7 +1507,7 @@ "label": "FindCurrentUserConversationsResponse", "description": [], "signature": [ - "{ page: number; perPage: number; total: number; data: { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; }" + "{ page: number; perPage: number; total: number; data: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; }" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/find_conversations_route.gen.ts", "deprecated": false, @@ -1680,7 +1680,7 @@ "label": "PerformBulkActionRequestBody", "description": [], "signature": [ - "{ delete?: { query?: string | undefined; ids?: string[] | undefined; } | undefined; create?: { title: string; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }[] | undefined; update?: { id: string; title?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }[] | undefined; }" + "{ delete?: { query?: string | undefined; ids?: string[] | undefined; } | undefined; create?: { title: string; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }[] | undefined; update?: { id: string; title?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }[] | undefined; }" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts", "deprecated": false, @@ -1695,7 +1695,7 @@ "label": "PerformBulkActionRequestBodyInput", "description": [], "signature": [ - "{ delete?: { query?: string | undefined; ids?: string[] | undefined; } | undefined; create?: { title: string; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }[] | undefined; update?: { id: string; title?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }[] | undefined; }" + "{ delete?: { query?: string | undefined; ids?: string[] | undefined; } | undefined; create?: { title: string; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }[] | undefined; update?: { id: string; title?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }[] | undefined; }" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts", "deprecated": false, @@ -1710,7 +1710,7 @@ "label": "PerformBulkActionResponse", "description": [], "signature": [ - "{ attributes: { results: { created: { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }; summary: { total: number; succeeded: number; failed: number; skipped: number; }; errors?: { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }[] | undefined; }; success?: boolean | undefined; status_code?: number | undefined; message?: string | undefined; conversations_count?: number | undefined; }" + "{ attributes: { results: { created: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }; summary: { total: number; succeeded: number; failed: number; skipped: number; }; errors?: { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }[] | undefined; }; success?: boolean | undefined; status_code?: number | undefined; message?: string | undefined; conversations_count?: number | undefined; }" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts", "deprecated": false, @@ -1892,7 +1892,7 @@ "label": "ReadConversationResponse", "description": [], "signature": [ - "{ id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }" + "{ id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", "deprecated": false, @@ -2031,7 +2031,7 @@ "label": "UpdateConversationRequestBody", "description": [], "signature": [ - "{ id: string; title?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }" + "{ id: string; title?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", "deprecated": false, @@ -2046,7 +2046,7 @@ "label": "UpdateConversationRequestBodyInput", "description": [], "signature": [ - "{ id: string; title?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }" + "{ id: string; title?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", "deprecated": false, @@ -2091,7 +2091,7 @@ "label": "UpdateConversationResponse", "description": [], "signature": [ - "{ id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }" + "{ id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", "deprecated": false, @@ -2204,7 +2204,7 @@ "label": "ApiConfig", "description": [], "signature": [ - "Zod.ZodObject<{ connectorId: Zod.ZodString; connectorTypeTitle: Zod.ZodString; defaultSystemPromptId: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>" + "Zod.ZodObject<{ connectorId: Zod.ZodString; defaultSystemPromptId: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", "deprecated": false, @@ -2249,7 +2249,7 @@ "label": "AppendConversationMessageResponse", "description": [], "signature": [ - "Zod.ZodObject<{ id: Zod.ZodUnion<[Zod.ZodString, Zod.ZodString]>; title: Zod.ZodString; category: Zod.ZodEnum<[\"assistant\", \"insights\"]>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, \"many\">>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>" + "Zod.ZodObject<{ id: Zod.ZodUnion<[Zod.ZodString, Zod.ZodString]>; title: Zod.ZodString; category: Zod.ZodEnum<[\"assistant\", \"insights\"]>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, \"many\">>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", "deprecated": false, @@ -2309,7 +2309,7 @@ "label": "BulkCrudActionResponse", "description": [], "signature": [ - "Zod.ZodObject<{ success: Zod.ZodOptional; status_code: Zod.ZodOptional; message: Zod.ZodOptional; conversations_count: Zod.ZodOptional; attributes: Zod.ZodObject<{ results: Zod.ZodObject<{ updated: Zod.ZodArray; title: Zod.ZodString; category: Zod.ZodEnum<[\"assistant\", \"insights\"]>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, \"many\">>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>, \"many\">; created: Zod.ZodArray; title: Zod.ZodString; category: Zod.ZodEnum<[\"assistant\", \"insights\"]>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, \"many\">>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>, \"many\">; deleted: Zod.ZodArray; skipped: Zod.ZodArray; skip_reason: Zod.ZodLiteral<\"CONVERSATION_NOT_MODIFIED\">; }, \"strip\", Zod.ZodTypeAny, { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }, { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }>, \"many\">; }, \"strip\", Zod.ZodTypeAny, { created: { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }, { created: { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }>; summary: Zod.ZodObject<{ failed: Zod.ZodNumber; skipped: Zod.ZodNumber; succeeded: Zod.ZodNumber; total: Zod.ZodNumber; }, \"strip\", Zod.ZodTypeAny, { total: number; succeeded: number; failed: number; skipped: number; }, { total: number; succeeded: number; failed: number; skipped: number; }>; errors: Zod.ZodOptional; conversations: Zod.ZodArray; }, \"strip\", Zod.ZodTypeAny, { id: string; name?: string | undefined; }, { id: string; name?: string | undefined; }>, \"many\">; }, \"strip\", Zod.ZodTypeAny, { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }, { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }>, \"many\">>; }, \"strip\", Zod.ZodTypeAny, { results: { created: { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }; summary: { total: number; succeeded: number; failed: number; skipped: number; }; errors?: { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }[] | undefined; }, { results: { created: { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }; summary: { total: number; succeeded: number; failed: number; skipped: number; }; errors?: { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }[] | undefined; }>; }, \"strip\", Zod.ZodTypeAny, { attributes: { results: { created: { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }; summary: { total: number; succeeded: number; failed: number; skipped: number; }; errors?: { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }[] | undefined; }; success?: boolean | undefined; status_code?: number | undefined; message?: string | undefined; conversations_count?: number | undefined; }, { attributes: { results: { created: { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }; summary: { total: number; succeeded: number; failed: number; skipped: number; }; errors?: { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }[] | undefined; }; success?: boolean | undefined; status_code?: number | undefined; message?: string | undefined; conversations_count?: number | undefined; }>" + "Zod.ZodObject<{ success: Zod.ZodOptional; status_code: Zod.ZodOptional; message: Zod.ZodOptional; conversations_count: Zod.ZodOptional; attributes: Zod.ZodObject<{ results: Zod.ZodObject<{ updated: Zod.ZodArray; title: Zod.ZodString; category: Zod.ZodEnum<[\"assistant\", \"insights\"]>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, \"many\">>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>, \"many\">; created: Zod.ZodArray; title: Zod.ZodString; category: Zod.ZodEnum<[\"assistant\", \"insights\"]>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, \"many\">>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>, \"many\">; deleted: Zod.ZodArray; skipped: Zod.ZodArray; skip_reason: Zod.ZodLiteral<\"CONVERSATION_NOT_MODIFIED\">; }, \"strip\", Zod.ZodTypeAny, { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }, { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }>, \"many\">; }, \"strip\", Zod.ZodTypeAny, { created: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }, { created: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }>; summary: Zod.ZodObject<{ failed: Zod.ZodNumber; skipped: Zod.ZodNumber; succeeded: Zod.ZodNumber; total: Zod.ZodNumber; }, \"strip\", Zod.ZodTypeAny, { total: number; succeeded: number; failed: number; skipped: number; }, { total: number; succeeded: number; failed: number; skipped: number; }>; errors: Zod.ZodOptional; conversations: Zod.ZodArray; }, \"strip\", Zod.ZodTypeAny, { id: string; name?: string | undefined; }, { id: string; name?: string | undefined; }>, \"many\">; }, \"strip\", Zod.ZodTypeAny, { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }, { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }>, \"many\">>; }, \"strip\", Zod.ZodTypeAny, { results: { created: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }; summary: { total: number; succeeded: number; failed: number; skipped: number; }; errors?: { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }[] | undefined; }, { results: { created: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }; summary: { total: number; succeeded: number; failed: number; skipped: number; }; errors?: { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }[] | undefined; }>; }, \"strip\", Zod.ZodTypeAny, { attributes: { results: { created: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }; summary: { total: number; succeeded: number; failed: number; skipped: number; }; errors?: { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }[] | undefined; }; success?: boolean | undefined; status_code?: number | undefined; message?: string | undefined; conversations_count?: number | undefined; }, { attributes: { results: { created: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }; summary: { total: number; succeeded: number; failed: number; skipped: number; }; errors?: { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }[] | undefined; }; success?: boolean | undefined; status_code?: number | undefined; message?: string | undefined; conversations_count?: number | undefined; }>" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts", "deprecated": false, @@ -2324,7 +2324,7 @@ "label": "BulkCrudActionResults", "description": [], "signature": [ - "Zod.ZodObject<{ updated: Zod.ZodArray; title: Zod.ZodString; category: Zod.ZodEnum<[\"assistant\", \"insights\"]>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, \"many\">>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>, \"many\">; created: Zod.ZodArray; title: Zod.ZodString; category: Zod.ZodEnum<[\"assistant\", \"insights\"]>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, \"many\">>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>, \"many\">; deleted: Zod.ZodArray; skipped: Zod.ZodArray; skip_reason: Zod.ZodLiteral<\"CONVERSATION_NOT_MODIFIED\">; }, \"strip\", Zod.ZodTypeAny, { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }, { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }>, \"many\">; }, \"strip\", Zod.ZodTypeAny, { created: { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }, { created: { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }>" + "Zod.ZodObject<{ updated: Zod.ZodArray; title: Zod.ZodString; category: Zod.ZodEnum<[\"assistant\", \"insights\"]>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, \"many\">>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>, \"many\">; created: Zod.ZodArray; title: Zod.ZodString; category: Zod.ZodEnum<[\"assistant\", \"insights\"]>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, \"many\">>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>, \"many\">; deleted: Zod.ZodArray; skipped: Zod.ZodArray; skip_reason: Zod.ZodLiteral<\"CONVERSATION_NOT_MODIFIED\">; }, \"strip\", Zod.ZodTypeAny, { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }, { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }>, \"many\">; }, \"strip\", Zod.ZodTypeAny, { created: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }, { created: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }>" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts", "deprecated": false, @@ -2414,7 +2414,7 @@ "label": "ConversationCreateProps", "description": [], "signature": [ - "Zod.ZodObject<{ title: Zod.ZodString; category: Zod.ZodOptional>; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; replacements: Zod.ZodOptional, \"many\">>; }, \"strip\", Zod.ZodTypeAny, { title: string; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }, { title: string; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }>" + "Zod.ZodObject<{ title: Zod.ZodString; category: Zod.ZodOptional>; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; replacements: Zod.ZodOptional, \"many\">>; }, \"strip\", Zod.ZodTypeAny, { title: string; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }, { title: string; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }>" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", "deprecated": false, @@ -2459,7 +2459,7 @@ "label": "ConversationResponse", "description": [], "signature": [ - "Zod.ZodObject<{ id: Zod.ZodUnion<[Zod.ZodString, Zod.ZodString]>; title: Zod.ZodString; category: Zod.ZodEnum<[\"assistant\", \"insights\"]>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, \"many\">>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>" + "Zod.ZodObject<{ id: Zod.ZodUnion<[Zod.ZodString, Zod.ZodString]>; title: Zod.ZodString; category: Zod.ZodEnum<[\"assistant\", \"insights\"]>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, \"many\">>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", "deprecated": false, @@ -2489,7 +2489,7 @@ "label": "ConversationUpdateProps", "description": [], "signature": [ - "Zod.ZodObject<{ id: Zod.ZodUnion<[Zod.ZodString, Zod.ZodString]>; title: Zod.ZodOptional; category: Zod.ZodOptional>; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; excludeFromLastConversationStorage: Zod.ZodOptional; replacements: Zod.ZodOptional, \"many\">>; }, \"strip\", Zod.ZodTypeAny, { id: string; title?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }, { id: string; title?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }>" + "Zod.ZodObject<{ id: Zod.ZodUnion<[Zod.ZodString, Zod.ZodString]>; title: Zod.ZodOptional; category: Zod.ZodOptional>; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; excludeFromLastConversationStorage: Zod.ZodOptional; replacements: Zod.ZodOptional, \"many\">>; }, \"strip\", Zod.ZodTypeAny, { id: string; title?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }, { id: string; title?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }>" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts", "deprecated": false, @@ -2504,7 +2504,7 @@ "label": "CreateConversationRequestBody", "description": [], "signature": [ - "Zod.ZodObject<{ title: Zod.ZodString; category: Zod.ZodOptional>; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; replacements: Zod.ZodOptional, \"many\">>; }, \"strip\", Zod.ZodTypeAny, { title: string; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }, { title: string; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }>" + "Zod.ZodObject<{ title: Zod.ZodString; category: Zod.ZodOptional>; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; replacements: Zod.ZodOptional, \"many\">>; }, \"strip\", Zod.ZodTypeAny, { title: string; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }, { title: string; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }>" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", "deprecated": false, @@ -2519,7 +2519,7 @@ "label": "CreateConversationResponse", "description": [], "signature": [ - "Zod.ZodObject<{ id: Zod.ZodUnion<[Zod.ZodString, Zod.ZodString]>; title: Zod.ZodString; category: Zod.ZodEnum<[\"assistant\", \"insights\"]>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, \"many\">>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>" + "Zod.ZodObject<{ id: Zod.ZodUnion<[Zod.ZodString, Zod.ZodString]>; title: Zod.ZodString; category: Zod.ZodEnum<[\"assistant\", \"insights\"]>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, \"many\">>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", "deprecated": false, @@ -2626,7 +2626,7 @@ "label": "DeleteConversationResponse", "description": [], "signature": [ - "Zod.ZodObject<{ id: Zod.ZodUnion<[Zod.ZodString, Zod.ZodString]>; title: Zod.ZodString; category: Zod.ZodEnum<[\"assistant\", \"insights\"]>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, \"many\">>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>" + "Zod.ZodObject<{ id: Zod.ZodUnion<[Zod.ZodString, Zod.ZodString]>; title: Zod.ZodString; category: Zod.ZodEnum<[\"assistant\", \"insights\"]>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, \"many\">>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", "deprecated": false, @@ -2686,7 +2686,7 @@ "label": "ExecuteConnectorRequestBody", "description": [], "signature": [ - "Zod.ZodObject<{ conversationId: Zod.ZodOptional; message: Zod.ZodOptional; model: Zod.ZodOptional; subAction: Zod.ZodEnum<[\"invokeAI\", \"invokeStream\"]>; alertsIndexPattern: Zod.ZodOptional; allow: Zod.ZodOptional>; allowReplacement: Zod.ZodOptional>; isEnabledKnowledgeBase: Zod.ZodOptional; isEnabledRAGAlerts: Zod.ZodOptional; replacements: Zod.ZodArray, \"many\">; size: Zod.ZodOptional; llmType: Zod.ZodEnum<[\"bedrock\", \"openai\"]>; }, \"strip\", Zod.ZodTypeAny, { subAction: \"invokeAI\" | \"invokeStream\"; replacements: { value: string; uuid: string; }[]; llmType: \"bedrock\" | \"openai\"; conversationId?: string | undefined; message?: string | undefined; model?: string | undefined; alertsIndexPattern?: string | undefined; allow?: string[] | undefined; allowReplacement?: string[] | undefined; isEnabledKnowledgeBase?: boolean | undefined; isEnabledRAGAlerts?: boolean | undefined; size?: number | undefined; }, { subAction: \"invokeAI\" | \"invokeStream\"; replacements: { value: string; uuid: string; }[]; llmType: \"bedrock\" | \"openai\"; conversationId?: string | undefined; message?: string | undefined; model?: string | undefined; alertsIndexPattern?: string | undefined; allow?: string[] | undefined; allowReplacement?: string[] | undefined; isEnabledKnowledgeBase?: boolean | undefined; isEnabledRAGAlerts?: boolean | undefined; size?: number | undefined; }>" + "Zod.ZodObject<{ conversationId: Zod.ZodOptional; message: Zod.ZodOptional; model: Zod.ZodOptional; subAction: Zod.ZodEnum<[\"invokeAI\", \"invokeStream\"]>; alertsIndexPattern: Zod.ZodOptional; allow: Zod.ZodOptional>; allowReplacement: Zod.ZodOptional>; isEnabledKnowledgeBase: Zod.ZodOptional; isEnabledRAGAlerts: Zod.ZodOptional; replacements: Zod.ZodArray, \"many\">; size: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { subAction: \"invokeAI\" | \"invokeStream\"; replacements: { value: string; uuid: string; }[]; conversationId?: string | undefined; message?: string | undefined; model?: string | undefined; alertsIndexPattern?: string | undefined; allow?: string[] | undefined; allowReplacement?: string[] | undefined; isEnabledKnowledgeBase?: boolean | undefined; isEnabledRAGAlerts?: boolean | undefined; size?: number | undefined; }, { subAction: \"invokeAI\" | \"invokeStream\"; replacements: { value: string; uuid: string; }[]; conversationId?: string | undefined; message?: string | undefined; model?: string | undefined; alertsIndexPattern?: string | undefined; allow?: string[] | undefined; allowReplacement?: string[] | undefined; isEnabledKnowledgeBase?: boolean | undefined; isEnabledRAGAlerts?: boolean | undefined; size?: number | undefined; }>" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.gen.ts", "deprecated": false, @@ -2746,7 +2746,7 @@ "label": "FindConversationsResponse", "description": [], "signature": [ - "Zod.ZodObject<{ page: Zod.ZodNumber; perPage: Zod.ZodNumber; total: Zod.ZodNumber; data: Zod.ZodArray; title: Zod.ZodString; category: Zod.ZodEnum<[\"assistant\", \"insights\"]>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, \"many\">>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>, \"many\">; }, \"strip\", Zod.ZodTypeAny, { page: number; perPage: number; total: number; data: { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; }, { page: number; perPage: number; total: number; data: { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; }>" + "Zod.ZodObject<{ page: Zod.ZodNumber; perPage: Zod.ZodNumber; total: Zod.ZodNumber; data: Zod.ZodArray; title: Zod.ZodString; category: Zod.ZodEnum<[\"assistant\", \"insights\"]>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, \"many\">>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>, \"many\">; }, \"strip\", Zod.ZodTypeAny, { page: number; perPage: number; total: number; data: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; }, { page: number; perPage: number; total: number; data: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; }>" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/find_conversations_route.gen.ts", "deprecated": false, @@ -2806,7 +2806,7 @@ "label": "FindCurrentUserConversationsResponse", "description": [], "signature": [ - "Zod.ZodObject<{ page: Zod.ZodNumber; perPage: Zod.ZodNumber; total: Zod.ZodNumber; data: Zod.ZodArray; title: Zod.ZodString; category: Zod.ZodEnum<[\"assistant\", \"insights\"]>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, \"many\">>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>, \"many\">; }, \"strip\", Zod.ZodTypeAny, { page: number; perPage: number; total: number; data: { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; }, { page: number; perPage: number; total: number; data: { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; }>" + "Zod.ZodObject<{ page: Zod.ZodNumber; perPage: Zod.ZodNumber; total: Zod.ZodNumber; data: Zod.ZodArray; title: Zod.ZodString; category: Zod.ZodEnum<[\"assistant\", \"insights\"]>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, \"many\">>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>, \"many\">; }, \"strip\", Zod.ZodTypeAny, { page: number; perPage: number; total: number; data: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; }, { page: number; perPage: number; total: number; data: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; }>" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/find_conversations_route.gen.ts", "deprecated": false, @@ -2956,7 +2956,7 @@ "label": "PerformBulkActionRequestBody", "description": [], "signature": [ - "Zod.ZodObject<{ delete: Zod.ZodOptional; ids: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { query?: string | undefined; ids?: string[] | undefined; }, { query?: string | undefined; ids?: string[] | undefined; }>>; create: Zod.ZodOptional>; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; replacements: Zod.ZodOptional, \"many\">>; }, \"strip\", Zod.ZodTypeAny, { title: string; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }, { title: string; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }>, \"many\">>; update: Zod.ZodOptional; title: Zod.ZodOptional; category: Zod.ZodOptional>; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; excludeFromLastConversationStorage: Zod.ZodOptional; replacements: Zod.ZodOptional, \"many\">>; }, \"strip\", Zod.ZodTypeAny, { id: string; title?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }, { id: string; title?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }>, \"many\">>; }, \"strip\", Zod.ZodTypeAny, { delete?: { query?: string | undefined; ids?: string[] | undefined; } | undefined; create?: { title: string; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }[] | undefined; update?: { id: string; title?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }[] | undefined; }, { delete?: { query?: string | undefined; ids?: string[] | undefined; } | undefined; create?: { title: string; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }[] | undefined; update?: { id: string; title?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }[] | undefined; }>" + "Zod.ZodObject<{ delete: Zod.ZodOptional; ids: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { query?: string | undefined; ids?: string[] | undefined; }, { query?: string | undefined; ids?: string[] | undefined; }>>; create: Zod.ZodOptional>; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; replacements: Zod.ZodOptional, \"many\">>; }, \"strip\", Zod.ZodTypeAny, { title: string; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }, { title: string; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }>, \"many\">>; update: Zod.ZodOptional; title: Zod.ZodOptional; category: Zod.ZodOptional>; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; excludeFromLastConversationStorage: Zod.ZodOptional; replacements: Zod.ZodOptional, \"many\">>; }, \"strip\", Zod.ZodTypeAny, { id: string; title?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }, { id: string; title?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }>, \"many\">>; }, \"strip\", Zod.ZodTypeAny, { delete?: { query?: string | undefined; ids?: string[] | undefined; } | undefined; create?: { title: string; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }[] | undefined; update?: { id: string; title?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }[] | undefined; }, { delete?: { query?: string | undefined; ids?: string[] | undefined; } | undefined; create?: { title: string; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }[] | undefined; update?: { id: string; title?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }[] | undefined; }>" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts", "deprecated": false, @@ -2971,7 +2971,7 @@ "label": "PerformBulkActionResponse", "description": [], "signature": [ - "Zod.ZodObject<{ success: Zod.ZodOptional; status_code: Zod.ZodOptional; message: Zod.ZodOptional; conversations_count: Zod.ZodOptional; attributes: Zod.ZodObject<{ results: Zod.ZodObject<{ updated: Zod.ZodArray; title: Zod.ZodString; category: Zod.ZodEnum<[\"assistant\", \"insights\"]>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, \"many\">>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>, \"many\">; created: Zod.ZodArray; title: Zod.ZodString; category: Zod.ZodEnum<[\"assistant\", \"insights\"]>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, \"many\">>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>, \"many\">; deleted: Zod.ZodArray; skipped: Zod.ZodArray; skip_reason: Zod.ZodLiteral<\"CONVERSATION_NOT_MODIFIED\">; }, \"strip\", Zod.ZodTypeAny, { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }, { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }>, \"many\">; }, \"strip\", Zod.ZodTypeAny, { created: { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }, { created: { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }>; summary: Zod.ZodObject<{ failed: Zod.ZodNumber; skipped: Zod.ZodNumber; succeeded: Zod.ZodNumber; total: Zod.ZodNumber; }, \"strip\", Zod.ZodTypeAny, { total: number; succeeded: number; failed: number; skipped: number; }, { total: number; succeeded: number; failed: number; skipped: number; }>; errors: Zod.ZodOptional; conversations: Zod.ZodArray; }, \"strip\", Zod.ZodTypeAny, { id: string; name?: string | undefined; }, { id: string; name?: string | undefined; }>, \"many\">; }, \"strip\", Zod.ZodTypeAny, { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }, { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }>, \"many\">>; }, \"strip\", Zod.ZodTypeAny, { results: { created: { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }; summary: { total: number; succeeded: number; failed: number; skipped: number; }; errors?: { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }[] | undefined; }, { results: { created: { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }; summary: { total: number; succeeded: number; failed: number; skipped: number; }; errors?: { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }[] | undefined; }>; }, \"strip\", Zod.ZodTypeAny, { attributes: { results: { created: { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }; summary: { total: number; succeeded: number; failed: number; skipped: number; }; errors?: { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }[] | undefined; }; success?: boolean | undefined; status_code?: number | undefined; message?: string | undefined; conversations_count?: number | undefined; }, { attributes: { results: { created: { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }; summary: { total: number; succeeded: number; failed: number; skipped: number; }; errors?: { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }[] | undefined; }; success?: boolean | undefined; status_code?: number | undefined; message?: string | undefined; conversations_count?: number | undefined; }>" + "Zod.ZodObject<{ success: Zod.ZodOptional; status_code: Zod.ZodOptional; message: Zod.ZodOptional; conversations_count: Zod.ZodOptional; attributes: Zod.ZodObject<{ results: Zod.ZodObject<{ updated: Zod.ZodArray; title: Zod.ZodString; category: Zod.ZodEnum<[\"assistant\", \"insights\"]>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, \"many\">>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>, \"many\">; created: Zod.ZodArray; title: Zod.ZodString; category: Zod.ZodEnum<[\"assistant\", \"insights\"]>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, \"many\">>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>, \"many\">; deleted: Zod.ZodArray; skipped: Zod.ZodArray; skip_reason: Zod.ZodLiteral<\"CONVERSATION_NOT_MODIFIED\">; }, \"strip\", Zod.ZodTypeAny, { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }, { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }>, \"many\">; }, \"strip\", Zod.ZodTypeAny, { created: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }, { created: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }>; summary: Zod.ZodObject<{ failed: Zod.ZodNumber; skipped: Zod.ZodNumber; succeeded: Zod.ZodNumber; total: Zod.ZodNumber; }, \"strip\", Zod.ZodTypeAny, { total: number; succeeded: number; failed: number; skipped: number; }, { total: number; succeeded: number; failed: number; skipped: number; }>; errors: Zod.ZodOptional; conversations: Zod.ZodArray; }, \"strip\", Zod.ZodTypeAny, { id: string; name?: string | undefined; }, { id: string; name?: string | undefined; }>, \"many\">; }, \"strip\", Zod.ZodTypeAny, { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }, { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }>, \"many\">>; }, \"strip\", Zod.ZodTypeAny, { results: { created: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }; summary: { total: number; succeeded: number; failed: number; skipped: number; }; errors?: { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }[] | undefined; }, { results: { created: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }; summary: { total: number; succeeded: number; failed: number; skipped: number; }; errors?: { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }[] | undefined; }>; }, \"strip\", Zod.ZodTypeAny, { attributes: { results: { created: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }; summary: { total: number; succeeded: number; failed: number; skipped: number; }; errors?: { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }[] | undefined; }; success?: boolean | undefined; status_code?: number | undefined; message?: string | undefined; conversations_count?: number | undefined; }, { attributes: { results: { created: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; updated: { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }[]; skipped: { id: string; skip_reason: \"CONVERSATION_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }; summary: { total: number; succeeded: number; failed: number; skipped: number; }; errors?: { message: string; status_code: number; conversations: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }[] | undefined; }; success?: boolean | undefined; status_code?: number | undefined; message?: string | undefined; conversations_count?: number | undefined; }>" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/bulk_crud_conversations_route.gen.ts", "deprecated": false, @@ -3091,7 +3091,7 @@ "label": "ReadConversationResponse", "description": [], "signature": [ - "Zod.ZodObject<{ id: Zod.ZodUnion<[Zod.ZodString, Zod.ZodString]>; title: Zod.ZodString; category: Zod.ZodEnum<[\"assistant\", \"insights\"]>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, \"many\">>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>" + "Zod.ZodObject<{ id: Zod.ZodUnion<[Zod.ZodString, Zod.ZodString]>; title: Zod.ZodString; category: Zod.ZodEnum<[\"assistant\", \"insights\"]>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, \"many\">>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", "deprecated": false, @@ -3211,7 +3211,7 @@ "label": "UpdateConversationRequestBody", "description": [], "signature": [ - "Zod.ZodObject<{ id: Zod.ZodUnion<[Zod.ZodString, Zod.ZodString]>; title: Zod.ZodOptional; category: Zod.ZodOptional>; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; excludeFromLastConversationStorage: Zod.ZodOptional; replacements: Zod.ZodOptional, \"many\">>; }, \"strip\", Zod.ZodTypeAny, { id: string; title?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }, { id: string; title?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }>" + "Zod.ZodObject<{ id: Zod.ZodUnion<[Zod.ZodString, Zod.ZodString]>; title: Zod.ZodOptional; category: Zod.ZodOptional>; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; excludeFromLastConversationStorage: Zod.ZodOptional; replacements: Zod.ZodOptional, \"many\">>; }, \"strip\", Zod.ZodTypeAny, { id: string; title?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }, { id: string; title?: string | undefined; category?: \"assistant\" | \"insights\" | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; excludeFromLastConversationStorage?: boolean | undefined; replacements?: { value: string; uuid: string; }[] | undefined; }>" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", "deprecated": false, @@ -3241,7 +3241,7 @@ "label": "UpdateConversationResponse", "description": [], "signature": [ - "Zod.ZodObject<{ id: Zod.ZodUnion<[Zod.ZodString, Zod.ZodString]>; title: Zod.ZodString; category: Zod.ZodEnum<[\"assistant\", \"insights\"]>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, \"many\">>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; namespace: string; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; connectorTypeTitle: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>" + "Zod.ZodObject<{ id: Zod.ZodUnion<[Zod.ZodString, Zod.ZodString]>; title: Zod.ZodString; category: Zod.ZodEnum<[\"assistant\", \"insights\"]>; summary: Zod.ZodOptional; timestamp: Zod.ZodOptional; public: Zod.ZodOptional; confidence: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }, { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; }>>; timestamp: Zod.ZodOptional; updatedAt: Zod.ZodOptional; createdAt: Zod.ZodString; replacements: Zod.ZodOptional, \"many\">>; users: Zod.ZodArray; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">; messages: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; role: Zod.ZodEnum<[\"system\", \"user\", \"assistant\"]>; timestamp: Zod.ZodString; isError: Zod.ZodOptional; traceData: Zod.ZodOptional; traceId: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { transactionId?: string | undefined; traceId?: string | undefined; }, { transactionId?: string | undefined; traceId?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }>, \"many\">>; apiConfig: Zod.ZodOptional; provider: Zod.ZodOptional>; model: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }, { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; }>>; isDefault: Zod.ZodOptional; excludeFromLastConversationStorage: Zod.ZodOptional; namespace: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }, { id: string; namespace: string; title: string; createdAt: string; category: \"assistant\" | \"insights\"; users: { id?: string | undefined; name?: string | undefined; }[]; summary?: { content?: string | undefined; timestamp?: string | undefined; public?: boolean | undefined; confidence?: \"medium\" | \"low\" | \"high\" | undefined; } | undefined; timestamp?: string | undefined; updatedAt?: string | undefined; replacements?: { value: string; uuid: string; }[] | undefined; messages?: { timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }[] | undefined; apiConfig?: { connectorId: string; defaultSystemPromptId?: string | undefined; provider?: \"OpenAI\" | \"Azure OpenAI\" | undefined; model?: string | undefined; } | undefined; isDefault?: boolean | undefined; excludeFromLastConversationStorage?: boolean | undefined; }>" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/crud_conversation_route.gen.ts", "deprecated": false, diff --git a/api_docs/kbn_elastic_assistant_common.mdx b/api_docs/kbn_elastic_assistant_common.mdx index 57cf5499fac7d..e3ac5247143cd 100644 --- a/api_docs/kbn_elastic_assistant_common.mdx +++ b/api_docs/kbn_elastic_assistant_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-elastic-assistant-common title: "@kbn/elastic-assistant-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/elastic-assistant-common plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/elastic-assistant-common'] --- import kbnElasticAssistantCommonObj from './kbn_elastic_assistant_common.devdocs.json'; diff --git a/api_docs/kbn_es.mdx b/api_docs/kbn_es.mdx index 30f4943b051fb..5b1b571aa48e5 100644 --- a/api_docs/kbn_es.mdx +++ b/api_docs/kbn_es.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es title: "@kbn/es" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es'] --- import kbnEsObj from './kbn_es.devdocs.json'; diff --git a/api_docs/kbn_es_archiver.mdx b/api_docs/kbn_es_archiver.mdx index 7ea9fa193b2b5..1b10c8da8f905 100644 --- a/api_docs/kbn_es_archiver.mdx +++ b/api_docs/kbn_es_archiver.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-archiver title: "@kbn/es-archiver" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-archiver plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-archiver'] --- import kbnEsArchiverObj from './kbn_es_archiver.devdocs.json'; diff --git a/api_docs/kbn_es_errors.mdx b/api_docs/kbn_es_errors.mdx index 010476418bda6..3e4ef0c13e3b3 100644 --- a/api_docs/kbn_es_errors.mdx +++ b/api_docs/kbn_es_errors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-errors title: "@kbn/es-errors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-errors plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-errors'] --- import kbnEsErrorsObj from './kbn_es_errors.devdocs.json'; diff --git a/api_docs/kbn_es_query.mdx b/api_docs/kbn_es_query.mdx index a6d2232292788..ed09c9970256a 100644 --- a/api_docs/kbn_es_query.mdx +++ b/api_docs/kbn_es_query.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-query title: "@kbn/es-query" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-query plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-query'] --- import kbnEsQueryObj from './kbn_es_query.devdocs.json'; diff --git a/api_docs/kbn_es_types.mdx b/api_docs/kbn_es_types.mdx index 6d64c54dfda4f..bb697bcdfc282 100644 --- a/api_docs/kbn_es_types.mdx +++ b/api_docs/kbn_es_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-types title: "@kbn/es-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-types plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-types'] --- import kbnEsTypesObj from './kbn_es_types.devdocs.json'; diff --git a/api_docs/kbn_eslint_plugin_imports.mdx b/api_docs/kbn_eslint_plugin_imports.mdx index 2b390f7be90d0..143c5e83337fd 100644 --- a/api_docs/kbn_eslint_plugin_imports.mdx +++ b/api_docs/kbn_eslint_plugin_imports.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-eslint-plugin-imports title: "@kbn/eslint-plugin-imports" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/eslint-plugin-imports plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/eslint-plugin-imports'] --- import kbnEslintPluginImportsObj from './kbn_eslint_plugin_imports.devdocs.json'; diff --git a/api_docs/kbn_esql_utils.devdocs.json b/api_docs/kbn_esql_utils.devdocs.json index a17f9027dc90d..cc82826790a62 100644 --- a/api_docs/kbn_esql_utils.devdocs.json +++ b/api_docs/kbn_esql_utils.devdocs.json @@ -89,6 +89,54 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/esql-utils", + "id": "def-common.getESQLWithSafeLimit", + "type": "Function", + "tags": [], + "label": "getESQLWithSafeLimit", + "description": [], + "signature": [ + "(esql: string, limit: number) => string" + ], + "path": "packages/kbn-esql-utils/src/utils/get_esql_with_safe_limit.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/esql-utils", + "id": "def-common.getESQLWithSafeLimit.$1", + "type": "string", + "tags": [], + "label": "esql", + "description": [], + "signature": [ + "string" + ], + "path": "packages/kbn-esql-utils/src/utils/get_esql_with_safe_limit.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/esql-utils", + "id": "def-common.getESQLWithSafeLimit.$2", + "type": "number", + "tags": [], + "label": "limit", + "description": [], + "signature": [ + "number" + ], + "path": "packages/kbn-esql-utils/src/utils/get_esql_with_safe_limit.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/esql-utils", "id": "def-common.getIndexForESQLQuery", diff --git a/api_docs/kbn_esql_utils.mdx b/api_docs/kbn_esql_utils.mdx index 5c4569129acd8..d351956ab5a45 100644 --- a/api_docs/kbn_esql_utils.mdx +++ b/api_docs/kbn_esql_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-esql-utils title: "@kbn/esql-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/esql-utils plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/esql-utils'] --- import kbnEsqlUtilsObj from './kbn_esql_utils.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/k | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 17 | 0 | 15 | 0 | +| 20 | 0 | 18 | 0 | ## Common diff --git a/api_docs/kbn_event_annotation_common.mdx b/api_docs/kbn_event_annotation_common.mdx index c3b3e0f28f5b0..59d655d0a32f8 100644 --- a/api_docs/kbn_event_annotation_common.mdx +++ b/api_docs/kbn_event_annotation_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-event-annotation-common title: "@kbn/event-annotation-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/event-annotation-common plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/event-annotation-common'] --- import kbnEventAnnotationCommonObj from './kbn_event_annotation_common.devdocs.json'; diff --git a/api_docs/kbn_event_annotation_components.mdx b/api_docs/kbn_event_annotation_components.mdx index 3a135bb5be727..4a74b7722ada3 100644 --- a/api_docs/kbn_event_annotation_components.mdx +++ b/api_docs/kbn_event_annotation_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-event-annotation-components title: "@kbn/event-annotation-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/event-annotation-components plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/event-annotation-components'] --- import kbnEventAnnotationComponentsObj from './kbn_event_annotation_components.devdocs.json'; diff --git a/api_docs/kbn_expandable_flyout.mdx b/api_docs/kbn_expandable_flyout.mdx index 1fcec8e776e88..ff9105f5abb2f 100644 --- a/api_docs/kbn_expandable_flyout.mdx +++ b/api_docs/kbn_expandable_flyout.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-expandable-flyout title: "@kbn/expandable-flyout" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/expandable-flyout plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/expandable-flyout'] --- import kbnExpandableFlyoutObj from './kbn_expandable_flyout.devdocs.json'; diff --git a/api_docs/kbn_field_types.mdx b/api_docs/kbn_field_types.mdx index fffd4af14781c..c8a109435f888 100644 --- a/api_docs/kbn_field_types.mdx +++ b/api_docs/kbn_field_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-field-types title: "@kbn/field-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/field-types plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/field-types'] --- import kbnFieldTypesObj from './kbn_field_types.devdocs.json'; diff --git a/api_docs/kbn_field_utils.devdocs.json b/api_docs/kbn_field_utils.devdocs.json index 8a569d9260e0c..157c6b0aeaef4 100644 --- a/api_docs/kbn_field_utils.devdocs.json +++ b/api_docs/kbn_field_utils.devdocs.json @@ -500,6 +500,55 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/field-utils", + "id": "def-common.getTextBasedColumnIconType", + "type": "Function", + "tags": [], + "label": "getTextBasedColumnIconType", + "description": [], + "signature": [ + "(columnMeta: { type: ", + { + "pluginId": "expressions", + "scope": "common", + "docId": "kibExpressionsPluginApi", + "section": "def-common.DatatableColumnType", + "text": "DatatableColumnType" + }, + "; esType?: string | undefined; } | null | undefined) => string | null" + ], + "path": "packages/kbn-field-utils/src/utils/get_text_based_column_icon_type.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/field-utils", + "id": "def-common.getTextBasedColumnIconType.$1", + "type": "CompoundType", + "tags": [], + "label": "columnMeta", + "description": [], + "signature": [ + "{ type: ", + { + "pluginId": "expressions", + "scope": "common", + "docId": "kibExpressionsPluginApi", + "section": "def-common.DatatableColumnType", + "text": "DatatableColumnType" + }, + "; esType?: string | undefined; } | null | undefined" + ], + "path": "packages/kbn-field-utils/src/utils/get_text_based_column_icon_type.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/field-utils", "id": "def-common.isKnownFieldType", diff --git a/api_docs/kbn_field_utils.mdx b/api_docs/kbn_field_utils.mdx index 26fd4b63b8f43..828cca0307b5b 100644 --- a/api_docs/kbn_field_utils.mdx +++ b/api_docs/kbn_field_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-field-utils title: "@kbn/field-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/field-utils plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/field-utils'] --- import kbnFieldUtilsObj from './kbn_field_utils.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/k | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 48 | 0 | 40 | 1 | +| 50 | 0 | 42 | 1 | ## Common diff --git a/api_docs/kbn_find_used_node_modules.mdx b/api_docs/kbn_find_used_node_modules.mdx index 26958bccf1c1a..8c40402312e1b 100644 --- a/api_docs/kbn_find_used_node_modules.mdx +++ b/api_docs/kbn_find_used_node_modules.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-find-used-node-modules title: "@kbn/find-used-node-modules" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/find-used-node-modules plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/find-used-node-modules'] --- import kbnFindUsedNodeModulesObj from './kbn_find_used_node_modules.devdocs.json'; diff --git a/api_docs/kbn_formatters.mdx b/api_docs/kbn_formatters.mdx index 6044b6e1cddd4..35facf813781d 100644 --- a/api_docs/kbn_formatters.mdx +++ b/api_docs/kbn_formatters.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-formatters title: "@kbn/formatters" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/formatters plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/formatters'] --- import kbnFormattersObj from './kbn_formatters.devdocs.json'; diff --git a/api_docs/kbn_ftr_common_functional_services.mdx b/api_docs/kbn_ftr_common_functional_services.mdx index f511a06f969da..53f7dca88cc44 100644 --- a/api_docs/kbn_ftr_common_functional_services.mdx +++ b/api_docs/kbn_ftr_common_functional_services.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ftr-common-functional-services title: "@kbn/ftr-common-functional-services" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ftr-common-functional-services plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ftr-common-functional-services'] --- import kbnFtrCommonFunctionalServicesObj from './kbn_ftr_common_functional_services.devdocs.json'; diff --git a/api_docs/kbn_ftr_common_functional_ui_services.mdx b/api_docs/kbn_ftr_common_functional_ui_services.mdx index 31c51b68b0377..3ed30caebafe8 100644 --- a/api_docs/kbn_ftr_common_functional_ui_services.mdx +++ b/api_docs/kbn_ftr_common_functional_ui_services.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ftr-common-functional-ui-services title: "@kbn/ftr-common-functional-ui-services" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ftr-common-functional-ui-services plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ftr-common-functional-ui-services'] --- import kbnFtrCommonFunctionalUiServicesObj from './kbn_ftr_common_functional_ui_services.devdocs.json'; diff --git a/api_docs/kbn_generate.mdx b/api_docs/kbn_generate.mdx index f1ea373ba15b1..4cb492af7ecdd 100644 --- a/api_docs/kbn_generate.mdx +++ b/api_docs/kbn_generate.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-generate title: "@kbn/generate" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/generate plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate'] --- import kbnGenerateObj from './kbn_generate.devdocs.json'; diff --git a/api_docs/kbn_generate_console_definitions.mdx b/api_docs/kbn_generate_console_definitions.mdx index 8e765ccdd176e..c1597fec67b0a 100644 --- a/api_docs/kbn_generate_console_definitions.mdx +++ b/api_docs/kbn_generate_console_definitions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-generate-console-definitions title: "@kbn/generate-console-definitions" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/generate-console-definitions plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate-console-definitions'] --- import kbnGenerateConsoleDefinitionsObj from './kbn_generate_console_definitions.devdocs.json'; diff --git a/api_docs/kbn_generate_csv.mdx b/api_docs/kbn_generate_csv.mdx index 9af1b1dd9da97..10f859455cadc 100644 --- a/api_docs/kbn_generate_csv.mdx +++ b/api_docs/kbn_generate_csv.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-generate-csv title: "@kbn/generate-csv" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/generate-csv plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate-csv'] --- import kbnGenerateCsvObj from './kbn_generate_csv.devdocs.json'; diff --git a/api_docs/kbn_guided_onboarding.mdx b/api_docs/kbn_guided_onboarding.mdx index fe3c76ddcf512..d754102c981a6 100644 --- a/api_docs/kbn_guided_onboarding.mdx +++ b/api_docs/kbn_guided_onboarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-guided-onboarding title: "@kbn/guided-onboarding" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/guided-onboarding plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/guided-onboarding'] --- import kbnGuidedOnboardingObj from './kbn_guided_onboarding.devdocs.json'; diff --git a/api_docs/kbn_handlebars.mdx b/api_docs/kbn_handlebars.mdx index 35c9084d5cc9a..c2a8449b7c48e 100644 --- a/api_docs/kbn_handlebars.mdx +++ b/api_docs/kbn_handlebars.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-handlebars title: "@kbn/handlebars" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/handlebars plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/handlebars'] --- import kbnHandlebarsObj from './kbn_handlebars.devdocs.json'; diff --git a/api_docs/kbn_hapi_mocks.mdx b/api_docs/kbn_hapi_mocks.mdx index 2517766e37b6a..cdcd7346f9e6f 100644 --- a/api_docs/kbn_hapi_mocks.mdx +++ b/api_docs/kbn_hapi_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-hapi-mocks title: "@kbn/hapi-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/hapi-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/hapi-mocks'] --- import kbnHapiMocksObj from './kbn_hapi_mocks.devdocs.json'; diff --git a/api_docs/kbn_health_gateway_server.mdx b/api_docs/kbn_health_gateway_server.mdx index 3b38a27d46a42..4054c8c67f720 100644 --- a/api_docs/kbn_health_gateway_server.mdx +++ b/api_docs/kbn_health_gateway_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-health-gateway-server title: "@kbn/health-gateway-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/health-gateway-server plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/health-gateway-server'] --- import kbnHealthGatewayServerObj from './kbn_health_gateway_server.devdocs.json'; diff --git a/api_docs/kbn_home_sample_data_card.mdx b/api_docs/kbn_home_sample_data_card.mdx index 05e19c90be938..d8004ade14288 100644 --- a/api_docs/kbn_home_sample_data_card.mdx +++ b/api_docs/kbn_home_sample_data_card.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-home-sample-data-card title: "@kbn/home-sample-data-card" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/home-sample-data-card plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/home-sample-data-card'] --- import kbnHomeSampleDataCardObj from './kbn_home_sample_data_card.devdocs.json'; diff --git a/api_docs/kbn_home_sample_data_tab.mdx b/api_docs/kbn_home_sample_data_tab.mdx index f1e5b1ca678a6..9164acb186a50 100644 --- a/api_docs/kbn_home_sample_data_tab.mdx +++ b/api_docs/kbn_home_sample_data_tab.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-home-sample-data-tab title: "@kbn/home-sample-data-tab" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/home-sample-data-tab plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/home-sample-data-tab'] --- import kbnHomeSampleDataTabObj from './kbn_home_sample_data_tab.devdocs.json'; diff --git a/api_docs/kbn_i18n.mdx b/api_docs/kbn_i18n.mdx index b968f83e53c3d..9897f15515be9 100644 --- a/api_docs/kbn_i18n.mdx +++ b/api_docs/kbn_i18n.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-i18n title: "@kbn/i18n" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/i18n plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/i18n'] --- import kbnI18nObj from './kbn_i18n.devdocs.json'; diff --git a/api_docs/kbn_i18n_react.mdx b/api_docs/kbn_i18n_react.mdx index 961ba25afe16b..c4c0374f02eba 100644 --- a/api_docs/kbn_i18n_react.mdx +++ b/api_docs/kbn_i18n_react.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-i18n-react title: "@kbn/i18n-react" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/i18n-react plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/i18n-react'] --- import kbnI18nReactObj from './kbn_i18n_react.devdocs.json'; diff --git a/api_docs/kbn_import_resolver.mdx b/api_docs/kbn_import_resolver.mdx index 520cceb2cad0e..3763aa6fc87e8 100644 --- a/api_docs/kbn_import_resolver.mdx +++ b/api_docs/kbn_import_resolver.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-import-resolver title: "@kbn/import-resolver" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/import-resolver plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/import-resolver'] --- import kbnImportResolverObj from './kbn_import_resolver.devdocs.json'; diff --git a/api_docs/kbn_infra_forge.mdx b/api_docs/kbn_infra_forge.mdx index 5347f6c8b56b1..7b8f4615d6cb9 100644 --- a/api_docs/kbn_infra_forge.mdx +++ b/api_docs/kbn_infra_forge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-infra-forge title: "@kbn/infra-forge" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/infra-forge plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/infra-forge'] --- import kbnInfraForgeObj from './kbn_infra_forge.devdocs.json'; diff --git a/api_docs/kbn_interpreter.mdx b/api_docs/kbn_interpreter.mdx index 08b9946ea6423..eda00f6099a2b 100644 --- a/api_docs/kbn_interpreter.mdx +++ b/api_docs/kbn_interpreter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-interpreter title: "@kbn/interpreter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/interpreter plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/interpreter'] --- import kbnInterpreterObj from './kbn_interpreter.devdocs.json'; diff --git a/api_docs/kbn_io_ts_utils.mdx b/api_docs/kbn_io_ts_utils.mdx index 78d2355964402..fe30a724dca80 100644 --- a/api_docs/kbn_io_ts_utils.mdx +++ b/api_docs/kbn_io_ts_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-io-ts-utils title: "@kbn/io-ts-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/io-ts-utils plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/io-ts-utils'] --- import kbnIoTsUtilsObj from './kbn_io_ts_utils.devdocs.json'; diff --git a/api_docs/kbn_jest_serializers.mdx b/api_docs/kbn_jest_serializers.mdx index c0840e261f668..87950b8c77e8b 100644 --- a/api_docs/kbn_jest_serializers.mdx +++ b/api_docs/kbn_jest_serializers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-jest-serializers title: "@kbn/jest-serializers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/jest-serializers plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/jest-serializers'] --- import kbnJestSerializersObj from './kbn_jest_serializers.devdocs.json'; diff --git a/api_docs/kbn_journeys.mdx b/api_docs/kbn_journeys.mdx index 37f426a632435..36f69689f01b2 100644 --- a/api_docs/kbn_journeys.mdx +++ b/api_docs/kbn_journeys.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-journeys title: "@kbn/journeys" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/journeys plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/journeys'] --- import kbnJourneysObj from './kbn_journeys.devdocs.json'; diff --git a/api_docs/kbn_json_ast.mdx b/api_docs/kbn_json_ast.mdx index 7a0fe3c935241..07fe3cedc6154 100644 --- a/api_docs/kbn_json_ast.mdx +++ b/api_docs/kbn_json_ast.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-json-ast title: "@kbn/json-ast" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/json-ast plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/json-ast'] --- import kbnJsonAstObj from './kbn_json_ast.devdocs.json'; diff --git a/api_docs/kbn_kibana_manifest_schema.mdx b/api_docs/kbn_kibana_manifest_schema.mdx index c4a7ce57f320d..b88677b62e72c 100644 --- a/api_docs/kbn_kibana_manifest_schema.mdx +++ b/api_docs/kbn_kibana_manifest_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-kibana-manifest-schema title: "@kbn/kibana-manifest-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/kibana-manifest-schema plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/kibana-manifest-schema'] --- import kbnKibanaManifestSchemaObj from './kbn_kibana_manifest_schema.devdocs.json'; diff --git a/api_docs/kbn_language_documentation_popover.mdx b/api_docs/kbn_language_documentation_popover.mdx index f2394ee3421b7..c376c743e113d 100644 --- a/api_docs/kbn_language_documentation_popover.mdx +++ b/api_docs/kbn_language_documentation_popover.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-language-documentation-popover title: "@kbn/language-documentation-popover" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/language-documentation-popover plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/language-documentation-popover'] --- import kbnLanguageDocumentationPopoverObj from './kbn_language_documentation_popover.devdocs.json'; diff --git a/api_docs/kbn_lens_embeddable_utils.mdx b/api_docs/kbn_lens_embeddable_utils.mdx index 20c2525cce932..58c260e39f17b 100644 --- a/api_docs/kbn_lens_embeddable_utils.mdx +++ b/api_docs/kbn_lens_embeddable_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-lens-embeddable-utils title: "@kbn/lens-embeddable-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/lens-embeddable-utils plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/lens-embeddable-utils'] --- import kbnLensEmbeddableUtilsObj from './kbn_lens_embeddable_utils.devdocs.json'; diff --git a/api_docs/kbn_lens_formula_docs.mdx b/api_docs/kbn_lens_formula_docs.mdx index 525151d8348b1..e439dfb5c1f16 100644 --- a/api_docs/kbn_lens_formula_docs.mdx +++ b/api_docs/kbn_lens_formula_docs.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-lens-formula-docs title: "@kbn/lens-formula-docs" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/lens-formula-docs plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/lens-formula-docs'] --- import kbnLensFormulaDocsObj from './kbn_lens_formula_docs.devdocs.json'; diff --git a/api_docs/kbn_logging.mdx b/api_docs/kbn_logging.mdx index 5b8bf9cb16e05..bd76cdfb0a0c8 100644 --- a/api_docs/kbn_logging.mdx +++ b/api_docs/kbn_logging.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-logging title: "@kbn/logging" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/logging plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/logging'] --- import kbnLoggingObj from './kbn_logging.devdocs.json'; diff --git a/api_docs/kbn_logging_mocks.mdx b/api_docs/kbn_logging_mocks.mdx index 1fee6d5c654d7..80ae0740d72e0 100644 --- a/api_docs/kbn_logging_mocks.mdx +++ b/api_docs/kbn_logging_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-logging-mocks title: "@kbn/logging-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/logging-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/logging-mocks'] --- import kbnLoggingMocksObj from './kbn_logging_mocks.devdocs.json'; diff --git a/api_docs/kbn_managed_content_badge.mdx b/api_docs/kbn_managed_content_badge.mdx index e73cbfcbbc676..42eab5dd0e7ab 100644 --- a/api_docs/kbn_managed_content_badge.mdx +++ b/api_docs/kbn_managed_content_badge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-managed-content-badge title: "@kbn/managed-content-badge" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/managed-content-badge plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/managed-content-badge'] --- import kbnManagedContentBadgeObj from './kbn_managed_content_badge.devdocs.json'; diff --git a/api_docs/kbn_managed_vscode_config.mdx b/api_docs/kbn_managed_vscode_config.mdx index 57c304f19c397..861f7f85f0209 100644 --- a/api_docs/kbn_managed_vscode_config.mdx +++ b/api_docs/kbn_managed_vscode_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-managed-vscode-config title: "@kbn/managed-vscode-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/managed-vscode-config plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/managed-vscode-config'] --- import kbnManagedVscodeConfigObj from './kbn_managed_vscode_config.devdocs.json'; diff --git a/api_docs/kbn_management_cards_navigation.devdocs.json b/api_docs/kbn_management_cards_navigation.devdocs.json index 77649410b82bf..6e5588dff2455 100644 --- a/api_docs/kbn_management_cards_navigation.devdocs.json +++ b/api_docs/kbn_management_cards_navigation.devdocs.json @@ -160,7 +160,13 @@ "description": [], "signature": [ "Record | undefined" ], "path": "packages/kbn-management/cards_navigation/src/types.ts", @@ -202,8 +208,40 @@ "deprecated": false, "trackAdoption": false, "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/management-cards-navigation", + "id": "def-common.CardNavExtensionDefinition", + "type": "Type", + "tags": [], + "label": "CardNavExtensionDefinition", + "description": [], + "signature": [ + "AppDefinition", + " & ({ skipValidation?: false | undefined; } | { skipValidation: true; href: string; title: string; })" + ], + "path": "packages/kbn-management/cards_navigation/src/types.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false } ], - "objects": [] + "objects": [ + { + "parentPluginId": "@kbn/management-cards-navigation", + "id": "def-common.appCategories", + "type": "Object", + "tags": [], + "label": "appCategories", + "description": [], + "signature": [ + "{ readonly DATA: \"data\"; readonly ACCESS: \"access\"; readonly ALERTS: \"alerts\"; readonly CONTENT: \"content\"; readonly OTHER: \"other\"; }" + ], + "path": "packages/kbn-management/cards_navigation/src/types.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ] } } \ No newline at end of file diff --git a/api_docs/kbn_management_cards_navigation.mdx b/api_docs/kbn_management_cards_navigation.mdx index ea7d909abc26e..2d3afd75f833b 100644 --- a/api_docs/kbn_management_cards_navigation.mdx +++ b/api_docs/kbn_management_cards_navigation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-cards-navigation title: "@kbn/management-cards-navigation" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-cards-navigation plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-cards-navigation'] --- import kbnManagementCardsNavigationObj from './kbn_management_cards_navigation.devdocs.json'; @@ -21,10 +21,13 @@ Contact [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kiban | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 11 | 0 | 10 | 2 | +| 13 | 0 | 12 | 2 | ## Common +### Objects + + ### Functions diff --git a/api_docs/kbn_management_settings_application.mdx b/api_docs/kbn_management_settings_application.mdx index 87f8a18ed4052..3e0a952e76a4c 100644 --- a/api_docs/kbn_management_settings_application.mdx +++ b/api_docs/kbn_management_settings_application.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-application title: "@kbn/management-settings-application" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-application plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-application'] --- import kbnManagementSettingsApplicationObj from './kbn_management_settings_application.devdocs.json'; diff --git a/api_docs/kbn_management_settings_components_field_category.mdx b/api_docs/kbn_management_settings_components_field_category.mdx index 3cff5ef06ef52..96302a897c6f4 100644 --- a/api_docs/kbn_management_settings_components_field_category.mdx +++ b/api_docs/kbn_management_settings_components_field_category.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-components-field-category title: "@kbn/management-settings-components-field-category" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-components-field-category plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-components-field-category'] --- import kbnManagementSettingsComponentsFieldCategoryObj from './kbn_management_settings_components_field_category.devdocs.json'; diff --git a/api_docs/kbn_management_settings_components_field_input.devdocs.json b/api_docs/kbn_management_settings_components_field_input.devdocs.json index 6dc83478cd1b3..7c4b24c35c62e 100644 --- a/api_docs/kbn_management_settings_components_field_input.devdocs.json +++ b/api_docs/kbn_management_settings_components_field_input.devdocs.json @@ -176,7 +176,7 @@ "The {@link FieldDefinition} for the component." ], "signature": [ - "{ type: T; id: string; name: string; ariaAttributes: { ariaLabel: string; ariaDescribedBy?: string | undefined; }; }" + "{ id: string; type: T; name: string; ariaAttributes: { ariaLabel: string; ariaDescribedBy?: string | undefined; }; }" ], "path": "packages/kbn-management/settings/components/field_input/field_input.tsx", "deprecated": false, @@ -417,7 +417,7 @@ "label": "field", "description": [], "signature": [ - "{ type: T; id: string; defaultValue?: ", + "{ id: string; type: T; defaultValue?: ", { "pluginId": "@kbn/management-settings-types", "scope": "common", diff --git a/api_docs/kbn_management_settings_components_field_input.mdx b/api_docs/kbn_management_settings_components_field_input.mdx index f70f1b7850173..bf6fd3c337de1 100644 --- a/api_docs/kbn_management_settings_components_field_input.mdx +++ b/api_docs/kbn_management_settings_components_field_input.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-components-field-input title: "@kbn/management-settings-components-field-input" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-components-field-input plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-components-field-input'] --- import kbnManagementSettingsComponentsFieldInputObj from './kbn_management_settings_components_field_input.devdocs.json'; diff --git a/api_docs/kbn_management_settings_components_field_row.devdocs.json b/api_docs/kbn_management_settings_components_field_row.devdocs.json index 052a3e23ff500..021c7a73159f8 100644 --- a/api_docs/kbn_management_settings_components_field_row.devdocs.json +++ b/api_docs/kbn_management_settings_components_field_row.devdocs.json @@ -195,7 +195,7 @@ "The {@link FieldDefinition} corresponding the setting." ], "signature": [ - "{ type: ", + "{ id: string; type: ", { "pluginId": "@kbn/core-ui-settings-common", "scope": "common", @@ -203,7 +203,7 @@ "section": "def-common.UiSettingsType", "text": "UiSettingsType" }, - "; id: string; defaultValue?: string | number | boolean | (string | number)[] | null | undefined; name: string; groupId: string; displayName: string; isCustom: boolean; isOverridden: boolean; ariaAttributes: { ariaLabel: string; ariaDescribedBy?: string | undefined; }; savedValue?: string | number | boolean | (string | number)[] | null | undefined; defaultValueDisplay: string; isDefaultValue: boolean; unsavedFieldId: string; }" + "; defaultValue?: string | number | boolean | (string | number)[] | null | undefined; name: string; groupId: string; displayName: string; isCustom: boolean; isOverridden: boolean; ariaAttributes: { ariaLabel: string; ariaDescribedBy?: string | undefined; }; savedValue?: string | number | boolean | (string | number)[] | null | undefined; defaultValueDisplay: string; isDefaultValue: boolean; unsavedFieldId: string; }" ], "path": "packages/kbn-management/settings/components/field_row/field_row.tsx", "deprecated": false, diff --git a/api_docs/kbn_management_settings_components_field_row.mdx b/api_docs/kbn_management_settings_components_field_row.mdx index ac3e84262c111..e8f0dd2e2d05e 100644 --- a/api_docs/kbn_management_settings_components_field_row.mdx +++ b/api_docs/kbn_management_settings_components_field_row.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-components-field-row title: "@kbn/management-settings-components-field-row" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-components-field-row plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-components-field-row'] --- import kbnManagementSettingsComponentsFieldRowObj from './kbn_management_settings_components_field_row.devdocs.json'; diff --git a/api_docs/kbn_management_settings_components_form.mdx b/api_docs/kbn_management_settings_components_form.mdx index 8fd0ffbe0ddf9..efb212c2bd49a 100644 --- a/api_docs/kbn_management_settings_components_form.mdx +++ b/api_docs/kbn_management_settings_components_form.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-components-form title: "@kbn/management-settings-components-form" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-components-form plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-components-form'] --- import kbnManagementSettingsComponentsFormObj from './kbn_management_settings_components_form.devdocs.json'; diff --git a/api_docs/kbn_management_settings_field_definition.mdx b/api_docs/kbn_management_settings_field_definition.mdx index f38aee769fedb..9aabc085130b1 100644 --- a/api_docs/kbn_management_settings_field_definition.mdx +++ b/api_docs/kbn_management_settings_field_definition.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-field-definition title: "@kbn/management-settings-field-definition" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-field-definition plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-field-definition'] --- import kbnManagementSettingsFieldDefinitionObj from './kbn_management_settings_field_definition.devdocs.json'; diff --git a/api_docs/kbn_management_settings_ids.devdocs.json b/api_docs/kbn_management_settings_ids.devdocs.json index a87411997c33e..3fb03f8e0f772 100644 --- a/api_docs/kbn_management_settings_ids.devdocs.json +++ b/api_docs/kbn_management_settings_ids.devdocs.json @@ -1357,6 +1357,21 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "@kbn/management-settings-ids", + "id": "def-common.OBSERVABILITY_LOGS_EXPLORER_ALLOWED_DATA_VIEWS_ID", + "type": "string", + "tags": [], + "label": "OBSERVABILITY_LOGS_EXPLORER_ALLOWED_DATA_VIEWS_ID", + "description": [], + "signature": [ + "\"observability:logsExplorer:allowedDataViews\"" + ], + "path": "packages/kbn-management/settings/setting_ids/index.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/management-settings-ids", "id": "def-common.OBSERVABILITY_MAX_SUGGESTIONS_ID", diff --git a/api_docs/kbn_management_settings_ids.mdx b/api_docs/kbn_management_settings_ids.mdx index 3e0e8062cff8f..f385b71f631a3 100644 --- a/api_docs/kbn_management_settings_ids.mdx +++ b/api_docs/kbn_management_settings_ids.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-ids title: "@kbn/management-settings-ids" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-ids plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-ids'] --- import kbnManagementSettingsIdsObj from './kbn_management_settings_ids.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/appex-sharedux @elastic/kibana-management](https://github.com/ | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 135 | 0 | 132 | 0 | +| 136 | 0 | 133 | 0 | ## Common diff --git a/api_docs/kbn_management_settings_section_registry.devdocs.json b/api_docs/kbn_management_settings_section_registry.devdocs.json index 7fa2b008921bf..a8d81440a139d 100644 --- a/api_docs/kbn_management_settings_section_registry.devdocs.json +++ b/api_docs/kbn_management_settings_section_registry.devdocs.json @@ -254,7 +254,7 @@ "label": "enableSaving", "description": [], "signature": [ - "{ global: boolean; namespace: boolean; }" + "{ namespace: boolean; global: boolean; }" ], "path": "packages/kbn-management/settings/section_registry/section_registry.ts", "deprecated": false, diff --git a/api_docs/kbn_management_settings_section_registry.mdx b/api_docs/kbn_management_settings_section_registry.mdx index 4ff5402cdee35..1ce83b080179f 100644 --- a/api_docs/kbn_management_settings_section_registry.mdx +++ b/api_docs/kbn_management_settings_section_registry.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-section-registry title: "@kbn/management-settings-section-registry" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-section-registry plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-section-registry'] --- import kbnManagementSettingsSectionRegistryObj from './kbn_management_settings_section_registry.devdocs.json'; diff --git a/api_docs/kbn_management_settings_types.mdx b/api_docs/kbn_management_settings_types.mdx index 5f3df87e24f2f..41ec0f97fd1b2 100644 --- a/api_docs/kbn_management_settings_types.mdx +++ b/api_docs/kbn_management_settings_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-types title: "@kbn/management-settings-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-types plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-types'] --- import kbnManagementSettingsTypesObj from './kbn_management_settings_types.devdocs.json'; diff --git a/api_docs/kbn_management_settings_utilities.mdx b/api_docs/kbn_management_settings_utilities.mdx index 3dd039b26781c..d9582d79446c8 100644 --- a/api_docs/kbn_management_settings_utilities.mdx +++ b/api_docs/kbn_management_settings_utilities.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-utilities title: "@kbn/management-settings-utilities" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-utilities plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-utilities'] --- import kbnManagementSettingsUtilitiesObj from './kbn_management_settings_utilities.devdocs.json'; diff --git a/api_docs/kbn_management_storybook_config.mdx b/api_docs/kbn_management_storybook_config.mdx index 68cb7f2edb6f6..3a5b0a9d45a59 100644 --- a/api_docs/kbn_management_storybook_config.mdx +++ b/api_docs/kbn_management_storybook_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-storybook-config title: "@kbn/management-storybook-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-storybook-config plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-storybook-config'] --- import kbnManagementStorybookConfigObj from './kbn_management_storybook_config.devdocs.json'; diff --git a/api_docs/kbn_mapbox_gl.mdx b/api_docs/kbn_mapbox_gl.mdx index b61744009c507..7f75c4aca7789 100644 --- a/api_docs/kbn_mapbox_gl.mdx +++ b/api_docs/kbn_mapbox_gl.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-mapbox-gl title: "@kbn/mapbox-gl" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/mapbox-gl plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/mapbox-gl'] --- import kbnMapboxGlObj from './kbn_mapbox_gl.devdocs.json'; diff --git a/api_docs/kbn_maps_vector_tile_utils.mdx b/api_docs/kbn_maps_vector_tile_utils.mdx index 4b4111efe4b0a..01cce860ed2f2 100644 --- a/api_docs/kbn_maps_vector_tile_utils.mdx +++ b/api_docs/kbn_maps_vector_tile_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-maps-vector-tile-utils title: "@kbn/maps-vector-tile-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/maps-vector-tile-utils plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/maps-vector-tile-utils'] --- import kbnMapsVectorTileUtilsObj from './kbn_maps_vector_tile_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_agg_utils.mdx b/api_docs/kbn_ml_agg_utils.mdx index e8338ee3702ce..b12a0357da9db 100644 --- a/api_docs/kbn_ml_agg_utils.mdx +++ b/api_docs/kbn_ml_agg_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-agg-utils title: "@kbn/ml-agg-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-agg-utils plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-agg-utils'] --- import kbnMlAggUtilsObj from './kbn_ml_agg_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_anomaly_utils.devdocs.json b/api_docs/kbn_ml_anomaly_utils.devdocs.json index 95a47b1ac3b0d..3b7bcd4009fb1 100644 --- a/api_docs/kbn_ml_anomaly_utils.devdocs.json +++ b/api_docs/kbn_ml_anomaly_utils.devdocs.json @@ -3145,7 +3145,7 @@ "\nUnion type for ML_JOB_FIELD_TYPES" ], "signature": [ - "\"number\" | \"boolean\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"keyword\" | \"text\" | \"date\" | \"unknown\"" + "\"number\" | \"boolean\" | \"unknown\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"keyword\" | \"text\" | \"date\"" ], "path": "x-pack/packages/ml/anomaly_utils/field_types.ts", "deprecated": false, diff --git a/api_docs/kbn_ml_anomaly_utils.mdx b/api_docs/kbn_ml_anomaly_utils.mdx index 3ee3b78fb6bcf..62113d32ea45a 100644 --- a/api_docs/kbn_ml_anomaly_utils.mdx +++ b/api_docs/kbn_ml_anomaly_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-anomaly-utils title: "@kbn/ml-anomaly-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-anomaly-utils plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-anomaly-utils'] --- import kbnMlAnomalyUtilsObj from './kbn_ml_anomaly_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_cancellable_search.mdx b/api_docs/kbn_ml_cancellable_search.mdx index 15c1c05ef8f31..5db3cb6aca2d6 100644 --- a/api_docs/kbn_ml_cancellable_search.mdx +++ b/api_docs/kbn_ml_cancellable_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-cancellable-search title: "@kbn/ml-cancellable-search" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-cancellable-search plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-cancellable-search'] --- import kbnMlCancellableSearchObj from './kbn_ml_cancellable_search.devdocs.json'; diff --git a/api_docs/kbn_ml_category_validator.mdx b/api_docs/kbn_ml_category_validator.mdx index c5320545c59f6..a2177bbc32d76 100644 --- a/api_docs/kbn_ml_category_validator.mdx +++ b/api_docs/kbn_ml_category_validator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-category-validator title: "@kbn/ml-category-validator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-category-validator plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-category-validator'] --- import kbnMlCategoryValidatorObj from './kbn_ml_category_validator.devdocs.json'; diff --git a/api_docs/kbn_ml_chi2test.mdx b/api_docs/kbn_ml_chi2test.mdx index 402a7b72102e0..24177bc90a6e8 100644 --- a/api_docs/kbn_ml_chi2test.mdx +++ b/api_docs/kbn_ml_chi2test.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-chi2test title: "@kbn/ml-chi2test" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-chi2test plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-chi2test'] --- import kbnMlChi2testObj from './kbn_ml_chi2test.devdocs.json'; diff --git a/api_docs/kbn_ml_data_frame_analytics_utils.mdx b/api_docs/kbn_ml_data_frame_analytics_utils.mdx index 623d069897298..b1ee22508e675 100644 --- a/api_docs/kbn_ml_data_frame_analytics_utils.mdx +++ b/api_docs/kbn_ml_data_frame_analytics_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-data-frame-analytics-utils title: "@kbn/ml-data-frame-analytics-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-data-frame-analytics-utils plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-data-frame-analytics-utils'] --- import kbnMlDataFrameAnalyticsUtilsObj from './kbn_ml_data_frame_analytics_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_data_grid.mdx b/api_docs/kbn_ml_data_grid.mdx index 965883a46dc64..46ef1ee5c1b65 100644 --- a/api_docs/kbn_ml_data_grid.mdx +++ b/api_docs/kbn_ml_data_grid.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-data-grid title: "@kbn/ml-data-grid" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-data-grid plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-data-grid'] --- import kbnMlDataGridObj from './kbn_ml_data_grid.devdocs.json'; diff --git a/api_docs/kbn_ml_date_picker.mdx b/api_docs/kbn_ml_date_picker.mdx index 43eca2be3e5be..0d930bff87069 100644 --- a/api_docs/kbn_ml_date_picker.mdx +++ b/api_docs/kbn_ml_date_picker.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-date-picker title: "@kbn/ml-date-picker" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-date-picker plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-date-picker'] --- import kbnMlDatePickerObj from './kbn_ml_date_picker.devdocs.json'; diff --git a/api_docs/kbn_ml_date_utils.mdx b/api_docs/kbn_ml_date_utils.mdx index 665245b45b9b1..38e9fee10183a 100644 --- a/api_docs/kbn_ml_date_utils.mdx +++ b/api_docs/kbn_ml_date_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-date-utils title: "@kbn/ml-date-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-date-utils plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-date-utils'] --- import kbnMlDateUtilsObj from './kbn_ml_date_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_error_utils.mdx b/api_docs/kbn_ml_error_utils.mdx index 73d86f419f69c..f6ede83d03f61 100644 --- a/api_docs/kbn_ml_error_utils.mdx +++ b/api_docs/kbn_ml_error_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-error-utils title: "@kbn/ml-error-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-error-utils plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-error-utils'] --- import kbnMlErrorUtilsObj from './kbn_ml_error_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_in_memory_table.mdx b/api_docs/kbn_ml_in_memory_table.mdx index 579018e342044..03aef1d1374ee 100644 --- a/api_docs/kbn_ml_in_memory_table.mdx +++ b/api_docs/kbn_ml_in_memory_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-in-memory-table title: "@kbn/ml-in-memory-table" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-in-memory-table plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-in-memory-table'] --- import kbnMlInMemoryTableObj from './kbn_ml_in_memory_table.devdocs.json'; diff --git a/api_docs/kbn_ml_is_defined.mdx b/api_docs/kbn_ml_is_defined.mdx index 5e541fc2e888d..8120941b94ada 100644 --- a/api_docs/kbn_ml_is_defined.mdx +++ b/api_docs/kbn_ml_is_defined.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-is-defined title: "@kbn/ml-is-defined" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-is-defined plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-is-defined'] --- import kbnMlIsDefinedObj from './kbn_ml_is_defined.devdocs.json'; diff --git a/api_docs/kbn_ml_is_populated_object.mdx b/api_docs/kbn_ml_is_populated_object.mdx index 51057d7dd8e21..1a634a5286f70 100644 --- a/api_docs/kbn_ml_is_populated_object.mdx +++ b/api_docs/kbn_ml_is_populated_object.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-is-populated-object title: "@kbn/ml-is-populated-object" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-is-populated-object plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-is-populated-object'] --- import kbnMlIsPopulatedObjectObj from './kbn_ml_is_populated_object.devdocs.json'; diff --git a/api_docs/kbn_ml_kibana_theme.mdx b/api_docs/kbn_ml_kibana_theme.mdx index 2c2e96836a5cd..7837096257507 100644 --- a/api_docs/kbn_ml_kibana_theme.mdx +++ b/api_docs/kbn_ml_kibana_theme.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-kibana-theme title: "@kbn/ml-kibana-theme" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-kibana-theme plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-kibana-theme'] --- import kbnMlKibanaThemeObj from './kbn_ml_kibana_theme.devdocs.json'; diff --git a/api_docs/kbn_ml_local_storage.mdx b/api_docs/kbn_ml_local_storage.mdx index aec025bdcc2b3..35eaed4d176d6 100644 --- a/api_docs/kbn_ml_local_storage.mdx +++ b/api_docs/kbn_ml_local_storage.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-local-storage title: "@kbn/ml-local-storage" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-local-storage plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-local-storage'] --- import kbnMlLocalStorageObj from './kbn_ml_local_storage.devdocs.json'; diff --git a/api_docs/kbn_ml_nested_property.mdx b/api_docs/kbn_ml_nested_property.mdx index 333f3e2704051..f8cac5b6220be 100644 --- a/api_docs/kbn_ml_nested_property.mdx +++ b/api_docs/kbn_ml_nested_property.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-nested-property title: "@kbn/ml-nested-property" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-nested-property plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-nested-property'] --- import kbnMlNestedPropertyObj from './kbn_ml_nested_property.devdocs.json'; diff --git a/api_docs/kbn_ml_number_utils.mdx b/api_docs/kbn_ml_number_utils.mdx index 498c158efe102..94239629903ff 100644 --- a/api_docs/kbn_ml_number_utils.mdx +++ b/api_docs/kbn_ml_number_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-number-utils title: "@kbn/ml-number-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-number-utils plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-number-utils'] --- import kbnMlNumberUtilsObj from './kbn_ml_number_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_query_utils.mdx b/api_docs/kbn_ml_query_utils.mdx index 332116945fa85..022749e4f6ae7 100644 --- a/api_docs/kbn_ml_query_utils.mdx +++ b/api_docs/kbn_ml_query_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-query-utils title: "@kbn/ml-query-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-query-utils plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-query-utils'] --- import kbnMlQueryUtilsObj from './kbn_ml_query_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_random_sampler_utils.mdx b/api_docs/kbn_ml_random_sampler_utils.mdx index d0bac0edd8e30..16792d3140d41 100644 --- a/api_docs/kbn_ml_random_sampler_utils.mdx +++ b/api_docs/kbn_ml_random_sampler_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-random-sampler-utils title: "@kbn/ml-random-sampler-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-random-sampler-utils plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-random-sampler-utils'] --- import kbnMlRandomSamplerUtilsObj from './kbn_ml_random_sampler_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_route_utils.mdx b/api_docs/kbn_ml_route_utils.mdx index b48a62c03c013..55b3775c4bee8 100644 --- a/api_docs/kbn_ml_route_utils.mdx +++ b/api_docs/kbn_ml_route_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-route-utils title: "@kbn/ml-route-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-route-utils plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-route-utils'] --- import kbnMlRouteUtilsObj from './kbn_ml_route_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_runtime_field_utils.mdx b/api_docs/kbn_ml_runtime_field_utils.mdx index 855d04869495a..edaa4ac80fb42 100644 --- a/api_docs/kbn_ml_runtime_field_utils.mdx +++ b/api_docs/kbn_ml_runtime_field_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-runtime-field-utils title: "@kbn/ml-runtime-field-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-runtime-field-utils plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-runtime-field-utils'] --- import kbnMlRuntimeFieldUtilsObj from './kbn_ml_runtime_field_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_string_hash.mdx b/api_docs/kbn_ml_string_hash.mdx index 30ea6b7d081f2..1dd679cdcf359 100644 --- a/api_docs/kbn_ml_string_hash.mdx +++ b/api_docs/kbn_ml_string_hash.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-string-hash title: "@kbn/ml-string-hash" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-string-hash plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-string-hash'] --- import kbnMlStringHashObj from './kbn_ml_string_hash.devdocs.json'; diff --git a/api_docs/kbn_ml_time_buckets.devdocs.json b/api_docs/kbn_ml_time_buckets.devdocs.json new file mode 100644 index 0000000000000..8ae68f092fd2b --- /dev/null +++ b/api_docs/kbn_ml_time_buckets.devdocs.json @@ -0,0 +1,711 @@ +{ + "id": "@kbn/ml-time-buckets", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [ + { + "parentPluginId": "@kbn/ml-time-buckets", + "id": "def-common.TimeBuckets", + "type": "Class", + "tags": [], + "label": "TimeBuckets", + "description": [ + "\nRepresents a configurable utility class for working with time buckets." + ], + "path": "x-pack/packages/ml/time_buckets/time_buckets.d.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/ml-time-buckets", + "id": "def-common.TimeBuckets.Unnamed", + "type": "Function", + "tags": [], + "label": "Constructor", + "description": [ + "\nCreates an instance of TimeBuckets." + ], + "signature": [ + "any" + ], + "path": "x-pack/packages/ml/time_buckets/time_buckets.d.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/ml-time-buckets", + "id": "def-common.TimeBuckets.Unnamed.$1", + "type": "Object", + "tags": [], + "label": "timeBucketsConfig", + "description": [ + "- Configuration for the TimeBuckets instance." + ], + "signature": [ + { + "pluginId": "@kbn/ml-time-buckets", + "scope": "common", + "docId": "kibKbnMlTimeBucketsPluginApi", + "section": "def-common.TimeBucketsConfig", + "text": "TimeBucketsConfig" + } + ], + "path": "x-pack/packages/ml/time_buckets/time_buckets.d.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/ml-time-buckets", + "id": "def-common.TimeBuckets.setBarTarget", + "type": "Function", + "tags": [], + "label": "setBarTarget", + "description": [ + "\nSets the target number of bars for the histogram." + ], + "signature": [ + "(barTarget: number) => void" + ], + "path": "x-pack/packages/ml/time_buckets/time_buckets.d.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/ml-time-buckets", + "id": "def-common.TimeBuckets.setBarTarget.$1", + "type": "number", + "tags": [], + "label": "barTarget", + "description": [ + "- The target bar count." + ], + "signature": [ + "number" + ], + "path": "x-pack/packages/ml/time_buckets/time_buckets.d.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/ml-time-buckets", + "id": "def-common.TimeBuckets.setMaxBars", + "type": "Function", + "tags": [], + "label": "setMaxBars", + "description": [ + "\nSets the maximum number of bars for the histogram." + ], + "signature": [ + "(maxBars: number) => void" + ], + "path": "x-pack/packages/ml/time_buckets/time_buckets.d.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/ml-time-buckets", + "id": "def-common.TimeBuckets.setMaxBars.$1", + "type": "number", + "tags": [], + "label": "maxBars", + "description": [ + "- The maximum bar count." + ], + "signature": [ + "number" + ], + "path": "x-pack/packages/ml/time_buckets/time_buckets.d.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/ml-time-buckets", + "id": "def-common.TimeBuckets.setInterval", + "type": "Function", + "tags": [], + "label": "setInterval", + "description": [ + "\nSets the interval for the time buckets." + ], + "signature": [ + "(interval: string) => void" + ], + "path": "x-pack/packages/ml/time_buckets/time_buckets.d.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/ml-time-buckets", + "id": "def-common.TimeBuckets.setInterval.$1", + "type": "string", + "tags": [], + "label": "interval", + "description": [ + "- The interval expression, e.g., \"1h\" for one hour." + ], + "signature": [ + "string" + ], + "path": "x-pack/packages/ml/time_buckets/time_buckets.d.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/ml-time-buckets", + "id": "def-common.TimeBuckets.setBounds", + "type": "Function", + "tags": [], + "label": "setBounds", + "description": [ + "\nSets the bounds of the time range for the buckets." + ], + "signature": [ + "(bounds: ", + { + "pluginId": "@kbn/ml-time-buckets", + "scope": "common", + "docId": "kibKbnMlTimeBucketsPluginApi", + "section": "def-common.TimeRangeBounds", + "text": "TimeRangeBounds" + }, + ") => void" + ], + "path": "x-pack/packages/ml/time_buckets/time_buckets.d.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/ml-time-buckets", + "id": "def-common.TimeBuckets.setBounds.$1", + "type": "Object", + "tags": [], + "label": "bounds", + "description": [ + "- The minimum and maximum time bounds." + ], + "signature": [ + { + "pluginId": "@kbn/ml-time-buckets", + "scope": "common", + "docId": "kibKbnMlTimeBucketsPluginApi", + "section": "def-common.TimeRangeBounds", + "text": "TimeRangeBounds" + } + ], + "path": "x-pack/packages/ml/time_buckets/time_buckets.d.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/ml-time-buckets", + "id": "def-common.TimeBuckets.getBounds", + "type": "Function", + "tags": [], + "label": "getBounds", + "description": [ + "\nGets the current bounds of the time range." + ], + "signature": [ + "() => { min: moment.Moment; max: moment.Moment; }" + ], + "path": "x-pack/packages/ml/time_buckets/time_buckets.d.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [ + "The current time range bounds." + ] + }, + { + "parentPluginId": "@kbn/ml-time-buckets", + "id": "def-common.TimeBuckets.getInterval", + "type": "Function", + "tags": [], + "label": "getInterval", + "description": [ + "\nRetrieves the configured interval for the buckets." + ], + "signature": [ + "() => ", + { + "pluginId": "@kbn/ml-time-buckets", + "scope": "common", + "docId": "kibKbnMlTimeBucketsPluginApi", + "section": "def-common.TimeBucketsInterval", + "text": "TimeBucketsInterval" + } + ], + "path": "x-pack/packages/ml/time_buckets/time_buckets.d.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [ + "The current interval settings for the buckets." + ] + }, + { + "parentPluginId": "@kbn/ml-time-buckets", + "id": "def-common.TimeBuckets.getIntervalToNearestMultiple", + "type": "Function", + "tags": [], + "label": "getIntervalToNearestMultiple", + "description": [ + "\nCalculates the nearest interval that is a multiple of a specified divisor." + ], + "signature": [ + "(divisorSecs: number) => ", + { + "pluginId": "@kbn/ml-time-buckets", + "scope": "common", + "docId": "kibKbnMlTimeBucketsPluginApi", + "section": "def-common.TimeBucketsInterval", + "text": "TimeBucketsInterval" + } + ], + "path": "x-pack/packages/ml/time_buckets/time_buckets.d.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/ml-time-buckets", + "id": "def-common.TimeBuckets.getIntervalToNearestMultiple.$1", + "type": "number", + "tags": [], + "label": "divisorSecs", + "description": [ + "- The divisor in seconds." + ], + "signature": [ + "number" + ], + "path": "x-pack/packages/ml/time_buckets/time_buckets.d.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [ + "The nearest interval as a multiple of the divisor." + ] + }, + { + "parentPluginId": "@kbn/ml-time-buckets", + "id": "def-common.TimeBuckets.getScaledDateFormat", + "type": "Function", + "tags": [], + "label": "getScaledDateFormat", + "description": [ + "\nRetrieves the date format that should be used for scaled intervals." + ], + "signature": [ + "() => string" + ], + "path": "x-pack/packages/ml/time_buckets/time_buckets.d.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [ + "The scaled date format string." + ] + } + ], + "initialIsOpen": false + } + ], + "functions": [ + { + "parentPluginId": "@kbn/ml-time-buckets", + "id": "def-common.getBoundsRoundedToInterval", + "type": "Function", + "tags": [], + "label": "getBoundsRoundedToInterval", + "description": [ + "\nAdjusts the given time range bounds to align with the specified interval." + ], + "signature": [ + "(bounds: ", + { + "pluginId": "@kbn/ml-time-buckets", + "scope": "common", + "docId": "kibKbnMlTimeBucketsPluginApi", + "section": "def-common.TimeRangeBounds", + "text": "TimeRangeBounds" + }, + ", interval: ", + { + "pluginId": "@kbn/ml-time-buckets", + "scope": "common", + "docId": "kibKbnMlTimeBucketsPluginApi", + "section": "def-common.TimeBucketsInterval", + "text": "TimeBucketsInterval" + }, + ", inclusiveEnd: boolean | undefined) => Required<", + { + "pluginId": "@kbn/ml-time-buckets", + "scope": "common", + "docId": "kibKbnMlTimeBucketsPluginApi", + "section": "def-common.TimeRangeBounds", + "text": "TimeRangeBounds" + }, + ">" + ], + "path": "x-pack/packages/ml/time_buckets/time_buckets.d.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/ml-time-buckets", + "id": "def-common.getBoundsRoundedToInterval.$1", + "type": "Object", + "tags": [], + "label": "bounds", + "description": [ + "The current time range bounds." + ], + "signature": [ + { + "pluginId": "@kbn/ml-time-buckets", + "scope": "common", + "docId": "kibKbnMlTimeBucketsPluginApi", + "section": "def-common.TimeRangeBounds", + "text": "TimeRangeBounds" + } + ], + "path": "x-pack/packages/ml/time_buckets/time_buckets.d.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/ml-time-buckets", + "id": "def-common.getBoundsRoundedToInterval.$2", + "type": "Object", + "tags": [], + "label": "interval", + "description": [ + "The interval to align the time range bounds with." + ], + "signature": [ + { + "pluginId": "@kbn/ml-time-buckets", + "scope": "common", + "docId": "kibKbnMlTimeBucketsPluginApi", + "section": "def-common.TimeBucketsInterval", + "text": "TimeBucketsInterval" + } + ], + "path": "x-pack/packages/ml/time_buckets/time_buckets.d.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/ml-time-buckets", + "id": "def-common.getBoundsRoundedToInterval.$3", + "type": "CompoundType", + "tags": [], + "label": "inclusiveEnd", + "description": [ + "Whether the end of the range should be inclusive." + ], + "signature": [ + "boolean | undefined" + ], + "path": "x-pack/packages/ml/time_buckets/time_buckets.d.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + } + ], + "returnComment": [ + "The adjusted time range bounds." + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/ml-time-buckets", + "id": "def-common.useTimeBuckets", + "type": "Function", + "tags": [], + "label": "useTimeBuckets", + "description": [ + "\nCustom hook to get `TimeBuckets` configured with settings from the `IUiSettingsClient`.\n" + ], + "signature": [ + "(uiSettings: ", + { + "pluginId": "@kbn/core-ui-settings-browser", + "scope": "common", + "docId": "kibKbnCoreUiSettingsBrowserPluginApi", + "section": "def-common.IUiSettingsClient", + "text": "IUiSettingsClient" + }, + ") => ", + { + "pluginId": "@kbn/ml-time-buckets", + "scope": "common", + "docId": "kibKbnMlTimeBucketsPluginApi", + "section": "def-common.TimeBuckets", + "text": "TimeBuckets" + } + ], + "path": "x-pack/packages/ml/time_buckets/use_time_buckets.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/ml-time-buckets", + "id": "def-common.useTimeBuckets.$1", + "type": "Object", + "tags": [], + "label": "uiSettings", + "description": [ + "The UI settings client instance used to retrieve UI settings." + ], + "signature": [ + { + "pluginId": "@kbn/core-ui-settings-browser", + "scope": "common", + "docId": "kibKbnCoreUiSettingsBrowserPluginApi", + "section": "def-common.IUiSettingsClient", + "text": "IUiSettingsClient" + } + ], + "path": "x-pack/packages/ml/time_buckets/use_time_buckets.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [ + "A memoized `TimeBuckets` instance configured with relevant UI settings." + ], + "initialIsOpen": false + } + ], + "interfaces": [ + { + "parentPluginId": "@kbn/ml-time-buckets", + "id": "def-common.TimeBucketsConfig", + "type": "Interface", + "tags": [], + "label": "TimeBucketsConfig", + "description": [ + "\nConfiguration options for initializing TimeBuckets." + ], + "path": "x-pack/packages/ml/time_buckets/time_buckets.d.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/ml-time-buckets", + "id": "def-common.TimeBucketsConfig.histogrammaxBars", + "type": "number", + "tags": [], + "label": "'histogram:maxBars'", + "description": [ + "\nThe maximum number of bars to display on the histogram." + ], + "path": "x-pack/packages/ml/time_buckets/time_buckets.d.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/ml-time-buckets", + "id": "def-common.TimeBucketsConfig.histogrambarTarget", + "type": "number", + "tags": [], + "label": "'histogram:barTarget'", + "description": [ + "\nThe targeted number of bars for the histogram." + ], + "path": "x-pack/packages/ml/time_buckets/time_buckets.d.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/ml-time-buckets", + "id": "def-common.TimeBucketsConfig.dateFormat", + "type": "string", + "tags": [], + "label": "dateFormat", + "description": [ + "\nThe date format string." + ], + "path": "x-pack/packages/ml/time_buckets/time_buckets.d.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/ml-time-buckets", + "id": "def-common.TimeBucketsConfig.dateFormatscaled", + "type": "Array", + "tags": [], + "label": "'dateFormat:scaled'", + "description": [ + "\nThe scaled date format strings." + ], + "signature": [ + "string[][]" + ], + "path": "x-pack/packages/ml/time_buckets/time_buckets.d.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/ml-time-buckets", + "id": "def-common.TimeBucketsInterval", + "type": "Interface", + "tags": [], + "label": "TimeBucketsInterval", + "description": [ + "\nDefines the structure for time intervals used within TimeBuckets." + ], + "path": "x-pack/packages/ml/time_buckets/time_buckets.d.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/ml-time-buckets", + "id": "def-common.TimeBucketsInterval.asMilliseconds", + "type": "Function", + "tags": [], + "label": "asMilliseconds", + "description": [ + "\nReturns the interval in milliseconds." + ], + "signature": [ + "() => number" + ], + "path": "x-pack/packages/ml/time_buckets/time_buckets.d.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/ml-time-buckets", + "id": "def-common.TimeBucketsInterval.asSeconds", + "type": "Function", + "tags": [], + "label": "asSeconds", + "description": [ + "\nReturns the interval in seconds." + ], + "signature": [ + "() => number" + ], + "path": "x-pack/packages/ml/time_buckets/time_buckets.d.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/ml-time-buckets", + "id": "def-common.TimeBucketsInterval.expression", + "type": "string", + "tags": [], + "label": "expression", + "description": [ + "\nThe string expression representing the interval." + ], + "path": "x-pack/packages/ml/time_buckets/time_buckets.d.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/ml-time-buckets", + "id": "def-common.TimeRangeBounds", + "type": "Interface", + "tags": [], + "label": "TimeRangeBounds", + "description": [ + "\nRepresents the minimum and maximum time bounds for a time range." + ], + "path": "x-pack/packages/ml/time_buckets/time_buckets.d.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/ml-time-buckets", + "id": "def-common.TimeRangeBounds.min", + "type": "Object", + "tags": [], + "label": "min", + "description": [ + "\nThe minimum bound of the time range (optional)." + ], + "signature": [ + "moment.Moment | undefined" + ], + "path": "x-pack/packages/ml/time_buckets/time_buckets.d.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/ml-time-buckets", + "id": "def-common.TimeRangeBounds.max", + "type": "Object", + "tags": [], + "label": "max", + "description": [ + "\nThe maximum bound of the time range (optional)." + ], + "signature": [ + "moment.Moment | undefined" + ], + "path": "x-pack/packages/ml/time_buckets/time_buckets.d.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + } + ], + "enums": [], + "misc": [], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_ml_time_buckets.mdx b/api_docs/kbn_ml_time_buckets.mdx new file mode 100644 index 0000000000000..9cb5bdbd37c43 --- /dev/null +++ b/api_docs/kbn_ml_time_buckets.mdx @@ -0,0 +1,36 @@ +--- +#### +#### This document is auto-generated and is meant to be viewed inside our experimental, new docs system. +#### Reach out in #docs-engineering for more info. +#### +id: kibKbnMlTimeBucketsPluginApi +slug: /kibana-dev-docs/api/kbn-ml-time-buckets +title: "@kbn/ml-time-buckets" +image: https://source.unsplash.com/400x175/?github +description: API docs for the @kbn/ml-time-buckets plugin +date: 2024-03-25 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-time-buckets'] +--- +import kbnMlTimeBucketsObj from './kbn_ml_time_buckets.devdocs.json'; + + + +Contact [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 34 | 0 | 0 | 0 | + +## Common + +### Functions + + +### Classes + + +### Interfaces + + diff --git a/api_docs/kbn_ml_trained_models_utils.mdx b/api_docs/kbn_ml_trained_models_utils.mdx index 6626234583f20..ba3bb53411364 100644 --- a/api_docs/kbn_ml_trained_models_utils.mdx +++ b/api_docs/kbn_ml_trained_models_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-trained-models-utils title: "@kbn/ml-trained-models-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-trained-models-utils plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-trained-models-utils'] --- import kbnMlTrainedModelsUtilsObj from './kbn_ml_trained_models_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_ui_actions.mdx b/api_docs/kbn_ml_ui_actions.mdx index a5edb7b9386c1..9352646d69057 100644 --- a/api_docs/kbn_ml_ui_actions.mdx +++ b/api_docs/kbn_ml_ui_actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-ui-actions title: "@kbn/ml-ui-actions" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-ui-actions plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-ui-actions'] --- import kbnMlUiActionsObj from './kbn_ml_ui_actions.devdocs.json'; diff --git a/api_docs/kbn_ml_url_state.mdx b/api_docs/kbn_ml_url_state.mdx index 90b4dbe17490d..28932e551bc9f 100644 --- a/api_docs/kbn_ml_url_state.mdx +++ b/api_docs/kbn_ml_url_state.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-url-state title: "@kbn/ml-url-state" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-url-state plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-url-state'] --- import kbnMlUrlStateObj from './kbn_ml_url_state.devdocs.json'; diff --git a/api_docs/kbn_mock_idp_utils.mdx b/api_docs/kbn_mock_idp_utils.mdx index 12f36b9556ba1..16da3dd4ff3e6 100644 --- a/api_docs/kbn_mock_idp_utils.mdx +++ b/api_docs/kbn_mock_idp_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-mock-idp-utils title: "@kbn/mock-idp-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/mock-idp-utils plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/mock-idp-utils'] --- import kbnMockIdpUtilsObj from './kbn_mock_idp_utils.devdocs.json'; diff --git a/api_docs/kbn_monaco.mdx b/api_docs/kbn_monaco.mdx index 2352f3e87ccbc..f812969ff4bbb 100644 --- a/api_docs/kbn_monaco.mdx +++ b/api_docs/kbn_monaco.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-monaco title: "@kbn/monaco" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/monaco plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/monaco'] --- import kbnMonacoObj from './kbn_monaco.devdocs.json'; diff --git a/api_docs/kbn_object_versioning.mdx b/api_docs/kbn_object_versioning.mdx index 8c651b85878d8..82a509109853c 100644 --- a/api_docs/kbn_object_versioning.mdx +++ b/api_docs/kbn_object_versioning.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-object-versioning title: "@kbn/object-versioning" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/object-versioning plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/object-versioning'] --- import kbnObjectVersioningObj from './kbn_object_versioning.devdocs.json'; diff --git a/api_docs/kbn_observability_alert_details.mdx b/api_docs/kbn_observability_alert_details.mdx index 6418aa35f39fc..79f96177454f0 100644 --- a/api_docs/kbn_observability_alert_details.mdx +++ b/api_docs/kbn_observability_alert_details.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-observability-alert-details title: "@kbn/observability-alert-details" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/observability-alert-details plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/observability-alert-details'] --- import kbnObservabilityAlertDetailsObj from './kbn_observability_alert_details.devdocs.json'; diff --git a/api_docs/kbn_observability_alerting_test_data.mdx b/api_docs/kbn_observability_alerting_test_data.mdx index af0d16f44f9a1..9fc28c58a36e0 100644 --- a/api_docs/kbn_observability_alerting_test_data.mdx +++ b/api_docs/kbn_observability_alerting_test_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-observability-alerting-test-data title: "@kbn/observability-alerting-test-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/observability-alerting-test-data plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/observability-alerting-test-data'] --- import kbnObservabilityAlertingTestDataObj from './kbn_observability_alerting_test_data.devdocs.json'; diff --git a/api_docs/kbn_observability_get_padded_alert_time_range_util.mdx b/api_docs/kbn_observability_get_padded_alert_time_range_util.mdx index 88bb384489a2c..aa7cafb3d9a8d 100644 --- a/api_docs/kbn_observability_get_padded_alert_time_range_util.mdx +++ b/api_docs/kbn_observability_get_padded_alert_time_range_util.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-observability-get-padded-alert-time-range-util title: "@kbn/observability-get-padded-alert-time-range-util" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/observability-get-padded-alert-time-range-util plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/observability-get-padded-alert-time-range-util'] --- import kbnObservabilityGetPaddedAlertTimeRangeUtilObj from './kbn_observability_get_padded_alert_time_range_util.devdocs.json'; diff --git a/api_docs/kbn_openapi_bundler.mdx b/api_docs/kbn_openapi_bundler.mdx index 7450fe6964c58..bcf4f266dbf39 100644 --- a/api_docs/kbn_openapi_bundler.mdx +++ b/api_docs/kbn_openapi_bundler.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-openapi-bundler title: "@kbn/openapi-bundler" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/openapi-bundler plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/openapi-bundler'] --- import kbnOpenapiBundlerObj from './kbn_openapi_bundler.devdocs.json'; diff --git a/api_docs/kbn_openapi_generator.mdx b/api_docs/kbn_openapi_generator.mdx index 201a7b96d22b0..99bf00a555153 100644 --- a/api_docs/kbn_openapi_generator.mdx +++ b/api_docs/kbn_openapi_generator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-openapi-generator title: "@kbn/openapi-generator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/openapi-generator plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/openapi-generator'] --- import kbnOpenapiGeneratorObj from './kbn_openapi_generator.devdocs.json'; diff --git a/api_docs/kbn_optimizer.mdx b/api_docs/kbn_optimizer.mdx index 9c899b8b2be11..132fdec68eb4c 100644 --- a/api_docs/kbn_optimizer.mdx +++ b/api_docs/kbn_optimizer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-optimizer title: "@kbn/optimizer" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/optimizer plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/optimizer'] --- import kbnOptimizerObj from './kbn_optimizer.devdocs.json'; diff --git a/api_docs/kbn_optimizer_webpack_helpers.mdx b/api_docs/kbn_optimizer_webpack_helpers.mdx index f901d02451450..71a63bd357173 100644 --- a/api_docs/kbn_optimizer_webpack_helpers.mdx +++ b/api_docs/kbn_optimizer_webpack_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-optimizer-webpack-helpers title: "@kbn/optimizer-webpack-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/optimizer-webpack-helpers plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/optimizer-webpack-helpers'] --- import kbnOptimizerWebpackHelpersObj from './kbn_optimizer_webpack_helpers.devdocs.json'; diff --git a/api_docs/kbn_osquery_io_ts_types.mdx b/api_docs/kbn_osquery_io_ts_types.mdx index 651ccc090bfee..f9dca032281e4 100644 --- a/api_docs/kbn_osquery_io_ts_types.mdx +++ b/api_docs/kbn_osquery_io_ts_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-osquery-io-ts-types title: "@kbn/osquery-io-ts-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/osquery-io-ts-types plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/osquery-io-ts-types'] --- import kbnOsqueryIoTsTypesObj from './kbn_osquery_io_ts_types.devdocs.json'; diff --git a/api_docs/kbn_panel_loader.mdx b/api_docs/kbn_panel_loader.mdx index 81b00bb4d0b6c..12cc875f5cf23 100644 --- a/api_docs/kbn_panel_loader.mdx +++ b/api_docs/kbn_panel_loader.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-panel-loader title: "@kbn/panel-loader" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/panel-loader plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/panel-loader'] --- import kbnPanelLoaderObj from './kbn_panel_loader.devdocs.json'; diff --git a/api_docs/kbn_performance_testing_dataset_extractor.mdx b/api_docs/kbn_performance_testing_dataset_extractor.mdx index f451fe9643a89..e7b36b2194324 100644 --- a/api_docs/kbn_performance_testing_dataset_extractor.mdx +++ b/api_docs/kbn_performance_testing_dataset_extractor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-performance-testing-dataset-extractor title: "@kbn/performance-testing-dataset-extractor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/performance-testing-dataset-extractor plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/performance-testing-dataset-extractor'] --- import kbnPerformanceTestingDatasetExtractorObj from './kbn_performance_testing_dataset_extractor.devdocs.json'; diff --git a/api_docs/kbn_plugin_check.mdx b/api_docs/kbn_plugin_check.mdx index ccaff767002b9..401f33462bac9 100644 --- a/api_docs/kbn_plugin_check.mdx +++ b/api_docs/kbn_plugin_check.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-check title: "@kbn/plugin-check" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/plugin-check plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-check'] --- import kbnPluginCheckObj from './kbn_plugin_check.devdocs.json'; diff --git a/api_docs/kbn_plugin_generator.mdx b/api_docs/kbn_plugin_generator.mdx index f1afcd4355f1a..bb3fc61075f36 100644 --- a/api_docs/kbn_plugin_generator.mdx +++ b/api_docs/kbn_plugin_generator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-generator title: "@kbn/plugin-generator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/plugin-generator plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-generator'] --- import kbnPluginGeneratorObj from './kbn_plugin_generator.devdocs.json'; diff --git a/api_docs/kbn_plugin_helpers.mdx b/api_docs/kbn_plugin_helpers.mdx index 047900d673d59..1257229469157 100644 --- a/api_docs/kbn_plugin_helpers.mdx +++ b/api_docs/kbn_plugin_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-helpers title: "@kbn/plugin-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/plugin-helpers plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-helpers'] --- import kbnPluginHelpersObj from './kbn_plugin_helpers.devdocs.json'; diff --git a/api_docs/kbn_presentation_containers.devdocs.json b/api_docs/kbn_presentation_containers.devdocs.json index a50dd1aa1a58d..edccee7f208c4 100644 --- a/api_docs/kbn_presentation_containers.devdocs.json +++ b/api_docs/kbn_presentation_containers.devdocs.json @@ -538,9 +538,9 @@ "label": "expandedPanelId", "description": [], "signature": [ - "{ readonly value: string | undefined; source: ", + "{ source: ", "Observable", - " | undefined; error: (err: any) => void; forEach: { (next: (value: string | undefined) => void): Promise; (next: (value: string | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => string | undefined; pipe: { (): ", + " | undefined; readonly value: string | undefined; error: (err: any) => void; forEach: { (next: (value: string | undefined) => void): Promise; (next: (value: string | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => string | undefined; pipe: { (): ", "Observable", "; (op1: ", "OperatorFunction", @@ -905,7 +905,7 @@ "label": "rawState", "description": [], "signature": [ - "RawStateType" + "RawStateType | undefined" ], "path": "packages/presentation/presentation_containers/interfaces/serialized_state.ts", "deprecated": false, diff --git a/api_docs/kbn_presentation_containers.mdx b/api_docs/kbn_presentation_containers.mdx index cde30cc3ae19a..a6f7064f54a78 100644 --- a/api_docs/kbn_presentation_containers.mdx +++ b/api_docs/kbn_presentation_containers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-presentation-containers title: "@kbn/presentation-containers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/presentation-containers plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/presentation-containers'] --- import kbnPresentationContainersObj from './kbn_presentation_containers.devdocs.json'; diff --git a/api_docs/kbn_presentation_library.mdx b/api_docs/kbn_presentation_library.mdx index 8fb92ef5578f8..34bbad977f867 100644 --- a/api_docs/kbn_presentation_library.mdx +++ b/api_docs/kbn_presentation_library.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-presentation-library title: "@kbn/presentation-library" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/presentation-library plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/presentation-library'] --- import kbnPresentationLibraryObj from './kbn_presentation_library.devdocs.json'; diff --git a/api_docs/kbn_presentation_publishing.devdocs.json b/api_docs/kbn_presentation_publishing.devdocs.json index 2269fdb93fdbe..f77b5176d1532 100644 --- a/api_docs/kbn_presentation_publishing.devdocs.json +++ b/api_docs/kbn_presentation_publishing.devdocs.json @@ -500,7 +500,7 @@ "text": "PublishesPanelDescription" } ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_description.ts", + "path": "packages/presentation/presentation_publishing/interfaces/titles/publishes_panel_description.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -514,7 +514,7 @@ "signature": [ "unknown" ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_description.ts", + "path": "packages/presentation/presentation_publishing/interfaces/titles/publishes_panel_description.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -540,7 +540,7 @@ "text": "PublishesPanelTitle" } ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_title.ts", + "path": "packages/presentation/presentation_publishing/interfaces/titles/publishes_panel_title.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -554,7 +554,7 @@ "signature": [ "unknown" ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_title.ts", + "path": "packages/presentation/presentation_publishing/interfaces/titles/publishes_panel_title.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -686,6 +686,46 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/presentation-publishing", + "id": "def-common.apiPublishesTimeRange", + "type": "Function", + "tags": [], + "label": "apiPublishesTimeRange", + "description": [], + "signature": [ + "(unknownApi: unknown) => unknownApi is ", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PublishesTimeRange", + "text": "PublishesTimeRange" + } + ], + "path": "packages/presentation/presentation_publishing/interfaces/publishes_unified_search.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/presentation-publishing", + "id": "def-common.apiPublishesTimeRange.$1", + "type": "Unknown", + "tags": [], + "label": "unknownApi", + "description": [], + "signature": [ + "unknown" + ], + "path": "packages/presentation/presentation_publishing/interfaces/publishes_unified_search.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/presentation-publishing", "id": "def-common.apiPublishesUnifiedSearch", @@ -825,7 +865,7 @@ "text": "PublishesWritablePanelDescription" } ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_description.ts", + "path": "packages/presentation/presentation_publishing/interfaces/titles/publishes_panel_description.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -839,7 +879,7 @@ "signature": [ "unknown" ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_description.ts", + "path": "packages/presentation/presentation_publishing/interfaces/titles/publishes_panel_description.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -865,7 +905,7 @@ "text": "PublishesWritablePanelTitle" } ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_title.ts", + "path": "packages/presentation/presentation_publishing/interfaces/titles/publishes_panel_title.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -879,7 +919,7 @@ "signature": [ "unknown" ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_title.ts", + "path": "packages/presentation/presentation_publishing/interfaces/titles/publishes_panel_title.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -1026,6 +1066,69 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/presentation-publishing", + "id": "def-common.getInitialValuesFromComparators", + "type": "Function", + "tags": [], + "label": "getInitialValuesFromComparators", + "description": [], + "signature": [ + "(comparators: ", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.StateComparators", + "text": "StateComparators" + }, + ", comparatorKeys: (keyof StateType)[]) => Partial" + ], + "path": "packages/presentation/presentation_publishing/comparators/state_comparators.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/presentation-publishing", + "id": "def-common.getInitialValuesFromComparators.$1", + "type": "Object", + "tags": [], + "label": "comparators", + "description": [], + "signature": [ + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.StateComparators", + "text": "StateComparators" + }, + "" + ], + "path": "packages/presentation/presentation_publishing/comparators/state_comparators.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/presentation-publishing", + "id": "def-common.getInitialValuesFromComparators.$2", + "type": "Array", + "tags": [], + "label": "comparatorKeys", + "description": [], + "signature": [ + "(keyof StateType)[]" + ], + "path": "packages/presentation/presentation_publishing/comparators/state_comparators.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/presentation-publishing", "id": "def-common.getPanelTitle", @@ -1044,7 +1147,7 @@ }, ">) => string | undefined" ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_title.ts", + "path": "packages/presentation/presentation_publishing/interfaces/titles/publishes_panel_title.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -1066,7 +1169,7 @@ }, ">" ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_title.ts", + "path": "packages/presentation/presentation_publishing/interfaces/titles/publishes_panel_title.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -1181,6 +1284,172 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/presentation-publishing", + "id": "def-common.initializeTitles", + "type": "Function", + "tags": [], + "label": "initializeTitles", + "description": [], + "signature": [ + "(rawState: ", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.SerializedTitles", + "text": "SerializedTitles" + }, + ") => { titlesApi: ", + "TitlesApi", + "; titleComparators: ", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.StateComparators", + "text": "StateComparators" + }, + "<", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.SerializedTitles", + "text": "SerializedTitles" + }, + ">; serializeTitles: () => ", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.SerializedTitles", + "text": "SerializedTitles" + }, + "; }" + ], + "path": "packages/presentation/presentation_publishing/interfaces/titles/titles_api.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/presentation-publishing", + "id": "def-common.initializeTitles.$1", + "type": "Object", + "tags": [], + "label": "rawState", + "description": [], + "signature": [ + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.SerializedTitles", + "text": "SerializedTitles" + } + ], + "path": "packages/presentation/presentation_publishing/interfaces/titles/titles_api.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/presentation-publishing", + "id": "def-common.runComparators", + "type": "Function", + "tags": [], + "label": "runComparators", + "description": [], + "signature": [ + "(comparators: ", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.StateComparators", + "text": "StateComparators" + }, + ", comparatorKeys: (keyof StateType)[], lastSavedState: StateType | undefined, latestState: Partial) => Partial | undefined" + ], + "path": "packages/presentation/presentation_publishing/comparators/state_comparators.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/presentation-publishing", + "id": "def-common.runComparators.$1", + "type": "Object", + "tags": [], + "label": "comparators", + "description": [], + "signature": [ + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.StateComparators", + "text": "StateComparators" + }, + "" + ], + "path": "packages/presentation/presentation_publishing/comparators/state_comparators.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/presentation-publishing", + "id": "def-common.runComparators.$2", + "type": "Array", + "tags": [], + "label": "comparatorKeys", + "description": [], + "signature": [ + "(keyof StateType)[]" + ], + "path": "packages/presentation/presentation_publishing/comparators/state_comparators.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/presentation-publishing", + "id": "def-common.runComparators.$3", + "type": "Uncategorized", + "tags": [], + "label": "lastSavedState", + "description": [], + "signature": [ + "StateType | undefined" + ], + "path": "packages/presentation/presentation_publishing/comparators/state_comparators.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + }, + { + "parentPluginId": "@kbn/presentation-publishing", + "id": "def-common.runComparators.$4", + "type": "Object", + "tags": [], + "label": "latestState", + "description": [], + "signature": [ + "Partial" + ], + "path": "packages/presentation/presentation_publishing/comparators/state_comparators.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/presentation-publishing", "id": "def-common.useBatchedPublishingSubjects", @@ -1401,7 +1670,7 @@ }, "> | undefined) => string | undefined" ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_description.ts", + "path": "packages/presentation/presentation_publishing/interfaces/titles/publishes_panel_description.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -1423,58 +1692,7 @@ }, "> | undefined" ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_description.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": false - } - ], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.useDefaultPanelTitle", - "type": "Function", - "tags": [], - "label": "useDefaultPanelTitle", - "description": [ - "\nA hook that gets this API's default title as a reactive variable which will cause re-renders on change." - ], - "signature": [ - "(api: Partial<", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesPanelTitle", - "text": "PublishesPanelTitle" - }, - "> | undefined) => string | undefined" - ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_title.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.useDefaultPanelTitle.$1", - "type": "Object", - "tags": [], - "label": "api", - "description": [], - "signature": [ - "Partial<", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesPanelTitle", - "text": "PublishesPanelTitle" - }, - "> | undefined" - ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_title.ts", + "path": "packages/presentation/presentation_publishing/interfaces/titles/publishes_panel_description.ts", "deprecated": false, "trackAdoption": false, "isRequired": false @@ -1536,72 +1754,21 @@ }, { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.useHidePanelTitle", + "id": "def-common.useInheritedViewMode", "type": "Function", "tags": [], - "label": "useHidePanelTitle", + "label": "useInheritedViewMode", "description": [ - "\nA hook that gets this API's hide panel title setting as a reactive variable which will cause re-renders on change." + "\nA hook that gets a view mode from this API or its parent as a reactive variable which will cause re-renders on change.\nif this api has a view mode AND its parent has a view mode, we consider the APIs version the source of truth." ], "signature": [ - "(api: Partial<", + " | undefined) => boolean | undefined" - ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_title.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.useHidePanelTitle.$1", - "type": "Object", - "tags": [], - "label": "api", - "description": [], - "signature": [ - "Partial<", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesPanelTitle", - "text": "PublishesPanelTitle" - }, - "> | undefined" - ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_title.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": false - } - ], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.useInheritedViewMode", - "type": "Function", - "tags": [], - "label": "useInheritedViewMode", - "description": [ - "\nA hook that gets a view mode from this API or its parent as a reactive variable which will cause re-renders on change.\nif this api has a view mode AND its parent has a view mode, we consider the APIs version the source of truth." - ], - "signature": [ - " | undefined) => string | undefined" ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_description.ts", + "path": "packages/presentation/presentation_publishing/interfaces/titles/publishes_panel_description.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -1686,58 +1853,7 @@ }, "> | undefined" ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_description.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": false - } - ], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.usePanelTitle", - "type": "Function", - "tags": [], - "label": "usePanelTitle", - "description": [ - "\nA hook that gets this API's panel title as a reactive variable which will cause re-renders on change." - ], - "signature": [ - "(api: Partial<", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesPanelTitle", - "text": "PublishesPanelTitle" - }, - "> | undefined) => string | undefined" - ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_title.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.usePanelTitle.$1", - "type": "Object", - "tags": [], - "label": "api", - "description": [], - "signature": [ - "Partial<", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesPanelTitle", - "text": "PublishesPanelTitle" - }, - "> | undefined" - ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_title.ts", + "path": "packages/presentation/presentation_publishing/interfaces/titles/publishes_panel_description.ts", "deprecated": false, "trackAdoption": false, "isRequired": false @@ -2410,9 +2526,9 @@ "label": "blockingError", "description": [], "signature": [ - "{ readonly value: Error | undefined; source: ", + "{ source: ", "Observable", - " | undefined; error: (err: any) => void; forEach: { (next: (value: Error | undefined) => void): Promise; (next: (value: Error | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => Error | undefined; pipe: { (): ", + " | undefined; readonly value: Error | undefined; error: (err: any) => void; forEach: { (next: (value: Error | undefined) => void): Promise; (next: (value: Error | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => Error | undefined; pipe: { (): ", "Observable", "; (op1: ", "OperatorFunction", @@ -2588,9 +2704,9 @@ "label": "dataLoading", "description": [], "signature": [ - "{ readonly value: boolean | undefined; source: ", + "{ source: ", "Observable", - " | undefined; error: (err: any) => void; forEach: { (next: (value: boolean | undefined) => void): Promise; (next: (value: boolean | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => boolean | undefined; pipe: { (): ", + " | undefined; readonly value: boolean | undefined; error: (err: any) => void; forEach: { (next: (value: boolean | undefined) => void): Promise; (next: (value: boolean | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => boolean | undefined; pipe: { (): ", "Observable", "; (op1: ", "OperatorFunction", @@ -2766,7 +2882,9 @@ "label": "dataViews", "description": [], "signature": [ - "{ readonly value: ", + "{ source: ", + "Observable", + " | undefined; readonly value: ", { "pluginId": "dataViews", "scope": "common", @@ -2774,9 +2892,7 @@ "section": "def-common.DataView", "text": "DataView" }, - "[] | undefined; source: ", - "Observable", - " | undefined; error: (err: any) => void; forEach: { (next: (value: ", + "[] | undefined; error: (err: any) => void; forEach: { (next: (value: ", { "pluginId": "dataViews", "scope": "common", @@ -3144,9 +3260,9 @@ "label": "disabledActionIds", "description": [], "signature": [ - "{ readonly value: string[] | undefined; source: ", + "{ source: ", "Observable", - " | undefined; error: (err: any) => void; forEach: { (next: (value: string[] | undefined) => void): Promise; (next: (value: string[] | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => string[] | undefined; pipe: { (): ", + " | undefined; readonly value: string[] | undefined; error: (err: any) => void; forEach: { (next: (value: string[] | undefined) => void): Promise; (next: (value: string[] | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => string[] | undefined; pipe: { (): ", "Observable", "; (op1: ", "OperatorFunction", @@ -3326,7 +3442,7 @@ "tags": [], "label": "PublishesPanelDescription", "description": [], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_description.ts", + "path": "packages/presentation/presentation_publishing/interfaces/titles/publishes_panel_description.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -3338,9 +3454,9 @@ "label": "panelDescription", "description": [], "signature": [ - "{ readonly value: string | undefined; source: ", + "{ source: ", "Observable", - " | undefined; error: (err: any) => void; forEach: { (next: (value: string | undefined) => void): Promise; (next: (value: string | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => string | undefined; pipe: { (): ", + " | undefined; readonly value: string | undefined; error: (err: any) => void; forEach: { (next: (value: string | undefined) => void): Promise; (next: (value: string | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => string | undefined; pipe: { (): ", "Observable", "; (op1: ", "OperatorFunction", @@ -3490,7 +3606,7 @@ "Subscription", "; }; toPromise: { (): Promise; (PromiseCtor: PromiseConstructor): Promise; (PromiseCtor: PromiseConstructorLike): Promise; }; }" ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_description.ts", + "path": "packages/presentation/presentation_publishing/interfaces/titles/publishes_panel_description.ts", "deprecated": false, "trackAdoption": false }, @@ -3511,7 +3627,7 @@ }, " | undefined" ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_description.ts", + "path": "packages/presentation/presentation_publishing/interfaces/titles/publishes_panel_description.ts", "deprecated": false, "trackAdoption": false } @@ -3525,7 +3641,7 @@ "tags": [], "label": "PublishesPanelTitle", "description": [], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_title.ts", + "path": "packages/presentation/presentation_publishing/interfaces/titles/publishes_panel_title.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -3537,9 +3653,9 @@ "label": "panelTitle", "description": [], "signature": [ - "{ readonly value: string | undefined; source: ", + "{ source: ", "Observable", - " | undefined; error: (err: any) => void; forEach: { (next: (value: string | undefined) => void): Promise; (next: (value: string | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => string | undefined; pipe: { (): ", + " | undefined; readonly value: string | undefined; error: (err: any) => void; forEach: { (next: (value: string | undefined) => void): Promise; (next: (value: string | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => string | undefined; pipe: { (): ", "Observable", "; (op1: ", "OperatorFunction", @@ -3689,7 +3805,7 @@ "Subscription", "; }; toPromise: { (): Promise; (PromiseCtor: PromiseConstructor): Promise; (PromiseCtor: PromiseConstructorLike): Promise; }; }" ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_title.ts", + "path": "packages/presentation/presentation_publishing/interfaces/titles/publishes_panel_title.ts", "deprecated": false, "trackAdoption": false }, @@ -3701,9 +3817,9 @@ "label": "hidePanelTitle", "description": [], "signature": [ - "{ readonly value: boolean | undefined; source: ", + "{ source: ", "Observable", - " | undefined; error: (err: any) => void; forEach: { (next: (value: boolean | undefined) => void): Promise; (next: (value: boolean | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => boolean | undefined; pipe: { (): ", + " | undefined; readonly value: boolean | undefined; error: (err: any) => void; forEach: { (next: (value: boolean | undefined) => void): Promise; (next: (value: boolean | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => boolean | undefined; pipe: { (): ", "Observable", "; (op1: ", "OperatorFunction", @@ -3853,7 +3969,7 @@ "Subscription", "; }; toPromise: { (): Promise; (PromiseCtor: PromiseConstructor): Promise; (PromiseCtor: PromiseConstructorLike): Promise; }; }" ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_title.ts", + "path": "packages/presentation/presentation_publishing/interfaces/titles/publishes_panel_title.ts", "deprecated": false, "trackAdoption": false }, @@ -3874,7 +3990,7 @@ }, " | undefined" ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_title.ts", + "path": "packages/presentation/presentation_publishing/interfaces/titles/publishes_panel_title.ts", "deprecated": false, "trackAdoption": false } @@ -3900,7 +4016,9 @@ "label": "onPhaseChange", "description": [], "signature": [ - "{ readonly value: ", + "{ source: ", + "Observable", + " | undefined; readonly value: ", { "pluginId": "@kbn/presentation-publishing", "scope": "common", @@ -3908,9 +4026,7 @@ "section": "def-common.PhaseEvent", "text": "PhaseEvent" }, - " | undefined; source: ", - "Observable", - " | undefined; error: (err: any) => void; forEach: { (next: (value: ", + " | undefined; error: (err: any) => void; forEach: { (next: (value: ", { "pluginId": "@kbn/presentation-publishing", "scope": "common", @@ -4280,9 +4396,9 @@ "label": "savedObjectId", "description": [], "signature": [ - "{ readonly value: string | undefined; source: ", + "{ source: ", "Observable", - " | undefined; error: (err: any) => void; forEach: { (next: (value: string | undefined) => void): Promise; (next: (value: string | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => string | undefined; pipe: { (): ", + " | undefined; readonly value: string | undefined; error: (err: any) => void; forEach: { (next: (value: string | undefined) => void): Promise; (next: (value: string | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => string | undefined; pipe: { (): ", "Observable", "; (op1: ", "OperatorFunction", @@ -4441,10 +4557,10 @@ }, { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.PublishesUnifiedSearch", + "id": "def-common.PublishesTimeRange", "type": "Interface", "tags": [], - "label": "PublishesUnifiedSearch", + "label": "PublishesTimeRange", "description": [], "path": "packages/presentation/presentation_publishing/interfaces/publishes_unified_search.ts", "deprecated": false, @@ -4452,29 +4568,15 @@ "children": [ { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.PublishesUnifiedSearch.isCompatibleWithUnifiedSearch", - "type": "Function", - "tags": [], - "label": "isCompatibleWithUnifiedSearch", - "description": [], - "signature": [ - "(() => boolean) | undefined" - ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_unified_search.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.PublishesUnifiedSearch.timeRange$", + "id": "def-common.PublishesTimeRange.timeRange$", "type": "Object", "tags": [], "label": "timeRange$", "description": [], "signature": [ - "{ readonly value: ", + "{ source: ", + "Observable", + " | undefined; readonly value: ", { "pluginId": "@kbn/es-query", "scope": "common", @@ -4482,9 +4584,7 @@ "section": "def-common.TimeRange", "text": "TimeRange" }, - " | undefined; source: ", - "Observable", - " | undefined; error: (err: any) => void; forEach: { (next: (value: ", + " | undefined; error: (err: any) => void; forEach: { (next: (value: ", { "pluginId": "@kbn/es-query", "scope": "common", @@ -4770,987 +4870,59 @@ "section": "def-common.TimeRange", "text": "TimeRange" }, - " | undefined> | undefined; subscribe: { (observerOrNext?: Partial<", - "Observer", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined>> | ((value: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined) => void) | undefined): ", - "Subscription", - "; (next?: ((value: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined) => void) | null | undefined, error?: ((error: any) => void) | null | undefined, complete?: (() => void) | null | undefined): ", - "Subscription", - "; }; toPromise: { (): Promise<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined>; (PromiseCtor: PromiseConstructor): Promise<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined>; (PromiseCtor: PromiseConstructorLike): Promise<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined>; }; }" - ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_unified_search.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.PublishesUnifiedSearch.filters$", - "type": "Object", - "tags": [], - "label": "filters$", - "description": [], - "signature": [ - "{ readonly value: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined; source: ", - "Observable", - " | undefined; error: (err: any) => void; forEach: { (next: (value: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined) => void): Promise; (next: (value: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined; pipe: { (): ", - "Observable", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined>; (op1: ", - "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined, A>): ", - "Observable", - "; (op1: ", - "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined, A>, op2: ", - "OperatorFunction", - "): ", - "Observable", - "; (op1: ", - "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined, A>, op2: ", - "OperatorFunction", - ", op3: ", - "OperatorFunction", - "): ", - "Observable", - "; (op1: ", - "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined, A>, op2: ", - "OperatorFunction", - ", op3: ", - "OperatorFunction", - ", op4: ", - "OperatorFunction", - "): ", - "Observable", - "; (op1: ", - "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined, A>, op2: ", - "OperatorFunction", - ", op3: ", - "OperatorFunction", - ", op4: ", - "OperatorFunction", - ", op5: ", - "OperatorFunction", - "): ", - "Observable", - "; (op1: ", - "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined, A>, op2: ", - "OperatorFunction", - ", op3: ", - "OperatorFunction", - ", op4: ", - "OperatorFunction", - ", op5: ", - "OperatorFunction", - ", op6: ", - "OperatorFunction", - "): ", - "Observable", - "; (op1: ", - "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined, A>, op2: ", - "OperatorFunction", - ", op3: ", - "OperatorFunction", - ", op4: ", - "OperatorFunction", - ", op5: ", - "OperatorFunction", - ", op6: ", - "OperatorFunction", - ", op7: ", - "OperatorFunction", - "): ", - "Observable", - "; (op1: ", - "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined, A>, op2: ", - "OperatorFunction", - ", op3: ", - "OperatorFunction", - ", op4: ", - "OperatorFunction", - ", op5: ", - "OperatorFunction", - ", op6: ", - "OperatorFunction", - ", op7: ", - "OperatorFunction", - ", op8: ", - "OperatorFunction", - "): ", - "Observable", - "; (op1: ", - "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined, A>, op2: ", - "OperatorFunction", - ", op3: ", - "OperatorFunction", - ", op4: ", - "OperatorFunction", - ", op5: ", - "OperatorFunction", - ", op6: ", - "OperatorFunction", - ", op7: ", - "OperatorFunction", - ", op8: ", - "OperatorFunction", - ", op9: ", - "OperatorFunction", - "): ", - "Observable", - "; (op1: ", - "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined, A>, op2: ", - "OperatorFunction", - ", op3: ", - "OperatorFunction", - ", op4: ", - "OperatorFunction", - ", op5: ", - "OperatorFunction", - ", op6: ", - "OperatorFunction", - ", op7: ", - "OperatorFunction", - ", op8: ", - "OperatorFunction", - ", op9: ", - "OperatorFunction", - ", ...operations: ", - "OperatorFunction", - "[]): ", - "Observable", - "; }; complete: () => void; closed: boolean; observers: ", - "Observer", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined>[]; isStopped: boolean; hasError: boolean; thrownError: any; lift: (operator: ", - "Operator", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined, R>) => ", - "Observable", - "; unsubscribe: () => void; readonly observed: boolean; asObservable: () => ", - "Observable", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined>; operator: ", - "Operator", - " | undefined; subscribe: { (observerOrNext?: Partial<", - "Observer", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined>> | ((value: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined) => void) | undefined): ", - "Subscription", - "; (next?: ((value: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined) => void) | null | undefined, error?: ((error: any) => void) | null | undefined, complete?: (() => void) | null | undefined): ", - "Subscription", - "; }; toPromise: { (): Promise<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined>; (PromiseCtor: PromiseConstructor): Promise<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined>; (PromiseCtor: PromiseConstructorLike): Promise<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined>; }; }" - ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_unified_search.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.PublishesUnifiedSearch.query$", - "type": "Object", - "tags": [], - "label": "query$", - "description": [], - "signature": [ - "{ readonly value: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - " | ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" - }, - " | undefined; source: ", - "Observable", - " | undefined; error: (err: any) => void; forEach: { (next: (value: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - " | ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" - }, - " | undefined) => void): Promise; (next: (value: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - " | ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" - }, - " | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - " | ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" - }, - " | undefined; pipe: { (): ", - "Observable", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - " | ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" - }, - " | undefined>; (op1: ", - "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - " | ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" - }, - " | undefined, A>): ", - "Observable", - "; (op1: ", - "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - " | ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" - }, - " | undefined, A>, op2: ", - "OperatorFunction", - "): ", - "Observable", - "; (op1: ", - "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - " | ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" - }, - " | undefined, A>, op2: ", - "OperatorFunction", - ", op3: ", - "OperatorFunction", - "): ", - "Observable", - "; (op1: ", - "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - " | ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" - }, - " | undefined, A>, op2: ", - "OperatorFunction", - ", op3: ", - "OperatorFunction", - ", op4: ", - "OperatorFunction", - "): ", - "Observable", - "; (op1: ", - "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - " | ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" - }, - " | undefined, A>, op2: ", - "OperatorFunction", - ", op3: ", - "OperatorFunction", - ", op4: ", - "OperatorFunction", - ", op5: ", - "OperatorFunction", - "): ", - "Observable", - "; (op1: ", - "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - " | ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" - }, - " | undefined, A>, op2: ", - "OperatorFunction", - ", op3: ", - "OperatorFunction", - ", op4: ", - "OperatorFunction", - ", op5: ", - "OperatorFunction", - ", op6: ", - "OperatorFunction", - "): ", - "Observable", - "; (op1: ", - "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - " | ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" - }, - " | undefined, A>, op2: ", - "OperatorFunction", - ", op3: ", - "OperatorFunction", - ", op4: ", - "OperatorFunction", - ", op5: ", - "OperatorFunction", - ", op6: ", - "OperatorFunction", - ", op7: ", - "OperatorFunction", - "): ", - "Observable", - "; (op1: ", - "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - " | ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" - }, - " | undefined, A>, op2: ", - "OperatorFunction", - ", op3: ", - "OperatorFunction", - ", op4: ", - "OperatorFunction", - ", op5: ", - "OperatorFunction", - ", op6: ", - "OperatorFunction", - ", op7: ", - "OperatorFunction", - ", op8: ", - "OperatorFunction", - "): ", - "Observable", - "; (op1: ", - "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - " | ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" - }, - " | undefined, A>, op2: ", - "OperatorFunction", - ", op3: ", - "OperatorFunction", - ", op4: ", - "OperatorFunction", - ", op5: ", - "OperatorFunction", - ", op6: ", - "OperatorFunction", - ", op7: ", - "OperatorFunction", - ", op8: ", - "OperatorFunction", - ", op9: ", - "OperatorFunction", - "): ", - "Observable", - "; (op1: ", - "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - " | ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" - }, - " | undefined, A>, op2: ", - "OperatorFunction", - ", op3: ", - "OperatorFunction", - ", op4: ", - "OperatorFunction", - ", op5: ", - "OperatorFunction", - ", op6: ", - "OperatorFunction", - ", op7: ", - "OperatorFunction", - ", op8: ", - "OperatorFunction", - ", op9: ", - "OperatorFunction", - ", ...operations: ", - "OperatorFunction", - "[]): ", - "Observable", - "; }; complete: () => void; closed: boolean; observers: ", - "Observer", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - " | ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" - }, - " | undefined>[]; isStopped: boolean; hasError: boolean; thrownError: any; lift: (operator: ", - "Operator", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - " | ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" - }, - " | undefined, R>) => ", - "Observable", - "; unsubscribe: () => void; readonly observed: boolean; asObservable: () => ", - "Observable", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - " | ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" - }, - " | undefined>; operator: ", - "Operator", - " | undefined; subscribe: { (observerOrNext?: Partial<", - "Observer", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - " | ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" - }, - " | undefined>> | ((value: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - " | ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" - }, - " | undefined) => void) | undefined): ", - "Subscription", - "; (next?: ((value: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - " | ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" - }, - " | undefined) => void) | null | undefined, error?: ((error: any) => void) | null | undefined, complete?: (() => void) | null | undefined): ", - "Subscription", - "; }; toPromise: { (): Promise<", + " | undefined> | undefined; subscribe: { (observerOrNext?: Partial<", + "Observer", + "<", { "pluginId": "@kbn/es-query", "scope": "common", "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" + "section": "def-common.TimeRange", + "text": "TimeRange" }, - " | ", + " | undefined>> | ((value: ", { "pluginId": "@kbn/es-query", "scope": "common", "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" + "section": "def-common.TimeRange", + "text": "TimeRange" }, - " | undefined>; (PromiseCtor: PromiseConstructor): Promise<", + " | undefined) => void) | undefined): ", + "Subscription", + "; (next?: ((value: ", { "pluginId": "@kbn/es-query", "scope": "common", "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" + "section": "def-common.TimeRange", + "text": "TimeRange" }, - " | ", + " | undefined) => void) | null | undefined, error?: ((error: any) => void) | null | undefined, complete?: (() => void) | null | undefined): ", + "Subscription", + "; }; toPromise: { (): Promise<", { "pluginId": "@kbn/es-query", "scope": "common", "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" + "section": "def-common.TimeRange", + "text": "TimeRange" }, - " | undefined>; (PromiseCtor: PromiseConstructorLike): Promise<", + " | undefined>; (PromiseCtor: PromiseConstructor): Promise<", { "pluginId": "@kbn/es-query", "scope": "common", "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" + "section": "def-common.TimeRange", + "text": "TimeRange" }, - " | ", + " | undefined>; (PromiseCtor: PromiseConstructorLike): Promise<", { "pluginId": "@kbn/es-query", "scope": "common", "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" + "section": "def-common.TimeRange", + "text": "TimeRange" }, " | undefined>; }; }" ], @@ -5780,9 +4952,9 @@ "label": "unsavedChanges", "description": [], "signature": [ - "{ readonly value: object | undefined; source: ", + "{ source: ", "Observable", - " | undefined; error: (err: any) => void; forEach: { (next: (value: object | undefined) => void): Promise; (next: (value: object | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => object | undefined; pipe: { (): ", + " | undefined; readonly value: object | undefined; error: (err: any) => void; forEach: { (next: (value: object | undefined) => void): Promise; (next: (value: object | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => object | undefined; pipe: { (): ", "Observable", "; (op1: ", "OperatorFunction", @@ -5976,7 +5148,9 @@ "label": "viewMode", "description": [], "signature": [ - "{ readonly value: ", + "{ source: ", + "Observable", + " | undefined; readonly value: ", { "pluginId": "@kbn/presentation-publishing", "scope": "common", @@ -5984,9 +5158,7 @@ "section": "def-common.ViewMode", "text": "ViewMode" }, - "; source: ", - "Observable", - " | undefined; error: (err: any) => void; forEach: { (next: (value: ", + "; error: (err: any) => void; forEach: { (next: (value: ", { "pluginId": "@kbn/presentation-publishing", "scope": "common", @@ -6334,6 +5506,62 @@ } ], "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/presentation-publishing", + "id": "def-common.SerializedTitles", + "type": "Interface", + "tags": [], + "label": "SerializedTitles", + "description": [], + "path": "packages/presentation/presentation_publishing/interfaces/titles/titles_api.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/presentation-publishing", + "id": "def-common.SerializedTitles.title", + "type": "string", + "tags": [], + "label": "title", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/presentation/presentation_publishing/interfaces/titles/titles_api.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/presentation-publishing", + "id": "def-common.SerializedTitles.description", + "type": "string", + "tags": [], + "label": "description", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/presentation/presentation_publishing/interfaces/titles/titles_api.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/presentation-publishing", + "id": "def-common.SerializedTitles.hidePanelTitles", + "type": "CompoundType", + "tags": [], + "label": "hidePanelTitles", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "packages/presentation/presentation_publishing/interfaces/titles/titles_api.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false } ], "enums": [], @@ -6379,6 +5607,111 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "@kbn/presentation-publishing", + "id": "def-common.ComparatorDefinition", + "type": "Type", + "tags": [], + "label": "ComparatorDefinition", + "description": [], + "signature": [ + "[", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PublishingSubject", + "text": "PublishingSubject" + }, + ", (value: StateType[KeyType]) => void, (", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.ComparatorFunction", + "text": "ComparatorFunction" + }, + " | undefined)?]" + ], + "path": "packages/presentation/presentation_publishing/comparators/types.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/presentation-publishing", + "id": "def-common.ComparatorFunction", + "type": "Type", + "tags": [], + "label": "ComparatorFunction", + "description": [], + "signature": [ + "(last: StateType[KeyType] | undefined, current: StateType[KeyType] | undefined, lastState?: Partial | undefined, currentState?: Partial | undefined) => boolean" + ], + "path": "packages/presentation/presentation_publishing/comparators/types.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "@kbn/presentation-publishing", + "id": "def-common.ComparatorFunction.$1", + "type": "Uncategorized", + "tags": [], + "label": "last", + "description": [], + "signature": [ + "StateType[KeyType] | undefined" + ], + "path": "packages/presentation/presentation_publishing/comparators/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/presentation-publishing", + "id": "def-common.ComparatorFunction.$2", + "type": "Uncategorized", + "tags": [], + "label": "current", + "description": [], + "signature": [ + "StateType[KeyType] | undefined" + ], + "path": "packages/presentation/presentation_publishing/comparators/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/presentation-publishing", + "id": "def-common.ComparatorFunction.$3", + "type": "Object", + "tags": [], + "label": "lastState", + "description": [], + "signature": [ + "Partial | undefined" + ], + "path": "packages/presentation/presentation_publishing/comparators/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/presentation-publishing", + "id": "def-common.ComparatorFunction.$4", + "type": "Object", + "tags": [], + "label": "currentState", + "description": [], + "signature": [ + "Partial | undefined" + ], + "path": "packages/presentation/presentation_publishing/comparators/types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/presentation-publishing", "id": "def-common.PhaseEventType", @@ -6396,6 +5729,68 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "@kbn/presentation-publishing", + "id": "def-common.PublishesUnifiedSearch", + "type": "Type", + "tags": [], + "label": "PublishesUnifiedSearch", + "description": [], + "signature": [ + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PublishesTimeRange", + "text": "PublishesTimeRange" + }, + " & { isCompatibleWithUnifiedSearch?: (() => boolean) | undefined; filters$: ", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PublishingSubject", + "text": "PublishingSubject" + }, + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" + }, + "[] | undefined>; query$: ", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PublishingSubject", + "text": "PublishingSubject" + }, + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Query", + "text": "Query" + }, + " | ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.AggregateQuery", + "text": "AggregateQuery" + }, + " | undefined>; }" + ], + "path": "packages/presentation/presentation_publishing/interfaces/publishes_unified_search.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/presentation-publishing", "id": "def-common.PublishesWritablePanelDescription", @@ -6413,7 +5808,7 @@ }, " & { setPanelDescription: (newTitle: string | undefined) => void; }" ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_description.ts", + "path": "packages/presentation/presentation_publishing/interfaces/titles/publishes_panel_description.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -6435,7 +5830,7 @@ }, " & { setPanelTitle: (newTitle: string | undefined) => void; setHidePanelTitle: (hide: boolean | undefined) => void; }" ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_title.ts", + "path": "packages/presentation/presentation_publishing/interfaces/titles/publishes_panel_title.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -6452,10 +5847,50 @@ "pluginId": "@kbn/presentation-publishing", "scope": "common", "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesUnifiedSearch", - "text": "PublishesUnifiedSearch" + "section": "def-common.PublishesTimeRange", + "text": "PublishesTimeRange" + }, + " & { isCompatibleWithUnifiedSearch?: (() => boolean) | undefined; filters$: ", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PublishingSubject", + "text": "PublishingSubject" + }, + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" + }, + "[] | undefined>; query$: ", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PublishingSubject", + "text": "PublishingSubject" + }, + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Query", + "text": "Query" + }, + " | ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.AggregateQuery", + "text": "AggregateQuery" }, - " & { setTimeRange: (timeRange: ", + " | undefined>; } & { setTimeRange: (timeRange: ", { "pluginId": "@kbn/es-query", "scope": "common", @@ -6528,9 +5963,9 @@ "\nA publishing subject is a RxJS subject that can be used to listen to value changes, but does not allow pushing values via the Next method." ], "signature": [ - "{ readonly value: T; source: ", + "{ source: ", "Observable", - " | undefined; error: (err: any) => void; forEach: { (next: (value: T) => void): Promise; (next: (value: T) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => T; pipe: { (): ", + " | undefined; readonly value: T; error: (err: any) => void; forEach: { (next: (value: T) => void): Promise; (next: (value: T) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => T; pipe: { (): ", "Observable", "; (op1: ", "OperatorFunction", @@ -6685,6 +6120,29 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "@kbn/presentation-publishing", + "id": "def-common.StateComparators", + "type": "Type", + "tags": [], + "label": "StateComparators", + "description": [], + "signature": [ + "{ [KeyType in keyof StateType]: ", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.ComparatorDefinition", + "text": "ComparatorDefinition" + }, + "; }" + ], + "path": "packages/presentation/presentation_publishing/comparators/types.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/presentation-publishing", "id": "def-common.ViewMode", diff --git a/api_docs/kbn_presentation_publishing.mdx b/api_docs/kbn_presentation_publishing.mdx index 53e4116912053..a5e8dfcfb5808 100644 --- a/api_docs/kbn_presentation_publishing.mdx +++ b/api_docs/kbn_presentation_publishing.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-presentation-publishing title: "@kbn/presentation-publishing" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/presentation-publishing plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/presentation-publishing'] --- import kbnPresentationPublishingObj from './kbn_presentation_publishing.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kib | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 149 | 0 | 116 | 3 | +| 164 | 0 | 134 | 4 | ## Common diff --git a/api_docs/kbn_profiling_utils.mdx b/api_docs/kbn_profiling_utils.mdx index c254ae1faceb5..f461de190686e 100644 --- a/api_docs/kbn_profiling_utils.mdx +++ b/api_docs/kbn_profiling_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-profiling-utils title: "@kbn/profiling-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/profiling-utils plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/profiling-utils'] --- import kbnProfilingUtilsObj from './kbn_profiling_utils.devdocs.json'; diff --git a/api_docs/kbn_random_sampling.mdx b/api_docs/kbn_random_sampling.mdx index c73c1aaeaf3f9..af603c48a5fb1 100644 --- a/api_docs/kbn_random_sampling.mdx +++ b/api_docs/kbn_random_sampling.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-random-sampling title: "@kbn/random-sampling" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/random-sampling plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/random-sampling'] --- import kbnRandomSamplingObj from './kbn_random_sampling.devdocs.json'; diff --git a/api_docs/kbn_react_field.mdx b/api_docs/kbn_react_field.mdx index be5fb05744b8c..f4325334ecbd8 100644 --- a/api_docs/kbn_react_field.mdx +++ b/api_docs/kbn_react_field.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-field title: "@kbn/react-field" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-field plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-field'] --- import kbnReactFieldObj from './kbn_react_field.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_common.mdx b/api_docs/kbn_react_kibana_context_common.mdx index 0c8ff3f1b0279..060f7eb50788f 100644 --- a/api_docs/kbn_react_kibana_context_common.mdx +++ b/api_docs/kbn_react_kibana_context_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-context-common title: "@kbn/react-kibana-context-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-context-common plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-context-common'] --- import kbnReactKibanaContextCommonObj from './kbn_react_kibana_context_common.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_render.mdx b/api_docs/kbn_react_kibana_context_render.mdx index 44961ba3d9b6d..6f3529bcb32bd 100644 --- a/api_docs/kbn_react_kibana_context_render.mdx +++ b/api_docs/kbn_react_kibana_context_render.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-context-render title: "@kbn/react-kibana-context-render" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-context-render plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-context-render'] --- import kbnReactKibanaContextRenderObj from './kbn_react_kibana_context_render.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_root.mdx b/api_docs/kbn_react_kibana_context_root.mdx index b52a65aa31918..5bf12d250c3b2 100644 --- a/api_docs/kbn_react_kibana_context_root.mdx +++ b/api_docs/kbn_react_kibana_context_root.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-context-root title: "@kbn/react-kibana-context-root" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-context-root plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-context-root'] --- import kbnReactKibanaContextRootObj from './kbn_react_kibana_context_root.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_styled.mdx b/api_docs/kbn_react_kibana_context_styled.mdx index d04e35f2b701c..7e9252d3f6409 100644 --- a/api_docs/kbn_react_kibana_context_styled.mdx +++ b/api_docs/kbn_react_kibana_context_styled.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-context-styled title: "@kbn/react-kibana-context-styled" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-context-styled plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-context-styled'] --- import kbnReactKibanaContextStyledObj from './kbn_react_kibana_context_styled.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_theme.mdx b/api_docs/kbn_react_kibana_context_theme.mdx index 14a21167e87a3..c2010fb8e3bf6 100644 --- a/api_docs/kbn_react_kibana_context_theme.mdx +++ b/api_docs/kbn_react_kibana_context_theme.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-context-theme title: "@kbn/react-kibana-context-theme" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-context-theme plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-context-theme'] --- import kbnReactKibanaContextThemeObj from './kbn_react_kibana_context_theme.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_mount.mdx b/api_docs/kbn_react_kibana_mount.mdx index 88090743f0ae5..7ceaa899b7740 100644 --- a/api_docs/kbn_react_kibana_mount.mdx +++ b/api_docs/kbn_react_kibana_mount.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-mount title: "@kbn/react-kibana-mount" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-mount plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-mount'] --- import kbnReactKibanaMountObj from './kbn_react_kibana_mount.devdocs.json'; diff --git a/api_docs/kbn_repo_file_maps.mdx b/api_docs/kbn_repo_file_maps.mdx index 3e2b1180512bc..43d9a4885707c 100644 --- a/api_docs/kbn_repo_file_maps.mdx +++ b/api_docs/kbn_repo_file_maps.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-file-maps title: "@kbn/repo-file-maps" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-file-maps plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-file-maps'] --- import kbnRepoFileMapsObj from './kbn_repo_file_maps.devdocs.json'; diff --git a/api_docs/kbn_repo_linter.mdx b/api_docs/kbn_repo_linter.mdx index 62d04bf54bd71..b9c0da3a5c275 100644 --- a/api_docs/kbn_repo_linter.mdx +++ b/api_docs/kbn_repo_linter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-linter title: "@kbn/repo-linter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-linter plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-linter'] --- import kbnRepoLinterObj from './kbn_repo_linter.devdocs.json'; diff --git a/api_docs/kbn_repo_path.mdx b/api_docs/kbn_repo_path.mdx index b128b90730c39..14d55c646e389 100644 --- a/api_docs/kbn_repo_path.mdx +++ b/api_docs/kbn_repo_path.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-path title: "@kbn/repo-path" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-path plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-path'] --- import kbnRepoPathObj from './kbn_repo_path.devdocs.json'; diff --git a/api_docs/kbn_repo_source_classifier.mdx b/api_docs/kbn_repo_source_classifier.mdx index 388e8df0d7b9f..42fddd150384f 100644 --- a/api_docs/kbn_repo_source_classifier.mdx +++ b/api_docs/kbn_repo_source_classifier.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-source-classifier title: "@kbn/repo-source-classifier" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-source-classifier plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-source-classifier'] --- import kbnRepoSourceClassifierObj from './kbn_repo_source_classifier.devdocs.json'; diff --git a/api_docs/kbn_reporting_common.mdx b/api_docs/kbn_reporting_common.mdx index a99341a44021d..bce0b13b5e30d 100644 --- a/api_docs/kbn_reporting_common.mdx +++ b/api_docs/kbn_reporting_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-common title: "@kbn/reporting-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-common plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-common'] --- import kbnReportingCommonObj from './kbn_reporting_common.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_csv.devdocs.json b/api_docs/kbn_reporting_export_types_csv.devdocs.json index a5211d7f01ce1..f016232a76dab 100644 --- a/api_docs/kbn_reporting_export_types_csv.devdocs.json +++ b/api_docs/kbn_reporting_export_types_csv.devdocs.json @@ -409,7 +409,9 @@ "parentPluginId": "@kbn/reporting-export-types-csv", "id": "def-server.CsvSearchSourceImmediateExportType", "type": "Class", - "tags": [], + "tags": [ + "deprecated" + ], "label": "CsvSearchSourceImmediateExportType", "description": [], "signature": [ @@ -449,8 +451,18 @@ ", CsvSearchSourceImmediateExportTypeStartDeps>" ], "path": "packages/kbn-reporting/export_types/csv/csv_searchsource_immediate.ts", - "deprecated": false, + "deprecated": true, "trackAdoption": false, + "references": [ + { + "plugin": "reporting", + "path": "x-pack/plugins/reporting/server/core.ts" + }, + { + "plugin": "reporting", + "path": "x-pack/plugins/reporting/server/core.ts" + } + ], "children": [ { "parentPluginId": "@kbn/reporting-export-types-csv", diff --git a/api_docs/kbn_reporting_export_types_csv.mdx b/api_docs/kbn_reporting_export_types_csv.mdx index 3c737487d0cd7..fb1aa9f8416c2 100644 --- a/api_docs/kbn_reporting_export_types_csv.mdx +++ b/api_docs/kbn_reporting_export_types_csv.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-csv title: "@kbn/reporting-export-types-csv" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-csv plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-csv'] --- import kbnReportingExportTypesCsvObj from './kbn_reporting_export_types_csv.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_csv_common.devdocs.json b/api_docs/kbn_reporting_export_types_csv_common.devdocs.json index d94d29fb6f26b..b36f198afd976 100644 --- a/api_docs/kbn_reporting_export_types_csv_common.devdocs.json +++ b/api_docs/kbn_reporting_export_types_csv_common.devdocs.json @@ -111,12 +111,40 @@ "parentPluginId": "@kbn/reporting-export-types-csv-common", "id": "def-common.JobParamsDownloadCSV", "type": "Interface", - "tags": [], + "tags": [ + "deprecated" + ], "label": "JobParamsDownloadCSV", "description": [], "path": "packages/kbn-reporting/export_types/csv_common/index.ts", - "deprecated": false, + "deprecated": true, "trackAdoption": false, + "references": [ + { + "plugin": "@kbn/reporting-export-types-csv", + "path": "packages/kbn-reporting/export_types/csv/csv_searchsource_immediate.ts" + }, + { + "plugin": "@kbn/reporting-export-types-csv", + "path": "packages/kbn-reporting/export_types/csv/csv_searchsource_immediate.ts" + }, + { + "plugin": "@kbn/reporting-export-types-csv", + "path": "packages/kbn-reporting/export_types/csv/csv_searchsource_immediate.ts" + }, + { + "plugin": "@kbn/reporting-export-types-csv", + "path": "packages/kbn-reporting/export_types/csv/csv_searchsource_immediate.ts" + }, + { + "plugin": "reporting", + "path": "x-pack/plugins/reporting/server/routes/internal/generate/csv_searchsource_immediate.ts" + }, + { + "plugin": "reporting", + "path": "x-pack/plugins/reporting/server/routes/internal/generate/csv_searchsource_immediate.ts" + } + ], "children": [ { "parentPluginId": "@kbn/reporting-export-types-csv-common", @@ -354,15 +382,43 @@ "parentPluginId": "@kbn/reporting-export-types-csv-common", "id": "def-common.CSV_JOB_TYPE_DEPRECATED", "type": "string", - "tags": [], + "tags": [ + "deprecated" + ], "label": "CSV_JOB_TYPE_DEPRECATED", "description": [], "signature": [ "\"csv\"" ], "path": "packages/kbn-reporting/export_types/csv_common/index.ts", - "deprecated": false, + "deprecated": true, "trackAdoption": false, + "references": [ + { + "plugin": "reporting", + "path": "x-pack/plugins/reporting/common/constants.ts" + }, + { + "plugin": "reporting", + "path": "x-pack/plugins/reporting/common/constants.ts" + }, + { + "plugin": "reporting", + "path": "x-pack/plugins/reporting/common/job_utils.ts" + }, + { + "plugin": "reporting", + "path": "x-pack/plugins/reporting/common/job_utils.ts" + }, + { + "plugin": "reporting", + "path": "x-pack/plugins/reporting/server/routes/common/jobs/get_document_payload.ts" + }, + { + "plugin": "reporting", + "path": "x-pack/plugins/reporting/server/routes/common/jobs/get_document_payload.ts" + } + ], "initialIsOpen": false }, { @@ -395,21 +451,6 @@ "trackAdoption": false, "initialIsOpen": false }, - { - "parentPluginId": "@kbn/reporting-export-types-csv-common", - "id": "def-common.CSV_REPORT_TYPE_DEPRECATED", - "type": "string", - "tags": [], - "label": "CSV_REPORT_TYPE_DEPRECATED", - "description": [], - "signature": [ - "\"CSV\"" - ], - "path": "packages/kbn-reporting/export_types/csv_common/index.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, { "parentPluginId": "@kbn/reporting-export-types-csv-common", "id": "def-common.CSV_REPORT_TYPE_V2", @@ -433,7 +474,7 @@ "label": "CSV_REPORTING_ACTION", "description": [], "signature": [ - "\"downloadCsvReport\"" + "\"generateCsvReport\"" ], "path": "packages/kbn-reporting/export_types/csv_common/index.ts", "deprecated": false, @@ -444,13 +485,82 @@ "parentPluginId": "@kbn/reporting-export-types-csv-common", "id": "def-common.CSV_SEARCHSOURCE_IMMEDIATE_TYPE", "type": "string", - "tags": [], + "tags": [ + "deprecated" + ], "label": "CSV_SEARCHSOURCE_IMMEDIATE_TYPE", "description": [], "signature": [ "\"csv_searchsource_immediate\"" ], "path": "packages/kbn-reporting/export_types/csv_common/index.ts", + "deprecated": true, + "trackAdoption": false, + "references": [ + { + "plugin": "@kbn/reporting-export-types-csv", + "path": "packages/kbn-reporting/export_types/csv/csv_searchsource_immediate.ts" + }, + { + "plugin": "@kbn/reporting-export-types-csv", + "path": "packages/kbn-reporting/export_types/csv/csv_searchsource_immediate.ts" + }, + { + "plugin": "@kbn/reporting-export-types-csv", + "path": "packages/kbn-reporting/export_types/csv/csv_searchsource_immediate.ts" + }, + { + "plugin": "@kbn/reporting-export-types-csv", + "path": "packages/kbn-reporting/export_types/csv/csv_searchsource_immediate.ts" + }, + { + "plugin": "reporting", + "path": "x-pack/plugins/reporting/server/routes/internal/generate/csv_searchsource_immediate.ts" + }, + { + "plugin": "reporting", + "path": "x-pack/plugins/reporting/server/routes/internal/generate/csv_searchsource_immediate.ts" + }, + { + "plugin": "reporting", + "path": "x-pack/plugins/reporting/server/routes/internal/generate/csv_searchsource_immediate.ts" + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/reporting-export-types-csv-common", + "id": "def-common.JobAppParamsCSV", + "type": "Type", + "tags": [], + "label": "JobAppParamsCSV", + "description": [ + "\nPublic-facing interface\nApps should use this interface to build job params. The browserTimezone and version\nfields become automatically provided by Reporting" + ], + "signature": [ + "{ title: string; columns?: string[] | undefined; layout?: { id?: ", + { + "pluginId": "screenshotting", + "scope": "common", + "docId": "kibScreenshottingPluginApi", + "section": "def-common.LayoutType", + "text": "LayoutType" + }, + " | undefined; dimensions?: { width: number; height: number; } | undefined; selectors?: Partial<", + "LayoutSelectorDictionary", + "> | undefined; zoom?: number | undefined; } | undefined; objectType: string; searchSource: ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SerializedSearchSourceFields", + "text": "SerializedSearchSourceFields" + }, + "; pagingStrategy?: ", + "CsvPagingStrategy", + " | undefined; }" + ], + "path": "packages/kbn-reporting/export_types/csv_common/index.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false diff --git a/api_docs/kbn_reporting_export_types_csv_common.mdx b/api_docs/kbn_reporting_export_types_csv_common.mdx index 408c8d1f47b66..edde1cc568205 100644 --- a/api_docs/kbn_reporting_export_types_csv_common.mdx +++ b/api_docs/kbn_reporting_export_types_csv_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-csv-common title: "@kbn/reporting-export-types-csv-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-csv-common plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-csv-common'] --- import kbnReportingExportTypesCsvCommonObj from './kbn_reporting_export_types_csv_common.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sh | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 25 | 0 | 22 | 0 | +| 25 | 0 | 21 | 0 | ## Common diff --git a/api_docs/kbn_reporting_export_types_pdf.mdx b/api_docs/kbn_reporting_export_types_pdf.mdx index d5d84411d8cae..eea8d4509648f 100644 --- a/api_docs/kbn_reporting_export_types_pdf.mdx +++ b/api_docs/kbn_reporting_export_types_pdf.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-pdf title: "@kbn/reporting-export-types-pdf" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-pdf plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-pdf'] --- import kbnReportingExportTypesPdfObj from './kbn_reporting_export_types_pdf.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_pdf_common.mdx b/api_docs/kbn_reporting_export_types_pdf_common.mdx index 0ce95cf34da6f..e9c2fa18ea6a1 100644 --- a/api_docs/kbn_reporting_export_types_pdf_common.mdx +++ b/api_docs/kbn_reporting_export_types_pdf_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-pdf-common title: "@kbn/reporting-export-types-pdf-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-pdf-common plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-pdf-common'] --- import kbnReportingExportTypesPdfCommonObj from './kbn_reporting_export_types_pdf_common.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_png.mdx b/api_docs/kbn_reporting_export_types_png.mdx index 946312127c4e1..e5aa5559df1a5 100644 --- a/api_docs/kbn_reporting_export_types_png.mdx +++ b/api_docs/kbn_reporting_export_types_png.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-png title: "@kbn/reporting-export-types-png" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-png plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-png'] --- import kbnReportingExportTypesPngObj from './kbn_reporting_export_types_png.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_png_common.mdx b/api_docs/kbn_reporting_export_types_png_common.mdx index 910e221d325e0..d78d90dbe750f 100644 --- a/api_docs/kbn_reporting_export_types_png_common.mdx +++ b/api_docs/kbn_reporting_export_types_png_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-png-common title: "@kbn/reporting-export-types-png-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-png-common plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-png-common'] --- import kbnReportingExportTypesPngCommonObj from './kbn_reporting_export_types_png_common.devdocs.json'; diff --git a/api_docs/kbn_reporting_mocks_server.mdx b/api_docs/kbn_reporting_mocks_server.mdx index 209a8997c054d..08c1af9c1647b 100644 --- a/api_docs/kbn_reporting_mocks_server.mdx +++ b/api_docs/kbn_reporting_mocks_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-mocks-server title: "@kbn/reporting-mocks-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-mocks-server plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-mocks-server'] --- import kbnReportingMocksServerObj from './kbn_reporting_mocks_server.devdocs.json'; diff --git a/api_docs/kbn_reporting_public.devdocs.json b/api_docs/kbn_reporting_public.devdocs.json index 536d4a0cf4947..7a24ee1418835 100644 --- a/api_docs/kbn_reporting_public.devdocs.json +++ b/api_docs/kbn_reporting_public.devdocs.json @@ -21,7 +21,7 @@ "label": "payload", "description": [], "signature": [ - "{ isDeprecated?: boolean | undefined; spaceId?: string | undefined; title: string; version: string; layout?: { id?: ", + "{ spaceId?: string | undefined; isDeprecated?: boolean | undefined; title: string; version: string; layout?: { id?: ", { "pluginId": "screenshotting", "scope": "common", @@ -1214,7 +1214,7 @@ "section": "def-public.Job", "text": "Job" }, - ">" + " | undefined>" ], "path": "packages/kbn-reporting/public/reporting_api_client.ts", "deprecated": false, @@ -1257,7 +1257,9 @@ "parentPluginId": "@kbn/reporting-public", "id": "def-public.ReportingAPIClient.createImmediateReport", "type": "Function", - "tags": [], + "tags": [ + "deprecated" + ], "label": "createImmediateReport", "description": [], "signature": [ @@ -1274,8 +1276,9 @@ ">" ], "path": "packages/kbn-reporting/public/reporting_api_client.ts", - "deprecated": false, + "deprecated": true, "trackAdoption": false, + "references": [], "children": [ { "parentPluginId": "@kbn/reporting-public", @@ -1673,7 +1676,7 @@ "label": "csv", "description": [], "signature": [ - "{ scroll: { duration: string; size: number; }; }" + "{ enablePanelActionDownload: boolean; scroll: { duration: string; size: number; }; }" ], "path": "packages/kbn-reporting/public/types.ts", "deprecated": false, diff --git a/api_docs/kbn_reporting_public.mdx b/api_docs/kbn_reporting_public.mdx index c656ddecf8c0f..2ccdd9fe88902 100644 --- a/api_docs/kbn_reporting_public.mdx +++ b/api_docs/kbn_reporting_public.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-public title: "@kbn/reporting-public" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-public plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-public'] --- import kbnReportingPublicObj from './kbn_reporting_public.devdocs.json'; diff --git a/api_docs/kbn_reporting_server.mdx b/api_docs/kbn_reporting_server.mdx index 8cf43bd816a09..3a7d4fb47f8a4 100644 --- a/api_docs/kbn_reporting_server.mdx +++ b/api_docs/kbn_reporting_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-server title: "@kbn/reporting-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-server plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-server'] --- import kbnReportingServerObj from './kbn_reporting_server.devdocs.json'; diff --git a/api_docs/kbn_resizable_layout.mdx b/api_docs/kbn_resizable_layout.mdx index 3a81ba2f119d8..bf6aabb234000 100644 --- a/api_docs/kbn_resizable_layout.mdx +++ b/api_docs/kbn_resizable_layout.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-resizable-layout title: "@kbn/resizable-layout" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/resizable-layout plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/resizable-layout'] --- import kbnResizableLayoutObj from './kbn_resizable_layout.devdocs.json'; diff --git a/api_docs/kbn_rison.mdx b/api_docs/kbn_rison.mdx index b4de072896275..8c2fc5a09cda2 100644 --- a/api_docs/kbn_rison.mdx +++ b/api_docs/kbn_rison.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-rison title: "@kbn/rison" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/rison plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rison'] --- import kbnRisonObj from './kbn_rison.devdocs.json'; diff --git a/api_docs/kbn_router_utils.mdx b/api_docs/kbn_router_utils.mdx index 300929266114b..7830cf1dabddb 100644 --- a/api_docs/kbn_router_utils.mdx +++ b/api_docs/kbn_router_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-router-utils title: "@kbn/router-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/router-utils plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/router-utils'] --- import kbnRouterUtilsObj from './kbn_router_utils.devdocs.json'; diff --git a/api_docs/kbn_rrule.mdx b/api_docs/kbn_rrule.mdx index ba8a006d855e9..c1881cfe651e2 100644 --- a/api_docs/kbn_rrule.mdx +++ b/api_docs/kbn_rrule.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-rrule title: "@kbn/rrule" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/rrule plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rrule'] --- import kbnRruleObj from './kbn_rrule.devdocs.json'; diff --git a/api_docs/kbn_rule_data_utils.mdx b/api_docs/kbn_rule_data_utils.mdx index 42faacb2b10cb..4384c44a0890f 100644 --- a/api_docs/kbn_rule_data_utils.mdx +++ b/api_docs/kbn_rule_data_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-rule-data-utils title: "@kbn/rule-data-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/rule-data-utils plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rule-data-utils'] --- import kbnRuleDataUtilsObj from './kbn_rule_data_utils.devdocs.json'; diff --git a/api_docs/kbn_saved_objects_settings.mdx b/api_docs/kbn_saved_objects_settings.mdx index a46e01fc4d55d..8c5d3a0b3a207 100644 --- a/api_docs/kbn_saved_objects_settings.mdx +++ b/api_docs/kbn_saved_objects_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-saved-objects-settings title: "@kbn/saved-objects-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/saved-objects-settings plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/saved-objects-settings'] --- import kbnSavedObjectsSettingsObj from './kbn_saved_objects_settings.devdocs.json'; diff --git a/api_docs/kbn_search_api_panels.mdx b/api_docs/kbn_search_api_panels.mdx index 98a8d11bc52ff..a1ef80276674d 100644 --- a/api_docs/kbn_search_api_panels.mdx +++ b/api_docs/kbn_search_api_panels.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-api-panels title: "@kbn/search-api-panels" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-api-panels plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-api-panels'] --- import kbnSearchApiPanelsObj from './kbn_search_api_panels.devdocs.json'; diff --git a/api_docs/kbn_search_connectors.mdx b/api_docs/kbn_search_connectors.mdx index b0ea8b9a62482..1c605877a9f4a 100644 --- a/api_docs/kbn_search_connectors.mdx +++ b/api_docs/kbn_search_connectors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-connectors title: "@kbn/search-connectors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-connectors plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-connectors'] --- import kbnSearchConnectorsObj from './kbn_search_connectors.devdocs.json'; diff --git a/api_docs/kbn_search_errors.mdx b/api_docs/kbn_search_errors.mdx index 43bb19db94829..91558e1a40a79 100644 --- a/api_docs/kbn_search_errors.mdx +++ b/api_docs/kbn_search_errors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-errors title: "@kbn/search-errors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-errors plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-errors'] --- import kbnSearchErrorsObj from './kbn_search_errors.devdocs.json'; diff --git a/api_docs/kbn_search_index_documents.mdx b/api_docs/kbn_search_index_documents.mdx index e9bbad56566d1..28fcfc2efb2b5 100644 --- a/api_docs/kbn_search_index_documents.mdx +++ b/api_docs/kbn_search_index_documents.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-index-documents title: "@kbn/search-index-documents" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-index-documents plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-index-documents'] --- import kbnSearchIndexDocumentsObj from './kbn_search_index_documents.devdocs.json'; diff --git a/api_docs/kbn_search_response_warnings.mdx b/api_docs/kbn_search_response_warnings.mdx index bd7ca2a40a49e..7f627940782e7 100644 --- a/api_docs/kbn_search_response_warnings.mdx +++ b/api_docs/kbn_search_response_warnings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-response-warnings title: "@kbn/search-response-warnings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-response-warnings plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-response-warnings'] --- import kbnSearchResponseWarningsObj from './kbn_search_response_warnings.devdocs.json'; diff --git a/api_docs/kbn_security_hardening.mdx b/api_docs/kbn_security_hardening.mdx index 94524ec4a2dc8..f6af127b61da3 100644 --- a/api_docs/kbn_security_hardening.mdx +++ b/api_docs/kbn_security_hardening.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-hardening title: "@kbn/security-hardening" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-hardening plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-hardening'] --- import kbnSecurityHardeningObj from './kbn_security_hardening.devdocs.json'; diff --git a/api_docs/kbn_security_plugin_types_common.mdx b/api_docs/kbn_security_plugin_types_common.mdx index df1ba271ff705..a4592a246bc62 100644 --- a/api_docs/kbn_security_plugin_types_common.mdx +++ b/api_docs/kbn_security_plugin_types_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-plugin-types-common title: "@kbn/security-plugin-types-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-plugin-types-common plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-plugin-types-common'] --- import kbnSecurityPluginTypesCommonObj from './kbn_security_plugin_types_common.devdocs.json'; diff --git a/api_docs/kbn_security_plugin_types_public.devdocs.json b/api_docs/kbn_security_plugin_types_public.devdocs.json index 53b647c267b51..19e33e7db0b0f 100644 --- a/api_docs/kbn_security_plugin_types_public.devdocs.json +++ b/api_docs/kbn_security_plugin_types_public.devdocs.json @@ -62,6 +62,38 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/security-plugin-types-public", + "id": "def-public.AuthorizationServiceSetup", + "type": "Interface", + "tags": [], + "label": "AuthorizationServiceSetup", + "description": [], + "path": "x-pack/packages/security/plugin_types_public/src/authorization/authorization_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/security-plugin-types-public", + "id": "def-public.AuthorizationServiceSetup.isRoleManagementEnabled", + "type": "Function", + "tags": [], + "label": "isRoleManagementEnabled", + "description": [ + "\nDetermines if role management is enabled." + ], + "signature": [ + "() => boolean | undefined" + ], + "path": "x-pack/packages/security/plugin_types_public/src/authorization/authorization_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + } + ], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/security-plugin-types-public", "id": "def-public.GetUserProfileResponse", @@ -257,6 +289,28 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "@kbn/security-plugin-types-public", + "id": "def-public.SecurityPluginSetup.authz", + "type": "Object", + "tags": [], + "label": "authz", + "description": [ + "\nExposes authorization configuration." + ], + "signature": [ + { + "pluginId": "@kbn/security-plugin-types-public", + "scope": "public", + "docId": "kibKbnSecurityPluginTypesPublicPluginApi", + "section": "def-public.AuthorizationServiceSetup", + "text": "AuthorizationServiceSetup" + } + ], + "path": "x-pack/packages/security/plugin_types_public/src/plugin.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "@kbn/security-plugin-types-public", "id": "def-public.SecurityPluginSetup.license", @@ -337,6 +391,28 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "@kbn/security-plugin-types-public", + "id": "def-public.SecurityPluginStart.authz", + "type": "Object", + "tags": [], + "label": "authz", + "description": [ + "\nExposes authorization configuration." + ], + "signature": [ + { + "pluginId": "@kbn/security-plugin-types-public", + "scope": "public", + "docId": "kibKbnSecurityPluginTypesPublicPluginApi", + "section": "def-public.AuthorizationServiceSetup", + "text": "AuthorizationServiceSetup" + } + ], + "path": "x-pack/packages/security/plugin_types_public/src/plugin.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "@kbn/security-plugin-types-public", "id": "def-public.SecurityPluginStart.userProfiles", @@ -916,6 +992,29 @@ "deprecated": false, "trackAdoption": false, "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/security-plugin-types-public", + "id": "def-public.AuthorizationServiceStart", + "type": "Type", + "tags": [], + "label": "AuthorizationServiceStart", + "description": [ + "\nStart has the same contract as Setup for now." + ], + "signature": [ + { + "pluginId": "@kbn/security-plugin-types-public", + "scope": "public", + "docId": "kibKbnSecurityPluginTypesPublicPluginApi", + "section": "def-public.AuthorizationServiceSetup", + "text": "AuthorizationServiceSetup" + } + ], + "path": "x-pack/packages/security/plugin_types_public/src/authorization/authorization_service.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false } ], "objects": [] diff --git a/api_docs/kbn_security_plugin_types_public.mdx b/api_docs/kbn_security_plugin_types_public.mdx index c9dfaad053116..96252b32cb67e 100644 --- a/api_docs/kbn_security_plugin_types_public.mdx +++ b/api_docs/kbn_security_plugin_types_public.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-plugin-types-public title: "@kbn/security-plugin-types-public" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-plugin-types-public plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-plugin-types-public'] --- import kbnSecurityPluginTypesPublicObj from './kbn_security_plugin_types_public.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana- | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 44 | 0 | 14 | 0 | +| 49 | 0 | 15 | 0 | ## Client diff --git a/api_docs/kbn_security_plugin_types_server.mdx b/api_docs/kbn_security_plugin_types_server.mdx index 37c9da078ba77..6c28e698c2f8d 100644 --- a/api_docs/kbn_security_plugin_types_server.mdx +++ b/api_docs/kbn_security_plugin_types_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-plugin-types-server title: "@kbn/security-plugin-types-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-plugin-types-server plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-plugin-types-server'] --- import kbnSecurityPluginTypesServerObj from './kbn_security_plugin_types_server.devdocs.json'; diff --git a/api_docs/kbn_security_solution_features.mdx b/api_docs/kbn_security_solution_features.mdx index b7fd3352b0ee2..46a50629c675c 100644 --- a/api_docs/kbn_security_solution_features.mdx +++ b/api_docs/kbn_security_solution_features.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-solution-features title: "@kbn/security-solution-features" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-solution-features plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-solution-features'] --- import kbnSecuritySolutionFeaturesObj from './kbn_security_solution_features.devdocs.json'; diff --git a/api_docs/kbn_security_solution_navigation.devdocs.json b/api_docs/kbn_security_solution_navigation.devdocs.json index 4d2fd32ad0e23..7a727bb3ab213 100644 --- a/api_docs/kbn_security_solution_navigation.devdocs.json +++ b/api_docs/kbn_security_solution_navigation.devdocs.json @@ -956,7 +956,7 @@ "tags": [], "label": "SecurityPageName", "description": [], - "path": "x-pack/packages/security-solution/navigation/src/constants.ts", + "path": "packages/deeplinks/security/deep_links.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false diff --git a/api_docs/kbn_security_solution_navigation.mdx b/api_docs/kbn_security_solution_navigation.mdx index d2ce543a6d473..34a113460d239 100644 --- a/api_docs/kbn_security_solution_navigation.mdx +++ b/api_docs/kbn_security_solution_navigation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-solution-navigation title: "@kbn/security-solution-navigation" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-solution-navigation plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-solution-navigation'] --- import kbnSecuritySolutionNavigationObj from './kbn_security_solution_navigation.devdocs.json'; diff --git a/api_docs/kbn_security_solution_side_nav.mdx b/api_docs/kbn_security_solution_side_nav.mdx index 87bdb7941713d..e7750974c88fb 100644 --- a/api_docs/kbn_security_solution_side_nav.mdx +++ b/api_docs/kbn_security_solution_side_nav.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-solution-side-nav title: "@kbn/security-solution-side-nav" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-solution-side-nav plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-solution-side-nav'] --- import kbnSecuritySolutionSideNavObj from './kbn_security_solution_side_nav.devdocs.json'; diff --git a/api_docs/kbn_security_solution_storybook_config.mdx b/api_docs/kbn_security_solution_storybook_config.mdx index 083c40f95c2c4..118c69f684889 100644 --- a/api_docs/kbn_security_solution_storybook_config.mdx +++ b/api_docs/kbn_security_solution_storybook_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-solution-storybook-config title: "@kbn/security-solution-storybook-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-solution-storybook-config plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-solution-storybook-config'] --- import kbnSecuritySolutionStorybookConfigObj from './kbn_security_solution_storybook_config.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_autocomplete.mdx b/api_docs/kbn_securitysolution_autocomplete.mdx index 78f61a0afc48d..f408e9264e75c 100644 --- a/api_docs/kbn_securitysolution_autocomplete.mdx +++ b/api_docs/kbn_securitysolution_autocomplete.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-autocomplete title: "@kbn/securitysolution-autocomplete" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-autocomplete plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-autocomplete'] --- import kbnSecuritysolutionAutocompleteObj from './kbn_securitysolution_autocomplete.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_data_table.mdx b/api_docs/kbn_securitysolution_data_table.mdx index 59b7c5f2bfe34..151d1fccef3f4 100644 --- a/api_docs/kbn_securitysolution_data_table.mdx +++ b/api_docs/kbn_securitysolution_data_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-data-table title: "@kbn/securitysolution-data-table" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-data-table plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-data-table'] --- import kbnSecuritysolutionDataTableObj from './kbn_securitysolution_data_table.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_ecs.mdx b/api_docs/kbn_securitysolution_ecs.mdx index 7e118a59ba3b4..14f50416b2ed1 100644 --- a/api_docs/kbn_securitysolution_ecs.mdx +++ b/api_docs/kbn_securitysolution_ecs.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-ecs title: "@kbn/securitysolution-ecs" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-ecs plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-ecs'] --- import kbnSecuritysolutionEcsObj from './kbn_securitysolution_ecs.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_es_utils.devdocs.json b/api_docs/kbn_securitysolution_es_utils.devdocs.json index 13f48adefb971..ac9fdda50ec1d 100644 --- a/api_docs/kbn_securitysolution_es_utils.devdocs.json +++ b/api_docs/kbn_securitysolution_es_utils.devdocs.json @@ -640,7 +640,39 @@ "label": "esClient", "description": [], "signature": [ - "{ create: { (this: That, params: ", + "{ search: { >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "SearchResponse", + ">; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "SearchResponse", + ", unknown>>; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "SearchResponse", + ">; }; create: { (this: That, params: ", "CreateRequest", " | ", "CreateRequest", @@ -744,39 +776,7 @@ "TransportRequestOptions", " | undefined): Promise<", "WriteResponseBase", - ">; }; search: { >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptionsWithOutMeta", - " | undefined): Promise<", - "SearchResponse", - ">; >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptionsWithMeta", - " | undefined): Promise<", - "TransportResult", - "<", - "SearchResponse", - ", unknown>>; >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptions", - " | undefined): Promise<", - "SearchResponse", - ">; }; helpers: ", + ">; }; helpers: ", "default", "; name: string | symbol; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kEsql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kInference]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kQueryRuleset]: symbol | null; [kRollup]: symbol | null; [kSearchApplication]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kSynonyms]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", "default", @@ -1920,7 +1920,39 @@ "label": "esClient", "description": [], "signature": [ - "{ create: { (this: That, params: ", + "{ search: { >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "SearchResponse", + ">; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "SearchResponse", + ", unknown>>; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "SearchResponse", + ">; }; create: { (this: That, params: ", "CreateRequest", " | ", "CreateRequest", @@ -2024,39 +2056,7 @@ "TransportRequestOptions", " | undefined): Promise<", "WriteResponseBase", - ">; }; search: { >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptionsWithOutMeta", - " | undefined): Promise<", - "SearchResponse", - ">; >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptionsWithMeta", - " | undefined): Promise<", - "TransportResult", - "<", - "SearchResponse", - ", unknown>>; >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptions", - " | undefined): Promise<", - "SearchResponse", - ">; }; helpers: ", + ">; }; helpers: ", "default", "; name: string | symbol; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kEsql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kInference]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kQueryRuleset]: symbol | null; [kRollup]: symbol | null; [kSearchApplication]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kSynonyms]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", "default", diff --git a/api_docs/kbn_securitysolution_es_utils.mdx b/api_docs/kbn_securitysolution_es_utils.mdx index 57deecb461496..636075f70aeac 100644 --- a/api_docs/kbn_securitysolution_es_utils.mdx +++ b/api_docs/kbn_securitysolution_es_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-es-utils title: "@kbn/securitysolution-es-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-es-utils plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-es-utils'] --- import kbnSecuritysolutionEsUtilsObj from './kbn_securitysolution_es_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_exception_list_components.devdocs.json b/api_docs/kbn_securitysolution_exception_list_components.devdocs.json index c187f793426b9..2d9cb944dcb77 100644 --- a/api_docs/kbn_securitysolution_exception_list_components.devdocs.json +++ b/api_docs/kbn_securitysolution_exception_list_components.devdocs.json @@ -851,7 +851,7 @@ "label": "formattedDateComponent", "description": [], "signature": [ - "\"symbol\" | \"object\" | \"big\" | \"link\" | \"small\" | \"sub\" | \"sup\" | \"source\" | \"desc\" | \"filter\" | \"text\" | \"map\" | \"head\" | \"slot\" | \"style\" | \"title\" | \"meta\" | \"data\" | \"pattern\" | \"summary\" | \"template\" | \"span\" | \"main\" | \"path\" | \"form\" | \"body\" | \"q\" | \"label\" | \"progress\" | \"article\" | \"image\" | \"menu\" | \"stop\" | \"base\" | React.ComponentType | \"s\" | \"legend\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"p\" | \"canvas\" | \"svg\" | \"select\" | \"output\" | \"view\" | \"script\" | \"time\" | \"mask\" | \"input\" | \"table\" | \"a\" | \"abbr\" | \"address\" | \"area\" | \"aside\" | \"audio\" | \"b\" | \"bdi\" | \"bdo\" | \"blockquote\" | \"br\" | \"button\" | \"caption\" | \"cite\" | \"code\" | \"col\" | \"colgroup\" | \"datalist\" | \"dd\" | \"del\" | \"details\" | \"dfn\" | \"dialog\" | \"div\" | \"dl\" | \"dt\" | \"em\" | \"embed\" | \"fieldset\" | \"figcaption\" | \"figure\" | \"footer\" | \"header\" | \"hgroup\" | \"hr\" | \"html\" | \"i\" | \"iframe\" | \"img\" | \"ins\" | \"kbd\" | \"keygen\" | \"li\" | \"mark\" | \"menuitem\" | \"meter\" | \"nav\" | \"noindex\" | \"noscript\" | \"ol\" | \"optgroup\" | \"option\" | \"param\" | \"picture\" | \"pre\" | \"rp\" | \"rt\" | \"ruby\" | \"samp\" | \"section\" | \"strong\" | \"tbody\" | \"td\" | \"textarea\" | \"tfoot\" | \"th\" | \"thead\" | \"tr\" | \"track\" | \"u\" | \"ul\" | \"var\" | \"video\" | \"wbr\" | \"webview\" | \"animate\" | \"animateMotion\" | \"animateTransform\" | \"circle\" | \"clipPath\" | \"defs\" | \"ellipse\" | \"feBlend\" | \"feColorMatrix\" | \"feComponentTransfer\" | \"feComposite\" | \"feConvolveMatrix\" | \"feDiffuseLighting\" | \"feDisplacementMap\" | \"feDistantLight\" | \"feDropShadow\" | \"feFlood\" | \"feFuncA\" | \"feFuncB\" | \"feFuncG\" | \"feFuncR\" | \"feGaussianBlur\" | \"feImage\" | \"feMerge\" | \"feMergeNode\" | \"feMorphology\" | \"feOffset\" | \"fePointLight\" | \"feSpecularLighting\" | \"feSpotLight\" | \"feTile\" | \"feTurbulence\" | \"foreignObject\" | \"g\" | \"line\" | \"linearGradient\" | \"marker\" | \"metadata\" | \"mpath\" | \"polygon\" | \"polyline\" | \"radialGradient\" | \"rect\" | \"switch\" | \"textPath\" | \"tspan\" | \"use\"" + "\"symbol\" | \"object\" | \"source\" | \"big\" | \"link\" | \"small\" | \"sub\" | \"sup\" | \"desc\" | \"filter\" | \"text\" | \"map\" | \"head\" | \"slot\" | \"style\" | \"title\" | \"meta\" | \"data\" | \"pattern\" | \"summary\" | \"template\" | \"span\" | \"main\" | \"path\" | \"form\" | \"body\" | \"q\" | \"label\" | \"progress\" | \"article\" | \"image\" | \"menu\" | \"stop\" | \"base\" | React.ComponentType | \"s\" | \"legend\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"p\" | \"canvas\" | \"svg\" | \"select\" | \"output\" | \"view\" | \"script\" | \"time\" | \"mask\" | \"input\" | \"table\" | \"a\" | \"abbr\" | \"address\" | \"area\" | \"aside\" | \"audio\" | \"b\" | \"bdi\" | \"bdo\" | \"blockquote\" | \"br\" | \"button\" | \"caption\" | \"cite\" | \"code\" | \"col\" | \"colgroup\" | \"datalist\" | \"dd\" | \"del\" | \"details\" | \"dfn\" | \"dialog\" | \"div\" | \"dl\" | \"dt\" | \"em\" | \"embed\" | \"fieldset\" | \"figcaption\" | \"figure\" | \"footer\" | \"header\" | \"hgroup\" | \"hr\" | \"html\" | \"i\" | \"iframe\" | \"img\" | \"ins\" | \"kbd\" | \"keygen\" | \"li\" | \"mark\" | \"menuitem\" | \"meter\" | \"nav\" | \"noindex\" | \"noscript\" | \"ol\" | \"optgroup\" | \"option\" | \"param\" | \"picture\" | \"pre\" | \"rp\" | \"rt\" | \"ruby\" | \"samp\" | \"section\" | \"strong\" | \"tbody\" | \"td\" | \"textarea\" | \"tfoot\" | \"th\" | \"thead\" | \"tr\" | \"track\" | \"u\" | \"ul\" | \"var\" | \"video\" | \"wbr\" | \"webview\" | \"animate\" | \"animateMotion\" | \"animateTransform\" | \"circle\" | \"clipPath\" | \"defs\" | \"ellipse\" | \"feBlend\" | \"feColorMatrix\" | \"feComponentTransfer\" | \"feComposite\" | \"feConvolveMatrix\" | \"feDiffuseLighting\" | \"feDisplacementMap\" | \"feDistantLight\" | \"feDropShadow\" | \"feFlood\" | \"feFuncA\" | \"feFuncB\" | \"feFuncG\" | \"feFuncR\" | \"feGaussianBlur\" | \"feImage\" | \"feMerge\" | \"feMergeNode\" | \"feMorphology\" | \"feOffset\" | \"fePointLight\" | \"feSpecularLighting\" | \"feSpotLight\" | \"feTile\" | \"feTurbulence\" | \"foreignObject\" | \"g\" | \"line\" | \"linearGradient\" | \"marker\" | \"metadata\" | \"mpath\" | \"polygon\" | \"polyline\" | \"radialGradient\" | \"rect\" | \"switch\" | \"textPath\" | \"tspan\" | \"use\"" ], "path": "packages/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/index.tsx", "deprecated": false, @@ -865,7 +865,7 @@ "label": "securityLinkAnchorComponent", "description": [], "signature": [ - "\"symbol\" | \"object\" | \"big\" | \"link\" | \"small\" | \"sub\" | \"sup\" | \"source\" | \"desc\" | \"filter\" | \"text\" | \"map\" | \"head\" | \"slot\" | \"style\" | \"title\" | \"meta\" | \"data\" | \"pattern\" | \"summary\" | \"template\" | \"span\" | \"main\" | \"path\" | \"form\" | \"body\" | \"q\" | \"label\" | \"progress\" | \"article\" | \"image\" | \"menu\" | \"stop\" | \"base\" | React.ComponentType | \"s\" | \"legend\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"p\" | \"canvas\" | \"svg\" | \"select\" | \"output\" | \"view\" | \"script\" | \"time\" | \"mask\" | \"input\" | \"table\" | \"a\" | \"abbr\" | \"address\" | \"area\" | \"aside\" | \"audio\" | \"b\" | \"bdi\" | \"bdo\" | \"blockquote\" | \"br\" | \"button\" | \"caption\" | \"cite\" | \"code\" | \"col\" | \"colgroup\" | \"datalist\" | \"dd\" | \"del\" | \"details\" | \"dfn\" | \"dialog\" | \"div\" | \"dl\" | \"dt\" | \"em\" | \"embed\" | \"fieldset\" | \"figcaption\" | \"figure\" | \"footer\" | \"header\" | \"hgroup\" | \"hr\" | \"html\" | \"i\" | \"iframe\" | \"img\" | \"ins\" | \"kbd\" | \"keygen\" | \"li\" | \"mark\" | \"menuitem\" | \"meter\" | \"nav\" | \"noindex\" | \"noscript\" | \"ol\" | \"optgroup\" | \"option\" | \"param\" | \"picture\" | \"pre\" | \"rp\" | \"rt\" | \"ruby\" | \"samp\" | \"section\" | \"strong\" | \"tbody\" | \"td\" | \"textarea\" | \"tfoot\" | \"th\" | \"thead\" | \"tr\" | \"track\" | \"u\" | \"ul\" | \"var\" | \"video\" | \"wbr\" | \"webview\" | \"animate\" | \"animateMotion\" | \"animateTransform\" | \"circle\" | \"clipPath\" | \"defs\" | \"ellipse\" | \"feBlend\" | \"feColorMatrix\" | \"feComponentTransfer\" | \"feComposite\" | \"feConvolveMatrix\" | \"feDiffuseLighting\" | \"feDisplacementMap\" | \"feDistantLight\" | \"feDropShadow\" | \"feFlood\" | \"feFuncA\" | \"feFuncB\" | \"feFuncG\" | \"feFuncR\" | \"feGaussianBlur\" | \"feImage\" | \"feMerge\" | \"feMergeNode\" | \"feMorphology\" | \"feOffset\" | \"fePointLight\" | \"feSpecularLighting\" | \"feSpotLight\" | \"feTile\" | \"feTurbulence\" | \"foreignObject\" | \"g\" | \"line\" | \"linearGradient\" | \"marker\" | \"metadata\" | \"mpath\" | \"polygon\" | \"polyline\" | \"radialGradient\" | \"rect\" | \"switch\" | \"textPath\" | \"tspan\" | \"use\"" + "\"symbol\" | \"object\" | \"source\" | \"big\" | \"link\" | \"small\" | \"sub\" | \"sup\" | \"desc\" | \"filter\" | \"text\" | \"map\" | \"head\" | \"slot\" | \"style\" | \"title\" | \"meta\" | \"data\" | \"pattern\" | \"summary\" | \"template\" | \"span\" | \"main\" | \"path\" | \"form\" | \"body\" | \"q\" | \"label\" | \"progress\" | \"article\" | \"image\" | \"menu\" | \"stop\" | \"base\" | React.ComponentType | \"s\" | \"legend\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"p\" | \"canvas\" | \"svg\" | \"select\" | \"output\" | \"view\" | \"script\" | \"time\" | \"mask\" | \"input\" | \"table\" | \"a\" | \"abbr\" | \"address\" | \"area\" | \"aside\" | \"audio\" | \"b\" | \"bdi\" | \"bdo\" | \"blockquote\" | \"br\" | \"button\" | \"caption\" | \"cite\" | \"code\" | \"col\" | \"colgroup\" | \"datalist\" | \"dd\" | \"del\" | \"details\" | \"dfn\" | \"dialog\" | \"div\" | \"dl\" | \"dt\" | \"em\" | \"embed\" | \"fieldset\" | \"figcaption\" | \"figure\" | \"footer\" | \"header\" | \"hgroup\" | \"hr\" | \"html\" | \"i\" | \"iframe\" | \"img\" | \"ins\" | \"kbd\" | \"keygen\" | \"li\" | \"mark\" | \"menuitem\" | \"meter\" | \"nav\" | \"noindex\" | \"noscript\" | \"ol\" | \"optgroup\" | \"option\" | \"param\" | \"picture\" | \"pre\" | \"rp\" | \"rt\" | \"ruby\" | \"samp\" | \"section\" | \"strong\" | \"tbody\" | \"td\" | \"textarea\" | \"tfoot\" | \"th\" | \"thead\" | \"tr\" | \"track\" | \"u\" | \"ul\" | \"var\" | \"video\" | \"wbr\" | \"webview\" | \"animate\" | \"animateMotion\" | \"animateTransform\" | \"circle\" | \"clipPath\" | \"defs\" | \"ellipse\" | \"feBlend\" | \"feColorMatrix\" | \"feComponentTransfer\" | \"feComposite\" | \"feConvolveMatrix\" | \"feDiffuseLighting\" | \"feDisplacementMap\" | \"feDistantLight\" | \"feDropShadow\" | \"feFlood\" | \"feFuncA\" | \"feFuncB\" | \"feFuncG\" | \"feFuncR\" | \"feGaussianBlur\" | \"feImage\" | \"feMerge\" | \"feMergeNode\" | \"feMorphology\" | \"feOffset\" | \"fePointLight\" | \"feSpecularLighting\" | \"feSpotLight\" | \"feTile\" | \"feTurbulence\" | \"foreignObject\" | \"g\" | \"line\" | \"linearGradient\" | \"marker\" | \"metadata\" | \"mpath\" | \"polygon\" | \"polyline\" | \"radialGradient\" | \"rect\" | \"switch\" | \"textPath\" | \"tspan\" | \"use\"" ], "path": "packages/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/index.tsx", "deprecated": false, @@ -1004,7 +1004,7 @@ "label": "securityLinkAnchorComponent", "description": [], "signature": [ - "\"symbol\" | \"object\" | \"big\" | \"link\" | \"small\" | \"sub\" | \"sup\" | \"source\" | \"desc\" | \"filter\" | \"text\" | \"map\" | \"head\" | \"slot\" | \"style\" | \"title\" | \"meta\" | \"data\" | \"pattern\" | \"summary\" | \"template\" | \"span\" | \"main\" | \"path\" | \"form\" | \"body\" | \"q\" | \"label\" | \"progress\" | \"article\" | \"image\" | \"menu\" | \"stop\" | \"base\" | React.ComponentType | \"s\" | \"legend\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"p\" | \"canvas\" | \"svg\" | \"select\" | \"output\" | \"view\" | \"script\" | \"time\" | \"mask\" | \"input\" | \"table\" | \"a\" | \"abbr\" | \"address\" | \"area\" | \"aside\" | \"audio\" | \"b\" | \"bdi\" | \"bdo\" | \"blockquote\" | \"br\" | \"button\" | \"caption\" | \"cite\" | \"code\" | \"col\" | \"colgroup\" | \"datalist\" | \"dd\" | \"del\" | \"details\" | \"dfn\" | \"dialog\" | \"div\" | \"dl\" | \"dt\" | \"em\" | \"embed\" | \"fieldset\" | \"figcaption\" | \"figure\" | \"footer\" | \"header\" | \"hgroup\" | \"hr\" | \"html\" | \"i\" | \"iframe\" | \"img\" | \"ins\" | \"kbd\" | \"keygen\" | \"li\" | \"mark\" | \"menuitem\" | \"meter\" | \"nav\" | \"noindex\" | \"noscript\" | \"ol\" | \"optgroup\" | \"option\" | \"param\" | \"picture\" | \"pre\" | \"rp\" | \"rt\" | \"ruby\" | \"samp\" | \"section\" | \"strong\" | \"tbody\" | \"td\" | \"textarea\" | \"tfoot\" | \"th\" | \"thead\" | \"tr\" | \"track\" | \"u\" | \"ul\" | \"var\" | \"video\" | \"wbr\" | \"webview\" | \"animate\" | \"animateMotion\" | \"animateTransform\" | \"circle\" | \"clipPath\" | \"defs\" | \"ellipse\" | \"feBlend\" | \"feColorMatrix\" | \"feComponentTransfer\" | \"feComposite\" | \"feConvolveMatrix\" | \"feDiffuseLighting\" | \"feDisplacementMap\" | \"feDistantLight\" | \"feDropShadow\" | \"feFlood\" | \"feFuncA\" | \"feFuncB\" | \"feFuncG\" | \"feFuncR\" | \"feGaussianBlur\" | \"feImage\" | \"feMerge\" | \"feMergeNode\" | \"feMorphology\" | \"feOffset\" | \"fePointLight\" | \"feSpecularLighting\" | \"feSpotLight\" | \"feTile\" | \"feTurbulence\" | \"foreignObject\" | \"g\" | \"line\" | \"linearGradient\" | \"marker\" | \"metadata\" | \"mpath\" | \"polygon\" | \"polyline\" | \"radialGradient\" | \"rect\" | \"switch\" | \"textPath\" | \"tspan\" | \"use\"" + "\"symbol\" | \"object\" | \"source\" | \"big\" | \"link\" | \"small\" | \"sub\" | \"sup\" | \"desc\" | \"filter\" | \"text\" | \"map\" | \"head\" | \"slot\" | \"style\" | \"title\" | \"meta\" | \"data\" | \"pattern\" | \"summary\" | \"template\" | \"span\" | \"main\" | \"path\" | \"form\" | \"body\" | \"q\" | \"label\" | \"progress\" | \"article\" | \"image\" | \"menu\" | \"stop\" | \"base\" | React.ComponentType | \"s\" | \"legend\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"p\" | \"canvas\" | \"svg\" | \"select\" | \"output\" | \"view\" | \"script\" | \"time\" | \"mask\" | \"input\" | \"table\" | \"a\" | \"abbr\" | \"address\" | \"area\" | \"aside\" | \"audio\" | \"b\" | \"bdi\" | \"bdo\" | \"blockquote\" | \"br\" | \"button\" | \"caption\" | \"cite\" | \"code\" | \"col\" | \"colgroup\" | \"datalist\" | \"dd\" | \"del\" | \"details\" | \"dfn\" | \"dialog\" | \"div\" | \"dl\" | \"dt\" | \"em\" | \"embed\" | \"fieldset\" | \"figcaption\" | \"figure\" | \"footer\" | \"header\" | \"hgroup\" | \"hr\" | \"html\" | \"i\" | \"iframe\" | \"img\" | \"ins\" | \"kbd\" | \"keygen\" | \"li\" | \"mark\" | \"menuitem\" | \"meter\" | \"nav\" | \"noindex\" | \"noscript\" | \"ol\" | \"optgroup\" | \"option\" | \"param\" | \"picture\" | \"pre\" | \"rp\" | \"rt\" | \"ruby\" | \"samp\" | \"section\" | \"strong\" | \"tbody\" | \"td\" | \"textarea\" | \"tfoot\" | \"th\" | \"thead\" | \"tr\" | \"track\" | \"u\" | \"ul\" | \"var\" | \"video\" | \"wbr\" | \"webview\" | \"animate\" | \"animateMotion\" | \"animateTransform\" | \"circle\" | \"clipPath\" | \"defs\" | \"ellipse\" | \"feBlend\" | \"feColorMatrix\" | \"feComponentTransfer\" | \"feComposite\" | \"feConvolveMatrix\" | \"feDiffuseLighting\" | \"feDisplacementMap\" | \"feDistantLight\" | \"feDropShadow\" | \"feFlood\" | \"feFuncA\" | \"feFuncB\" | \"feFuncG\" | \"feFuncR\" | \"feGaussianBlur\" | \"feImage\" | \"feMerge\" | \"feMergeNode\" | \"feMorphology\" | \"feOffset\" | \"fePointLight\" | \"feSpecularLighting\" | \"feSpotLight\" | \"feTile\" | \"feTurbulence\" | \"foreignObject\" | \"g\" | \"line\" | \"linearGradient\" | \"marker\" | \"metadata\" | \"mpath\" | \"polygon\" | \"polyline\" | \"radialGradient\" | \"rect\" | \"switch\" | \"textPath\" | \"tspan\" | \"use\"" ], "path": "packages/kbn-securitysolution-exception-list-components/src/exception_item_card/exception_item_card.tsx", "deprecated": false, @@ -1018,7 +1018,7 @@ "label": "formattedDateComponent", "description": [], "signature": [ - "\"symbol\" | \"object\" | \"big\" | \"link\" | \"small\" | \"sub\" | \"sup\" | \"source\" | \"desc\" | \"filter\" | \"text\" | \"map\" | \"head\" | \"slot\" | \"style\" | \"title\" | \"meta\" | \"data\" | \"pattern\" | \"summary\" | \"template\" | \"span\" | \"main\" | \"path\" | \"form\" | \"body\" | \"q\" | \"label\" | \"progress\" | \"article\" | \"image\" | \"menu\" | \"stop\" | \"base\" | React.ComponentType | \"s\" | \"legend\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"p\" | \"canvas\" | \"svg\" | \"select\" | \"output\" | \"view\" | \"script\" | \"time\" | \"mask\" | \"input\" | \"table\" | \"a\" | \"abbr\" | \"address\" | \"area\" | \"aside\" | \"audio\" | \"b\" | \"bdi\" | \"bdo\" | \"blockquote\" | \"br\" | \"button\" | \"caption\" | \"cite\" | \"code\" | \"col\" | \"colgroup\" | \"datalist\" | \"dd\" | \"del\" | \"details\" | \"dfn\" | \"dialog\" | \"div\" | \"dl\" | \"dt\" | \"em\" | \"embed\" | \"fieldset\" | \"figcaption\" | \"figure\" | \"footer\" | \"header\" | \"hgroup\" | \"hr\" | \"html\" | \"i\" | \"iframe\" | \"img\" | \"ins\" | \"kbd\" | \"keygen\" | \"li\" | \"mark\" | \"menuitem\" | \"meter\" | \"nav\" | \"noindex\" | \"noscript\" | \"ol\" | \"optgroup\" | \"option\" | \"param\" | \"picture\" | \"pre\" | \"rp\" | \"rt\" | \"ruby\" | \"samp\" | \"section\" | \"strong\" | \"tbody\" | \"td\" | \"textarea\" | \"tfoot\" | \"th\" | \"thead\" | \"tr\" | \"track\" | \"u\" | \"ul\" | \"var\" | \"video\" | \"wbr\" | \"webview\" | \"animate\" | \"animateMotion\" | \"animateTransform\" | \"circle\" | \"clipPath\" | \"defs\" | \"ellipse\" | \"feBlend\" | \"feColorMatrix\" | \"feComponentTransfer\" | \"feComposite\" | \"feConvolveMatrix\" | \"feDiffuseLighting\" | \"feDisplacementMap\" | \"feDistantLight\" | \"feDropShadow\" | \"feFlood\" | \"feFuncA\" | \"feFuncB\" | \"feFuncG\" | \"feFuncR\" | \"feGaussianBlur\" | \"feImage\" | \"feMerge\" | \"feMergeNode\" | \"feMorphology\" | \"feOffset\" | \"fePointLight\" | \"feSpecularLighting\" | \"feSpotLight\" | \"feTile\" | \"feTurbulence\" | \"foreignObject\" | \"g\" | \"line\" | \"linearGradient\" | \"marker\" | \"metadata\" | \"mpath\" | \"polygon\" | \"polyline\" | \"radialGradient\" | \"rect\" | \"switch\" | \"textPath\" | \"tspan\" | \"use\"" + "\"symbol\" | \"object\" | \"source\" | \"big\" | \"link\" | \"small\" | \"sub\" | \"sup\" | \"desc\" | \"filter\" | \"text\" | \"map\" | \"head\" | \"slot\" | \"style\" | \"title\" | \"meta\" | \"data\" | \"pattern\" | \"summary\" | \"template\" | \"span\" | \"main\" | \"path\" | \"form\" | \"body\" | \"q\" | \"label\" | \"progress\" | \"article\" | \"image\" | \"menu\" | \"stop\" | \"base\" | React.ComponentType | \"s\" | \"legend\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"p\" | \"canvas\" | \"svg\" | \"select\" | \"output\" | \"view\" | \"script\" | \"time\" | \"mask\" | \"input\" | \"table\" | \"a\" | \"abbr\" | \"address\" | \"area\" | \"aside\" | \"audio\" | \"b\" | \"bdi\" | \"bdo\" | \"blockquote\" | \"br\" | \"button\" | \"caption\" | \"cite\" | \"code\" | \"col\" | \"colgroup\" | \"datalist\" | \"dd\" | \"del\" | \"details\" | \"dfn\" | \"dialog\" | \"div\" | \"dl\" | \"dt\" | \"em\" | \"embed\" | \"fieldset\" | \"figcaption\" | \"figure\" | \"footer\" | \"header\" | \"hgroup\" | \"hr\" | \"html\" | \"i\" | \"iframe\" | \"img\" | \"ins\" | \"kbd\" | \"keygen\" | \"li\" | \"mark\" | \"menuitem\" | \"meter\" | \"nav\" | \"noindex\" | \"noscript\" | \"ol\" | \"optgroup\" | \"option\" | \"param\" | \"picture\" | \"pre\" | \"rp\" | \"rt\" | \"ruby\" | \"samp\" | \"section\" | \"strong\" | \"tbody\" | \"td\" | \"textarea\" | \"tfoot\" | \"th\" | \"thead\" | \"tr\" | \"track\" | \"u\" | \"ul\" | \"var\" | \"video\" | \"wbr\" | \"webview\" | \"animate\" | \"animateMotion\" | \"animateTransform\" | \"circle\" | \"clipPath\" | \"defs\" | \"ellipse\" | \"feBlend\" | \"feColorMatrix\" | \"feComponentTransfer\" | \"feComposite\" | \"feConvolveMatrix\" | \"feDiffuseLighting\" | \"feDisplacementMap\" | \"feDistantLight\" | \"feDropShadow\" | \"feFlood\" | \"feFuncA\" | \"feFuncB\" | \"feFuncG\" | \"feFuncR\" | \"feGaussianBlur\" | \"feImage\" | \"feMerge\" | \"feMergeNode\" | \"feMorphology\" | \"feOffset\" | \"fePointLight\" | \"feSpecularLighting\" | \"feSpotLight\" | \"feTile\" | \"feTurbulence\" | \"foreignObject\" | \"g\" | \"line\" | \"linearGradient\" | \"marker\" | \"metadata\" | \"mpath\" | \"polygon\" | \"polyline\" | \"radialGradient\" | \"rect\" | \"switch\" | \"textPath\" | \"tspan\" | \"use\"" ], "path": "packages/kbn-securitysolution-exception-list-components/src/exception_item_card/exception_item_card.tsx", "deprecated": false, diff --git a/api_docs/kbn_securitysolution_exception_list_components.mdx b/api_docs/kbn_securitysolution_exception_list_components.mdx index fa43232c6c23f..1c1f0cfa560ed 100644 --- a/api_docs/kbn_securitysolution_exception_list_components.mdx +++ b/api_docs/kbn_securitysolution_exception_list_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-exception-list-components title: "@kbn/securitysolution-exception-list-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-exception-list-components plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-exception-list-components'] --- import kbnSecuritysolutionExceptionListComponentsObj from './kbn_securitysolution_exception_list_components.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_grouping.mdx b/api_docs/kbn_securitysolution_grouping.mdx index 6566c187cc4c2..699ac7bb9467f 100644 --- a/api_docs/kbn_securitysolution_grouping.mdx +++ b/api_docs/kbn_securitysolution_grouping.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-grouping title: "@kbn/securitysolution-grouping" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-grouping plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-grouping'] --- import kbnSecuritysolutionGroupingObj from './kbn_securitysolution_grouping.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_hook_utils.mdx b/api_docs/kbn_securitysolution_hook_utils.mdx index ef957e67d2b8c..b804de31c71e2 100644 --- a/api_docs/kbn_securitysolution_hook_utils.mdx +++ b/api_docs/kbn_securitysolution_hook_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-hook-utils title: "@kbn/securitysolution-hook-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-hook-utils plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-hook-utils'] --- import kbnSecuritysolutionHookUtilsObj from './kbn_securitysolution_hook_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_alerting_types.devdocs.json b/api_docs/kbn_securitysolution_io_ts_alerting_types.devdocs.json index 63d1fc2fca5a2..1a02195ed7741 100644 --- a/api_docs/kbn_securitysolution_io_ts_alerting_types.devdocs.json +++ b/api_docs/kbn_securitysolution_io_ts_alerting_types.devdocs.json @@ -303,7 +303,7 @@ "section": "def-common.SavedObjectAttributes", "text": "SavedObjectAttributes" }, - "; } & { uuid?: string | undefined; alerts_filter?: { query?: ({ kql: string; filters: ({ meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; params?: any; value?: string | undefined; }; } & { $state?: { store: any; } | undefined; query?: { [x: string]: any; } | undefined; })[]; } & { dsl?: string | undefined; }) | undefined; timeframe?: { timezone: string; days: (2 | 7 | 6 | 5 | 4 | 3 | 1)[]; hours: { start: string; end: string; }; } | undefined; } | undefined; frequency?: { summary: boolean; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; throttle: string | null; } | undefined; }" + "; } & { uuid?: string | undefined; alerts_filter?: { query?: ({ kql: string; filters: ({ meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; params?: any; value?: string | undefined; }; } & { $state?: { store: any; } | undefined; query?: { [x: string]: any; } | undefined; })[]; } & { dsl?: string | undefined; }) | undefined; timeframe?: { timezone: string; days: (2 | 1 | 7 | 6 | 5 | 4 | 3)[]; hours: { start: string; end: string; }; } | undefined; } | undefined; frequency?: { summary: boolean; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; throttle: string | null; } | undefined; }" ], "path": "packages/kbn-securitysolution-io-ts-alerting-types/src/actions/index.ts", "deprecated": false, @@ -326,7 +326,7 @@ "section": "def-common.SavedObjectAttributes", "text": "SavedObjectAttributes" }, - "; } & { uuid?: string | undefined; alerts_filter?: { query?: ({ kql: string; filters: ({ meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; params?: any; value?: string | undefined; }; } & { $state?: { store: any; } | undefined; query?: { [x: string]: any; } | undefined; })[]; } & { dsl?: string | undefined; }) | undefined; timeframe?: { timezone: string; days: (2 | 7 | 6 | 5 | 4 | 3 | 1)[]; hours: { start: string; end: string; }; } | undefined; } | undefined; frequency?: { summary: boolean; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; throttle: string | null; } | undefined; })[]" + "; } & { uuid?: string | undefined; alerts_filter?: { query?: ({ kql: string; filters: ({ meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; params?: any; value?: string | undefined; }; } & { $state?: { store: any; } | undefined; query?: { [x: string]: any; } | undefined; })[]; } & { dsl?: string | undefined; }) | undefined; timeframe?: { timezone: string; days: (2 | 1 | 7 | 6 | 5 | 4 | 3)[]; hours: { start: string; end: string; }; } | undefined; } | undefined; frequency?: { summary: boolean; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; throttle: string | null; } | undefined; })[]" ], "path": "packages/kbn-securitysolution-io-ts-alerting-types/src/actions/index.ts", "deprecated": false, @@ -349,7 +349,7 @@ "section": "def-common.SavedObjectAttributes", "text": "SavedObjectAttributes" }, - "; } & { uuid?: string | undefined; alertsFilter?: { query?: ({ kql: string; filters: ({ meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; params?: any; value?: string | undefined; }; } & { $state?: { store: any; } | undefined; query?: { [x: string]: any; } | undefined; })[]; } & { dsl?: string | undefined; }) | undefined; timeframe?: { timezone: string; days: (2 | 7 | 6 | 5 | 4 | 3 | 1)[]; hours: { start: string; end: string; }; } | undefined; } | undefined; frequency?: { summary: boolean; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; throttle: string | null; } | undefined; })[]" + "; } & { uuid?: string | undefined; alertsFilter?: { query?: ({ kql: string; filters: ({ meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; params?: any; value?: string | undefined; }; } & { $state?: { store: any; } | undefined; query?: { [x: string]: any; } | undefined; })[]; } & { dsl?: string | undefined; }) | undefined; timeframe?: { timezone: string; days: (2 | 1 | 7 | 6 | 5 | 4 | 3)[]; hours: { start: string; end: string; }; } | undefined; } | undefined; frequency?: { summary: boolean; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; throttle: string | null; } | undefined; })[]" ], "path": "packages/kbn-securitysolution-io-ts-alerting-types/src/actions/index.ts", "deprecated": false, @@ -372,7 +372,7 @@ "section": "def-common.SavedObjectAttributes", "text": "SavedObjectAttributes" }, - "; } & { uuid?: string | undefined; alertsFilter?: { query?: ({ kql: string; filters: ({ meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; params?: any; value?: string | undefined; }; } & { $state?: { store: any; } | undefined; query?: { [x: string]: any; } | undefined; })[]; } & { dsl?: string | undefined; }) | undefined; timeframe?: { timezone: string; days: (2 | 7 | 6 | 5 | 4 | 3 | 1)[]; hours: { start: string; end: string; }; } | undefined; } | undefined; frequency?: { summary: boolean; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; throttle: string | null; } | undefined; }" + "; } & { uuid?: string | undefined; alertsFilter?: { query?: ({ kql: string; filters: ({ meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; params?: any; value?: string | undefined; }; } & { $state?: { store: any; } | undefined; query?: { [x: string]: any; } | undefined; })[]; } & { dsl?: string | undefined; }) | undefined; timeframe?: { timezone: string; days: (2 | 1 | 7 | 6 | 5 | 4 | 3)[]; hours: { start: string; end: string; }; } | undefined; } | undefined; frequency?: { summary: boolean; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; throttle: string | null; } | undefined; }" ], "path": "packages/kbn-securitysolution-io-ts-alerting-types/src/actions/index.ts", "deprecated": false, @@ -1064,7 +1064,7 @@ "section": "def-common.SavedObjectAttributes", "text": "SavedObjectAttributes" }, - "; } & { uuid?: string | undefined; alerts_filter?: { query?: ({ kql: string; filters: ({ meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; params?: any; value?: string | undefined; }; } & { $state?: { store: any; } | undefined; query?: { [x: string]: any; } | undefined; })[]; } & { dsl?: string | undefined; }) | undefined; timeframe?: { timezone: string; days: (2 | 7 | 6 | 5 | 4 | 3 | 1)[]; hours: { start: string; end: string; }; } | undefined; } | undefined; frequency?: { summary: boolean; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; throttle: string | null; } | undefined; })[], ({ group: string; id: string; action_type_id: string; params: ", + "; } & { uuid?: string | undefined; alerts_filter?: { query?: ({ kql: string; filters: ({ meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; params?: any; value?: string | undefined; }; } & { $state?: { store: any; } | undefined; query?: { [x: string]: any; } | undefined; })[]; } & { dsl?: string | undefined; }) | undefined; timeframe?: { timezone: string; days: (2 | 1 | 7 | 6 | 5 | 4 | 3)[]; hours: { start: string; end: string; }; } | undefined; } | undefined; frequency?: { summary: boolean; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; throttle: string | null; } | undefined; })[], ({ group: string; id: string; action_type_id: string; params: ", { "pluginId": "@kbn/securitysolution-io-ts-alerting-types", "scope": "common", @@ -1072,7 +1072,7 @@ "section": "def-common.SavedObjectAttributes", "text": "SavedObjectAttributes" }, - "; } & { uuid?: string | undefined; alerts_filter?: { query?: ({ kql: string; filters: ({ meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; params?: any; value?: string | undefined; }; } & { $state?: { store: any; } | undefined; query?: { [x: string]: any; } | undefined; })[]; } & { dsl?: string | undefined; }) | undefined; timeframe?: { timezone: string; days: (2 | 7 | 6 | 5 | 4 | 3 | 1)[]; hours: { start: string; end: string; }; } | undefined; } | undefined; frequency?: { summary: boolean; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; throttle: string | null; } | undefined; })[] | undefined, unknown>" + "; } & { uuid?: string | undefined; alerts_filter?: { query?: ({ kql: string; filters: ({ meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; params?: any; value?: string | undefined; }; } & { $state?: { store: any; } | undefined; query?: { [x: string]: any; } | undefined; })[]; } & { dsl?: string | undefined; }) | undefined; timeframe?: { timezone: string; days: (2 | 1 | 7 | 6 | 5 | 4 | 3)[]; hours: { start: string; end: string; }; } | undefined; } | undefined; frequency?: { summary: boolean; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; throttle: string | null; } | undefined; })[] | undefined, unknown>" ], "path": "packages/kbn-securitysolution-io-ts-alerting-types/src/default_actions_array/index.ts", "deprecated": false, diff --git a/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx b/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx index 808ab2d069834..c65edc753604f 100644 --- a/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-alerting-types title: "@kbn/securitysolution-io-ts-alerting-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-alerting-types plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-alerting-types'] --- import kbnSecuritysolutionIoTsAlertingTypesObj from './kbn_securitysolution_io_ts_alerting_types.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_list_types.devdocs.json b/api_docs/kbn_securitysolution_io_ts_list_types.devdocs.json index 46341eb4040cf..b64ee5e92d55d 100644 --- a/api_docs/kbn_securitysolution_io_ts_list_types.devdocs.json +++ b/api_docs/kbn_securitysolution_io_ts_list_types.devdocs.json @@ -3020,7 +3020,7 @@ "label": "CreateListSchemaDecoded", "description": [], "signature": [ - "{ type: \"boolean\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"binary\" | \"keyword\" | \"text\" | \"date\" | \"date_nanos\" | \"integer\" | \"long\" | \"short\" | \"byte\" | \"float\" | \"half_float\" | \"double\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\" | \"date_range\" | \"ip_range\" | \"shape\"; id: string | undefined; name: string; serializer: string | undefined; meta: object | undefined; description: string; deserializer: string | undefined; } & { version: number; }" + "{ id: string | undefined; type: \"boolean\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"binary\" | \"keyword\" | \"text\" | \"date\" | \"date_nanos\" | \"integer\" | \"long\" | \"short\" | \"byte\" | \"float\" | \"half_float\" | \"double\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\" | \"date_range\" | \"ip_range\" | \"shape\"; name: string; serializer: string | undefined; meta: object | undefined; description: string; deserializer: string | undefined; } & { version: number; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/request/create_list_schema/index.ts", "deprecated": false, diff --git a/api_docs/kbn_securitysolution_io_ts_list_types.mdx b/api_docs/kbn_securitysolution_io_ts_list_types.mdx index b0a439c614e6c..db3035735c4f2 100644 --- a/api_docs/kbn_securitysolution_io_ts_list_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_list_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-list-types title: "@kbn/securitysolution-io-ts-list-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-list-types plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-list-types'] --- import kbnSecuritysolutionIoTsListTypesObj from './kbn_securitysolution_io_ts_list_types.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_types.mdx b/api_docs/kbn_securitysolution_io_ts_types.mdx index 2253cc74cd9bd..6c64964bc10c2 100644 --- a/api_docs/kbn_securitysolution_io_ts_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-types title: "@kbn/securitysolution-io-ts-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-types plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-types'] --- import kbnSecuritysolutionIoTsTypesObj from './kbn_securitysolution_io_ts_types.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_utils.mdx b/api_docs/kbn_securitysolution_io_ts_utils.mdx index 5ea1f28a0249f..aff041a184ba5 100644 --- a/api_docs/kbn_securitysolution_io_ts_utils.mdx +++ b/api_docs/kbn_securitysolution_io_ts_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-utils title: "@kbn/securitysolution-io-ts-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-utils plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-utils'] --- import kbnSecuritysolutionIoTsUtilsObj from './kbn_securitysolution_io_ts_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_api.mdx b/api_docs/kbn_securitysolution_list_api.mdx index 3b824c15cd2b2..2d575e3738b67 100644 --- a/api_docs/kbn_securitysolution_list_api.mdx +++ b/api_docs/kbn_securitysolution_list_api.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-api title: "@kbn/securitysolution-list-api" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-api plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-api'] --- import kbnSecuritysolutionListApiObj from './kbn_securitysolution_list_api.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_constants.mdx b/api_docs/kbn_securitysolution_list_constants.mdx index 15dfa70393e64..f546a6c02291e 100644 --- a/api_docs/kbn_securitysolution_list_constants.mdx +++ b/api_docs/kbn_securitysolution_list_constants.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-constants title: "@kbn/securitysolution-list-constants" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-constants plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-constants'] --- import kbnSecuritysolutionListConstantsObj from './kbn_securitysolution_list_constants.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_hooks.mdx b/api_docs/kbn_securitysolution_list_hooks.mdx index cc905bce0359e..6ce5e1db2043b 100644 --- a/api_docs/kbn_securitysolution_list_hooks.mdx +++ b/api_docs/kbn_securitysolution_list_hooks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-hooks title: "@kbn/securitysolution-list-hooks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-hooks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-hooks'] --- import kbnSecuritysolutionListHooksObj from './kbn_securitysolution_list_hooks.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_utils.mdx b/api_docs/kbn_securitysolution_list_utils.mdx index 7ac51efac8bc9..7f7b6a596e772 100644 --- a/api_docs/kbn_securitysolution_list_utils.mdx +++ b/api_docs/kbn_securitysolution_list_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-utils title: "@kbn/securitysolution-list-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-utils plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-utils'] --- import kbnSecuritysolutionListUtilsObj from './kbn_securitysolution_list_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_rules.mdx b/api_docs/kbn_securitysolution_rules.mdx index 210db43950fea..db9551298ef9a 100644 --- a/api_docs/kbn_securitysolution_rules.mdx +++ b/api_docs/kbn_securitysolution_rules.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-rules title: "@kbn/securitysolution-rules" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-rules plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-rules'] --- import kbnSecuritysolutionRulesObj from './kbn_securitysolution_rules.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_t_grid.mdx b/api_docs/kbn_securitysolution_t_grid.mdx index 76772d3b1d394..1b5217131de32 100644 --- a/api_docs/kbn_securitysolution_t_grid.mdx +++ b/api_docs/kbn_securitysolution_t_grid.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-t-grid title: "@kbn/securitysolution-t-grid" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-t-grid plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-t-grid'] --- import kbnSecuritysolutionTGridObj from './kbn_securitysolution_t_grid.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_utils.mdx b/api_docs/kbn_securitysolution_utils.mdx index 3936447ff15f6..5353dd88ae201 100644 --- a/api_docs/kbn_securitysolution_utils.mdx +++ b/api_docs/kbn_securitysolution_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-utils title: "@kbn/securitysolution-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-utils plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-utils'] --- import kbnSecuritysolutionUtilsObj from './kbn_securitysolution_utils.devdocs.json'; diff --git a/api_docs/kbn_server_http_tools.mdx b/api_docs/kbn_server_http_tools.mdx index ac09b750981ab..8545c172a482e 100644 --- a/api_docs/kbn_server_http_tools.mdx +++ b/api_docs/kbn_server_http_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-server-http-tools title: "@kbn/server-http-tools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/server-http-tools plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-http-tools'] --- import kbnServerHttpToolsObj from './kbn_server_http_tools.devdocs.json'; diff --git a/api_docs/kbn_server_route_repository.mdx b/api_docs/kbn_server_route_repository.mdx index 627da7f3ead14..1a6a670f63084 100644 --- a/api_docs/kbn_server_route_repository.mdx +++ b/api_docs/kbn_server_route_repository.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-server-route-repository title: "@kbn/server-route-repository" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/server-route-repository plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-route-repository'] --- import kbnServerRouteRepositoryObj from './kbn_server_route_repository.devdocs.json'; diff --git a/api_docs/kbn_serverless_common_settings.mdx b/api_docs/kbn_serverless_common_settings.mdx index 8ef297c5e0baa..0410ae31fb177 100644 --- a/api_docs/kbn_serverless_common_settings.mdx +++ b/api_docs/kbn_serverless_common_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-common-settings title: "@kbn/serverless-common-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-common-settings plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-common-settings'] --- import kbnServerlessCommonSettingsObj from './kbn_serverless_common_settings.devdocs.json'; diff --git a/api_docs/kbn_serverless_observability_settings.mdx b/api_docs/kbn_serverless_observability_settings.mdx index bb008e6b816c9..f042fa12b15d1 100644 --- a/api_docs/kbn_serverless_observability_settings.mdx +++ b/api_docs/kbn_serverless_observability_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-observability-settings title: "@kbn/serverless-observability-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-observability-settings plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-observability-settings'] --- import kbnServerlessObservabilitySettingsObj from './kbn_serverless_observability_settings.devdocs.json'; diff --git a/api_docs/kbn_serverless_project_switcher.mdx b/api_docs/kbn_serverless_project_switcher.mdx index 0a1a6db6e11d4..0d0cfd5716bcb 100644 --- a/api_docs/kbn_serverless_project_switcher.mdx +++ b/api_docs/kbn_serverless_project_switcher.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-project-switcher title: "@kbn/serverless-project-switcher" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-project-switcher plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-project-switcher'] --- import kbnServerlessProjectSwitcherObj from './kbn_serverless_project_switcher.devdocs.json'; diff --git a/api_docs/kbn_serverless_search_settings.mdx b/api_docs/kbn_serverless_search_settings.mdx index 42155d66bd19d..74ece090f1bf9 100644 --- a/api_docs/kbn_serverless_search_settings.mdx +++ b/api_docs/kbn_serverless_search_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-search-settings title: "@kbn/serverless-search-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-search-settings plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-search-settings'] --- import kbnServerlessSearchSettingsObj from './kbn_serverless_search_settings.devdocs.json'; diff --git a/api_docs/kbn_serverless_security_settings.mdx b/api_docs/kbn_serverless_security_settings.mdx index eae8f4a12656e..3cc65bd475fa1 100644 --- a/api_docs/kbn_serverless_security_settings.mdx +++ b/api_docs/kbn_serverless_security_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-security-settings title: "@kbn/serverless-security-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-security-settings plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-security-settings'] --- import kbnServerlessSecuritySettingsObj from './kbn_serverless_security_settings.devdocs.json'; diff --git a/api_docs/kbn_serverless_storybook_config.mdx b/api_docs/kbn_serverless_storybook_config.mdx index 9acc155948264..818c7a4115ccc 100644 --- a/api_docs/kbn_serverless_storybook_config.mdx +++ b/api_docs/kbn_serverless_storybook_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-storybook-config title: "@kbn/serverless-storybook-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-storybook-config plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-storybook-config'] --- import kbnServerlessStorybookConfigObj from './kbn_serverless_storybook_config.devdocs.json'; diff --git a/api_docs/kbn_shared_svg.mdx b/api_docs/kbn_shared_svg.mdx index f41c032d6ce59..ee7fc088864cf 100644 --- a/api_docs/kbn_shared_svg.mdx +++ b/api_docs/kbn_shared_svg.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-svg title: "@kbn/shared-svg" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-svg plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-svg'] --- import kbnSharedSvgObj from './kbn_shared_svg.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_avatar_solution.mdx b/api_docs/kbn_shared_ux_avatar_solution.mdx index b458e12221e62..9f289612b68b8 100644 --- a/api_docs/kbn_shared_ux_avatar_solution.mdx +++ b/api_docs/kbn_shared_ux_avatar_solution.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-avatar-solution title: "@kbn/shared-ux-avatar-solution" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-avatar-solution plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-avatar-solution'] --- import kbnSharedUxAvatarSolutionObj from './kbn_shared_ux_avatar_solution.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_button_exit_full_screen.mdx b/api_docs/kbn_shared_ux_button_exit_full_screen.mdx index 387795bc45403..30fc248b0811a 100644 --- a/api_docs/kbn_shared_ux_button_exit_full_screen.mdx +++ b/api_docs/kbn_shared_ux_button_exit_full_screen.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-button-exit-full-screen title: "@kbn/shared-ux-button-exit-full-screen" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-button-exit-full-screen plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-button-exit-full-screen'] --- import kbnSharedUxButtonExitFullScreenObj from './kbn_shared_ux_button_exit_full_screen.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_button_toolbar.mdx b/api_docs/kbn_shared_ux_button_toolbar.mdx index 6e0609dca7d2a..da5863527ec18 100644 --- a/api_docs/kbn_shared_ux_button_toolbar.mdx +++ b/api_docs/kbn_shared_ux_button_toolbar.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-button-toolbar title: "@kbn/shared-ux-button-toolbar" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-button-toolbar plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-button-toolbar'] --- import kbnSharedUxButtonToolbarObj from './kbn_shared_ux_button_toolbar.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_card_no_data.mdx b/api_docs/kbn_shared_ux_card_no_data.mdx index eed51398c85a6..5daddc201f8ce 100644 --- a/api_docs/kbn_shared_ux_card_no_data.mdx +++ b/api_docs/kbn_shared_ux_card_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-card-no-data title: "@kbn/shared-ux-card-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-card-no-data plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-card-no-data'] --- import kbnSharedUxCardNoDataObj from './kbn_shared_ux_card_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_card_no_data_mocks.mdx b/api_docs/kbn_shared_ux_card_no_data_mocks.mdx index 2b219806c3d21..9199bd62299a4 100644 --- a/api_docs/kbn_shared_ux_card_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_card_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-card-no-data-mocks title: "@kbn/shared-ux-card-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-card-no-data-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-card-no-data-mocks'] --- import kbnSharedUxCardNoDataMocksObj from './kbn_shared_ux_card_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_chrome_navigation.mdx b/api_docs/kbn_shared_ux_chrome_navigation.mdx index fee2da97c5b9c..6f32cd7ece966 100644 --- a/api_docs/kbn_shared_ux_chrome_navigation.mdx +++ b/api_docs/kbn_shared_ux_chrome_navigation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-chrome-navigation title: "@kbn/shared-ux-chrome-navigation" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-chrome-navigation plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-chrome-navigation'] --- import kbnSharedUxChromeNavigationObj from './kbn_shared_ux_chrome_navigation.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_error_boundary.mdx b/api_docs/kbn_shared_ux_error_boundary.mdx index 51e37ca4a9cbb..4ca99d955b41c 100644 --- a/api_docs/kbn_shared_ux_error_boundary.mdx +++ b/api_docs/kbn_shared_ux_error_boundary.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-error-boundary title: "@kbn/shared-ux-error-boundary" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-error-boundary plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-error-boundary'] --- import kbnSharedUxErrorBoundaryObj from './kbn_shared_ux_error_boundary.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_context.mdx b/api_docs/kbn_shared_ux_file_context.mdx index 22f99662d2807..9294cfc944de2 100644 --- a/api_docs/kbn_shared_ux_file_context.mdx +++ b/api_docs/kbn_shared_ux_file_context.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-context title: "@kbn/shared-ux-file-context" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-context plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-context'] --- import kbnSharedUxFileContextObj from './kbn_shared_ux_file_context.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_image.mdx b/api_docs/kbn_shared_ux_file_image.mdx index 33fd5fcdb4843..467de7ff1856c 100644 --- a/api_docs/kbn_shared_ux_file_image.mdx +++ b/api_docs/kbn_shared_ux_file_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-image title: "@kbn/shared-ux-file-image" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-image plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-image'] --- import kbnSharedUxFileImageObj from './kbn_shared_ux_file_image.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_image_mocks.mdx b/api_docs/kbn_shared_ux_file_image_mocks.mdx index 74dad49e8c653..ad394264f337d 100644 --- a/api_docs/kbn_shared_ux_file_image_mocks.mdx +++ b/api_docs/kbn_shared_ux_file_image_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-image-mocks title: "@kbn/shared-ux-file-image-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-image-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-image-mocks'] --- import kbnSharedUxFileImageMocksObj from './kbn_shared_ux_file_image_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_mocks.mdx b/api_docs/kbn_shared_ux_file_mocks.mdx index fd93acca788bf..7f0780667d91e 100644 --- a/api_docs/kbn_shared_ux_file_mocks.mdx +++ b/api_docs/kbn_shared_ux_file_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-mocks title: "@kbn/shared-ux-file-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-mocks'] --- import kbnSharedUxFileMocksObj from './kbn_shared_ux_file_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_picker.mdx b/api_docs/kbn_shared_ux_file_picker.mdx index 3aad404f3a763..c019851fcaf3a 100644 --- a/api_docs/kbn_shared_ux_file_picker.mdx +++ b/api_docs/kbn_shared_ux_file_picker.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-picker title: "@kbn/shared-ux-file-picker" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-picker plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-picker'] --- import kbnSharedUxFilePickerObj from './kbn_shared_ux_file_picker.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_types.mdx b/api_docs/kbn_shared_ux_file_types.mdx index 36bb0fc393482..78223048b2618 100644 --- a/api_docs/kbn_shared_ux_file_types.mdx +++ b/api_docs/kbn_shared_ux_file_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-types title: "@kbn/shared-ux-file-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-types plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-types'] --- import kbnSharedUxFileTypesObj from './kbn_shared_ux_file_types.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_upload.mdx b/api_docs/kbn_shared_ux_file_upload.mdx index 172dcfb12f4a2..2c1550965a089 100644 --- a/api_docs/kbn_shared_ux_file_upload.mdx +++ b/api_docs/kbn_shared_ux_file_upload.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-upload title: "@kbn/shared-ux-file-upload" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-upload plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-upload'] --- import kbnSharedUxFileUploadObj from './kbn_shared_ux_file_upload.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_util.mdx b/api_docs/kbn_shared_ux_file_util.mdx index f31eda5f802f1..5d487f2b288f2 100644 --- a/api_docs/kbn_shared_ux_file_util.mdx +++ b/api_docs/kbn_shared_ux_file_util.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-util title: "@kbn/shared-ux-file-util" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-util plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-util'] --- import kbnSharedUxFileUtilObj from './kbn_shared_ux_file_util.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_link_redirect_app.mdx b/api_docs/kbn_shared_ux_link_redirect_app.mdx index b0b87d6980591..bd93a885295cc 100644 --- a/api_docs/kbn_shared_ux_link_redirect_app.mdx +++ b/api_docs/kbn_shared_ux_link_redirect_app.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-link-redirect-app title: "@kbn/shared-ux-link-redirect-app" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-link-redirect-app plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-link-redirect-app'] --- import kbnSharedUxLinkRedirectAppObj from './kbn_shared_ux_link_redirect_app.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx b/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx index c60ee382e7884..9dada134268fd 100644 --- a/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx +++ b/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-link-redirect-app-mocks title: "@kbn/shared-ux-link-redirect-app-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-link-redirect-app-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-link-redirect-app-mocks'] --- import kbnSharedUxLinkRedirectAppMocksObj from './kbn_shared_ux_link_redirect_app_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_markdown.mdx b/api_docs/kbn_shared_ux_markdown.mdx index 8373c5eaac30a..9da51bd01bb95 100644 --- a/api_docs/kbn_shared_ux_markdown.mdx +++ b/api_docs/kbn_shared_ux_markdown.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-markdown title: "@kbn/shared-ux-markdown" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-markdown plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-markdown'] --- import kbnSharedUxMarkdownObj from './kbn_shared_ux_markdown.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_markdown_mocks.mdx b/api_docs/kbn_shared_ux_markdown_mocks.mdx index 1c6e55cd1d633..d8cf427f39ae1 100644 --- a/api_docs/kbn_shared_ux_markdown_mocks.mdx +++ b/api_docs/kbn_shared_ux_markdown_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-markdown-mocks title: "@kbn/shared-ux-markdown-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-markdown-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-markdown-mocks'] --- import kbnSharedUxMarkdownMocksObj from './kbn_shared_ux_markdown_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_analytics_no_data.mdx b/api_docs/kbn_shared_ux_page_analytics_no_data.mdx index c43d2e8dcd038..0696a057f655a 100644 --- a/api_docs/kbn_shared_ux_page_analytics_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_analytics_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-analytics-no-data title: "@kbn/shared-ux-page-analytics-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-analytics-no-data plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-analytics-no-data'] --- import kbnSharedUxPageAnalyticsNoDataObj from './kbn_shared_ux_page_analytics_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx b/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx index aeedc15b0467a..e896124f47a52 100644 --- a/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-analytics-no-data-mocks title: "@kbn/shared-ux-page-analytics-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-analytics-no-data-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-analytics-no-data-mocks'] --- import kbnSharedUxPageAnalyticsNoDataMocksObj from './kbn_shared_ux_page_analytics_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_no_data.mdx b/api_docs/kbn_shared_ux_page_kibana_no_data.mdx index 5693a724f9cb6..e8aadaa66617c 100644 --- a/api_docs/kbn_shared_ux_page_kibana_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-no-data title: "@kbn/shared-ux-page-kibana-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-no-data plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-no-data'] --- import kbnSharedUxPageKibanaNoDataObj from './kbn_shared_ux_page_kibana_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx b/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx index 121243455f11e..c1e7780f0fe91 100644 --- a/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-no-data-mocks title: "@kbn/shared-ux-page-kibana-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-no-data-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-no-data-mocks'] --- import kbnSharedUxPageKibanaNoDataMocksObj from './kbn_shared_ux_page_kibana_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_template.mdx b/api_docs/kbn_shared_ux_page_kibana_template.mdx index 576460a16136b..a0e752c9a1f7d 100644 --- a/api_docs/kbn_shared_ux_page_kibana_template.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_template.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-template title: "@kbn/shared-ux-page-kibana-template" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-template plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-template'] --- import kbnSharedUxPageKibanaTemplateObj from './kbn_shared_ux_page_kibana_template.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx b/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx index 85f01f4f02760..e562a737a6d27 100644 --- a/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-template-mocks title: "@kbn/shared-ux-page-kibana-template-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-template-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-template-mocks'] --- import kbnSharedUxPageKibanaTemplateMocksObj from './kbn_shared_ux_page_kibana_template_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data.mdx b/api_docs/kbn_shared_ux_page_no_data.mdx index 447dbfc1469fa..09043066f022b 100644 --- a/api_docs/kbn_shared_ux_page_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data title: "@kbn/shared-ux-page-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data'] --- import kbnSharedUxPageNoDataObj from './kbn_shared_ux_page_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data_config.mdx b/api_docs/kbn_shared_ux_page_no_data_config.mdx index 18afb44a55389..56ee3ea19134f 100644 --- a/api_docs/kbn_shared_ux_page_no_data_config.mdx +++ b/api_docs/kbn_shared_ux_page_no_data_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-config title: "@kbn/shared-ux-page-no-data-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data-config plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data-config'] --- import kbnSharedUxPageNoDataConfigObj from './kbn_shared_ux_page_no_data_config.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx b/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx index e704595b8632d..5aea99c235073 100644 --- a/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-config-mocks title: "@kbn/shared-ux-page-no-data-config-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data-config-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data-config-mocks'] --- import kbnSharedUxPageNoDataConfigMocksObj from './kbn_shared_ux_page_no_data_config_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data_mocks.mdx b/api_docs/kbn_shared_ux_page_no_data_mocks.mdx index 49e0621b2d9f5..59781452619a2 100644 --- a/api_docs/kbn_shared_ux_page_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-mocks title: "@kbn/shared-ux-page-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data-mocks'] --- import kbnSharedUxPageNoDataMocksObj from './kbn_shared_ux_page_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_solution_nav.mdx b/api_docs/kbn_shared_ux_page_solution_nav.mdx index 39e98790c2fcd..c19ea00e17a23 100644 --- a/api_docs/kbn_shared_ux_page_solution_nav.mdx +++ b/api_docs/kbn_shared_ux_page_solution_nav.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-solution-nav title: "@kbn/shared-ux-page-solution-nav" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-solution-nav plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-solution-nav'] --- import kbnSharedUxPageSolutionNavObj from './kbn_shared_ux_page_solution_nav.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_prompt_no_data_views.mdx b/api_docs/kbn_shared_ux_prompt_no_data_views.mdx index 63fff8ad2d085..c9216b11e2dc2 100644 --- a/api_docs/kbn_shared_ux_prompt_no_data_views.mdx +++ b/api_docs/kbn_shared_ux_prompt_no_data_views.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-no-data-views title: "@kbn/shared-ux-prompt-no-data-views" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-prompt-no-data-views plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-no-data-views'] --- import kbnSharedUxPromptNoDataViewsObj from './kbn_shared_ux_prompt_no_data_views.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx b/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx index ec9865a751782..f6388c42db23d 100644 --- a/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx +++ b/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-no-data-views-mocks title: "@kbn/shared-ux-prompt-no-data-views-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-prompt-no-data-views-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-no-data-views-mocks'] --- import kbnSharedUxPromptNoDataViewsMocksObj from './kbn_shared_ux_prompt_no_data_views_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_prompt_not_found.mdx b/api_docs/kbn_shared_ux_prompt_not_found.mdx index bd488540b1339..fbd05454d6b34 100644 --- a/api_docs/kbn_shared_ux_prompt_not_found.mdx +++ b/api_docs/kbn_shared_ux_prompt_not_found.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-not-found title: "@kbn/shared-ux-prompt-not-found" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-prompt-not-found plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-not-found'] --- import kbnSharedUxPromptNotFoundObj from './kbn_shared_ux_prompt_not_found.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_router.mdx b/api_docs/kbn_shared_ux_router.mdx index c429b76cb5a71..a6bfa614dadaa 100644 --- a/api_docs/kbn_shared_ux_router.mdx +++ b/api_docs/kbn_shared_ux_router.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-router title: "@kbn/shared-ux-router" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-router plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-router'] --- import kbnSharedUxRouterObj from './kbn_shared_ux_router.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_router_mocks.mdx b/api_docs/kbn_shared_ux_router_mocks.mdx index 9a74883865b0e..9a7a9c1b23345 100644 --- a/api_docs/kbn_shared_ux_router_mocks.mdx +++ b/api_docs/kbn_shared_ux_router_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-router-mocks title: "@kbn/shared-ux-router-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-router-mocks plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-router-mocks'] --- import kbnSharedUxRouterMocksObj from './kbn_shared_ux_router_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_storybook_config.mdx b/api_docs/kbn_shared_ux_storybook_config.mdx index c49a48b061013..6411eae8c82c6 100644 --- a/api_docs/kbn_shared_ux_storybook_config.mdx +++ b/api_docs/kbn_shared_ux_storybook_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-storybook-config title: "@kbn/shared-ux-storybook-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-storybook-config plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-storybook-config'] --- import kbnSharedUxStorybookConfigObj from './kbn_shared_ux_storybook_config.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_storybook_mock.mdx b/api_docs/kbn_shared_ux_storybook_mock.mdx index 7c64ea44b01a2..c42c9e5ea04ab 100644 --- a/api_docs/kbn_shared_ux_storybook_mock.mdx +++ b/api_docs/kbn_shared_ux_storybook_mock.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-storybook-mock title: "@kbn/shared-ux-storybook-mock" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-storybook-mock plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-storybook-mock'] --- import kbnSharedUxStorybookMockObj from './kbn_shared_ux_storybook_mock.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_utility.mdx b/api_docs/kbn_shared_ux_utility.mdx index 2ed9f711490bb..97caeb564c28f 100644 --- a/api_docs/kbn_shared_ux_utility.mdx +++ b/api_docs/kbn_shared_ux_utility.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-utility title: "@kbn/shared-ux-utility" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-utility plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-utility'] --- import kbnSharedUxUtilityObj from './kbn_shared_ux_utility.devdocs.json'; diff --git a/api_docs/kbn_slo_schema.mdx b/api_docs/kbn_slo_schema.mdx index 70f7968cf3698..f2d59b6303100 100644 --- a/api_docs/kbn_slo_schema.mdx +++ b/api_docs/kbn_slo_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-slo-schema title: "@kbn/slo-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/slo-schema plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/slo-schema'] --- import kbnSloSchemaObj from './kbn_slo_schema.devdocs.json'; diff --git a/api_docs/kbn_solution_nav_es.mdx b/api_docs/kbn_solution_nav_es.mdx index 7224970277970..d55519546c311 100644 --- a/api_docs/kbn_solution_nav_es.mdx +++ b/api_docs/kbn_solution_nav_es.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-solution-nav-es title: "@kbn/solution-nav-es" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/solution-nav-es plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/solution-nav-es'] --- import kbnSolutionNavEsObj from './kbn_solution_nav_es.devdocs.json'; diff --git a/api_docs/kbn_solution_nav_oblt.mdx b/api_docs/kbn_solution_nav_oblt.mdx index 5383e600cf82c..1852bc89e40c9 100644 --- a/api_docs/kbn_solution_nav_oblt.mdx +++ b/api_docs/kbn_solution_nav_oblt.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-solution-nav-oblt title: "@kbn/solution-nav-oblt" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/solution-nav-oblt plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/solution-nav-oblt'] --- import kbnSolutionNavObltObj from './kbn_solution_nav_oblt.devdocs.json'; diff --git a/api_docs/kbn_some_dev_log.mdx b/api_docs/kbn_some_dev_log.mdx index b3ca90d117acd..07e4f2aed4fd8 100644 --- a/api_docs/kbn_some_dev_log.mdx +++ b/api_docs/kbn_some_dev_log.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-some-dev-log title: "@kbn/some-dev-log" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/some-dev-log plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/some-dev-log'] --- import kbnSomeDevLogObj from './kbn_some_dev_log.devdocs.json'; diff --git a/api_docs/kbn_sort_predicates.mdx b/api_docs/kbn_sort_predicates.mdx index bce00c30e8493..97ae8d720742a 100644 --- a/api_docs/kbn_sort_predicates.mdx +++ b/api_docs/kbn_sort_predicates.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-sort-predicates title: "@kbn/sort-predicates" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/sort-predicates plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/sort-predicates'] --- import kbnSortPredicatesObj from './kbn_sort_predicates.devdocs.json'; diff --git a/api_docs/kbn_std.mdx b/api_docs/kbn_std.mdx index 694059a58f8ef..7ccaeb419918f 100644 --- a/api_docs/kbn_std.mdx +++ b/api_docs/kbn_std.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-std title: "@kbn/std" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/std plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/std'] --- import kbnStdObj from './kbn_std.devdocs.json'; diff --git a/api_docs/kbn_stdio_dev_helpers.mdx b/api_docs/kbn_stdio_dev_helpers.mdx index 493b8c2ec192a..2fae7380a09f9 100644 --- a/api_docs/kbn_stdio_dev_helpers.mdx +++ b/api_docs/kbn_stdio_dev_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-stdio-dev-helpers title: "@kbn/stdio-dev-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/stdio-dev-helpers plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/stdio-dev-helpers'] --- import kbnStdioDevHelpersObj from './kbn_stdio_dev_helpers.devdocs.json'; diff --git a/api_docs/kbn_storybook.mdx b/api_docs/kbn_storybook.mdx index 4aab1e1e3f4b9..5c8ad725089f2 100644 --- a/api_docs/kbn_storybook.mdx +++ b/api_docs/kbn_storybook.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-storybook title: "@kbn/storybook" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/storybook plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/storybook'] --- import kbnStorybookObj from './kbn_storybook.devdocs.json'; diff --git a/api_docs/kbn_telemetry_tools.mdx b/api_docs/kbn_telemetry_tools.mdx index 0b5e294a07d14..b22ed4b9118de 100644 --- a/api_docs/kbn_telemetry_tools.mdx +++ b/api_docs/kbn_telemetry_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-telemetry-tools title: "@kbn/telemetry-tools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/telemetry-tools plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/telemetry-tools'] --- import kbnTelemetryToolsObj from './kbn_telemetry_tools.devdocs.json'; diff --git a/api_docs/kbn_test.mdx b/api_docs/kbn_test.mdx index 303acbcba729d..259942119a736 100644 --- a/api_docs/kbn_test.mdx +++ b/api_docs/kbn_test.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test title: "@kbn/test" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test'] --- import kbnTestObj from './kbn_test.devdocs.json'; diff --git a/api_docs/kbn_test_eui_helpers.mdx b/api_docs/kbn_test_eui_helpers.mdx index 541069cf82343..b4028062bf84c 100644 --- a/api_docs/kbn_test_eui_helpers.mdx +++ b/api_docs/kbn_test_eui_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test-eui-helpers title: "@kbn/test-eui-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test-eui-helpers plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-eui-helpers'] --- import kbnTestEuiHelpersObj from './kbn_test_eui_helpers.devdocs.json'; diff --git a/api_docs/kbn_test_jest_helpers.mdx b/api_docs/kbn_test_jest_helpers.mdx index d7c6d20bbcf8d..d8c56abacebf8 100644 --- a/api_docs/kbn_test_jest_helpers.mdx +++ b/api_docs/kbn_test_jest_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test-jest-helpers title: "@kbn/test-jest-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test-jest-helpers plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-jest-helpers'] --- import kbnTestJestHelpersObj from './kbn_test_jest_helpers.devdocs.json'; diff --git a/api_docs/kbn_test_subj_selector.mdx b/api_docs/kbn_test_subj_selector.mdx index bf339fceeb46b..65b3a591346e7 100644 --- a/api_docs/kbn_test_subj_selector.mdx +++ b/api_docs/kbn_test_subj_selector.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test-subj-selector title: "@kbn/test-subj-selector" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test-subj-selector plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-subj-selector'] --- import kbnTestSubjSelectorObj from './kbn_test_subj_selector.devdocs.json'; diff --git a/api_docs/kbn_text_based_editor.mdx b/api_docs/kbn_text_based_editor.mdx index c79129c9c8186..79cf1e0124c2b 100644 --- a/api_docs/kbn_text_based_editor.mdx +++ b/api_docs/kbn_text_based_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-text-based-editor title: "@kbn/text-based-editor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/text-based-editor plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/text-based-editor'] --- import kbnTextBasedEditorObj from './kbn_text_based_editor.devdocs.json'; diff --git a/api_docs/kbn_timerange.mdx b/api_docs/kbn_timerange.mdx index aacd2a441b90b..880d1769fb4c8 100644 --- a/api_docs/kbn_timerange.mdx +++ b/api_docs/kbn_timerange.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-timerange title: "@kbn/timerange" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/timerange plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/timerange'] --- import kbnTimerangeObj from './kbn_timerange.devdocs.json'; diff --git a/api_docs/kbn_tooling_log.mdx b/api_docs/kbn_tooling_log.mdx index ce7a10b58c3c6..f4723c7d1d8d7 100644 --- a/api_docs/kbn_tooling_log.mdx +++ b/api_docs/kbn_tooling_log.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-tooling-log title: "@kbn/tooling-log" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/tooling-log plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/tooling-log'] --- import kbnToolingLogObj from './kbn_tooling_log.devdocs.json'; diff --git a/api_docs/kbn_triggers_actions_ui_types.mdx b/api_docs/kbn_triggers_actions_ui_types.mdx index dade31e84cfb1..1756f70d51554 100644 --- a/api_docs/kbn_triggers_actions_ui_types.mdx +++ b/api_docs/kbn_triggers_actions_ui_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-triggers-actions-ui-types title: "@kbn/triggers-actions-ui-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/triggers-actions-ui-types plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/triggers-actions-ui-types'] --- import kbnTriggersActionsUiTypesObj from './kbn_triggers_actions_ui_types.devdocs.json'; diff --git a/api_docs/kbn_ts_projects.mdx b/api_docs/kbn_ts_projects.mdx index 3b77a4732f2e5..25d7b9ffc2be6 100644 --- a/api_docs/kbn_ts_projects.mdx +++ b/api_docs/kbn_ts_projects.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ts-projects title: "@kbn/ts-projects" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ts-projects plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ts-projects'] --- import kbnTsProjectsObj from './kbn_ts_projects.devdocs.json'; diff --git a/api_docs/kbn_typed_react_router_config.mdx b/api_docs/kbn_typed_react_router_config.mdx index 63c35bf396507..46acb8d2f24ba 100644 --- a/api_docs/kbn_typed_react_router_config.mdx +++ b/api_docs/kbn_typed_react_router_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-typed-react-router-config title: "@kbn/typed-react-router-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/typed-react-router-config plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/typed-react-router-config'] --- import kbnTypedReactRouterConfigObj from './kbn_typed_react_router_config.devdocs.json'; diff --git a/api_docs/kbn_ui_actions_browser.mdx b/api_docs/kbn_ui_actions_browser.mdx index c7b8a535e8a4d..23bdc63f8251a 100644 --- a/api_docs/kbn_ui_actions_browser.mdx +++ b/api_docs/kbn_ui_actions_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ui-actions-browser title: "@kbn/ui-actions-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ui-actions-browser plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-actions-browser'] --- import kbnUiActionsBrowserObj from './kbn_ui_actions_browser.devdocs.json'; diff --git a/api_docs/kbn_ui_shared_deps_src.mdx b/api_docs/kbn_ui_shared_deps_src.mdx index 8f5fe08549197..839408decfa73 100644 --- a/api_docs/kbn_ui_shared_deps_src.mdx +++ b/api_docs/kbn_ui_shared_deps_src.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ui-shared-deps-src title: "@kbn/ui-shared-deps-src" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ui-shared-deps-src plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-shared-deps-src'] --- import kbnUiSharedDepsSrcObj from './kbn_ui_shared_deps_src.devdocs.json'; diff --git a/api_docs/kbn_ui_theme.mdx b/api_docs/kbn_ui_theme.mdx index 976eead082a8b..d4ad72b87f419 100644 --- a/api_docs/kbn_ui_theme.mdx +++ b/api_docs/kbn_ui_theme.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ui-theme title: "@kbn/ui-theme" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ui-theme plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-theme'] --- import kbnUiThemeObj from './kbn_ui_theme.devdocs.json'; diff --git a/api_docs/kbn_unified_data_table.devdocs.json b/api_docs/kbn_unified_data_table.devdocs.json index c5ceadd632768..a87e9745d8c07 100644 --- a/api_docs/kbn_unified_data_table.devdocs.json +++ b/api_docs/kbn_unified_data_table.devdocs.json @@ -163,12 +163,12 @@ }, { "parentPluginId": "@kbn/unified-data-table", - "id": "def-common.getTextBasedColumnTypes", + "id": "def-common.getTextBasedColumnsMeta", "type": "Function", "tags": [], - "label": "getTextBasedColumnTypes", + "label": "getTextBasedColumnsMeta", "description": [ - "\nColumn types for text based searches" + "\nColumns meta for text based searches" ], "signature": [ "(textBasedColumns: ", @@ -181,13 +181,13 @@ }, "[]) => TextBasedColumnTypes" ], - "path": "packages/kbn-unified-data-table/src/utils/get_column_types.ts", + "path": "packages/kbn-unified-data-table/src/utils/get_columns_meta.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/unified-data-table", - "id": "def-common.getTextBasedColumnTypes.$1", + "id": "def-common.getTextBasedColumnsMeta.$1", "type": "Array", "tags": [], "label": "textBasedColumns", @@ -202,7 +202,7 @@ }, "[]" ], - "path": "packages/kbn-unified-data-table/src/utils/get_column_types.ts", + "path": "packages/kbn-unified-data-table/src/utils/get_columns_meta.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -418,7 +418,7 @@ "label": "UnifiedDataTable", "description": [], "signature": [ - "({ ariaLabelledBy, columns, columnTypes, showColumnTokens, configHeaderRowHeight, headerRowHeightState, onUpdateHeaderRowHeight, controlColumnIds, dataView, loadingState, onFilter, onResize, onSetColumns, onSort, rows, searchDescription, searchTitle, settings, showTimeCol, showFullScreenButton, sort, useNewFieldsApi, isSortEnabled, isPaginationEnabled, cellActionsTriggerId, className, rowHeightState, onUpdateRowHeight, maxAllowedSampleSize, sampleSizeState, onUpdateSampleSize, isPlainRecord, rowsPerPageState, onUpdateRowsPerPage, onFieldEdited, services, renderCustomGridBody, renderCustomToolbar, trailingControlColumns, totalHits, onFetchMoreRecords, renderDocumentView, setExpandedDoc, expandedDoc, configRowHeight, showMultiFields, maxDocFieldsDisplayed, externalControlColumns, externalAdditionalControls, rowsPerPageOptions, visibleCellActions, externalCustomRenderers, consumer, componentsTourSteps, gridStyleOverride, rowLineHeightOverride, customGridColumnsConfiguration, customControlColumnsConfiguration, }: ", + "({ ariaLabelledBy, columns, columnsMeta, showColumnTokens, configHeaderRowHeight, headerRowHeightState, onUpdateHeaderRowHeight, controlColumnIds, dataView, loadingState, onFilter, onResize, onSetColumns, onSort, rows, searchDescription, searchTitle, settings, showTimeCol, showFullScreenButton, sort, useNewFieldsApi, isSortEnabled, isPaginationEnabled, cellActionsTriggerId, className, rowHeightState, onUpdateRowHeight, maxAllowedSampleSize, sampleSizeState, onUpdateSampleSize, isPlainRecord, rowsPerPageState, onUpdateRowsPerPage, onFieldEdited, services, renderCustomGridBody, renderCustomToolbar, trailingControlColumns, totalHits, onFetchMoreRecords, renderDocumentView, setExpandedDoc, expandedDoc, configRowHeight, showMultiFields, maxDocFieldsDisplayed, externalControlColumns, externalAdditionalControls, rowsPerPageOptions, visibleCellActions, externalCustomRenderers, consumer, componentsTourSteps, gridStyleOverride, rowLineHeightOverride, customGridColumnsConfiguration, customControlColumnsConfiguration, }: ", { "pluginId": "@kbn/unified-data-table", "scope": "common", @@ -437,7 +437,7 @@ "id": "def-common.UnifiedDataTable.$1", "type": "Object", "tags": [], - "label": "{\n ariaLabelledBy,\n columns,\n columnTypes,\n showColumnTokens,\n configHeaderRowHeight,\n headerRowHeightState,\n onUpdateHeaderRowHeight,\n controlColumnIds = CONTROL_COLUMN_IDS_DEFAULT,\n dataView,\n loadingState,\n onFilter,\n onResize,\n onSetColumns,\n onSort,\n rows,\n searchDescription,\n searchTitle,\n settings,\n showTimeCol,\n showFullScreenButton = true,\n sort,\n useNewFieldsApi,\n isSortEnabled = true,\n isPaginationEnabled = true,\n cellActionsTriggerId,\n className,\n rowHeightState,\n onUpdateRowHeight,\n maxAllowedSampleSize,\n sampleSizeState,\n onUpdateSampleSize,\n isPlainRecord = false,\n rowsPerPageState,\n onUpdateRowsPerPage,\n onFieldEdited,\n services,\n renderCustomGridBody,\n renderCustomToolbar,\n trailingControlColumns,\n totalHits,\n onFetchMoreRecords,\n renderDocumentView,\n setExpandedDoc,\n expandedDoc,\n configRowHeight,\n showMultiFields = true,\n maxDocFieldsDisplayed = 50,\n externalControlColumns,\n externalAdditionalControls,\n rowsPerPageOptions,\n visibleCellActions,\n externalCustomRenderers,\n consumer = 'discover',\n componentsTourSteps,\n gridStyleOverride,\n rowLineHeightOverride,\n customGridColumnsConfiguration,\n customControlColumnsConfiguration,\n}", + "label": "{\n ariaLabelledBy,\n columns,\n columnsMeta,\n showColumnTokens,\n configHeaderRowHeight,\n headerRowHeightState,\n onUpdateHeaderRowHeight,\n controlColumnIds = CONTROL_COLUMN_IDS_DEFAULT,\n dataView,\n loadingState,\n onFilter,\n onResize,\n onSetColumns,\n onSort,\n rows,\n searchDescription,\n searchTitle,\n settings,\n showTimeCol,\n showFullScreenButton = true,\n sort,\n useNewFieldsApi,\n isSortEnabled = true,\n isPaginationEnabled = true,\n cellActionsTriggerId,\n className,\n rowHeightState,\n onUpdateRowHeight,\n maxAllowedSampleSize,\n sampleSizeState,\n onUpdateSampleSize,\n isPlainRecord = false,\n rowsPerPageState,\n onUpdateRowsPerPage,\n onFieldEdited,\n services,\n renderCustomGridBody,\n renderCustomToolbar,\n trailingControlColumns,\n totalHits,\n onFetchMoreRecords,\n renderDocumentView,\n setExpandedDoc,\n expandedDoc,\n configRowHeight,\n showMultiFields = true,\n maxDocFieldsDisplayed = 50,\n externalControlColumns,\n externalAdditionalControls,\n rowsPerPageOptions,\n visibleCellActions,\n externalCustomRenderers,\n consumer = 'discover',\n componentsTourSteps,\n gridStyleOverride,\n rowLineHeightOverride,\n customGridColumnsConfiguration,\n customControlColumnsConfiguration,\n}", "description": [], "signature": [ { @@ -829,20 +829,20 @@ }, { "parentPluginId": "@kbn/unified-data-table", - "id": "def-common.UnifiedDataTableProps.columnTypes", + "id": "def-common.UnifiedDataTableProps.columnsMeta", "type": "Object", "tags": [], - "label": "columnTypes", + "label": "columnsMeta", "description": [ - "\nIf not provided, types will be derived by default from the dataView field types.\nFor displaying text-based search results, pass column types (which are available separately in the fetch request) down here.\nCheck available utils in `utils/get_column_types.ts`" + "\nIf not provided, types will be derived by default from the dataView field types.\nFor displaying text-based search results, pass columns meta (which are available separately in the fetch request) down here.\nCheck available utils in `utils/get_columns_meta.ts`" ], "signature": [ { "pluginId": "@kbn/unified-data-table", "scope": "common", "docId": "kibKbnUnifiedDataTablePluginApi", - "section": "def-common.DataTableColumnTypes", - "text": "DataTableColumnTypes" + "section": "def-common.DataTableColumnsMeta", + "text": "DataTableColumnsMeta" }, " | undefined" ], @@ -1726,13 +1726,13 @@ "DataTableRecord", ", displayedRows: ", "DataTableRecord", - "[], displayedColumns: string[], columnTypes?: ", + "[], displayedColumns: string[], columnsMeta?: ", { "pluginId": "@kbn/unified-data-table", "scope": "common", "docId": "kibKbnUnifiedDataTablePluginApi", - "section": "def-common.DataTableColumnTypes", - "text": "DataTableColumnTypes" + "section": "def-common.DataTableColumnsMeta", + "text": "DataTableColumnsMeta" }, " | undefined) => JSX.Element | undefined) | undefined" ], @@ -1791,15 +1791,15 @@ "id": "def-common.UnifiedDataTableProps.renderDocumentView.$4", "type": "Object", "tags": [], - "label": "columnTypes", + "label": "columnsMeta", "description": [], "signature": [ { "pluginId": "@kbn/unified-data-table", "scope": "common", "docId": "kibKbnUnifiedDataTablePluginApi", - "section": "def-common.DataTableColumnTypes", - "text": "DataTableColumnTypes" + "section": "def-common.DataTableColumnsMeta", + "text": "DataTableColumnsMeta" }, " | undefined" ], @@ -2415,15 +2415,23 @@ }, { "parentPluginId": "@kbn/unified-data-table", - "id": "def-common.DataTableColumnTypes", + "id": "def-common.DataTableColumnsMeta", "type": "Type", "tags": [], - "label": "DataTableColumnTypes", + "label": "DataTableColumnsMeta", "description": [ "\nCustom column types per column name" ], "signature": [ - "{ [x: string]: string; }" + "{ [x: string]: { type: ", + { + "pluginId": "expressions", + "scope": "common", + "docId": "kibExpressionsPluginApi", + "section": "def-common.DatatableColumnType", + "text": "DatatableColumnType" + }, + "; esType?: string | undefined; }; }" ], "path": "packages/kbn-unified-data-table/src/types.ts", "deprecated": false, diff --git a/api_docs/kbn_unified_data_table.mdx b/api_docs/kbn_unified_data_table.mdx index bf23892a54328..bf58bb06eb45d 100644 --- a/api_docs/kbn_unified_data_table.mdx +++ b/api_docs/kbn_unified_data_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-unified-data-table title: "@kbn/unified-data-table" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/unified-data-table plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unified-data-table'] --- import kbnUnifiedDataTableObj from './kbn_unified_data_table.devdocs.json'; diff --git a/api_docs/kbn_unified_doc_viewer.mdx b/api_docs/kbn_unified_doc_viewer.mdx index 3632af7d98500..27f30bcdb5346 100644 --- a/api_docs/kbn_unified_doc_viewer.mdx +++ b/api_docs/kbn_unified_doc_viewer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-unified-doc-viewer title: "@kbn/unified-doc-viewer" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/unified-doc-viewer plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unified-doc-viewer'] --- import kbnUnifiedDocViewerObj from './kbn_unified_doc_viewer.devdocs.json'; diff --git a/api_docs/kbn_unified_field_list.devdocs.json b/api_docs/kbn_unified_field_list.devdocs.json index 11b75393e5655..31c4a40292d33 100644 --- a/api_docs/kbn_unified_field_list.devdocs.json +++ b/api_docs/kbn_unified_field_list.devdocs.json @@ -1634,6 +1634,20 @@ "path": "packages/kbn-unified-field-list/src/types.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "@kbn/unified-field-list", + "id": "def-common.BucketedAggregation.areExamples", + "type": "CompoundType", + "tags": [], + "label": "areExamples", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "packages/kbn-unified-field-list/src/types.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false @@ -3929,7 +3943,7 @@ "section": "def-common.BucketedAggregation", "text": "BucketedAggregation" }, - " | undefined" + " | undefined" ], "path": "packages/kbn-unified-field-list/src/components/field_stats/field_stats.tsx", "deprecated": false, @@ -3950,7 +3964,7 @@ "section": "def-common.BucketedAggregation", "text": "BucketedAggregation" }, - " | undefined" + " | undefined" ], "path": "packages/kbn-unified-field-list/src/components/field_stats/field_stats.tsx", "deprecated": false, diff --git a/api_docs/kbn_unified_field_list.mdx b/api_docs/kbn_unified_field_list.mdx index 3e81a2705efb7..883b1c5a2baff 100644 --- a/api_docs/kbn_unified_field_list.mdx +++ b/api_docs/kbn_unified_field_list.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-unified-field-list title: "@kbn/unified-field-list" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/unified-field-list plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unified-field-list'] --- import kbnUnifiedFieldListObj from './kbn_unified_field_list.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/k | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 292 | 0 | 268 | 10 | +| 293 | 0 | 269 | 10 | ## Common diff --git a/api_docs/kbn_unsaved_changes_badge.mdx b/api_docs/kbn_unsaved_changes_badge.mdx index 648e002dbf6e2..1eace0d652759 100644 --- a/api_docs/kbn_unsaved_changes_badge.mdx +++ b/api_docs/kbn_unsaved_changes_badge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-unsaved-changes-badge title: "@kbn/unsaved-changes-badge" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/unsaved-changes-badge plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unsaved-changes-badge'] --- import kbnUnsavedChangesBadgeObj from './kbn_unsaved_changes_badge.devdocs.json'; diff --git a/api_docs/kbn_use_tracked_promise.mdx b/api_docs/kbn_use_tracked_promise.mdx index 4694898e5e46e..3f4903b7c056f 100644 --- a/api_docs/kbn_use_tracked_promise.mdx +++ b/api_docs/kbn_use_tracked_promise.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-use-tracked-promise title: "@kbn/use-tracked-promise" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/use-tracked-promise plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/use-tracked-promise'] --- import kbnUseTrackedPromiseObj from './kbn_use_tracked_promise.devdocs.json'; diff --git a/api_docs/kbn_user_profile_components.mdx b/api_docs/kbn_user_profile_components.mdx index 7f426c8c612bd..1467e33a83789 100644 --- a/api_docs/kbn_user_profile_components.mdx +++ b/api_docs/kbn_user_profile_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-user-profile-components title: "@kbn/user-profile-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/user-profile-components plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/user-profile-components'] --- import kbnUserProfileComponentsObj from './kbn_user_profile_components.devdocs.json'; diff --git a/api_docs/kbn_utility_types.mdx b/api_docs/kbn_utility_types.mdx index 3c51b2f331192..197da269e2ee1 100644 --- a/api_docs/kbn_utility_types.mdx +++ b/api_docs/kbn_utility_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utility-types title: "@kbn/utility-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/utility-types plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utility-types'] --- import kbnUtilityTypesObj from './kbn_utility_types.devdocs.json'; diff --git a/api_docs/kbn_utility_types_jest.mdx b/api_docs/kbn_utility_types_jest.mdx index c361798a1c3cc..1f8134ef0db3f 100644 --- a/api_docs/kbn_utility_types_jest.mdx +++ b/api_docs/kbn_utility_types_jest.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utility-types-jest title: "@kbn/utility-types-jest" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/utility-types-jest plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utility-types-jest'] --- import kbnUtilityTypesJestObj from './kbn_utility_types_jest.devdocs.json'; diff --git a/api_docs/kbn_utils.mdx b/api_docs/kbn_utils.mdx index cce1498108c38..3b314fdcd95df 100644 --- a/api_docs/kbn_utils.mdx +++ b/api_docs/kbn_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utils title: "@kbn/utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/utils plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utils'] --- import kbnUtilsObj from './kbn_utils.devdocs.json'; diff --git a/api_docs/kbn_visualization_ui_components.devdocs.json b/api_docs/kbn_visualization_ui_components.devdocs.json index d55182154c780..a8177415871ca 100644 --- a/api_docs/kbn_visualization_ui_components.devdocs.json +++ b/api_docs/kbn_visualization_ui_components.devdocs.json @@ -255,31 +255,32 @@ "label": "DimensionButton", "description": [], "signature": [ - "({\n groupLabel,\n children,\n onClick,\n onRemoveClick,\n accessorConfig,\n label,\n message,\n ...otherProps // from Drag&Drop integration\n}: ", + "React.NamedExoticComponent<", "DimensionButtonProps", - ") => JSX.Element" + "> & { readonly type: ({ groupLabel, children, onClick, onRemoveClick, accessorConfig, label, message, ...otherProps }: ", + "DimensionButtonProps", + ") => JSX.Element; }" ], "path": "packages/kbn-visualization-ui-components/components/dimension_buttons/dimension_button.tsx", "deprecated": false, "trackAdoption": false, + "returnComment": [], "children": [ { "parentPluginId": "@kbn/visualization-ui-components", "id": "def-public.DimensionButton.$1", - "type": "Object", + "type": "Uncategorized", "tags": [], - "label": "{\n groupLabel,\n children,\n onClick,\n onRemoveClick,\n accessorConfig,\n label,\n message,\n ...otherProps // from Drag&Drop integration\n}", + "label": "props", "description": [], "signature": [ - "DimensionButtonProps" + "P" ], - "path": "packages/kbn-visualization-ui-components/components/dimension_buttons/dimension_button.tsx", + "path": "node_modules/@types/react/index.d.ts", "deprecated": false, - "trackAdoption": false, - "isRequired": true + "trackAdoption": false } ], - "returnComment": [], "initialIsOpen": false }, { diff --git a/api_docs/kbn_visualization_ui_components.mdx b/api_docs/kbn_visualization_ui_components.mdx index 3e838f3f79fcf..1060fbf4ed598 100644 --- a/api_docs/kbn_visualization_ui_components.mdx +++ b/api_docs/kbn_visualization_ui_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-visualization-ui-components title: "@kbn/visualization-ui-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/visualization-ui-components plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/visualization-ui-components'] --- import kbnVisualizationUiComponentsObj from './kbn_visualization_ui_components.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/k | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 154 | 0 | 151 | 3 | +| 154 | 0 | 150 | 3 | ## Client diff --git a/api_docs/kbn_visualization_utils.mdx b/api_docs/kbn_visualization_utils.mdx index e15198eab4bb2..b7e545117c3d3 100644 --- a/api_docs/kbn_visualization_utils.mdx +++ b/api_docs/kbn_visualization_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-visualization-utils title: "@kbn/visualization-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/visualization-utils plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/visualization-utils'] --- import kbnVisualizationUtilsObj from './kbn_visualization_utils.devdocs.json'; diff --git a/api_docs/kbn_xstate_utils.mdx b/api_docs/kbn_xstate_utils.mdx index 622fbf2eb0ba2..f98d4c4816bf1 100644 --- a/api_docs/kbn_xstate_utils.mdx +++ b/api_docs/kbn_xstate_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-xstate-utils title: "@kbn/xstate-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/xstate-utils plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/xstate-utils'] --- import kbnXstateUtilsObj from './kbn_xstate_utils.devdocs.json'; diff --git a/api_docs/kbn_yarn_lock_validator.mdx b/api_docs/kbn_yarn_lock_validator.mdx index 82212e1dc556e..e6257220fcb2a 100644 --- a/api_docs/kbn_yarn_lock_validator.mdx +++ b/api_docs/kbn_yarn_lock_validator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-yarn-lock-validator title: "@kbn/yarn-lock-validator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/yarn-lock-validator plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/yarn-lock-validator'] --- import kbnYarnLockValidatorObj from './kbn_yarn_lock_validator.devdocs.json'; diff --git a/api_docs/kbn_zod_helpers.mdx b/api_docs/kbn_zod_helpers.mdx index 665d549776f4a..337f26a04a2a1 100644 --- a/api_docs/kbn_zod_helpers.mdx +++ b/api_docs/kbn_zod_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-zod-helpers title: "@kbn/zod-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/zod-helpers plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/zod-helpers'] --- import kbnZodHelpersObj from './kbn_zod_helpers.devdocs.json'; diff --git a/api_docs/kibana_overview.mdx b/api_docs/kibana_overview.mdx index 76cf4ff441cb2..8ae485db7e038 100644 --- a/api_docs/kibana_overview.mdx +++ b/api_docs/kibana_overview.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaOverview title: "kibanaOverview" image: https://source.unsplash.com/400x175/?github description: API docs for the kibanaOverview plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaOverview'] --- import kibanaOverviewObj from './kibana_overview.devdocs.json'; diff --git a/api_docs/kibana_react.mdx b/api_docs/kibana_react.mdx index 8dc1a55b0ee21..3fd8dc086ec96 100644 --- a/api_docs/kibana_react.mdx +++ b/api_docs/kibana_react.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaReact title: "kibanaReact" image: https://source.unsplash.com/400x175/?github description: API docs for the kibanaReact plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaReact'] --- import kibanaReactObj from './kibana_react.devdocs.json'; diff --git a/api_docs/kibana_utils.mdx b/api_docs/kibana_utils.mdx index b18aee0fd510f..1f9c0b25d03bc 100644 --- a/api_docs/kibana_utils.mdx +++ b/api_docs/kibana_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaUtils title: "kibanaUtils" image: https://source.unsplash.com/400x175/?github description: API docs for the kibanaUtils plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaUtils'] --- import kibanaUtilsObj from './kibana_utils.devdocs.json'; diff --git a/api_docs/kubernetes_security.mdx b/api_docs/kubernetes_security.mdx index c7e3a406f4adb..592185c376369 100644 --- a/api_docs/kubernetes_security.mdx +++ b/api_docs/kubernetes_security.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kubernetesSecurity title: "kubernetesSecurity" image: https://source.unsplash.com/400x175/?github description: API docs for the kubernetesSecurity plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kubernetesSecurity'] --- import kubernetesSecurityObj from './kubernetes_security.devdocs.json'; diff --git a/api_docs/lens.devdocs.json b/api_docs/lens.devdocs.json index 80f04024c19ae..43ace307a3256 100644 --- a/api_docs/lens.devdocs.json +++ b/api_docs/lens.devdocs.json @@ -7751,7 +7751,7 @@ "\nRenders dimension trigger. Used only for noDatasource layers" ], "signature": [ - "((props: { columnId: string; label: string; hideTooltip?: boolean | undefined; }) => React.ReactElement<{ columnId: string; label: string; hideTooltip?: boolean | undefined; }, string | React.JSXElementConstructor> | null) | undefined" + "((props: { columnId: string; label: string; }) => React.ReactElement<{ columnId: string; label: string; }, string | React.JSXElementConstructor> | null) | undefined" ], "path": "x-pack/plugins/lens/public/types.ts", "deprecated": false, @@ -7789,20 +7789,6 @@ "path": "x-pack/plugins/lens/public/types.ts", "deprecated": false, "trackAdoption": false - }, - { - "parentPluginId": "lens", - "id": "def-public.Visualization.DimensionTriggerComponent.$1.hideTooltip", - "type": "CompoundType", - "tags": [], - "label": "hideTooltip", - "description": [], - "signature": [ - "boolean | undefined" - ], - "path": "x-pack/plugins/lens/public/types.ts", - "deprecated": false, - "trackAdoption": false } ] } @@ -10954,10 +10940,50 @@ "pluginId": "@kbn/presentation-publishing", "scope": "common", "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesUnifiedSearch", - "text": "PublishesUnifiedSearch" + "section": "def-common.PublishesTimeRange", + "text": "PublishesTimeRange" + }, + " & { isCompatibleWithUnifiedSearch?: (() => boolean) | undefined; filters$: ", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PublishingSubject", + "text": "PublishingSubject" + }, + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" + }, + "[] | undefined>; query$: ", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PublishingSubject", + "text": "PublishingSubject" + }, + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Query", + "text": "Query" + }, + " | ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.AggregateQuery", + "text": "AggregateQuery" }, - " & Partial<", + " | undefined>; } & Partial<", { "pluginId": "@kbn/presentation-publishing", "scope": "common", diff --git a/api_docs/lens.mdx b/api_docs/lens.mdx index 8d8684a31c518..9f6881f0f8cb4 100644 --- a/api_docs/lens.mdx +++ b/api_docs/lens.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/lens title: "lens" image: https://source.unsplash.com/400x175/?github description: API docs for the lens plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lens'] --- import lensObj from './lens.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/k | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 665 | 0 | 564 | 61 | +| 664 | 0 | 563 | 61 | ## Client diff --git a/api_docs/license_api_guard.mdx b/api_docs/license_api_guard.mdx index e81d201912bb7..8d29167a04bac 100644 --- a/api_docs/license_api_guard.mdx +++ b/api_docs/license_api_guard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licenseApiGuard title: "licenseApiGuard" image: https://source.unsplash.com/400x175/?github description: API docs for the licenseApiGuard plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licenseApiGuard'] --- import licenseApiGuardObj from './license_api_guard.devdocs.json'; diff --git a/api_docs/license_management.mdx b/api_docs/license_management.mdx index e6a23322ec590..ce30b5d7be85d 100644 --- a/api_docs/license_management.mdx +++ b/api_docs/license_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licenseManagement title: "licenseManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the licenseManagement plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licenseManagement'] --- import licenseManagementObj from './license_management.devdocs.json'; diff --git a/api_docs/licensing.mdx b/api_docs/licensing.mdx index 29b95d766437e..0bde29e5bd38a 100644 --- a/api_docs/licensing.mdx +++ b/api_docs/licensing.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licensing title: "licensing" image: https://source.unsplash.com/400x175/?github description: API docs for the licensing plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licensing'] --- import licensingObj from './licensing.devdocs.json'; diff --git a/api_docs/links.mdx b/api_docs/links.mdx index 1b40bd38a4541..16e4d8637acc7 100644 --- a/api_docs/links.mdx +++ b/api_docs/links.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/links title: "links" image: https://source.unsplash.com/400x175/?github description: API docs for the links plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'links'] --- import linksObj from './links.devdocs.json'; diff --git a/api_docs/lists.devdocs.json b/api_docs/lists.devdocs.json index 96c01b00f5ad0..b99555928251b 100644 --- a/api_docs/lists.devdocs.json +++ b/api_docs/lists.devdocs.json @@ -4397,7 +4397,39 @@ "label": "esClient", "description": [], "signature": [ - "{ create: { (this: That, params: ", + "{ search: { >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "SearchResponse", + ">; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "SearchResponse", + ", unknown>>; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "SearchResponse", + ">; }; create: { (this: That, params: ", "CreateRequest", " | ", "CreateRequest", @@ -4501,39 +4533,7 @@ "TransportRequestOptions", " | undefined): Promise<", "WriteResponseBase", - ">; }; search: { >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptionsWithOutMeta", - " | undefined): Promise<", - "SearchResponse", - ">; >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptionsWithMeta", - " | undefined): Promise<", - "TransportResult", - "<", - "SearchResponse", - ", unknown>>; >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptions", - " | undefined): Promise<", - "SearchResponse", - ">; }; helpers: ", + ">; }; helpers: ", "default", "; name: string | symbol; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kEsql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kInference]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kQueryRuleset]: symbol | null; [kRollup]: symbol | null; [kSearchApplication]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kSynonyms]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", "default", diff --git a/api_docs/lists.mdx b/api_docs/lists.mdx index ed590cefd2c79..15449f057819e 100644 --- a/api_docs/lists.mdx +++ b/api_docs/lists.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/lists title: "lists" image: https://source.unsplash.com/400x175/?github description: API docs for the lists plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lists'] --- import listsObj from './lists.devdocs.json'; diff --git a/api_docs/logs_explorer.mdx b/api_docs/logs_explorer.mdx index 279e652c05749..1e65e70565f27 100644 --- a/api_docs/logs_explorer.mdx +++ b/api_docs/logs_explorer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/logsExplorer title: "logsExplorer" image: https://source.unsplash.com/400x175/?github description: API docs for the logsExplorer plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'logsExplorer'] --- import logsExplorerObj from './logs_explorer.devdocs.json'; diff --git a/api_docs/logs_shared.devdocs.json b/api_docs/logs_shared.devdocs.json index 5a9b39ad40468..0064c1fe2892a 100644 --- a/api_docs/logs_shared.devdocs.json +++ b/api_docs/logs_shared.devdocs.json @@ -1882,7 +1882,7 @@ "section": "def-common.ResolvedLogView", "text": "ResolvedLogView" }, - " | undefined; logViewStatus: { index: \"missing\" | \"unknown\" | \"empty\" | \"available\"; } | undefined; derivedDataView: ", + " | undefined; logViewStatus: { index: \"unknown\" | \"missing\" | \"empty\" | \"available\"; } | undefined; derivedDataView: ", { "pluginId": "dataViews", "scope": "common", @@ -2463,7 +2463,7 @@ "section": "def-common.ResolvedLogView", "text": "ResolvedLogView" }, - " | undefined; logViewStatus: { index: \"missing\" | \"unknown\" | \"empty\" | \"available\"; } | undefined; derivedDataView: ", + " | undefined; logViewStatus: { index: \"unknown\" | \"missing\" | \"empty\" | \"available\"; } | undefined; derivedDataView: ", { "pluginId": "dataViews", "scope": "common", @@ -3412,7 +3412,7 @@ "section": "def-common.ResolvedLogView", "text": "ResolvedLogView" }, - "; status: { index: \"missing\" | \"unknown\" | \"empty\" | \"available\"; }; } | { type: \"LOADING_LOG_VIEW_FAILED\"; error: Error; }" + "; status: { index: \"unknown\" | \"missing\" | \"empty\" | \"available\"; }; } | { type: \"LOADING_LOG_VIEW_FAILED\"; error: Error; }" ], "path": "x-pack/plugins/observability_solution/logs_shared/public/observability_logs/log_view_state/src/notifications.ts", "deprecated": false, @@ -6341,7 +6341,7 @@ "label": "LogViewStatus", "description": [], "signature": [ - "{ index: \"missing\" | \"unknown\" | \"empty\" | \"available\"; }" + "{ index: \"unknown\" | \"missing\" | \"empty\" | \"available\"; }" ], "path": "x-pack/plugins/observability_solution/logs_shared/common/log_views/types.ts", "deprecated": false, diff --git a/api_docs/logs_shared.mdx b/api_docs/logs_shared.mdx index 483e0e70abc61..fb70ddcf61bd5 100644 --- a/api_docs/logs_shared.mdx +++ b/api_docs/logs_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/logsShared title: "logsShared" image: https://source.unsplash.com/400x175/?github description: API docs for the logsShared plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'logsShared'] --- import logsSharedObj from './logs_shared.devdocs.json'; diff --git a/api_docs/management.devdocs.json b/api_docs/management.devdocs.json index 5f2978b782c5c..6cb32d590a920 100644 --- a/api_docs/management.devdocs.json +++ b/api_docs/management.devdocs.json @@ -785,38 +785,6 @@ "deprecated": false, "trackAdoption": false, "children": [ - { - "parentPluginId": "management", - "id": "def-public.ManagementStart.setIsSidebarEnabled", - "type": "Function", - "tags": [], - "label": "setIsSidebarEnabled", - "description": [], - "signature": [ - "(enabled: boolean) => void" - ], - "path": "src/plugins/management/public/types.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "management", - "id": "def-public.ManagementStart.setIsSidebarEnabled.$1", - "type": "boolean", - "tags": [], - "label": "enabled", - "description": [], - "signature": [ - "boolean" - ], - "path": "src/plugins/management/public/types.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, { "parentPluginId": "management", "id": "def-public.ManagementStart.setupCardsNavigation", diff --git a/api_docs/management.mdx b/api_docs/management.mdx index da60770349707..f7adc97cc01ca 100644 --- a/api_docs/management.mdx +++ b/api_docs/management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/management title: "management" image: https://source.unsplash.com/400x175/?github description: API docs for the management plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'management'] --- import managementObj from './management.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kiban | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 45 | 0 | 45 | 7 | +| 43 | 0 | 43 | 7 | ## Client diff --git a/api_docs/maps.devdocs.json b/api_docs/maps.devdocs.json index 46fa7bfaaab12..fffd29e17487d 100644 --- a/api_docs/maps.devdocs.json +++ b/api_docs/maps.devdocs.json @@ -4006,10 +4006,50 @@ "pluginId": "@kbn/presentation-publishing", "scope": "common", "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesUnifiedSearch", - "text": "PublishesUnifiedSearch" + "section": "def-common.PublishesTimeRange", + "text": "PublishesTimeRange" }, - " & Partial<", + " & { isCompatibleWithUnifiedSearch?: (() => boolean) | undefined; filters$: ", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PublishingSubject", + "text": "PublishingSubject" + }, + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" + }, + "[] | undefined>; query$: ", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PublishingSubject", + "text": "PublishingSubject" + }, + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Query", + "text": "Query" + }, + " | ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.AggregateQuery", + "text": "AggregateQuery" + }, + " | undefined>; } & Partial<", { "pluginId": "@kbn/presentation-publishing", "scope": "common", diff --git a/api_docs/maps.mdx b/api_docs/maps.mdx index 0e5dcc683dbe4..b9d2fb96bed19 100644 --- a/api_docs/maps.mdx +++ b/api_docs/maps.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/maps title: "maps" image: https://source.unsplash.com/400x175/?github description: API docs for the maps plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'maps'] --- import mapsObj from './maps.devdocs.json'; diff --git a/api_docs/maps_ems.mdx b/api_docs/maps_ems.mdx index 036904b806816..ceca0192e183f 100644 --- a/api_docs/maps_ems.mdx +++ b/api_docs/maps_ems.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/mapsEms title: "mapsEms" image: https://source.unsplash.com/400x175/?github description: API docs for the mapsEms plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'mapsEms'] --- import mapsEmsObj from './maps_ems.devdocs.json'; diff --git a/api_docs/metrics_data_access.mdx b/api_docs/metrics_data_access.mdx index bc85e6a4fc7a8..65725669e769c 100644 --- a/api_docs/metrics_data_access.mdx +++ b/api_docs/metrics_data_access.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/metricsDataAccess title: "metricsDataAccess" image: https://source.unsplash.com/400x175/?github description: API docs for the metricsDataAccess plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'metricsDataAccess'] --- import metricsDataAccessObj from './metrics_data_access.devdocs.json'; diff --git a/api_docs/ml.mdx b/api_docs/ml.mdx index e7536f503ff23..62c5e19bebb14 100644 --- a/api_docs/ml.mdx +++ b/api_docs/ml.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ml title: "ml" image: https://source.unsplash.com/400x175/?github description: API docs for the ml plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ml'] --- import mlObj from './ml.devdocs.json'; diff --git a/api_docs/mock_idp_plugin.mdx b/api_docs/mock_idp_plugin.mdx index f36ea589d6048..64049025fb86b 100644 --- a/api_docs/mock_idp_plugin.mdx +++ b/api_docs/mock_idp_plugin.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/mockIdpPlugin title: "mockIdpPlugin" image: https://source.unsplash.com/400x175/?github description: API docs for the mockIdpPlugin plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'mockIdpPlugin'] --- import mockIdpPluginObj from './mock_idp_plugin.devdocs.json'; diff --git a/api_docs/monitoring.mdx b/api_docs/monitoring.mdx index 1b3742d177bec..d6f7477cd11e7 100644 --- a/api_docs/monitoring.mdx +++ b/api_docs/monitoring.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/monitoring title: "monitoring" image: https://source.unsplash.com/400x175/?github description: API docs for the monitoring plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'monitoring'] --- import monitoringObj from './monitoring.devdocs.json'; diff --git a/api_docs/monitoring_collection.mdx b/api_docs/monitoring_collection.mdx index b0143cca274be..283613826a891 100644 --- a/api_docs/monitoring_collection.mdx +++ b/api_docs/monitoring_collection.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/monitoringCollection title: "monitoringCollection" image: https://source.unsplash.com/400x175/?github description: API docs for the monitoringCollection plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'monitoringCollection'] --- import monitoringCollectionObj from './monitoring_collection.devdocs.json'; diff --git a/api_docs/navigation.mdx b/api_docs/navigation.mdx index e56af1ffa4994..77141d3e9a38e 100644 --- a/api_docs/navigation.mdx +++ b/api_docs/navigation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/navigation title: "navigation" image: https://source.unsplash.com/400x175/?github description: API docs for the navigation plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'navigation'] --- import navigationObj from './navigation.devdocs.json'; diff --git a/api_docs/newsfeed.mdx b/api_docs/newsfeed.mdx index 9a7561599cdb9..43b11565e603b 100644 --- a/api_docs/newsfeed.mdx +++ b/api_docs/newsfeed.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/newsfeed title: "newsfeed" image: https://source.unsplash.com/400x175/?github description: API docs for the newsfeed plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'newsfeed'] --- import newsfeedObj from './newsfeed.devdocs.json'; diff --git a/api_docs/no_data_page.mdx b/api_docs/no_data_page.mdx index 3750168a7ad00..4add668dce6d5 100644 --- a/api_docs/no_data_page.mdx +++ b/api_docs/no_data_page.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/noDataPage title: "noDataPage" image: https://source.unsplash.com/400x175/?github description: API docs for the noDataPage plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'noDataPage'] --- import noDataPageObj from './no_data_page.devdocs.json'; diff --git a/api_docs/notifications.mdx b/api_docs/notifications.mdx index 313a8df70954a..61aeef895a19f 100644 --- a/api_docs/notifications.mdx +++ b/api_docs/notifications.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/notifications title: "notifications" image: https://source.unsplash.com/400x175/?github description: API docs for the notifications plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'notifications'] --- import notificationsObj from './notifications.devdocs.json'; diff --git a/api_docs/observability.devdocs.json b/api_docs/observability.devdocs.json index 78c3eaac6c00a..fd1148f7782fd 100644 --- a/api_docs/observability.devdocs.json +++ b/api_docs/observability.devdocs.json @@ -799,9 +799,9 @@ "label": "getElasticsearchQueryOrThrow", "description": [], "signature": [ - "(kuery: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }) => ", + "(kuery: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }) => never[] | ", "QueryDslQueryContainer", - " | never[] | { bool: ", + " | { bool: ", { "pluginId": "@kbn/es-query", "scope": "common", @@ -903,7 +903,7 @@ }, " | undefined; list: () => string[]; }; selectedAlertId?: string | undefined; } & ", "CommonProps", - " & { as?: \"div\" | undefined; } & _EuiFlyoutProps & Omit, HTMLDivElement>, keyof _EuiFlyoutProps> & Omit, HTMLDivElement>, \"key\" | keyof React.HTMLAttributes | \"css\"> & { ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject | null | undefined; }, \"type\" | \"prefix\" | \"key\" | \"id\" | \"defaultValue\" | \"security\" | \"onChange\" | \"defaultChecked\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"title\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"color\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"children\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDown\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClick\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"data-test-subj\" | \"css\" | \"paddingSize\" | \"size\" | \"onClose\" | \"ref\" | \"maxWidth\" | \"ownFocus\" | \"hideCloseButton\" | \"closeButtonProps\" | \"closeButtonPosition\" | \"maskProps\" | \"outsideClickCloses\" | \"side\" | \"pushMinBreakpoint\" | \"pushAnimation\" | \"focusTrapProps\" | \"includeFixedHeadersInFocusTrap\" | \"as\">, \"type\" | \"prefix\" | \"key\" | \"id\" | \"defaultValue\" | \"security\" | \"alert\" | \"onChange\" | \"defaultChecked\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"title\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"color\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"children\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDown\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClick\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"data-test-subj\" | \"css\" | \"alerts\" | \"paddingSize\" | \"size\" | \"onClose\" | \"maxWidth\" | \"ownFocus\" | \"hideCloseButton\" | \"closeButtonProps\" | \"closeButtonPosition\" | \"maskProps\" | \"outsideClickCloses\" | \"side\" | \"pushMinBreakpoint\" | \"pushAnimation\" | \"focusTrapProps\" | \"includeFixedHeadersInFocusTrap\" | \"as\" | \"rawAlert\" | \"isInApp\" | \"observabilityRuleTypeRegistry\" | \"selectedAlertId\"> & { ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject | null | undefined; }> & { readonly _result: ({ alert, rawAlert, alerts, isInApp, observabilityRuleTypeRegistry, onClose, selectedAlertId, }: AlertsFlyoutProps) => JSX.Element | null; }" + " & { as?: \"div\" | undefined; } & _EuiFlyoutProps & Omit, HTMLDivElement>, keyof _EuiFlyoutProps> & Omit, HTMLDivElement>, \"key\" | keyof React.HTMLAttributes | \"css\"> & { ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject | null | undefined; }, \"id\" | \"type\" | \"key\" | \"prefix\" | \"defaultValue\" | \"security\" | \"onChange\" | \"defaultChecked\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"title\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"color\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"children\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDown\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClick\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"data-test-subj\" | \"css\" | \"paddingSize\" | \"size\" | \"onClose\" | \"ref\" | \"maxWidth\" | \"ownFocus\" | \"hideCloseButton\" | \"closeButtonProps\" | \"closeButtonPosition\" | \"maskProps\" | \"outsideClickCloses\" | \"side\" | \"pushMinBreakpoint\" | \"pushAnimation\" | \"focusTrapProps\" | \"includeFixedHeadersInFocusTrap\" | \"as\">, \"id\" | \"type\" | \"key\" | \"prefix\" | \"defaultValue\" | \"security\" | \"alert\" | \"onChange\" | \"defaultChecked\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"title\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"color\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"children\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDown\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClick\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"data-test-subj\" | \"css\" | \"alerts\" | \"paddingSize\" | \"size\" | \"onClose\" | \"maxWidth\" | \"ownFocus\" | \"hideCloseButton\" | \"closeButtonProps\" | \"closeButtonPosition\" | \"maskProps\" | \"outsideClickCloses\" | \"side\" | \"pushMinBreakpoint\" | \"pushAnimation\" | \"focusTrapProps\" | \"includeFixedHeadersInFocusTrap\" | \"as\" | \"rawAlert\" | \"isInApp\" | \"observabilityRuleTypeRegistry\" | \"selectedAlertId\"> & { ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject | null | undefined; }> & { readonly _result: ({ alert, rawAlert, alerts, isInApp, observabilityRuleTypeRegistry, onClose, selectedAlertId, }: AlertsFlyoutProps) => JSX.Element | null; }" ], "path": "x-pack/plugins/observability_solution/observability/public/index.ts", "deprecated": false, @@ -3270,7 +3270,7 @@ "section": "def-common.AppUpdater", "text": "AppUpdater" }, - ">; }) => void; setIsSidebarEnabled: (isEnabled: boolean) => void; }" + ">; }) => void; }" ], "path": "x-pack/plugins/observability_solution/observability/public/plugin.ts", "deprecated": false, @@ -5268,7 +5268,39 @@ "label": "client", "description": [], "signature": [ - "{ create: { (this: That, params: ", + "{ search: { >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "SearchResponse", + ">; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "SearchResponse", + ", unknown>>; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "SearchResponse", + ">; }; create: { (this: That, params: ", "CreateRequest", " | ", "CreateRequest", @@ -5372,39 +5404,7 @@ "TransportRequestOptions", " | undefined): Promise<", "WriteResponseBase", - ">; }; search: { >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptionsWithOutMeta", - " | undefined): Promise<", - "SearchResponse", - ">; >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptionsWithMeta", - " | undefined): Promise<", - "TransportResult", - "<", - "SearchResponse", - ", unknown>>; >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptions", - " | undefined): Promise<", - "SearchResponse", - ">; }; helpers: ", + ">; }; helpers: ", "default", "; name: string | symbol; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kEsql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kInference]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kQueryRuleset]: symbol | null; [kRollup]: symbol | null; [kSearchApplication]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kSynonyms]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", "default", @@ -6589,7 +6589,39 @@ "label": "client", "description": [], "signature": [ - "{ create: { (this: That, params: ", + "{ search: { >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "SearchResponse", + ">; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "SearchResponse", + ", unknown>>; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "SearchResponse", + ">; }; create: { (this: That, params: ", "CreateRequest", " | ", "CreateRequest", @@ -6693,39 +6725,7 @@ "TransportRequestOptions", " | undefined): Promise<", "WriteResponseBase", - ">; }; search: { >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptionsWithOutMeta", - " | undefined): Promise<", - "SearchResponse", - ">; >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptionsWithMeta", - " | undefined): Promise<", - "TransportResult", - "<", - "SearchResponse", - ", unknown>>; >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptions", - " | undefined): Promise<", - "SearchResponse", - ">; }; helpers: ", + ">; }; helpers: ", "default", "; name: string | symbol; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kEsql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kInference]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kQueryRuleset]: symbol | null; [kRollup]: symbol | null; [kSearchApplication]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kSynonyms]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", "default", diff --git a/api_docs/observability.mdx b/api_docs/observability.mdx index 0b5cb519e2e46..8dcbef4c9f7c6 100644 --- a/api_docs/observability.mdx +++ b/api_docs/observability.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observability title: "observability" image: https://source.unsplash.com/400x175/?github description: API docs for the observability plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observability'] --- import observabilityObj from './observability.devdocs.json'; diff --git a/api_docs/observability_a_i_assistant.mdx b/api_docs/observability_a_i_assistant.mdx index 2c04500a690f1..1786affaa2419 100644 --- a/api_docs/observability_a_i_assistant.mdx +++ b/api_docs/observability_a_i_assistant.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityAIAssistant title: "observabilityAIAssistant" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityAIAssistant plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityAIAssistant'] --- import observabilityAIAssistantObj from './observability_a_i_assistant.devdocs.json'; diff --git a/api_docs/observability_a_i_assistant_app.mdx b/api_docs/observability_a_i_assistant_app.mdx index 668232dc4ba4e..069e071513a98 100644 --- a/api_docs/observability_a_i_assistant_app.mdx +++ b/api_docs/observability_a_i_assistant_app.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityAIAssistantApp title: "observabilityAIAssistantApp" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityAIAssistantApp plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityAIAssistantApp'] --- import observabilityAIAssistantAppObj from './observability_a_i_assistant_app.devdocs.json'; diff --git a/api_docs/observability_logs_explorer.mdx b/api_docs/observability_logs_explorer.mdx index bb9261afe03a5..6ca7b1e42d8e5 100644 --- a/api_docs/observability_logs_explorer.mdx +++ b/api_docs/observability_logs_explorer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityLogsExplorer title: "observabilityLogsExplorer" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityLogsExplorer plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityLogsExplorer'] --- import observabilityLogsExplorerObj from './observability_logs_explorer.devdocs.json'; diff --git a/api_docs/observability_onboarding.mdx b/api_docs/observability_onboarding.mdx index 6c86d72bb04f9..7199e79c209f3 100644 --- a/api_docs/observability_onboarding.mdx +++ b/api_docs/observability_onboarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityOnboarding title: "observabilityOnboarding" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityOnboarding plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityOnboarding'] --- import observabilityOnboardingObj from './observability_onboarding.devdocs.json'; diff --git a/api_docs/observability_shared.devdocs.json b/api_docs/observability_shared.devdocs.json index d25c29ade63ca..bd9f27f2cd8c0 100644 --- a/api_docs/observability_shared.devdocs.json +++ b/api_docs/observability_shared.devdocs.json @@ -169,7 +169,7 @@ "section": "def-common.AppUpdater", "text": "AppUpdater" }, - ">; }) => void; setIsSidebarEnabled: (isEnabled: boolean) => void; }" + ">; }) => void; }" ], "path": "x-pack/plugins/observability_solution/observability_shared/public/plugin.ts", "deprecated": false, @@ -3366,7 +3366,7 @@ "section": "def-common.AppUpdater", "text": "AppUpdater" }, - ">; }) => void; setIsSidebarEnabled: (isEnabled: boolean) => void; }" + ">; }) => void; }" ], "path": "x-pack/plugins/observability_solution/observability_shared/public/plugin.ts", "deprecated": false, diff --git a/api_docs/observability_shared.mdx b/api_docs/observability_shared.mdx index 3a4243ab291ee..47a1e9927b6c1 100644 --- a/api_docs/observability_shared.mdx +++ b/api_docs/observability_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityShared title: "observabilityShared" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityShared plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityShared'] --- import observabilitySharedObj from './observability_shared.devdocs.json'; diff --git a/api_docs/osquery.mdx b/api_docs/osquery.mdx index e7cb84f0fc5ef..7509ed31eee30 100644 --- a/api_docs/osquery.mdx +++ b/api_docs/osquery.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/osquery title: "osquery" image: https://source.unsplash.com/400x175/?github description: API docs for the osquery plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'osquery'] --- import osqueryObj from './osquery.devdocs.json'; diff --git a/api_docs/painless_lab.mdx b/api_docs/painless_lab.mdx index d65a1f3353a02..e5159b3ab0f40 100644 --- a/api_docs/painless_lab.mdx +++ b/api_docs/painless_lab.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/painlessLab title: "painlessLab" image: https://source.unsplash.com/400x175/?github description: API docs for the painlessLab plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'painlessLab'] --- import painlessLabObj from './painless_lab.devdocs.json'; diff --git a/api_docs/plugin_directory.mdx b/api_docs/plugin_directory.mdx index 8c5bd9816033e..220d7b83dbcd2 100644 --- a/api_docs/plugin_directory.mdx +++ b/api_docs/plugin_directory.mdx @@ -7,7 +7,7 @@ id: kibDevDocsPluginDirectory slug: /kibana-dev-docs/api-meta/plugin-api-directory title: Directory description: Directory of public APIs available through plugins or packages. -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -15,19 +15,19 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Count | Plugins or Packages with a
public API | Number of teams | |--------------|----------|------------------------| -| 765 | 656 | 40 | +| 770 | 661 | 40 | ### Public API health stats | API Count | Any Count | Missing comments | Missing exports | |--------------|----------|-----------------|--------| -| 46027 | 233 | 34867 | 1782 | +| 46129 | 233 | 34918 | 1785 | ## Plugin Directory | Plugin name           | Maintaining team | Description | API Cnt | Any Cnt | Missing
comments | Missing
exports | |--------------|----------------|-----------|--------------|----------|---------------|--------| -| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 281 | 0 | 275 | 31 | +| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 289 | 0 | 283 | 32 | | | [@elastic/appex-sharedux @elastic/kibana-management](https://github.com/orgs/elastic/teams/appex-sharedux ) | - | 2 | 0 | 2 | 0 | | | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | - | 2 | 0 | 2 | 0 | | | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | - | 2 | 0 | 2 | 0 | @@ -69,8 +69,8 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 35 | 0 | 33 | 2 | | | [@elastic/security-threat-hunting-explore](https://github.com/orgs/elastic/teams/security-threat-hunting-explore) | APIs used to assess the quality of data in Elasticsearch indexes | 2 | 0 | 0 | 0 | | | [@elastic/security-generative-ai](https://github.com/orgs/elastic/teams/security-generative-ai) | Server APIs for the Elastic AI Assistant | 45 | 0 | 31 | 0 | -| | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds embeddables service to Kibana | 562 | 1 | 460 | 11 | -| | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Extends embeddable plugin with more functionality | 18 | 0 | 18 | 0 | +| | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds embeddables service to Kibana | 555 | 1 | 453 | 10 | +| | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Extends embeddable plugin with more functionality | 23 | 0 | 23 | 1 | | | [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana-security) | This plugin provides encryption and decryption utilities for saved objects containing sensitive information. | 53 | 0 | 46 | 1 | | | [@elastic/enterprise-search-frontend](https://github.com/orgs/elastic/teams/enterprise-search-frontend) | Adds dashboards for discovering and managing Enterprise Search products. | 5 | 0 | 5 | 0 | | | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 99 | 3 | 97 | 3 | @@ -91,7 +91,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds 'shape' function and renderer to expressions | 148 | 0 | 146 | 0 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Expression Tagcloud plugin adds a `tagcloud` renderer and function to the expression plugin. The renderer will display the `Wordcloud` chart. | 6 | 0 | 6 | 2 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Expression XY plugin adds a `xy` renderer and function to the expression plugin. The renderer will display the `xy` chart. | 177 | 0 | 167 | 13 | -| | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Adds expression runtime to Kibana | 2216 | 17 | 1757 | 5 | +| | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Adds expression runtime to Kibana | 2217 | 17 | 1756 | 5 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 235 | 0 | 99 | 2 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | Index pattern fields and ambiguous values formatters | 292 | 5 | 253 | 3 | | | [@elastic/kibana-gis](https://github.com/orgs/elastic/teams/kibana-gis) | The file upload plugin contains components and services for uploading a file, analyzing its data, and then importing the data into an Elasticsearch index. Supported file types include CSV, TSV, newline-delimited JSON and GeoJSON. | 84 | 0 | 84 | 8 | @@ -119,7 +119,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | kibanaUsageCollection | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 0 | 0 | 0 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 609 | 3 | 416 | 9 | | | [@elastic/kibana-cloud-security-posture](https://github.com/orgs/elastic/teams/kibana-cloud-security-posture) | - | 5 | 0 | 5 | 1 | -| | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Visualization editor allowing to quickly and easily configure compelling visualizations to use on dashboards and canvas workpads. Exposes components to embed visualizations and link into the Lens editor from within other apps in Kibana. | 665 | 0 | 564 | 61 | +| | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Visualization editor allowing to quickly and easily configure compelling visualizations to use on dashboards and canvas workpads. Exposes components to embed visualizations and link into the Lens editor from within other apps in Kibana. | 664 | 0 | 563 | 61 | | | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 8 | 0 | 8 | 0 | | | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 4 | 0 | 4 | 1 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 117 | 0 | 42 | 10 | @@ -128,7 +128,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | This plugin provides a LogsExplorer component using the Discover customization framework, offering several affordances specifically designed for log consumption. | 121 | 4 | 121 | 23 | | | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | Exposes the shared components and APIs to access and visualize logs. | 302 | 0 | 276 | 32 | | logstash | [@elastic/logstash](https://github.com/orgs/elastic/teams/logstash) | - | 0 | 0 | 0 | 0 | -| | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 45 | 0 | 45 | 7 | +| | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 43 | 0 | 43 | 7 | | | [@elastic/kibana-gis](https://github.com/orgs/elastic/teams/kibana-gis) | - | 264 | 0 | 263 | 28 | | | [@elastic/kibana-gis](https://github.com/orgs/elastic/teams/kibana-gis) | - | 60 | 0 | 60 | 0 | | | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | Exposes utilities for accessing metrics data | 104 | 8 | 104 | 6 | @@ -165,13 +165,14 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | This plugin contains the definition and helper methods around saved searches, used by discover and visualizations. | 79 | 0 | 78 | 3 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 32 | 0 | 13 | 0 | | | [@elastic/kibana-reporting-services](https://github.com/orgs/elastic/teams/kibana-reporting-services) | Kibana Screenshotting Plugin | 32 | 0 | 8 | 4 | +| | [@elastic/enterprise-search-frontend](https://github.com/orgs/elastic/teams/enterprise-search-frontend) | - | 15 | 0 | 9 | 0 | | searchprofiler | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 0 | 0 | 0 | 0 | -| | [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana-security) | This plugin provides authentication and authorization features, and exposes functionality to understand the capabilities of the currently authenticated user. | 404 | 0 | 198 | 2 | +| | [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana-security) | This plugin provides authentication and authorization features, and exposes functionality to understand the capabilities of the currently authenticated user. | 408 | 0 | 199 | 2 | | | [@elastic/security-solution](https://github.com/orgs/elastic/teams/security-solution) | - | 194 | 0 | 123 | 37 | | | [@elastic/security-solution](https://github.com/orgs/elastic/teams/security-solution) | ESS customizations for Security Solution. | 6 | 0 | 6 | 0 | | | [@elastic/security-solution](https://github.com/orgs/elastic/teams/security-solution) | Serverless customizations for security. | 7 | 0 | 7 | 0 | -| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | The core Serverless plugin, providing APIs to Serverless Project plugins. | 21 | 0 | 20 | 0 | -| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Serverless customizations for observability. | 6 | 0 | 6 | 0 | +| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | The core Serverless plugin, providing APIs to Serverless Project plugins. | 24 | 0 | 23 | 0 | +| | [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/obs-ux-management-team) | Serverless customizations for observability. | 6 | 0 | 6 | 0 | | | [@elastic/enterprise-search-frontend](https://github.com/orgs/elastic/teams/enterprise-search-frontend) | Serverless customizations for search. | 6 | 0 | 6 | 0 | | | [@elastic/kibana-cloud-security-posture](https://github.com/orgs/elastic/teams/kibana-cloud-security-posture) | - | 134 | 0 | 134 | 8 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Adds URL Service and sharing capabilities to Kibana | 120 | 0 | 61 | 11 | @@ -181,7 +182,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 23 | 0 | 23 | 3 | | | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 4 | 0 | 4 | 0 | | synthetics | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | This plugin visualizes data from Synthetics and Heartbeat, and integrates with other Observability solutions. | 0 | 0 | 0 | 0 | -| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 104 | 0 | 61 | 5 | +| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 102 | 0 | 59 | 5 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 45 | 0 | 1 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 31 | 0 | 26 | 6 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 1 | 0 | 1 | 0 | @@ -255,7 +256,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 3 | 0 | 3 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 62 | 0 | 17 | 1 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 2 | 0 | 2 | 0 | -| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 37 | 0 | 15 | 0 | +| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 38 | 0 | 15 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 2 | 0 | 2 | 0 | | | [@elastic/appex-qa](https://github.com/orgs/elastic/teams/appex-qa) | - | 8 | 0 | 4 | 0 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 217 | 0 | 180 | 9 | @@ -312,8 +313,8 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 4 | 0 | 4 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 22 | 0 | 13 | 1 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 37 | 1 | 33 | 0 | -| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 111 | 0 | 54 | 0 | -| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 42 | 0 | 37 | 3 | +| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 112 | 0 | 54 | 0 | +| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 43 | 0 | 38 | 3 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 13 | 1 | 13 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 4 | 0 | 4 | 1 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 4 | 0 | 4 | 0 | @@ -446,10 +447,13 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 44 | 0 | 43 | 0 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 6 | 0 | 6 | 0 | | | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 5 | 0 | 5 | 0 | +| | [@elastic/fleet](https://github.com/orgs/elastic/teams/fleet) | - | 3 | 0 | 3 | 0 | | | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 4 | 0 | 4 | 0 | | | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | - | 3 | 0 | 3 | 0 | | | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 40 | 0 | 29 | 0 | | | [@elastic/enterprise-search-frontend](https://github.com/orgs/elastic/teams/enterprise-search-frontend) | - | 4 | 0 | 4 | 0 | +| | [@elastic/security-solution](https://github.com/orgs/elastic/teams/security-solution) | - | 5 | 0 | 5 | 0 | +| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 2 | 0 | 2 | 0 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 8 | 0 | 8 | 0 | | | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 8 | 0 | 8 | 0 | | | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 8 | 0 | 8 | 0 | @@ -461,7 +465,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 59 | 0 | 37 | 4 | | | [@elastic/docs](https://github.com/orgs/elastic/teams/docs) | - | 75 | 0 | 75 | 2 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 5 | 0 | 5 | 1 | -| | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 39 | 0 | 26 | 5 | +| | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 41 | 0 | 27 | 6 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 19 | 0 | 11 | 0 | | | [@elastic/security-threat-hunting-explore](https://github.com/orgs/elastic/teams/security-threat-hunting-explore) | - | 13 | 0 | 5 | 0 | | | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 35 | 0 | 34 | 0 | @@ -473,12 +477,12 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 263 | 1 | 202 | 15 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 25 | 0 | 25 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 2 | 0 | 1 | 0 | -| | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 17 | 0 | 15 | 0 | +| | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 20 | 0 | 18 | 0 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 39 | 0 | 39 | 0 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 52 | 0 | 52 | 1 | | | [@elastic/security-threat-hunting-investigations](https://github.com/orgs/elastic/teams/security-threat-hunting-investigations) | - | 37 | 0 | 14 | 1 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 22 | 0 | 18 | 0 | -| | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 48 | 0 | 40 | 1 | +| | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 50 | 0 | 42 | 1 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 2 | 0 | 0 | 0 | | | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 3 | 0 | 3 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 36 | 0 | 21 | 1 | @@ -509,14 +513,14 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 8 | 0 | 8 | 0 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 2 | 0 | 2 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 6 | 0 | 1 | 1 | -| | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 11 | 0 | 10 | 2 | +| | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 13 | 0 | 12 | 2 | | | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 9 | 0 | 6 | 2 | | | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 24 | 0 | 4 | 0 | | | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 24 | 1 | 9 | 0 | | | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 23 | 0 | 7 | 0 | | | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 8 | 0 | 2 | 3 | | | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 45 | 0 | 0 | 0 | -| | [@elastic/appex-sharedux @elastic/kibana-management](https://github.com/orgs/elastic/teams/appex-sharedux ) | - | 135 | 0 | 132 | 0 | +| | [@elastic/appex-sharedux @elastic/kibana-management](https://github.com/orgs/elastic/teams/appex-sharedux ) | - | 136 | 0 | 133 | 0 | | | [@elastic/appex-sharedux @elastic/kibana-management](https://github.com/orgs/elastic/teams/appex-sharedux ) | - | 20 | 0 | 11 | 0 | | | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 88 | 0 | 10 | 0 | | | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 56 | 0 | 6 | 0 | @@ -545,6 +549,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | - | 5 | 0 | 0 | 0 | | | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | - | 8 | 0 | 0 | 0 | | | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | - | 2 | 0 | 1 | 0 | +| | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | - | 34 | 0 | 0 | 0 | | | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | - | 33 | 0 | 28 | 0 | | | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | - | 18 | 0 | 18 | 0 | | | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | - | 31 | 1 | 24 | 1 | @@ -566,7 +571,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 1 | 0 | 1 | 0 | | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | - | 46 | 0 | 44 | 0 | | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | - | 10 | 0 | 10 | 0 | -| | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | - | 149 | 0 | 116 | 3 | +| | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | - | 164 | 0 | 134 | 4 | | | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 161 | 0 | 48 | 0 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 13 | 0 | 7 | 0 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 22 | 0 | 9 | 0 | @@ -582,7 +587,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 6 | 0 | 6 | 1 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 96 | 0 | 86 | 13 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 52 | 0 | 52 | 3 | -| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 25 | 0 | 22 | 0 | +| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 25 | 0 | 21 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 34 | 0 | 33 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 14 | 0 | 11 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 17 | 0 | 16 | 0 | @@ -603,7 +608,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 20 | 0 | 18 | 1 | | | [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana-security) | - | 7 | 0 | 7 | 0 | | | [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana-security) | - | 83 | 0 | 36 | 0 | -| | [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana-security) | - | 44 | 0 | 14 | 0 | +| | [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana-security) | - | 49 | 0 | 15 | 0 | | | [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana-security) | - | 213 | 0 | 114 | 0 | | | [@elastic/security-threat-hunting-explore](https://github.com/orgs/elastic/teams/security-threat-hunting-explore) | - | 14 | 0 | 14 | 6 | | | [@elastic/security-threat-hunting-explore](https://github.com/orgs/elastic/teams/security-threat-hunting-explore) | - | 52 | 0 | 48 | 0 | @@ -698,14 +703,14 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 9 | 0 | 8 | 0 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | Contains functionality for the unified data table which can be integrated into apps | 143 | 0 | 78 | 1 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 14 | 0 | 13 | 6 | -| | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | Contains functionality for the field list and field stats which can be integrated into apps | 292 | 0 | 268 | 10 | +| | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | Contains functionality for the field list and field stats which can be integrated into apps | 293 | 0 | 269 | 10 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 13 | 0 | 9 | 0 | | | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 3 | 0 | 2 | 1 | | | [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana-security) | - | 80 | 1 | 21 | 2 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 37 | 0 | 16 | 1 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 2 | 0 | 2 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 26 | 0 | 15 | 0 | -| | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 154 | 0 | 151 | 3 | +| | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 154 | 0 | 150 | 3 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 10 | 0 | 9 | 1 | | | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 13 | 0 | 13 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 6 | 0 | 2 | 0 | diff --git a/api_docs/presentation_panel.mdx b/api_docs/presentation_panel.mdx index 5c02fad579dae..bea2ea1159767 100644 --- a/api_docs/presentation_panel.mdx +++ b/api_docs/presentation_panel.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/presentationPanel title: "presentationPanel" image: https://source.unsplash.com/400x175/?github description: API docs for the presentationPanel plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'presentationPanel'] --- import presentationPanelObj from './presentation_panel.devdocs.json'; diff --git a/api_docs/presentation_util.mdx b/api_docs/presentation_util.mdx index d7392f53d9ad1..59044c427b483 100644 --- a/api_docs/presentation_util.mdx +++ b/api_docs/presentation_util.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/presentationUtil title: "presentationUtil" image: https://source.unsplash.com/400x175/?github description: API docs for the presentationUtil plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'presentationUtil'] --- import presentationUtilObj from './presentation_util.devdocs.json'; diff --git a/api_docs/profiling.mdx b/api_docs/profiling.mdx index 1b05b14ddd0aa..effb23bae13e5 100644 --- a/api_docs/profiling.mdx +++ b/api_docs/profiling.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/profiling title: "profiling" image: https://source.unsplash.com/400x175/?github description: API docs for the profiling plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'profiling'] --- import profilingObj from './profiling.devdocs.json'; diff --git a/api_docs/profiling_data_access.mdx b/api_docs/profiling_data_access.mdx index a12259e40b3b8..cca1278fdc5e6 100644 --- a/api_docs/profiling_data_access.mdx +++ b/api_docs/profiling_data_access.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/profilingDataAccess title: "profilingDataAccess" image: https://source.unsplash.com/400x175/?github description: API docs for the profilingDataAccess plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'profilingDataAccess'] --- import profilingDataAccessObj from './profiling_data_access.devdocs.json'; diff --git a/api_docs/remote_clusters.mdx b/api_docs/remote_clusters.mdx index 733f9509f1d8b..a504753be1aec 100644 --- a/api_docs/remote_clusters.mdx +++ b/api_docs/remote_clusters.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/remoteClusters title: "remoteClusters" image: https://source.unsplash.com/400x175/?github description: API docs for the remoteClusters plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'remoteClusters'] --- import remoteClustersObj from './remote_clusters.devdocs.json'; diff --git a/api_docs/reporting.mdx b/api_docs/reporting.mdx index 833af6d942c08..9084b2d906233 100644 --- a/api_docs/reporting.mdx +++ b/api_docs/reporting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/reporting title: "reporting" image: https://source.unsplash.com/400x175/?github description: API docs for the reporting plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'reporting'] --- import reportingObj from './reporting.devdocs.json'; diff --git a/api_docs/rollup.mdx b/api_docs/rollup.mdx index 83360b4af2cdf..6aad388442b3e 100644 --- a/api_docs/rollup.mdx +++ b/api_docs/rollup.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/rollup title: "rollup" image: https://source.unsplash.com/400x175/?github description: API docs for the rollup plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'rollup'] --- import rollupObj from './rollup.devdocs.json'; diff --git a/api_docs/rule_registry.devdocs.json b/api_docs/rule_registry.devdocs.json index d8581b4e2ec54..68454853720b7 100644 --- a/api_docs/rule_registry.devdocs.json +++ b/api_docs/rule_registry.devdocs.json @@ -1618,7 +1618,7 @@ "label": "resourceType", "description": [], "signature": [ - "\"index\" | \"namespace\"" + "\"namespace\" | \"index\"" ], "path": "x-pack/plugins/rule_registry/server/rule_data_plugin_service/errors.ts", "deprecated": false, diff --git a/api_docs/rule_registry.mdx b/api_docs/rule_registry.mdx index 7d59dc4534733..11fd304c5add4 100644 --- a/api_docs/rule_registry.mdx +++ b/api_docs/rule_registry.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ruleRegistry title: "ruleRegistry" image: https://source.unsplash.com/400x175/?github description: API docs for the ruleRegistry plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ruleRegistry'] --- import ruleRegistryObj from './rule_registry.devdocs.json'; diff --git a/api_docs/runtime_fields.mdx b/api_docs/runtime_fields.mdx index e52e9c80f012e..53d3b6f826d5e 100644 --- a/api_docs/runtime_fields.mdx +++ b/api_docs/runtime_fields.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/runtimeFields title: "runtimeFields" image: https://source.unsplash.com/400x175/?github description: API docs for the runtimeFields plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'runtimeFields'] --- import runtimeFieldsObj from './runtime_fields.devdocs.json'; diff --git a/api_docs/saved_objects.mdx b/api_docs/saved_objects.mdx index 4fec29c762c22..44b2bf262255e 100644 --- a/api_docs/saved_objects.mdx +++ b/api_docs/saved_objects.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjects title: "savedObjects" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjects plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjects'] --- import savedObjectsObj from './saved_objects.devdocs.json'; diff --git a/api_docs/saved_objects_finder.mdx b/api_docs/saved_objects_finder.mdx index ed9cab69933dc..897bb09972ba4 100644 --- a/api_docs/saved_objects_finder.mdx +++ b/api_docs/saved_objects_finder.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsFinder title: "savedObjectsFinder" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsFinder plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsFinder'] --- import savedObjectsFinderObj from './saved_objects_finder.devdocs.json'; diff --git a/api_docs/saved_objects_management.devdocs.json b/api_docs/saved_objects_management.devdocs.json index 48f11e8af68f7..0cd5725390efa 100644 --- a/api_docs/saved_objects_management.devdocs.json +++ b/api_docs/saved_objects_management.devdocs.json @@ -294,7 +294,7 @@ "label": "euiColumn", "description": [], "signature": [ - "{ prefix?: string | undefined; scope?: string | undefined; id?: string | undefined; defaultValue?: string | number | readonly string[] | undefined; name: React.ReactNode; security?: string | undefined; onChange?: React.FormEventHandler | undefined; defaultChecked?: boolean | undefined; suppressContentEditableWarning?: boolean | undefined; suppressHydrationWarning?: boolean | undefined; accessKey?: string | undefined; className?: string | undefined; contentEditable?: Booleanish | \"inherit\" | undefined; contextMenu?: string | undefined; dir?: string | undefined; draggable?: Booleanish | undefined; hidden?: boolean | undefined; lang?: string | undefined; placeholder?: string | undefined; slot?: string | undefined; spellCheck?: Booleanish | undefined; style?: React.CSSProperties | undefined; tabIndex?: number | undefined; title?: string | undefined; translate?: \"yes\" | \"no\" | undefined; radioGroup?: string | undefined; role?: React.AriaRole | undefined; about?: string | undefined; datatype?: string | undefined; inlist?: any; property?: string | undefined; resource?: string | undefined; typeof?: string | undefined; vocab?: string | undefined; autoCapitalize?: string | undefined; autoCorrect?: string | undefined; autoSave?: string | undefined; color?: string | undefined; itemProp?: string | undefined; itemScope?: boolean | undefined; itemType?: string | undefined; itemID?: string | undefined; itemRef?: string | undefined; results?: number | undefined; unselectable?: \"on\" | \"off\" | undefined; inputMode?: \"search\" | \"none\" | \"text\" | \"url\" | \"email\" | \"tel\" | \"numeric\" | \"decimal\" | undefined; is?: string | undefined; 'aria-activedescendant'?: string | undefined; 'aria-atomic'?: Booleanish | undefined; 'aria-autocomplete'?: \"none\" | \"list\" | \"both\" | \"inline\" | undefined; 'aria-busy'?: Booleanish | undefined; 'aria-checked'?: boolean | \"true\" | \"false\" | \"mixed\" | undefined; 'aria-colcount'?: number | undefined; 'aria-colindex'?: number | undefined; 'aria-colspan'?: number | undefined; 'aria-controls'?: string | undefined; 'aria-current'?: boolean | \"page\" | \"date\" | \"location\" | \"true\" | \"false\" | \"step\" | \"time\" | undefined; 'aria-describedby'?: string | undefined; 'aria-details'?: string | undefined; 'aria-disabled'?: Booleanish | undefined; 'aria-dropeffect'?: \"execute\" | \"link\" | \"none\" | \"copy\" | \"move\" | \"popup\" | undefined; 'aria-errormessage'?: string | undefined; 'aria-expanded'?: Booleanish | undefined; 'aria-flowto'?: string | undefined; 'aria-grabbed'?: Booleanish | undefined; 'aria-haspopup'?: boolean | \"true\" | \"false\" | \"grid\" | \"menu\" | \"dialog\" | \"listbox\" | \"tree\" | undefined; 'aria-hidden'?: Booleanish | undefined; 'aria-invalid'?: boolean | \"true\" | \"false\" | \"grammar\" | \"spelling\" | undefined; 'aria-keyshortcuts'?: string | undefined; 'aria-label'?: string | undefined; 'aria-labelledby'?: string | undefined; 'aria-level'?: number | undefined; 'aria-live'?: \"off\" | \"assertive\" | \"polite\" | undefined; 'aria-modal'?: Booleanish | undefined; 'aria-multiline'?: Booleanish | undefined; 'aria-multiselectable'?: Booleanish | undefined; 'aria-orientation'?: \"horizontal\" | \"vertical\" | undefined; 'aria-owns'?: string | undefined; 'aria-placeholder'?: string | undefined; 'aria-posinset'?: number | undefined; 'aria-pressed'?: boolean | \"true\" | \"false\" | \"mixed\" | undefined; 'aria-readonly'?: Booleanish | undefined; 'aria-relevant'?: \"text\" | \"all\" | \"additions\" | \"additions removals\" | \"additions text\" | \"removals\" | \"removals additions\" | \"removals text\" | \"text additions\" | \"text removals\" | undefined; 'aria-required'?: Booleanish | undefined; 'aria-roledescription'?: string | undefined; 'aria-rowcount'?: number | undefined; 'aria-rowindex'?: number | undefined; 'aria-rowspan'?: number | undefined; 'aria-selected'?: Booleanish | undefined; 'aria-setsize'?: number | undefined; 'aria-sort'?: \"none\" | \"other\" | \"ascending\" | \"descending\" | undefined; 'aria-valuemax'?: number | undefined; 'aria-valuemin'?: number | undefined; 'aria-valuenow'?: number | undefined; 'aria-valuetext'?: string | undefined; children?: React.ReactNode; dangerouslySetInnerHTML?: { __html: string; } | undefined; onCopy?: React.ClipboardEventHandler | undefined; onCopyCapture?: React.ClipboardEventHandler | undefined; onCut?: React.ClipboardEventHandler | undefined; onCutCapture?: React.ClipboardEventHandler | undefined; onPaste?: React.ClipboardEventHandler | undefined; onPasteCapture?: React.ClipboardEventHandler | undefined; onCompositionEnd?: React.CompositionEventHandler | undefined; onCompositionEndCapture?: React.CompositionEventHandler | undefined; onCompositionStart?: React.CompositionEventHandler | undefined; onCompositionStartCapture?: React.CompositionEventHandler | undefined; onCompositionUpdate?: React.CompositionEventHandler | undefined; onCompositionUpdateCapture?: React.CompositionEventHandler | undefined; onFocus?: React.FocusEventHandler | undefined; onFocusCapture?: React.FocusEventHandler | undefined; onBlur?: React.FocusEventHandler | undefined; onBlurCapture?: React.FocusEventHandler | undefined; onChangeCapture?: React.FormEventHandler | undefined; onBeforeInput?: React.FormEventHandler | undefined; onBeforeInputCapture?: React.FormEventHandler | undefined; onInput?: React.FormEventHandler | undefined; onInputCapture?: React.FormEventHandler | undefined; onReset?: React.FormEventHandler | undefined; onResetCapture?: React.FormEventHandler | undefined; onSubmit?: React.FormEventHandler | undefined; onSubmitCapture?: React.FormEventHandler | undefined; onInvalid?: React.FormEventHandler | undefined; onInvalidCapture?: React.FormEventHandler | undefined; onLoad?: React.ReactEventHandler | undefined; onLoadCapture?: React.ReactEventHandler | undefined; onError?: React.ReactEventHandler | undefined; onErrorCapture?: React.ReactEventHandler | undefined; onKeyDown?: React.KeyboardEventHandler | undefined; onKeyDownCapture?: React.KeyboardEventHandler | undefined; onKeyPress?: React.KeyboardEventHandler | undefined; onKeyPressCapture?: React.KeyboardEventHandler | undefined; onKeyUp?: React.KeyboardEventHandler | undefined; onKeyUpCapture?: React.KeyboardEventHandler | undefined; onAbort?: React.ReactEventHandler | undefined; onAbortCapture?: React.ReactEventHandler | undefined; onCanPlay?: React.ReactEventHandler | undefined; onCanPlayCapture?: React.ReactEventHandler | undefined; onCanPlayThrough?: React.ReactEventHandler | undefined; onCanPlayThroughCapture?: React.ReactEventHandler | undefined; onDurationChange?: React.ReactEventHandler | undefined; onDurationChangeCapture?: React.ReactEventHandler | undefined; onEmptied?: React.ReactEventHandler | undefined; onEmptiedCapture?: React.ReactEventHandler | undefined; onEncrypted?: React.ReactEventHandler | undefined; onEncryptedCapture?: React.ReactEventHandler | undefined; onEnded?: React.ReactEventHandler | undefined; onEndedCapture?: React.ReactEventHandler | undefined; onLoadedData?: React.ReactEventHandler | undefined; onLoadedDataCapture?: React.ReactEventHandler | undefined; onLoadedMetadata?: React.ReactEventHandler | undefined; onLoadedMetadataCapture?: React.ReactEventHandler | undefined; onLoadStart?: React.ReactEventHandler | undefined; onLoadStartCapture?: React.ReactEventHandler | undefined; onPause?: React.ReactEventHandler | undefined; onPauseCapture?: React.ReactEventHandler | undefined; onPlay?: React.ReactEventHandler | undefined; onPlayCapture?: React.ReactEventHandler | undefined; onPlaying?: React.ReactEventHandler | undefined; onPlayingCapture?: React.ReactEventHandler | undefined; onProgress?: React.ReactEventHandler | undefined; onProgressCapture?: React.ReactEventHandler | undefined; onRateChange?: React.ReactEventHandler | undefined; onRateChangeCapture?: React.ReactEventHandler | undefined; onSeeked?: React.ReactEventHandler | undefined; onSeekedCapture?: React.ReactEventHandler | undefined; onSeeking?: React.ReactEventHandler | undefined; onSeekingCapture?: React.ReactEventHandler | undefined; onStalled?: React.ReactEventHandler | undefined; onStalledCapture?: React.ReactEventHandler | undefined; onSuspend?: React.ReactEventHandler | undefined; onSuspendCapture?: React.ReactEventHandler | undefined; onTimeUpdate?: React.ReactEventHandler | undefined; onTimeUpdateCapture?: React.ReactEventHandler | undefined; onVolumeChange?: React.ReactEventHandler | undefined; onVolumeChangeCapture?: React.ReactEventHandler | undefined; onWaiting?: React.ReactEventHandler | undefined; onWaitingCapture?: React.ReactEventHandler | undefined; onAuxClick?: React.MouseEventHandler | undefined; onAuxClickCapture?: React.MouseEventHandler | undefined; onClick?: React.MouseEventHandler | undefined; onClickCapture?: React.MouseEventHandler | undefined; onContextMenu?: React.MouseEventHandler | undefined; onContextMenuCapture?: React.MouseEventHandler | undefined; onDoubleClick?: React.MouseEventHandler | undefined; onDoubleClickCapture?: React.MouseEventHandler | undefined; onDrag?: React.DragEventHandler | undefined; onDragCapture?: React.DragEventHandler | undefined; onDragEnd?: React.DragEventHandler | undefined; onDragEndCapture?: React.DragEventHandler | undefined; onDragEnter?: React.DragEventHandler | undefined; onDragEnterCapture?: React.DragEventHandler | undefined; onDragExit?: React.DragEventHandler | undefined; onDragExitCapture?: React.DragEventHandler | undefined; onDragLeave?: React.DragEventHandler | undefined; onDragLeaveCapture?: React.DragEventHandler | undefined; onDragOver?: React.DragEventHandler | undefined; onDragOverCapture?: React.DragEventHandler | undefined; onDragStart?: React.DragEventHandler | undefined; onDragStartCapture?: React.DragEventHandler | undefined; onDrop?: React.DragEventHandler | undefined; onDropCapture?: React.DragEventHandler | undefined; onMouseDown?: React.MouseEventHandler | undefined; onMouseDownCapture?: React.MouseEventHandler | undefined; onMouseEnter?: React.MouseEventHandler | undefined; onMouseLeave?: React.MouseEventHandler | undefined; onMouseMove?: React.MouseEventHandler | undefined; onMouseMoveCapture?: React.MouseEventHandler | undefined; onMouseOut?: React.MouseEventHandler | undefined; onMouseOutCapture?: React.MouseEventHandler | undefined; onMouseOver?: React.MouseEventHandler | undefined; onMouseOverCapture?: React.MouseEventHandler | undefined; onMouseUp?: React.MouseEventHandler | undefined; onMouseUpCapture?: React.MouseEventHandler | undefined; onSelect?: React.ReactEventHandler | undefined; onSelectCapture?: React.ReactEventHandler | undefined; onTouchCancel?: React.TouchEventHandler | undefined; onTouchCancelCapture?: React.TouchEventHandler | undefined; onTouchEnd?: React.TouchEventHandler | undefined; onTouchEndCapture?: React.TouchEventHandler | undefined; onTouchMove?: React.TouchEventHandler | undefined; onTouchMoveCapture?: React.TouchEventHandler | undefined; onTouchStart?: React.TouchEventHandler | undefined; onTouchStartCapture?: React.TouchEventHandler | undefined; onPointerDown?: React.PointerEventHandler | undefined; onPointerDownCapture?: React.PointerEventHandler | undefined; onPointerMove?: React.PointerEventHandler | undefined; onPointerMoveCapture?: React.PointerEventHandler | undefined; onPointerUp?: React.PointerEventHandler | undefined; onPointerUpCapture?: React.PointerEventHandler | undefined; onPointerCancel?: React.PointerEventHandler | undefined; onPointerCancelCapture?: React.PointerEventHandler | undefined; onPointerEnter?: React.PointerEventHandler | undefined; onPointerEnterCapture?: React.PointerEventHandler | undefined; onPointerLeave?: React.PointerEventHandler | undefined; onPointerLeaveCapture?: React.PointerEventHandler | undefined; onPointerOver?: React.PointerEventHandler | undefined; onPointerOverCapture?: React.PointerEventHandler | undefined; onPointerOut?: React.PointerEventHandler | undefined; onPointerOutCapture?: React.PointerEventHandler | undefined; onGotPointerCapture?: React.PointerEventHandler | undefined; onGotPointerCaptureCapture?: React.PointerEventHandler | undefined; onLostPointerCapture?: React.PointerEventHandler | undefined; onLostPointerCaptureCapture?: React.PointerEventHandler | undefined; onScroll?: React.UIEventHandler | undefined; onScrollCapture?: React.UIEventHandler | undefined; onWheel?: React.WheelEventHandler | undefined; onWheelCapture?: React.WheelEventHandler | undefined; onAnimationStart?: React.AnimationEventHandler | undefined; onAnimationStartCapture?: React.AnimationEventHandler | undefined; onAnimationEnd?: React.AnimationEventHandler | undefined; onAnimationEndCapture?: React.AnimationEventHandler | undefined; onAnimationIteration?: React.AnimationEventHandler | undefined; onAnimationIterationCapture?: React.AnimationEventHandler | undefined; onTransitionEnd?: React.TransitionEventHandler | undefined; onTransitionEndCapture?: React.TransitionEventHandler | undefined; 'data-test-subj'?: string | undefined; css?: ", + "{ id?: string | undefined; prefix?: string | undefined; scope?: string | undefined; defaultValue?: string | number | readonly string[] | undefined; name: React.ReactNode; security?: string | undefined; onChange?: React.FormEventHandler | undefined; defaultChecked?: boolean | undefined; suppressContentEditableWarning?: boolean | undefined; suppressHydrationWarning?: boolean | undefined; accessKey?: string | undefined; className?: string | undefined; contentEditable?: Booleanish | \"inherit\" | undefined; contextMenu?: string | undefined; dir?: string | undefined; draggable?: Booleanish | undefined; hidden?: boolean | undefined; lang?: string | undefined; placeholder?: string | undefined; slot?: string | undefined; spellCheck?: Booleanish | undefined; style?: React.CSSProperties | undefined; tabIndex?: number | undefined; title?: string | undefined; translate?: \"yes\" | \"no\" | undefined; radioGroup?: string | undefined; role?: React.AriaRole | undefined; about?: string | undefined; datatype?: string | undefined; inlist?: any; property?: string | undefined; resource?: string | undefined; typeof?: string | undefined; vocab?: string | undefined; autoCapitalize?: string | undefined; autoCorrect?: string | undefined; autoSave?: string | undefined; color?: string | undefined; itemProp?: string | undefined; itemScope?: boolean | undefined; itemType?: string | undefined; itemID?: string | undefined; itemRef?: string | undefined; results?: number | undefined; unselectable?: \"on\" | \"off\" | undefined; inputMode?: \"search\" | \"none\" | \"text\" | \"url\" | \"email\" | \"tel\" | \"numeric\" | \"decimal\" | undefined; is?: string | undefined; 'aria-activedescendant'?: string | undefined; 'aria-atomic'?: Booleanish | undefined; 'aria-autocomplete'?: \"none\" | \"list\" | \"both\" | \"inline\" | undefined; 'aria-busy'?: Booleanish | undefined; 'aria-checked'?: boolean | \"true\" | \"false\" | \"mixed\" | undefined; 'aria-colcount'?: number | undefined; 'aria-colindex'?: number | undefined; 'aria-colspan'?: number | undefined; 'aria-controls'?: string | undefined; 'aria-current'?: boolean | \"page\" | \"date\" | \"location\" | \"true\" | \"false\" | \"step\" | \"time\" | undefined; 'aria-describedby'?: string | undefined; 'aria-details'?: string | undefined; 'aria-disabled'?: Booleanish | undefined; 'aria-dropeffect'?: \"execute\" | \"link\" | \"none\" | \"copy\" | \"move\" | \"popup\" | undefined; 'aria-errormessage'?: string | undefined; 'aria-expanded'?: Booleanish | undefined; 'aria-flowto'?: string | undefined; 'aria-grabbed'?: Booleanish | undefined; 'aria-haspopup'?: boolean | \"true\" | \"false\" | \"grid\" | \"menu\" | \"dialog\" | \"listbox\" | \"tree\" | undefined; 'aria-hidden'?: Booleanish | undefined; 'aria-invalid'?: boolean | \"true\" | \"false\" | \"grammar\" | \"spelling\" | undefined; 'aria-keyshortcuts'?: string | undefined; 'aria-label'?: string | undefined; 'aria-labelledby'?: string | undefined; 'aria-level'?: number | undefined; 'aria-live'?: \"off\" | \"assertive\" | \"polite\" | undefined; 'aria-modal'?: Booleanish | undefined; 'aria-multiline'?: Booleanish | undefined; 'aria-multiselectable'?: Booleanish | undefined; 'aria-orientation'?: \"horizontal\" | \"vertical\" | undefined; 'aria-owns'?: string | undefined; 'aria-placeholder'?: string | undefined; 'aria-posinset'?: number | undefined; 'aria-pressed'?: boolean | \"true\" | \"false\" | \"mixed\" | undefined; 'aria-readonly'?: Booleanish | undefined; 'aria-relevant'?: \"text\" | \"all\" | \"additions\" | \"additions removals\" | \"additions text\" | \"removals\" | \"removals additions\" | \"removals text\" | \"text additions\" | \"text removals\" | undefined; 'aria-required'?: Booleanish | undefined; 'aria-roledescription'?: string | undefined; 'aria-rowcount'?: number | undefined; 'aria-rowindex'?: number | undefined; 'aria-rowspan'?: number | undefined; 'aria-selected'?: Booleanish | undefined; 'aria-setsize'?: number | undefined; 'aria-sort'?: \"none\" | \"other\" | \"ascending\" | \"descending\" | undefined; 'aria-valuemax'?: number | undefined; 'aria-valuemin'?: number | undefined; 'aria-valuenow'?: number | undefined; 'aria-valuetext'?: string | undefined; children?: React.ReactNode; dangerouslySetInnerHTML?: { __html: string; } | undefined; onCopy?: React.ClipboardEventHandler | undefined; onCopyCapture?: React.ClipboardEventHandler | undefined; onCut?: React.ClipboardEventHandler | undefined; onCutCapture?: React.ClipboardEventHandler | undefined; onPaste?: React.ClipboardEventHandler | undefined; onPasteCapture?: React.ClipboardEventHandler | undefined; onCompositionEnd?: React.CompositionEventHandler | undefined; onCompositionEndCapture?: React.CompositionEventHandler | undefined; onCompositionStart?: React.CompositionEventHandler | undefined; onCompositionStartCapture?: React.CompositionEventHandler | undefined; onCompositionUpdate?: React.CompositionEventHandler | undefined; onCompositionUpdateCapture?: React.CompositionEventHandler | undefined; onFocus?: React.FocusEventHandler | undefined; onFocusCapture?: React.FocusEventHandler | undefined; onBlur?: React.FocusEventHandler | undefined; onBlurCapture?: React.FocusEventHandler | undefined; onChangeCapture?: React.FormEventHandler | undefined; onBeforeInput?: React.FormEventHandler | undefined; onBeforeInputCapture?: React.FormEventHandler | undefined; onInput?: React.FormEventHandler | undefined; onInputCapture?: React.FormEventHandler | undefined; onReset?: React.FormEventHandler | undefined; onResetCapture?: React.FormEventHandler | undefined; onSubmit?: React.FormEventHandler | undefined; onSubmitCapture?: React.FormEventHandler | undefined; onInvalid?: React.FormEventHandler | undefined; onInvalidCapture?: React.FormEventHandler | undefined; onLoad?: React.ReactEventHandler | undefined; onLoadCapture?: React.ReactEventHandler | undefined; onError?: React.ReactEventHandler | undefined; onErrorCapture?: React.ReactEventHandler | undefined; onKeyDown?: React.KeyboardEventHandler | undefined; onKeyDownCapture?: React.KeyboardEventHandler | undefined; onKeyPress?: React.KeyboardEventHandler | undefined; onKeyPressCapture?: React.KeyboardEventHandler | undefined; onKeyUp?: React.KeyboardEventHandler | undefined; onKeyUpCapture?: React.KeyboardEventHandler | undefined; onAbort?: React.ReactEventHandler | undefined; onAbortCapture?: React.ReactEventHandler | undefined; onCanPlay?: React.ReactEventHandler | undefined; onCanPlayCapture?: React.ReactEventHandler | undefined; onCanPlayThrough?: React.ReactEventHandler | undefined; onCanPlayThroughCapture?: React.ReactEventHandler | undefined; onDurationChange?: React.ReactEventHandler | undefined; onDurationChangeCapture?: React.ReactEventHandler | undefined; onEmptied?: React.ReactEventHandler | undefined; onEmptiedCapture?: React.ReactEventHandler | undefined; onEncrypted?: React.ReactEventHandler | undefined; onEncryptedCapture?: React.ReactEventHandler | undefined; onEnded?: React.ReactEventHandler | undefined; onEndedCapture?: React.ReactEventHandler | undefined; onLoadedData?: React.ReactEventHandler | undefined; onLoadedDataCapture?: React.ReactEventHandler | undefined; onLoadedMetadata?: React.ReactEventHandler | undefined; onLoadedMetadataCapture?: React.ReactEventHandler | undefined; onLoadStart?: React.ReactEventHandler | undefined; onLoadStartCapture?: React.ReactEventHandler | undefined; onPause?: React.ReactEventHandler | undefined; onPauseCapture?: React.ReactEventHandler | undefined; onPlay?: React.ReactEventHandler | undefined; onPlayCapture?: React.ReactEventHandler | undefined; onPlaying?: React.ReactEventHandler | undefined; onPlayingCapture?: React.ReactEventHandler | undefined; onProgress?: React.ReactEventHandler | undefined; onProgressCapture?: React.ReactEventHandler | undefined; onRateChange?: React.ReactEventHandler | undefined; onRateChangeCapture?: React.ReactEventHandler | undefined; onSeeked?: React.ReactEventHandler | undefined; onSeekedCapture?: React.ReactEventHandler | undefined; onSeeking?: React.ReactEventHandler | undefined; onSeekingCapture?: React.ReactEventHandler | undefined; onStalled?: React.ReactEventHandler | undefined; onStalledCapture?: React.ReactEventHandler | undefined; onSuspend?: React.ReactEventHandler | undefined; onSuspendCapture?: React.ReactEventHandler | undefined; onTimeUpdate?: React.ReactEventHandler | undefined; onTimeUpdateCapture?: React.ReactEventHandler | undefined; onVolumeChange?: React.ReactEventHandler | undefined; onVolumeChangeCapture?: React.ReactEventHandler | undefined; onWaiting?: React.ReactEventHandler | undefined; onWaitingCapture?: React.ReactEventHandler | undefined; onAuxClick?: React.MouseEventHandler | undefined; onAuxClickCapture?: React.MouseEventHandler | undefined; onClick?: React.MouseEventHandler | undefined; onClickCapture?: React.MouseEventHandler | undefined; onContextMenu?: React.MouseEventHandler | undefined; onContextMenuCapture?: React.MouseEventHandler | undefined; onDoubleClick?: React.MouseEventHandler | undefined; onDoubleClickCapture?: React.MouseEventHandler | undefined; onDrag?: React.DragEventHandler | undefined; onDragCapture?: React.DragEventHandler | undefined; onDragEnd?: React.DragEventHandler | undefined; onDragEndCapture?: React.DragEventHandler | undefined; onDragEnter?: React.DragEventHandler | undefined; onDragEnterCapture?: React.DragEventHandler | undefined; onDragExit?: React.DragEventHandler | undefined; onDragExitCapture?: React.DragEventHandler | undefined; onDragLeave?: React.DragEventHandler | undefined; onDragLeaveCapture?: React.DragEventHandler | undefined; onDragOver?: React.DragEventHandler | undefined; onDragOverCapture?: React.DragEventHandler | undefined; onDragStart?: React.DragEventHandler | undefined; onDragStartCapture?: React.DragEventHandler | undefined; onDrop?: React.DragEventHandler | undefined; onDropCapture?: React.DragEventHandler | undefined; onMouseDown?: React.MouseEventHandler | undefined; onMouseDownCapture?: React.MouseEventHandler | undefined; onMouseEnter?: React.MouseEventHandler | undefined; onMouseLeave?: React.MouseEventHandler | undefined; onMouseMove?: React.MouseEventHandler | undefined; onMouseMoveCapture?: React.MouseEventHandler | undefined; onMouseOut?: React.MouseEventHandler | undefined; onMouseOutCapture?: React.MouseEventHandler | undefined; onMouseOver?: React.MouseEventHandler | undefined; onMouseOverCapture?: React.MouseEventHandler | undefined; onMouseUp?: React.MouseEventHandler | undefined; onMouseUpCapture?: React.MouseEventHandler | undefined; onSelect?: React.ReactEventHandler | undefined; onSelectCapture?: React.ReactEventHandler | undefined; onTouchCancel?: React.TouchEventHandler | undefined; onTouchCancelCapture?: React.TouchEventHandler | undefined; onTouchEnd?: React.TouchEventHandler | undefined; onTouchEndCapture?: React.TouchEventHandler | undefined; onTouchMove?: React.TouchEventHandler | undefined; onTouchMoveCapture?: React.TouchEventHandler | undefined; onTouchStart?: React.TouchEventHandler | undefined; onTouchStartCapture?: React.TouchEventHandler | undefined; onPointerDown?: React.PointerEventHandler | undefined; onPointerDownCapture?: React.PointerEventHandler | undefined; onPointerMove?: React.PointerEventHandler | undefined; onPointerMoveCapture?: React.PointerEventHandler | undefined; onPointerUp?: React.PointerEventHandler | undefined; onPointerUpCapture?: React.PointerEventHandler | undefined; onPointerCancel?: React.PointerEventHandler | undefined; onPointerCancelCapture?: React.PointerEventHandler | undefined; onPointerEnter?: React.PointerEventHandler | undefined; onPointerEnterCapture?: React.PointerEventHandler | undefined; onPointerLeave?: React.PointerEventHandler | undefined; onPointerLeaveCapture?: React.PointerEventHandler | undefined; onPointerOver?: React.PointerEventHandler | undefined; onPointerOverCapture?: React.PointerEventHandler | undefined; onPointerOut?: React.PointerEventHandler | undefined; onPointerOutCapture?: React.PointerEventHandler | undefined; onGotPointerCapture?: React.PointerEventHandler | undefined; onGotPointerCaptureCapture?: React.PointerEventHandler | undefined; onLostPointerCapture?: React.PointerEventHandler | undefined; onLostPointerCaptureCapture?: React.PointerEventHandler | undefined; onScroll?: React.UIEventHandler | undefined; onScrollCapture?: React.UIEventHandler | undefined; onWheel?: React.WheelEventHandler | undefined; onWheelCapture?: React.WheelEventHandler | undefined; onAnimationStart?: React.AnimationEventHandler | undefined; onAnimationStartCapture?: React.AnimationEventHandler | undefined; onAnimationEnd?: React.AnimationEventHandler | undefined; onAnimationEndCapture?: React.AnimationEventHandler | undefined; onAnimationIteration?: React.AnimationEventHandler | undefined; onAnimationIterationCapture?: React.AnimationEventHandler | undefined; onTransitionEnd?: React.TransitionEventHandler | undefined; onTransitionEndCapture?: React.TransitionEventHandler | undefined; 'data-test-subj'?: string | undefined; css?: ", "Interpolation", "<", "Theme", @@ -679,7 +679,7 @@ "label": "obj", "description": [], "signature": [ - "{ type: string; id: string; meta: { title?: string | undefined; icon?: string | undefined; }; managed?: boolean | undefined; overwrite?: boolean | undefined; }" + "{ id: string; type: string; meta: { title?: string | undefined; icon?: string | undefined; }; managed?: boolean | undefined; overwrite?: boolean | undefined; }" ], "path": "src/plugins/saved_objects_management/public/lib/process_import_response.ts", "deprecated": false, diff --git a/api_docs/saved_objects_management.mdx b/api_docs/saved_objects_management.mdx index 098a7509178b4..548af35695e72 100644 --- a/api_docs/saved_objects_management.mdx +++ b/api_docs/saved_objects_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsManagement title: "savedObjectsManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsManagement plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsManagement'] --- import savedObjectsManagementObj from './saved_objects_management.devdocs.json'; diff --git a/api_docs/saved_objects_tagging.mdx b/api_docs/saved_objects_tagging.mdx index 028fc14250805..6279a4fd9d063 100644 --- a/api_docs/saved_objects_tagging.mdx +++ b/api_docs/saved_objects_tagging.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsTagging title: "savedObjectsTagging" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsTagging plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsTagging'] --- import savedObjectsTaggingObj from './saved_objects_tagging.devdocs.json'; diff --git a/api_docs/saved_objects_tagging_oss.mdx b/api_docs/saved_objects_tagging_oss.mdx index 2ad6d6d4abe88..5150c019709e0 100644 --- a/api_docs/saved_objects_tagging_oss.mdx +++ b/api_docs/saved_objects_tagging_oss.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsTaggingOss title: "savedObjectsTaggingOss" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsTaggingOss plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsTaggingOss'] --- import savedObjectsTaggingOssObj from './saved_objects_tagging_oss.devdocs.json'; diff --git a/api_docs/saved_search.mdx b/api_docs/saved_search.mdx index 2e44db0998ca0..ddad3e784d2b6 100644 --- a/api_docs/saved_search.mdx +++ b/api_docs/saved_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedSearch title: "savedSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the savedSearch plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedSearch'] --- import savedSearchObj from './saved_search.devdocs.json'; diff --git a/api_docs/screenshot_mode.mdx b/api_docs/screenshot_mode.mdx index 852d7c95d5191..4bca6257ed2aa 100644 --- a/api_docs/screenshot_mode.mdx +++ b/api_docs/screenshot_mode.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/screenshotMode title: "screenshotMode" image: https://source.unsplash.com/400x175/?github description: API docs for the screenshotMode plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotMode'] --- import screenshotModeObj from './screenshot_mode.devdocs.json'; diff --git a/api_docs/screenshotting.mdx b/api_docs/screenshotting.mdx index f654e0c75eb84..a18b89e5e76e3 100644 --- a/api_docs/screenshotting.mdx +++ b/api_docs/screenshotting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/screenshotting title: "screenshotting" image: https://source.unsplash.com/400x175/?github description: API docs for the screenshotting plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotting'] --- import screenshottingObj from './screenshotting.devdocs.json'; diff --git a/api_docs/search_playground.devdocs.json b/api_docs/search_playground.devdocs.json new file mode 100644 index 0000000000000..ccbf3c593b016 --- /dev/null +++ b/api_docs/search_playground.devdocs.json @@ -0,0 +1,250 @@ +{ + "id": "searchPlayground", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [], + "setup": { + "parentPluginId": "searchPlayground", + "id": "def-public.SearchPlaygroundPluginSetup", + "type": "Interface", + "tags": [], + "label": "SearchPlaygroundPluginSetup", + "description": [], + "path": "x-pack/plugins/search_playground/public/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "lifecycle": "setup", + "initialIsOpen": true + }, + "start": { + "parentPluginId": "searchPlayground", + "id": "def-public.SearchPlaygroundPluginStart", + "type": "Interface", + "tags": [], + "label": "SearchPlaygroundPluginStart", + "description": [], + "path": "x-pack/plugins/search_playground/public/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "searchPlayground", + "id": "def-public.SearchPlaygroundPluginStart.PlaygroundProvider", + "type": "Function", + "tags": [], + "label": "PlaygroundProvider", + "description": [], + "signature": [ + "React.FunctionComponent<{ children?: React.ReactNode; }>" + ], + "path": "x-pack/plugins/search_playground/public/types.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "searchPlayground", + "id": "def-public.SearchPlaygroundPluginStart.PlaygroundProvider.$1", + "type": "CompoundType", + "tags": [], + "label": "props", + "description": [], + "signature": [ + "P & { children?: React.ReactNode; }" + ], + "path": "node_modules/@types/react/index.d.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "searchPlayground", + "id": "def-public.SearchPlaygroundPluginStart.PlaygroundProvider.$2", + "type": "Any", + "tags": [], + "label": "context", + "description": [], + "signature": [ + "any" + ], + "path": "node_modules/@types/react/index.d.ts", + "deprecated": false, + "trackAdoption": false + } + ] + }, + { + "parentPluginId": "searchPlayground", + "id": "def-public.SearchPlaygroundPluginStart.PlaygroundToolbar", + "type": "Function", + "tags": [], + "label": "PlaygroundToolbar", + "description": [], + "signature": [ + "React.FunctionComponent<{ children?: React.ReactNode; }>" + ], + "path": "x-pack/plugins/search_playground/public/types.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "searchPlayground", + "id": "def-public.SearchPlaygroundPluginStart.PlaygroundToolbar.$1", + "type": "CompoundType", + "tags": [], + "label": "props", + "description": [], + "signature": [ + "P & { children?: React.ReactNode; }" + ], + "path": "node_modules/@types/react/index.d.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "searchPlayground", + "id": "def-public.SearchPlaygroundPluginStart.PlaygroundToolbar.$2", + "type": "Any", + "tags": [], + "label": "context", + "description": [], + "signature": [ + "any" + ], + "path": "node_modules/@types/react/index.d.ts", + "deprecated": false, + "trackAdoption": false + } + ] + }, + { + "parentPluginId": "searchPlayground", + "id": "def-public.SearchPlaygroundPluginStart.Playground", + "type": "Function", + "tags": [], + "label": "Playground", + "description": [], + "signature": [ + "React.FunctionComponent<{ children?: React.ReactNode; }>" + ], + "path": "x-pack/plugins/search_playground/public/types.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "searchPlayground", + "id": "def-public.SearchPlaygroundPluginStart.Playground.$1", + "type": "CompoundType", + "tags": [], + "label": "props", + "description": [], + "signature": [ + "P & { children?: React.ReactNode; }" + ], + "path": "node_modules/@types/react/index.d.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "searchPlayground", + "id": "def-public.SearchPlaygroundPluginStart.Playground.$2", + "type": "Any", + "tags": [], + "label": "context", + "description": [], + "signature": [ + "any" + ], + "path": "node_modules/@types/react/index.d.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ], + "lifecycle": "start", + "initialIsOpen": true + } + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [], + "setup": { + "parentPluginId": "searchPlayground", + "id": "def-server.SearchPlaygroundPluginSetup", + "type": "Interface", + "tags": [], + "label": "SearchPlaygroundPluginSetup", + "description": [], + "path": "x-pack/plugins/search_playground/server/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "lifecycle": "setup", + "initialIsOpen": true + }, + "start": { + "parentPluginId": "searchPlayground", + "id": "def-server.SearchPlaygroundPluginStart", + "type": "Interface", + "tags": [], + "label": "SearchPlaygroundPluginStart", + "description": [], + "path": "x-pack/plugins/search_playground/server/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "lifecycle": "start", + "initialIsOpen": true + } + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [ + { + "parentPluginId": "searchPlayground", + "id": "def-common.PLUGIN_ID", + "type": "string", + "tags": [], + "label": "PLUGIN_ID", + "description": [], + "signature": [ + "\"searchPlayground\"" + ], + "path": "x-pack/plugins/search_playground/common/index.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "searchPlayground", + "id": "def-common.PLUGIN_NAME", + "type": "string", + "tags": [], + "label": "PLUGIN_NAME", + "description": [], + "signature": [ + "\"Playground\"" + ], + "path": "x-pack/plugins/search_playground/common/index.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/search_playground.mdx b/api_docs/search_playground.mdx new file mode 100644 index 0000000000000..23be952d2a03e --- /dev/null +++ b/api_docs/search_playground.mdx @@ -0,0 +1,46 @@ +--- +#### +#### This document is auto-generated and is meant to be viewed inside our experimental, new docs system. +#### Reach out in #docs-engineering for more info. +#### +id: kibSearchPlaygroundPluginApi +slug: /kibana-dev-docs/api/searchPlayground +title: "searchPlayground" +image: https://source.unsplash.com/400x175/?github +description: API docs for the searchPlayground plugin +date: 2024-03-25 +tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchPlayground'] +--- +import searchPlaygroundObj from './search_playground.devdocs.json'; + + + +Contact [@elastic/enterprise-search-frontend](https://github.com/orgs/elastic/teams/enterprise-search-frontend) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 15 | 0 | 9 | 0 | + +## Client + +### Setup + + +### Start + + +## Server + +### Setup + + +### Start + + +## Common + +### Consts, variables and types + + diff --git a/api_docs/security.devdocs.json b/api_docs/security.devdocs.json index 306ad992593d7..f9351c6c1088d 100644 --- a/api_docs/security.devdocs.json +++ b/api_docs/security.devdocs.json @@ -203,6 +203,38 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "security", + "id": "def-public.AuthorizationServiceSetup", + "type": "Interface", + "tags": [], + "label": "AuthorizationServiceSetup", + "description": [], + "path": "x-pack/packages/security/plugin_types_public/src/authorization/authorization_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "security", + "id": "def-public.AuthorizationServiceSetup.isRoleManagementEnabled", + "type": "Function", + "tags": [], + "label": "isRoleManagementEnabled", + "description": [ + "\nDetermines if role management is enabled." + ], + "signature": [ + "() => boolean | undefined" + ], + "path": "x-pack/packages/security/plugin_types_public/src/authorization/authorization_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + } + ], + "initialIsOpen": false + }, { "parentPluginId": "security", "id": "def-public.ChangePasswordProps", @@ -1015,6 +1047,29 @@ "deprecated": false, "trackAdoption": false, "initialIsOpen": false + }, + { + "parentPluginId": "security", + "id": "def-public.AuthorizationServiceStart", + "type": "Type", + "tags": [], + "label": "AuthorizationServiceStart", + "description": [ + "\nStart has the same contract as Setup for now." + ], + "signature": [ + { + "pluginId": "@kbn/security-plugin-types-public", + "scope": "public", + "docId": "kibKbnSecurityPluginTypesPublicPluginApi", + "section": "def-public.AuthorizationServiceSetup", + "text": "AuthorizationServiceSetup" + } + ], + "path": "x-pack/packages/security/plugin_types_public/src/authorization/authorization_service.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false } ], "objects": [], @@ -1125,6 +1180,28 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "security", + "id": "def-public.SecurityPluginSetup.authz", + "type": "Object", + "tags": [], + "label": "authz", + "description": [ + "\nExposes authorization configuration." + ], + "signature": [ + { + "pluginId": "@kbn/security-plugin-types-public", + "scope": "public", + "docId": "kibKbnSecurityPluginTypesPublicPluginApi", + "section": "def-public.AuthorizationServiceSetup", + "text": "AuthorizationServiceSetup" + } + ], + "path": "x-pack/packages/security/plugin_types_public/src/plugin.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "security", "id": "def-public.SecurityPluginSetup.license", diff --git a/api_docs/security.mdx b/api_docs/security.mdx index e24fa469c794a..58909c87cf943 100644 --- a/api_docs/security.mdx +++ b/api_docs/security.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/security title: "security" image: https://source.unsplash.com/400x175/?github description: API docs for the security plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'security'] --- import securityObj from './security.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana- | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 404 | 0 | 198 | 2 | +| 408 | 0 | 199 | 2 | ## Client diff --git a/api_docs/security_solution.devdocs.json b/api_docs/security_solution.devdocs.json index 406683af7fc70..ae23e6568aaab 100644 --- a/api_docs/security_solution.devdocs.json +++ b/api_docs/security_solution.devdocs.json @@ -473,7 +473,7 @@ "label": "data", "description": [], "signature": [ - "({ type: \"eql\"; id: string; name: string; actions: { id: string; params: {} & { [k: string]: unknown; }; group: string; action_type_id: string; uuid?: string | undefined; alerts_filter?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; frequency?: { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; } | undefined; }[]; tags: string[]; setup: string; enabled: boolean; revision: number; query: string; version: number; references: string[]; interval: string; description: string; risk_score: number; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; from: string; to: string; language: \"eql\"; created_at: string; created_by: string; updated_at: string; updated_by: string; author: string[]; immutable: boolean; rule_id: string; threat: { framework: string; tactic: { id: string; name: string; reference: string; }; technique?: { id: string; name: string; reference: string; subtechnique?: { id: string; name: string; reference: string; }[] | undefined; }[] | undefined; }[]; risk_score_mapping: { value: string; field: string; operator: \"equals\"; risk_score?: number | undefined; }[]; severity_mapping: { value: string; field: string; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; operator: \"equals\"; }[]; exceptions_list: { type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; id: string; list_id: string; namespace_type: \"single\" | \"agnostic\"; }[]; false_positives: string[]; max_signals: number; related_integrations: { version: string; package: string; integration?: string | undefined; }[]; required_fields: { type: string; name: string; ecs: boolean; }[]; license?: string | undefined; throttle?: string | undefined; outcome?: \"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined; alias_target_id?: string | undefined; alias_purpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; meta?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; namespace?: string | undefined; note?: string | undefined; rule_name_override?: string | undefined; timestamp_override?: string | undefined; timestamp_override_fallback_disabled?: boolean | undefined; timeline_id?: string | undefined; timeline_title?: string | undefined; building_block_type?: string | undefined; output_index?: string | undefined; investigation_fields?: { field_names: string[]; } | undefined; execution_summary?: { last_execution: { message: string; date: string; status: \"running\" | \"succeeded\" | \"failed\" | \"going to run\" | \"partial failure\"; metrics: { total_search_duration_ms?: number | undefined; total_indexing_duration_ms?: number | undefined; total_enrichment_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; }; status_order: number; }; } | undefined; index?: string[] | undefined; data_view_id?: string | undefined; filters?: unknown[] | undefined; event_category_override?: string | undefined; tiebreaker_field?: string | undefined; timestamp_field?: string | undefined; } | { type: \"query\"; id: string; name: string; actions: { id: string; params: {} & { [k: string]: unknown; }; group: string; action_type_id: string; uuid?: string | undefined; alerts_filter?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; frequency?: { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; } | undefined; }[]; tags: string[]; setup: string; enabled: boolean; revision: number; query: string; version: number; references: string[]; interval: string; description: string; risk_score: number; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; from: string; to: string; language: \"kuery\" | \"lucene\"; created_at: string; created_by: string; updated_at: string; updated_by: string; author: string[]; immutable: boolean; rule_id: string; threat: { framework: string; tactic: { id: string; name: string; reference: string; }; technique?: { id: string; name: string; reference: string; subtechnique?: { id: string; name: string; reference: string; }[] | undefined; }[] | undefined; }[]; risk_score_mapping: { value: string; field: string; operator: \"equals\"; risk_score?: number | undefined; }[]; severity_mapping: { value: string; field: string; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; operator: \"equals\"; }[]; exceptions_list: { type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; id: string; list_id: string; namespace_type: \"single\" | \"agnostic\"; }[]; false_positives: string[]; max_signals: number; related_integrations: { version: string; package: string; integration?: string | undefined; }[]; required_fields: { type: string; name: string; ecs: boolean; }[]; license?: string | undefined; throttle?: string | undefined; outcome?: \"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined; alias_target_id?: string | undefined; alias_purpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; meta?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; namespace?: string | undefined; note?: string | undefined; rule_name_override?: string | undefined; timestamp_override?: string | undefined; timestamp_override_fallback_disabled?: boolean | undefined; timeline_id?: string | undefined; timeline_title?: string | undefined; building_block_type?: string | undefined; output_index?: string | undefined; investigation_fields?: { field_names: string[]; } | undefined; execution_summary?: { last_execution: { message: string; date: string; status: \"running\" | \"succeeded\" | \"failed\" | \"going to run\" | \"partial failure\"; metrics: { total_search_duration_ms?: number | undefined; total_indexing_duration_ms?: number | undefined; total_enrichment_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; }; status_order: number; }; } | undefined; index?: string[] | undefined; filters?: unknown[] | undefined; data_view_id?: string | undefined; saved_id?: string | undefined; response_actions?: ({ params: { query?: string | undefined; ecs_mapping?: Zod.objectOutputType<{}, Zod.ZodObject<{ field: Zod.ZodOptional; value: Zod.ZodOptional]>>; }, \"strip\", Zod.ZodTypeAny, { field?: string | undefined; value?: string | string[] | undefined; }, { field?: string | undefined; value?: string | string[] | undefined; }>, \"strip\"> | undefined; queries?: { id: string; query: string; ecs_mapping?: Zod.objectOutputType<{}, Zod.ZodObject<{ field: Zod.ZodOptional; value: Zod.ZodOptional]>>; }, \"strip\", Zod.ZodTypeAny, { field?: string | undefined; value?: string | string[] | undefined; }, { field?: string | undefined; value?: string | string[] | undefined; }>, \"strip\"> | undefined; version?: string | undefined; platform?: string | undefined; removed?: boolean | undefined; snapshot?: boolean | undefined; }[] | undefined; pack_id?: string | undefined; saved_query_id?: string | undefined; timeout?: number | undefined; }; action_type_id: \".osquery\"; } | { params: { command: \"isolate\"; comment?: string | undefined; } | { config: { field: string; overwrite: boolean; }; command: \"kill-process\" | \"suspend-process\"; comment?: string | undefined; }; action_type_id: \".endpoint\"; })[] | undefined; alert_suppression?: { group_by: string[]; duration?: { value: number; unit: \"m\" | \"h\" | \"s\"; } | undefined; missing_fields_strategy?: \"doNotSuppress\" | \"suppress\" | undefined; } | undefined; } | { type: \"saved_query\"; id: string; name: string; actions: { id: string; params: {} & { [k: string]: unknown; }; group: string; action_type_id: string; uuid?: string | undefined; alerts_filter?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; frequency?: { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; } | undefined; }[]; tags: string[]; setup: string; enabled: boolean; revision: number; version: number; references: string[]; interval: string; description: string; risk_score: number; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; from: string; to: string; language: \"kuery\" | \"lucene\"; created_at: string; created_by: string; updated_at: string; updated_by: string; author: string[]; immutable: boolean; rule_id: string; threat: { framework: string; tactic: { id: string; name: string; reference: string; }; technique?: { id: string; name: string; reference: string; subtechnique?: { id: string; name: string; reference: string; }[] | undefined; }[] | undefined; }[]; risk_score_mapping: { value: string; field: string; operator: \"equals\"; risk_score?: number | undefined; }[]; severity_mapping: { value: string; field: string; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; operator: \"equals\"; }[]; exceptions_list: { type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; id: string; list_id: string; namespace_type: \"single\" | \"agnostic\"; }[]; false_positives: string[]; max_signals: number; related_integrations: { version: string; package: string; integration?: string | undefined; }[]; required_fields: { type: string; name: string; ecs: boolean; }[]; saved_id: string; license?: string | undefined; throttle?: string | undefined; outcome?: \"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined; alias_target_id?: string | undefined; alias_purpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; meta?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; namespace?: string | undefined; note?: string | undefined; rule_name_override?: string | undefined; timestamp_override?: string | undefined; timestamp_override_fallback_disabled?: boolean | undefined; timeline_id?: string | undefined; timeline_title?: string | undefined; building_block_type?: string | undefined; output_index?: string | undefined; investigation_fields?: { field_names: string[]; } | undefined; execution_summary?: { last_execution: { message: string; date: string; status: \"running\" | \"succeeded\" | \"failed\" | \"going to run\" | \"partial failure\"; metrics: { total_search_duration_ms?: number | undefined; total_indexing_duration_ms?: number | undefined; total_enrichment_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; }; status_order: number; }; } | undefined; index?: string[] | undefined; query?: string | undefined; filters?: unknown[] | undefined; data_view_id?: string | undefined; response_actions?: ({ params: { query?: string | undefined; ecs_mapping?: Zod.objectOutputType<{}, Zod.ZodObject<{ field: Zod.ZodOptional; value: Zod.ZodOptional]>>; }, \"strip\", Zod.ZodTypeAny, { field?: string | undefined; value?: string | string[] | undefined; }, { field?: string | undefined; value?: string | string[] | undefined; }>, \"strip\"> | undefined; queries?: { id: string; query: string; ecs_mapping?: Zod.objectOutputType<{}, Zod.ZodObject<{ field: Zod.ZodOptional; value: Zod.ZodOptional]>>; }, \"strip\", Zod.ZodTypeAny, { field?: string | undefined; value?: string | string[] | undefined; }, { field?: string | undefined; value?: string | string[] | undefined; }>, \"strip\"> | undefined; version?: string | undefined; platform?: string | undefined; removed?: boolean | undefined; snapshot?: boolean | undefined; }[] | undefined; pack_id?: string | undefined; saved_query_id?: string | undefined; timeout?: number | undefined; }; action_type_id: \".osquery\"; } | { params: { command: \"isolate\"; comment?: string | undefined; } | { config: { field: string; overwrite: boolean; }; command: \"kill-process\" | \"suspend-process\"; comment?: string | undefined; }; action_type_id: \".endpoint\"; })[] | undefined; alert_suppression?: { group_by: string[]; duration?: { value: number; unit: \"m\" | \"h\" | \"s\"; } | undefined; missing_fields_strategy?: \"doNotSuppress\" | \"suppress\" | undefined; } | undefined; } | { type: \"threshold\"; id: string; name: string; actions: { id: string; params: {} & { [k: string]: unknown; }; group: string; action_type_id: string; uuid?: string | undefined; alerts_filter?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; frequency?: { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; } | undefined; }[]; tags: string[]; setup: string; enabled: boolean; revision: number; query: string; version: number; references: string[]; interval: string; description: string; risk_score: number; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; from: string; to: string; language: \"kuery\" | \"lucene\"; created_at: string; created_by: string; updated_at: string; updated_by: string; author: string[]; immutable: boolean; rule_id: string; threat: { framework: string; tactic: { id: string; name: string; reference: string; }; technique?: { id: string; name: string; reference: string; subtechnique?: { id: string; name: string; reference: string; }[] | undefined; }[] | undefined; }[]; risk_score_mapping: { value: string; field: string; operator: \"equals\"; risk_score?: number | undefined; }[]; severity_mapping: { value: string; field: string; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; operator: \"equals\"; }[]; exceptions_list: { type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; id: string; list_id: string; namespace_type: \"single\" | \"agnostic\"; }[]; false_positives: string[]; max_signals: number; related_integrations: { version: string; package: string; integration?: string | undefined; }[]; required_fields: { type: string; name: string; ecs: boolean; }[]; threshold: { value: number; field: (string | string[]) & (string | string[] | undefined); cardinality?: { value: number; field: string; }[] | undefined; }; license?: string | undefined; throttle?: string | undefined; outcome?: \"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined; alias_target_id?: string | undefined; alias_purpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; meta?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; namespace?: string | undefined; note?: string | undefined; rule_name_override?: string | undefined; timestamp_override?: string | undefined; timestamp_override_fallback_disabled?: boolean | undefined; timeline_id?: string | undefined; timeline_title?: string | undefined; building_block_type?: string | undefined; output_index?: string | undefined; investigation_fields?: { field_names: string[]; } | undefined; execution_summary?: { last_execution: { message: string; date: string; status: \"running\" | \"succeeded\" | \"failed\" | \"going to run\" | \"partial failure\"; metrics: { total_search_duration_ms?: number | undefined; total_indexing_duration_ms?: number | undefined; total_enrichment_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; }; status_order: number; }; } | undefined; index?: string[] | undefined; filters?: unknown[] | undefined; data_view_id?: string | undefined; saved_id?: string | undefined; alert_suppression?: { duration: { value: number; unit: \"m\" | \"h\" | \"s\"; }; } | undefined; } | { type: \"threat_match\"; id: string; name: string; actions: { id: string; params: {} & { [k: string]: unknown; }; group: string; action_type_id: string; uuid?: string | undefined; alerts_filter?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; frequency?: { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; } | undefined; }[]; tags: string[]; setup: string; enabled: boolean; revision: number; query: string; version: number; references: string[]; interval: string; description: string; risk_score: number; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; from: string; to: string; language: \"kuery\" | \"lucene\"; created_at: string; created_by: string; updated_at: string; updated_by: string; author: string[]; immutable: boolean; rule_id: string; threat: { framework: string; tactic: { id: string; name: string; reference: string; }; technique?: { id: string; name: string; reference: string; subtechnique?: { id: string; name: string; reference: string; }[] | undefined; }[] | undefined; }[]; risk_score_mapping: { value: string; field: string; operator: \"equals\"; risk_score?: number | undefined; }[]; severity_mapping: { value: string; field: string; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; operator: \"equals\"; }[]; exceptions_list: { type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; id: string; list_id: string; namespace_type: \"single\" | \"agnostic\"; }[]; false_positives: string[]; max_signals: number; related_integrations: { version: string; package: string; integration?: string | undefined; }[]; required_fields: { type: string; name: string; ecs: boolean; }[]; threat_query: string; threat_mapping: { entries: { type: \"mapping\"; value: string; field: string; }[]; }[]; threat_index: string[]; license?: string | undefined; throttle?: string | undefined; outcome?: \"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined; alias_target_id?: string | undefined; alias_purpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; meta?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; namespace?: string | undefined; note?: string | undefined; rule_name_override?: string | undefined; timestamp_override?: string | undefined; timestamp_override_fallback_disabled?: boolean | undefined; timeline_id?: string | undefined; timeline_title?: string | undefined; building_block_type?: string | undefined; output_index?: string | undefined; investigation_fields?: { field_names: string[]; } | undefined; execution_summary?: { last_execution: { message: string; date: string; status: \"running\" | \"succeeded\" | \"failed\" | \"going to run\" | \"partial failure\"; metrics: { total_search_duration_ms?: number | undefined; total_indexing_duration_ms?: number | undefined; total_enrichment_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; }; status_order: number; }; } | undefined; index?: string[] | undefined; filters?: unknown[] | undefined; data_view_id?: string | undefined; saved_id?: string | undefined; alert_suppression?: { group_by: string[]; duration?: { value: number; unit: \"m\" | \"h\" | \"s\"; } | undefined; missing_fields_strategy?: \"doNotSuppress\" | \"suppress\" | undefined; } | undefined; threat_filters?: unknown[] | undefined; threat_indicator_path?: string | undefined; threat_language?: \"lucene\" | \"kuery\" | undefined; concurrent_searches?: number | undefined; items_per_search?: number | undefined; } | { type: \"machine_learning\"; id: string; name: string; actions: { id: string; params: {} & { [k: string]: unknown; }; group: string; action_type_id: string; uuid?: string | undefined; alerts_filter?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; frequency?: { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; } | undefined; }[]; tags: string[]; setup: string; enabled: boolean; revision: number; version: number; references: string[]; interval: string; description: string; risk_score: number; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; from: string; to: string; created_at: string; created_by: string; updated_at: string; updated_by: string; author: string[]; immutable: boolean; rule_id: string; threat: { framework: string; tactic: { id: string; name: string; reference: string; }; technique?: { id: string; name: string; reference: string; subtechnique?: { id: string; name: string; reference: string; }[] | undefined; }[] | undefined; }[]; risk_score_mapping: { value: string; field: string; operator: \"equals\"; risk_score?: number | undefined; }[]; severity_mapping: { value: string; field: string; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; operator: \"equals\"; }[]; exceptions_list: { type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; id: string; list_id: string; namespace_type: \"single\" | \"agnostic\"; }[]; false_positives: string[]; max_signals: number; related_integrations: { version: string; package: string; integration?: string | undefined; }[]; required_fields: { type: string; name: string; ecs: boolean; }[]; anomaly_threshold: number; machine_learning_job_id: (string | string[]) & (string | string[] | undefined); license?: string | undefined; throttle?: string | undefined; outcome?: \"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined; alias_target_id?: string | undefined; alias_purpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; meta?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; namespace?: string | undefined; note?: string | undefined; rule_name_override?: string | undefined; timestamp_override?: string | undefined; timestamp_override_fallback_disabled?: boolean | undefined; timeline_id?: string | undefined; timeline_title?: string | undefined; building_block_type?: string | undefined; output_index?: string | undefined; investigation_fields?: { field_names: string[]; } | undefined; execution_summary?: { last_execution: { message: string; date: string; status: \"running\" | \"succeeded\" | \"failed\" | \"going to run\" | \"partial failure\"; metrics: { total_search_duration_ms?: number | undefined; total_indexing_duration_ms?: number | undefined; total_enrichment_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; }; status_order: number; }; } | undefined; } | { type: \"new_terms\"; id: string; name: string; actions: { id: string; params: {} & { [k: string]: unknown; }; group: string; action_type_id: string; uuid?: string | undefined; alerts_filter?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; frequency?: { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; } | undefined; }[]; tags: string[]; setup: string; enabled: boolean; revision: number; query: string; version: number; references: string[]; interval: string; description: string; risk_score: number; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; from: string; to: string; language: \"kuery\" | \"lucene\"; created_at: string; created_by: string; updated_at: string; updated_by: string; author: string[]; immutable: boolean; rule_id: string; threat: { framework: string; tactic: { id: string; name: string; reference: string; }; technique?: { id: string; name: string; reference: string; subtechnique?: { id: string; name: string; reference: string; }[] | undefined; }[] | undefined; }[]; risk_score_mapping: { value: string; field: string; operator: \"equals\"; risk_score?: number | undefined; }[]; severity_mapping: { value: string; field: string; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; operator: \"equals\"; }[]; exceptions_list: { type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; id: string; list_id: string; namespace_type: \"single\" | \"agnostic\"; }[]; false_positives: string[]; max_signals: number; related_integrations: { version: string; package: string; integration?: string | undefined; }[]; required_fields: { type: string; name: string; ecs: boolean; }[]; new_terms_fields: string[]; history_window_start: string; license?: string | undefined; throttle?: string | undefined; outcome?: \"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined; alias_target_id?: string | undefined; alias_purpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; meta?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; namespace?: string | undefined; note?: string | undefined; rule_name_override?: string | undefined; timestamp_override?: string | undefined; timestamp_override_fallback_disabled?: boolean | undefined; timeline_id?: string | undefined; timeline_title?: string | undefined; building_block_type?: string | undefined; output_index?: string | undefined; investigation_fields?: { field_names: string[]; } | undefined; execution_summary?: { last_execution: { message: string; date: string; status: \"running\" | \"succeeded\" | \"failed\" | \"going to run\" | \"partial failure\"; metrics: { total_search_duration_ms?: number | undefined; total_indexing_duration_ms?: number | undefined; total_enrichment_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; }; status_order: number; }; } | undefined; index?: string[] | undefined; filters?: unknown[] | undefined; data_view_id?: string | undefined; } | { type: \"esql\"; id: string; name: string; actions: { id: string; params: {} & { [k: string]: unknown; }; group: string; action_type_id: string; uuid?: string | undefined; alerts_filter?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; frequency?: { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; } | undefined; }[]; tags: string[]; setup: string; enabled: boolean; revision: number; query: string; version: number; references: string[]; interval: string; description: string; risk_score: number; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; from: string; to: string; language: \"esql\"; created_at: string; created_by: string; updated_at: string; updated_by: string; author: string[]; immutable: boolean; rule_id: string; threat: { framework: string; tactic: { id: string; name: string; reference: string; }; technique?: { id: string; name: string; reference: string; subtechnique?: { id: string; name: string; reference: string; }[] | undefined; }[] | undefined; }[]; risk_score_mapping: { value: string; field: string; operator: \"equals\"; risk_score?: number | undefined; }[]; severity_mapping: { value: string; field: string; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; operator: \"equals\"; }[]; exceptions_list: { type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; id: string; list_id: string; namespace_type: \"single\" | \"agnostic\"; }[]; false_positives: string[]; max_signals: number; related_integrations: { version: string; package: string; integration?: string | undefined; }[]; required_fields: { type: string; name: string; ecs: boolean; }[]; license?: string | undefined; throttle?: string | undefined; outcome?: \"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined; alias_target_id?: string | undefined; alias_purpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; meta?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; namespace?: string | undefined; note?: string | undefined; rule_name_override?: string | undefined; timestamp_override?: string | undefined; timestamp_override_fallback_disabled?: boolean | undefined; timeline_id?: string | undefined; timeline_title?: string | undefined; building_block_type?: string | undefined; output_index?: string | undefined; investigation_fields?: { field_names: string[]; } | undefined; execution_summary?: { last_execution: { message: string; date: string; status: \"running\" | \"succeeded\" | \"failed\" | \"going to run\" | \"partial failure\"; metrics: { total_search_duration_ms?: number | undefined; total_indexing_duration_ms?: number | undefined; total_enrichment_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; }; status_order: number; }; } | undefined; })[]" + "({ id: string; type: \"eql\"; name: string; actions: { params: {} & { [k: string]: unknown; }; id: string; group: string; action_type_id: string; uuid?: string | undefined; alerts_filter?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; frequency?: { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; } | undefined; }[]; tags: string[]; setup: string; enabled: boolean; revision: number; query: string; version: number; references: string[]; interval: string; description: string; risk_score: number; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; from: string; to: string; language: \"eql\"; created_at: string; created_by: string; updated_at: string; updated_by: string; author: string[]; immutable: boolean; rule_id: string; threat: { framework: string; tactic: { id: string; name: string; reference: string; }; technique?: { id: string; name: string; reference: string; subtechnique?: { id: string; name: string; reference: string; }[] | undefined; }[] | undefined; }[]; risk_score_mapping: { value: string; field: string; operator: \"equals\"; risk_score?: number | undefined; }[]; severity_mapping: { value: string; field: string; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; operator: \"equals\"; }[]; exceptions_list: { id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; list_id: string; namespace_type: \"single\" | \"agnostic\"; }[]; false_positives: string[]; max_signals: number; related_integrations: { version: string; package: string; integration?: string | undefined; }[]; required_fields: { type: string; name: string; ecs: boolean; }[]; namespace?: string | undefined; license?: string | undefined; throttle?: string | undefined; outcome?: \"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined; alias_target_id?: string | undefined; alias_purpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; meta?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; note?: string | undefined; rule_name_override?: string | undefined; timestamp_override?: string | undefined; timestamp_override_fallback_disabled?: boolean | undefined; timeline_id?: string | undefined; timeline_title?: string | undefined; building_block_type?: string | undefined; output_index?: string | undefined; investigation_fields?: { field_names: string[]; } | undefined; execution_summary?: { last_execution: { message: string; date: string; status: \"running\" | \"succeeded\" | \"failed\" | \"going to run\" | \"partial failure\"; metrics: { total_search_duration_ms?: number | undefined; total_indexing_duration_ms?: number | undefined; total_enrichment_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; }; status_order: number; }; } | undefined; index?: string[] | undefined; data_view_id?: string | undefined; filters?: unknown[] | undefined; event_category_override?: string | undefined; tiebreaker_field?: string | undefined; timestamp_field?: string | undefined; } | { id: string; type: \"query\"; name: string; actions: { params: {} & { [k: string]: unknown; }; id: string; group: string; action_type_id: string; uuid?: string | undefined; alerts_filter?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; frequency?: { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; } | undefined; }[]; tags: string[]; setup: string; enabled: boolean; revision: number; query: string; version: number; references: string[]; interval: string; description: string; risk_score: number; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; from: string; to: string; language: \"kuery\" | \"lucene\"; created_at: string; created_by: string; updated_at: string; updated_by: string; author: string[]; immutable: boolean; rule_id: string; threat: { framework: string; tactic: { id: string; name: string; reference: string; }; technique?: { id: string; name: string; reference: string; subtechnique?: { id: string; name: string; reference: string; }[] | undefined; }[] | undefined; }[]; risk_score_mapping: { value: string; field: string; operator: \"equals\"; risk_score?: number | undefined; }[]; severity_mapping: { value: string; field: string; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; operator: \"equals\"; }[]; exceptions_list: { id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; list_id: string; namespace_type: \"single\" | \"agnostic\"; }[]; false_positives: string[]; max_signals: number; related_integrations: { version: string; package: string; integration?: string | undefined; }[]; required_fields: { type: string; name: string; ecs: boolean; }[]; namespace?: string | undefined; license?: string | undefined; throttle?: string | undefined; outcome?: \"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined; alias_target_id?: string | undefined; alias_purpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; meta?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; note?: string | undefined; rule_name_override?: string | undefined; timestamp_override?: string | undefined; timestamp_override_fallback_disabled?: boolean | undefined; timeline_id?: string | undefined; timeline_title?: string | undefined; building_block_type?: string | undefined; output_index?: string | undefined; investigation_fields?: { field_names: string[]; } | undefined; execution_summary?: { last_execution: { message: string; date: string; status: \"running\" | \"succeeded\" | \"failed\" | \"going to run\" | \"partial failure\"; metrics: { total_search_duration_ms?: number | undefined; total_indexing_duration_ms?: number | undefined; total_enrichment_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; }; status_order: number; }; } | undefined; index?: string[] | undefined; filters?: unknown[] | undefined; data_view_id?: string | undefined; saved_id?: string | undefined; response_actions?: ({ params: { query?: string | undefined; ecs_mapping?: Zod.objectOutputType<{}, Zod.ZodObject<{ field: Zod.ZodOptional; value: Zod.ZodOptional]>>; }, \"strip\", Zod.ZodTypeAny, { field?: string | undefined; value?: string | string[] | undefined; }, { field?: string | undefined; value?: string | string[] | undefined; }>, \"strip\"> | undefined; queries?: { id: string; query: string; ecs_mapping?: Zod.objectOutputType<{}, Zod.ZodObject<{ field: Zod.ZodOptional; value: Zod.ZodOptional]>>; }, \"strip\", Zod.ZodTypeAny, { field?: string | undefined; value?: string | string[] | undefined; }, { field?: string | undefined; value?: string | string[] | undefined; }>, \"strip\"> | undefined; version?: string | undefined; platform?: string | undefined; removed?: boolean | undefined; snapshot?: boolean | undefined; }[] | undefined; pack_id?: string | undefined; saved_query_id?: string | undefined; timeout?: number | undefined; }; action_type_id: \".osquery\"; } | { params: { command: \"isolate\"; comment?: string | undefined; } | { config: { field: string; overwrite: boolean; }; command: \"kill-process\" | \"suspend-process\"; comment?: string | undefined; }; action_type_id: \".endpoint\"; })[] | undefined; alert_suppression?: { group_by: string[]; duration?: { value: number; unit: \"m\" | \"h\" | \"s\"; } | undefined; missing_fields_strategy?: \"doNotSuppress\" | \"suppress\" | undefined; } | undefined; } | { id: string; type: \"saved_query\"; name: string; actions: { params: {} & { [k: string]: unknown; }; id: string; group: string; action_type_id: string; uuid?: string | undefined; alerts_filter?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; frequency?: { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; } | undefined; }[]; tags: string[]; setup: string; enabled: boolean; revision: number; version: number; references: string[]; interval: string; description: string; risk_score: number; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; from: string; to: string; language: \"kuery\" | \"lucene\"; created_at: string; created_by: string; updated_at: string; updated_by: string; author: string[]; immutable: boolean; rule_id: string; threat: { framework: string; tactic: { id: string; name: string; reference: string; }; technique?: { id: string; name: string; reference: string; subtechnique?: { id: string; name: string; reference: string; }[] | undefined; }[] | undefined; }[]; risk_score_mapping: { value: string; field: string; operator: \"equals\"; risk_score?: number | undefined; }[]; severity_mapping: { value: string; field: string; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; operator: \"equals\"; }[]; exceptions_list: { id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; list_id: string; namespace_type: \"single\" | \"agnostic\"; }[]; false_positives: string[]; max_signals: number; related_integrations: { version: string; package: string; integration?: string | undefined; }[]; required_fields: { type: string; name: string; ecs: boolean; }[]; saved_id: string; namespace?: string | undefined; license?: string | undefined; throttle?: string | undefined; outcome?: \"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined; alias_target_id?: string | undefined; alias_purpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; meta?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; note?: string | undefined; rule_name_override?: string | undefined; timestamp_override?: string | undefined; timestamp_override_fallback_disabled?: boolean | undefined; timeline_id?: string | undefined; timeline_title?: string | undefined; building_block_type?: string | undefined; output_index?: string | undefined; investigation_fields?: { field_names: string[]; } | undefined; execution_summary?: { last_execution: { message: string; date: string; status: \"running\" | \"succeeded\" | \"failed\" | \"going to run\" | \"partial failure\"; metrics: { total_search_duration_ms?: number | undefined; total_indexing_duration_ms?: number | undefined; total_enrichment_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; }; status_order: number; }; } | undefined; index?: string[] | undefined; query?: string | undefined; filters?: unknown[] | undefined; data_view_id?: string | undefined; response_actions?: ({ params: { query?: string | undefined; ecs_mapping?: Zod.objectOutputType<{}, Zod.ZodObject<{ field: Zod.ZodOptional; value: Zod.ZodOptional]>>; }, \"strip\", Zod.ZodTypeAny, { field?: string | undefined; value?: string | string[] | undefined; }, { field?: string | undefined; value?: string | string[] | undefined; }>, \"strip\"> | undefined; queries?: { id: string; query: string; ecs_mapping?: Zod.objectOutputType<{}, Zod.ZodObject<{ field: Zod.ZodOptional; value: Zod.ZodOptional]>>; }, \"strip\", Zod.ZodTypeAny, { field?: string | undefined; value?: string | string[] | undefined; }, { field?: string | undefined; value?: string | string[] | undefined; }>, \"strip\"> | undefined; version?: string | undefined; platform?: string | undefined; removed?: boolean | undefined; snapshot?: boolean | undefined; }[] | undefined; pack_id?: string | undefined; saved_query_id?: string | undefined; timeout?: number | undefined; }; action_type_id: \".osquery\"; } | { params: { command: \"isolate\"; comment?: string | undefined; } | { config: { field: string; overwrite: boolean; }; command: \"kill-process\" | \"suspend-process\"; comment?: string | undefined; }; action_type_id: \".endpoint\"; })[] | undefined; alert_suppression?: { group_by: string[]; duration?: { value: number; unit: \"m\" | \"h\" | \"s\"; } | undefined; missing_fields_strategy?: \"doNotSuppress\" | \"suppress\" | undefined; } | undefined; } | { id: string; type: \"threshold\"; name: string; actions: { params: {} & { [k: string]: unknown; }; id: string; group: string; action_type_id: string; uuid?: string | undefined; alerts_filter?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; frequency?: { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; } | undefined; }[]; tags: string[]; setup: string; enabled: boolean; revision: number; query: string; version: number; references: string[]; interval: string; description: string; risk_score: number; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; from: string; to: string; language: \"kuery\" | \"lucene\"; created_at: string; created_by: string; updated_at: string; updated_by: string; author: string[]; immutable: boolean; rule_id: string; threat: { framework: string; tactic: { id: string; name: string; reference: string; }; technique?: { id: string; name: string; reference: string; subtechnique?: { id: string; name: string; reference: string; }[] | undefined; }[] | undefined; }[]; risk_score_mapping: { value: string; field: string; operator: \"equals\"; risk_score?: number | undefined; }[]; severity_mapping: { value: string; field: string; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; operator: \"equals\"; }[]; exceptions_list: { id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; list_id: string; namespace_type: \"single\" | \"agnostic\"; }[]; false_positives: string[]; max_signals: number; related_integrations: { version: string; package: string; integration?: string | undefined; }[]; required_fields: { type: string; name: string; ecs: boolean; }[]; threshold: { value: number; field: (string | string[]) & (string | string[] | undefined); cardinality?: { value: number; field: string; }[] | undefined; }; namespace?: string | undefined; license?: string | undefined; throttle?: string | undefined; outcome?: \"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined; alias_target_id?: string | undefined; alias_purpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; meta?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; note?: string | undefined; rule_name_override?: string | undefined; timestamp_override?: string | undefined; timestamp_override_fallback_disabled?: boolean | undefined; timeline_id?: string | undefined; timeline_title?: string | undefined; building_block_type?: string | undefined; output_index?: string | undefined; investigation_fields?: { field_names: string[]; } | undefined; execution_summary?: { last_execution: { message: string; date: string; status: \"running\" | \"succeeded\" | \"failed\" | \"going to run\" | \"partial failure\"; metrics: { total_search_duration_ms?: number | undefined; total_indexing_duration_ms?: number | undefined; total_enrichment_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; }; status_order: number; }; } | undefined; index?: string[] | undefined; filters?: unknown[] | undefined; data_view_id?: string | undefined; saved_id?: string | undefined; alert_suppression?: { duration: { value: number; unit: \"m\" | \"h\" | \"s\"; }; } | undefined; } | { id: string; type: \"threat_match\"; name: string; actions: { params: {} & { [k: string]: unknown; }; id: string; group: string; action_type_id: string; uuid?: string | undefined; alerts_filter?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; frequency?: { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; } | undefined; }[]; tags: string[]; setup: string; enabled: boolean; revision: number; query: string; version: number; references: string[]; interval: string; description: string; risk_score: number; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; from: string; to: string; language: \"kuery\" | \"lucene\"; created_at: string; created_by: string; updated_at: string; updated_by: string; author: string[]; immutable: boolean; rule_id: string; threat: { framework: string; tactic: { id: string; name: string; reference: string; }; technique?: { id: string; name: string; reference: string; subtechnique?: { id: string; name: string; reference: string; }[] | undefined; }[] | undefined; }[]; risk_score_mapping: { value: string; field: string; operator: \"equals\"; risk_score?: number | undefined; }[]; severity_mapping: { value: string; field: string; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; operator: \"equals\"; }[]; exceptions_list: { id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; list_id: string; namespace_type: \"single\" | \"agnostic\"; }[]; false_positives: string[]; max_signals: number; related_integrations: { version: string; package: string; integration?: string | undefined; }[]; required_fields: { type: string; name: string; ecs: boolean; }[]; threat_query: string; threat_mapping: { entries: { type: \"mapping\"; value: string; field: string; }[]; }[]; threat_index: string[]; namespace?: string | undefined; license?: string | undefined; throttle?: string | undefined; outcome?: \"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined; alias_target_id?: string | undefined; alias_purpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; meta?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; note?: string | undefined; rule_name_override?: string | undefined; timestamp_override?: string | undefined; timestamp_override_fallback_disabled?: boolean | undefined; timeline_id?: string | undefined; timeline_title?: string | undefined; building_block_type?: string | undefined; output_index?: string | undefined; investigation_fields?: { field_names: string[]; } | undefined; execution_summary?: { last_execution: { message: string; date: string; status: \"running\" | \"succeeded\" | \"failed\" | \"going to run\" | \"partial failure\"; metrics: { total_search_duration_ms?: number | undefined; total_indexing_duration_ms?: number | undefined; total_enrichment_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; }; status_order: number; }; } | undefined; index?: string[] | undefined; filters?: unknown[] | undefined; data_view_id?: string | undefined; saved_id?: string | undefined; alert_suppression?: { group_by: string[]; duration?: { value: number; unit: \"m\" | \"h\" | \"s\"; } | undefined; missing_fields_strategy?: \"doNotSuppress\" | \"suppress\" | undefined; } | undefined; threat_filters?: unknown[] | undefined; threat_indicator_path?: string | undefined; threat_language?: \"lucene\" | \"kuery\" | undefined; concurrent_searches?: number | undefined; items_per_search?: number | undefined; } | { id: string; type: \"machine_learning\"; name: string; actions: { params: {} & { [k: string]: unknown; }; id: string; group: string; action_type_id: string; uuid?: string | undefined; alerts_filter?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; frequency?: { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; } | undefined; }[]; tags: string[]; setup: string; enabled: boolean; revision: number; version: number; references: string[]; interval: string; description: string; risk_score: number; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; from: string; to: string; created_at: string; created_by: string; updated_at: string; updated_by: string; author: string[]; immutable: boolean; rule_id: string; threat: { framework: string; tactic: { id: string; name: string; reference: string; }; technique?: { id: string; name: string; reference: string; subtechnique?: { id: string; name: string; reference: string; }[] | undefined; }[] | undefined; }[]; risk_score_mapping: { value: string; field: string; operator: \"equals\"; risk_score?: number | undefined; }[]; severity_mapping: { value: string; field: string; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; operator: \"equals\"; }[]; exceptions_list: { id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; list_id: string; namespace_type: \"single\" | \"agnostic\"; }[]; false_positives: string[]; max_signals: number; related_integrations: { version: string; package: string; integration?: string | undefined; }[]; required_fields: { type: string; name: string; ecs: boolean; }[]; anomaly_threshold: number; machine_learning_job_id: (string | string[]) & (string | string[] | undefined); namespace?: string | undefined; license?: string | undefined; throttle?: string | undefined; outcome?: \"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined; alias_target_id?: string | undefined; alias_purpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; meta?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; note?: string | undefined; rule_name_override?: string | undefined; timestamp_override?: string | undefined; timestamp_override_fallback_disabled?: boolean | undefined; timeline_id?: string | undefined; timeline_title?: string | undefined; building_block_type?: string | undefined; output_index?: string | undefined; investigation_fields?: { field_names: string[]; } | undefined; execution_summary?: { last_execution: { message: string; date: string; status: \"running\" | \"succeeded\" | \"failed\" | \"going to run\" | \"partial failure\"; metrics: { total_search_duration_ms?: number | undefined; total_indexing_duration_ms?: number | undefined; total_enrichment_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; }; status_order: number; }; } | undefined; } | { id: string; type: \"new_terms\"; name: string; actions: { params: {} & { [k: string]: unknown; }; id: string; group: string; action_type_id: string; uuid?: string | undefined; alerts_filter?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; frequency?: { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; } | undefined; }[]; tags: string[]; setup: string; enabled: boolean; revision: number; query: string; version: number; references: string[]; interval: string; description: string; risk_score: number; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; from: string; to: string; language: \"kuery\" | \"lucene\"; created_at: string; created_by: string; updated_at: string; updated_by: string; author: string[]; immutable: boolean; rule_id: string; threat: { framework: string; tactic: { id: string; name: string; reference: string; }; technique?: { id: string; name: string; reference: string; subtechnique?: { id: string; name: string; reference: string; }[] | undefined; }[] | undefined; }[]; risk_score_mapping: { value: string; field: string; operator: \"equals\"; risk_score?: number | undefined; }[]; severity_mapping: { value: string; field: string; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; operator: \"equals\"; }[]; exceptions_list: { id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; list_id: string; namespace_type: \"single\" | \"agnostic\"; }[]; false_positives: string[]; max_signals: number; related_integrations: { version: string; package: string; integration?: string | undefined; }[]; required_fields: { type: string; name: string; ecs: boolean; }[]; new_terms_fields: string[]; history_window_start: string; namespace?: string | undefined; license?: string | undefined; throttle?: string | undefined; outcome?: \"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined; alias_target_id?: string | undefined; alias_purpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; meta?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; note?: string | undefined; rule_name_override?: string | undefined; timestamp_override?: string | undefined; timestamp_override_fallback_disabled?: boolean | undefined; timeline_id?: string | undefined; timeline_title?: string | undefined; building_block_type?: string | undefined; output_index?: string | undefined; investigation_fields?: { field_names: string[]; } | undefined; execution_summary?: { last_execution: { message: string; date: string; status: \"running\" | \"succeeded\" | \"failed\" | \"going to run\" | \"partial failure\"; metrics: { total_search_duration_ms?: number | undefined; total_indexing_duration_ms?: number | undefined; total_enrichment_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; }; status_order: number; }; } | undefined; index?: string[] | undefined; filters?: unknown[] | undefined; data_view_id?: string | undefined; } | { id: string; type: \"esql\"; name: string; actions: { params: {} & { [k: string]: unknown; }; id: string; group: string; action_type_id: string; uuid?: string | undefined; alerts_filter?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; frequency?: { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; } | undefined; }[]; tags: string[]; setup: string; enabled: boolean; revision: number; query: string; version: number; references: string[]; interval: string; description: string; risk_score: number; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; from: string; to: string; language: \"esql\"; created_at: string; created_by: string; updated_at: string; updated_by: string; author: string[]; immutable: boolean; rule_id: string; threat: { framework: string; tactic: { id: string; name: string; reference: string; }; technique?: { id: string; name: string; reference: string; subtechnique?: { id: string; name: string; reference: string; }[] | undefined; }[] | undefined; }[]; risk_score_mapping: { value: string; field: string; operator: \"equals\"; risk_score?: number | undefined; }[]; severity_mapping: { value: string; field: string; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; operator: \"equals\"; }[]; exceptions_list: { id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; list_id: string; namespace_type: \"single\" | \"agnostic\"; }[]; false_positives: string[]; max_signals: number; related_integrations: { version: string; package: string; integration?: string | undefined; }[]; required_fields: { type: string; name: string; ecs: boolean; }[]; namespace?: string | undefined; license?: string | undefined; throttle?: string | undefined; outcome?: \"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined; alias_target_id?: string | undefined; alias_purpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; meta?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; note?: string | undefined; rule_name_override?: string | undefined; timestamp_override?: string | undefined; timestamp_override_fallback_disabled?: boolean | undefined; timeline_id?: string | undefined; timeline_title?: string | undefined; building_block_type?: string | undefined; output_index?: string | undefined; investigation_fields?: { field_names: string[]; } | undefined; execution_summary?: { last_execution: { message: string; date: string; status: \"running\" | \"succeeded\" | \"failed\" | \"going to run\" | \"partial failure\"; metrics: { total_search_duration_ms?: number | undefined; total_indexing_duration_ms?: number | undefined; total_enrichment_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; }; status_order: number; }; } | undefined; })[]" ], "path": "x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/types.ts", "deprecated": false, @@ -530,9 +530,9 @@ }, "<", { - "pluginId": "@kbn/security-solution-navigation", + "pluginId": "@kbn/deeplinks-security", "scope": "common", - "docId": "kibKbnSecuritySolutionNavigationPluginApi", + "docId": "kibKbnDeeplinksSecurityPluginApi", "section": "def-common.SecurityPageName", "text": "SecurityPageName" }, @@ -665,9 +665,9 @@ ], "signature": [ { - "pluginId": "@kbn/security-solution-navigation", + "pluginId": "@kbn/deeplinks-security", "scope": "common", - "docId": "kibKbnSecuritySolutionNavigationPluginApi", + "docId": "kibKbnDeeplinksSecurityPluginApi", "section": "def-common.SecurityPageName", "text": "SecurityPageName" } @@ -3048,7 +3048,7 @@ "label": "ConfigType", "description": [], "signature": [ - "Omit; }>, \"offeringSettings\"> & { experimentalFeatures: ", + "Omit; entityAnalytics: Readonly<{} & { riskEngine: Readonly<{} & { alertSampleSizePerShard: number; }>; }>; }>, \"offeringSettings\"> & { experimentalFeatures: ", { "pluginId": "securitySolution", "scope": "common", @@ -3160,7 +3160,7 @@ "tags": [], "label": "SecurityPageName", "description": [], - "path": "x-pack/packages/security-solution/navigation/src/constants.ts", + "path": "packages/deeplinks/security/deep_links.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false diff --git a/api_docs/security_solution.mdx b/api_docs/security_solution.mdx index a105406e962b2..12683bd7b245a 100644 --- a/api_docs/security_solution.mdx +++ b/api_docs/security_solution.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/securitySolution title: "securitySolution" image: https://source.unsplash.com/400x175/?github description: API docs for the securitySolution plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'securitySolution'] --- import securitySolutionObj from './security_solution.devdocs.json'; diff --git a/api_docs/security_solution_ess.mdx b/api_docs/security_solution_ess.mdx index 4a1d47c74c233..75d3bc269cf25 100644 --- a/api_docs/security_solution_ess.mdx +++ b/api_docs/security_solution_ess.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/securitySolutionEss title: "securitySolutionEss" image: https://source.unsplash.com/400x175/?github description: API docs for the securitySolutionEss plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'securitySolutionEss'] --- import securitySolutionEssObj from './security_solution_ess.devdocs.json'; diff --git a/api_docs/security_solution_serverless.mdx b/api_docs/security_solution_serverless.mdx index 5340de4ec918f..954c5d41443d0 100644 --- a/api_docs/security_solution_serverless.mdx +++ b/api_docs/security_solution_serverless.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/securitySolutionServerless title: "securitySolutionServerless" image: https://source.unsplash.com/400x175/?github description: API docs for the securitySolutionServerless plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'securitySolutionServerless'] --- import securitySolutionServerlessObj from './security_solution_serverless.devdocs.json'; diff --git a/api_docs/serverless.devdocs.json b/api_docs/serverless.devdocs.json index da295e570a95b..a00f3481e2d9c 100644 --- a/api_docs/serverless.devdocs.json +++ b/api_docs/serverless.devdocs.json @@ -329,6 +329,77 @@ } ], "returnComment": [] + }, + { + "parentPluginId": "serverless", + "id": "def-public.ServerlessPluginStart.getNavigationCards", + "type": "Function", + "tags": [], + "label": "getNavigationCards", + "description": [], + "signature": [ + "(roleManagementEnabled?: boolean | undefined, extendCardNavDefinitions?: Record | undefined) => Record | undefined" + ], + "path": "x-pack/plugins/serverless/public/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "serverless", + "id": "def-public.ServerlessPluginStart.getNavigationCards.$1", + "type": "CompoundType", + "tags": [], + "label": "roleManagementEnabled", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "x-pack/plugins/serverless/public/types.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + }, + { + "parentPluginId": "serverless", + "id": "def-public.ServerlessPluginStart.getNavigationCards.$2", + "type": "Object", + "tags": [], + "label": "extendCardNavDefinitions", + "description": [], + "signature": [ + "Record | undefined" + ], + "path": "x-pack/plugins/serverless/public/types.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + } + ], + "returnComment": [] } ], "lifecycle": "start", diff --git a/api_docs/serverless.mdx b/api_docs/serverless.mdx index fc2378c31b227..9336033eeb071 100644 --- a/api_docs/serverless.mdx +++ b/api_docs/serverless.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/serverless title: "serverless" image: https://source.unsplash.com/400x175/?github description: API docs for the serverless plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'serverless'] --- import serverlessObj from './serverless.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sh | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 21 | 0 | 20 | 0 | +| 24 | 0 | 23 | 0 | ## Client diff --git a/api_docs/serverless_observability.mdx b/api_docs/serverless_observability.mdx index 268a294a380da..5f00b91f3578f 100644 --- a/api_docs/serverless_observability.mdx +++ b/api_docs/serverless_observability.mdx @@ -8,14 +8,14 @@ slug: /kibana-dev-docs/api/serverlessObservability title: "serverlessObservability" image: https://source.unsplash.com/400x175/?github description: API docs for the serverlessObservability plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'serverlessObservability'] --- import serverlessObservabilityObj from './serverless_observability.devdocs.json'; Serverless customizations for observability. -Contact [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) for questions regarding this plugin. +Contact [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/obs-ux-management-team) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/serverless_search.mdx b/api_docs/serverless_search.mdx index 1cd02d2a30cf8..1f2498db55b3c 100644 --- a/api_docs/serverless_search.mdx +++ b/api_docs/serverless_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/serverlessSearch title: "serverlessSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the serverlessSearch plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'serverlessSearch'] --- import serverlessSearchObj from './serverless_search.devdocs.json'; diff --git a/api_docs/session_view.mdx b/api_docs/session_view.mdx index 548321803df03..0f9cd586809bb 100644 --- a/api_docs/session_view.mdx +++ b/api_docs/session_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/sessionView title: "sessionView" image: https://source.unsplash.com/400x175/?github description: API docs for the sessionView plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'sessionView'] --- import sessionViewObj from './session_view.devdocs.json'; diff --git a/api_docs/share.mdx b/api_docs/share.mdx index 80e4e9d4c2fc5..4a711f03e88ec 100644 --- a/api_docs/share.mdx +++ b/api_docs/share.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/share title: "share" image: https://source.unsplash.com/400x175/?github description: API docs for the share plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'share'] --- import shareObj from './share.devdocs.json'; diff --git a/api_docs/slo.devdocs.json b/api_docs/slo.devdocs.json index 43902c29710e5..01fb1f6b0ef0c 100644 --- a/api_docs/slo.devdocs.json +++ b/api_docs/slo.devdocs.json @@ -614,7 +614,7 @@ "section": "def-common.AppUpdater", "text": "AppUpdater" }, - ">; }) => void; setIsSidebarEnabled: (isEnabled: boolean) => void; }" + ">; }) => void; }" ], "path": "x-pack/plugins/observability_solution/slo/public/types.ts", "deprecated": false, diff --git a/api_docs/slo.mdx b/api_docs/slo.mdx index ca2321e340fc9..0e8710290ad5e 100644 --- a/api_docs/slo.mdx +++ b/api_docs/slo.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/slo title: "slo" image: https://source.unsplash.com/400x175/?github description: API docs for the slo plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'slo'] --- import sloObj from './slo.devdocs.json'; diff --git a/api_docs/snapshot_restore.mdx b/api_docs/snapshot_restore.mdx index d808c363c6c31..569e36fb0a8be 100644 --- a/api_docs/snapshot_restore.mdx +++ b/api_docs/snapshot_restore.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/snapshotRestore title: "snapshotRestore" image: https://source.unsplash.com/400x175/?github description: API docs for the snapshotRestore plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'snapshotRestore'] --- import snapshotRestoreObj from './snapshot_restore.devdocs.json'; diff --git a/api_docs/spaces.mdx b/api_docs/spaces.mdx index 04eb541582282..10f9630ee21d8 100644 --- a/api_docs/spaces.mdx +++ b/api_docs/spaces.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/spaces title: "spaces" image: https://source.unsplash.com/400x175/?github description: API docs for the spaces plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'spaces'] --- import spacesObj from './spaces.devdocs.json'; diff --git a/api_docs/stack_alerts.mdx b/api_docs/stack_alerts.mdx index e92266f1e95fc..7ae3497c5bfaf 100644 --- a/api_docs/stack_alerts.mdx +++ b/api_docs/stack_alerts.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/stackAlerts title: "stackAlerts" image: https://source.unsplash.com/400x175/?github description: API docs for the stackAlerts plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'stackAlerts'] --- import stackAlertsObj from './stack_alerts.devdocs.json'; diff --git a/api_docs/stack_connectors.mdx b/api_docs/stack_connectors.mdx index 4f2a81145d7e7..b5d48aece2c72 100644 --- a/api_docs/stack_connectors.mdx +++ b/api_docs/stack_connectors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/stackConnectors title: "stackConnectors" image: https://source.unsplash.com/400x175/?github description: API docs for the stackConnectors plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'stackConnectors'] --- import stackConnectorsObj from './stack_connectors.devdocs.json'; diff --git a/api_docs/task_manager.devdocs.json b/api_docs/task_manager.devdocs.json index ae929b293a877..fd5ac7cba19d0 100644 --- a/api_docs/task_manager.devdocs.json +++ b/api_docs/task_manager.devdocs.json @@ -1524,27 +1524,6 @@ "path": "x-pack/plugins/task_manager/server/task_type_dictionary.ts", "deprecated": false, "trackAdoption": false - }, - { - "parentPluginId": "taskManager", - "id": "def-server.TaskRegisterDefinition.indirectParamsSchema", - "type": "Object", - "tags": [], - "label": "indirectParamsSchema", - "description": [], - "signature": [ - { - "pluginId": "@kbn/config-schema", - "scope": "common", - "docId": "kibKbnConfigSchemaPluginApi", - "section": "def-common.ObjectType", - "text": "ObjectType" - }, - " | undefined" - ], - "path": "x-pack/plugins/task_manager/server/task_type_dictionary.ts", - "deprecated": false, - "trackAdoption": false } ], "initialIsOpen": false @@ -1599,22 +1578,7 @@ "\nA task instance that has an id and is ready for storage." ], "signature": [ - "{ scope?: string[] | undefined; params: Record; enabled?: boolean | undefined; state: Record; taskType: string; }" - ], - "path": "x-pack/plugins/task_manager/server/task.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, - { - "parentPluginId": "taskManager", - "id": "def-server.LoadIndirectParamsResult", - "type": "Type", - "tags": [], - "label": "LoadIndirectParamsResult", - "description": [], - "signature": [ - "{ data: T; error?: undefined; } | { data?: undefined; error: Error; }" + "{ params: Record; scope?: string[] | undefined; enabled?: boolean | undefined; state: Record; taskType: string; }" ], "path": "x-pack/plugins/task_manager/server/task.ts", "deprecated": false, diff --git a/api_docs/task_manager.mdx b/api_docs/task_manager.mdx index b5f8d0e1b317d..8a0c13a04a2fb 100644 --- a/api_docs/task_manager.mdx +++ b/api_docs/task_manager.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/taskManager title: "taskManager" image: https://source.unsplash.com/400x175/?github description: API docs for the taskManager plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'taskManager'] --- import taskManagerObj from './task_manager.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-o | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 104 | 0 | 61 | 5 | +| 102 | 0 | 59 | 5 | ## Server diff --git a/api_docs/telemetry.mdx b/api_docs/telemetry.mdx index da053778f1eec..1a3930a573f6b 100644 --- a/api_docs/telemetry.mdx +++ b/api_docs/telemetry.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetry title: "telemetry" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetry plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetry'] --- import telemetryObj from './telemetry.devdocs.json'; diff --git a/api_docs/telemetry_collection_manager.devdocs.json b/api_docs/telemetry_collection_manager.devdocs.json index d1d6226efa8b4..7588db1dddbed 100644 --- a/api_docs/telemetry_collection_manager.devdocs.json +++ b/api_docs/telemetry_collection_manager.devdocs.json @@ -76,7 +76,39 @@ "label": "esClient", "description": [], "signature": [ - "{ create: { (this: That, params: ", + "{ search: { >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "SearchResponse", + ">; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "SearchResponse", + ", unknown>>; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "SearchResponse", + ">; }; create: { (this: That, params: ", "CreateRequest", " | ", "CreateRequest", @@ -180,39 +212,7 @@ "TransportRequestOptions", " | undefined): Promise<", "WriteResponseBase", - ">; }; search: { >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptionsWithOutMeta", - " | undefined): Promise<", - "SearchResponse", - ">; >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptionsWithMeta", - " | undefined): Promise<", - "TransportResult", - "<", - "SearchResponse", - ", unknown>>; >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptions", - " | undefined): Promise<", - "SearchResponse", - ">; }; helpers: ", + ">; }; helpers: ", "default", "; name: string | symbol; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kEsql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kInference]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kQueryRuleset]: symbol | null; [kRollup]: symbol | null; [kSearchApplication]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kSynonyms]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", "default", diff --git a/api_docs/telemetry_collection_manager.mdx b/api_docs/telemetry_collection_manager.mdx index 798545f6b5ded..85735b6f76910 100644 --- a/api_docs/telemetry_collection_manager.mdx +++ b/api_docs/telemetry_collection_manager.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryCollectionManager title: "telemetryCollectionManager" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryCollectionManager plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryCollectionManager'] --- import telemetryCollectionManagerObj from './telemetry_collection_manager.devdocs.json'; diff --git a/api_docs/telemetry_collection_xpack.mdx b/api_docs/telemetry_collection_xpack.mdx index 34b07a3ba0459..5845671f08a5f 100644 --- a/api_docs/telemetry_collection_xpack.mdx +++ b/api_docs/telemetry_collection_xpack.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryCollectionXpack title: "telemetryCollectionXpack" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryCollectionXpack plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryCollectionXpack'] --- import telemetryCollectionXpackObj from './telemetry_collection_xpack.devdocs.json'; diff --git a/api_docs/telemetry_management_section.mdx b/api_docs/telemetry_management_section.mdx index f82524013e2a8..8e1565c74e481 100644 --- a/api_docs/telemetry_management_section.mdx +++ b/api_docs/telemetry_management_section.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryManagementSection title: "telemetryManagementSection" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryManagementSection plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryManagementSection'] --- import telemetryManagementSectionObj from './telemetry_management_section.devdocs.json'; diff --git a/api_docs/text_based_languages.mdx b/api_docs/text_based_languages.mdx index 2d99821808c95..e5f8ed85fe2d1 100644 --- a/api_docs/text_based_languages.mdx +++ b/api_docs/text_based_languages.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/textBasedLanguages title: "textBasedLanguages" image: https://source.unsplash.com/400x175/?github description: API docs for the textBasedLanguages plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'textBasedLanguages'] --- import textBasedLanguagesObj from './text_based_languages.devdocs.json'; diff --git a/api_docs/threat_intelligence.mdx b/api_docs/threat_intelligence.mdx index 1f8cba734d4ca..6272d088f21dd 100644 --- a/api_docs/threat_intelligence.mdx +++ b/api_docs/threat_intelligence.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/threatIntelligence title: "threatIntelligence" image: https://source.unsplash.com/400x175/?github description: API docs for the threatIntelligence plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'threatIntelligence'] --- import threatIntelligenceObj from './threat_intelligence.devdocs.json'; diff --git a/api_docs/timelines.devdocs.json b/api_docs/timelines.devdocs.json index 777d82baf9274..ed69cb01d25f9 100644 --- a/api_docs/timelines.devdocs.json +++ b/api_docs/timelines.devdocs.json @@ -4419,9 +4419,9 @@ "label": "DataProvidersAnd", "description": [], "signature": [ - "{ type?: ", + "{ id: string; type?: ", "DataProviderType", - " | undefined; id: string; name: string; enabled: boolean; excluded: boolean; kqlQuery: string; queryMatch: ", + " | undefined; name: string; enabled: boolean; excluded: boolean; kqlQuery: string; queryMatch: ", { "pluginId": "timelines", "scope": "common", @@ -4709,7 +4709,7 @@ "section": "def-common.Direction", "text": "Direction" }, - "; esTypes?: string[] | undefined; type?: string | undefined; }[]; language: \"eql\"; fieldRequested: string[]; id?: string | undefined; params?: any; timerange?: { interval: string; from: string; to: string; } | undefined; defaultIndex?: string[] | undefined; runtimeMappings?: Record; } | undefined; fetch_fields?: string[] | undefined; format?: string | undefined; input_field?: string | undefined; target_field?: string | undefined; target_index?: string | undefined; }> | undefined; indexType?: string | undefined; entityType?: \"events\" | \"sessions\" | undefined; filterStatus?: \"open\" | \"closed\" | \"acknowledged\" | undefined; pagination?: Zod.objectInputType<{ activePage: Zod.ZodNumber; cursorStart: Zod.ZodOptional; querySize: Zod.ZodNumber; }, Zod.ZodTypeAny, \"passthrough\"> | undefined; filterQuery?: string | Record | { range: Record; } | { query_string: { query: string; analyze_wildcard: boolean; }; } | { match: Record; } | { term: Record; } | { bool: { filter: {}[]; must: {}[]; must_not: {}[]; should: {}[]; }; } | undefined; eventCategoryField?: string | undefined; tiebreakerField?: string | undefined; timestampField?: string | undefined; size?: number | undefined; runTimeMappings?: Record; } | undefined; fetch_fields?: string[] | undefined; format?: string | undefined; input_field?: string | undefined; target_field?: string | undefined; target_index?: string | undefined; }> | undefined; }" + "; esTypes?: string[] | undefined; type?: string | undefined; }[]; language: \"eql\"; fieldRequested: string[]; params?: any; id?: string | undefined; timerange?: { interval: string; from: string; to: string; } | undefined; defaultIndex?: string[] | undefined; runtimeMappings?: Record; id: string; } | undefined; fetch_fields?: string[] | undefined; format?: string | undefined; input_field?: string | undefined; target_field?: string | undefined; target_index?: string | undefined; }> | undefined; indexType?: string | undefined; entityType?: \"events\" | \"sessions\" | undefined; filterStatus?: \"open\" | \"closed\" | \"acknowledged\" | undefined; pagination?: Zod.objectInputType<{ activePage: Zod.ZodNumber; cursorStart: Zod.ZodOptional; querySize: Zod.ZodNumber; }, Zod.ZodTypeAny, \"passthrough\"> | undefined; filterQuery?: string | Record | { range: Record; } | { query_string: { query: string; analyze_wildcard: boolean; }; } | { match: Record; } | { term: Record; } | { bool: { filter: {}[]; must: {}[]; must_not: {}[]; should: {}[]; }; } | undefined; eventCategoryField?: string | undefined; tiebreakerField?: string | undefined; timestampField?: string | undefined; size?: number | undefined; runTimeMappings?: Record; id: string; } | undefined; fetch_fields?: string[] | undefined; format?: string | undefined; input_field?: string | undefined; target_field?: string | undefined; target_index?: string | undefined; }> | undefined; }" ], "path": "x-pack/plugins/timelines/common/api/search_strategy/timeline/eql.ts", "deprecated": false, @@ -4740,7 +4740,7 @@ "section": "def-common.TimelineEventsQueries", "text": "TimelineEventsQueries" }, - ".all; id?: string | undefined; params?: any; timerange?: { interval: string; from: string; to: string; } | undefined; defaultIndex?: string[] | undefined; indexType?: string | undefined; entityType?: \"events\" | \"sessions\" | undefined; filterStatus?: \"open\" | \"closed\" | \"acknowledged\" | undefined; pagination?: Zod.objectInputType<{ activePage: Zod.ZodNumber; cursorStart: Zod.ZodOptional; querySize: Zod.ZodNumber; }, Zod.ZodTypeAny, \"passthrough\"> | undefined; authFilter?: {} | undefined; excludeEcsData?: boolean | undefined; filterQuery?: any; runtimeMappings?: Record; } | undefined; fetch_fields?: string[] | undefined; format?: string | undefined; input_field?: string | undefined; target_field?: string | undefined; target_index?: string | undefined; }> | undefined; }" + ".all; params?: any; id?: string | undefined; timerange?: { interval: string; from: string; to: string; } | undefined; defaultIndex?: string[] | undefined; indexType?: string | undefined; entityType?: \"events\" | \"sessions\" | undefined; filterStatus?: \"open\" | \"closed\" | \"acknowledged\" | undefined; pagination?: Zod.objectInputType<{ activePage: Zod.ZodNumber; cursorStart: Zod.ZodOptional; querySize: Zod.ZodNumber; }, Zod.ZodTypeAny, \"passthrough\"> | undefined; authFilter?: {} | undefined; excludeEcsData?: boolean | undefined; filterQuery?: any; runtimeMappings?: Record; id: string; } | undefined; fetch_fields?: string[] | undefined; format?: string | undefined; input_field?: string | undefined; target_field?: string | undefined; target_index?: string | undefined; }> | undefined; }" ], "path": "x-pack/plugins/timelines/common/api/search_strategy/timeline/events_all.ts", "deprecated": false, @@ -4763,7 +4763,7 @@ "section": "def-common.TimelineEventsQueries", "text": "TimelineEventsQueries" }, - ".details; eventId: string; id?: string | undefined; params?: any; timerange?: { interval: string; from: string; to: string; } | undefined; defaultIndex?: string[] | undefined; filterQuery?: string | Record | { range: Record; } | { query_string: { query: string; analyze_wildcard: boolean; }; } | { match: Record; } | { term: Record; } | { bool: { filter: {}[]; must: {}[]; must_not: {}[]; should: {}[]; }; } | undefined; indexType?: string | undefined; entityType?: \"events\" | \"sessions\" | undefined; filterStatus?: \"open\" | \"closed\" | \"acknowledged\" | undefined; pagination?: Zod.objectInputType<{ activePage: Zod.ZodNumber; cursorStart: Zod.ZodOptional; querySize: Zod.ZodNumber; }, Zod.ZodTypeAny, \"passthrough\"> | undefined; authFilter?: {} | undefined; runtimeMappings?: Record; } | undefined; fetch_fields?: string[] | undefined; format?: string | undefined; input_field?: string | undefined; target_field?: string | undefined; target_index?: string | undefined; }> | undefined; }" + ".details; eventId: string; params?: any; id?: string | undefined; timerange?: { interval: string; from: string; to: string; } | undefined; defaultIndex?: string[] | undefined; filterQuery?: string | Record | { range: Record; } | { query_string: { query: string; analyze_wildcard: boolean; }; } | { match: Record; } | { term: Record; } | { bool: { filter: {}[]; must: {}[]; must_not: {}[]; should: {}[]; }; } | undefined; indexType?: string | undefined; entityType?: \"events\" | \"sessions\" | undefined; filterStatus?: \"open\" | \"closed\" | \"acknowledged\" | undefined; pagination?: Zod.objectInputType<{ activePage: Zod.ZodNumber; cursorStart: Zod.ZodOptional; querySize: Zod.ZodNumber; }, Zod.ZodTypeAny, \"passthrough\"> | undefined; authFilter?: {} | undefined; runtimeMappings?: Record; id: string; } | undefined; fetch_fields?: string[] | undefined; format?: string | undefined; input_field?: string | undefined; target_field?: string | undefined; target_index?: string | undefined; }> | undefined; }" ], "path": "x-pack/plugins/timelines/common/api/search_strategy/timeline/events_details.ts", "deprecated": false, @@ -4794,7 +4794,7 @@ "section": "def-common.LastEventIndexKey", "text": "LastEventIndexKey" }, - "; id?: string | undefined; params?: any; defaultIndex?: string[] | undefined; indexType?: string | undefined; entityType?: \"events\" | \"sessions\" | undefined; filterStatus?: \"open\" | \"closed\" | \"acknowledged\" | undefined; }" + "; params?: any; id?: string | undefined; defaultIndex?: string[] | undefined; indexType?: string | undefined; entityType?: \"events\" | \"sessions\" | undefined; filterStatus?: \"open\" | \"closed\" | \"acknowledged\" | undefined; }" ], "path": "x-pack/plugins/timelines/common/api/search_strategy/timeline/events_last_event_time.ts", "deprecated": false, @@ -4817,7 +4817,7 @@ "section": "def-common.TimelineEventsQueries", "text": "TimelineEventsQueries" }, - ".kpi; id?: string | undefined; params?: any; timerange?: { interval: string; from: string; to: string; } | undefined; defaultIndex?: string[] | undefined; runtimeMappings?: Record; } | undefined; fetch_fields?: string[] | undefined; format?: string | undefined; input_field?: string | undefined; target_field?: string | undefined; target_index?: string | undefined; }> | undefined; filterQuery?: string | Record | { range: Record; } | { query_string: { query: string; analyze_wildcard: boolean; }; } | { match: Record; } | { term: Record; } | { bool: { filter: {}[]; must: {}[]; must_not: {}[]; should: {}[]; }; } | undefined; indexType?: string | undefined; entityType?: \"events\" | \"sessions\" | undefined; filterStatus?: \"open\" | \"closed\" | \"acknowledged\" | undefined; }" + ".kpi; params?: any; id?: string | undefined; timerange?: { interval: string; from: string; to: string; } | undefined; defaultIndex?: string[] | undefined; runtimeMappings?: Record; id: string; } | undefined; fetch_fields?: string[] | undefined; format?: string | undefined; input_field?: string | undefined; target_field?: string | undefined; target_index?: string | undefined; }> | undefined; filterQuery?: string | Record | { range: Record; } | { query_string: { query: string; analyze_wildcard: boolean; }; } | { match: Record; } | { term: Record; } | { bool: { filter: {}[]; must: {}[]; must_not: {}[]; should: {}[]; }; } | undefined; indexType?: string | undefined; entityType?: \"events\" | \"sessions\" | undefined; filterStatus?: \"open\" | \"closed\" | \"acknowledged\" | undefined; }" ], "path": "x-pack/plugins/timelines/common/api/search_strategy/timeline/kpi.ts", "deprecated": false, diff --git a/api_docs/timelines.mdx b/api_docs/timelines.mdx index 78c08d0f2ade5..784e4760b4b74 100644 --- a/api_docs/timelines.mdx +++ b/api_docs/timelines.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/timelines title: "timelines" image: https://source.unsplash.com/400x175/?github description: API docs for the timelines plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'timelines'] --- import timelinesObj from './timelines.devdocs.json'; diff --git a/api_docs/transform.mdx b/api_docs/transform.mdx index 11eb25460e1e4..fd5e09b8b939b 100644 --- a/api_docs/transform.mdx +++ b/api_docs/transform.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/transform title: "transform" image: https://source.unsplash.com/400x175/?github description: API docs for the transform plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'transform'] --- import transformObj from './transform.devdocs.json'; diff --git a/api_docs/triggers_actions_ui.devdocs.json b/api_docs/triggers_actions_ui.devdocs.json index eefe731b4c643..83178c607f57c 100644 --- a/api_docs/triggers_actions_ui.devdocs.json +++ b/api_docs/triggers_actions_ui.devdocs.json @@ -5171,7 +5171,7 @@ "label": "setRuleProperty", "description": [], "signature": [ - "(key: Prop, value: ", + "(key: Prop, value: ", "SanitizedRule", "[Prop] | null) => void" ], diff --git a/api_docs/triggers_actions_ui.mdx b/api_docs/triggers_actions_ui.mdx index be48b53b37c26..3a19d67e12571 100644 --- a/api_docs/triggers_actions_ui.mdx +++ b/api_docs/triggers_actions_ui.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/triggersActionsUi title: "triggersActionsUi" image: https://source.unsplash.com/400x175/?github description: API docs for the triggersActionsUi plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'triggersActionsUi'] --- import triggersActionsUiObj from './triggers_actions_ui.devdocs.json'; diff --git a/api_docs/ui_actions.mdx b/api_docs/ui_actions.mdx index 14e02afe06df3..a82297a56a1d6 100644 --- a/api_docs/ui_actions.mdx +++ b/api_docs/ui_actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/uiActions title: "uiActions" image: https://source.unsplash.com/400x175/?github description: API docs for the uiActions plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uiActions'] --- import uiActionsObj from './ui_actions.devdocs.json'; diff --git a/api_docs/ui_actions_enhanced.mdx b/api_docs/ui_actions_enhanced.mdx index dbb32cc2aadc5..901e0f5f633ca 100644 --- a/api_docs/ui_actions_enhanced.mdx +++ b/api_docs/ui_actions_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/uiActionsEnhanced title: "uiActionsEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the uiActionsEnhanced plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uiActionsEnhanced'] --- import uiActionsEnhancedObj from './ui_actions_enhanced.devdocs.json'; diff --git a/api_docs/unified_doc_viewer.mdx b/api_docs/unified_doc_viewer.mdx index e4460f548dda2..11a3cf8f27408 100644 --- a/api_docs/unified_doc_viewer.mdx +++ b/api_docs/unified_doc_viewer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedDocViewer title: "unifiedDocViewer" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedDocViewer plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedDocViewer'] --- import unifiedDocViewerObj from './unified_doc_viewer.devdocs.json'; diff --git a/api_docs/unified_histogram.mdx b/api_docs/unified_histogram.mdx index b417866096a5a..023e12565f401 100644 --- a/api_docs/unified_histogram.mdx +++ b/api_docs/unified_histogram.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedHistogram title: "unifiedHistogram" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedHistogram plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedHistogram'] --- import unifiedHistogramObj from './unified_histogram.devdocs.json'; diff --git a/api_docs/unified_search.mdx b/api_docs/unified_search.mdx index 024e6125b2ba3..93405877f1062 100644 --- a/api_docs/unified_search.mdx +++ b/api_docs/unified_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedSearch title: "unifiedSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedSearch plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedSearch'] --- import unifiedSearchObj from './unified_search.devdocs.json'; diff --git a/api_docs/unified_search_autocomplete.mdx b/api_docs/unified_search_autocomplete.mdx index 23aa9ac0e75f7..beef0fbb33ca9 100644 --- a/api_docs/unified_search_autocomplete.mdx +++ b/api_docs/unified_search_autocomplete.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedSearch-autocomplete title: "unifiedSearch.autocomplete" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedSearch.autocomplete plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedSearch.autocomplete'] --- import unifiedSearchAutocompleteObj from './unified_search_autocomplete.devdocs.json'; diff --git a/api_docs/uptime.mdx b/api_docs/uptime.mdx index 1e0da59417abf..ca94d87571321 100644 --- a/api_docs/uptime.mdx +++ b/api_docs/uptime.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/uptime title: "uptime" image: https://source.unsplash.com/400x175/?github description: API docs for the uptime plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uptime'] --- import uptimeObj from './uptime.devdocs.json'; diff --git a/api_docs/url_forwarding.mdx b/api_docs/url_forwarding.mdx index 1b59fc6a1c88a..964fda24ad6bd 100644 --- a/api_docs/url_forwarding.mdx +++ b/api_docs/url_forwarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/urlForwarding title: "urlForwarding" image: https://source.unsplash.com/400x175/?github description: API docs for the urlForwarding plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'urlForwarding'] --- import urlForwardingObj from './url_forwarding.devdocs.json'; diff --git a/api_docs/usage_collection.devdocs.json b/api_docs/usage_collection.devdocs.json index 8ba7db04d6e21..a5eff23dc7dbd 100644 --- a/api_docs/usage_collection.devdocs.json +++ b/api_docs/usage_collection.devdocs.json @@ -345,7 +345,39 @@ "\nRequest-scoped Elasticsearch client" ], "signature": [ - "{ create: { (this: That, params: ", + "{ search: { >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "SearchResponse", + ">; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "SearchResponse", + ", unknown>>; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "SearchResponse", + ">; }; create: { (this: That, params: ", "CreateRequest", " | ", "CreateRequest", @@ -449,39 +481,7 @@ "TransportRequestOptions", " | undefined): Promise<", "WriteResponseBase", - ">; }; search: { >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptionsWithOutMeta", - " | undefined): Promise<", - "SearchResponse", - ">; >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptionsWithMeta", - " | undefined): Promise<", - "TransportResult", - "<", - "SearchResponse", - ", unknown>>; >(this: That, params?: ", - "SearchRequest", - " | ", - "SearchRequest", - " | undefined, options?: ", - "TransportRequestOptions", - " | undefined): Promise<", - "SearchResponse", - ">; }; helpers: ", + ">; }; helpers: ", "default", "; name: string | symbol; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kEsql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kInference]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kQueryRuleset]: symbol | null; [kRollup]: symbol | null; [kSearchApplication]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kSynonyms]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", "default", diff --git a/api_docs/usage_collection.mdx b/api_docs/usage_collection.mdx index 1e1a8390b85a0..32d77e05cec93 100644 --- a/api_docs/usage_collection.mdx +++ b/api_docs/usage_collection.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/usageCollection title: "usageCollection" image: https://source.unsplash.com/400x175/?github description: API docs for the usageCollection plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'usageCollection'] --- import usageCollectionObj from './usage_collection.devdocs.json'; diff --git a/api_docs/ux.mdx b/api_docs/ux.mdx index ea018cc864478..d47a0fc54fa0e 100644 --- a/api_docs/ux.mdx +++ b/api_docs/ux.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ux title: "ux" image: https://source.unsplash.com/400x175/?github description: API docs for the ux plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ux'] --- import uxObj from './ux.devdocs.json'; diff --git a/api_docs/vis_default_editor.mdx b/api_docs/vis_default_editor.mdx index 4eeab72a4e857..ddb8f326fc0c3 100644 --- a/api_docs/vis_default_editor.mdx +++ b/api_docs/vis_default_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visDefaultEditor title: "visDefaultEditor" image: https://source.unsplash.com/400x175/?github description: API docs for the visDefaultEditor plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visDefaultEditor'] --- import visDefaultEditorObj from './vis_default_editor.devdocs.json'; diff --git a/api_docs/vis_type_gauge.mdx b/api_docs/vis_type_gauge.mdx index 9adbbeea80d45..d8d55f43ca750 100644 --- a/api_docs/vis_type_gauge.mdx +++ b/api_docs/vis_type_gauge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeGauge title: "visTypeGauge" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeGauge plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeGauge'] --- import visTypeGaugeObj from './vis_type_gauge.devdocs.json'; diff --git a/api_docs/vis_type_heatmap.mdx b/api_docs/vis_type_heatmap.mdx index 271dea8206295..305239b5b6a05 100644 --- a/api_docs/vis_type_heatmap.mdx +++ b/api_docs/vis_type_heatmap.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeHeatmap title: "visTypeHeatmap" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeHeatmap plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeHeatmap'] --- import visTypeHeatmapObj from './vis_type_heatmap.devdocs.json'; diff --git a/api_docs/vis_type_pie.mdx b/api_docs/vis_type_pie.mdx index 86fb54a329114..82944b3973164 100644 --- a/api_docs/vis_type_pie.mdx +++ b/api_docs/vis_type_pie.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypePie title: "visTypePie" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypePie plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypePie'] --- import visTypePieObj from './vis_type_pie.devdocs.json'; diff --git a/api_docs/vis_type_table.mdx b/api_docs/vis_type_table.mdx index f3a9f7c687ad0..15e4ae2a83001 100644 --- a/api_docs/vis_type_table.mdx +++ b/api_docs/vis_type_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTable title: "visTypeTable" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTable plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTable'] --- import visTypeTableObj from './vis_type_table.devdocs.json'; diff --git a/api_docs/vis_type_timelion.mdx b/api_docs/vis_type_timelion.mdx index 5163d494e5f8a..16b23c3b66f64 100644 --- a/api_docs/vis_type_timelion.mdx +++ b/api_docs/vis_type_timelion.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTimelion title: "visTypeTimelion" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTimelion plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTimelion'] --- import visTypeTimelionObj from './vis_type_timelion.devdocs.json'; diff --git a/api_docs/vis_type_timeseries.mdx b/api_docs/vis_type_timeseries.mdx index 4f73fd8f20f6f..679c3cf1e71ed 100644 --- a/api_docs/vis_type_timeseries.mdx +++ b/api_docs/vis_type_timeseries.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTimeseries title: "visTypeTimeseries" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTimeseries plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTimeseries'] --- import visTypeTimeseriesObj from './vis_type_timeseries.devdocs.json'; diff --git a/api_docs/vis_type_vega.mdx b/api_docs/vis_type_vega.mdx index cc64d4e78b68c..36539451ae292 100644 --- a/api_docs/vis_type_vega.mdx +++ b/api_docs/vis_type_vega.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeVega title: "visTypeVega" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeVega plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeVega'] --- import visTypeVegaObj from './vis_type_vega.devdocs.json'; diff --git a/api_docs/vis_type_vislib.mdx b/api_docs/vis_type_vislib.mdx index 46d7fe8f84040..a14d94f4c65f9 100644 --- a/api_docs/vis_type_vislib.mdx +++ b/api_docs/vis_type_vislib.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeVislib title: "visTypeVislib" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeVislib plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeVislib'] --- import visTypeVislibObj from './vis_type_vislib.devdocs.json'; diff --git a/api_docs/vis_type_xy.mdx b/api_docs/vis_type_xy.mdx index 421c4c1f1ccd9..7d4d0ddb60d32 100644 --- a/api_docs/vis_type_xy.mdx +++ b/api_docs/vis_type_xy.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeXy title: "visTypeXy" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeXy plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeXy'] --- import visTypeXyObj from './vis_type_xy.devdocs.json'; diff --git a/api_docs/visualizations.devdocs.json b/api_docs/visualizations.devdocs.json index 2b67d66c94d6a..7ef51b4e90a26 100644 --- a/api_docs/visualizations.devdocs.json +++ b/api_docs/visualizations.devdocs.json @@ -2264,7 +2264,7 @@ "section": "def-common.DatatableColumnType", "text": "DatatableColumnType" }, - "; field?: string | undefined; index?: string | undefined; params?: ", + "; esType?: string | undefined; field?: string | undefined; index?: string | undefined; params?: ", { "pluginId": "fieldFormats", "scope": "common", @@ -6760,7 +6760,7 @@ "label": "VisualizeEmbeddableContract", "description": [], "signature": [ - "{ readonly type: \"visualization\"; readonly id: string; uuid: string; dataViews: ", + "{ readonly id: string; readonly type: \"visualization\"; uuid: string; dataViews: ", { "pluginId": "@kbn/presentation-publishing", "scope": "common", @@ -7261,7 +7261,7 @@ "label": "VisualizeEmbeddableFactoryContract", "description": [], "signature": [ - "{ create: (input: ", + "{ readonly type: \"visualization\"; create: (input: ", { "pluginId": "visualizations", "scope": "public", @@ -7325,7 +7325,7 @@ "section": "def-public.VisualizeEmbeddable", "text": "VisualizeEmbeddable" }, - " | undefined>; readonly type: \"visualization\"; inject: (_state: ", + " | undefined>; inject: (_state: ", { "pluginId": "embeddable", "scope": "common", @@ -8773,7 +8773,7 @@ "section": "def-common.DatatableColumnType", "text": "DatatableColumnType" }, - "; field?: string | undefined; index?: string | undefined; params?: ", + "; esType?: string | undefined; field?: string | undefined; index?: string | undefined; params?: ", { "pluginId": "fieldFormats", "scope": "common", diff --git a/api_docs/visualizations.mdx b/api_docs/visualizations.mdx index bb1c4cd2a60d8..473aff51b6b1f 100644 --- a/api_docs/visualizations.mdx +++ b/api_docs/visualizations.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visualizations title: "visualizations" image: https://source.unsplash.com/400x175/?github description: API docs for the visualizations plugin -date: 2024-03-20 +date: 2024-03-25 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visualizations'] --- import visualizationsObj from './visualizations.devdocs.json'; diff --git a/config/serverless.yml b/config/serverless.yml index 52ba1bbef1071..00d43341d068c 100644 --- a/config/serverless.yml +++ b/config/serverless.yml @@ -11,6 +11,9 @@ xpack.fleet.internal.retrySetupOnBoot: true # Cloud links xpack.cloud.base_url: 'https://cloud.elastic.co' +# Disable preboot phase for serverless +core.lifecycle.disablePreboot: true + # Enable ZDT migration algorithm migrations.algorithm: zdt diff --git a/docs/CHANGELOG.asciidoc b/docs/CHANGELOG.asciidoc index 88a10b5f64d00..42916be46afe8 100644 --- a/docs/CHANGELOG.asciidoc +++ b/docs/CHANGELOG.asciidoc @@ -10,6 +10,7 @@ Review important information about the {kib} 8.x releases. +* <> * <> * <> * <> @@ -60,6 +61,320 @@ Review important information about the {kib} 8.x releases. * <> -- +[[release-notes-8.13.0]] +== {kib} 8.13.0 + +For information about the {kib} 8.13.0 release, review the following information. + +[float] +[[breaking-changes-8.13.0]] +=== Breaking changes + +Breaking changes can prevent your application from optimal operation and performance. +Before you upgrade to 8.13.0, review the breaking changes, then mitigate the impact to your application. + +[discrete] +[[breaking-176879]] +.Removes conditional topics for Kafka outputs +[%collapsible] +==== +*Details* + +The Kafka output no longer supports conditional topics. For more information, refer to ({kibana-pull}176879[#176879]). +==== + +[discrete] +[[breaking-176443]] +.Most Fleet installed integrations are now read-only and labelled with a *Managed* tag in the Kibana UI +[%collapsible] +==== +*Details* + + +Integration content installed by {fleet} is no longer editable. This content is tagged with *Managed* in the {kib} UI, and is Elastic managed. This content cannot be edited or deleted, however managed visualizations, dashboards, and saved searches can be cloned. The clones can be customized. + +When cloning a dashboard the cloned panels become entirely independent copies that are unlinked from the original configurations and dependencies. + +Managed content relating to specific visualization editors such as Lens, TSVB, and Maps, the clones retain the original reference configurations. The same applies to editing any saved searches in a managed visualization. + +For more information, refer to ({kibana-pull}172393[#172393]). +==== + +[discrete] +[[breaking-174674]] +.Removes `is_nan`, `is_finite`, and `is_infinite` functions from {esql} +[%collapsible] +==== +*Details* + +These functions have been removed from {esql} queries as they are not supported. Errors would be thrown when trying to use them. For more information, refer to ({kibana-pull}174674[#174674]). +==== + +[float] +[[features-8.13.0]] +=== Features +{kib} 8.13.0 adds the following new and notable features. + +Alerting:: +* The Custom Threshold rule is now out of technical preview and generally available ({kibana-pull}176514[#176514]). +* Adds threshold to the custom threshold alert document ({kibana-pull}176043[#176043]). +* Adds the ability to post Block Kit messages to the Slack Web API action ({kibana-pull}174303[#174303]). +* Adds criticality fields and risk score fields to alert schema ({kibana-pull}174626[#174626]). +* Adds fields table to rule details page alert flyout ({kibana-pull}172830[#172830]). +APM:: +* Show Universal Profiling on Transaction view ({kibana-pull}176302[#176302]). +* Adds a specific metrics dashboard for opentelemetry-node services ({kibana-pull}174700[#174700]). +Dashboards:: +* Adds the creating of {esql} charts from the dashboard ({kibana-pull}171973[#171973]). +Elastic Security:: +For the Elastic Security 8.13.0 release information, refer to {security-guide}/release-notes.html[_Elastic Security Solution Release Notes_]. +{esql}:: +* Adds enhanced {esql} query editing experience with client side validation ({kibana-pull}170071[#170071]). +Fleet:: +* Adds reference to `ecs@mappings` for each index template ({kibana-pull}174855[#174855]). +* Adds support for the `subobjects` setting on the object type mapping ({kibana-pull}171826[#171826]). +Infrastructure:: +* Adds a new Services component to host details UI ({kibana-pull}176539[#176539]). +Integrations:: +* Adds tiles for Notion and Redis connectors ({kibana-pull}177306[#177306]). +Lens & Visualizations:: +* Adds workspace panel dimensions by chart type ({kibana-pull}168651[#168651]). +Machine Learning:: +* Adds the single metric viewer embeddable for dashboards ({kibana-pull}175857[#175857]). +* Adds support for {esql} in Data visualizer ({kibana-pull}174188[#174188]). +Management:: +* Adds a method of excluding data tiers when getting a field list ({kibana-pull}167946[#167946]). +Reporting:: +* Adds support for 'auto' value for CSV scrolling duration ({kibana-pull}175005[#175005]). +* Adds CSV reporting with {esql} in Discover ({kibana-pull}174511[#174511]). +Observability:: +* Adds actions column ({kibana-pull}175872[#175872]). +* Adds resource column with tooltip ({kibana-pull}175287[#175287]). +* Adds support for the Timeslice Metric visualization on the SLO detail page ({kibana-pull}175281[#175281]). +* Refactor alert table registration and change default columns ({kibana-pull}175119[#175119]). +* Adds customization for virtual columns and add the 1st virtual column ({kibana-pull}173732[#173732]). +* Adds a new option, Visualize this query, to the generated {esql} quires in the Elastic Assistant ({kibana-pull}174677[#174677]). + +For more information about the features introduced in 8.13.0, refer to <>. + +[[enhancements-and-bug-fixes-v8.13.0]] +=== Enhancements and bug fixes + +For detailed information about the 8.13.0 release, review the enhancements and bug fixes. + +[float] +[[enhancement-v8.13.0]] +=== Enhancements +Alerting:: +* Improve default AlertsTable columns configuration ({kibana-pull}176137[#176137]). +* Evenly distribute bulk-enabled alerting rules ({kibana-pull}172742[#172742]). +* Implement a mechanism to copy source data into the alerts-as-data documents for ES Query rules ({kibana-pull}171129[#171129]). +APM:: +* Adds detectors for anomaly rules creation ({kibana-pull}171901[#171901]). +* Allows Universal Profiling agent to send error frames ({kibana-pull}176537[#176537]). +* Adds Azure settings ({kibana-pull}176386[#176386]). +* Adds table search to services, transactions and errors ({kibana-pull}174490[#174490]). +* Adds memoization to hooks consumed on service inventory page ({kibana-pull}173973[#173973]). +* Adds stack traces Threads embeddable ({kibana-pull}173905[#173905]). +* Enhances the diff topN functions ({kibana-pull}173397[#173397]). +* Updates Indices API to support sourcemap parameters ({kibana-pull}177847[#177847]). +* Fixes sorting instances table results on server-side ({kibana-pull}174164[#174164]). +Cases:: +* Required custom fields now support default values, which will be used to automatically populate the custom fields if they are not defined when creating and updating cases ({kibana-pull}175961[#175961]). +* Persists all filter options of the cases table, including custom fields, in the URL. The filtering is also persisted when navigating back and forth between pages ({kibana-pull}175237[#175237]). +* Enables the alerts table for cases in the Stack Management ({kibana-pull}172217[#172217]). +Dashboard:: +* Adds step setting for range slider control ({kibana-pull}174717[#174717]). +* Adds a deprecation badge in Dashboard on legacy control panels ({kibana-pull}174302[#174302]). +* Adds external link icon to external URL links in the Links panel ({kibana-pull}174407[#174407]). +* Re-adds filtering settings in the Control settings UI ({kibana-pull}172857[#172857]). +* Adds number field support the the Options List control({kibana-pull}172106[#172106]). +Discover:: +* Hides the Empty fields section if there are no fields in it ({kibana-pull}172956[#172956]). +* Adds data table header row height configuration ({kibana-pull}175501[#175501]). +* Adds new fields ingested in the background to the field list with valid mappings ({kibana-pull}172329[#172329]). +* Adds caching to data view field list request with a `stale-while-revalidate` strategy ({kibana-pull}168910[#168910]). +* Distinguish among empty and available fields in Discover {esql} mode ({kibana-pull}174585[#174585]). +Elastic Security:: +For the Elastic Security 8.13.0 release information, refer to {security-guide}/release-notes.html[_Elastic Security Solution Release Notes_]. +Elastic Search:: +* Adds `ignore_empty_value` to generated set processor ({kibana-pull}175172[#175172]). +{esql}:: +* Adds clickable badges on compact view for {esql} queries ({kibana-pull}176568[#176568]). +* Adds link on the documentation popover to navigate to our external docs ({kibana-pull}176377[#176377]). +* Adds support for canceling {esql} queries in *Lens* ({kibana-pull}176277[#176277]). +* Adds quick fixes feature to {esql} query validation errors ({kibana-pull}175553[#175553]). +* Adds support for command settings ({kibana-pull}175114[#175114]). +* Allows line breaks on the {esql} editor ({kibana-pull}173596[#173596]). +Fleet:: +* Adds `skipRateLimitCheck` flag to the Upgrade API and Bulk_upgrade API ({kibana-pull}176923[#176923]). +* Adds making datastream rollover lazy ({kibana-pull}176565[#176565]). +* Stops creating the `{type}-{datastet}@custom` component template during package installation ({kibana-pull}175469[#175469]). +* Adds the `xpack.fleet.isAirGapped` flag ({kibana-pull}174214[#174214]). +* Adds a warning when download upgrade is failing ({kibana-pull}173844[#173844]). +* Adds a message explaining why an agent is not upgradeable ({kibana-pull}173253[#173253]). +* Makes logs-* and metrics-* data views available across all spaces ({kibana-pull}172991[#172991]). +* Adds flag for pre-release to templates/inputs endpoint ({kibana-pull}174471[#174471]). +* Adds concurrency control to Fleet data stream API handler ({kibana-pull}174087[#174087]). +* Adds a handlebar helper to percent encode a given string ({kibana-pull}173119[#173119]). +Integrations:: +* Enables minute frequency for incremental syncs ({kibana-pull}176603[#176603]). +Lens & Visualizations:: +* Datatable improvements in *Lens* ({kibana-pull}174994[#174994]). +* Adds IP Prefix Aggregation-based Visualization ({kibana-pull}173474[#173474]). +* Displays the suggestions on the dataview mode charts in *Lens* ({kibana-pull}172924[#172924]). +* Enables treemap in suggestions in *Lens* ({kibana-pull}169095[#169095]). +Machine Learning:: +* AIOps: Adds UI action for Change Point Detection embeddable to open in the ML app ({kibana-pull}176694[#176694]). +* AIOps: Enhances display of results for alias field types in pattern analysis ({kibana-pull}176586[#176586]). +* Enhances support for {esql} Data visualizer ({kibana-pull}176515[#176515]). +* Adds a prompt to delete alerting rules upon the anomaly detection job deletion ({kibana-pull}176049[#176049]). +* Adds grok highlighting to the file data visualizer ({kibana-pull}175913[#175913]). +* Adds a warning if trained model is referenced by the `_inference` API ({kibana-pull}175880[#175880]). +* Adds a feedback button to anomaly explorer and single metric viewer for metrics hosts anomaly detection jobs ({kibana-pull}175613[#175613]). +* Adds actions menu to anomaly markers in Single Metric Viewer chart ({kibana-pull}175556[#175556]). +* AIOps: Adds expanded rows to pattern analysis table ({kibana-pull}175320[#175320]). +* AIOps: Adds link to log rate analysis from anomaly table ({kibana-pull}175289[#175289]). +* AIOps: Improves pattern analysis refresh behavior ({kibana-pull}174516[#174516]). +* Adds option for using table layout in the Change Point Detection embeddable ({kibana-pull}174348[#174348]). +* Adds high count option to the anomaly detection categorization wizard ({kibana-pull}174252[#174252]). +* Improves Data drift time range selection & shows hints for analysis process ({kibana-pull}174049[#174049]). +* Adds link to anomaly detection job creation from the alerting rule form ({kibana-pull}174016[#174016]). +* Adds warning for legacy method for installing pre-configured APM transaction job ({kibana-pull}173375[#173375]). +* Enhances toast notifications to improve error reporting ({kibana-pull}173362[#173362]). +* Adds document count chart for file upload ({kibana-pull}173210[#173210]). +* Trained models: Adds workflow for creating an ingest pipeline for a trained model ({kibana-pull}170902[#170902]). +* Updates alerts-as-data payload for Anomaly detection health and Transform health rules ({kibana-pull}176307[#176307]). +Management:: +* Changes the column "Components" in the index templates table to display number of component templates ({kibana-pull}175823[#175823]). +Maps:: +* Adds support in maps for the {esql} `geo_shape` column type ({kibana-pull}175156[#175156]). +* Adds a {esql} card to the add layer UI in maps ({kibana-pull}173481[#173481]). +* Displays vector tile results in vector tile inspector ({kibana-pull}172627[#172627]). +Observability:: +* Enable burn rate alert by default during creation via UI ({kibana-pull}176317[#176317]). +* Implements Bedrock support for the Claude models ({kibana-pull}176191[#176191]). +* Adds link for AI Assistant in Observability left hand navigation ({kibana-pull}176144[#176144]). +* Handle token limit error message improvement ({kibana-pull}175871[#175871]). +* Corrects common {esql} mistakes ({kibana-pull}175520[#175520]). +* Adds resource column with tooltip ({kibana-pull}175287[#175287]). +* Adds alert fields table to Observability flyout ({kibana-pull}174685[#174685]). +Platform:: +* Adds an option to disable APM user redaction ({kibana-pull}176566[#176566]). +Reporting:: +* Updated CSV export to insert error messages into the contents if the export results in an empty file due to an error ({kibana-pull}175852[#175852]). +* Adds setting to use PIT or Scroll API ({kibana-pull}174980[#174980]). +Security:: +* Default value of `server.securityResponseHeaders.referrerPolicy` changed to `strict-origin-when-cross-origin` ({kibana-pull}177559[#177559]). +* Adds server side validation for uploaded file types ({kibana-pull}173960[#173960]). +Sharing:: +* Show 'View details' UI action to open clusters inspector tab when request fails ({kibana-pull}172971[#172971]). +Unified Search:: +* Adds 'greater than or equals to' and 'less than' options to filter options for date ranges and numbers ({kibana-pull}174283[#174283]). +* Adds a one minute option to the date picker ({kibana-pull}172944[#172944]). +* Adds multiple improvements to saved query management ({kibana-pull}170599[#170599]). + +[float] +[[fixes-v8.13.0]] +=== Bug Fixes +Alerting:: +* Fixes Elasticsearch query rule with KQL evaluation matched document count ({kibana-pull}176620[#176620]). +* Fixes alerts not being visible when number of alerts are more than max alert limit ({kibana-pull}178019[#178019]). +* Fixes `ruleClient.getAlertState` error when a task is no longer available ({kibana-pull}177077[#177077]). +* Fixes AlertsTable sorting with inactive columns and default sort direction ({kibana-pull}176172[#176172]). +APM:: +* Fixes an infinite loop caused by matching child and parent IDs ({kibana-pull}177914[#177914]). +* Fixes inconsistencies on Service Overview page ({kibana-pull}176293[#176293]). +* Fixes occurrences cut off value to be fully visible ({kibana-pull}175307[#175307]). +Cases:: +* Fixes a bug where if there are required custom fields on a case whose values are empty, it is not possible to update any of those fields ({kibana-pull}176574[#176574]). +Dashboard:: +* Fixes hidden add panel popover on smaller viewports ({kibana-pull}178593[#178593]). +* Fixes form validation when saving Links to library ({kibana-pull}176021[#176021]). +Design:: +* Fixes a11y concerns ({kibana-pull}174772[#174772]). +Discover:: +* Update full screen handling to fix z-index issues in {kib} ({kibana-pull}178788[#178788]). +* Fixes "New" link in {esql} mode ({kibana-pull}177038[#177038]). +* Fixes grid column settings on Surrounding Documents page ({kibana-pull}177003[#177003]). +* Fixes time zone for field popover histogram and removes `getTimeZone` duplicates ({kibana-pull}172705[#172705]). +* Fixes including global filters when opening a saved search ({kibana-pull}175814[#175814]). +* Fixes loading a missing data view in the case where it's not provided by the consuming plugin ({kibana-pull}173017[#173017]). +Elastic Security:: +For the Elastic Security 8.13.0 release information, refer to {security-guide}/release-notes.html[_Elastic Security Solution Release Notes_]. +Elastic Search:: +* Fixes minor problems with integrations for Enterprise Search ({kibana-pull}177570[#177570]). +Fleet:: +* Fixes a bug where secret values were not deleted on output type change ({kibana-pull}178964[#178964]). +* Fixes formatting for some integrations on the overview page ({kibana-pull}178937[#178937]). +* Fixes the name of {es} output workers configuration key ({kibana-pull}178329[#178329]). +* Fixes clean up of the `.fleet-policies` entries when deleting an agent policy. ({kibana-pull}178276[#178276]). +* Fixes only showing remote {es} output health status if later than last updated time ({kibana-pull}177685[#177685]). +* Fixes status summary when `showUpgradeable` is selected ({kibana-pull}177618[#177618]). +* Fixes issue of agent sometimes not getting inputs using a new agent policy with system integration ({kibana-pull}177594[#177594]). +* Fixes the activity flyout keeping the scroll state on rerender ({kibana-pull}177029[#177029]). +* Fixes inactive popover tour not resetting ({kibana-pull}176929[#176929]). +* Fixes `isPackageVersionOrLaterInstalled` to check for installed package ({kibana-pull}176532[#176532]). +* Removes pre-release exception for Synthetics package ({kibana-pull}176249[#176249]). +* Fixes output validation when creating package policy ({kibana-pull}175985[#175985]). +* Fixes allowing an agent to upgrade to a newer patch version than fleet-server ({kibana-pull}175775[#175775]). +* Fixes asset creation during custom integration installation ({kibana-pull}174869[#174869]). +* Fixes cascading agent policy's namespace to package policies ({kibana-pull}174776[#174776]). +Infrastructure:: +* Fixing derivative aggregation on kubernetes pods ({kibana-pull}177295[#177295]). +Lens & Visualizations:: +* Fixes handling of `doc_count` on time shift scenarios ({kibana-pull}178394[#178394]). +* Fixes the title of a formula based metric visualization defaulting to `Formula` in *Lens* ({kibana-pull}177299[#177299]). +* Fixes sorting on table when using Last value on date field in *Lens* ({kibana-pull}177288[#177288]). +* Align formatters for point and range annotations in *Lens* ({kibana-pull}177199[#177199]). +* Fixes the mapping of {es} fields ({kibana-pull}176665[#176665]). +* Fixes the display of warnings with additional information ({kibana-pull}176660[#176660]). +* Fixes clicking the editor closing the {esql} documentation popover ({kibana-pull}176394[#176394]). +* Fixes creating or removing layers in *Lens* loosing focus ({kibana-pull}175893[#175893]). +* Fixes using the same adhoc data views for queries with the same index pattern ({kibana-pull}174736[#174736]). +* Fixes the markdown editor not expanding to fill vertical space ({kibana-pull}174276[#174276]). +Machine Learning:: +* Preserves field formatters between rule executions ({kibana-pull}178621[#178621]). +* Fixes quick create geo job created by ID ({kibana-pull}177691[#177691]). +* AIOps: Fixes incomplete edge buckets for change point detection ({kibana-pull}177579[#177579]). +* AIOps: Fixes grouping for fields with large arrays ({kibana-pull}177438[#177438]). +* Fixes Single Metric Viewer's zoom settings in URL are not restored if URL specifies a forecast ID ({kibana-pull}176969[#176969]). +* Adds delay to deletion modal to avoid flickering ({kibana-pull}176424[#176424]). +* Fixes Single Metric Viewer not showing chart for metric functions and mismatch function in tooltip ({kibana-pull}176354[#176354]). +* Fixes multi-match query overriding filters in Data Visualizer and Data Drift ({kibana-pull}176347[#176347]). +* Fixes only enabling apply button in anomaly detection datafeed chart if changes have been made ({kibana-pull}174425[#174425]). +Management:: +* Fixes editing a rollup data view ({kibana-pull}177446[#177446]). +* Fixes showing previously selected no time field setting ({kibana-pull}177221[#177221]). +* Fixes package showing 'Needs authorization' warning even after transform assets were authorized successfully ({kibana-pull}176647[#176647]). +* Removes the polling interval to reload indices in the background ({kibana-pull}174681[#174681]). +* Fixes keeping the filters value in the URL for the indices list ({kibana-pull}174515[#174515]). +* Fixes categorizing fields as empty that never had a value in matching indices ({kibana-pull}174063[#174063]). +* Fixes the badge for managed data streams in Index Management ({kibana-pull}173408[#173408]). +* Some input fields are now disabled when editing managed repositories in Snapshot & Restore ({kibana-pull}173137[#173137]). +* Input fields to change snapshot name and repository are now disabled when editing managed SLM policies in Snapshot & Restore ({kibana-pull}172291[#172291]). +Maps:: +* Fixes Request URL Too Long (414) with heatmap layer when data view has larger number of date fields ({kibana-pull}177900[#177900]). +* Fixes the maps application breaking if you open a map with layers or sources that do not exist (#176419). +Observability:: +* SLOs: Does not display group by cardinality when group by is not selected ({kibana-pull}178133[#178133]). +* Fixes bug in inventory rule for Inbound and Outbound traffic threshold (both preview and executor) ({kibana-pull}177997[#177997]). +* Fixes more lenient parsing of suggestion scores ({kibana-pull}177898[#177898]). +* Fixes refreshing the conversations list on conversation update ({kibana-pull}177897[#177897]). +* Fixes SLO details path is broken when `instanceId` contains a forward slash ({kibana-pull}177843[#177843]). +* Prevents users from picking date fields for the group-by selector ({kibana-pull}177830[#177830]). +* Fixes undefined issue cased due row check missing ({kibana-pull}177293[#177293]). +* Fixes making IDs unique to capture multiple invocations of the same query ({kibana-pull}173433[#173433]). +Querying & Filtering:: +* Fixes autocomplete value suggestions for KQL when the corresponding index has no tier preference set ({kibana-pull}176355[#176355]). +SharedUX:: +* Fixes how sample data test install state is determined in test ({kibana-pull}178529[#178529]). +* Fixed a bug in Stack Management Reporting where the Delete button was not disabled after click ({kibana-pull}173707[#173707]). +Uptime:: +* Require `unifiedSearch` plugin and include in top-level Kibana Context Provider ({kibana-pull}178421[#178421]). +* Omit the request `Content-Type` header if body check is empty ({kibana-pull}178399[#178399]). +* Fixes Certificates page for monitors that have status alert disabled ({kibana-pull}178336[#178336]). +* Fixes allowing Synthetics global parameters to include dashes ({kibana-pull}178054[#178054]). +* Change test now trigger route from GET to POST ({kibana-pull}177093[#177093]). +* Fixes and simplifies write access default behavior ({kibana-pull}177088[#177088]). + [[release-notes-8.12.2]] == {kib} 8.12.2 diff --git a/docs/developer/plugin-list.asciidoc b/docs/developer/plugin-list.asciidoc index 241dcd5f73648..4cc89a89659b5 100644 --- a/docs/developer/plugin-list.asciidoc +++ b/docs/developer/plugin-list.asciidoc @@ -753,6 +753,10 @@ Elastic. It uses Chromium and Puppeteer underneath to run the browser in headless mode. +|{kib-repo}blob/{branch}/x-pack/plugins/search_playground/README.md[searchPlayground] +|The Search Playground is a tool for developers to experiment with their own data using LLMs. + + |{kib-repo}blob/{branch}/x-pack/plugins/searchprofiler/README.md[searchprofiler] |The search profiler consumes the Profile API by sending a search API with profile: true enabled in the request body. The response contains diff --git a/docs/settings/fleet-settings.asciidoc b/docs/settings/fleet-settings.asciidoc index f20094837b3e7..7a2b427d0fa9c 100644 --- a/docs/settings/fleet-settings.asciidoc +++ b/docs/settings/fleet-settings.asciidoc @@ -137,7 +137,7 @@ List of agent policies that are configured when the {fleet} app starts. `namespace`:::: String identifying this policy's namespace. `inputs`:::: - Array that overrides any default input settings for this integration. Follows the same schema as integration inputs, with the exception that any object in `vars` can be passed `frozen: true` in order to prevent that specific `var` from being edited by the user. + Map of input for the integration. Follows the same schema as the package policy API inputs, with the exception that any object in `vars` can be passed `frozen: true` in order to prevent that specific `var` from being edited by the user. ======= ===== + @@ -151,27 +151,25 @@ xpack.fleet.packages: xpack.fleet.agentPolicies: - name: Preconfigured Policy - id: 1 + id: preconfigured-policy namespace: test package_policies: - package: name: system name: System Integration + namespace: test id: preconfigured-system inputs: - - type: system/metrics + system-system/metrics: enabled: true vars: - - name: system.hostfs - value: home/test + '[system.hostfs]': home/test streams: - - data_stream: - dataset: system.core + '[system.core]': enabled: true vars: - - name: period - value: 20s - - type: winlog + period: 20s + system-winlog: enabled: false ---- diff --git a/docs/settings/reporting-settings.asciidoc b/docs/settings/reporting-settings.asciidoc index ab80c11139a50..e19065a533adc 100644 --- a/docs/settings/reporting-settings.asciidoc +++ b/docs/settings/reporting-settings.asciidoc @@ -254,11 +254,10 @@ Enables a check that warns you when there's a potential formula included in the Escape formula values in cells with a `'`. See OWASP: https://www.owasp.org/index.php/CSV_Injection. Defaults to `true`. `xpack.reporting.csv.enablePanelActionDownload`:: -deprecated:[7.9.0,This setting has no effect.] Enables CSV export from a saved search on a dashboard. This action is available in the dashboard panel menu for the saved search. -[NOTE] -============ -This setting exists for backwards compatibility, and is hardcoded to `true`. CSV export from a saved search on a dashboard is enabled when Reporting is enabled. -============ +deprecated:[8.14.0,This setting will be removed in an upcoming version of {kib}.] When `true`, this +setting enables a deprecated feature which allows users to download a CSV export from a saved search +panel on a dashboard. When `false`, users can generate regular CSV reports from a saved search panel on a +dashboard and later download them in *Stack Management > Reporting*. Defaults to `false`. `xpack.reporting.csv.useByteOrderMarkEncoding`:: Adds a byte order mark (`\ufeff`) at the beginning of the CSV file. Defaults to `false`. diff --git a/docs/setup/configuring-reporting.asciidoc b/docs/setup/configuring-reporting.asciidoc index 5828c740d1254..5b207c7e75e5a 100644 --- a/docs/setup/configuring-reporting.asciidoc +++ b/docs/setup/configuring-reporting.asciidoc @@ -139,7 +139,7 @@ PUT :/api/security/role/custom_reporting_user // CONSOLE <1> Grants access to generate PNG and PDF reports in *Dashboard*. -<2> Grants access to download CSV files from saved search panels in *Dashboard*. +<2> Grants access to generate CSV reports from saved search panels in *Dashboard*. <3> Grants access to generate CSV reports from saved searches in *Discover*. <4> Grants access to generate PDF reports in *Canvas*. <5> Grants access to generate PNG and PDF reports in *Visualize Library*. @@ -176,7 +176,7 @@ PUT localhost:5601/api/security/role/custom_reporting_user // CONSOLE <1> Grants access to generate CSV reports from saved searches in *Discover*. -<2> Grants access to download CSV reports from saved search panels in *Dashboard*. +<2> Grants access to generate CSV reports from saved search panels in *Dashboard*. [float] [[grant-user-access-external-provider]] diff --git a/docs/user/alerting/action-variables.asciidoc b/docs/user/alerting/action-variables.asciidoc index 6fe275547004c..7dbcb2a49e400 100644 --- a/docs/user/alerting/action-variables.asciidoc +++ b/docs/user/alerting/action-variables.asciidoc @@ -39,6 +39,7 @@ All rule types pass the following variables: `rule.params`:: The rule parameters, which vary by rule type. `rule.spaceId`:: The space identifier for the rule. `rule.tags`:: The list of tags applied to the rule. +`rule.url`:: The URL for the rule that generated the alert. This will be an empty string if the `server.publicBaseUrl` setting is not configured. [float] [role="child_attributes"] @@ -107,6 +108,7 @@ If the rule's action frequency is not a summary of alerts, it passes the followi `alert.actionGroup`:: The ID of the action group of the alert that scheduled the action. `alert.actionGroupName`:: The name of the action group of the alert that scheduled the action. `alert.actionSubgroup`:: The action subgroup of the alert that scheduled the action. +`alert.consecutiveMatches`:: The number of consecutive runs that meet the rule conditions. `alert.flapping`:: A flag on the alert that indicates whether the alert status is changing repeatedly. `alert.id`:: The ID of the alert that scheduled the action. `alert.uuid`:: A universally unique identifier for the alert. While the alert is active, the UUID value remains unchanged each time the rule runs. preview:[] diff --git a/docs/user/discover.asciidoc b/docs/user/discover.asciidoc index d60ccb2ccd0de..ddd06b06c9cd8 100644 --- a/docs/user/discover.asciidoc +++ b/docs/user/discover.asciidoc @@ -334,6 +334,11 @@ For more about this and other rules provided in {alert-features}, go to <> to better meet your needs. +[float] +=== Troubleshooting + +* {blog-ref}troubleshooting-guide-common-issues-kibana-discover-load[Learn how to resolve common issues with Discover.] + -- include::{kibana-root}/docs/discover/document-explorer.asciidoc[] diff --git a/docs/user/reporting/index.asciidoc b/docs/user/reporting/index.asciidoc index d66563bec0ae2..318a901b15e4c 100644 --- a/docs/user/reporting/index.asciidoc +++ b/docs/user/reporting/index.asciidoc @@ -15,7 +15,7 @@ You access the options from the *Share* menu in the toolbar. The sharing options * *PNG Reports* — Generate and download PNG files of dashboards and visualizations. PNG reports are a link:https://www.elastic.co/subscriptions[subscription feature]. -* *CSV Reports* — Generate and download CSV files of saved searches. <>. +* *CSV Reports* — Generate CSV reports of saved searches. <>. * *CSV Download* — Generate and download CSV files of *Lens* visualizations. diff --git a/examples/embeddable_examples/public/plugin.ts b/examples/embeddable_examples/public/plugin.ts index 83c5b911dc8e4..7f2a5b6a26152 100644 --- a/examples/embeddable_examples/public/plugin.ts +++ b/examples/embeddable_examples/public/plugin.ts @@ -39,6 +39,8 @@ import { registerMarkdownEditorEmbeddable } from './react_embeddables/eui_markdo import { registerCreateEuiMarkdownAction } from './react_embeddables/eui_markdown/create_eui_markdown_action'; import { registerFieldListFactory } from './react_embeddables/field_list/field_list_react_embeddable'; import { registerCreateFieldListAction } from './react_embeddables/field_list/create_field_list_action'; +import { registerSearchEmbeddableFactory } from './react_embeddables/search/register_search_embeddable_factory'; +import { registerAddSearchPanelAction } from './react_embeddables/search/register_add_search_panel_action'; export interface EmbeddableExamplesSetupDependencies { embeddable: EmbeddableSetup; @@ -118,6 +120,12 @@ export class EmbeddableExamplesPlugin registerMarkdownEditorEmbeddable(); registerCreateEuiMarkdownAction(deps.uiActions); + registerSearchEmbeddableFactory({ + data: deps.data, + dataViews: deps.dataViews, + }); + registerAddSearchPanelAction(deps.uiActions); + return { createSampleData: async () => {}, factories: this.exampleEmbeddableFactories as ExampleEmbeddableFactories, diff --git a/examples/embeddable_examples/public/react_embeddables/eui_markdown/eui_markdown_react_embeddable.tsx b/examples/embeddable_examples/public/react_embeddables/eui_markdown/eui_markdown_react_embeddable.tsx index f1aeac5d04dce..e7f4cc5daedfd 100644 --- a/examples/embeddable_examples/public/react_embeddables/eui_markdown/eui_markdown_react_embeddable.tsx +++ b/examples/embeddable_examples/public/react_embeddables/eui_markdown/eui_markdown_react_embeddable.tsx @@ -9,12 +9,15 @@ import { EuiMarkdownEditor, EuiMarkdownFormat } from '@elastic/eui'; import { css } from '@emotion/react'; import { - initializeReactEmbeddableTitles, ReactEmbeddableFactory, registerReactEmbeddableFactory, } from '@kbn/embeddable-plugin/public'; import { i18n } from '@kbn/i18n'; -import { useInheritedViewMode, useStateFromPublishingSubject } from '@kbn/presentation-publishing'; +import { + initializeTitles, + useInheritedViewMode, + useStateFromPublishingSubject, +} from '@kbn/presentation-publishing'; import { euiThemeVars } from '@kbn/ui-theme'; import React from 'react'; import { BehaviorSubject } from 'rxjs'; @@ -40,7 +43,7 @@ const markdownEmbeddableFactory: ReactEmbeddableFactory< /** * initialize state (source of truth) */ - const { titlesApi, titleComparators, serializeTitles } = initializeReactEmbeddableTitles(state); + const { titlesApi, titleComparators, serializeTitles } = initializeTitles(state); const content$ = new BehaviorSubject(state.content); /** diff --git a/examples/embeddable_examples/public/react_embeddables/eui_markdown/types.ts b/examples/embeddable_examples/public/react_embeddables/eui_markdown/types.ts index c8fd99d842333..31678aa4a2a33 100644 --- a/examples/embeddable_examples/public/react_embeddables/eui_markdown/types.ts +++ b/examples/embeddable_examples/public/react_embeddables/eui_markdown/types.ts @@ -6,12 +6,10 @@ * Side Public License, v 1. */ -import { - DefaultEmbeddableApi, - SerializedReactEmbeddableTitles, -} from '@kbn/embeddable-plugin/public'; +import { DefaultEmbeddableApi } from '@kbn/embeddable-plugin/public'; +import { SerializedTitles } from '@kbn/presentation-publishing'; -export type MarkdownEditorSerializedState = SerializedReactEmbeddableTitles & { +export type MarkdownEditorSerializedState = SerializedTitles & { content: string; }; diff --git a/examples/embeddable_examples/public/react_embeddables/field_list/field_list_react_embeddable.tsx b/examples/embeddable_examples/public/react_embeddables/field_list/field_list_react_embeddable.tsx index ccc40ad7067a7..8f7a4955e301b 100644 --- a/examples/embeddable_examples/public/react_embeddables/field_list/field_list_react_embeddable.tsx +++ b/examples/embeddable_examples/public/react_embeddables/field_list/field_list_react_embeddable.tsx @@ -18,13 +18,12 @@ import { DATA_VIEW_SAVED_OBJECT_TYPE, } from '@kbn/data-views-plugin/public'; import { - initializeReactEmbeddableTitles, ReactEmbeddableFactory, registerReactEmbeddableFactory, } from '@kbn/embeddable-plugin/public'; import { FieldFormatsStart } from '@kbn/field-formats-plugin/public'; import { i18n } from '@kbn/i18n'; -import { useBatchedPublishingSubjects } from '@kbn/presentation-publishing'; +import { initializeTitles, useBatchedPublishingSubjects } from '@kbn/presentation-publishing'; import { LazyDataViewPicker, withSuspense } from '@kbn/presentation-util-plugin/public'; import { euiThemeVars } from '@kbn/ui-theme'; import { @@ -83,8 +82,7 @@ export const registerFieldListFactory = ( }, buildEmbeddable: async (initialState, buildApi) => { const subscriptions = new Subscription(); - const { titlesApi, titleComparators, serializeTitles } = - initializeReactEmbeddableTitles(initialState); + const { titlesApi, titleComparators, serializeTitles } = initializeTitles(initialState); const allDataViews = await dataViews.getIdsWithTitle(); const selectedDataViewId$ = new BehaviorSubject( diff --git a/examples/embeddable_examples/public/react_embeddables/field_list/types.ts b/examples/embeddable_examples/public/react_embeddables/field_list/types.ts index 9e51d89be58a5..347f8683be622 100644 --- a/examples/embeddable_examples/public/react_embeddables/field_list/types.ts +++ b/examples/embeddable_examples/public/react_embeddables/field_list/types.ts @@ -6,12 +6,10 @@ * Side Public License, v 1. */ -import { - DefaultEmbeddableApi, - SerializedReactEmbeddableTitles, -} from '@kbn/embeddable-plugin/public'; +import { DefaultEmbeddableApi } from '@kbn/embeddable-plugin/public'; +import { SerializedTitles } from '@kbn/presentation-publishing'; -export type FieldListSerializedStateState = SerializedReactEmbeddableTitles & { +export type FieldListSerializedStateState = SerializedTitles & { dataViewId?: string; selectedFieldNames?: string[]; }; diff --git a/examples/embeddable_examples/public/react_embeddables/search/build_search_embeddable.tsx b/examples/embeddable_examples/public/react_embeddables/search/build_search_embeddable.tsx new file mode 100644 index 0000000000000..2fe28c6e878fb --- /dev/null +++ b/examples/embeddable_examples/public/react_embeddables/search/build_search_embeddable.tsx @@ -0,0 +1,142 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React, { useEffect, useState } from 'react'; +import fastIsEqual from 'fast-deep-equal'; +import { EuiCallOut } from '@elastic/eui'; +import { BehaviorSubject } from 'rxjs'; +import { TimeRange } from '@kbn/es-query'; +import type { DataView } from '@kbn/data-plugin/common'; +import { StateComparators, useBatchedPublishingSubjects } from '@kbn/presentation-publishing'; +import { ReactEmbeddableApiRegistration } from '@kbn/embeddable-plugin/public/react_embeddable_system/types'; +import { Api, State, Services } from './types'; +import { getCount } from './get_count'; + +export const buildSearchEmbeddable = async ( + state: State, + buildApi: ( + apiRegistration: ReactEmbeddableApiRegistration, + comparators: StateComparators + ) => Api, + services: Services +) => { + const defaultDataView = await services.dataViews.getDefaultDataView(); + const timeRange$ = new BehaviorSubject(state.timeRange); + const dataViews$ = new BehaviorSubject( + defaultDataView ? [defaultDataView] : undefined + ); + const dataLoading$ = new BehaviorSubject(false); + function setTimeRange(nextTimeRange: TimeRange | undefined) { + timeRange$.next(nextTimeRange); + } + + const api = buildApi( + { + dataViews: dataViews$, + timeRange$, + setTimeRange, + dataLoading: dataLoading$, + serializeState: () => { + return { + rawState: { + timeRange: timeRange$.value, + }, + references: [], + }; + }, + }, + { + timeRange: [timeRange$, setTimeRange, fastIsEqual], + } + ); + + const appliedTimeRange$ = new BehaviorSubject( + timeRange$.value ?? api.parentApi?.timeRange$?.value + ); + const subscriptions = api.timeRange$.subscribe((timeRange) => { + appliedTimeRange$.next(timeRange ?? api.parentApi?.timeRange$?.value); + }); + if (api.parentApi?.timeRange$) { + subscriptions.add( + api.parentApi?.timeRange$.subscribe((parentTimeRange) => { + if (timeRange$?.value) { + return; + } + appliedTimeRange$.next(parentTimeRange); + }) + ); + } + + return { + api, + Component: () => { + const [count, setCount] = useState(0); + const [error, setError] = useState(); + const [filters, query, appliedTimeRange] = useBatchedPublishingSubjects( + api.parentApi?.filters$, + api.parentApi?.query$, + appliedTimeRange$ + ); + + useEffect(() => { + return () => { + subscriptions.unsubscribe(); + }; + }, []); + + useEffect(() => { + let ignore = false; + setError(undefined); + if (!defaultDataView) { + return; + } + dataLoading$.next(true); + getCount(defaultDataView, services.data, filters ?? [], query, appliedTimeRange) + .then((nextCount: number) => { + if (ignore) { + return; + } + dataLoading$.next(false); + setCount(nextCount); + }) + .catch((err) => { + if (ignore) { + return; + } + dataLoading$.next(false); + setError(err); + }); + return () => { + ignore = true; + }; + }, [filters, query, appliedTimeRange]); + + if (!defaultDataView) { + return ( + +

Please install a sample data set to run example.

+
+ ); + } + + if (error) { + return ( + +

{error.message}

+
+ ); + } + + return ( +

+ Found {count} from {defaultDataView.name} +

+ ); + }, + }; +}; diff --git a/examples/embeddable_examples/public/react_embeddables/search/get_count.ts b/examples/embeddable_examples/public/react_embeddables/search/get_count.ts new file mode 100644 index 0000000000000..d4cdb2e70cb33 --- /dev/null +++ b/examples/embeddable_examples/public/react_embeddables/search/get_count.ts @@ -0,0 +1,48 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { lastValueFrom } from 'rxjs'; +import { DataPublicPluginStart } from '@kbn/data-plugin/public'; +import { AggregateQuery, Filter, Query, TimeRange } from '@kbn/es-query'; +import type { DataView } from '@kbn/data-plugin/common'; + +export async function getCount( + dataView: DataView, + dataService: DataPublicPluginStart, + filters: Filter[], + query: Query | AggregateQuery | undefined, + timeRange: TimeRange | undefined +) { + const searchSource = await dataService.search.searchSource.create(); + searchSource.setField('index', dataView); + searchSource.setField('size', 0); + searchSource.setField('trackTotalHits', true); + const timeRangeFilter = timeRange + ? dataService.query.timefilter.timefilter.createFilter(dataView, timeRange) + : undefined; + const allFilters = [...filters]; + if (timeRangeFilter) { + allFilters.push(timeRangeFilter); + } + searchSource.setField('filter', allFilters); + if (query) { + searchSource.setField('query', query); + } + // eslint-disable-next-line no-console + console.log('ES request', searchSource.getSearchRequestBody()); + + const { rawResponse: resp } = await lastValueFrom( + searchSource.fetch$({ + legacyHitsTotal: false, + }) + ); + // eslint-disable-next-line no-console + console.log('ES response', resp); + const total = resp.hits.total as { value: number }; + return total?.value ?? 0; +} diff --git a/examples/embeddable_examples/public/react_embeddables/search/register_add_search_panel_action.tsx b/examples/embeddable_examples/public/react_embeddables/search/register_add_search_panel_action.tsx new file mode 100644 index 0000000000000..d136a57fd7590 --- /dev/null +++ b/examples/embeddable_examples/public/react_embeddables/search/register_add_search_panel_action.tsx @@ -0,0 +1,35 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { apiIsPresentationContainer } from '@kbn/presentation-containers'; +import { EmbeddableApiContext } from '@kbn/presentation-publishing'; +import { IncompatibleActionError, UiActionsStart } from '@kbn/ui-actions-plugin/public'; + +export const registerAddSearchPanelAction = (uiActions: UiActionsStart) => { + uiActions.registerAction({ + id: 'CREATE_SEARCH_REACT_EMBEDDABLE', + getDisplayName: () => 'Unified search example', + getDisplayNameTooltip: () => + 'Demonstrates how to use global filters, global time range, panel time range, and global query state in an embeddable', + getIconType: () => 'search', + isCompatible: async ({ embeddable }) => { + return apiIsPresentationContainer(embeddable); + }, + execute: async ({ embeddable }) => { + if (!apiIsPresentationContainer(embeddable)) throw new IncompatibleActionError(); + embeddable.addNewPanel( + { + panelType: 'SEARCH_REACT_EMBEDDABLE', + initialState: {}, + }, + true + ); + }, + }); + uiActions.attachAction('ADD_PANEL_TRIGGER', 'CREATE_SEARCH_REACT_EMBEDDABLE'); +}; diff --git a/examples/embeddable_examples/public/react_embeddables/search/register_search_embeddable_factory.ts b/examples/embeddable_examples/public/react_embeddables/search/register_search_embeddable_factory.ts new file mode 100644 index 0000000000000..a2b4bf7ac6282 --- /dev/null +++ b/examples/embeddable_examples/public/react_embeddables/search/register_search_embeddable_factory.ts @@ -0,0 +1,28 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { + ReactEmbeddableFactory, + registerReactEmbeddableFactory, +} from '@kbn/embeddable-plugin/public'; +import { Api, Services, State } from './types'; + +export const registerSearchEmbeddableFactory = (services: Services) => { + const factory: ReactEmbeddableFactory = { + type: 'SEARCH_REACT_EMBEDDABLE', + deserializeState: (state) => { + return state.rawState as State; + }, + buildEmbeddable: async (state, buildApi) => { + const { buildSearchEmbeddable } = await import('./build_search_embeddable'); + return buildSearchEmbeddable(state, buildApi, services); + }, + }; + + registerReactEmbeddableFactory(factory); +}; diff --git a/examples/embeddable_examples/public/react_embeddables/search/types.ts b/examples/embeddable_examples/public/react_embeddables/search/types.ts new file mode 100644 index 0000000000000..5ba940b2d40b0 --- /dev/null +++ b/examples/embeddable_examples/public/react_embeddables/search/types.ts @@ -0,0 +1,34 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { DataPublicPluginStart } from '@kbn/data-plugin/public'; +import { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public'; +import type { DefaultEmbeddableApi } from '@kbn/embeddable-plugin/public'; +import { TimeRange } from '@kbn/es-query'; +import { + HasParentApi, + PublishesDataLoading, + PublishesDataViews, + PublishesUnifiedSearch, + PublishesWritableUnifiedSearch, +} from '@kbn/presentation-publishing'; + +export interface State { + timeRange: TimeRange | undefined; +} + +export type Api = DefaultEmbeddableApi & + PublishesDataViews & + PublishesDataLoading & + Pick & + Partial>; + +export interface Services { + data: DataPublicPluginStart; + dataViews: DataViewsPublicPluginStart; +} diff --git a/examples/unified_field_list_examples/public/example_drop_zone.tsx b/examples/unified_field_list_examples/public/example_drop_zone.tsx index ba7c0ea4d630b..5774143d7c7c7 100644 --- a/examples/unified_field_list_examples/public/example_drop_zone.tsx +++ b/examples/unified_field_list_examples/public/example_drop_zone.tsx @@ -15,7 +15,7 @@ */ import React, { useMemo } from 'react'; -import { DragDrop, DropOverlayWrapper, DropType, useDragDropContext } from '@kbn/dom-drag-drop'; +import { DropOverlayWrapper, DropType, Droppable, useDragDropContext } from '@kbn/dom-drag-drop'; import { EuiEmptyPrompt, EuiPanel } from '@elastic/eui'; const DROP_PROPS = { @@ -48,8 +48,7 @@ export const ExampleDropZone: React.FC = ({ onDropField }) const isDropAllowed = Boolean(onDroppingField); return ( - = ({ onDropField }) /> - + ); }; diff --git a/package.json b/package.json index 5bb6a0cd6664d..aed319d891fd6 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,7 @@ "@elastic/ecs": "^8.11.1", "@elastic/elasticsearch": "^8.12.2", "@elastic/ems-client": "8.5.1", - "@elastic/eui": "93.3.0", + "@elastic/eui": "93.4.0", "@elastic/filesaver": "1.1.2", "@elastic/node-crypto": "1.2.1", "@elastic/numeral": "^2.5.1", @@ -689,6 +689,7 @@ "@kbn/search-errors": "link:packages/kbn-search-errors", "@kbn/search-examples-plugin": "link:examples/search_examples", "@kbn/search-index-documents": "link:packages/kbn-search-index-documents", + "@kbn/search-playground": "link:x-pack/plugins/search_playground", "@kbn/search-response-warnings": "link:packages/kbn-search-response-warnings", "@kbn/searchprofiler-plugin": "link:x-pack/plugins/searchprofiler", "@kbn/security-hardening": "link:packages/kbn-security-hardening", @@ -883,6 +884,9 @@ "@kbn/watcher-plugin": "link:x-pack/plugins/watcher", "@kbn/xstate-utils": "link:packages/kbn-xstate-utils", "@kbn/zod-helpers": "link:packages/kbn-zod-helpers", + "@langchain/community": "^0.0.20", + "@langchain/core": "^0.1.45", + "@langchain/openai": "^0.0.12", "@loaders.gl/core": "^3.4.7", "@loaders.gl/json": "^3.4.7", "@loaders.gl/shapefile": "^3.4.7", @@ -919,6 +923,7 @@ "@turf/length": "^6.0.2", "@xstate/react": "^3.2.2", "adm-zip": "^0.5.9", + "ai": "^2.2.33", "ajv": "^8.12.0", "ansi-regex": "^6.0.1", "antlr4": "^4.13.1-patch-1", @@ -1119,6 +1124,7 @@ "strip-ansi": "^6.0.0", "styled-components": "^5.1.0", "suricata-sid-db": "^1.0.2", + "swr": "^2.2.5", "symbol-observable": "^1.2.0", "tar": "^6.1.15", "textarea-caret": "^3.1.0", diff --git a/packages/core/chrome/core-chrome-browser-internal/src/ui/header/__snapshots__/header.test.tsx.snap b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/__snapshots__/header.test.tsx.snap index 209e2f1d0c113..f0bae81571603 100644 --- a/packages/core/chrome/core-chrome-browser-internal/src/ui/header/__snapshots__/header.test.tsx.snap +++ b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/__snapshots__/header.test.tsx.snap @@ -194,7 +194,7 @@ Array [ > diff --git a/packages/core/elasticsearch/core-elasticsearch-server-internal/src/elasticsearch_config.test.ts b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/elasticsearch_config.test.ts index 77d1ec7542a7e..ddd4c537204ff 100644 --- a/packages/core/elasticsearch/core-elasticsearch-server-internal/src/elasticsearch_config.test.ts +++ b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/elasticsearch_config.test.ts @@ -34,6 +34,7 @@ test('set correct defaults', () => { "compression": false, "customHeaders": Object {}, "healthCheckDelay": "PT2.5S", + "healthCheckStartupDelay": "PT0.5S", "hosts": Array [ "http://localhost:9200", ], diff --git a/packages/core/elasticsearch/core-elasticsearch-server-internal/src/elasticsearch_config.ts b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/elasticsearch_config.ts index e3d0dba0a2fd1..82ee5e3dd5610 100644 --- a/packages/core/elasticsearch/core-elasticsearch-server-internal/src/elasticsearch_config.ts +++ b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/elasticsearch_config.ts @@ -144,7 +144,10 @@ export const configSchema = schema.object({ } ), apiVersion: schema.string({ defaultValue: DEFAULT_API_VERSION }), - healthCheck: schema.object({ delay: schema.duration({ defaultValue: 2500 }) }), + healthCheck: schema.object({ + delay: schema.duration({ defaultValue: 2500 }), + startupDelay: schema.duration({ defaultValue: 500 }), + }), ignoreVersionMismatch: offeringBasedSchema({ serverless: schema.boolean({ defaultValue: true }), traditional: schema.conditional( @@ -301,10 +304,13 @@ export class ElasticsearchConfig implements IElasticsearchConfig { */ public readonly skipStartupConnectionCheck: boolean; /** - * The interval between health check requests Kibana sends to the Elasticsearch. + * The interval between health check requests Kibana sends to the Elasticsearch before the first green signal. + */ + public readonly healthCheckStartupDelay: Duration; + /** + * The interval between health check requests Kibana sends to the Elasticsearch after the first green signal. */ public readonly healthCheckDelay: Duration; - /** * Whether to allow kibana to connect to a non-compatible elasticsearch node. */ @@ -435,6 +441,7 @@ export class ElasticsearchConfig implements IElasticsearchConfig { this.sniffOnConnectionFault = rawConfig.sniffOnConnectionFault; this.sniffInterval = rawConfig.sniffInterval; this.healthCheckDelay = rawConfig.healthCheck.delay; + this.healthCheckStartupDelay = rawConfig.healthCheck.startupDelay; this.username = rawConfig.username; this.password = rawConfig.password; this.serviceAccountToken = rawConfig.serviceAccountToken; @@ -466,6 +473,10 @@ const readKeyAndCerts = (rawConfig: ElasticsearchConfigType) => { let certificate: string | undefined; let certificateAuthorities: string[] | undefined; + const readFile = (file: string) => { + return readFileSync(file, 'utf8'); + }; + const addCAs = (ca: string[] | undefined) => { if (ca && ca.length) { certificateAuthorities = [...(certificateAuthorities || []), ...ca]; @@ -522,7 +533,3 @@ const readKeyAndCerts = (rawConfig: ElasticsearchConfigType) => { certificateAuthorities, }; }; - -const readFile = (file: string) => { - return readFileSync(file, 'utf8'); -}; diff --git a/packages/core/elasticsearch/core-elasticsearch-server-internal/src/elasticsearch_service.test.ts b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/elasticsearch_service.test.ts index c91db5dc8910c..9ee79a9062973 100644 --- a/packages/core/elasticsearch/core-elasticsearch-server-internal/src/elasticsearch_service.test.ts +++ b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/elasticsearch_service.test.ts @@ -69,6 +69,7 @@ beforeEach(() => { hosts: ['http://1.2.3.4'], healthCheck: { delay: duration(10), + startupDelay: duration(10), }, ssl: { verificationMode: 'none', @@ -182,6 +183,7 @@ describe('#preboot', () => { expect(config).toMatchInlineSnapshot(` Object { "healthCheckDelay": "PT0.01S", + "healthCheckStartupDelay": "PT0.01S", "hosts": Array [ "http://8.8.8.8", ], @@ -400,6 +402,7 @@ describe('#start', () => { expect(config).toMatchInlineSnapshot(` Object { "healthCheckDelay": "PT0.01S", + "healthCheckStartupDelay": "PT0.01S", "hosts": Array [ "http://8.8.8.8", ], diff --git a/packages/core/elasticsearch/core-elasticsearch-server-internal/src/elasticsearch_service.ts b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/elasticsearch_service.ts index 38ee9acdfdaf0..8a75bfb4f8234 100644 --- a/packages/core/elasticsearch/core-elasticsearch-server-internal/src/elasticsearch_service.ts +++ b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/elasticsearch_service.ts @@ -7,7 +7,7 @@ */ import { firstValueFrom, Observable, Subject } from 'rxjs'; -import { map, shareReplay, takeUntil } from 'rxjs/operators'; +import { map, takeUntil } from 'rxjs/operators'; import type { Logger } from '@kbn/logging'; import type { CoreContext, CoreService } from '@kbn/core-base-server-internal'; @@ -98,12 +98,13 @@ export class ElasticsearchService this.client = this.createClusterClient('data', config); const esNodesCompatibility$ = pollEsNodesVersion({ - internalClient: this.client.asInternalUser, - log: this.log, - ignoreVersionMismatch: config.ignoreVersionMismatch, - esVersionCheckInterval: config.healthCheckDelay.asMilliseconds(), kibanaVersion: this.kibanaVersion, - }).pipe(takeUntil(this.stop$), shareReplay({ refCount: true, bufferSize: 1 })); + ignoreVersionMismatch: config.ignoreVersionMismatch, + healthCheckInterval: config.healthCheckDelay.asMilliseconds(), + healthCheckStartupInterval: config.healthCheckStartupDelay.asMilliseconds(), + log: this.log, + internalClient: this.client.asInternalUser, + }).pipe(takeUntil(this.stop$)); this.esNodesCompatibility$ = esNodesCompatibility$; diff --git a/packages/core/elasticsearch/core-elasticsearch-server-internal/src/version_check/ensure_es_version.test.ts b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/version_check/ensure_es_version.test.ts index ec22185a29626..5257be97f26e6 100644 --- a/packages/core/elasticsearch/core-elasticsearch-server-internal/src/version_check/ensure_es_version.test.ts +++ b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/version_check/ensure_es_version.test.ts @@ -131,10 +131,6 @@ describe('mapNodesVersionCompatibility', () => { describe('pollEsNodesVersion', () => { let internalClient: ReturnType; - const getTestScheduler = () => - new TestScheduler((actual, expected) => { - expect(actual).toEqual(expected); - }); beforeEach(() => { internalClient = elasticsearchClientMock.createInternalClient(); @@ -159,7 +155,7 @@ describe('pollEsNodesVersion', () => { pollEsNodesVersion({ internalClient, - esVersionCheckInterval: 1, + healthCheckInterval: 1, ignoreVersionMismatch: false, kibanaVersion: KIBANA_VERSION, log: mockLogger, @@ -186,7 +182,7 @@ describe('pollEsNodesVersion', () => { pollEsNodesVersion({ internalClient, - esVersionCheckInterval: 1, + healthCheckInterval: 1, ignoreVersionMismatch: false, kibanaVersion: KIBANA_VERSION, log: mockLogger, @@ -217,7 +213,7 @@ describe('pollEsNodesVersion', () => { pollEsNodesVersion({ internalClient, - esVersionCheckInterval: 1, + healthCheckInterval: 1, ignoreVersionMismatch: false, kibanaVersion: KIBANA_VERSION, log: mockLogger, @@ -252,7 +248,7 @@ describe('pollEsNodesVersion', () => { pollEsNodesVersion({ internalClient, - esVersionCheckInterval: 1, + healthCheckInterval: 1, ignoreVersionMismatch: false, kibanaVersion: KIBANA_VERSION, log: mockLogger, @@ -276,7 +272,7 @@ describe('pollEsNodesVersion', () => { pollEsNodesVersion({ internalClient, - esVersionCheckInterval: 1, + healthCheckInterval: 1, ignoreVersionMismatch: false, kibanaVersion: KIBANA_VERSION, log: mockLogger, @@ -302,7 +298,7 @@ describe('pollEsNodesVersion', () => { pollEsNodesVersion({ internalClient, - esVersionCheckInterval: 1, + healthCheckInterval: 1, ignoreVersionMismatch: false, kibanaVersion: KIBANA_VERSION, log: mockLogger, @@ -315,77 +311,114 @@ describe('pollEsNodesVersion', () => { }); }); - it('starts polling immediately and then every esVersionCheckInterval', () => { - expect.assertions(1); + describe('marble testing', () => { + const getTestScheduler = () => + new TestScheduler((actual, expected) => { + expect(actual).toEqual(expected); + }); - // @ts-expect-error we need to return an incompatible type to use the testScheduler here - internalClient.nodes.info.mockReturnValueOnce([createNodes('5.1.0', '5.2.0', '5.0.0')]); - // @ts-expect-error we need to return an incompatible type to use the testScheduler here - internalClient.nodes.info.mockReturnValueOnce([createNodes('5.1.1', '5.2.0', '5.0.0')]); - - getTestScheduler().run(({ expectObservable }) => { - const expected = 'a 99ms (b|)'; - - const esNodesCompatibility$ = pollEsNodesVersion({ - internalClient, - esVersionCheckInterval: 100, - ignoreVersionMismatch: false, - kibanaVersion: KIBANA_VERSION, - log: mockLogger, - }).pipe(take(2)); - - expectObservable(esNodesCompatibility$).toBe(expected, { - a: mapNodesVersionCompatibility( - createNodes('5.1.0', '5.2.0', '5.0.0'), - KIBANA_VERSION, - false - ), - b: mapNodesVersionCompatibility( - createNodes('5.1.1', '5.2.0', '5.0.0'), - KIBANA_VERSION, - false - ), + const mockTestSchedulerInfoResponseOnce = (infos: NodesInfo) => { + // @ts-expect-error we need to return an incompatible type to use the testScheduler here + internalClient.nodes.info.mockReturnValueOnce([infos]); + }; + + it('starts polling immediately and then every healthCheckInterval', () => { + expect.assertions(1); + + mockTestSchedulerInfoResponseOnce(createNodes('5.1.0', '5.2.0', '5.0.0')); + mockTestSchedulerInfoResponseOnce(createNodes('5.1.1', '5.2.0', '5.0.0')); + + getTestScheduler().run(({ expectObservable }) => { + const expected = 'a 99ms (b|)'; + + const esNodesCompatibility$ = pollEsNodesVersion({ + internalClient, + healthCheckInterval: 100, + ignoreVersionMismatch: false, + kibanaVersion: KIBANA_VERSION, + log: mockLogger, + }).pipe(take(2)); + + expectObservable(esNodesCompatibility$).toBe(expected, { + a: mapNodesVersionCompatibility( + createNodes('5.1.0', '5.2.0', '5.0.0'), + KIBANA_VERSION, + false + ), + b: mapNodesVersionCompatibility( + createNodes('5.1.1', '5.2.0', '5.0.0'), + KIBANA_VERSION, + false + ), + }); }); }); - }); - it('waits for es version check requests to complete before scheduling the next one', () => { - expect.assertions(2); - - getTestScheduler().run(({ expectObservable }) => { - const expected = '100ms a 99ms (b|)'; - - internalClient.nodes.info.mockReturnValueOnce( - // @ts-expect-error we need to return an incompatible type to use the testScheduler here - of(createNodes('5.1.0', '5.2.0', '5.0.0')).pipe(delay(100)) - ); - internalClient.nodes.info.mockReturnValueOnce( - // @ts-expect-error we need to return an incompatible type to use the testScheduler here - of(createNodes('5.1.1', '5.2.0', '5.0.0')).pipe(delay(100)) - ); - - const esNodesCompatibility$ = pollEsNodesVersion({ - internalClient, - esVersionCheckInterval: 10, - ignoreVersionMismatch: false, - kibanaVersion: KIBANA_VERSION, - log: mockLogger, - }).pipe(take(2)); - - expectObservable(esNodesCompatibility$).toBe(expected, { - a: mapNodesVersionCompatibility( - createNodes('5.1.0', '5.2.0', '5.0.0'), - KIBANA_VERSION, - false - ), - b: mapNodesVersionCompatibility( - createNodes('5.1.1', '5.2.0', '5.0.0'), - KIBANA_VERSION, - false - ), + it('waits for es version check requests to complete before scheduling the next one', () => { + expect.assertions(2); + + getTestScheduler().run(({ expectObservable }) => { + const expected = '100ms a 99ms (b|)'; + + internalClient.nodes.info.mockReturnValueOnce( + // @ts-expect-error we need to return an incompatible type to use the testScheduler here + of(createNodes('5.1.0', '5.2.0', '5.0.0')).pipe(delay(100)) + ); + internalClient.nodes.info.mockReturnValueOnce( + // @ts-expect-error we need to return an incompatible type to use the testScheduler here + of(createNodes('5.1.1', '5.2.0', '5.0.0')).pipe(delay(100)) + ); + + const esNodesCompatibility$ = pollEsNodesVersion({ + internalClient, + healthCheckInterval: 10, + ignoreVersionMismatch: false, + kibanaVersion: KIBANA_VERSION, + log: mockLogger, + }).pipe(take(2)); + + expectObservable(esNodesCompatibility$).toBe(expected, { + a: mapNodesVersionCompatibility( + createNodes('5.1.0', '5.2.0', '5.0.0'), + KIBANA_VERSION, + false + ), + b: mapNodesVersionCompatibility( + createNodes('5.1.1', '5.2.0', '5.0.0'), + KIBANA_VERSION, + false + ), + }); }); + + expect(internalClient.nodes.info).toHaveBeenCalledTimes(2); }); - expect(internalClient.nodes.info).toHaveBeenCalledTimes(2); + it('switch from startup interval to normal interval after first green status', () => { + expect.assertions(1); + + mockTestSchedulerInfoResponseOnce(createNodes('6.3.0')); + mockTestSchedulerInfoResponseOnce(createNodes('5.1.0')); + mockTestSchedulerInfoResponseOnce(createNodes('5.2.0')); + mockTestSchedulerInfoResponseOnce(createNodes('5.3.0')); + + getTestScheduler().run(({ expectObservable }) => { + const esNodesCompatibility$ = pollEsNodesVersion({ + internalClient, + healthCheckInterval: 100, + healthCheckStartupInterval: 50, + ignoreVersionMismatch: false, + kibanaVersion: KIBANA_VERSION, + log: mockLogger, + }).pipe(take(4)); + + expectObservable(esNodesCompatibility$).toBe('a 49ms b 99ms c 99ms (d|)', { + a: expect.any(Object), + b: expect.any(Object), + c: expect.any(Object), + d: expect.any(Object), + }); + }); + }); }); }); diff --git a/packages/core/elasticsearch/core-elasticsearch-server-internal/src/version_check/ensure_es_version.ts b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/version_check/ensure_es_version.ts index caa2dd372b8f3..6f557c02b2638 100644 --- a/packages/core/elasticsearch/core-elasticsearch-server-internal/src/version_check/ensure_es_version.ts +++ b/packages/core/elasticsearch/core-elasticsearch-server-internal/src/version_check/ensure_es_version.ts @@ -11,8 +11,17 @@ * that defined in Kibana's package.json. */ -import { timer, of, from, Observable } from 'rxjs'; -import { map, distinctUntilChanged, catchError, exhaustMap } from 'rxjs/operators'; +import { interval, of, from, Observable, BehaviorSubject } from 'rxjs'; +import { + map, + distinctUntilChanged, + catchError, + exhaustMap, + switchMap, + tap, + startWith, + shareReplay, +} from 'rxjs/operators'; import type { Logger } from '@kbn/logging'; import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import { @@ -26,7 +35,8 @@ export interface PollEsNodesVersionOptions { log: Logger; kibanaVersion: string; ignoreVersionMismatch: boolean; - esVersionCheckInterval: number; + healthCheckInterval: number; + healthCheckStartupInterval?: number; } /** @public */ @@ -149,10 +159,26 @@ export const pollEsNodesVersion = ({ log, kibanaVersion, ignoreVersionMismatch, - esVersionCheckInterval: healthCheckInterval, + healthCheckInterval, + healthCheckStartupInterval, }: PollEsNodesVersionOptions): Observable => { log.debug('Checking Elasticsearch version'); - return timer(0, healthCheckInterval).pipe( + + const hasStartupInterval = + healthCheckStartupInterval !== undefined && healthCheckStartupInterval !== healthCheckInterval; + + const isStartup$ = new BehaviorSubject(hasStartupInterval); + + const checkInterval$ = isStartup$.pipe( + distinctUntilChanged(), + map((useStartupInterval) => + useStartupInterval ? healthCheckStartupInterval! : healthCheckInterval + ) + ); + + return checkInterval$.pipe( + switchMap((checkInterval) => interval(checkInterval)), + startWith(0), exhaustMap(() => { return from( internalClient.nodes.info({ @@ -164,9 +190,16 @@ export const pollEsNodesVersion = ({ }) ); }), - map((nodesInfoResponse: NodesInfo & { nodesInfoRequestError?: Error }) => - mapNodesVersionCompatibility(nodesInfoResponse, kibanaVersion, ignoreVersionMismatch) - ), - distinctUntilChanged(compareNodes) // Only emit if there are new nodes or versions or if we return an error and that error changes + map((nodesInfoResponse: NodesInfo & { nodesInfoRequestError?: Error }) => { + return mapNodesVersionCompatibility(nodesInfoResponse, kibanaVersion, ignoreVersionMismatch); + }), + // Only emit if there are new nodes or versions or if we return an error and that error changes + distinctUntilChanged(compareNodes), + tap((nodesVersionCompatibility) => { + if (nodesVersionCompatibility.isCompatible) { + isStartup$.next(false); + } + }), + shareReplay({ refCount: true, bufferSize: 1 }) ); }; diff --git a/packages/core/elasticsearch/core-elasticsearch-server/src/elasticsearch_config.ts b/packages/core/elasticsearch/core-elasticsearch-server/src/elasticsearch_config.ts index 8ad2faff90249..a11a97f283e36 100644 --- a/packages/core/elasticsearch/core-elasticsearch-server/src/elasticsearch_config.ts +++ b/packages/core/elasticsearch/core-elasticsearch-server/src/elasticsearch_config.ts @@ -14,7 +14,11 @@ import type { ElasticsearchApiToRedactInLogs } from './client'; */ export interface IElasticsearchConfig { /** - * The interval between health check requests Kibana sends to the Elasticsearch. + * The interval between health check requests Kibana sends to the Elasticsearch before the first green signal. + */ + readonly healthCheckStartupDelay: Duration; + /** + * The interval between health check requests Kibana sends to the Elasticsearch after the first green signal. */ readonly healthCheckDelay: Duration; diff --git a/packages/core/overlays/core-overlays-browser-internal/src/modal/__snapshots__/modal_service.test.tsx.snap b/packages/core/overlays/core-overlays-browser-internal/src/modal/__snapshots__/modal_service.test.tsx.snap index c93fae64cf361..ce53f3fbae63c 100644 --- a/packages/core/overlays/core-overlays-browser-internal/src/modal/__snapshots__/modal_service.test.tsx.snap +++ b/packages/core/overlays/core-overlays-browser-internal/src/modal/__snapshots__/modal_service.test.tsx.snap @@ -129,7 +129,9 @@ exports[`ModalService openConfirm() renders a mountpoint confirm message 2`] = ` data-eui="EuiFocusTrap" >
-
-`; - -exports[`DragDrop items that has dropTypes=undefined get special styling when another item is dragged 1`] = ` - - - -`; - -exports[`DragDrop renders if nothing is being dragged 1`] = ` -
- -
-`; diff --git a/packages/kbn-dom-drag-drop/src/drag_drop.test.tsx b/packages/kbn-dom-drag-drop/src/drag_drop.test.tsx deleted file mode 100644 index 09de21fbe3dc9..0000000000000 --- a/packages/kbn-dom-drag-drop/src/drag_drop.test.tsx +++ /dev/null @@ -1,1433 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import React, { Dispatch } from 'react'; -import { render, mount, ReactWrapper } from 'enzyme'; -import { DragDrop } from './drag_drop'; -import { - ChildDragDropProvider, - DragContextState, - ReorderProvider, - DragDropAction, -} from './providers'; -import { act } from 'react-dom/test-utils'; -import { DropType } from './types'; - -jest.useFakeTimers({ legacyFakeTimers: true }); - -const dataTransfer = { - setData: jest.fn(), - getData: jest.fn(), -}; - -describe('DragDrop', () => { - const defaultContextState = { - dragging: undefined, - dataTestSubjPrefix: 'testDragDrop', - activeDropTarget: undefined, - dropTargetsByOrder: undefined, - keyboardMode: false, - }; - - const value = { - id: '1', - humanData: { - label: 'hello', - groupLabel: 'X', - position: 1, - canSwap: true, - canDuplicate: true, - layerNumber: 0, - }, - }; - - test('renders if nothing is being dragged', () => { - const component = render( - - - - ); - - expect(component).toMatchSnapshot(); - }); - - test('dragover calls preventDefault if dropType is defined', () => { - const preventDefault = jest.fn(); - const component = mount( - - - - ); - - component.find('[data-test-subj="domDragDrop"]').at(0).simulate('dragover', { preventDefault }); - - expect(preventDefault).toBeCalled(); - }); - - test('dragover does not call preventDefault if dropTypes is undefined', () => { - const preventDefault = jest.fn(); - const component = mount( - - - - ); - - component.find('[data-test-subj="domDragDrop"]').at(0).simulate('dragover', { preventDefault }); - - expect(preventDefault).not.toBeCalled(); - }); - - test('removes selection on mouse down before dragging', async () => { - const removeAllRanges = jest.fn(); - global.getSelection = jest.fn(() => ({ removeAllRanges } as unknown as Selection)); - const component = mount( - - - - ); - - component.find('[data-test-subj="domDragDrop"]').at(0).simulate('mousedown'); - expect(global.getSelection).toBeCalled(); - expect(removeAllRanges).toBeCalled(); - }); - - test('dragstart sets dragging in the context and calls it with proper params', async () => { - const dndDispatch = jest.fn(); - const component = mount( - - - - - - ); - - component.find('[data-test-subj="testDragDrop"]').at(0).simulate('dragstart', { dataTransfer }); - - act(() => { - jest.runAllTimers(); - }); - - expect(dataTransfer.setData).toBeCalledWith('text', 'hello'); - expect(dndDispatch).toBeCalledWith({ - type: 'startDragging', - payload: { dragging: value }, - }); - }); - - test('dragstart sets dragClassName as expected', async () => { - const dndDispatch = jest.fn(); - const component = mount( - - - - - - ); - const dragDrop = component.find('[data-test-subj="testDragDrop"]').at(0); - - expect(dragDrop.getDOMNode().querySelector('.dragTest')).toBeNull(); - dragDrop.simulate('dragstart', { dataTransfer }); - expect(dragDrop.getDOMNode().querySelector('.dragTest')).toBeDefined(); - - act(() => { - jest.runAllTimers(); - }); - - expect(dragDrop.getDOMNode().querySelector('.dragTest')).toBeNull(); - }); - - test('drop resets all the things', async () => { - const preventDefault = jest.fn(); - const stopPropagation = jest.fn(); - const dndDispatch = jest.fn(); - const onDrop = jest.fn(); - - const component = mount( - - - - - - ); - - const dragDrop = component.find('[data-test-subj="testDragDrop"]').at(0); - dragDrop.simulate('dragOver'); - dndDispatch.mockClear(); - dragDrop.simulate('drop', { preventDefault, stopPropagation }); - - expect(preventDefault).toBeCalled(); - expect(stopPropagation).toBeCalled(); - expect(onDrop).toBeCalledWith({ id: '2', humanData: { label: 'Label1' } }, 'field_add'); - expect(dndDispatch).toBeCalledWith({ type: 'resetState' }); - }); - - test('drop function is not called on dropTypes undefined', async () => { - const preventDefault = jest.fn(); - const stopPropagation = jest.fn(); - const dndDispatch = jest.fn(); - const onDrop = jest.fn(); - - const component = mount( - - - - - - ); - - const dragDrop = component.find('[data-test-subj="testDragDrop"]').at(0); - dragDrop.simulate('dragover'); - dragDrop.simulate('drop', { preventDefault, stopPropagation }); - - expect(preventDefault).not.toHaveBeenCalled(); - expect(stopPropagation).not.toHaveBeenCalled(); - expect(dndDispatch).not.toHaveBeenCalled(); - expect(onDrop).not.toHaveBeenCalled(); - }); - - test('defined dropTypes is reflected in the className', () => { - const component = render( - { - throw x; - }} - dropTypes={['field_add']} - value={value} - order={[2, 0, 1, 0]} - > - - - ); - - expect(component).toMatchSnapshot(); - }); - - test('items that has dropTypes=undefined get special styling when another item is dragged', () => { - const component = mount( - - - - - {}} - dropTypes={undefined} - value={{ id: '2', humanData: { label: 'label2', layerNumber: 0 } }} - > - - - - ); - - expect(component.find('[data-test-subj="testDragDrop"]').at(1)).toMatchSnapshot(); - }); - - test('additional styles are reflected in the className until drop', () => { - let dragging: { id: '1'; humanData: { label: 'Label1' } } | undefined; - const getAdditionalClassesOnEnter = jest.fn().mockReturnValue('additional'); - const getAdditionalClassesOnDroppable = jest.fn().mockReturnValue('droppable'); - const dndDispatch = jest.fn(); - - const component = mount( - - - - - {}} - dropTypes={['field_add']} - getAdditionalClassesOnEnter={getAdditionalClassesOnEnter} - getAdditionalClassesOnDroppable={getAdditionalClassesOnDroppable} - > - - - - ); - - component - .find('[data-test-subj="testDragDrop"]') - .first() - .simulate('dragstart', { dataTransfer }); - act(() => { - jest.runAllTimers(); - }); - - const dragDrop = component.find('[data-test-subj="testDragDrop"]').at(1); - dragDrop.simulate('dragOver'); - dragDrop.simulate('drop'); - expect(component.find('.additional')).toHaveLength(0); - }); - - test('additional enter styles are reflected in the className until dragleave', () => { - let dragging: { id: '1'; humanData: { label: 'Label1' } } | undefined; - const getAdditionalClasses = jest.fn().mockReturnValue('additional'); - const getAdditionalClassesOnDroppable = jest.fn().mockReturnValue('droppable'); - const dndDispatch = jest.fn(() => { - dragging = { id: '1', humanData: { label: 'Label1' } }; - }); - - const component = mount( - - - - - {}} - dropTypes={['field_add']} - getAdditionalClassesOnEnter={getAdditionalClasses} - getAdditionalClassesOnDroppable={getAdditionalClassesOnDroppable} - > - - - - ); - - component - .find('[data-test-subj="testDragDrop"]') - .first() - .simulate('dragstart', { dataTransfer }); - act(() => { - jest.runAllTimers(); - }); - - component.find('[data-test-subj="testDragDrop"]').at(1).simulate('dragover'); - expect(component.find('.additional')).toHaveLength(2); - component.find('[data-test-subj="testDragDrop"]').at(1).simulate('dragleave'); - expect(dndDispatch).toBeCalledWith({ type: 'leaveDropTarget' }); - }); - - describe('Keyboard navigation', () => { - test('User receives proper drop Targets highlighted when pressing arrow keys', () => { - const onDrop = jest.fn(); - const dndDispatch = jest.fn(); - const items = [ - { - draggable: true, - value: { - id: '1', - humanData: { label: 'Label1', position: 1, layerNumber: 0 }, - }, - children: '1', - order: [2, 0, 0, 0], - }, - { - draggable: true, - dragType: 'move' as 'copy' | 'move', - - value: { - id: '2', - - humanData: { label: 'label2', position: 1, layerNumber: 0 }, - }, - onDrop, - dropTypes: ['move_compatible'] as DropType[], - order: [2, 0, 1, 0], - }, - { - draggable: true, - dragType: 'move' as 'copy' | 'move', - value: { - id: '3', - humanData: { - label: 'label3', - position: 1, - groupLabel: 'Y', - canSwap: true, - canDuplicate: true, - layerNumber: 0, - }, - }, - onDrop, - dropTypes: [ - 'replace_compatible', - 'duplicate_compatible', - 'swap_compatible', - ] as DropType[], - order: [2, 0, 2, 0], - }, - { - draggable: true, - dragType: 'move' as 'copy' | 'move', - value: { - id: '4', - humanData: { label: 'label4', position: 2, groupLabel: 'Y', layerNumber: 0 }, - }, - order: [2, 0, 2, 1], - }, - ]; - const component = mount( - , style: {} } }, - activeDropTarget: { ...items[1].value, onDrop, dropType: 'move_compatible' }, - dropTargetsByOrder: { - '2,0,1,0': { ...items[1].value, onDrop, dropType: 'move_compatible' }, - '2,0,2,0,0': { ...items[2].value, onDrop, dropType: 'replace_compatible' }, - '2,0,1,0,1': { ...items[1].value, onDrop, dropType: 'duplicate_compatible' }, - '2,0,1,0,2': { ...items[1].value, onDrop, dropType: 'swap_compatible' }, - }, - keyboardMode: true, - }, - dndDispatch, - ]} - > - {items.map((props) => ( - -
- - ))} - - ); - const keyboardHandler = component - .find('[data-test-subj="testDragDrop-keyboardHandler"]') - .at(1) - .simulate('focus'); - - dndDispatch.mockClear(); - - keyboardHandler.simulate('keydown', { key: 'ArrowRight' }); - expect(dndDispatch).toBeCalledWith({ - type: 'selectDropTarget', - payload: { - dragging: items[0].value, - dropTarget: { - ...items[2].value, - onDrop, - dropType: items[2].dropTypes![0], - }, - }, - }); - - dndDispatch.mockClear(); - - keyboardHandler.simulate('keydown', { key: 'Enter' }); - expect(dndDispatch).toBeCalledWith({ - type: 'endDragging', - payload: { dragging: items[0].value }, - }); - expect(onDrop).toBeCalledWith( - { humanData: { label: 'Label1', position: 1, layerNumber: 0 }, id: '1' }, - 'move_compatible' - ); - }); - - test('dragstart sets dragging in the context and calls it with proper params', async () => { - const dndDispatch = jest.fn(); - const component = mount( - - - - - - ); - - const keyboardHandler = component - .find('[data-test-subj="testDragDrop-keyboardHandler"]') - .at(1) - .simulate('focus'); - - keyboardHandler.simulate('keydown', { key: 'Enter' }); - act(() => { - jest.runAllTimers(); - }); - - expect(dndDispatch).toBeCalledWith({ - type: 'startDragging', - payload: { - keyboardMode: true, - dragging: { - ...value, - ghost: { - children: , - style: { - minHeight: 0, - width: 0, - }, - }, - }, - }, - }); - }); - - test('ActiveDropTarget gets ghost image', () => { - const onDrop = jest.fn(); - const items = [ - { - draggable: true, - value: { - id: '1', - humanData: { label: 'Label1', position: 1, layerNumber: 0 }, - }, - children: '1', - order: [2, 0, 0, 0], - }, - { - draggable: true, - dragType: 'move' as 'copy' | 'move', - - value: { - id: '2', - - humanData: { label: 'label2', position: 1, layerNumber: 0 }, - }, - onDrop, - dropTypes: ['move_compatible'] as DropType[], - order: [2, 0, 1, 0], - }, - ]; - const dndDispatch = jest.fn(); - const component = mount( - Hello
, style: {} } }, - - activeDropTarget: { ...items[1].value, onDrop, dropType: 'move_compatible' }, - dropTargetsByOrder: { - '2,0,1,0': { ...items[1].value, onDrop, dropType: 'move_compatible' }, - }, - keyboardMode: true, - }, - dndDispatch, - ]} - > - {items.map((props) => ( - -
- - ))} - - ); - - expect(component.find(DragDrop).at(1).find('.domDragDrop_ghost').text()).toEqual('Hello'); - }); - }); - - describe('multiple drop targets', () => { - let activeDropTarget: DragContextState['activeDropTarget']; - const dragging = { id: '1', humanData: { label: 'Label1', layerNumber: 0 } }; - const onDrop = jest.fn(); - let dndDispatch = jest.fn(); - let component: ReactWrapper; - beforeEach(() => { - activeDropTarget = undefined; - dndDispatch = jest.fn((val) => { - activeDropTarget = value as DragContextState['activeDropTarget']; - }); - component = mount( - - - - -
{dropType}
} - > - -
-
- ); - }); - test('extra drop targets render correctly', () => { - expect(component.find('.extraDrop').hostNodes()).toHaveLength(2); - }); - - test('extra drop targets appear when dragging over and disappear when activeDropTarget changes', () => { - component.find('[data-test-subj="testDragDropContainer"]').first().simulate('dragenter'); - - // customDropTargets are visible - expect(component.find('[data-test-subj="testDragDropContainer"]').prop('className')).toEqual( - 'domDragDrop__container domDragDrop__container-active' - ); - expect( - component.find('[data-test-subj="testDragDropExtraDrops"]').first().prop('className') - ).toEqual('domDragDrop__extraDrops domDragDrop__extraDrops-visible'); - - // set activeDropTarget as undefined - component.find('[data-test-subj="testDragDrop"]').at(1).simulate('dragleave'); - act(() => { - jest.runAllTimers(); - }); - component.update(); - - // customDropTargets are invisible - expect( - component.find('[data-test-subj="testDragDropExtraDrops"]').first().prop('className') - ).toEqual('domDragDrop__extraDrops'); - }); - - test('dragging over different drop types of the same value assigns correct activeDropTarget', () => { - component - .find('[data-test-subj="testDragDrop"]') - .first() - .simulate('dragstart', { dataTransfer }); - dndDispatch.mockClear(); - component.find('SingleDropInner').at(0).simulate('dragover'); - - expect(dndDispatch).toBeCalledWith({ - type: 'selectDropTarget', - payload: { - dragging, - dropTarget: { - ...value, - dropType: 'move_compatible', - onDrop, - }, - }, - }); - - dndDispatch.mockClear(); - component.find('SingleDropInner').at(1).simulate('dragover'); - expect(dndDispatch).toBeCalledWith({ - type: 'selectDropTarget', - payload: { - dragging, - dropTarget: { - ...value, - dropType: 'duplicate_compatible', - onDrop, - }, - }, - }); - - dndDispatch.mockClear(); - component.find('SingleDropInner').at(2).simulate('dragover'); - expect(dndDispatch).toBeCalledWith({ - type: 'selectDropTarget', - payload: { - dragging, - dropTarget: { - ...value, - dropType: 'swap_compatible', - onDrop, - }, - }, - }); - dndDispatch.mockClear(); - component.find('SingleDropInner').at(2).simulate('dragleave'); - expect(dndDispatch).toBeCalledWith({ type: 'leaveDropTarget' }); - }); - - test('drop on extra drop target passes correct dropType to onDrop', () => { - component - .find('[data-test-subj="testDragDrop"]') - .first() - .simulate('dragstart', { dataTransfer }); - - component.find('SingleDropInner').at(0).simulate('dragover'); - component.find('SingleDropInner').at(0).simulate('drop'); - expect(onDrop).toBeCalledWith( - { humanData: { label: 'Label1', layerNumber: 0 }, id: '1' }, - 'move_compatible' - ); - - component.find('SingleDropInner').at(1).simulate('dragover'); - component.find('SingleDropInner').at(1).simulate('drop'); - expect(onDrop).toBeCalledWith( - { humanData: { label: 'Label1', layerNumber: 0 }, id: '1' }, - 'duplicate_compatible' - ); - - component.find('SingleDropInner').at(2).simulate('dragover'); - component.find('SingleDropInner').at(2).simulate('drop'); - expect(onDrop).toBeCalledWith( - { humanData: { label: 'Label1', layerNumber: 0 }, id: '1' }, - 'swap_compatible' - ); - }); - - test('pressing Alt or Shift when dragging over the main drop target sets extra drop target as active', () => { - component - .find('[data-test-subj="testDragDrop"]') - .first() - .simulate('dragstart', { dataTransfer }); - - // needed to setup activeDropType - component - .find('SingleDropInner') - .at(0) - .simulate('dragover', { altKey: true }) - .simulate('dragover', { altKey: true }); - expect(dndDispatch).toBeCalledWith({ - type: 'selectDropTarget', - payload: { - dragging, - dropTarget: { - ...value, - dropType: 'duplicate_compatible', - onDrop, - }, - }, - }); - - component - .find('SingleDropInner') - .at(0) - .simulate('dragover', { shiftKey: true }) - .simulate('dragover', { shiftKey: true }); - - expect(dndDispatch).toBeCalledWith({ - type: 'selectDropTarget', - payload: { - dragging, - dropTarget: { - ...value, - dropType: 'swap_compatible', - onDrop, - }, - }, - }); - }); - - test('pressing Alt or Shift when dragging over the extra drop target does nothing', () => { - component - .find('[data-test-subj="testDragDrop"]') - .first() - .simulate('dragstart', { dataTransfer }); - - const extraDrop = component.find('SingleDropInner').at(1); - extraDrop.simulate('dragover', { altKey: true }); - extraDrop.simulate('dragover', { shiftKey: true }); - extraDrop.simulate('dragover'); - expect( - dndDispatch.mock.calls.every((call) => { - return call[0].payload.dropTarget.dropType === 'duplicate_compatible'; - }) - ).toBe(true); - }); - describe('keyboard navigation', () => { - const items = [ - { - draggable: true, - value: { - id: '1', - humanData: { label: 'Label1', position: 1, layerNumber: 0 }, - }, - children: '1', - order: [2, 0, 0, 0], - }, - { - draggable: true, - dragType: 'move' as const, - - value: { - id: '2', - - humanData: { label: 'label2', position: 1, layerNumber: 0 }, - }, - onDrop, - dropTypes: ['move_compatible', 'duplicate_compatible', 'swap_compatible'] as DropType[], - order: [2, 0, 1, 0], - }, - { - draggable: true, - dragType: 'move' as const, - value: { - id: '3', - humanData: { label: 'label3', position: 1, groupLabel: 'Y', layerNumber: 0 }, - }, - onDrop, - dropTypes: ['replace_compatible'] as DropType[], - order: [2, 0, 2, 0], - }, - ]; - const assignedDropTargetsByOrder: DragContextState['dropTargetsByOrder'] = { - '2,0,1,0,0': { - ...items[1].value, - onDrop, - dropType: 'move_compatible', - }, - '2,0,1,0,1': { - dropType: 'duplicate_compatible', - humanData: { - label: 'label2', - position: 1, - layerNumber: 0, - }, - id: '2', - onDrop, - }, - '2,0,1,0,2': { - dropType: 'swap_compatible', - humanData: { - label: 'label2', - position: 1, - layerNumber: 0, - }, - id: '2', - onDrop, - }, - '2,0,2,0,0': { - dropType: 'replace_compatible', - humanData: { - groupLabel: 'Y', - label: 'label3', - position: 1, - layerNumber: 0, - }, - id: '3', - onDrop, - }, - }; - test('when pressing enter key, context receives the proper dropTargetsByOrder', () => { - let dropTargetsByOrder: DragContextState['dropTargetsByOrder'] = {}; - - component = mount( - , style: {} } }, - activeDropTarget, - dropTargetsByOrder, - keyboardMode: true, - }, - jest.fn((action) => { - if (action.type === 'registerDropTargets') { - dropTargetsByOrder = { - ...dropTargetsByOrder, - ...action.payload, - }; - } - }), - ]} - > - {items.map((props) => ( - -
- - ))} - - ); - component.find('[data-test-subj="testDragDrop-keyboardHandler"]').at(1).simulate('focus'); - act(() => { - jest.runAllTimers(); - }); - component.update(); - expect(dropTargetsByOrder).toEqual(assignedDropTargetsByOrder); - }); - test('when pressing ArrowRight key with modifier key pressed in, the extra drop target is selected', () => { - component = mount( - , style: {} } }, - activeDropTarget: undefined, - keyboardMode: true, - dropTargetsByOrder: assignedDropTargetsByOrder, - }, - dndDispatch, - ]} - > - {items.map((props) => ( - -
- - ))} - - ); - dndDispatch.mockClear(); - act(() => { - component - .find('[data-test-subj="testDragDrop-keyboardHandler"]') - .at(1) - .simulate('keydown', { key: 'ArrowRight', altKey: true }); - }); - expect(dndDispatch).toBeCalledWith({ - type: 'selectDropTarget', - payload: { - dragging: items[0].value, - dropTarget: { - ...items[1].value, - onDrop, - dropType: 'duplicate_compatible', - }, - }, - }); - dndDispatch.mockClear(); - act(() => { - component - .find('[data-test-subj="testDragDrop-keyboardHandler"]') - .at(1) - .simulate('keydown', { key: 'ArrowRight', shiftKey: true }); - }); - expect(dndDispatch).toBeCalledWith({ - type: 'selectDropTarget', - payload: { - dragging: items[0].value, - dropTarget: { - ...items[1].value, - onDrop, - dropType: 'swap_compatible', - }, - }, - }); - }); - test('when having a main target selected and pressing alt, the first extra drop target is selected', () => { - component = mount( - , style: {} } }, - activeDropTarget: assignedDropTargetsByOrder['2,0,1,0,0'], - dropTargetsByOrder: assignedDropTargetsByOrder, - keyboardMode: true, - }, - dndDispatch, - ]} - > - {items.map((props) => ( - -
- - ))} - - ); - dndDispatch.mockClear(); - act(() => { - component - .find('[data-test-subj="testDragDrop-keyboardHandler"]') - .at(1) - .simulate('keydown', { key: 'Alt' }); - }); - expect(dndDispatch).toBeCalledWith({ - type: 'selectDropTarget', - payload: { - dragging: items[0].value, - dropTarget: { - ...items[1].value, - onDrop, - dropType: 'duplicate_compatible', - }, - }, - }); - dndDispatch.mockClear(); - act(() => { - component - .find('[data-test-subj="testDragDrop-keyboardHandler"]') - .at(1) - .simulate('keyup', { key: 'Alt' }); - }); - expect(dndDispatch).toBeCalledWith({ - type: 'selectDropTarget', - payload: { - dragging: items[0].value, - dropTarget: { - ...items[1].value, - onDrop, - dropType: 'move_compatible', - }, - }, - }); - }); - test('when having a main target selected and pressing shift, the second extra drop target is selected', () => { - component = mount( - , style: {} } }, - activeDropTarget: assignedDropTargetsByOrder['2,0,1,0,0'], - dropTargetsByOrder: assignedDropTargetsByOrder, - keyboardMode: true, - }, - dndDispatch, - ]} - > - {items.map((props) => ( - -
- - ))} - - ); - dndDispatch.mockClear(); - act(() => { - component - .find('[data-test-subj="testDragDrop-keyboardHandler"]') - .at(1) - .simulate('keydown', { key: 'Shift' }); - }); - - expect(dndDispatch).toBeCalledWith({ - type: 'selectDropTarget', - payload: { - dragging: items[0].value, - dropTarget: { - ...items[1].value, - onDrop, - dropType: 'swap_compatible', - }, - }, - }); - dndDispatch.mockClear(); - act(() => { - component - .find('[data-test-subj="testDragDrop-keyboardHandler"]') - .at(1) - .simulate('keyup', { key: 'Shift' }); - }); - expect(dndDispatch).toBeCalledWith({ - type: 'selectDropTarget', - payload: { - dragging: items[0].value, - dropTarget: { - ...items[1].value, - onDrop, - dropType: 'move_compatible', - }, - }, - }); - }); - }); - }); - - describe('Reordering', () => { - const onDrop = jest.fn(); - const items = [ - { - id: '1', - humanData: { label: 'Label1', position: 1, groupLabel: 'X', layerNumber: 0 }, - onDrop, - draggable: true, - }, - { - id: '2', - humanData: { label: 'label2', position: 2, groupLabel: 'X', layerNumber: 0 }, - onDrop, - }, - { - id: '3', - humanData: { label: 'label3', position: 3, groupLabel: 'X', layerNumber: 0 }, - onDrop, - }, - ]; - const mountComponent = ( - dndContextState?: Partial, - dndDispatch?: Dispatch, - onDropHandler?: () => void - ) => { - const dragDropSharedProps = { - draggable: true, - dragType: 'move' as 'copy' | 'move', - reorderableGroup: items.map(({ id }) => ({ id })), - onDrop: onDropHandler || onDrop, - }; - - return mount( - - - - 1 - - - 2 - - - 3 - - - - ); - }; - test(`Inactive group renders properly`, () => { - const component = mountComponent(); - act(() => { - jest.runAllTimers(); - }); - expect(component.find('[data-test-subj="testDragDrop"]')).toHaveLength(5); - }); - - test(`Reorderable group with lifted element renders properly`, () => { - const dndDispatch = jest.fn(); - const component = mountComponent({ dragging: { ...items[0] } }, dndDispatch); - - act(() => { - jest.runAllTimers(); - }); - component - .find('[data-test-subj="testDragDrop"]') - .first() - .simulate('dragstart', { dataTransfer }); - - act(() => { - jest.runAllTimers(); - }); - - expect(dndDispatch).toBeCalledWith({ - type: 'startDragging', - payload: { dragging: { ...items[0] } }, - }); - }); - - test(`Reordered elements get extra styles to show the reorder effect when dragging`, () => { - const dndDispatch = jest.fn(); - const component = mountComponent({ dragging: { ...items[0] } }, dndDispatch); - - component - .find('[data-test-subj="testDragDrop"]') - .first() - .simulate('dragstart', { dataTransfer }); - - act(() => { - jest.runAllTimers(); - }); - - component - .find('[data-test-subj="testDragDrop-reorderableDropLayer"]') - .at(1) - .simulate('dragover'); - expect( - component.find('[data-test-subj="testDragDrop-reorderableDrag"]').at(0).prop('style') - ).toEqual(undefined); - expect( - component.find('[data-test-subj="testDragDrop-translatableDrop"]').at(0).prop('style') - ).toEqual({ - transform: 'translateY(-8px)', - }); - expect( - component.find('[data-test-subj="testDragDrop-translatableDrop"]').at(1).prop('style') - ).toEqual({ - transform: 'translateY(-8px)', - }); - - component - .find('[data-test-subj="testDragDrop-reorderableDropLayer"]') - .at(1) - .simulate('dragleave'); - expect( - component.find('[data-test-subj="testDragDrop-reorderableDrag"]').at(0).prop('style') - ).toEqual(undefined); - expect( - component.find('[data-test-subj="testDragDrop-translatableDrop"]').at(1).prop('style') - ).toEqual(undefined); - }); - - test(`Dropping an item runs onDrop function`, () => { - const preventDefault = jest.fn(); - const stopPropagation = jest.fn(); - const dndDispatch = jest.fn(); - const component = mountComponent({ dragging: { ...items[0] } }, dndDispatch); - - const dragDrop = component.find('[data-test-subj="testDragDrop-reorderableDropLayer"]').at(1); - dragDrop.simulate('dragOver'); - dndDispatch.mockClear(); - dragDrop.simulate('drop', { preventDefault, stopPropagation }); - - act(() => { - jest.runAllTimers(); - }); - - expect(dndDispatch).toBeCalledWith({ - type: 'dropToTarget', - payload: { - dragging: items[0], - dropTarget: { ...items[2], dropType: 'reorder' }, - }, - }); - - expect(preventDefault).toBeCalled(); - expect(stopPropagation).toBeCalled(); - expect(onDrop).toBeCalledWith({ ...items[0] }, 'reorder'); - }); - - test(`Keyboard Navigation: User cannot move an element outside of the group`, () => { - const dndDispatch = jest.fn(); - const component = mountComponent( - { - dragging: { ...items[0] }, - keyboardMode: true, - activeDropTarget: undefined, - dropTargetsByOrder: { - '2,0,0': undefined, - '2,0,1': { ...items[1], onDrop, dropType: 'reorder' }, - '2,0,2': { ...items[2], onDrop, dropType: 'reorder' }, - }, - }, - dndDispatch - ); - const keyboardHandler = component - .find('[data-test-subj="testDragDrop-keyboardHandler"]') - .at(1); - - dndDispatch.mockClear(); - keyboardHandler.simulate('keydown', { key: 'Space' }); - keyboardHandler.simulate('keydown', { key: 'ArrowUp' }); - expect(dndDispatch).not.toHaveBeenCalled(); - - keyboardHandler.simulate('keydown', { key: 'Space' }); - keyboardHandler.simulate('keydown', { key: 'ArrowDown' }); - - expect(dndDispatch).toBeCalledWith({ - type: 'selectDropTarget', - payload: { - dropTarget: { - ...items[1], - dropType: 'reorder', - }, - dragging: items[0], - }, - }); - }); - - test(`Keyboard navigation: user can drop element to an activeDropTarget`, () => { - const component = mountComponent({ - dragging: { ...items[0] }, - activeDropTarget: { ...items[2], dropType: 'reorder', onDrop }, - dropTargetsByOrder: { - '2,0,0': { ...items[0], onDrop, dropType: 'reorder' }, - '2,0,1': { ...items[1], onDrop, dropType: 'reorder' }, - '2,0,2': { ...items[2], onDrop, dropType: 'reorder' }, - }, - keyboardMode: true, - }); - const keyboardHandler = component - .find('[data-test-subj="testDragDrop-keyboardHandler"]') - .at(1) - .simulate('focus'); - - act(() => { - keyboardHandler.simulate('keydown', { key: 'ArrowDown' }); - keyboardHandler.simulate('keydown', { key: 'ArrowDown' }); - keyboardHandler.simulate('keydown', { key: 'Enter' }); - }); - expect(onDrop).toBeCalledWith(items[0], 'reorder'); - }); - - test(`Keyboard Navigation: Doesn't call onDrop when movement is cancelled`, () => { - const onDropHandler = jest.fn(); - const dndDispatch = jest.fn(); - const component = mountComponent({ dragging: { ...items[0] } }, dndDispatch, onDropHandler); - const keyboardHandler = component - .find('[data-test-subj="testDragDrop-keyboardHandler"]') - .at(1); - keyboardHandler.simulate('keydown', { key: 'Space' }); - keyboardHandler.simulate('keydown', { key: 'Escape' }); - act(() => { - jest.runAllTimers(); - }); - - expect(onDropHandler).not.toHaveBeenCalled(); - - expect(dndDispatch).toBeCalledWith({ - type: 'endDragging', - payload: { - dragging: items[0], - }, - }); - keyboardHandler.simulate('keydown', { key: 'Space' }); - keyboardHandler.simulate('keydown', { key: 'ArrowDown' }); - dndDispatch.mockClear(); - keyboardHandler.simulate('blur'); - - expect(onDropHandler).not.toHaveBeenCalled(); - - expect(dndDispatch).toBeCalledWith({ - type: 'endDragging', - payload: { - dragging: items[0], - }, - }); - }); - - test(`Keyboard Navigation: Reordered elements get extra styles to show the reorder effect`, () => { - const dndDispatch = jest.fn(); - const component = mountComponent( - { - dragging: { ...items[0] }, - keyboardMode: true, - activeDropTarget: undefined, - dropTargetsByOrder: { - '2,0,0': undefined, - '2,0,1': { ...items[1], onDrop, dropType: 'reorder' }, - '2,0,2': { ...items[2], onDrop, dropType: 'reorder' }, - }, - }, - dndDispatch - ); - - const keyboardHandler = component - .find('[data-test-subj="testDragDrop-keyboardHandler"]') - .at(1); - - keyboardHandler.simulate('keydown', { key: 'Space' }); - dndDispatch.mockClear(); - keyboardHandler.simulate('keydown', { key: 'ArrowDown' }); - - expect( - component.find('[data-test-subj="testDragDrop-reorderableDrag"]').at(0).prop('style') - ).toEqual({ - transform: 'translateY(+8px)', - }); - expect( - component.find('[data-test-subj="testDragDrop-translatableDrop"]').at(0).prop('style') - ).toEqual({ - transform: 'translateY(-32px)', - }); - expect( - component.find('[data-test-subj="testDragDrop-translatableDrop"]').at(1).prop('style') - ).toEqual(undefined); - - expect(dndDispatch).toBeCalledWith({ - type: 'selectDropTarget', - payload: { - dragging: items[0], - dropTarget: { ...items[1], onDrop, dropType: 'reorder' }, - }, - }); - - component - .find('[data-test-subj="testDragDrop-reorderableDropLayer"]') - .at(1) - .simulate('dragleave'); - expect( - component.find('[data-test-subj="testDragDrop-reorderableDrag"]').at(0).prop('style') - ).toEqual(undefined); - expect( - component.find('[data-test-subj="testDragDrop-translatableDrop"]').at(1).prop('style') - ).toEqual(undefined); - }); - - test(`Keyboard Navigation: User cannot drop element to itself`, () => { - const dndDispatch = jest.fn(); - const contextState = { - ...defaultContextState, - keyboardMode: true, - activeDropTarget: { - ...items[1], - onDrop, - dropType: 'reorder' as const, - }, - dropTargetsByOrder: { - '2,0,1,0': undefined, - '2,0,1,1': { ...items[1], onDrop, dropType: 'reorder' as const }, - }, - dragging: { ...items[0] }, - }; - const component = mount( - - - - 1 - - - 2 - - - - ); - const keyboardHandler = component - .find('[data-test-subj="testDragDrop-keyboardHandler"]') - .at(1); - - keyboardHandler.simulate('keydown', { key: 'Space' }); - keyboardHandler.simulate('keydown', { key: 'ArrowUp' }); - - expect(dndDispatch).toBeCalledWith({ - type: 'leaveDropTarget', - }); - }); - }); -}); diff --git a/packages/kbn-dom-drag-drop/src/drag_drop.tsx b/packages/kbn-dom-drag-drop/src/drag_drop.tsx deleted file mode 100644 index b20570ee6969c..0000000000000 --- a/packages/kbn-dom-drag-drop/src/drag_drop.tsx +++ /dev/null @@ -1,947 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import React, { useContext, useCallback, useEffect, memo, useMemo, useState, useRef } from 'react'; -import type { KeyboardEvent, ReactElement } from 'react'; -import classNames from 'classnames'; -import { keys, EuiScreenReaderOnly, EuiFlexItem, EuiFlexGroup } from '@elastic/eui'; -import useShallowCompareEffect from 'react-use/lib/useShallowCompareEffect'; -import { - DragDropIdentifier, - DropIdentifier, - nextValidDropTarget, - ReorderContext, - DropHandler, - Ghost, - RegisteredDropTargets, - DragDropAction, - DragContextState, - useDragDropContext, -} from './providers'; -import { DropType } from './types'; -import { REORDER_ITEM_MARGIN } from './constants'; -import './sass/drag_drop.scss'; - -/** - * Droppable event - */ -export type DroppableEvent = React.DragEvent; - -const noop = () => {}; - -/** - * The base props to the DragDrop component. - */ -interface BaseProps { - /** - * The CSS class(es) for the root element. - */ - className?: string; - /** - * CSS class to apply when the item is being dragged - */ - dragClassName?: string; - - /** - * The event handler that fires when an item - * is dropped onto this DragDrop component. - */ - onDrop?: DropHandler; - /** - * The event handler that fires when this element is dragged. - */ - onDragStart?: ( - target?: DroppableEvent['currentTarget'] | KeyboardEvent['currentTarget'] - ) => void; - /** - * The event handler that fires when the dragging of this element ends. - */ - onDragEnd?: () => void; - /** - * The value associated with this item. - */ - value: DragDropIdentifier; - - /** - * The React element which will be passed the draggable handlers - */ - children: ReactElement; - - /** - * Disable any drag & drop behaviour - */ - isDisabled?: boolean; - /** - * Indicates whether or not this component is draggable. - */ - draggable?: boolean; - /** - * Additional class names to apply when another element is over the drop target - */ - getAdditionalClassesOnEnter?: (dropType?: DropType) => string | undefined; - /** - * Additional class names to apply when another element is droppable for a currently dragged item - */ - getAdditionalClassesOnDroppable?: (dropType?: DropType) => string | undefined; - - /** - * The optional test subject associated with this DOM element. - */ - dataTestSubj?: string; - - /** - * items belonging to the same group that can be reordered - */ - reorderableGroup?: Array<{ id: string }>; - - /** - * Indicates to the user whether the currently dragged item - * will be moved or copied - */ - dragType?: 'copy' | 'move'; - - /** - * Indicates the type of drop targets - when undefined, the currently dragged item - * cannot be dropped onto this component. - */ - dropTypes?: DropType[]; - /** - * Order for keyboard dragging. This takes an array of numbers which will be used to order hierarchically - */ - order: number[]; - /** - * Extra drop targets by dropType - */ - getCustomDropTarget?: (dropType: DropType) => ReactElement | null; -} - -/** - * The props for a draggable instance of that component. - */ -interface DragInnerProps extends BaseProps { - dndDispatch: React.Dispatch; - dataTestSubjPrefix?: string; - activeDraggingProps?: { - keyboardMode: boolean; - activeDropTarget?: DropIdentifier; - dropTargetsByOrder: RegisteredDropTargets; - }; - extraKeyboardHandler?: (e: KeyboardEvent) => void; - ariaDescribedBy?: string; -} - -/** - * The props for a non-draggable instance of that component. - */ -interface DropsInnerProps extends BaseProps { - dndState: DragContextState; - dndDispatch: React.Dispatch; - isNotDroppable: boolean; -} - -const REORDER_OFFSET = REORDER_ITEM_MARGIN / 2; - -/** - * DragDrop component - * @param props - * @constructor - */ -export const DragDrop = (props: BaseProps) => { - const [dndState, dndDispatch] = useDragDropContext(); - - const { dragging, dropTargetsByOrder } = dndState; - - if (props.isDisabled) { - return props.children; - } - - const { value, draggable, dropTypes, reorderableGroup } = props; - const isDragging = !!(draggable && value.id === dragging?.id); - - const activeDraggingProps = isDragging - ? { - keyboardMode: dndState.keyboardMode, - activeDropTarget: dndState.activeDropTarget, - dropTargetsByOrder, - } - : undefined; - - if (draggable && (!dropTypes || !dropTypes.length)) { - const dragProps = { - ...props, - activeDraggingProps, - dataTestSubjPrefix: dndState.dataTestSubjPrefix, - dndDispatch, - }; - if (reorderableGroup && reorderableGroup.length > 1) { - return ; - } else { - return ; - } - } - - const dropProps = { - ...props, - dndState, - dndDispatch, - isNotDroppable: - // If the configuration has provided a droppable flag, but this particular item is not - // droppable, then it should be less prominent. Ignores items that are both - // draggable and drop targets - !!((!dropTypes || !dropTypes.length) && dragging && value.id !== dragging.id), - }; - if ( - reorderableGroup && - reorderableGroup.length > 1 && - reorderableGroup?.some((i) => i.id === dragging?.id) && - dropTypes?.[0] === 'reorder' - ) { - return ; - } - return ; -}; - -const removeSelection = () => { - const selection = window.getSelection(); - if (selection) { - selection.removeAllRanges(); - } -}; - -const DragInner = memo(function DragInner({ - dataTestSubj, - className, - dragClassName, - value, - children, - dndDispatch, - order, - activeDraggingProps, - dataTestSubjPrefix, - dragType, - onDragStart, - onDragEnd, - extraKeyboardHandler, - ariaDescribedBy, -}: DragInnerProps) { - const { keyboardMode, activeDropTarget, dropTargetsByOrder } = activeDraggingProps || {}; - - const setTarget = useCallback( - (target?: DropIdentifier) => { - if (!target) { - dndDispatch({ - type: 'leaveDropTarget', - }); - } else { - dndDispatch({ - type: 'selectDropTarget', - payload: { - dropTarget: target, - dragging: value, - }, - }); - } - }, - [dndDispatch, value] - ); - - const setTargetOfIndex = useCallback( - (id: string, index: number) => { - const dropTargetsForActiveId = - dropTargetsByOrder && - Object.values(dropTargetsByOrder).filter((dropTarget) => dropTarget?.id === id); - setTarget(dropTargetsForActiveId?.[index]); - }, - [dropTargetsByOrder, setTarget] - ); - const modifierHandlers = useMemo(() => { - const onKeyUp = (e: KeyboardEvent) => { - e.preventDefault(); - if (activeDropTarget?.id && ['Shift', 'Alt', 'Control'].includes(e.key)) { - if (e.altKey) { - setTargetOfIndex(activeDropTarget.id, 1); - } else if (e.shiftKey) { - setTargetOfIndex(activeDropTarget.id, 2); - } else if (e.ctrlKey) { - // the control option is available either for new or existing cases, - // so need to offset based on some flags - const offsetIndex = - Number(activeDropTarget.humanData.canSwap) + - Number(activeDropTarget.humanData.canDuplicate); - setTargetOfIndex(activeDropTarget.id, offsetIndex + 1); - } else { - setTargetOfIndex(activeDropTarget.id, 0); - } - } - }; - const onKeyDown = (e: KeyboardEvent) => { - e.preventDefault(); - if (e.key === 'Alt' && activeDropTarget?.id) { - setTargetOfIndex(activeDropTarget.id, 1); - } else if (e.key === 'Shift' && activeDropTarget?.id) { - setTargetOfIndex(activeDropTarget.id, 2); - } else if (e.key === 'Control' && activeDropTarget?.id) { - // the control option is available either for new or existing cases, - // so need to offset based on some flags - const offsetIndex = - Number(activeDropTarget.humanData.canSwap) + - Number(activeDropTarget.humanData.canDuplicate); - setTargetOfIndex(activeDropTarget.id, offsetIndex + 1); - } - }; - return { onKeyDown, onKeyUp }; - }, [activeDropTarget, setTargetOfIndex]); - - const dragStart = useCallback( - (e: DroppableEvent | KeyboardEvent, keyboardModeOn?: boolean) => { - // Setting stopPropgagation causes Chrome failures, so - // we are manually checking if we've already handled this - // in a nested child, and doing nothing if so... - if (e && 'dataTransfer' in e && e.dataTransfer.getData('text')) { - return; - } - - // We only can reach the dragStart method if the element is draggable, - // so we know we have DraggableProps if we reach this code. - if (e && 'dataTransfer' in e) { - e.dataTransfer.setData('text', value.humanData.label); - - // Apply an optional class to the element being dragged so the ghost - // can be styled. We must add it to the actual element for a single - // frame before removing it so the ghost picks up the styling. - const current = e.currentTarget; - - if (dragClassName && !current.classList.contains(dragClassName)) { - current.classList.add(dragClassName); - requestAnimationFrame(() => { - current.classList.remove(dragClassName); - }); - } - } - - // Chrome causes issues if you try to render from within a - // dragStart event, so we drop a setTimeout to avoid that. - - const currentTarget = e?.currentTarget; - - setTimeout(() => { - dndDispatch({ - type: 'startDragging', - payload: { - ...(keyboardModeOn ? { keyboardMode: true } : {}), - dragging: { - ...value, - ghost: keyboardModeOn - ? { - children, - style: { - width: currentTarget.offsetWidth, - minHeight: currentTarget?.offsetHeight, - }, - } - : undefined, - }, - }, - }); - onDragStart?.(currentTarget); - }); - }, - // eslint-disable-next-line react-hooks/exhaustive-deps - [dndDispatch, value, onDragStart] - ); - - const dragEnd = useCallback( - (e?: DroppableEvent) => { - e?.stopPropagation(); - - dndDispatch({ - type: 'endDragging', - payload: { dragging: value }, - }); - onDragEnd?.(); - }, - [dndDispatch, value, onDragEnd] - ); - - const setNextTarget = (e: KeyboardEvent, reversed = false) => { - const nextTarget = nextValidDropTarget( - dropTargetsByOrder, - activeDropTarget, - [order.join(',')], - (el) => el?.dropType !== 'reorder', - reversed - ); - - if (e.altKey && nextTarget?.id) { - setTargetOfIndex(nextTarget.id, 1); - } else if (e.shiftKey && nextTarget?.id) { - setTargetOfIndex(nextTarget.id, 2); - } else if (e.ctrlKey && nextTarget?.id) { - setTargetOfIndex(nextTarget.id, 3); - } else { - setTarget(nextTarget); - } - }; - - const dropToActiveDropTarget = () => { - if (activeDropTarget) { - const { dropType, onDrop } = activeDropTarget; - setTimeout(() => { - dndDispatch({ - type: 'dropToTarget', - payload: { - dragging: value, - dropTarget: activeDropTarget, - }, - }); - }); - onDrop(value, dropType); - } - }; - - const shouldShowGhostImageInstead = - dragType === 'move' && - keyboardMode && - activeDropTarget && - activeDropTarget.dropType !== 'reorder'; - - return ( -
- -
- ); -}); - -const DropsInner = memo(function DropsInner(props: DropsInnerProps) { - const { - dataTestSubj, - className, - onDrop, - value, - children, - draggable, - dndState, - dndDispatch, - isNotDroppable, - dropTypes, - order, - getAdditionalClassesOnEnter, - getAdditionalClassesOnDroppable, - getCustomDropTarget, - } = props; - - const { dragging, activeDropTarget, dataTestSubjPrefix, keyboardMode } = dndState; - - const [isInZone, setIsInZone] = useState(false); - const mainTargetRef = useRef(null); - - useShallowCompareEffect(() => { - if (dropTypes && dropTypes?.[0] && onDrop && keyboardMode) { - dndDispatch({ - type: 'registerDropTargets', - payload: dropTypes.reduce( - (acc, dropType, index) => ({ - ...acc, - [[...props.order, index].join(',')]: { ...value, onDrop, dropType }, - }), - {} - ), - }); - } - }, [order, dndDispatch, dropTypes, keyboardMode]); - - useEffect(() => { - let isMounted = true; - if (activeDropTarget && activeDropTarget.id !== value.id) { - setIsInZone(false); - } - setTimeout(() => { - if (!activeDropTarget && isMounted) { - setIsInZone(false); - } - }, 1000); - return () => { - isMounted = false; - }; - }, [activeDropTarget, setIsInZone, value.id]); - - const dragEnter = () => { - if (!isInZone) { - setIsInZone(true); - } - }; - - const getModifiedDropType = (e: DroppableEvent, dropType: DropType) => { - if (!dropTypes || dropTypes.length <= 1) { - return dropType; - } - const dropIndex = dropTypes.indexOf(dropType); - if (dropIndex > 0) { - return dropType; - } else if (dropIndex === 0) { - if (e.altKey && dropTypes[1]) { - return dropTypes[1]; - } else if (e.shiftKey && dropTypes[2]) { - return dropTypes[2]; - } else if (e.ctrlKey && (dropTypes.length > 3 ? dropTypes[3] : dropTypes[1])) { - return dropTypes.length > 3 ? dropTypes[3] : dropTypes[1]; - } - } - return dropType; - }; - - const dragOver = (e: DroppableEvent, dropType: DropType) => { - e.preventDefault(); - if (!dragging || !onDrop) { - return; - } - - const modifiedDropType = getModifiedDropType(e, dropType); - const isActiveDropTarget = !!( - activeDropTarget?.id === value.id && activeDropTarget?.dropType === modifiedDropType - ); - // An optimization to prevent a bunch of React churn. - if (!isActiveDropTarget) { - dndDispatch({ - type: 'selectDropTarget', - payload: { - dropTarget: { ...value, dropType: modifiedDropType, onDrop }, - dragging, - }, - }); - } - }; - - const dragLeave = () => { - dndDispatch({ type: 'leaveDropTarget' }); - }; - - const drop = (e: DroppableEvent, dropType: DropType) => { - e.preventDefault(); - e.stopPropagation(); - setIsInZone(false); - if (onDrop && dragging) { - const modifiedDropType = getModifiedDropType(e, dropType); - onDrop(dragging, modifiedDropType); - setTimeout(() => { - dndDispatch({ - type: 'dropToTarget', - payload: { - dragging, - dropTarget: { ...value, dropType: modifiedDropType, onDrop }, - }, - }); - }); - } - dndDispatch({ type: 'resetState' }); - }; - - const getProps = (dropType?: DropType, dropChildren?: ReactElement) => { - const isActiveDropTarget = Boolean( - activeDropTarget?.id === value.id && dropType === activeDropTarget?.dropType - ); - return { - 'data-test-subj': dataTestSubj || dataTestSubjPrefix, - className: getClasses(dropType, dropChildren), - onDragEnter: dragEnter, - onDragLeave: dragLeave, - onDragOver: dropType ? (e: DroppableEvent) => dragOver(e, dropType) : noop, - onDrop: dropType ? (e: DroppableEvent) => drop(e, dropType) : noop, - draggable, - ghost: - (isActiveDropTarget && dropType !== 'reorder' && dragging?.ghost && dragging.ghost) || - undefined, - }; - }; - - const getClasses = (dropType?: DropType, dropChildren = children) => { - const isActiveDropTarget = Boolean( - activeDropTarget?.id === value.id && dropType === activeDropTarget?.dropType - ); - const classesOnDroppable = getAdditionalClassesOnDroppable?.(dropType); - - const classes = classNames( - 'domDragDrop', - { - 'domDragDrop-isDraggable': draggable, - 'domDragDrop-isDroppable': !draggable, - 'domDragDrop-isDropTarget': dropType, - 'domDragDrop-isActiveDropTarget': dropType && isActiveDropTarget, - 'domDragDrop-isNotDroppable': isNotDroppable, - }, - classesOnDroppable && { [classesOnDroppable]: dropType } - ); - return classNames(classes, className, dropChildren.props.className); - }; - - const getMainTargetClasses = () => { - const classesOnEnter = getAdditionalClassesOnEnter?.(activeDropTarget?.dropType); - return classNames(classesOnEnter && { [classesOnEnter]: activeDropTarget?.id === value.id }); - }; - - const mainTargetProps = getProps(dropTypes && dropTypes[0]); - - return ( -
- - {dropTypes && dropTypes.length > 1 && ( - - {dropTypes.slice(1).map((dropType) => { - const dropChildren = getCustomDropTarget?.(dropType); - return dropChildren ? ( - - - {dropChildren} - - - ) : null; - })} - - )} -
- ); -}); - -const SingleDropInner = ({ - ghost, - children, - ...rest -}: { - ghost?: Ghost; - children: ReactElement; - style?: React.CSSProperties; - className?: string; -}) => { - return ( - <> - {React.cloneElement(children, rest)} - {ghost - ? React.cloneElement(ghost.children, { - className: classNames(ghost.children.props.className, 'domDragDrop_ghost'), - style: ghost.style, - }) - : null} - - ); -}; - -const ReorderableDrag = memo(function ReorderableDrag( - props: DragInnerProps & { reorderableGroup: Array<{ id: string }>; dragging?: DragDropIdentifier } -) { - const [{ isReorderOn, reorderedItems, direction }, reorderDispatch] = useContext(ReorderContext); - - const { value, activeDraggingProps, reorderableGroup, dndDispatch, dataTestSubjPrefix } = props; - - const { keyboardMode, activeDropTarget, dropTargetsByOrder } = activeDraggingProps || {}; - const isDragging = !!activeDraggingProps; - - const isFocusInGroup = keyboardMode - ? isDragging && - (!activeDropTarget || reorderableGroup.some((i) => i.id === activeDropTarget?.id)) - : isDragging; - - useEffect(() => { - reorderDispatch({ - type: 'setIsReorderOn', - payload: isFocusInGroup, - }); - }, [reorderDispatch, isFocusInGroup]); - - const onReorderableDragStart = ( - currentTarget?: - | DroppableEvent['currentTarget'] - | KeyboardEvent['currentTarget'] - ) => { - if (currentTarget) { - setTimeout(() => { - reorderDispatch({ - type: 'registerDraggingItemHeight', - payload: currentTarget.offsetHeight + REORDER_OFFSET, - }); - }); - } - }; - - const onReorderableDragEnd = () => { - reorderDispatch({ type: 'reset' }); - }; - - const extraKeyboardHandler = (e: KeyboardEvent) => { - if (isReorderOn && keyboardMode) { - e.stopPropagation(); - e.preventDefault(); - let activeDropTargetIndex = reorderableGroup.findIndex((i) => i.id === value.id); - if (activeDropTarget) { - const index = reorderableGroup.findIndex((i) => i.id === activeDropTarget?.id); - if (index !== -1) activeDropTargetIndex = index; - } - if (e.key === keys.ARROW_LEFT || e.key === keys.ARROW_RIGHT) { - reorderDispatch({ type: 'reset' }); - } else if (keys.ARROW_DOWN === e.key) { - if (activeDropTargetIndex < reorderableGroup.length - 1) { - const nextTarget = nextValidDropTarget( - dropTargetsByOrder, - activeDropTarget, - [props.order.join(',')], - (el) => el?.dropType === 'reorder' - ); - onReorderableDragOver(nextTarget); - } - } else if (keys.ARROW_UP === e.key) { - if (activeDropTargetIndex > 0) { - const nextTarget = nextValidDropTarget( - dropTargetsByOrder, - activeDropTarget, - [props.order.join(',')], - (el) => el?.dropType === 'reorder', - true - ); - onReorderableDragOver(nextTarget); - } - } - } - }; - - const onReorderableDragOver = (target?: DropIdentifier) => { - if (!target) { - reorderDispatch({ type: 'reset' }); - dndDispatch({ type: 'leaveDropTarget' }); - return; - } - const droppingIndex = reorderableGroup.findIndex((i) => i.id === target.id); - const draggingIndex = reorderableGroup.findIndex((i) => i.id === value?.id); - if (draggingIndex === -1) { - return; - } - - dndDispatch({ - type: 'selectDropTarget', - payload: { - dropTarget: target, - dragging: value, - }, - }); - reorderDispatch({ - type: 'setReorderedItems', - payload: { draggingIndex, droppingIndex, items: reorderableGroup }, - }); - }; - - const areItemsReordered = keyboardMode && isDragging && reorderedItems.length; - - return ( -
acc + (el.height ?? 0) + REORDER_OFFSET, - 0 - )}px)`, - } - : undefined - } - > - -
- ); -}); - -const ReorderableDrop = memo(function ReorderableDrop( - props: DropsInnerProps & { reorderableGroup: Array<{ id: string }> } -) { - const { onDrop, value, dndState, dndDispatch, reorderableGroup } = props; - - const { dragging, dataTestSubjPrefix, activeDropTarget } = dndState; - const currentIndex = reorderableGroup.findIndex((i) => i.id === value.id); - - const [{ isReorderOn, reorderedItems, draggingHeight, direction }, reorderDispatch] = - useContext(ReorderContext); - - const heightRef = useRef(null); - - const isReordered = - isReorderOn && reorderedItems.some((el) => el.id === value.id) && reorderedItems.length; - - useEffect(() => { - if (isReordered && heightRef.current?.clientHeight) { - reorderDispatch({ - type: 'registerReorderedItemHeight', - payload: { id: value.id, height: heightRef.current.clientHeight }, - }); - } - }, [isReordered, reorderDispatch, value.id]); - - const onReorderableDragOver = (e: DroppableEvent) => { - e.preventDefault(); - // An optimization to prevent a bunch of React churn. - if (activeDropTarget?.id !== value?.id && onDrop) { - const draggingIndex = reorderableGroup.findIndex((i) => i.id === dragging?.id); - if (!dragging || draggingIndex === -1) { - return; - } - - const droppingIndex = currentIndex; - if (draggingIndex === droppingIndex) { - reorderDispatch({ type: 'reset' }); - } - - reorderDispatch({ - type: 'setReorderedItems', - payload: { draggingIndex, droppingIndex, items: reorderableGroup }, - }); - dndDispatch({ - type: 'selectDropTarget', - payload: { - dropTarget: { ...value, dropType: 'reorder', onDrop }, - dragging, - }, - }); - } - }; - - const onReorderableDrop = (e: DroppableEvent) => { - e.preventDefault(); - e.stopPropagation(); - - if (onDrop && dragging) { - onDrop(dragging, 'reorder'); - // setTimeout ensures it will run after dragEnd messaging - setTimeout(() => { - dndDispatch({ - type: 'dropToTarget', - payload: { - dragging, - dropTarget: { ...value, dropType: 'reorder', onDrop }, - }, - }); - }); - } - dndDispatch({ type: 'resetState' }); - }; - - return ( -
-
i.id === value.id) - ? { - transform: `translateY(${direction}${draggingHeight}px)`, - } - : undefined - } - ref={heightRef} - data-test-subj={`${dataTestSubjPrefix}-translatableDrop`} - className="domDragDrop-translatableDrop domDragDrop-reorderable" - > - -
- -
{ - dndDispatch({ type: 'leaveDropTarget' }); - reorderDispatch({ type: 'reset' }); - }} - /> -
- ); -}); diff --git a/packages/kbn-dom-drag-drop/src/drag_drop_reordering.test.tsx b/packages/kbn-dom-drag-drop/src/drag_drop_reordering.test.tsx new file mode 100644 index 0000000000000..8db5349d373ee --- /dev/null +++ b/packages/kbn-dom-drag-drop/src/drag_drop_reordering.test.tsx @@ -0,0 +1,360 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React from 'react'; +import { fireEvent, screen, act } from '@testing-library/react'; +import userEvent from '@testing-library/user-event'; +import { Droppable, DroppableProps } from './droppable'; +import { Draggable } from './draggable'; +import { dataTransfer, generateDragDropValue, renderWithDragDropContext } from './test_utils'; +import { ReorderProvider } from './providers/reorder_provider'; + +jest.useFakeTimers({ legacyFakeTimers: true }); + +const originalOffsetHeight = Object.getOwnPropertyDescriptor( + HTMLElement.prototype, + 'clientHeight' +) || { value: 0 }; + +const expectLabel = (label: string) => + expect.objectContaining({ humanData: expect.objectContaining({ label }) }); + +describe('Drag and drop reordering', () => { + const onDrop = jest.fn(); + + afterEach(() => { + jest.clearAllMocks(); + }); + + type MaximumThreeDroppablesProps = [ + Partial?, + Partial?, + Partial? + ]; + + const renderDragAndDropGroup = ( + propsOverrides: MaximumThreeDroppablesProps = [{}, {}, {}], + contextOverrides = {} + ) => { + const values = propsOverrides.map((props, index) => { + return props?.value ? props.value : generateDragDropValue(`${index}`); + }); + const reorderableGroup = values.map((value) => ({ id: value.id })); + + const rtlRender = renderWithDragDropContext( + <> + + {propsOverrides.map((props, index) => { + return ( + + + + + + ); + })} + + + + + + , + undefined, + contextOverrides + ); + + const droppables = screen.queryAllByTestId('domDragDrop-reorderableDropLayer'); + const droppable = droppables[0]; + const draggableKeyboardHandlers = screen.queryAllByTestId('domDragDrop-keyboardHandler'); + const droppableContainers = screen.queryAllByTestId('domDragDropContainer'); + return { + ...rtlRender, + droppableContainer: droppableContainers[0], + startDragging: (index = 0) => { + const draggable = screen.getByTestId(`domDragDrop_domDraggable_${index}`); + fireEvent.dragStart(draggable, { dataTransfer }); + act(() => { + jest.runAllTimers(); + }); + }, + drop: (droppableIndex = 0, options = {}) => { + const dropEvent = new MouseEvent('drop', { ...options, bubbles: true }); + fireEvent(droppables[droppableIndex], dropEvent); + act(() => { + jest.runAllTimers(); + }); + }, + dragOver: (droppableIndex = 0, options = {}) => { + fireEvent.dragOver(droppables[droppableIndex], options); + + act(() => { + jest.runAllTimers(); + }); + }, + dragLeave: (droppableIndex = 0) => { + fireEvent.dragLeave(droppables[droppableIndex]); + act(() => { + jest.runAllTimers(); + }); + }, + startDraggingByKeyboard: (index = 0) => { + draggableKeyboardHandlers[index].focus(); + userEvent.keyboard('{enter}'); + act(() => { + jest.runAllTimers(); + }); + }, + dropByKeyboard: () => { + userEvent.keyboard('{enter}'); + act(() => { + jest.runAllTimers(); + }); + }, + cancelByKeyboard: () => { + userEvent.keyboard('{esc}'); + act(() => { + jest.runAllTimers(); + }); + }, + reorderDownByKeyboard: () => { + userEvent.keyboard('{arrowdown}'); + act(() => { + jest.runAllTimers(); + }); + }, + reorderUpByKeyboard: () => { + userEvent.keyboard('{arrowup}'); + act(() => { + jest.runAllTimers(); + }); + }, + dragOverToNextByKeyboard: () => { + userEvent.keyboard('{arrowright}'); + act(() => { + jest.runAllTimers(); + }); + }, + dragOverToPreviousByKeyboard: () => { + userEvent.keyboard('{arrowleft}'); + act(() => { + jest.runAllTimers(); + }); + }, + pressModifierKey: (key: '{Shift}' | '{Alt}' | '{Ctrl}') => { + userEvent.keyboard(key); + act(() => { + jest.runAllTimers(); + }); + }, + droppable, + droppables, + }; + }; + + beforeAll(() => { + Object.defineProperty(HTMLElement.prototype, 'clientHeight', { + configurable: true, + value: 40, + }); + }); + + afterAll(() => { + Object.defineProperty(HTMLElement.prototype, 'clientHeight', originalOffsetHeight); + }); + + test('runs onDrop when the element is dropped', () => { + const { startDragging, drop } = renderDragAndDropGroup(); + startDragging(0); + drop(1); + expect(onDrop).toBeCalled(); + }); + + test('reordered elements get extra styling showing the new position', () => { + const { startDragging, dragOver } = renderDragAndDropGroup(); + startDragging(0); + dragOver(1); + + expect(screen.getAllByTestId('domDragDrop-translatableDrop')[1]).toHaveStyle({ + transform: 'translateY(-48px)', + }); + expect(screen.getAllByTestId('domDragDrop-translatableDrop')[2]).not.toHaveStyle({ + transform: 'translateY(-48px)', + }); + dragOver(2); + expect(screen.getAllByTestId('domDragDrop-translatableDrop')[1]).toHaveStyle({ + transform: 'translateY(-48px)', + }); + expect(screen.getAllByTestId('domDragDrop-translatableDrop')[2]).toHaveStyle({ + transform: 'translateY(-48px)', + }); + }); + + describe('keyboard mode', () => { + test('doesn`t run onDrop when dropping into an original position without any other movements', () => { + const { startDraggingByKeyboard, dropByKeyboard } = renderDragAndDropGroup(); + // 0 -> 0 + startDraggingByKeyboard(0); + dropByKeyboard(); + expect(onDrop).not.toBeCalled(); + }); + test('doesn`t run onDrop when dropping into an original position after some movements', () => { + const { + startDraggingByKeyboard, + dropByKeyboard, + reorderDownByKeyboard, + reorderUpByKeyboard, + } = renderDragAndDropGroup(); + // 1 -> 1 + startDraggingByKeyboard(1); + reorderDownByKeyboard(); + reorderUpByKeyboard(); + dropByKeyboard(); + expect(onDrop).not.toBeCalled(); + }); + test('doesn’t run onDrop when the movement is cancelled', () => { + const { startDraggingByKeyboard, reorderDownByKeyboard, cancelByKeyboard } = + renderDragAndDropGroup(); + // 1 -> x + startDraggingByKeyboard(0); + reorderDownByKeyboard(); + reorderDownByKeyboard(); + cancelByKeyboard(); + expect(onDrop).not.toBeCalled(); + }); + test('runs onDrop when the element is reordered and dropped', () => { + const { + startDraggingByKeyboard, + dropByKeyboard, + reorderDownByKeyboard, + reorderUpByKeyboard, + } = renderDragAndDropGroup(); + // 0--> 2 + startDraggingByKeyboard(0); + reorderDownByKeyboard(); + reorderDownByKeyboard(); + dropByKeyboard(); + expect(onDrop).toBeCalledWith(expectLabel('0'), 'reorder'); + + // 2 --> 0 + startDraggingByKeyboard(2); + reorderUpByKeyboard(); + reorderUpByKeyboard(); + dropByKeyboard(); + expect(onDrop).toBeCalledWith(expectLabel('2'), 'reorder'); + }); + test('reordered elements get extra styling showing the new position from element 0 to element 2', () => { + const { startDraggingByKeyboard, reorderDownByKeyboard } = renderDragAndDropGroup(); + // 0--> 2 + startDraggingByKeyboard(0); + reorderDownByKeyboard(); + expect(screen.getAllByTestId('domDragDrop-reorderableDrag')[0]).toHaveStyle({ + transform: 'translateY(+48px)', + }); + expect(screen.getAllByTestId('domDragDrop-translatableDrop')[1]).toHaveStyle({ + transform: 'translateY(-48px)', + }); + expect(screen.getByText('Element no1')).toHaveClass('domDroppable--hover'); + reorderDownByKeyboard(); + expect(screen.getAllByTestId('domDragDrop-reorderableDrag')[0]).toHaveStyle({ + transform: 'translateY(+96px)', + }); + expect(screen.getAllByTestId('domDragDrop-translatableDrop')[1]).toHaveStyle({ + transform: 'translateY(-48px)', + }); + expect(screen.getAllByTestId('domDragDrop-translatableDrop')[2]).toHaveStyle({ + transform: 'translateY(-48px)', + }); + expect(screen.getByText('Element no2')).toHaveClass('domDroppable--hover'); + }); + + test('reordered elements get extra styling showing the new position from element 2 to element 0', () => { + const { startDraggingByKeyboard, reorderUpByKeyboard } = renderDragAndDropGroup(); + // 2 --> 0 + startDraggingByKeyboard(2); + reorderUpByKeyboard(); + expect(screen.getAllByTestId('domDragDrop-reorderableDrag')[2]).toHaveStyle({ + transform: 'translateY(-48px)', + }); + expect(screen.getAllByTestId('domDragDrop-translatableDrop')[1]).toHaveStyle({ + transform: 'translateY(+48px)', + }); + + expect(screen.getByText('Element no1')).toHaveClass('domDroppable--hover'); + reorderUpByKeyboard(); + expect(screen.getAllByTestId('domDragDrop-reorderableDrag')[2]).toHaveStyle({ + transform: 'translateY(-96px)', + }); + expect(screen.getAllByTestId('domDragDrop-translatableDrop')[1]).toHaveStyle({ + transform: 'translateY(+48px)', + }); + expect(screen.getAllByTestId('domDragDrop-translatableDrop')[0]).toHaveStyle({ + transform: 'translateY(+48px)', + }); + expect(screen.getByText('Element no0')).toHaveClass('domDroppable--hover'); + }); + + test('reorders through all the drop targets and then stops at the last element', () => { + const { + startDraggingByKeyboard, + reorderDownByKeyboard, + cancelByKeyboard, + reorderUpByKeyboard, + } = renderDragAndDropGroup(); + startDraggingByKeyboard(); + reorderDownByKeyboard(); + reorderDownByKeyboard(); + reorderDownByKeyboard(); + reorderDownByKeyboard(); + + expect(screen.getByText('Element no2')).toHaveClass('domDroppable--hover'); + cancelByKeyboard(); + startDraggingByKeyboard(2); + reorderUpByKeyboard(); + reorderUpByKeyboard(); + reorderUpByKeyboard(); + reorderUpByKeyboard(); + expect(screen.getByText('Element no0')).toHaveClass('domDroppable--hover'); + }); + + test('exits reordering and selects out of group target when hitting arrow left', () => { + const { + startDraggingByKeyboard, + cancelByKeyboard, + dragOverToPreviousByKeyboard, + dragOverToNextByKeyboard, + } = renderDragAndDropGroup(); + + startDraggingByKeyboard(); + dragOverToNextByKeyboard(); + expect(screen.getByText('Out of group')).toHaveClass('domDroppable--hover'); + cancelByKeyboard(); + startDraggingByKeyboard(); + dragOverToPreviousByKeyboard(); + expect(screen.getByText('Out of group')).toHaveClass('domDroppable--hover'); + }); + }); +}); diff --git a/packages/kbn-dom-drag-drop/src/draggable.test.tsx b/packages/kbn-dom-drag-drop/src/draggable.test.tsx new file mode 100644 index 0000000000000..883e796023f70 --- /dev/null +++ b/packages/kbn-dom-drag-drop/src/draggable.test.tsx @@ -0,0 +1,137 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React from 'react'; +import { fireEvent, screen, within } from '@testing-library/react'; +import userEvent from '@testing-library/user-event'; +import { act } from 'react-dom/test-utils'; +import { Draggable } from './draggable'; +import { Droppable } from './droppable'; +import { + generateDragDropValue, + renderWithDragDropContext, + dataTransfer, + EXACT, +} from './test_utils'; + +jest.useFakeTimers({ legacyFakeTimers: true }); + +describe('Draggable', () => { + const renderDraggable = (propsOverrides = {}) => { + const rtlRender = renderWithDragDropContext( + <> + + + + + + + + ); + + const draggable = screen.getByTestId('domDragDrop_domDraggable_drag_this'); + const draggableKeyboardHandler = screen.getByTestId('domDragDrop-keyboardHandler'); + const droppable = screen.getByTestId('domDragDrop-domDroppable'); + + return { + ...rtlRender, + draggable, + droppable, + startDragging: () => { + fireEvent.dragStart(draggable, { dataTransfer }); + act(() => { + jest.runAllTimers(); + }); + }, + startDraggingByKeyboard: () => { + draggableKeyboardHandler.focus(); + userEvent.keyboard('{enter}'); + act(() => { + jest.runAllTimers(); + }); + }, + dragOverToNextByKeyboard: () => { + userEvent.keyboard('{arrowright}'); + act(() => { + jest.runAllTimers(); + }); + }, + endDragging: () => { + fireEvent.dragEnd(draggable, { dataTransfer }); + act(() => { + jest.runAllTimers(); + }); + }, + dragOver: () => { + fireEvent.dragOver(droppable); + act(() => { + jest.runAllTimers(); + }); + }, + }; + }; + + afterEach(() => { + jest.clearAllMocks(); + }); + + test('makes component draggable', () => { + const { draggable } = renderDraggable(); + expect(draggable).toHaveProperty('draggable', true); + }); + + test('removes selection on mouse down before dragging', async () => { + const removeAllRanges = jest.fn(); + global.getSelection = jest.fn(() => ({ removeAllRanges } as unknown as Selection)); + const { draggable } = renderDraggable(); + fireEvent.mouseDown(draggable); + expect(global.getSelection).toBeCalled(); + expect(removeAllRanges).toBeCalled(); + }); + + test('on drag start, sets text in dataTransfer', async () => { + const { startDragging } = renderDraggable(); + + startDragging(); + expect(dataTransfer.setData).toBeCalledWith('text', 'drag_this'); + }); + test('className is added when draggable is being dragged', async () => { + const { startDragging, draggable, endDragging } = renderDraggable({ + dragClassName: 'dragTest', + }); + expect(draggable).toHaveClass('domDraggable', EXACT); + startDragging(); + expect(draggable).toHaveClass('domDraggable domDraggable_active--move', EXACT); + endDragging(); + expect(draggable).toHaveClass('domDraggable', EXACT); + }); + + describe('keyboard mode', () => { + test('dragClassName is added to ghost when element is dragged', async () => { + const { startDraggingByKeyboard, dragOverToNextByKeyboard, droppable } = renderDraggable({ + dragClassName: 'dragTest', + }); + startDraggingByKeyboard(); + dragOverToNextByKeyboard(); + expect(droppable).toHaveClass('domDroppable domDroppable--active domDroppable--hover', EXACT); + expect(within(screen.getByTestId('domDragDropContainer')).getByText('Drag this')).toHaveClass( + 'dragTest' + ); + }); + }); +}); diff --git a/packages/kbn-dom-drag-drop/src/draggable.tsx b/packages/kbn-dom-drag-drop/src/draggable.tsx new file mode 100644 index 0000000000000..d8c6a55e4dd9e --- /dev/null +++ b/packages/kbn-dom-drag-drop/src/draggable.tsx @@ -0,0 +1,545 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React, { useContext, useCallback, useEffect, memo, useMemo } from 'react'; +import type { KeyboardEvent, ReactElement } from 'react'; +import classNames from 'classnames'; +import { keys, EuiScreenReaderOnly } from '@elastic/eui'; +import { + DragDropIdentifier, + DropIdentifier, + nextValidDropTarget, + ReorderContext, + RegisteredDropTargets, + DragDropAction, + useDragDropContext, +} from './providers'; +import { REORDER_ITEM_MARGIN } from './constants'; +import './sass/draggable.scss'; + +type DragEvent = React.DragEvent; + +/** + * The base props to the Draggable component. + */ +interface DraggableProps { + /** + * The CSS class(es) for the root element. + */ + className?: string; + /** + * CSS class to apply when the item is being dragged + */ + dragClassName?: string; + + /** + * The event handler that fires when this element is dragged. + */ + onDragStart?: ( + target?: DragEvent['currentTarget'] | KeyboardEvent['currentTarget'] + ) => void; + /** + * The event handler that fires when the dragging of this element ends. + */ + onDragEnd?: () => void; + /** + * The value associated with this item. + */ + value: DragDropIdentifier; + + /** + * The React element which will be passed the draggable handlers + */ + children: ReactElement; + + /** + * Disable any drag & drop behaviour + */ + isDisabled?: boolean; + + /** + * The optional test subject associated with this DOM element. + */ + dataTestSubj?: string; + + /** + * items belonging to the same group that can be reordered + */ + reorderableGroup?: Array<{ id: string }>; + + /** + * Indicates to the user whether the currently dragged item + * will be moved or copied + */ + dragType: 'copy' | 'move'; + + /** + * Order for keyboard dragging. This takes an array of numbers which will be used to order hierarchically + */ + order: number[]; +} + +/** + * The props for a draggable instance of that component. + */ +interface DraggableImplProps extends DraggableProps { + dndDispatch: React.Dispatch; + dataTestSubjPrefix?: string; + draggedItemProps?: { + keyboardMode: boolean; + hoveredDropTarget?: DropIdentifier; + dropTargetsByOrder: RegisteredDropTargets; + }; + extraKeyboardHandler?: (e: KeyboardEvent) => void; + ariaDescribedBy?: string; +} + +const REORDER_OFFSET = REORDER_ITEM_MARGIN / 2; + +/** + * Draggable component + * @param props + * @constructor + */ +export const Draggable = ({ reorderableGroup, ...props }: DraggableProps) => { + const [ + { dragging, dropTargetsByOrder, hoveredDropTarget, keyboardMode, dataTestSubjPrefix }, + dndDispatch, + ] = useDragDropContext(); + + if (props.isDisabled) { + return props.children; + } + + const isDragging = props.value.id === dragging?.id; + + const draggableProps = { + ...props, + draggedItemProps: isDragging + ? { + keyboardMode, + hoveredDropTarget, + dropTargetsByOrder, + } + : undefined, + dataTestSubjPrefix, + dndDispatch, + }; + if (reorderableGroup && reorderableGroup.length > 1) { + return ; + } else { + return ; + } +}; + +const removeSelection = () => { + const selection = window.getSelection(); + if (selection) { + selection.removeAllRanges(); + } +}; + +const DraggableImpl = memo(function DraggableImpl({ + dataTestSubj, + className, + dragClassName, + value, + children, + dndDispatch, + order, + draggedItemProps, + dataTestSubjPrefix, + dragType, + onDragStart, + onDragEnd, + extraKeyboardHandler, + ariaDescribedBy, +}: DraggableImplProps) { + const { keyboardMode, hoveredDropTarget, dropTargetsByOrder } = draggedItemProps || {}; + + const setTarget = useCallback( + (target?: DropIdentifier) => { + if (!target) { + dndDispatch({ + type: 'leaveDropTarget', + }); + } else { + dndDispatch({ + type: 'selectDropTarget', + payload: { + dropTarget: target, + dragging: value, + }, + }); + } + }, + [dndDispatch, value] + ); + + const setTargetOfIndex = useCallback( + (id: string, index: number) => { + const dropTargetsForActiveId = + dropTargetsByOrder && + Object.values(dropTargetsByOrder).filter((dropTarget) => dropTarget?.id === id); + setTarget(dropTargetsForActiveId?.[index]); + }, + [dropTargetsByOrder, setTarget] + ); + const modifierHandlers = useMemo(() => { + const onKeyUp = (e: KeyboardEvent) => { + e.preventDefault(); + if (hoveredDropTarget?.id && ['Shift', 'Alt', 'Control'].includes(e.key)) { + if (e.altKey) { + setTargetOfIndex(hoveredDropTarget.id, 1); + } else if (e.shiftKey) { + setTargetOfIndex(hoveredDropTarget.id, 2); + } else if (e.ctrlKey) { + // the control option is available either for new or existing cases, + // so need to offset based on some flags + const offsetIndex = + Number(hoveredDropTarget.humanData.canSwap) + + Number(hoveredDropTarget.humanData.canDuplicate); + setTargetOfIndex(hoveredDropTarget.id, offsetIndex + 1); + } else { + setTargetOfIndex(hoveredDropTarget.id, 0); + } + } + }; + const onKeyDown = (e: KeyboardEvent) => { + e.preventDefault(); + if (e.key === 'Alt' && hoveredDropTarget?.id) { + setTargetOfIndex(hoveredDropTarget.id, 1); + } else if (e.key === 'Shift' && hoveredDropTarget?.id) { + setTargetOfIndex(hoveredDropTarget.id, 2); + } else if (e.key === 'Control' && hoveredDropTarget?.id) { + // the control option is available either for new or existing cases, + // so need to offset based on some flags + const offsetIndex = + Number(hoveredDropTarget.humanData.canSwap) + + Number(hoveredDropTarget.humanData.canDuplicate); + setTargetOfIndex(hoveredDropTarget.id, offsetIndex + 1); + } + }; + return { onKeyDown, onKeyUp }; + }, [hoveredDropTarget, setTargetOfIndex]); + + const dragStart = useCallback( + (e: DragEvent | KeyboardEvent, keyboardModeOn?: boolean) => { + // Setting stopPropgagation causes Chrome failures, so + // we are manually checking if we've already handled this + // in a nested child, and doing nothing if so... + if (e && 'dataTransfer' in e && e.dataTransfer.getData('text')) { + return; + } + + // We only can reach the dragStart method if the element is draggable, + // so we know we have DraggableProps if we reach this code. + if (e && 'dataTransfer' in e) { + e.dataTransfer.setData('text', value.humanData.label); + } + + // Chrome causes issues if you try to render from within a + // dragStart event, so we drop a setTimeout to avoid that. + + const currentTarget = e?.currentTarget; + onDragStart?.(e?.currentTarget); + + // Apply an optional class to the element being dragged so the ghost + // can be styled. We must add it to the actual element for a single + // frame before removing it so the ghost picks up the styling. + const current = e.currentTarget; + + if (dragClassName && !current.classList.contains(dragClassName)) { + current.classList.add(dragClassName); + requestAnimationFrame(() => { + current.classList.remove(dragClassName); + }); + } + + setTimeout(() => { + dndDispatch({ + type: 'startDragging', + payload: { + ...(keyboardModeOn ? { keyboardMode: true } : {}), + dragging: { + ...value, + ghost: keyboardModeOn + ? { + children, + className: classNames(dragClassName), + style: { + width: currentTarget.offsetWidth, + minHeight: currentTarget?.offsetHeight, + zIndex: 1000, + }, + } + : undefined, + }, + }, + }); + }); + }, + // eslint-disable-next-line react-hooks/exhaustive-deps + [dndDispatch, value, onDragStart] + ); + + const dragEnd = useCallback( + (e?: DragEvent) => { + e?.stopPropagation(); + + dndDispatch({ + type: 'endDragging', + payload: { dragging: value }, + }); + onDragEnd?.(); + }, + [dndDispatch, value, onDragEnd] + ); + + const setNextTarget = (e: KeyboardEvent, reversed = false) => { + const nextTarget = nextValidDropTarget( + dropTargetsByOrder, + hoveredDropTarget, + [order.join(',')], + (el) => el?.dropType !== 'reorder', + reversed + ); + if (typeof nextTarget === 'string' || nextTarget === undefined) { + return setTarget(undefined); + } else if (e.altKey) { + return setTargetOfIndex(nextTarget.id, 1); + } else if (e.shiftKey) { + return setTargetOfIndex(nextTarget.id, 2); + } else if (e.ctrlKey) { + return setTargetOfIndex(nextTarget.id, 3); + } + return setTarget(nextTarget); + }; + + const dropToSelectedDropTarget = () => { + if (hoveredDropTarget) { + const { dropType, onDrop } = hoveredDropTarget; + setTimeout(() => { + dndDispatch({ + type: 'dropToTarget', + payload: { + dragging: value, + dropTarget: hoveredDropTarget, + }, + }); + }); + onDrop(value, dropType); + } + }; + + const shouldShowGhostImageInstead = + dragType === 'move' && + keyboardMode && + hoveredDropTarget && + hoveredDropTarget.dropType !== 'reorder'; + + return ( +
+ +
+ ); +}); + +const ReorderableDraggableImpl = memo(function ReorderableDraggableImpl( + props: DraggableImplProps & { + reorderableGroup: Array<{ id: string }>; + dragging?: DragDropIdentifier; + } +) { + const [{ isReorderOn, reorderedItems, direction }, reorderDispatch] = useContext(ReorderContext); + + const { value, draggedItemProps, reorderableGroup, dndDispatch, dataTestSubjPrefix } = props; + + const { keyboardMode, hoveredDropTarget, dropTargetsByOrder } = draggedItemProps || {}; + const isDragging = !!draggedItemProps; + + const isFocusInGroup = keyboardMode + ? isDragging && + (!hoveredDropTarget || reorderableGroup.some((i) => i.id === hoveredDropTarget?.id)) + : isDragging; + + useEffect(() => { + return () => reorderDispatch({ type: 'dragEnd' }); + }, [reorderDispatch]); + + useEffect(() => { + reorderDispatch({ + type: 'setIsReorderOn', + payload: isFocusInGroup, + }); + }, [reorderDispatch, isFocusInGroup]); + + const onReorderableDragStart = ( + currentTarget?: DragEvent['currentTarget'] | KeyboardEvent['currentTarget'] + ) => { + if (currentTarget) { + setTimeout(() => { + reorderDispatch({ + type: 'registerDraggingItemHeight', + payload: currentTarget.clientHeight + REORDER_OFFSET, + }); + }); + } + }; + + const onReorderableDragEnd = () => { + reorderDispatch({ type: 'dragEnd' }); + }; + + const extraKeyboardHandler = (e: KeyboardEvent) => { + if (isReorderOn && keyboardMode) { + e.stopPropagation(); + e.preventDefault(); + let activeDropTargetIndex = reorderableGroup.findIndex((i) => i.id === value.id); + if (hoveredDropTarget) { + const index = reorderableGroup.findIndex((i) => i.id === hoveredDropTarget?.id); + if (index !== -1) activeDropTargetIndex = index; + } + if (e.key === keys.ARROW_LEFT || e.key === keys.ARROW_RIGHT) { + reorderDispatch({ type: 'reset' }); + } else if (keys.ARROW_DOWN === e.key) { + if (activeDropTargetIndex < reorderableGroup.length - 1) { + const nextTarget = nextValidDropTarget( + dropTargetsByOrder, + hoveredDropTarget, + [props.order.join(',')], + (el) => el?.dropType === 'reorder' + ); + onReorderableDragOver(nextTarget); + } + } else if (keys.ARROW_UP === e.key) { + if (activeDropTargetIndex > 0) { + const nextTarget = nextValidDropTarget( + dropTargetsByOrder, + hoveredDropTarget, + [props.order.join(',')], + (el) => el?.dropType === 'reorder', + true + ); + onReorderableDragOver(nextTarget); + } + } + } + }; + + const onReorderableDragOver = (target?: DropIdentifier) => { + if (!target) { + reorderDispatch({ type: 'reset' }); + dndDispatch({ type: 'leaveDropTarget' }); + return; + } + const droppingIndex = reorderableGroup.findIndex((i) => i.id === target.id); + const draggingIndex = reorderableGroup.findIndex((i) => i.id === value?.id); + if (draggingIndex === -1) { + return; + } + + dndDispatch({ + type: 'selectDropTarget', + payload: { + dropTarget: target, + dragging: value, + }, + }); + reorderDispatch({ + type: 'setReorderedItems', + payload: { draggingIndex, droppingIndex, items: reorderableGroup }, + }); + }; + + const areItemsReordered = keyboardMode && isDragging && reorderedItems.length; + + return ( +
acc + (el.height ?? 0) + REORDER_OFFSET, + 0 + )}px)`, + } + : undefined + } + > + +
+ ); +}); diff --git a/packages/kbn-dom-drag-drop/src/drop_overlay_wrapper.tsx b/packages/kbn-dom-drag-drop/src/drop_overlay_wrapper.tsx index 590106157f304..65470de4d68d8 100644 --- a/packages/kbn-dom-drag-drop/src/drop_overlay_wrapper.tsx +++ b/packages/kbn-dom-drag-drop/src/drop_overlay_wrapper.tsx @@ -35,15 +35,12 @@ export const DropOverlayWrapper: React.FC = ({ ...otherProps }) => { return ( -
+
{children} {isVisible && (
)} diff --git a/packages/kbn-dom-drag-drop/src/drop_targets/swap_duplicate_combine.tsx b/packages/kbn-dom-drag-drop/src/drop_targets/swap_duplicate_combine.tsx index ff565a3c3b4de..9aaf055a1fea4 100644 --- a/packages/kbn-dom-drag-drop/src/drop_targets/swap_duplicate_combine.tsx +++ b/packages/kbn-dom-drag-drop/src/drop_targets/swap_duplicate_combine.tsx @@ -51,7 +51,7 @@ function getPropsForDropType(type: 'swap' | 'duplicate' | 'combine') { } } -const getExtraDrop = ({ +const getExtraTarget = ({ type, isIncompatible, }: { @@ -64,8 +64,8 @@ const getExtraDrop = ({ gutterSize="s" justifyContent="spaceBetween" alignItems="center" - className={classNames('domDragDrop__extraDrop', { - 'domDragDrop-incompatibleExtraDrop': isIncompatible, + className={classNames('domDroppable__extraTarget', { + 'domDroppable--incompatibleExtraTarget': isIncompatible, })} > @@ -88,15 +88,15 @@ const getExtraDrop = ({ }; const customDropTargetsMap: Partial<{ [dropType in DropType]: React.ReactElement }> = { - replace_duplicate_incompatible: getExtraDrop({ type: 'duplicate', isIncompatible: true }), - duplicate_incompatible: getExtraDrop({ type: 'duplicate', isIncompatible: true }), - swap_incompatible: getExtraDrop({ type: 'swap', isIncompatible: true }), - replace_duplicate_compatible: getExtraDrop({ type: 'duplicate' }), - duplicate_compatible: getExtraDrop({ type: 'duplicate' }), - swap_compatible: getExtraDrop({ type: 'swap' }), - field_combine: getExtraDrop({ type: 'combine' }), - combine_compatible: getExtraDrop({ type: 'combine' }), - combine_incompatible: getExtraDrop({ type: 'combine', isIncompatible: true }), + replace_duplicate_incompatible: getExtraTarget({ type: 'duplicate', isIncompatible: true }), + duplicate_incompatible: getExtraTarget({ type: 'duplicate', isIncompatible: true }), + swap_incompatible: getExtraTarget({ type: 'swap', isIncompatible: true }), + replace_duplicate_compatible: getExtraTarget({ type: 'duplicate' }), + duplicate_compatible: getExtraTarget({ type: 'duplicate' }), + swap_compatible: getExtraTarget({ type: 'swap' }), + field_combine: getExtraTarget({ type: 'combine' }), + combine_compatible: getExtraTarget({ type: 'combine' }), + combine_incompatible: getExtraTarget({ type: 'combine', isIncompatible: true }), }; export const getCustomDropTarget = (dropType: DropType) => customDropTargetsMap?.[dropType] || null; @@ -112,7 +112,7 @@ export const getAdditionalClassesOnEnter = (dropType?: string) => { 'replace_duplicate_incompatible', ].includes(dropType) ) { - return 'domDragDrop-isReplacing'; + return 'domDroppable--replacing'; } }; @@ -128,6 +128,6 @@ export const getAdditionalClassesOnDroppable = (dropType?: string) => { 'combine_incompatible', ].includes(dropType) ) { - return 'domDragDrop-notCompatible'; + return 'domDroppable--incompatible'; } }; diff --git a/packages/kbn-dom-drag-drop/src/droppable.test.tsx b/packages/kbn-dom-drag-drop/src/droppable.test.tsx new file mode 100644 index 0000000000000..14c4c5a722021 --- /dev/null +++ b/packages/kbn-dom-drag-drop/src/droppable.test.tsx @@ -0,0 +1,487 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React from 'react'; +import { fireEvent, screen, act, within } from '@testing-library/react'; +import userEvent from '@testing-library/user-event'; +import { Droppable } from './droppable'; +import { Draggable } from './draggable'; +import { + dataTransfer, + generateDragDropValue, + renderWithDragDropContext, + EXACT, +} from './test_utils'; + +jest.useFakeTimers({ legacyFakeTimers: true }); + +const draggableValue = generateDragDropValue('drag_this'); + +describe('Droppable', () => { + const onDrop = jest.fn(); + + afterEach(() => { + jest.clearAllMocks(); + }); + + const renderTestComponents = (propsOverrides = [{}]) => { + const rtlRender = renderWithDragDropContext( + <> + + + + {propsOverrides.map((propOverrides, index) => ( + + + + ))} + + ); + + const draggable = screen.getByTestId('domDragDrop_domDraggable_drag_this'); + const droppables = screen.queryAllByTestId('domDragDrop-domDroppable'); + const droppable = droppables[0]; + const draggableKeyboardHandler = screen.getByTestId('domDragDrop-keyboardHandler'); + const droppableContainers = screen.queryAllByTestId('domDragDropContainer'); + return { + ...rtlRender, + draggable, + droppableContainer: droppableContainers[0], + startDragging: () => { + fireEvent.dragStart(draggable, { dataTransfer }); + act(() => { + jest.runAllTimers(); + }); + }, + drop: (droppableIndex = 0, options = {}) => { + const dropEvent = new MouseEvent('drop', { ...options, bubbles: true }); + fireEvent(droppables[droppableIndex], dropEvent); + act(() => { + jest.runAllTimers(); + }); + }, + dragOver: (droppableIndex = 0, options = {}) => { + // const dropEvent = new MouseEvent('dragOver', options); + // fireEvent(droppables[droppableIndex], dropEvent); + + fireEvent.dragOver(droppables[droppableIndex], options); + + act(() => { + jest.runAllTimers(); + }); + }, + dragLeave: (droppableIndex = 0) => { + fireEvent.dragLeave(droppables[droppableIndex]); + act(() => { + jest.runAllTimers(); + }); + }, + startDraggingByKeyboard: () => { + draggableKeyboardHandler.focus(); + userEvent.keyboard('{enter}'); + act(() => { + jest.runAllTimers(); + }); + }, + dropByKeyboard: () => { + draggableKeyboardHandler.focus(); + userEvent.keyboard('{enter}'); + act(() => { + jest.runAllTimers(); + }); + }, + dragOverToNextByKeyboard: () => { + userEvent.keyboard('{arrowright}'); + act(() => { + jest.runAllTimers(); + }); + }, + dragOverToPreviousByKeyboard: () => { + userEvent.keyboard('{arrowleft}'); + act(() => { + jest.runAllTimers(); + }); + }, + pressModifierKey: (key: '{Shift}' | '{Alt}' | '{Ctrl}') => { + userEvent.keyboard(key); + act(() => { + jest.runAllTimers(); + }); + }, + droppable, + droppables, + }; + }; + + test('receives additional classname when is active dropType', () => { + const { droppable, startDragging } = renderTestComponents([{ dropTypes: ['field_add'] }]); + + expect(droppable).toHaveClass('domDroppable', EXACT); + startDragging(); + expect(droppable).toHaveClass('domDroppable domDroppable--active', EXACT); + }); + test('receives additional classname when is active dropType and has custom class', () => { + const { droppable, startDragging } = renderTestComponents([ + { + dropTypes: ['field_add'], + getAdditionalClassesOnEnter: () => 'customClassOnEnter', + getAdditionalClassesOnDroppable: () => 'customClassOnActive', + }, + ]); + + expect(droppable).toHaveClass('domDroppable', EXACT); + startDragging(); + expect(droppable).toHaveClass('domDroppable domDroppable--active customClassOnActive', EXACT); + }); + test('receives additional classname when is active dropType and has custom class on enter until dragleave', () => { + const { droppable, startDragging, dragOver, dragLeave } = renderTestComponents([ + { + dropTypes: ['field_add'], + getAdditionalClassesOnEnter: () => 'customClassOnEnter', + getAdditionalClassesOnDroppable: () => 'customClassOnActive', + }, + ]); + + expect(droppable).toHaveClass('domDroppable', EXACT); + startDragging(); + dragOver(); + expect(droppable).toHaveClass( + 'domDroppable domDroppable--active domDroppable--hover customClassOnActive customClassOnEnter', + EXACT + ); + dragLeave(); + expect(droppable).toHaveClass('domDroppable domDroppable--active customClassOnActive', EXACT); + }); + test('receives additional classname when is active dropType and has custom class on enter until drop', () => { + const { droppable, startDragging, dragOver, drop } = renderTestComponents([ + { + dropTypes: ['field_add'], + getAdditionalClassesOnEnter: () => 'customClassOnEnter', + getAdditionalClassesOnDroppable: () => 'customClassOnActive', + }, + ]); + + expect(droppable).toHaveClass('domDroppable', EXACT); + startDragging(); + dragOver(); + expect(droppable).toHaveClass( + 'domDroppable domDroppable--active domDroppable--hover customClassOnActive customClassOnEnter', + EXACT + ); + drop(); + expect(droppable).toHaveClass('domDroppable', EXACT); + }); + test('gets special styling when another item is dragged if droppable doesnt have dropTypes', () => { + const { droppable, startDragging } = renderTestComponents(); + startDragging(); + expect(droppable).toHaveClass('domDroppable domDroppable--notAllowed', EXACT); + }); + + test('drop function is not called on dropTypes undefined', async () => { + const { drop, startDragging } = renderTestComponents(); + startDragging(); + drop(); + expect(onDrop).not.toHaveBeenCalled(); + }); + + test('onDrop callback is executed when dropping', async () => { + const { startDragging, drop } = renderTestComponents([ + { + dropTypes: ['field_add'], + onDrop, + }, + ]); + startDragging(); + drop(); + expect(onDrop).toBeCalledWith( + expect.objectContaining({ humanData: expect.objectContaining({ label: 'drag_this' }) }), + 'field_add' + ); + }); + + describe('keyboard mode', () => { + test('drop targets get highlighted when pressing arrow keys and draggable get action class too', () => { + const { + droppables, + startDraggingByKeyboard, + dropByKeyboard, + dragOverToNextByKeyboard, + draggable, + } = renderTestComponents([{ dropTypes: ['field_add'] }, { dropTypes: ['field_add'] }]); + startDraggingByKeyboard(); + + expect(draggable).toHaveClass('domDraggable', EXACT); + expect(droppables[0]).toHaveClass('domDroppable domDroppable--active', EXACT); + expect(droppables[1]).toHaveClass('domDroppable domDroppable--active', EXACT); + + dragOverToNextByKeyboard(); + expect(draggable).toHaveClass( + 'domDraggable domDraggable_dragover_keyboard--move domDraggable_dragover_keyboard--copy', + EXACT + ); + expect(droppables[0]).toHaveClass( + 'domDroppable domDroppable--active domDroppable--hover', + EXACT + ); + expect(droppables[1]).toHaveClass('domDroppable domDroppable--active', EXACT); + dragOverToNextByKeyboard(); + expect(droppables[0]).toHaveClass('domDroppable domDroppable--active', EXACT); + expect(droppables[1]).toHaveClass( + 'domDroppable domDroppable--active domDroppable--hover', + EXACT + ); + dropByKeyboard(); + expect(draggable).toHaveClass('domDraggable', EXACT); + expect(droppables[0]).toHaveClass('domDroppable', EXACT); + expect(droppables[1]).toHaveClass('domDroppable', EXACT); + }); + test('executes onDrop callback when drops on drop target', () => { + const firstDroppableOnDrop = jest.fn(); + const secondDroppableOnDrop = jest.fn(); + const { startDraggingByKeyboard, dropByKeyboard, dragOverToNextByKeyboard } = + renderTestComponents([ + { dropTypes: ['field_add'], onDrop: firstDroppableOnDrop }, + { dropTypes: ['field_add'], onDrop: secondDroppableOnDrop }, + ]); + startDraggingByKeyboard(); + // goes to first target + dragOverToNextByKeyboard(); + // goes to second target + dragOverToNextByKeyboard(); + // drops on second target + dropByKeyboard(); + expect(firstDroppableOnDrop).not.toBeCalled(); + expect(secondDroppableOnDrop).toHaveBeenCalledWith(draggableValue, 'field_add'); + }); + test('adds ghost to droppable when element is dragged over', async () => { + const { startDraggingByKeyboard, droppables, draggable, dragOverToNextByKeyboard } = + renderTestComponents([{ dropTypes: ['field_add'] }, { dropTypes: ['field_add'] }]); + startDraggingByKeyboard(); + dragOverToNextByKeyboard(); + expect(droppables[0]).toHaveClass( + 'domDroppable domDroppable--active domDroppable--hover', + EXACT + ); + const domDragDropContainers = screen.queryAllByTestId('domDragDropContainer'); + + const ghostElement = within(domDragDropContainers[0]).getByText('Drag this'); + + expect(ghostElement).toHaveClass('domDraggable_ghost', EXACT); + expect(ghostElement.textContent).toEqual(draggable.textContent); + }); + }); + + describe('multiple drop targets', () => { + test('renders extra drop targets', () => { + const { droppables } = renderTestComponents([ + { + dropTypes: ['move_compatible', 'duplicate_compatible', 'swap_compatible'], + getCustomDropTarget: (dropType: string) =>
{dropType}
, + }, + ]); + expect(droppables).toHaveLength(3); + }); + test('extra drop targets appear when dragging over and disappear when hoveredDropTarget changes', () => { + const { dragLeave, dragOver, startDragging, droppableContainer } = renderTestComponents([ + { + dropTypes: ['move_compatible', 'duplicate_compatible', 'swap_compatible'], + getCustomDropTarget: (dropType: string) =>
{dropType}
, + }, + ]); + startDragging(); + expect(droppableContainer).toHaveClass('domDroppable__container', { exact: true }); + dragOver(); + expect(droppableContainer).toHaveClass( + 'domDroppable__container domDroppable__container-active', + { exact: true } + ); + expect(screen.queryAllByTestId('domDragDropExtraTargets')[0]).toHaveClass( + 'domDroppable__extraTargets-visible' + ); + dragLeave(); + expect(screen.queryAllByTestId('domDragDropExtraTargets')[0]).not.toHaveClass( + 'domDroppable__extraTargets-visible' + ); + }); + + test('correct dropTarget is highlighted within drop targets with the same value and different dropTypes', () => { + const { startDragging, dragOver, droppables, dragLeave } = renderTestComponents([ + { + dropTypes: ['move_compatible', 'duplicate_compatible', 'swap_compatible'], + getCustomDropTarget: (dropType: string) =>
{dropType}
, + }, + ]); + startDragging(); + dragOver(1); + expect(droppables[0]).toHaveClass('domDroppable domDroppable--active', EXACT); + expect(droppables[1]).toHaveClass( + 'domDroppable domDroppable--active domDroppable--hover extraDrop', + EXACT + ); + expect(droppables[2]).toHaveClass('domDroppable domDroppable--active extraDrop', EXACT); + dragLeave(1); + expect(droppables[0]).toHaveClass('domDroppable domDroppable--active', EXACT); + expect(droppables[1]).toHaveClass('domDroppable domDroppable--active extraDrop', EXACT); + expect(droppables[2]).toHaveClass('domDroppable domDroppable--active extraDrop', EXACT); + }); + + test('onDrop callback is executed when dropping on extra drop target', () => { + const { startDragging, dragOver, drop } = renderTestComponents([ + { + dropTypes: ['move_compatible', 'duplicate_compatible', 'swap_compatible'], + onDrop, + getCustomDropTarget: (dropType: string) =>
{dropType}
, + }, + ]); + startDragging(); + dragOver(); + drop(); + expect(onDrop).toBeCalledWith(draggableValue, 'move_compatible'); + startDragging(); + dragOver(1); + drop(1); + expect(onDrop).toBeCalledWith(draggableValue, 'duplicate_compatible'); + startDragging(); + dragOver(2); + drop(2); + expect(onDrop).toBeCalledWith(draggableValue, 'swap_compatible'); + }); + test('pressing Alt or Shift when dragging over the main drop target sets extra drop target as active', () => { + const { startDragging, dragOver, drop } = renderTestComponents([ + { + dropTypes: ['move_compatible', 'duplicate_compatible', 'swap_compatible'], + onDrop, + getCustomDropTarget: (dropType: string) =>
{dropType}
, + }, + ]); + startDragging(); + dragOver(0, { altKey: true }); + drop(0, { altKey: true }); + expect(onDrop).toBeCalledWith(draggableValue, 'duplicate_compatible'); + + startDragging(); + dragOver(0, { shiftKey: true }); + drop(0, { shiftKey: true }); + expect(onDrop).toBeCalledWith(draggableValue, 'swap_compatible'); + }); + test('pressing Alt or Shift when dragging over the extra drop target does nothing', () => { + const { startDragging, dragOver, drop } = renderTestComponents([ + { + dropTypes: ['move_compatible', 'duplicate_compatible', 'swap_compatible'], + onDrop, + getCustomDropTarget: (dropType: string) =>
{dropType}
, + }, + ]); + startDragging(); + dragOver(1, { shiftKey: true }); + drop(1, { shiftKey: true }); + expect(onDrop).toBeCalledWith(draggableValue, 'duplicate_compatible'); + }); + describe('keyboard mode', () => { + test('user can go through all the drop targets ', () => { + const { startDraggingByKeyboard, dragOverToNextByKeyboard, droppables, pressModifierKey } = + renderTestComponents([ + { + dropTypes: ['move_compatible', 'duplicate_compatible', 'swap_compatible'], + getCustomDropTarget: (dropType: string) => ( +
{dropType}
+ ), + }, + { + dropTypes: ['move_compatible'], + getCustomDropTarget: (dropType: string) => ( +
{dropType}
+ ), + }, + ]); + startDraggingByKeyboard(); + dragOverToNextByKeyboard(); + expect(droppables[0]).toHaveClass('domDroppable--hover'); + pressModifierKey('{Alt}'); + expect(droppables[1]).toHaveClass('domDroppable--hover'); + pressModifierKey('{Shift}'); + expect(droppables[2]).toHaveClass('domDroppable--hover'); + dragOverToNextByKeyboard(); + expect(droppables[3]).toHaveClass('domDroppable--hover'); + dragOverToNextByKeyboard(); + // we circled back to the draggable (no drop target is selected) + dragOverToNextByKeyboard(); + expect(droppables[0]).toHaveClass('domDroppable--hover'); + }); + test('user can go through all the drop targets in reverse direction', () => { + const { + startDraggingByKeyboard, + dragOverToPreviousByKeyboard, + droppables, + pressModifierKey, + } = renderTestComponents([ + { + dropTypes: ['move_compatible', 'duplicate_compatible', 'swap_compatible'], + getCustomDropTarget: (dropType: string) =>
{dropType}
, + }, + { + dropTypes: ['move_compatible'], + getCustomDropTarget: (dropType: string) =>
{dropType}
, + }, + ]); + startDraggingByKeyboard(); + dragOverToPreviousByKeyboard(); + expect(droppables[3]).toHaveClass('domDroppable--hover'); + dragOverToPreviousByKeyboard(); + expect(droppables[0]).toHaveClass('domDroppable--hover'); + pressModifierKey('{Alt}'); + expect(droppables[1]).toHaveClass('domDroppable--hover'); + pressModifierKey('{Shift}'); + expect(droppables[2]).toHaveClass('domDroppable--hover'); + dragOverToPreviousByKeyboard(); + // we circled back to the draggable (no drop target is selected) + dragOverToPreviousByKeyboard(); + expect(droppables[3]).toHaveClass('domDroppable--hover'); + }); + test('user can drop on extra drop targets', () => { + const { + startDraggingByKeyboard, + dragOverToNextByKeyboard, + dropByKeyboard, + pressModifierKey, + } = renderTestComponents([ + { + dropTypes: ['move_compatible', 'duplicate_compatible', 'swap_compatible'], + onDrop, + getCustomDropTarget: (dropType: string) =>
{dropType}
, + }, + ]); + startDraggingByKeyboard(); + dragOverToNextByKeyboard(); + dropByKeyboard(); + expect(onDrop).toHaveBeenCalledWith(draggableValue, 'move_compatible'); + onDrop.mockClear(); + + startDraggingByKeyboard(); + dragOverToNextByKeyboard(); + pressModifierKey('{Alt}'); + dropByKeyboard(); + expect(onDrop).toHaveBeenCalledWith(draggableValue, 'duplicate_compatible'); + onDrop.mockClear(); + + startDraggingByKeyboard(); + dragOverToNextByKeyboard(); + pressModifierKey('{Shift}'); + dropByKeyboard(); + expect(onDrop).toHaveBeenCalledWith(draggableValue, 'swap_compatible'); + }); + }); + }); +}); diff --git a/packages/kbn-dom-drag-drop/src/droppable.tsx b/packages/kbn-dom-drag-drop/src/droppable.tsx new file mode 100644 index 0000000000000..1d56e2d0c4b75 --- /dev/null +++ b/packages/kbn-dom-drag-drop/src/droppable.tsx @@ -0,0 +1,481 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React, { useContext, useCallback, useEffect, memo, useState, useRef } from 'react'; +import type { ReactElement } from 'react'; +import classNames from 'classnames'; +import { EuiFlexItem, EuiFlexGroup } from '@elastic/eui'; +import useShallowCompareEffect from 'react-use/lib/useShallowCompareEffect'; +import { + DragDropIdentifier, + ReorderContext, + DropHandler, + Ghost, + DragDropAction, + DragContextState, + useDragDropContext, +} from './providers'; +import { DropType } from './types'; +import './sass/droppable.scss'; + +type DroppableEvent = React.DragEvent; + +const noop = () => {}; + +/** + * The base props to the Droppable component. + */ +export interface DroppableProps { + /** + * The CSS class(es) for the root element. + */ + className?: string; + + /** + * The event handler that fires when an item + * is dropped onto this Droppable component. + */ + onDrop?: DropHandler; + /** + * The value associated with this item. + */ + value: DragDropIdentifier; + + /** + * The React element which will be passed the draggable handlers + */ + children: ReactElement; + + /** + * Disable any drag & drop behaviour + */ + isDisabled?: boolean; + /** + * Additional class names to apply when another element is over the drop target + */ + getAdditionalClassesOnEnter?: (dropType?: DropType) => string | undefined; + /** + * Additional class names to apply when another element is droppable for a currently dragged item + */ + getAdditionalClassesOnDroppable?: (dropType?: DropType) => string | undefined; + + /** + * The optional test subject associated with this DOM element. + */ + dataTestSubj?: string; + + /** + * items belonging to the same group that can be reordered + */ + reorderableGroup?: Array<{ id: string }>; + + /** + * Indicates the type of drop targets - when undefined, the currently dragged item + * cannot be dropped onto this component. + */ + dropTypes?: DropType[]; + /** + * Order for keyboard dragging. This takes an array of numbers which will be used to order hierarchically + */ + order: number[]; + /** + * Extra drop targets by dropType + */ + getCustomDropTarget?: (dropType: DropType) => ReactElement | null; +} + +/** + * The props for a non-draggable instance of that component. + */ +interface DropsInnerProps extends DroppableProps { + dndState: DragContextState; + dndDispatch: React.Dispatch; +} + +/** + * Droppable component + * @param props + * @constructor + */ +export const Droppable = (props: DroppableProps) => { + const [dndState, dndDispatch] = useDragDropContext(); + + if (props.isDisabled) { + return props.children; + } + + const { dropTypes, reorderableGroup } = props; + + const dropProps = { + ...props, + dndState, + dndDispatch, + }; + if (reorderableGroup && reorderableGroup.length > 1 && dropTypes?.[0] === 'reorder') { + return ; + } + return ; +}; + +const DroppableImpl = memo(function DroppableImpl(props: DropsInnerProps) { + const { + dataTestSubj, + className, + onDrop, + value, + children, + dndState, + dndDispatch, + dropTypes, + order, + getAdditionalClassesOnEnter, + getAdditionalClassesOnDroppable, + getCustomDropTarget, + } = props; + + const { dragging, hoveredDropTarget, dataTestSubjPrefix, keyboardMode } = dndState; + + const [isInZone, setIsInZone] = useState(false); + const mainTargetRef = useRef(null); + + useShallowCompareEffect(() => { + if (dropTypes && dropTypes?.[0] && onDrop && keyboardMode) { + dndDispatch({ + type: 'registerDropTargets', + payload: dropTypes.reduce( + (acc, dropType, index) => ({ + ...acc, + [[...order, index].join(',')]: { ...value, onDrop, dropType }, + }), + {} + ), + }); + } + }, [order, dndDispatch, dropTypes, keyboardMode]); + + useEffect(() => { + let isMounted = true; + if (hoveredDropTarget && hoveredDropTarget.id !== value.id) { + setIsInZone(false); + } + setTimeout(() => { + if (!hoveredDropTarget && isMounted) { + setIsInZone(false); + } + }, 1000); + return () => { + isMounted = false; + }; + }, [hoveredDropTarget, setIsInZone, value.id]); + + const dragEnter = useCallback(() => { + if (!isInZone) { + setIsInZone(true); + } + }, [isInZone]); + + const getModifiedDropType = useCallback( + (e: DroppableEvent, dropType: DropType) => { + if (!dropTypes || dropTypes.length <= 1) { + return dropType; + } + const dropIndex = dropTypes.indexOf(dropType); + if (dropIndex > 0) { + return dropType; + } else if (dropIndex === 0) { + if (e.altKey && dropTypes[1]) { + return dropTypes[1]; + } else if (e.shiftKey && dropTypes[2]) { + return dropTypes[2]; + } else if (e.ctrlKey && (dropTypes.length > 3 ? dropTypes[3] : dropTypes[1])) { + return dropTypes.length > 3 ? dropTypes[3] : dropTypes[1]; + } + } + return dropType; + }, + [dropTypes] + ); + + const dragOver = (e: DroppableEvent, dropType: DropType) => { + e.preventDefault(); + if (!dragging || !onDrop) { + return; + } + + const modifiedDropType = getModifiedDropType(e, dropType); + + const isSelectedDropTarget = !!( + hoveredDropTarget?.id === value.id && hoveredDropTarget?.dropType === modifiedDropType + ); + // An optimization to prevent a bunch of React churn. + if (!isSelectedDropTarget) { + dndDispatch({ + type: 'selectDropTarget', + payload: { + dropTarget: { ...value, dropType: modifiedDropType, onDrop }, + dragging, + }, + }); + } + }; + + const dragLeave = useCallback(() => { + dndDispatch({ type: 'leaveDropTarget' }); + }, [dndDispatch]); + + const drop = useCallback( + (e: DroppableEvent, dropType: DropType) => { + e.preventDefault(); + e.stopPropagation(); + setIsInZone(false); + if (onDrop && dragging) { + const modifiedDropType = getModifiedDropType(e, dropType); + onDrop(dragging, modifiedDropType); + setTimeout(() => { + dndDispatch({ + type: 'dropToTarget', + payload: { + dragging, + dropTarget: { ...value, dropType: modifiedDropType, onDrop }, + }, + }); + }); + } + dndDispatch({ type: 'resetState' }); + }, + [dndDispatch, onDrop, dragging, getModifiedDropType, value] + ); + const getProps = (dropType?: DropType, dropChildren?: ReactElement) => { + const isSelectedDropTarget = Boolean( + hoveredDropTarget?.id === value.id && dropType === hoveredDropTarget?.dropType + ); + + return { + 'data-test-subj': dataTestSubj || `${dataTestSubjPrefix}-domDroppable`, + className: getClasses(dropType, dropChildren), + onDragEnter: dragEnter, + onDragLeave: dragLeave, + onDragOver: dropType + ? (e: DroppableEvent) => { + dragOver(e, dropType); + } + : noop, + onDrop: dropType + ? (e: DroppableEvent) => { + drop(e, dropType); + } + : noop, + ghost: + (isSelectedDropTarget && dropType !== 'reorder' && dragging?.ghost && dragging.ghost) || + undefined, + }; + }; + + const getClasses = (dropType?: DropType, dropChildren = children) => { + const isSelectedDropTarget = Boolean( + hoveredDropTarget?.id === value.id && dropType === hoveredDropTarget?.dropType + ); + const classesOnDroppable = getAdditionalClassesOnDroppable?.(dropType); + + const classes = classNames( + 'domDroppable', + { + 'domDroppable--active': dragging && dropType, + 'domDroppable--hover': dropType && isSelectedDropTarget, + 'domDroppable--notAllowed': + dragging && (!dropTypes || !dropTypes.length) && value.id !== dragging.id, + }, + classesOnDroppable && { [classesOnDroppable]: dragging && dropType } + ); + return classNames(classes, className, dropChildren.props.className); + }; + + const getMainTargetClasses = () => { + const classesOnEnter = getAdditionalClassesOnEnter?.(hoveredDropTarget?.dropType); + return classNames(classesOnEnter && { [classesOnEnter]: hoveredDropTarget?.id === value.id }); + }; + + const mainTargetProps = getProps(dropTypes && dropTypes[0]); + + return ( +
+ + {children} + + {dropTypes && dropTypes.length > 1 && ( + + {dropTypes.slice(1).map((dropType) => { + const dropChildren = getCustomDropTarget?.(dropType); + return dropChildren ? ( + + + {dropChildren} + + + ) : null; + })} + + )} +
+ ); +}); + +const SingleDropInner = ({ + ghost, + children, + ...rest +}: { + ghost?: Ghost; + children: ReactElement; + style?: React.CSSProperties; + className?: string; +}) => { + return ( + <> + {React.cloneElement(children, rest)} + {ghost + ? React.cloneElement(ghost.children, { + className: classNames( + ghost.children.props.className, + ghost.className, + 'domDraggable_ghost' + ), + style: ghost.style, + }) + : null} + + ); +}; + +const ReorderableDroppableImpl = memo(function ReorderableDroppableImpl( + props: DropsInnerProps & { reorderableGroup: Array<{ id: string }> } +) { + const { onDrop, value, dndState, dndDispatch, reorderableGroup, className } = props; + + const { dragging, dataTestSubjPrefix, hoveredDropTarget } = dndState; + const currentIndex = reorderableGroup.findIndex((i) => i.id === value.id); + + const [{ isReorderOn, reorderedItems, draggingHeight, direction }, reorderDispatch] = + useContext(ReorderContext); + + const heightRef = useRef(null); + + const isReordered = + isReorderOn && reorderedItems.some((el) => el.id === value.id) && reorderedItems.length; + + useEffect(() => { + if (isReordered && heightRef.current?.clientHeight) { + reorderDispatch({ + type: 'registerReorderedItemHeight', + payload: { id: value.id, height: heightRef.current.clientHeight }, + }); + } + }, [isReordered, reorderDispatch, value.id]); + + const onReorderableDragOver = (e: DroppableEvent) => { + e.preventDefault(); + // An optimization to prevent a bunch of React churn. + if (hoveredDropTarget?.id !== value?.id && onDrop) { + const draggingIndex = reorderableGroup.findIndex((i) => i.id === dragging?.id); + if (!dragging || draggingIndex === -1) { + return; + } + + const droppingIndex = currentIndex; + if (draggingIndex === droppingIndex) { + reorderDispatch({ type: 'reset' }); + } + + reorderDispatch({ + type: 'setReorderedItems', + payload: { draggingIndex, droppingIndex, items: reorderableGroup }, + }); + dndDispatch({ + type: 'selectDropTarget', + payload: { + dropTarget: { ...value, dropType: 'reorder', onDrop }, + dragging, + }, + }); + } + }; + + const onReorderableDrop = (e: DroppableEvent) => { + e.preventDefault(); + e.stopPropagation(); + + if (onDrop && dragging) { + onDrop(dragging, 'reorder'); + // setTimeout ensures it will run after dragEnd messaging + setTimeout(() => { + dndDispatch({ + type: 'dropToTarget', + payload: { + dragging, + dropTarget: { ...value, dropType: 'reorder', onDrop }, + }, + }); + }); + } + dndDispatch({ type: 'resetState' }); + }; + + return ( + <> +
i.id === value.id) + ? { + transform: `translateY(${direction}${draggingHeight}px)`, + } + : undefined + } + ref={heightRef} + data-test-subj={`${dataTestSubjPrefix}-translatableDrop`} + className="domDroppable--translatable" + > + +
+ +
{ + dndDispatch({ type: 'leaveDropTarget' }); + reorderDispatch({ type: 'reset' }); + }} + /> + + ); +}); diff --git a/packages/kbn-dom-drag-drop/src/index.ts b/packages/kbn-dom-drag-drop/src/index.ts index 9fa4f37103522..75d1d2b35db00 100644 --- a/packages/kbn-dom-drag-drop/src/index.ts +++ b/packages/kbn-dom-drag-drop/src/index.ts @@ -8,5 +8,6 @@ export * from './types'; export * from './providers'; -export * from './drag_drop'; +export * from './draggable'; +export * from './droppable'; export { DropOverlayWrapper, type DropOverlayWrapperProps } from './drop_overlay_wrapper'; diff --git a/packages/kbn-dom-drag-drop/src/providers/providers.tsx b/packages/kbn-dom-drag-drop/src/providers/providers.tsx index a036d65d75bc2..361cec5d889e6 100644 --- a/packages/kbn-dom-drag-drop/src/providers/providers.tsx +++ b/packages/kbn-dom-drag-drop/src/providers/providers.tsx @@ -21,9 +21,9 @@ import { import { DEFAULT_DATA_TEST_SUBJ } from '../constants'; import { announce } from './announcements'; -const initialState = { +const defaultState = { dragging: undefined, - activeDropTarget: undefined, + hoveredDropTarget: undefined, keyboardMode: false, dropTargetsByOrder: {}, dataTestSubjPrefix: DEFAULT_DATA_TEST_SUBJ, @@ -33,7 +33,7 @@ const initialState = { * * const [ state, dispatch ] = useDragDropContext(); */ -const DragContext = React.createContext([initialState, () => {}]); +const DragContext = React.createContext([defaultState, () => {}]); export function useDragDropContext() { const context = React.useContext(DragContext); @@ -127,7 +127,7 @@ const dragDropReducer = (state: DragContextState, action: DragDropAction) => { dropTargetsByOrder: undefined, dragging: undefined, keyboardMode: false, - activeDropTarget: undefined, + hoveredDropTarget: undefined, }; case 'registerDropTargets': return { @@ -143,17 +143,17 @@ const dragDropReducer = (state: DragContextState, action: DragDropAction) => { dropTargetsByOrder: undefined, dragging: undefined, keyboardMode: false, - activeDropTarget: undefined, + hoveredDropTarget: undefined, }; case 'leaveDropTarget': return { ...state, - activeDropTarget: undefined, + hoveredDropTarget: undefined, }; case 'selectDropTarget': return { ...state, - activeDropTarget: action.payload.dropTarget, + hoveredDropTarget: action.payload.dropTarget, }; case 'startDragging': return { @@ -222,23 +222,25 @@ const useA11yMiddleware = () => { export function RootDragDropProvider({ children, - dataTestSubj = DEFAULT_DATA_TEST_SUBJ, customMiddleware, + initialState = {}, }: { children: React.ReactNode; - dataTestSubj?: string; customMiddleware?: CustomMiddleware; + initialState?: Partial; }) { const { a11yMessage, a11yMiddleware } = useA11yMiddleware(); const middlewareFns = React.useMemo(() => { return customMiddleware ? [customMiddleware, a11yMiddleware] : [a11yMiddleware]; }, [customMiddleware, a11yMiddleware]); + const dataTestSubj = initialState.dataTestSubjPrefix || DEFAULT_DATA_TEST_SUBJ; + const [state, dispatch] = useReducerWithMiddleware( dragDropReducer, { + ...defaultState, ...initialState, - dataTestSubjPrefix: dataTestSubj, }, middlewareFns ); @@ -269,7 +271,7 @@ export function RootDragDropProvider({ export function nextValidDropTarget( dropTargetsByOrder: RegisteredDropTargets, - activeDropTarget: DropIdentifier | undefined, + hoveredDropTarget: DropIdentifier | undefined, draggingOrder: [string], filterElements: (el: DragDropIdentifier) => boolean = () => true, reverse = false @@ -278,18 +280,13 @@ export function nextValidDropTarget( return; } - const filteredTargets: Array<[string, DropIdentifier | undefined]> = Object.entries( - dropTargetsByOrder - ).filter(([, dropTarget]) => { - return dropTarget && filterElements(dropTarget); + const filteredTargets = Object.entries(dropTargetsByOrder).filter(([order, dropTarget]) => { + return dropTarget && order !== draggingOrder[0] && filterElements(dropTarget); }); - // filter out secondary targets - const uniqueIdTargets = filteredTargets.reduce( - ( - acc: Array<[string, DropIdentifier | undefined]>, - current: [string, DropIdentifier | undefined] - ) => { + // filter out secondary targets and targets with the same id as the dragging element + const uniqueIdTargets = filteredTargets.reduce>( + (acc, current) => { const [, currentDropTarget] = current; if (!currentDropTarget) { return acc; @@ -311,7 +308,7 @@ export function nextValidDropTarget( }); let currentActiveDropIndex = nextDropTargets.findIndex( - ([_, dropTarget]) => dropTarget?.id === activeDropTarget?.id + ([, dropTarget]) => typeof dropTarget === 'object' && dropTarget?.id === hoveredDropTarget?.id ); if (currentActiveDropIndex === -1) { diff --git a/packages/kbn-dom-drag-drop/src/providers/reorder_provider.tsx b/packages/kbn-dom-drag-drop/src/providers/reorder_provider.tsx index 814aecf4d08e1..cfa63ff238553 100644 --- a/packages/kbn-dom-drag-drop/src/providers/reorder_provider.tsx +++ b/packages/kbn-dom-drag-drop/src/providers/reorder_provider.tsx @@ -65,6 +65,10 @@ interface ResetAction { type: 'reset'; } +interface DragEndAction { + type: 'dragEnd'; +} + interface RegisterDraggingItemHeightAction { type: 'registerDraggingItemHeight'; payload: number; @@ -90,6 +94,7 @@ interface SetReorderedItemsAction { } type ReorderAction = + | DragEndAction | ResetAction | RegisterDraggingItemHeightAction | RegisterReorderedItemHeightAction @@ -98,6 +103,8 @@ type ReorderAction = const reorderReducer = (state: ReorderState, action: ReorderAction) => { switch (action.type) { + case 'dragEnd': + return { ...state, reorderedItems: [], isReorderOn: false }; case 'reset': return { ...state, reorderedItems: [] }; case 'registerDraggingItemHeight': @@ -110,7 +117,11 @@ const reorderReducer = (state: ReorderState, action: ReorderAction) => { ), }; case 'setIsReorderOn': - return { ...state, isReorderOn: action.payload }; + return { + ...state, + isReorderOn: action.payload, + reorderedItems: action.payload ? state.reorderedItems : [], + }; case 'setReorderedItems': const { items, draggingIndex, droppingIndex } = action.payload; return draggingIndex < droppingIndex @@ -146,7 +157,7 @@ export function ReorderProvider({ return (
1, })} > diff --git a/packages/kbn-dom-drag-drop/src/providers/types.tsx b/packages/kbn-dom-drag-drop/src/providers/types.tsx index e0a460569a70f..1a1d992f3ec12 100644 --- a/packages/kbn-dom-drag-drop/src/providers/types.tsx +++ b/packages/kbn-dom-drag-drop/src/providers/types.tsx @@ -22,6 +22,7 @@ export interface HumanData { export interface Ghost { children: React.ReactElement; + className?: string; style: React.CSSProperties; } @@ -56,7 +57,7 @@ export type DropIdentifier = DragDropIdentifier & { */ export type DropHandler = (dropped: DragDropIdentifier, dropType?: DropType) => void; -export type RegisteredDropTargets = Record | undefined; +export type RegisteredDropTargets = Record | undefined; export interface DragContextState { /** @@ -70,7 +71,7 @@ export interface DragContextState { /** * currently selected drop target */ - activeDropTarget?: DropIdentifier; + hoveredDropTarget?: DropIdentifier; /** * currently registered drop targets */ diff --git a/packages/kbn-dom-drag-drop/src/sass/drag_drop_mixins.scss b/packages/kbn-dom-drag-drop/src/sass/drag_drop_mixins.scss index 6e753b8b6db32..75c442515b690 100644 --- a/packages/kbn-dom-drag-drop/src/sass/drag_drop_mixins.scss +++ b/packages/kbn-dom-drag-drop/src/sass/drag_drop_mixins.scss @@ -8,16 +8,15 @@ $domDragDropZLevel3: 3; // from mixins // sass-lint:disable-block indentation, no-color-keywords - -// Static styles for a draggable item -@mixin mixinDomDraggable { - @include euiSlightShadow; - background: $euiColorEmptyShade; - cursor: grab; +@mixin mixinDomDragDrop { + transition: $euiAnimSpeedFast ease-in-out; + transition-property: background-color, border-color, opacity; + z-index: $domDragDropZLevel1; + border-radius: $euiBorderRadius; } // Hovering state for drag item and drop area -@mixin mixinDomDragDropHover { +@mixin mixinDomDraggableHover { &:hover { transform: translateX($euiSizeXS); transition: transform $euiAnimSpeedSlow ease-out; @@ -48,7 +47,7 @@ $domDragDropZLevel3: 3; } // Style for drop area while hovering with item -@mixin mixinDomDroppableActiveHover($borderWidth: $euiBorderWidthThin) { +@mixin mixinDomDroppableHover($borderWidth: $euiBorderWidthThin) { background-color: transparentize($euiColorVis0, .75) !important; &:before { border-color: $euiColorVis0 !important; diff --git a/packages/kbn-dom-drag-drop/src/sass/draggable.scss b/packages/kbn-dom-drag-drop/src/sass/draggable.scss new file mode 100644 index 0000000000000..c50bdfcb1ba92 --- /dev/null +++ b/packages/kbn-dom-drag-drop/src/sass/draggable.scss @@ -0,0 +1,44 @@ +@import './drag_drop_mixins'; + +// Draggable item +.domDraggable { + cursor: grab; + @include mixinDomDragDrop; + @include mixinDomDraggableHover; + + // Include a possible nested button like when using FieldButton + & .kbnFieldButton__button, + & .euiLink { + cursor: grab; + } + + &:focus { + @include euiFocusRing; + } +} + +.domDraggable--reorderable { + transform: translateY(0); + transition: transform $euiAnimSpeedFast ease-in-out; + position: relative; + z-index: $domDragDropZLevel1; +} + +.domDraggable__keyboardHandler { + top: 0; + position: absolute; + width: 100%; + height: 100%; + border-radius: $euiBorderRadius; + + &:focus, + &:focus-within { + @include euiFocusRing; + pointer-events: none; + z-index: $domDragDropZLevel2; + } +} + +.domDraggable_active--move, .domDraggable_dragover_keyboard--move { + opacity: 0; +} diff --git a/packages/kbn-dom-drag-drop/src/sass/drag_drop.scss b/packages/kbn-dom-drag-drop/src/sass/droppable.scss similarity index 50% rename from packages/kbn-dom-drag-drop/src/sass/drag_drop.scss rename to packages/kbn-dom-drag-drop/src/sass/droppable.scss index c68ae0c0d6f1e..e081a8f761010 100644 --- a/packages/kbn-dom-drag-drop/src/sass/drag_drop.scss +++ b/packages/kbn-dom-drag-drop/src/sass/droppable.scss @@ -1,14 +1,14 @@ @import './drag_drop_mixins'; -.domDragDrop { - transition: $euiAnimSpeedFast ease-in-out; - transition-property: background-color, border-color, opacity; - z-index: $domDragDropZLevel1; +// Drop area +.domDroppable { + @include mixinDomDragDrop; + &:not(.domDroppable__overlayWrapper) { + @include mixinDomDroppable; + } } -.domDragDrop_ghost { - @include mixinDomDraggable; - border: $euiBorderWidthThin dashed $euiBorderColor; +.domDraggable_ghost { position: absolute !important; // sass-lint:disable-line no-important margin: 0 !important; // sass-lint:disable-line no-important top: 0; @@ -22,30 +22,9 @@ outline-style: auto; // Chrome } -// Draggable item -.domDragDrop-isDraggable { - @include mixinDomDraggable; - @include mixinDomDragDropHover; - - // Include a possible nested button like when using FieldButton - & .kbnFieldButton__button, - & .euiLink { - cursor: grab; - } - - &:focus { - @include euiFocusRing; - } -} - -// Drop area -.domDragDrop-isDroppable:not(.domDragDrop__dropOverlayWrapper) { - @include mixinDomDroppable; -} - // Drop area when there's an item being dragged -.domDragDrop-isDropTarget { - &:not(.domDragDrop__dropOverlayWrapper) { +.domDroppable--active { + &:not(.domDroppable__overlayWrapper) { @include mixinDomDroppable; @include mixinDomDroppableActive; } @@ -56,27 +35,27 @@ } // Drop area while hovering with item -.domDragDrop-isActiveDropTarget:not(.domDragDrop__dropOverlayWrapper) { +.domDroppable--hover:not(.domDroppable__overlayWrapper) { z-index: $domDragDropZLevel3; - @include mixinDomDroppableActiveHover; + @include mixinDomDroppableHover; } // Drop area that is not allowed for current item -.domDragDrop-isNotDroppable { +.domDroppable--notAllowed { @include mixinDomDroppableNotAllowed; } // Drop area will be replacing existing content -.domDragDrop-isReplacing { +.domDroppable--replacing { text-decoration: line-through; } -.domDragDrop-notCompatible:not(.domDragDrop__dropOverlayWrapper) { +.domDroppable--incompatible:not(.domDroppable__overlayWrapper) { background-color: $euiColorHighlight !important; &:before { border: $euiBorderWidthThin dashed $euiColorVis5 !important; } - &.domDragDrop-isActiveDropTarget { + &.domDroppable--hover { background-color: rgba(251, 208, 17, .25) !important; &:before { border-color: $euiColorVis5 !important; @@ -84,61 +63,37 @@ } } -.domDragDrop__container { - position: relative; +.domDroppable__container { width: 100%; height: 100%; - - &.domDragDrop__container-active { + position: relative; + &.domDroppable__container-active { z-index: $domDragDropZLevel3; } + .domDroppable__container { + position: static; + } } $reorderItemMargin: $euiSizeS; -.domDragDrop__reorderableDrop { +.domDroppable--reorderable { position: absolute; width: 100%; top: 0; height: calc(100% + #{calc($reorderItemMargin / 2)}); } -.domDragDrop-translatableDrop { +.domDroppable--translatable { transform: translateY(0); transition: transform $euiAnimSpeedFast ease-in-out; pointer-events: none; - .domDragDrop-isDropTarget { - @include mixinDomDraggable; - } - - .domDragDrop-isActiveDropTarget { + .domDroppable--hover { z-index: $domDragDropZLevel3; } } -.domDragDrop-translatableDrag { - transform: translateY(0); - transition: transform $euiAnimSpeedFast ease-in-out; - position: relative; - z-index: $domDragDropZLevel1; -} - -.domDragDrop__keyboardHandler { - top: 0; - position: absolute; - width: 100%; - height: 100%; - border-radius: $euiBorderRadius; - - &:focus, - &:focus-within { - @include euiFocusRing; - pointer-events: none; - z-index: $domDragDropZLevel2; - } -} - -.domDragDrop__extraDrops { +.domDroppable__extraTargets { opacity: 0; visibility: hidden; position: absolute; @@ -150,58 +105,58 @@ $reorderItemMargin: $euiSizeS; max-width: $euiFormMaxWidth; } -.domDragDrop__extraDrops-visible { +.domDroppable__extraTargets-visible { opacity: 1; visibility: visible; } -.domDragDrop__extraDropWrapper { +.domDroppable__extraDropWrapper { position: relative; width: 100%; height: 100%; background: $euiColorLightestShade; border-radius: $euiSizeXS; - .domDragDrop__extraDrop, - .domDragDrop__extraDrop:before { + .domDroppable__extraTarget, + .domDroppable__extraTarget:before { border-radius: 0; } - &:first-child .domDragDrop__extraDrop, - &:first-child .domDragDrop__extraDrop:before { + &:first-child .domDroppable__extraTarget, + &:first-child .domDroppable__extraTarget:before { border-top-left-radius: $euiSizeXS; border-top-right-radius: $euiSizeXS; } - &:last-child .domDragDrop__extraDrop, - &:last-child .domDragDrop__extraDrop:before { + &:last-child .domDroppable__extraTarget, + &:last-child .domDroppable__extraTarget:before { border-bottom-left-radius: $euiSizeXS; border-bottom-right-radius: $euiSizeXS; } } // collapse borders -.domDragDrop__extraDropWrapper + .domDragDrop__extraDropWrapper { +.domDroppable__extraDropWrapper + .domDroppable__extraDropWrapper { margin-top: -1px; } -.domDragDrop__extraDrop { +.domDroppable__extraTarget { position: relative; height: $euiSizeXS * 8; min-width: $euiSize * 7; color: $euiColorSuccessText; padding: $euiSizeXS; - &.domDragDrop-incompatibleExtraDrop { + &.domDroppable--incompatibleExtraTarget { color: $euiColorWarningText; } } -.domDragDrop__dropOverlayWrapper { +.domDroppable__overlayWrapper { position: relative; height: 100%; } -.domDragDrop__dropOverlay { +.domDroppable_overlay { position: absolute; top: 0; left: 0; @@ -211,40 +166,21 @@ $reorderItemMargin: $euiSizeS; transition: $euiAnimSpeedFast ease-in-out; transition-property: background-color, border-color, opacity; - .domDragDrop-isDropTarget & { + .domDroppable--active & { @include mixinDomDroppable($euiBorderWidthThick); @include mixinDomDroppableActive($euiBorderWidthThick); } - .domDragDrop-isActiveDropTarget & { - @include mixinDomDroppableActiveHover($euiBorderWidthThick); + .domDroppable--hover & { + @include mixinDomDroppableHover($euiBorderWidthThick); } } .domDragDrop-isActiveGroup { background-color: transparentize($euiColorVis0, .75); - .domDragDrop-isKeyboardReorderInProgress { - .domDragDrop--isDragStarted { + .domDraggable_active_keyboard--reorderable { + .domDraggable_dragover_keyboard--copy { opacity: 1; } } - .domDragDrop-isActiveDropTarget, - .domDragDrop-isDropTarget { - background: $euiColorEmptyShade !important; - } -} - -.domDragDrop--isDragStarted { - opacity: .5; -} - -// Draggable item when it is moving -.domDragDrop-isHidden { - opacity: 0; - .domDragDrop__keyboardHandler { - &:focus, - &:focus-within { - animation: none; - } - } -} +} \ No newline at end of file diff --git a/packages/kbn-dom-drag-drop/src/test_utils.tsx b/packages/kbn-dom-drag-drop/src/test_utils.tsx new file mode 100644 index 0000000000000..2effba25c169f --- /dev/null +++ b/packages/kbn-dom-drag-drop/src/test_utils.tsx @@ -0,0 +1,55 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React, { ReactElement } from 'react'; +import faker from 'faker'; +import { RenderOptions, render } from '@testing-library/react'; +import { DragContextState, RootDragDropProvider } from './providers'; + +export const EXACT = { + exact: true, +}; + +export const dataTransfer = { + setData: jest.fn(), + getData: jest.fn(), +}; + +export const generateDragDropValue = (label = faker.lorem.word()) => ({ + id: faker.random.uuid(), + humanData: { + label, + groupLabel: faker.lorem.word(), + position: 1, + canSwap: true, + canDuplicate: true, + layerNumber: 0, + }, +}); + +export const renderWithDragDropContext = ( + ui: ReactElement, + renderOptions?: RenderOptions, + contextStateOverrides: Partial = {} +): any => { + const { wrapper, ...options } = renderOptions || {}; + + const Wrapper: React.FC<{ + children: React.ReactNode; + }> = ({ children }) => { + return ( + {children} + ); + }; + + const rtlRender = render(ui, { wrapper: Wrapper, ...options }); + + return { + ...rtlRender, + }; +}; diff --git a/packages/kbn-eslint-plugin-i18n/rules/i18n_translate_should_start_with_the_right_id.test.ts b/packages/kbn-eslint-plugin-i18n/rules/i18n_translate_should_start_with_the_right_id.test.ts index 39643837a9baf..d45a584588b3c 100644 --- a/packages/kbn-eslint-plugin-i18n/rules/i18n_translate_should_start_with_the_right_id.test.ts +++ b/packages/kbn-eslint-plugin-i18n/rules/i18n_translate_should_start_with_the_right_id.test.ts @@ -43,7 +43,7 @@ const babelTester = [ const invalid: RuleTester.InvalidTestCase[] = [ { - name: 'When a string literal is passed to i18n.translate, it should start with the correct i18n identifier.', + name: 'When a string literal is passed to i18n.translate, it should start with the correct i18n identifier, and if no existing defaultMessage is passed, it should add an empty default.', filename: '/x-pack/plugins/observability_solution/observability/public/test_component.ts', code: ` import { i18n } from '@kbn/i18n'; @@ -61,7 +61,51 @@ function TestComponent() { import { i18n } from '@kbn/i18n'; function TestComponent() { - const foo = i18n.translate('xpack.observability.testComponent.', { defaultMessage: '' }); + const foo = i18n.translate('xpack.observability.', { defaultMessage: '' }); +}`, + }, + { + name: 'When a string literal is passed to i18n.translate, and the root of the i18n identifier is not correct, it should keep the existing identifier but only update the right base app.', + filename: '/x-pack/plugins/observability_solution/observability/public/test_component.ts', + code: ` +import { i18n } from '@kbn/i18n'; + +function TestComponent() { + const foo = i18n.translate('foo.bar.baz'); +}`, + errors: [ + { + line: 5, + message: RULE_WARNING_MESSAGE, + }, + ], + output: ` +import { i18n } from '@kbn/i18n'; + +function TestComponent() { + const foo = i18n.translate('xpack.observability.bar.baz', { defaultMessage: '' }); +}`, + }, + { + name: 'When a string literal is passed to i18n.translate, and the root of the i18n identifier is not correct, it should keep the existing identifier but only update the right base app, and keep the default message if available.', + filename: '/x-pack/plugins/observability_solution/observability/public/test_component.ts', + code: ` +import { i18n } from '@kbn/i18n'; + +function TestComponent() { + const foo = i18n.translate('foo.bar.baz', { defaultMessage: 'giraffe' }); +}`, + errors: [ + { + line: 5, + message: RULE_WARNING_MESSAGE, + }, + ], + output: ` +import { i18n } from '@kbn/i18n'; + +function TestComponent() { + const foo = i18n.translate('xpack.observability.bar.baz', { defaultMessage: 'giraffe' }); }`, }, { diff --git a/packages/kbn-eslint-plugin-i18n/rules/i18n_translate_should_start_with_the_right_id.ts b/packages/kbn-eslint-plugin-i18n/rules/i18n_translate_should_start_with_the_right_id.ts index d6510ba588a4e..1b885fef77931 100644 --- a/packages/kbn-eslint-plugin-i18n/rules/i18n_translate_should_start_with_the_right_id.ts +++ b/packages/kbn-eslint-plugin-i18n/rules/i18n_translate_should_start_with_the_right_id.ts @@ -57,7 +57,7 @@ export const I18nTranslateShouldStartWithTheRightId: Rule.RuleModule = { translationFunction: 'i18n.translate', }); - if (!identifier || (identifier && !identifier.startsWith(`${i18nAppId}.`))) { + if (!identifier) { report({ node: node as any, message: RULE_WARNING_MESSAGE, @@ -76,6 +76,40 @@ export const I18nTranslateShouldStartWithTheRightId: Rule.RuleModule = { }, }); } + + if (identifier && !identifier.startsWith(`${i18nAppId}.`)) { + const oldI18nIdentifierArray = identifier.split('.'); + + const newI18nIdentifier = + oldI18nIdentifierArray[0] === 'xpack' + ? `${i18nAppId}.${oldI18nIdentifierArray.slice(2).join('.')}` + : `${i18nAppId}.${oldI18nIdentifierArray.slice(1).join('.')}`; + + let defaultMessage = ''; + + if ( + node.arguments[1] && + 'properties' in node.arguments[1] && + node.arguments[1].properties.length && + 'value' in node.arguments[1].properties[0] && + node.arguments[1].properties[0].value && + 'value' in node.arguments[1].properties[0].value && + typeof node.arguments[1].properties[0].value.value === 'string' + ) { + defaultMessage = node.arguments[1].properties[0].value.value; + } + + report({ + node: node as any, + message: RULE_WARNING_MESSAGE, + fix(fixer) { + return fixer.replaceTextRange( + node.range, + `i18n.translate('${newI18nIdentifier}', { defaultMessage: '${defaultMessage}' })` + ); + }, + }); + } }, } as Rule.RuleListener; }, diff --git a/packages/kbn-eslint-plugin-i18n/rules/strings_should_be_translated_with_formatted_message.test.ts b/packages/kbn-eslint-plugin-i18n/rules/strings_should_be_translated_with_formatted_message.test.ts index ce68d630f4c14..9afac95ae3a70 100644 --- a/packages/kbn-eslint-plugin-i18n/rules/strings_should_be_translated_with_formatted_message.test.ts +++ b/packages/kbn-eslint-plugin-i18n/rules/strings_should_be_translated_with_formatted_message.test.ts @@ -181,7 +181,7 @@ function TestComponent() { }`, }, { - name: 'JSX elements that have a label or aria-label prop with a string value should be translated with i18n', + name: 'JSX elements that have a label, aria-label or title prop with a string value should be translated with i18n', filename: '/x-pack/plugins/observability_solution/observability/public/test_component.tsx', code: ` import React from 'react'; @@ -191,12 +191,30 @@ function TestComponent() { return ( ) +} +function TestComponent2() { + return ( + + ) +} +function TestComponent3() { + return ( + + ) }`, errors: [ { line: 7, message: RULE_WARNING_MESSAGE, }, + { + line: 12, + message: RULE_WARNING_MESSAGE, + }, + { + line: 17, + message: RULE_WARNING_MESSAGE, + }, ], output: ` import React from 'react'; @@ -206,10 +224,20 @@ function TestComponent() { return ( } /> ) +} +function TestComponent2() { + return ( + } /> + ) +} +function TestComponent3() { + return ( + } /> + ) }`, }, { - name: 'JSX elements that have a label or aria-label prop with a JSXExpression value that is a string should be translated with i18n', + name: 'JSX elements that have a label, aria-label or title prop with a JSXExpression value that is a string should be translated with i18n', filename: '/x-pack/plugins/observability_solution/observability/public/test_component.tsx', code: ` import React from 'react'; @@ -219,12 +247,30 @@ function TestComponent() { return ( ) + } + function TestComponent2() { + return ( + + ) + } + function TestComponent3() { + return ( + + ) }`, errors: [ { line: 7, message: RULE_WARNING_MESSAGE, }, + { + line: 12, + message: RULE_WARNING_MESSAGE, + }, + { + line: 17, + message: RULE_WARNING_MESSAGE, + }, ], output: ` import React from 'react'; @@ -234,6 +280,16 @@ function TestComponent() { return ( } /> ) + } + function TestComponent2() { + return ( + } /> + ) + } + function TestComponent3() { + return ( + } /> + ) }`, }, ]; diff --git a/packages/kbn-eslint-plugin-i18n/rules/strings_should_be_translated_with_formatted_message.ts b/packages/kbn-eslint-plugin-i18n/rules/strings_should_be_translated_with_formatted_message.ts index 008aa2e559679..97cf3b053867a 100644 --- a/packages/kbn-eslint-plugin-i18n/rules/strings_should_be_translated_with_formatted_message.ts +++ b/packages/kbn-eslint-plugin-i18n/rules/strings_should_be_translated_with_formatted_message.ts @@ -75,7 +75,12 @@ export const StringsShouldBeTranslatedWithFormattedMessage: Rule.RuleModule = { }); }, JSXAttribute: (node: TSESTree.JSXAttribute) => { - if (node.name.name !== 'aria-label' && node.name.name !== 'label') return; + if ( + node.name.name !== 'aria-label' && + node.name.name !== 'label' && + node.name.name !== 'title' + ) + return; let val: string = ''; diff --git a/packages/kbn-eslint-plugin-i18n/rules/strings_should_be_translated_with_i18n.test.ts b/packages/kbn-eslint-plugin-i18n/rules/strings_should_be_translated_with_i18n.test.ts index 0fdf7aa047465..cb99d9a289e66 100644 --- a/packages/kbn-eslint-plugin-i18n/rules/strings_should_be_translated_with_i18n.test.ts +++ b/packages/kbn-eslint-plugin-i18n/rules/strings_should_be_translated_with_i18n.test.ts @@ -169,7 +169,7 @@ function TestComponent() { }`, }, { - name: 'JSX elements that have a label or aria-label prop with a string value should be translated with i18n', + name: 'JSX elements that have a label, aria-label or title prop with a string value should be translated with i18n', filename: '/x-pack/plugins/observability_solution/observability/public/test_component.tsx', code: ` import React from 'react'; @@ -179,12 +179,30 @@ function TestComponent() { return ( ) +} +function TestComponent2() { + return ( + + ) +} +function TestComponent3() { + return ( + + ) }`, errors: [ { line: 7, message: RULE_WARNING_MESSAGE, }, + { + line: 12, + message: RULE_WARNING_MESSAGE, + }, + { + line: 17, + message: RULE_WARNING_MESSAGE, + }, ], output: ` import React from 'react'; @@ -194,10 +212,20 @@ function TestComponent() { return ( ) +} +function TestComponent2() { + return ( + + ) +} +function TestComponent3() { + return ( + + ) }`, }, { - name: 'JSX elements that have a label or aria-label prop with a JSXExpression value that is a string should be translated with i18n', + name: 'JSX elements that have a label, aria-label or title prop with a JSXExpression value that is a string should be translated with i18n', filename: '/x-pack/plugins/observability_solution/observability/public/test_component.tsx', code: ` import React from 'react'; @@ -207,12 +235,30 @@ function TestComponent() { return ( ) +} +function TestComponent2() { + return ( + + ) +} +function TestComponent3() { + return ( + + ) }`, errors: [ { line: 7, message: RULE_WARNING_MESSAGE, }, + { + line: 12, + message: RULE_WARNING_MESSAGE, + }, + { + line: 17, + message: RULE_WARNING_MESSAGE, + }, ], output: ` import React from 'react'; @@ -222,6 +268,16 @@ function TestComponent() { return ( ) +} +function TestComponent2() { + return ( + + ) +} +function TestComponent3() { + return ( + + ) }`, }, ]; diff --git a/packages/kbn-eslint-plugin-i18n/rules/strings_should_be_translated_with_i18n.ts b/packages/kbn-eslint-plugin-i18n/rules/strings_should_be_translated_with_i18n.ts index ec8bdb13815fe..c41f640748d47 100644 --- a/packages/kbn-eslint-plugin-i18n/rules/strings_should_be_translated_with_i18n.ts +++ b/packages/kbn-eslint-plugin-i18n/rules/strings_should_be_translated_with_i18n.ts @@ -73,7 +73,12 @@ export const StringsShouldBeTranslatedWithI18n: Rule.RuleModule = { }); }, JSXAttribute: (node: TSESTree.JSXAttribute) => { - if (node.name.name !== 'aria-label' && node.name.name !== 'label') return; + if ( + node.name.name !== 'aria-label' && + node.name.name !== 'label' && + node.name.name !== 'title' + ) + return; let val: string = ''; diff --git a/packages/kbn-esql-utils/index.ts b/packages/kbn-esql-utils/index.ts index b4fc1f6548c69..1592777d136f3 100644 --- a/packages/kbn-esql-utils/index.ts +++ b/packages/kbn-esql-utils/index.ts @@ -14,5 +14,6 @@ export { removeDropCommandsFromESQLQuery, getIndexForESQLQuery, getInitialESQLQuery, + getESQLWithSafeLimit, TextBasedLanguages, } from './src'; diff --git a/packages/kbn-esql-utils/src/index.ts b/packages/kbn-esql-utils/src/index.ts index f2e537a240f77..58e241c1ebc6e 100644 --- a/packages/kbn-esql-utils/src/index.ts +++ b/packages/kbn-esql-utils/src/index.ts @@ -9,6 +9,7 @@ export { TextBasedLanguages } from './types'; export { getESQLAdHocDataview, getIndexForESQLQuery } from './utils/get_esql_adhoc_dataview'; export { getInitialESQLQuery } from './utils/get_initial_esql_query'; +export { getESQLWithSafeLimit } from './utils/get_esql_with_safe_limit'; export { getIndexPatternFromSQLQuery, getIndexPatternFromESQLQuery, diff --git a/packages/kbn-esql-utils/src/utils/get_esql_with_safe_limit.test.ts b/packages/kbn-esql-utils/src/utils/get_esql_with_safe_limit.test.ts new file mode 100644 index 0000000000000..a78dd9f9c0647 --- /dev/null +++ b/packages/kbn-esql-utils/src/utils/get_esql_with_safe_limit.test.ts @@ -0,0 +1,31 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { getESQLWithSafeLimit } from './get_esql_with_safe_limit'; + +const LIMIT = 10000; + +describe('getESQLWithSafeLimit()', () => { + it('should not add the limit', () => { + expect(getESQLWithSafeLimit('show info', LIMIT)).toBe('show info'); + expect(getESQLWithSafeLimit('row t = 5', LIMIT)).toBe('row t = 5'); + }); + + it('should add the limit', () => { + expect(getESQLWithSafeLimit(' from logs', LIMIT)).toBe('from logs | LIMIT 10000'); + expect(getESQLWithSafeLimit('FROM logs* | LIMIT 5', LIMIT)).toBe( + 'FROM logs* | LIMIT 10000| LIMIT 5' + ); + expect(getESQLWithSafeLimit('FROM logs* | SORT @timestamp | LIMIT 5', LIMIT)).toBe( + 'FROM logs* |SORT @timestamp | LIMIT 10000| LIMIT 5' + ); + expect(getESQLWithSafeLimit('from logs* | STATS MIN(a) BY b', LIMIT)).toBe( + 'from logs* | LIMIT 10000| STATS MIN(a) BY b' + ); + }); +}); diff --git a/packages/kbn-esql-utils/src/utils/get_esql_with_safe_limit.ts b/packages/kbn-esql-utils/src/utils/get_esql_with_safe_limit.ts new file mode 100644 index 0000000000000..e8b63b21dd1d4 --- /dev/null +++ b/packages/kbn-esql-utils/src/utils/get_esql_with_safe_limit.ts @@ -0,0 +1,34 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export function getESQLWithSafeLimit(esql: string, limit: number): string { + if (!esql.trim().toLowerCase().startsWith('from')) { + return esql; + } + const parts = esql.split('|'); + + if (!parts.length) { + return esql; + } + + const fromCommandIndex = 0; + const sortCommandIndex = 1; + const index = + parts.length > 1 && parts[1].trim().toLowerCase().startsWith('sort') + ? sortCommandIndex + : fromCommandIndex; + + return parts + .map((part, i) => { + if (i === index) { + return `${part.trim()} | LIMIT ${limit}`; + } + return part; + }) + .join('|'); +} diff --git a/packages/kbn-field-utils/index.ts b/packages/kbn-field-utils/index.ts index 26dd359a359a1..643e22ce6450a 100644 --- a/packages/kbn-field-utils/index.ts +++ b/packages/kbn-field-utils/index.ts @@ -14,6 +14,7 @@ export { KNOWN_FIELD_TYPE_LIST, } from './src/utils/field_types'; +export { getTextBasedColumnIconType } from './src/utils/get_text_based_column_icon_type'; export { getFieldIconType } from './src/utils/get_field_icon_type'; export { getFieldType } from './src/utils/get_field_type'; export { getFieldTypeDescription } from './src/utils/get_field_type_description'; diff --git a/packages/kbn-field-utils/src/utils/get_text_based_column_icon_type.ts b/packages/kbn-field-utils/src/utils/get_text_based_column_icon_type.ts new file mode 100644 index 0000000000000..0ccad94674208 --- /dev/null +++ b/packages/kbn-field-utils/src/utils/get_text_based_column_icon_type.ts @@ -0,0 +1,28 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import type { DatatableColumnMeta } from '@kbn/expressions-plugin/common'; +import { getFieldIconType } from './get_field_icon_type'; + +export function getTextBasedColumnIconType( + columnMeta: + | { + type: DatatableColumnMeta['type']; + esType?: DatatableColumnMeta['esType']; + } + | undefined + | null +): string | null { + return columnMeta && columnMeta.type + ? getFieldIconType({ + name: '', + type: columnMeta.type, + esTypes: columnMeta.esType ? [columnMeta.esType] : [], + }) + : null; +} diff --git a/packages/kbn-field-utils/tsconfig.json b/packages/kbn-field-utils/tsconfig.json index 9aaae0d119e68..4b75159b5f7fe 100644 --- a/packages/kbn-field-utils/tsconfig.json +++ b/packages/kbn-field-utils/tsconfig.json @@ -9,6 +9,7 @@ "@kbn/data-views-plugin", "@kbn/react-field", "@kbn/field-types", + "@kbn/expressions-plugin", ], "exclude": ["target/**/*"] } diff --git a/packages/kbn-lens-embeddable-utils/config_builder/charts/metric.test.ts b/packages/kbn-lens-embeddable-utils/config_builder/charts/metric.test.ts index d549f5bfa1f1b..052c89a0c56c7 100644 --- a/packages/kbn-lens-embeddable-utils/config_builder/charts/metric.test.ts +++ b/packages/kbn-lens-embeddable-utils/config_builder/charts/metric.test.ts @@ -90,12 +90,18 @@ test('generates metric chart config', async () => { Object { "columnId": "metric_formula_accessor", "fieldName": "count", + "meta": Object { + "type": "number", + }, }, ], "columns": Array [ Object { "columnId": "metric_formula_accessor", "fieldName": "count", + "meta": Object { + "type": "number", + }, }, ], "index": "test", diff --git a/packages/kbn-lens-embeddable-utils/config_builder/charts/metric.ts b/packages/kbn-lens-embeddable-utils/config_builder/charts/metric.ts index 632f96557a27e..66bc26238fb6e 100644 --- a/packages/kbn-lens-embeddable-utils/config_builder/charts/metric.ts +++ b/packages/kbn-lens-embeddable-utils/config_builder/charts/metric.ts @@ -196,8 +196,10 @@ function getValueColumns(layer: LensMetricConfig) { ...(layer.breakdown ? [getValueColumn(getAccessorName('breakdown'), layer.breakdown as string)] : []), - getValueColumn(ACCESSOR, layer.value), - ...(layer.queryMaxValue ? [getValueColumn(getAccessorName('max'), layer.queryMaxValue)] : []), + getValueColumn(ACCESSOR, layer.value, 'number'), + ...(layer.queryMaxValue + ? [getValueColumn(getAccessorName('max'), layer.queryMaxValue, 'number')] + : []), ...(layer.querySecondaryMetric ? [getValueColumn(getAccessorName('secondary'), layer.querySecondaryMetric)] : []), diff --git a/packages/kbn-management/cards_navigation/index.ts b/packages/kbn-management/cards_navigation/index.ts index b6d71a5d3638b..5e9fea196e11f 100644 --- a/packages/kbn-management/cards_navigation/index.ts +++ b/packages/kbn-management/cards_navigation/index.ts @@ -7,6 +7,5 @@ */ export type { AppId, CardsNavigationComponentProps } from './src'; - -export { appIds } from './src'; -export { CardsNavigation } from './src'; +export { appCategories, type CardNavExtensionDefinition } from './src/types'; +export { appIds, CardsNavigation } from './src'; diff --git a/packages/kbn-management/cards_navigation/src/cards_navigation.tsx b/packages/kbn-management/cards_navigation/src/cards_navigation.tsx index b7ab58a4777db..b8ea0a1380b30 100644 --- a/packages/kbn-management/cards_navigation/src/cards_navigation.tsx +++ b/packages/kbn-management/cards_navigation/src/cards_navigation.tsx @@ -109,6 +109,13 @@ const getEnabledAppsByCategory = ( }), apps: getAppsForCategory(appCategories.DATA, filteredApps), }, + { + id: appCategories.ACCESS, + title: i18n.translate('management.landing.withCardNavigation.accessTitle', { + defaultMessage: 'Access', + }), + apps: getAppsForCategory(appCategories.ACCESS, filteredApps), + }, { id: appCategories.ALERTS, title: i18n.translate('management.landing.withCardNavigation.alertsTitle', { diff --git a/packages/kbn-management/cards_navigation/src/consts.tsx b/packages/kbn-management/cards_navigation/src/consts.tsx index 68a4f5040ca01..97b62eca90a4c 100644 --- a/packages/kbn-management/cards_navigation/src/consts.tsx +++ b/packages/kbn-management/cards_navigation/src/consts.tsx @@ -119,14 +119,6 @@ export const appDefinitions: Record = { icon: 'tag', }, - [AppIds.API_KEYS]: { - category: appCategories.OTHER, - description: i18n.translate('management.landing.withCardNavigation.apiKeysDescription', { - defaultMessage: 'Allow programmatic access to your project data and capabilities.', - }), - icon: 'lockOpen', - }, - [AppIds.SERVERLESS_SETTINGS]: { category: appCategories.OTHER, description: i18n.translate('management.landing.withCardNavigation.settingsDescription', { @@ -135,10 +127,19 @@ export const appDefinitions: Record = { icon: 'gear', }, + // Access section + [AppIds.API_KEYS]: { + category: appCategories.ACCESS, + description: i18n.translate('management.landing.withCardNavigation.apiKeysDescription', { + defaultMessage: 'Allow programmatic access to your project data and capabilities.', + }), + icon: 'lockOpen', + }, [AppIds.ROLES]: { - category: appCategories.OTHER, + category: appCategories.ACCESS, description: i18n.translate('management.landing.withCardNavigation.rolesDescription', { - defaultMessage: 'Allow custom roles to be created for users.', + defaultMessage: + 'Create roles unique to this project and combine the exact set of privileges that your users need.', }), icon: 'usersRolesApp', }, diff --git a/packages/kbn-management/cards_navigation/src/types.ts b/packages/kbn-management/cards_navigation/src/types.ts index 848f0e57e02df..f03544342abb0 100644 --- a/packages/kbn-management/cards_navigation/src/types.ts +++ b/packages/kbn-management/cards_navigation/src/types.ts @@ -20,7 +20,6 @@ export enum AppIds { SAVED_OBJECTS = 'objects', TAGS = 'tags', FILES_MANAGEMENT = 'filesManagement', - API_KEYS = 'api_keys', DATA_VIEWS = 'dataViews', REPORTING = 'reporting', CONNECTORS = 'triggersActionsConnectors', @@ -28,6 +27,7 @@ export enum AppIds { MAINTENANCE_WINDOWS = 'maintenanceWindows', SERVERLESS_SETTINGS = 'settings', ROLES = 'roles', + API_KEYS = 'api_keys', } // Create new type that is a union of all the appId values @@ -35,6 +35,7 @@ export type AppId = `${AppIds}`; export const appCategories = { DATA: 'data', + ACCESS: 'access', ALERTS: 'alerts', CONTENT: 'content', OTHER: 'other', diff --git a/packages/kbn-monaco/src/esql/antlr/esql_parser.g4 b/packages/kbn-monaco/src/esql/antlr/esql_parser.g4 index ede884d6311d7..0c7cf96f5a2e1 100644 --- a/packages/kbn-monaco/src/esql/antlr/esql_parser.g4 +++ b/packages/kbn-monaco/src/esql/antlr/esql_parser.g4 @@ -259,4 +259,4 @@ enrichCommand enrichWithClause : (newName=qualifiedNamePattern ASSIGN)? enrichField=qualifiedNamePattern - ; + ; \ No newline at end of file diff --git a/packages/kbn-monaco/src/esql/lib/ast/definitions/functions.ts b/packages/kbn-monaco/src/esql/lib/ast/definitions/functions.ts index 898c888799cff..46712fed700bd 100644 --- a/packages/kbn-monaco/src/esql/lib/ast/definitions/functions.ts +++ b/packages/kbn-monaco/src/esql/lib/ast/definitions/functions.ts @@ -592,7 +592,7 @@ export const evalFunctionsDefinitions: FunctionDefinition[] = [ { name: 'condition', type: 'boolean' }, { name: 'value', type: 'any' }, ], - minParams: 3, + minParams: 2, returnType: 'any', examples: [ `from index | eval type = case(languages <= 1, "monolingual", languages <= 2, "bilingual", "polyglot")`, diff --git a/packages/kbn-monaco/src/esql/lib/ast/shared/helpers.ts b/packages/kbn-monaco/src/esql/lib/ast/shared/helpers.ts index 93826be54bf5b..8fea0aa83ec9e 100644 --- a/packages/kbn-monaco/src/esql/lib/ast/shared/helpers.ts +++ b/packages/kbn-monaco/src/esql/lib/ast/shared/helpers.ts @@ -398,7 +398,7 @@ function fuzzySearch(fuzzyName: string, resources: IterableIterator) { } } -function getMatcher(name: string, position: 'start' | 'end' | 'middle') { +function getMatcher(name: string, position: 'start' | 'end' | 'middle' | 'multiple-within') { if (position === 'start') { const prefix = name.substring(1); return (resource: string) => resource.endsWith(prefix); @@ -407,6 +407,19 @@ function getMatcher(name: string, position: 'start' | 'end' | 'middle') { const prefix = name.substring(0, name.length - 1); return (resource: string) => resource.startsWith(prefix); } + if (position === 'multiple-within') { + // make sure to remove the * at the beginning of the name if present + const safeName = name.startsWith('*') ? name.slice(1) : name; + // replace 2 ore more consecutive wildcards with a single one + const setOfChars = safeName.replace(/\*{2+}/g, '*').split('*'); + return (resource: string) => { + let index = -1; + return setOfChars.every((char) => { + index = resource.indexOf(char, index + 1); + return index !== -1; + }); + }; + } const [prefix, postFix] = name.split('*'); return (resource: string) => resource.startsWith(prefix) && resource.endsWith(postFix); } @@ -415,6 +428,10 @@ function getWildcardPosition(name: string) { if (!hasWildcard(name)) { return 'none'; } + const wildCardCount = name.match(/\*/g)!.length; + if (wildCardCount > 1) { + return 'multiple-within'; + } if (name.startsWith('*')) { return 'start'; } @@ -425,7 +442,7 @@ function getWildcardPosition(name: string) { } export function hasWildcard(name: string) { - return name.includes('*'); + return /\*/.test(name); } export function isVariable( column: ESQLRealField | ESQLVariable | undefined diff --git a/packages/kbn-monaco/src/esql/lib/ast/validation/esql_validation_meta_tests.json b/packages/kbn-monaco/src/esql/lib/ast/validation/esql_validation_meta_tests.json index 646d13ea589fc..39d2ccd562c06 100644 --- a/packages/kbn-monaco/src/esql/lib/ast/validation/esql_validation_meta_tests.json +++ b/packages/kbn-monaco/src/esql/lib/ast/validation/esql_validation_meta_tests.json @@ -250,10 +250,54 @@ "query": "from index*", "error": false }, + { + "query": "from *a_i*dex*", + "error": false + }, + { + "query": "from in*ex*", + "error": false + }, + { + "query": "from *n*ex", + "error": false + }, + { + "query": "from *n*ex*", + "error": false + }, + { + "query": "from i*d*x*", + "error": false + }, + { + "query": "from i*d*x", + "error": false + }, + { + "query": "from i***x*", + "error": false + }, + { + "query": "from i****", + "error": false + }, + { + "query": "from i**", + "error": false + }, + { + "query": "from index**", + "error": false + }, { "query": "from *ex", "error": false }, + { + "query": "from *ex*", + "error": false + }, { "query": "from in*ex", "error": false @@ -519,11 +563,11 @@ "error": false }, { - "query": "row var = case(true, \"a\", \"a\")", + "query": "row var = case(true, \"a\")", "error": false }, { - "query": "row case(true, \"a\", \"a\")", + "query": "row case(true, \"a\")", "error": false }, { @@ -2438,6 +2482,18 @@ "query": "from index | drop s*", "error": false }, + { + "query": "from index | drop s**Field", + "error": false + }, + { + "query": "from index | drop *Field*", + "error": false + }, + { + "query": "from index | drop s*F*d", + "error": false + }, { "query": "from index | drop *Field", "error": false @@ -4815,11 +4871,11 @@ "error": true }, { - "query": "from a_index | eval var = case(booleanField, stringField, stringField)", + "query": "from a_index | eval var = case(booleanField, stringField)", "error": false }, { - "query": "from a_index | eval case(booleanField, stringField, stringField)", + "query": "from a_index | eval case(booleanField, stringField)", "error": false }, { diff --git a/packages/kbn-monaco/src/esql/lib/ast/validation/validation.test.ts b/packages/kbn-monaco/src/esql/lib/ast/validation/validation.test.ts index d27dbcdb6c582..937d9a27e4707 100644 --- a/packages/kbn-monaco/src/esql/lib/ast/validation/validation.test.ts +++ b/packages/kbn-monaco/src/esql/lib/ast/validation/validation.test.ts @@ -428,7 +428,18 @@ describe('validation logic', () => { ]); testErrorsAndWarnings(`from ind*, other*`, []); testErrorsAndWarnings(`from index*`, []); + testErrorsAndWarnings(`from *a_i*dex*`, []); + testErrorsAndWarnings(`from in*ex*`, []); + testErrorsAndWarnings(`from *n*ex`, []); + testErrorsAndWarnings(`from *n*ex*`, []); + testErrorsAndWarnings(`from i*d*x*`, []); + testErrorsAndWarnings(`from i*d*x`, []); + testErrorsAndWarnings(`from i***x*`, []); + testErrorsAndWarnings(`from i****`, []); + testErrorsAndWarnings(`from i**`, []); + testErrorsAndWarnings(`from index**`, []); testErrorsAndWarnings(`from *ex`, []); + testErrorsAndWarnings(`from *ex*`, []); testErrorsAndWarnings(`from in*ex`, []); testErrorsAndWarnings(`from ind*ex`, []); testErrorsAndWarnings(`from indexes*`, ['Unknown index [indexes*]']); @@ -768,6 +779,9 @@ describe('validation logic', () => { ]); testErrorsAndWarnings('from index | drop `any#Char$Field`', []); testErrorsAndWarnings('from index | drop s*', []); + testErrorsAndWarnings('from index | drop s**Field', []); + testErrorsAndWarnings('from index | drop *Field*', []); + testErrorsAndWarnings('from index | drop s*F*d', []); testErrorsAndWarnings('from index | drop *Field', []); testErrorsAndWarnings('from index | drop s*Field', []); testErrorsAndWarnings('from index | drop string*Field', []); diff --git a/packages/kbn-optimizer/limits.yml b/packages/kbn-optimizer/limits.yml index 97c50ef8e22ef..5f51cd5fa41f9 100644 --- a/packages/kbn-optimizer/limits.yml +++ b/packages/kbn-optimizer/limits.yml @@ -126,6 +126,7 @@ pageLoadAssetSize: savedSearch: 16225 screenshotMode: 17856 screenshotting: 22870 + searchPlayground: 19325 searchprofiler: 67080 security: 81771 securitySolution: 82780 diff --git a/packages/kbn-reporting/common/routes.ts b/packages/kbn-reporting/common/routes.ts index 4ac8541dfefdc..ebe7335db06a8 100644 --- a/packages/kbn-reporting/common/routes.ts +++ b/packages/kbn-reporting/common/routes.ts @@ -23,7 +23,7 @@ export const INTERNAL_ROUTES = { DELETE_PREFIX: prefixInternalPath + '/jobs/delete', // docId is added to the final path DOWNLOAD_PREFIX: prefixInternalPath + '/jobs/download', // docId is added to the final path }, - DOWNLOAD_CSV: prefixInternalPath + '/generate/immediate/csv_searchsource', + DOWNLOAD_CSV: prefixInternalPath + '/generate/immediate/csv_searchsource', // DEPRECATED GENERATE_PREFIX: prefixInternalPath + '/generate', // exportTypeId is added to the final path }; diff --git a/packages/kbn-reporting/export_types/csv/csv_searchsource_immediate.ts b/packages/kbn-reporting/export_types/csv/csv_searchsource_immediate.ts index 5afb642283cb3..65269feabcf85 100644 --- a/packages/kbn-reporting/export_types/csv/csv_searchsource_immediate.ts +++ b/packages/kbn-reporting/export_types/csv/csv_searchsource_immediate.ts @@ -50,6 +50,10 @@ export type ImmediateExecuteFn = ( req: KibanaRequest ) => Promise; +/** + * @deprecated + * Requires `xpack.reporting.csv.enablePanelActionDownload` set to `true` (default is false) + */ export class CsvSearchSourceImmediateExportType extends ExportType< JobParamsDownloadCSV, ImmediateExecuteFn, diff --git a/packages/kbn-reporting/export_types/csv_common/index.ts b/packages/kbn-reporting/export_types/csv_common/index.ts index 8fc44c476dc0f..ce27847d072c2 100644 --- a/packages/kbn-reporting/export_types/csv_common/index.ts +++ b/packages/kbn-reporting/export_types/csv_common/index.ts @@ -17,6 +17,10 @@ import type { export * from './constants'; +/** + * @deprecated + * Requires `xpack.reporting.csv.enablePanelActionDownload` set to `true` (default is false) + */ export interface JobParamsDownloadCSV { browserTimezone: string; title: string; @@ -32,6 +36,14 @@ interface BaseParamsCSV { export type JobParamsCSV = BaseParamsCSV & BaseParams; export type TaskPayloadCSV = BaseParamsCSV & BasePayload; +/** + * Public-facing interface + * Apps should use this interface to build job params. The browserTimezone and version + * fields become automatically provided by Reporting + * @public + */ +export type JobAppParamsCSV = Omit; + interface CsvFromSavedObjectBase { objectType: 'search'; } @@ -47,13 +59,18 @@ export interface TaskPayloadCsvFromSavedObject extends CsvFromSavedObjectBase, B pagingStrategy: CsvPagingStrategy; } -export const CSV_REPORTING_ACTION = 'downloadCsvReport'; +export const CSV_REPORTING_ACTION = 'generateCsvReport'; +/** + * @deprecated + * Requires `xpack.reporting.csv.enablePanelActionDownload` set to `true` (default is false) + */ export const CSV_SEARCHSOURCE_IMMEDIATE_TYPE = 'csv_searchsource_immediate'; -// This is deprecated because it lacks support for runtime fields -// but the extension points are still needed for pre-existing scripted automation, until 8.0 -export const CSV_REPORT_TYPE_DEPRECATED = 'CSV'; +/** + * @deprecated + * Supported in case older reports exist in storage + */ export const CSV_JOB_TYPE_DEPRECATED = 'csv'; export { getQueryFromCsvJob, type QueryInspection } from './lib/get_query_from_job'; diff --git a/packages/kbn-reporting/public/reporting_api_client.ts b/packages/kbn-reporting/public/reporting_api_client.ts index 814e5822b747b..449e7a878e0c5 100644 --- a/packages/kbn-reporting/public/reporting_api_client.ts +++ b/packages/kbn-reporting/public/reporting_api_client.ts @@ -41,7 +41,7 @@ interface IReportingAPI { // Helpers getReportURL(jobId: string): string; getReportingPublicJobPath(exportType: string, jobParams: BaseParams & T): string; // Return a URL to queue a job, with the job params encoded in the query string of the URL. Used for copying POST URL - createReportingJob(exportType: string, jobParams: BaseParams & T): Promise; // Sends a request to queue a job, with the job params in the POST body + createReportingJob(exportType: string, jobParams: BaseParams & T): Promise; // Sends a request to queue a job, with the job params in the POST body getServerBasePath(): string; // Provides the raw server basePath to allow it to be stripped out from relativeUrls in job params // CRUD @@ -177,17 +177,29 @@ export class ReportingAPIClient implements IReportingAPI { */ public async createReportingJob(exportType: string, jobParams: BaseParams) { const jobParamsRison = rison.encode(jobParams); - const resp: { job: ReportApiJSON } = await this.http.post( - `${INTERNAL_ROUTES.GENERATE_PREFIX}/${exportType}`, - { - method: 'POST', - body: JSON.stringify({ jobParams: jobParamsRison }), + try { + const resp: { job?: ReportApiJSON } | undefined = await this.http.post( + `${INTERNAL_ROUTES.GENERATE_PREFIX}/${exportType}`, + { + method: 'POST', + body: JSON.stringify({ jobParams: jobParamsRison }), + } + ); + if (resp?.job) { + this.addPendingJobId(resp.job.id); + return new Job(resp.job); } - ); - this.addPendingJobId(resp.job.id); - return new Job(resp.job); + } catch (err) { + // eslint-disable-next-line no-console + console.error(err); + throw new Error('invalid response!'); + } } + /** + * @deprecated + * Requires `xpack.reporting.csv.enablePanelActionDownload` set to `true` (default is false) + */ public async createImmediateReport(baseParams: BaseParams) { const { objectType: _objectType, ...params } = baseParams; // objectType is not needed for immediate download api return this.http.post(INTERNAL_ROUTES.DOWNLOAD_CSV, { diff --git a/packages/kbn-reporting/public/share/panel_actions/get_csv_panel_action.test.ts b/packages/kbn-reporting/public/share/panel_actions/get_csv_panel_action.test.ts index 43a2d09757061..c009bb4be965d 100644 --- a/packages/kbn-reporting/public/share/panel_actions/get_csv_panel_action.test.ts +++ b/packages/kbn-reporting/public/share/panel_actions/get_csv_panel_action.test.ts @@ -17,6 +17,7 @@ import { LicenseCheckState } from '@kbn/licensing-plugin/public'; import { licensingMock } from '@kbn/licensing-plugin/public/mocks'; import type { SavedSearch } from '@kbn/saved-search-plugin/public'; import { ReportingAPIClient } from '../..'; +import type { ClientConfigType } from '../../types'; import { ActionContext, type PanelActionDependencies, @@ -27,6 +28,7 @@ const core = coreMock.createSetup(); let apiClient: ReportingAPIClient; describe('GetCsvReportPanelAction', () => { + let csvConfig: ClientConfigType['csv']; let context: ActionContext; let mockLicenseState: LicenseCheckState; let mockSearchSource: SearchSource; @@ -51,12 +53,19 @@ describe('GetCsvReportPanelAction', () => { }); } - core.http.post.mockResolvedValue({}); + core.http.post.mockResolvedValue({ + job: { id: 'mock-job-id', payload: { objectType: 'search' } }, + }); }); beforeEach(() => { + csvConfig = { + scroll: {} as ClientConfigType['csv']['scroll'], + enablePanelActionDownload: false, + }; + apiClient = new ReportingAPIClient(core.http, core.uiSettings, '7.15.0'); - jest.spyOn(apiClient, 'createImmediateReport'); + jest.spyOn(apiClient, 'createReportingJob'); mockLicenseState = 'valid'; @@ -101,22 +110,27 @@ describe('GetCsvReportPanelAction', () => { } as unknown as ActionContext; }); + afterEach(() => { + jest.resetAllMocks(); + }); + it('translates empty embeddable context into job params', async () => { const panel = new ReportingCsvPanelAction({ core, apiClient, startServices$: mockStartServices$, usesUiCapabilities: true, + csvConfig, }); await Rx.firstValueFrom(mockStartServices$); await panel.execute(context); - expect(apiClient.createImmediateReport).toHaveBeenCalledWith({ + expect(apiClient.createReportingJob).toHaveBeenCalledWith('csv_searchsource', { browserTimezone: undefined, columns: [], - objectType: 'downloadCsv', + objectType: 'search', searchSource: {}, title: '', version: '7.15.0', @@ -143,70 +157,64 @@ describe('GetCsvReportPanelAction', () => { apiClient, startServices$: mockStartServices$, usesUiCapabilities: true, + csvConfig, }); await Rx.firstValueFrom(mockStartServices$); await panel.execute(context); - expect(apiClient.createImmediateReport).toHaveBeenCalledWith({ + expect(apiClient.createReportingJob).toHaveBeenCalledWith('csv_searchsource', { browserTimezone: undefined, columns: ['column_a', 'column_b'], - objectType: 'downloadCsv', + objectType: 'search', searchSource: { testData: 'testDataValue' }, title: '', version: '7.15.0', }); }); - it('allows downloading for valid licenses', async () => { + it('allows csv generation for valid licenses', async () => { const panel = new ReportingCsvPanelAction({ core, apiClient, startServices$: mockStartServices$, usesUiCapabilities: true, + csvConfig, }); await Rx.firstValueFrom(mockStartServices$); await panel.execute(context); - expect(core.http.post).toHaveBeenCalled(); - }); - - it('shows a good old toastie when it successfully starts', async () => { - const panel = new ReportingCsvPanelAction({ - core, - apiClient, - startServices$: mockStartServices$, - usesUiCapabilities: true, + expect(core.http.post).toHaveBeenCalledWith('/internal/reporting/generate/csv_searchsource', { + body: '{"jobParams":"(columns:!(),objectType:search,searchSource:(),title:\'\',version:\'7.15.0\')"}', + method: 'POST', }); - - await Rx.firstValueFrom(mockStartServices$); - - await panel.execute(context); - - expect(core.notifications.toasts.addSuccess).toHaveBeenCalled(); - expect(core.notifications.toasts.addDanger).not.toHaveBeenCalled(); }); - it('shows a bad old toastie when it successfully fails', async () => { - apiClient.createImmediateReport = jest.fn().mockRejectedValue('No more ram!'); + it('shows a toast when it unsuccessfully fails', async () => { + apiClient.createReportingJob = jest.fn().mockRejectedValue('No more ram!'); const panel = new ReportingCsvPanelAction({ core, apiClient, startServices$: mockStartServices$, usesUiCapabilities: true, + csvConfig, }); await Rx.firstValueFrom(mockStartServices$); await panel.execute(context); - expect(core.notifications.toasts.addDanger).toHaveBeenCalled(); + expect(core.notifications.toasts.addDanger).toHaveBeenCalledWith({ + 'data-test-subj': 'generateCsvFail', + text: "We couldn't generate your CSV at this time.", + title: 'CSV report failed', + }); }); - it(`doesn't allow downloads with bad licenses`, async () => { + it(`doesn't allow csv generation with bad licenses`, async () => { mockLicenseState = 'invalid'; const plugin = new ReportingCsvPanelAction({ @@ -214,6 +222,7 @@ describe('GetCsvReportPanelAction', () => { apiClient, startServices$: mockStartServices$, usesUiCapabilities: true, + csvConfig, }); await Rx.firstValueFrom(mockStartServices$); @@ -226,22 +235,24 @@ describe('GetCsvReportPanelAction', () => { apiClient, startServices$: mockStartServices$, usesUiCapabilities: true, + csvConfig, }); await Rx.firstValueFrom(mockStartServices$); expect(panel.getIconType()).toBe('document'); - expect(panel.getDisplayName()).toBe('Download CSV'); + expect(panel.getDisplayName()).toBe('Generate CSV report'); }); describe('Application UI Capabilities', () => { - it(`doesn't allow downloads when UI capability is not enabled`, async () => { + it(`doesn't allow csv generation when UI capability is not enabled`, async () => { mockStartServicesPayload[0].application = { capabilities: {} } as CoreStart['application']; const plugin = new ReportingCsvPanelAction({ core, apiClient, startServices$: mockStartServices$, usesUiCapabilities: true, + csvConfig, }); await Rx.firstValueFrom(mockStartServices$); @@ -249,12 +260,13 @@ describe('GetCsvReportPanelAction', () => { expect(await plugin.isCompatible(context)).toEqual(false); }); - it(`allows downloads when license is valid and UI capability is enabled`, async () => { + it(`allows csv generation when license is valid and UI capability is enabled`, async () => { const plugin = new ReportingCsvPanelAction({ core, apiClient, startServices$: mockStartServices$, usesUiCapabilities: true, + csvConfig, }); await Rx.firstValueFrom(mockStartServices$); @@ -262,15 +274,70 @@ describe('GetCsvReportPanelAction', () => { expect(await plugin.isCompatible(context)).toEqual(true); }); - it(`allows download when license is valid and deprecated roles config is enabled`, async () => { + it(`allows csv generation when license is valid and deprecated roles config is enabled`, async () => { const plugin = new ReportingCsvPanelAction({ core, apiClient, startServices$: mockStartServices$, usesUiCapabilities: false, + csvConfig, }); expect(await plugin.isCompatible(context)).toEqual(true); }); }); + + describe('download csv', () => { + beforeEach(() => { + csvConfig = { + scroll: {} as ClientConfigType['csv']['scroll'], + enablePanelActionDownload: true, + }; + + core.http.post.mockResolvedValue({}); + }); + + it('shows a success toast when the download successfully starts', async () => { + const panel = new ReportingCsvPanelAction({ + core, + apiClient, + startServices$: mockStartServices$, + usesUiCapabilities: true, + csvConfig, + }); + + await Rx.firstValueFrom(mockStartServices$); + + await panel.execute(context); + + expect(core.notifications.toasts.addSuccess).toHaveBeenCalledWith({ + 'data-test-subj': 'csvDownloadStarted', + text: expect.any(Function), + title: 'CSV download started', + }); + expect(core.notifications.toasts.addDanger).not.toHaveBeenCalled(); + }); + + it('shows a bad old toastie when it unsuccessfully fails', async () => { + apiClient.createImmediateReport = jest.fn().mockRejectedValue('No more ram!'); + const panel = new ReportingCsvPanelAction({ + core, + apiClient, + startServices$: mockStartServices$, + usesUiCapabilities: true, + csvConfig, + }); + + await Rx.firstValueFrom(mockStartServices$); + + await panel.execute(context); + + expect(core.notifications.toasts.addSuccess).toHaveBeenCalled(); + expect(core.notifications.toasts.addDanger).toHaveBeenCalledWith({ + 'data-test-subj': 'downloadCsvFail', + text: "We couldn't download your CSV at this time.", + title: 'CSV download failed', + }); + }); + }); }); diff --git a/packages/kbn-reporting/public/share/panel_actions/get_csv_panel_action.tsx b/packages/kbn-reporting/public/share/panel_actions/get_csv_panel_action.tsx index 3ed33360b3963..96ed679a1e18e 100644 --- a/packages/kbn-reporting/public/share/panel_actions/get_csv_panel_action.tsx +++ b/packages/kbn-reporting/public/share/panel_actions/get_csv_panel_action.tsx @@ -6,23 +6,32 @@ * Side Public License, v 1. */ -import { CoreSetup, CoreStart, NotificationsSetup } from '@kbn/core/public'; -import { i18n } from '@kbn/i18n'; import { firstValueFrom, Observable } from 'rxjs'; -import { DataPublicPluginStart } from '@kbn/data-plugin/public'; +import { + AnalyticsServiceStart, + CoreSetup, + CoreStart, + I18nStart, + NotificationsSetup, + ThemeServiceSetup, +} from '@kbn/core/public'; +import { DataPublicPluginStart, SerializedSearchSourceFields } from '@kbn/data-plugin/public'; import type { ISearchEmbeddable } from '@kbn/discover-plugin/public'; import { loadSharingDataHelpers, SEARCH_EMBEDDABLE_TYPE } from '@kbn/discover-plugin/public'; import type { IEmbeddable } from '@kbn/embeddable-plugin/public'; import { ViewMode } from '@kbn/embeddable-plugin/public'; +import { toMountPoint } from '@kbn/react-kibana-mount'; import { LicensingPluginStart } from '@kbn/licensing-plugin/public'; import type { SavedSearch } from '@kbn/saved-search-plugin/public'; import type { UiActionsActionDefinition as ActionDefinition } from '@kbn/ui-actions-plugin/public'; import { IncompatibleActionError } from '@kbn/ui-actions-plugin/public'; -import { CSV_REPORTING_ACTION } from '@kbn/reporting-export-types-csv-common'; +import { CSV_REPORTING_ACTION, JobAppParamsCSV } from '@kbn/reporting-export-types-csv-common'; +import type { ClientConfigType } from '../../types'; import { checkLicense } from '../../license_check'; -import { ReportingAPIClient } from '../../reporting_api_client'; +import type { ReportingAPIClient } from '../../reporting_api_client'; +import { getI18nStrings } from './strings'; function isSavedSearchEmbeddable( embeddable: IEmbeddable | ISearchEmbeddable @@ -41,28 +50,41 @@ export interface PanelActionDependencies { interface Params { apiClient: ReportingAPIClient; + csvConfig: ClientConfigType['csv']; core: CoreSetup; startServices$: Observable<[CoreStart, PanelActionDependencies, unknown]>; usesUiCapabilities: boolean; } +interface ExecutionParams { + searchSource: SerializedSearchSourceFields; + columns: string[] | undefined; + title: string; + analytics: AnalyticsServiceStart; + i18nStart: I18nStart; +} + export class ReportingCsvPanelAction implements ActionDefinition { private isDownloading: boolean; public readonly type = ''; public readonly id = CSV_REPORTING_ACTION; + private readonly i18nStrings: ReturnType; private readonly notifications: NotificationsSetup; private readonly apiClient: ReportingAPIClient; + private readonly enablePanelActionDownload: boolean; + private readonly theme: ThemeServiceSetup; private readonly startServices$: Params['startServices$']; private readonly usesUiCapabilities: boolean; - constructor({ core, apiClient, startServices$, usesUiCapabilities }: Params) { + constructor({ core, csvConfig, apiClient, startServices$, usesUiCapabilities }: Params) { this.isDownloading = false; - - this.notifications = core.notifications; this.apiClient = apiClient; - + this.enablePanelActionDownload = csvConfig.enablePanelActionDownload === true; + this.notifications = core.notifications; + this.theme = core.theme; this.startServices$ = startServices$; this.usesUiCapabilities = usesUiCapabilities; + this.i18nStrings = getI18nStrings(apiClient); } public getIconType() { @@ -70,9 +92,9 @@ export class ReportingCsvPanelAction implements ActionDefinition } public getDisplayName() { - return i18n.translate('reporting.share.panelAction.generateCsvPanelTitle', { - defaultMessage: 'Download CSV', - }); + return this.enablePanelActionDownload + ? this.i18nStrings.download.displayName + : this.i18nStrings.generate.displayName; } public async getSharingData(savedSearch: SavedSearch) { @@ -90,12 +112,14 @@ export class ReportingCsvPanelAction implements ActionDefinition const [{ application }, { licensing }] = await firstValueFrom(this.startServices$); const license = await firstValueFrom(licensing.license$); - const licenseHasDownloadCsv = checkLicense(license.check('reporting', 'basic')).showLinks; - const capabilityHasDownloadCsv = this.usesUiCapabilities + const licenseHasCsvReporting = checkLicense(license.check('reporting', 'basic')).showLinks; + + // NOTE: For historical reasons capability identifier is called `downloadCsv. It can not be renamed. + const capabilityHasCsvReporting = this.usesUiCapabilities ? application.capabilities.dashboard?.downloadCsv === true - : true; // deprecated + : true; // if we're using the deprecated "xpack.reporting.roles.enabled=true" setting, the panel action is always visible - if (!licenseHasDownloadCsv || !capabilityHasDownloadCsv) { + if (!licenseHasCsvReporting || !capabilityHasCsvReporting) { return false; } @@ -110,39 +134,27 @@ export class ReportingCsvPanelAction implements ActionDefinition return embeddable.getInput().viewMode !== ViewMode.EDIT; }; - public execute = async (context: ActionContext) => { - const { embeddable } = context; - - if (!isSavedSearchEmbeddable(embeddable) || !(await this.isCompatible(context))) { - throw new IncompatibleActionError(); - } - - const savedSearch = embeddable.getSavedSearch(); - - if (!savedSearch || this.isDownloading) { - return; - } - - const { columns, getSearchSource } = await this.getSharingData(savedSearch); - + /** + * Requires `xpack.reporting.csv.enablePanelActionDownload: true` in kibana.yml + * @deprecated + */ + private executeDownload = async (params: ExecutionParams) => { + const { searchSource, columns, title, analytics, i18nStart } = params; const immediateJobParams = this.apiClient.getDecoratedJobParams({ - searchSource: getSearchSource({ - addGlobalTimeFilter: !embeddable.hasTimeRange(), - absoluteTime: true, - }), + searchSource, columns, - title: savedSearch.title || '', + title, objectType: 'downloadCsv', // FIXME: added for typescript, but immediate download job does not need objectType }); this.isDownloading = true; this.notifications.toasts.addSuccess({ - title: i18n.translate('reporting.share.panelAction.csvDownloadStartedTitle', { - defaultMessage: `CSV Download Started`, - }), - text: i18n.translate('reporting.share.panelAction.csvDownloadStartedMessage', { - defaultMessage: `Your CSV will download momentarily.`, + title: this.i18nStrings.download.toasts.success.title, + text: toMountPoint(this.i18nStrings.download.toasts.success.body, { + analytics, + i18n: i18nStart, + theme: this.theme, }), 'data-test-subj': 'csvDownloadStarted', }); @@ -152,7 +164,7 @@ export class ReportingCsvPanelAction implements ActionDefinition .then(({ body, response }) => { this.isDownloading = false; - const download = `${savedSearch.title}.csv`; + const download = `${title}.csv`; const blob = new Blob([body as BlobPart], { type: response?.headers.get('content-type') || undefined, }); @@ -174,19 +186,78 @@ export class ReportingCsvPanelAction implements ActionDefinition window.URL.revokeObjectURL(downloadObject); document.body.removeChild(a); }) - .catch(this.onGenerationFail.bind(this)); + .catch((error: unknown) => { + // eslint-disable-next-line no-console + console.error(error); + this.isDownloading = false; + this.notifications.toasts.addDanger({ + title: this.i18nStrings.download.toasts.error.title, + text: this.i18nStrings.download.toasts.error.body, + 'data-test-subj': 'downloadCsvFail', + }); + }); }; - private onGenerationFail(_error: Error) { - this.isDownloading = false; - this.notifications.toasts.addDanger({ - title: i18n.translate('reporting.share.panelAction.failedCsvReportTitle', { - defaultMessage: `CSV download failed`, - }), - text: i18n.translate('reporting.share.panelAction.failedCsvReportMessage', { - defaultMessage: `We couldn't generate your CSV at this time.`, - }), - 'data-test-subj': 'downloadCsvFail', + private executeGenerate = async (params: ExecutionParams) => { + const { searchSource, columns, title, analytics, i18nStart } = params; + const csvJobParams = this.apiClient.getDecoratedJobParams({ + searchSource, + columns, + title, + objectType: 'search', }); - } + + await this.apiClient + .createReportingJob('csv_searchsource', csvJobParams) + .then((job) => { + if (job) { + this.notifications.toasts.addSuccess({ + title: this.i18nStrings.generate.toasts.success.title, + text: toMountPoint(this.i18nStrings.generate.toasts.success.body, { + analytics, + i18n: i18nStart, + theme: this.theme, + }), + 'data-test-subj': 'csvReportStarted', + }); + } + }) + .catch((error: unknown) => { + // eslint-disable-next-line no-console + console.error(error); + this.notifications.toasts.addDanger({ + title: this.i18nStrings.generate.toasts.error.title, + text: this.i18nStrings.generate.toasts.error.body, + 'data-test-subj': 'generateCsvFail', + }); + }); + }; + + public execute = async (context: ActionContext) => { + const { embeddable } = context; + + if (!isSavedSearchEmbeddable(embeddable) || !(await this.isCompatible(context))) { + throw new IncompatibleActionError(); + } + + const savedSearch = embeddable.getSavedSearch(); + + if (!savedSearch || this.isDownloading) { + return; + } + + const [{ i18n: i18nStart, analytics }] = await firstValueFrom(this.startServices$); + const { columns, getSearchSource } = await this.getSharingData(savedSearch); + const searchSource = getSearchSource({ + addGlobalTimeFilter: !embeddable.hasTimeRange(), + absoluteTime: true, + }); + const title = savedSearch.title || ''; + const executionParams = { searchSource, columns, title, savedSearch, i18nStart, analytics }; + + if (this.enablePanelActionDownload) { + return this.executeDownload(executionParams); + } + return this.executeGenerate(executionParams); + }; } diff --git a/packages/kbn-reporting/public/share/panel_actions/strings.tsx b/packages/kbn-reporting/public/share/panel_actions/strings.tsx new file mode 100644 index 0000000000000..729d0265d4206 --- /dev/null +++ b/packages/kbn-reporting/public/share/panel_actions/strings.tsx @@ -0,0 +1,93 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React from 'react'; +import { i18n } from '@kbn/i18n'; +import { FormattedMessage } from '@kbn/i18n-react'; +import type { ReportingAPIClient } from '../../reporting_api_client'; + +interface I18nStrings { + displayName: string; + toasts: { + error: { + title: string; + body: string; + }; + success: { + title: string; + body: JSX.Element; + }; + }; +} + +export const getI18nStrings = ( + apiClient: ReportingAPIClient +): Record<'download' | 'generate', I18nStrings> => ({ + download: { + displayName: i18n.translate('reporting.share.panelAction.downloadCsvPanelTitle', { + defaultMessage: 'Download CSV', + }), + toasts: { + error: { + title: i18n.translate('reporting.share.panelAction.failedCsvReportTitle', { + defaultMessage: `CSV download failed`, + }), + body: i18n.translate('reporting.share.panelAction.failedCsvReportMessage', { + defaultMessage: `We couldn't download your CSV at this time.`, + }), + }, + success: { + title: i18n.translate('reporting.share.panelAction.csvDownloadStartedTitle', { + defaultMessage: `CSV download started`, + }), + body: ( + + ), + }, + }, + }, + generate: { + displayName: i18n.translate('reporting.share.panelAction.generateCsvPanelTitle', { + defaultMessage: 'Generate CSV report', + }), + toasts: { + error: { + title: i18n.translate('reporting.share.panelAction.failedGenerateCsvReportTitle', { + defaultMessage: `CSV report failed`, + }), + body: i18n.translate('reporting.share.panelAction.failedGenerateCsvReportMessage', { + defaultMessage: `We couldn't generate your CSV at this time.`, + }), + }, + success: { + title: i18n.translate('reporting.share.panelAction.csvReportStartedTitle', { + defaultMessage: `Queued report for CSV`, + }), + body: ( + + + + ), + }} + /> + ), + }, + }, + }, +}); diff --git a/packages/kbn-reporting/public/share/share_context_menu/reporting_panel_content/reporting_panel_content.tsx b/packages/kbn-reporting/public/share/share_context_menu/reporting_panel_content/reporting_panel_content.tsx index 359a708a86a96..bafc355470fad 100644 --- a/packages/kbn-reporting/public/share/share_context_menu/reporting_panel_content/reporting_panel_content.tsx +++ b/packages/kbn-reporting/public/share/share_context_menu/reporting_panel_content/reporting_panel_content.tsx @@ -323,15 +323,17 @@ class ReportingPanelContentUi extends Component { } }) .catch((error) => { + // eslint-disable-next-line no-console + console.error(error); this.props.toasts.addError(error, { title: intl.formatMessage({ id: 'reporting.share.panelContent.notification.reportingErrorTitle', defaultMessage: 'Unable to create report', }), - toastMessage: ( - // eslint-disable-next-line react/no-danger - - ) as unknown as string, + toastMessage: intl.formatMessage({ + id: 'reporting.share.panelContent.notification.reportingErrorToastMessage', + defaultMessage: `We couldn't create a report at this time.`, + }), }); if (this.mounted) { this.setState({ isCreatingReportJob: false }); diff --git a/packages/kbn-reporting/public/tsconfig.json b/packages/kbn-reporting/public/tsconfig.json index 08ca5335b7e02..83f8f2f9d5d5e 100644 --- a/packages/kbn-reporting/public/tsconfig.json +++ b/packages/kbn-reporting/public/tsconfig.json @@ -35,5 +35,6 @@ "@kbn/discover-plugin", "@kbn/embeddable-plugin", "@kbn/ui-actions-plugin", + "@kbn/react-kibana-mount", ] } diff --git a/packages/kbn-reporting/public/types.ts b/packages/kbn-reporting/public/types.ts index 15baa0ee5605f..67f5755e367cc 100644 --- a/packages/kbn-reporting/public/types.ts +++ b/packages/kbn-reporting/public/types.ts @@ -7,9 +7,24 @@ */ export interface ClientConfigType { - csv: { scroll: { duration: string; size: number } }; - poll: { jobsRefresh: { interval: number; intervalErrorMultiplier: number } }; + csv: { + enablePanelActionDownload: boolean; + scroll: { + duration: string; + size: number; + }; + }; + poll: { + jobsRefresh: { + interval: number; + intervalErrorMultiplier: number; + }; + }; roles: { enabled: boolean }; - export_types: { pdf: { enabled: boolean }; png: { enabled: boolean }; csv: { enabled: boolean } }; + export_types: { + pdf: { enabled: boolean }; + png: { enabled: boolean }; + csv: { enabled: boolean }; + }; statefulSettings: { enabled: boolean }; } diff --git a/packages/kbn-reporting/server/__snapshots__/config_schema.test.ts.snap b/packages/kbn-reporting/server/__snapshots__/config_schema.test.ts.snap index 119f6e5e4f52b..fecc985c76f34 100644 --- a/packages/kbn-reporting/server/__snapshots__/config_schema.test.ts.snap +++ b/packages/kbn-reporting/server/__snapshots__/config_schema.test.ts.snap @@ -7,7 +7,7 @@ Object { }, "csv": Object { "checkForFormulas": true, - "enablePanelActionDownload": true, + "enablePanelActionDownload": false, "escapeFormulaValues": false, "maxConcurrentShardRequests": 5, "maxSizeBytes": ByteSizeValue { @@ -70,7 +70,7 @@ Object { }, "csv": Object { "checkForFormulas": true, - "enablePanelActionDownload": true, + "enablePanelActionDownload": false, "escapeFormulaValues": false, "maxConcurrentShardRequests": 5, "maxSizeBytes": ByteSizeValue { diff --git a/packages/kbn-reporting/server/config_schema.ts b/packages/kbn-reporting/server/config_schema.ts index 0c602b1bb340b..e0ca7a5deadcd 100644 --- a/packages/kbn-reporting/server/config_schema.ts +++ b/packages/kbn-reporting/server/config_schema.ts @@ -59,7 +59,7 @@ const CaptureSchema = schema.object({ const CsvSchema = schema.object({ checkForFormulas: schema.boolean({ defaultValue: true }), escapeFormulaValues: schema.boolean({ defaultValue: false }), - enablePanelActionDownload: schema.boolean({ defaultValue: true }), + enablePanelActionDownload: schema.boolean({ defaultValue: false }), maxSizeBytes: schema.oneOf([schema.number(), schema.byteSize()], { defaultValue: ByteSizeValue.parse('250mb'), }), diff --git a/packages/kbn-securitysolution-exception-list-components/src/list_header/__snapshots__/list_header.test.tsx.snap b/packages/kbn-securitysolution-exception-list-components/src/list_header/__snapshots__/list_header.test.tsx.snap index c83f098c6d090..121d3eb791ed8 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/list_header/__snapshots__/list_header.test.tsx.snap +++ b/packages/kbn-securitysolution-exception-list-components/src/list_header/__snapshots__/list_header.test.tsx.snap @@ -234,8 +234,10 @@ Object { data-eui="EuiFocusTrap" > - {isConsoleOpen ? ( -
- - -
- ) : null} + {isConsoleOpen ? : null}

diff --git a/src/plugins/console/public/application/containers/embeddable/index.tsx b/src/plugins/console/public/application/containers/embeddable/index.tsx index 46faeb5d29fb1..0563a5f445da2 100644 --- a/src/plugins/console/public/application/containers/embeddable/index.tsx +++ b/src/plugins/console/public/application/containers/embeddable/index.tsx @@ -6,24 +6,16 @@ * Side Public License, v 1. */ -import React, { ComponentType, lazy, Suspense } from 'react'; +import { dynamic } from '@kbn/shared-ux-utility'; +import React from 'react'; import { EmbeddableConsoleProps, EmbeddableConsoleDependencies, } from '../../../types/embeddable_console'; type EmbeddableConsoleInternalProps = EmbeddableConsoleProps & EmbeddableConsoleDependencies; +const Console = dynamic(async () => ({ + default: (await import('./embeddable_console')).EmbeddableConsole, +})); -const Console = lazy>(async () => { - return { - default: (await import('./embeddable_console')).EmbeddableConsole, - }; -}); - -export const EmbeddableConsole: React.FC = (props) => { - return ( - - - - ); -}; +export const EmbeddableConsole = (props: EmbeddableConsoleInternalProps) => ; diff --git a/src/plugins/console/public/plugin.ts b/src/plugins/console/public/plugin.ts index cdc561842e12e..7b44338552465 100644 --- a/src/plugins/console/public/plugin.ts +++ b/src/plugins/console/public/plugin.ts @@ -5,6 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ + import { i18n } from '@kbn/i18n'; import { Plugin, CoreSetup, CoreStart, PluginInitializerContext } from '@kbn/core/public'; import { ENABLE_PERSISTENT_CONSOLE_UI_SETTING_ID } from '@kbn/dev-tools-plugin/public'; diff --git a/src/plugins/console/tsconfig.json b/src/plugins/console/tsconfig.json index d8f087eeb061b..373b03c22107b 100644 --- a/src/plugins/console/tsconfig.json +++ b/src/plugins/console/tsconfig.json @@ -29,7 +29,8 @@ "@kbn/react-kibana-context-theme", "@kbn/code-editor", "@kbn/monaco", - "@kbn/cloud-plugin" + "@kbn/cloud-plugin", + "@kbn/react-kibana-context-render" ], "exclude": [ "target/**/*", diff --git a/src/plugins/dashboard/public/dashboard_container/embeddable/create/create_dashboard.ts b/src/plugins/dashboard/public/dashboard_container/embeddable/create/create_dashboard.ts index c52f50f755620..d82f92deddeab 100644 --- a/src/plugins/dashboard/public/dashboard_container/embeddable/create/create_dashboard.ts +++ b/src/plugins/dashboard/public/dashboard_container/embeddable/create/create_dashboard.ts @@ -17,12 +17,7 @@ import { type ControlGroupContainer, } from '@kbn/controls-plugin/public'; import { GlobalQueryStateFromUrl, syncGlobalQueryStateWithUrl } from '@kbn/data-plugin/public'; -import { - EmbeddableFactory, - isErrorEmbeddable, - reactEmbeddableRegistryHasKey, - ViewMode, -} from '@kbn/embeddable-plugin/public'; +import { EmbeddableFactory, isErrorEmbeddable, ViewMode } from '@kbn/embeddable-plugin/public'; import { compareFilters, Filter, TimeRange } from '@kbn/es-query'; import { lazyLoadReduxToolsPackage } from '@kbn/presentation-util-plugin/public'; import { cloneDeep, identity, omit, pickBy } from 'lodash'; @@ -340,10 +335,10 @@ export const initializeDashboard = async ({ const createdEmbeddable = await (async () => { // if there is no width or height we can add the panel using the default behaviour. if (!incomingEmbeddable.size) { - return await container.addNewEmbeddable( - incomingEmbeddable.type, - incomingEmbeddable.input - ); + return await container.addNewPanel<{ uuid: string }>({ + panelType: incomingEmbeddable.type, + initialState: incomingEmbeddable.input, + }); } // if the incoming embeddable has an explicit width or height we add the panel to the grid directly. @@ -370,13 +365,12 @@ export const initializeDashboard = async ({ [newPanelState.explicitInput.id]: newPanelState, }, }); - if (reactEmbeddableRegistryHasKey(incomingEmbeddable.type)) { - return { id: embeddableId }; - } return await container.untilEmbeddableLoaded(embeddableId); })(); - scrolltoIncomingEmbeddable(container, createdEmbeddable.id); + if (createdEmbeddable) { + scrolltoIncomingEmbeddable(container, createdEmbeddable.uuid); + } }); } } diff --git a/src/plugins/dashboard/public/dashboard_top_nav/internal_dashboard_top_nav.tsx b/src/plugins/dashboard/public/dashboard_top_nav/internal_dashboard_top_nav.tsx index f184c3c23eb3c..d3e0ac3459049 100644 --- a/src/plugins/dashboard/public/dashboard_top_nav/internal_dashboard_top_nav.tsx +++ b/src/plugins/dashboard/public/dashboard_top_nav/internal_dashboard_top_nav.tsx @@ -19,7 +19,7 @@ import { ViewMode } from '@kbn/embeddable-plugin/public'; import type { DataView } from '@kbn/data-views-plugin/public'; import { TopNavMenuProps } from '@kbn/navigation-plugin/public'; import { EuiHorizontalRule, EuiIcon, EuiToolTipProps } from '@elastic/eui'; -import { EuiBreadcrumbProps } from '@elastic/eui/src/components/breadcrumbs/breadcrumb'; +import type { EuiBreadcrumb } from '@elastic/eui'; import { MountPoint } from '@kbn/core/public'; import { getDashboardTitle, @@ -40,7 +40,7 @@ import './_dashboard_top_nav.scss'; import { DashboardRedirect } from '../dashboard_container/types'; export interface InternalDashboardTopNavProps { - customLeadingBreadCrumbs?: EuiBreadcrumbProps[]; + customLeadingBreadCrumbs?: EuiBreadcrumb[]; embedSettings?: DashboardEmbedSettings; forceHideUnifiedSearch?: boolean; redirectTo: DashboardRedirect; diff --git a/src/plugins/data/common/search/expressions/esql.ts b/src/plugins/data/common/search/expressions/esql.ts index d01b77087bf04..8b063b7e734c3 100644 --- a/src/plugins/data/common/search/expressions/esql.ts +++ b/src/plugins/data/common/search/expressions/esql.ts @@ -233,7 +233,7 @@ export const getEsqlFn = ({ getStartDependencies }: EsqlFnArguments) => { (body.all_columns ?? body.columns)?.map(({ name, type }) => ({ id: name, name, - meta: { type: esFieldTypeToKibanaFieldType(type) }, + meta: { type: esFieldTypeToKibanaFieldType(type), esType: type }, isNull: hasEmptyColumns ? !lookup.has(name) : false, })) ?? []; diff --git a/src/plugins/discover/public/application/main/components/layout/discover_documents.tsx b/src/plugins/discover/public/application/main/components/layout/discover_documents.tsx index 22f174cd0dea7..4c0f01d04b6eb 100644 --- a/src/plugins/discover/public/application/main/components/layout/discover_documents.tsx +++ b/src/plugins/discover/public/application/main/components/layout/discover_documents.tsx @@ -24,8 +24,8 @@ import { SearchResponseWarningsCallout } from '@kbn/search-response-warnings'; import { DataLoadingState, useColumns, - type DataTableColumnTypes, - getTextBasedColumnTypes, + type DataTableColumnsMeta, + getTextBasedColumnsMeta, } from '@kbn/unified-data-table'; import { DOC_HIDE_TIME_COLUMN_SETTING, @@ -231,10 +231,10 @@ function DiscoverDocumentsComponent({ [uiSettings] ); - const columnTypes: DataTableColumnTypes | undefined = useMemo( + const columnsMeta: DataTableColumnsMeta | undefined = useMemo( () => documentState.textBasedQueryColumns - ? getTextBasedColumnTypes(documentState.textBasedQueryColumns) + ? getTextBasedColumnsMeta(documentState.textBasedQueryColumns) : undefined, [documentState.textBasedQueryColumns] ); @@ -244,7 +244,7 @@ function DiscoverDocumentsComponent({ hit: DataTableRecord, displayedRows: DataTableRecord[], displayedColumns: string[], - customColumnTypes?: DataTableColumnTypes + customColumnsMeta?: DataTableColumnsMeta ) => ( !state.hideChart); return ( - - + ); }; diff --git a/src/plugins/discover/public/application/main/components/sidebar/lib/get_field_list.ts b/src/plugins/discover/public/application/main/components/sidebar/lib/get_field_list.ts index 487f0faf7a046..770de2e3b434b 100644 --- a/src/plugins/discover/public/application/main/components/sidebar/lib/get_field_list.ts +++ b/src/plugins/discover/public/application/main/components/sidebar/lib/get_field_list.ts @@ -72,6 +72,7 @@ export function getTextBasedQueryFieldList( new DataViewField({ name: column.name, type: column.meta?.type ?? 'unknown', + esTypes: column.meta?.esType ? [column.meta?.esType] : undefined, searchable: false, aggregatable: false, isNull: Boolean(column?.isNull), diff --git a/src/plugins/discover/public/application/main/components/sidebar/lib/sidebar_reducer.test.ts b/src/plugins/discover/public/application/main/components/sidebar/lib/sidebar_reducer.test.ts index 26e183481787b..9f886a08c1142 100644 --- a/src/plugins/discover/public/application/main/components/sidebar/lib/sidebar_reducer.test.ts +++ b/src/plugins/discover/public/application/main/components/sidebar/lib/sidebar_reducer.test.ts @@ -115,7 +115,8 @@ describe('sidebar reducer', function () { id: '2', name: 'text2', meta: { - type: 'keyword', + type: 'string', + esType: 'keyword', }, }, ] as DatatableColumn[], @@ -127,13 +128,15 @@ describe('sidebar reducer', function () { new DataViewField({ name: 'text1', type: 'number', + esTypes: undefined, aggregatable: false, isNull: true, searchable: false, }), new DataViewField({ name: 'text2', - type: 'keyword', + type: 'string', + esTypes: ['keyword'], aggregatable: false, isNull: false, searchable: false, diff --git a/src/plugins/discover/public/application/main/components/top_nav/get_top_nav_badges.test.ts b/src/plugins/discover/public/application/main/components/top_nav/get_top_nav_badges.test.ts index 18cd2791ab293..17cfc07c3d58b 100644 --- a/src/plugins/discover/public/application/main/components/top_nav/get_top_nav_badges.test.ts +++ b/src/plugins/discover/public/application/main/components/top_nav/get_top_nav_badges.test.ts @@ -7,13 +7,15 @@ */ import { getTopNavBadges } from './get_top_nav_badges'; -import { discoverServiceMock } from '../../../../__mocks__/services'; +import { createDiscoverServicesMock } from '../../../../__mocks__/services'; import { getDiscoverStateMock } from '../../../../__mocks__/discover_state.mock'; import { savedSearchMock } from '../../../../__mocks__/saved_search'; import { render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; const stateContainer = getDiscoverStateMock({ isTimeBased: true }); +const discoverServiceMock = createDiscoverServicesMock(); +discoverServiceMock.capabilities.discover.save = true; describe('getTopNavBadges()', function () { test('should not return the unsaved changes badge if no changes', () => { @@ -41,6 +43,37 @@ describe('getTopNavBadges()', function () { }, ] `); + + expect(topNavBadges).toHaveLength(1); + const unsavedChangesBadge = topNavBadges[0]; + expect(unsavedChangesBadge.badgeText).toEqual('Unsaved changes'); + + render(unsavedChangesBadge.renderCustomBadge!({ badgeText: 'Unsaved changes' })); + userEvent.click(screen.getByRole('button')); // open menu + expect(screen.queryByText('Save')).not.toBeNull(); + expect(screen.queryByText('Save as')).not.toBeNull(); + expect(screen.queryByText('Revert changes')).not.toBeNull(); + }); + + test('should not show save in unsaved changed badge for read-only user', () => { + const discoverServiceMockReadOnly = createDiscoverServicesMock(); + discoverServiceMockReadOnly.capabilities.discover.save = false; + const topNavBadges = getTopNavBadges({ + hasUnsavedChanges: true, + services: discoverServiceMockReadOnly, + stateContainer, + topNavCustomization: undefined, + }); + + expect(topNavBadges).toHaveLength(1); + const unsavedChangesBadge = topNavBadges[0]; + expect(unsavedChangesBadge.badgeText).toEqual('Unsaved changes'); + + render(unsavedChangesBadge.renderCustomBadge!({ badgeText: 'Unsaved changes' })); + userEvent.click(screen.getByRole('button')); // open menu + expect(screen.queryByText('Save')).toBeNull(); + expect(screen.queryByText('Save as')).toBeNull(); + expect(screen.queryByText('Revert changes')).not.toBeNull(); }); describe('managed saved search', () => { diff --git a/src/plugins/discover/public/application/main/components/top_nav/get_top_nav_badges.tsx b/src/plugins/discover/public/application/main/components/top_nav/get_top_nav_badges.tsx index 0510df0bc3a1a..37daf11478bfc 100644 --- a/src/plugins/discover/public/application/main/components/top_nav/get_top_nav_badges.tsx +++ b/src/plugins/discover/public/application/main/components/top_nav/get_top_nav_badges.tsx @@ -46,14 +46,17 @@ export const getTopNavBadges = ({ entries.push({ data: getTopNavUnsavedChangesBadge({ onRevert: stateContainer.actions.undoSavedSearchChanges, - onSave: !isManaged + onSave: + services.capabilities.discover.save && !isManaged + ? async () => { + await saveSearch(); + } + : undefined, + onSaveAs: services.capabilities.discover.save ? async () => { - await saveSearch(); + await saveSearch(true); } : undefined, - onSaveAs: async () => { - await saveSearch(true); - }, }), order: defaultBadges?.unsavedChangesBadge?.order ?? 100, }); diff --git a/src/plugins/discover/public/components/discover_grid_flyout/discover_grid_flyout.tsx b/src/plugins/discover/public/components/discover_grid_flyout/discover_grid_flyout.tsx index 40d47e1292f92..e94177079acfd 100644 --- a/src/plugins/discover/public/components/discover_grid_flyout/discover_grid_flyout.tsx +++ b/src/plugins/discover/public/components/discover_grid_flyout/discover_grid_flyout.tsx @@ -25,6 +25,7 @@ import { import type { Filter, Query, AggregateQuery } from '@kbn/es-query'; import type { DataTableRecord } from '@kbn/discover-utils/types'; import type { DocViewFilterFn } from '@kbn/unified-doc-viewer/types'; +import type { DataTableColumnsMeta } from '@kbn/unified-data-table'; import { UnifiedDocViewer } from '@kbn/unified-doc-viewer-plugin/public'; import { useDiscoverServices } from '../../hooks/use_discover_services'; import { isTextBasedQuery } from '../../application/main/utils/is_text_based_query'; @@ -37,7 +38,7 @@ export interface DiscoverGridFlyoutProps { filters?: Filter[]; query?: Query | AggregateQuery; columns: string[]; - columnTypes?: Record; + columnsMeta?: DataTableColumnsMeta; hit: DataTableRecord; hits?: DataTableRecord[]; dataView: DataView; @@ -61,7 +62,7 @@ export function DiscoverGridFlyout({ hits, dataView, columns, - columnTypes, + columnsMeta, savedSearchId, filters, query, @@ -147,7 +148,7 @@ export function DiscoverGridFlyout({ () => ( ( { it('builds the embeddable', () => { const buildEmbeddableSpy = jest.spyOn(testEmbeddableFactory, 'buildEmbeddable'); render(); - expect(buildEmbeddableSpy).toHaveBeenCalledWith({ bork: 'blorp?' }, expect.any(Function)); + expect(buildEmbeddableSpy).toHaveBeenCalledWith( + { bork: 'blorp?' }, + expect.any(Function), + expect.any(String), + undefined + ); + }); + + it('builds the embeddable, providing an id', () => { + const buildEmbeddableSpy = jest.spyOn(testEmbeddableFactory, 'buildEmbeddable'); + render( + + ); + expect(buildEmbeddableSpy).toHaveBeenCalledWith( + { bork: 'blorp?' }, + expect.any(Function), + '12345', + undefined + ); + }); + + it('builds the embeddable, providing a parent', () => { + const buildEmbeddableSpy = jest.spyOn(testEmbeddableFactory, 'buildEmbeddable'); + const parentApi = getMockPresentationContainer(); + render( + + ); + expect(buildEmbeddableSpy).toHaveBeenCalledWith( + { bork: 'blorp?' }, + expect.any(Function), + expect.any(String), + parentApi + ); }); it('renders the given component once it resolves', () => { diff --git a/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_renderer.tsx b/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_renderer.tsx index 64340dc2d05bc..ec5a763bae28d 100644 --- a/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_renderer.tsx +++ b/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_renderer.tsx @@ -12,13 +12,13 @@ import { SerializedPanelState, } from '@kbn/presentation-containers'; import { PresentationPanel } from '@kbn/presentation-panel-plugin/public'; +import { StateComparators } from '@kbn/presentation-publishing'; import React, { useEffect, useImperativeHandle, useMemo, useRef } from 'react'; import { v4 as generateId } from 'uuid'; import { getReactEmbeddableFactory } from './react_embeddable_registry'; import { startTrackingEmbeddableUnsavedChanges } from './react_embeddable_unsaved_changes'; import { DefaultEmbeddableApi, - EmbeddableStateComparators, ReactEmbeddableApiRegistration, ReactEmbeddableFactory, } from './types'; @@ -49,15 +49,15 @@ export const ReactEmbeddableRenderer = < const componentPromise = useMemo( () => (async () => { + const uuid = maybeId ?? generateId(); const factory = getReactEmbeddableFactory(type) as ReactEmbeddableFactory< StateType, ApiType >; const registerApi = ( apiRegistration: ReactEmbeddableApiRegistration, - comparators: EmbeddableStateComparators + comparators: StateComparators ) => { - const uuid = maybeId ?? generateId(); const { unsavedChanges, resetUnsavedChanges, cleanup } = startTrackingEmbeddableUnsavedChanges( uuid, @@ -83,7 +83,9 @@ export const ReactEmbeddableRenderer = < const { api, Component } = await factory.buildEmbeddable( factory.deserializeState(state), - registerApi + registerApi, + uuid, + parentApi ); return React.forwardRef((_, ref) => { diff --git a/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_unsaved_changes.test.tsx b/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_unsaved_changes.test.tsx index be3ecb4645fae..68be8ca5c097d 100644 --- a/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_unsaved_changes.test.tsx +++ b/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_unsaved_changes.test.tsx @@ -12,10 +12,10 @@ import { SerializedPanelState, } from '@kbn/presentation-containers'; import { getMockPresentationContainer } from '@kbn/presentation-containers/mocks'; +import { StateComparators } from '@kbn/presentation-publishing'; import { waitFor } from '@testing-library/react'; import { BehaviorSubject, Subject } from 'rxjs'; import { startTrackingEmbeddableUnsavedChanges } from './react_embeddable_unsaved_changes'; -import { EmbeddableStateComparators } from './types'; interface SuperTestStateType { name: string; @@ -26,7 +26,7 @@ interface SuperTestStateType { describe('react embeddable unsaved changes', () => { let initialState: SuperTestStateType; let lastSavedState: SuperTestStateType; - let comparators: EmbeddableStateComparators; + let comparators: StateComparators; let deserializeState: (state: SerializedPanelState) => SuperTestStateType; let parentApi: (PresentationContainer & PublishesLastSavedState) | null; @@ -47,7 +47,7 @@ describe('react embeddable unsaved changes', () => { const nameSubject = new BehaviorSubject(initialState.name); const ageSubject = new BehaviorSubject(initialState.age); const taglineSubject = new BehaviorSubject(initialState.tagline); - const defaultComparators: EmbeddableStateComparators = { + const defaultComparators: StateComparators = { name: [nameSubject, jest.fn((nextName) => nameSubject.next(nextName))], age: [ageSubject, jest.fn((nextAge) => ageSubject.next(nextAge))], tagline: [taglineSubject, jest.fn((nextTagline) => taglineSubject.next(nextTagline))], @@ -56,7 +56,7 @@ describe('react embeddable unsaved changes', () => { }; const startTrackingUnsavedChanges = ( - customComparators?: EmbeddableStateComparators + customComparators?: StateComparators ) => { comparators = customComparators ?? initializeDefaultComparators(); deserializeState = jest.fn((state) => state.rawState as SuperTestStateType); @@ -142,7 +142,7 @@ describe('react embeddable unsaved changes', () => { lastSavedState.age = 20; initialState.age = 50; const ageSubject = new BehaviorSubject(initialState.age); - const customComparators: EmbeddableStateComparators = { + const customComparators: StateComparators = { ...initializeDefaultComparators(), age: [ ageSubject, diff --git a/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_unsaved_changes.ts b/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_unsaved_changes.ts index b717c47737ad6..f4bc6bbfc4ad8 100644 --- a/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_unsaved_changes.ts +++ b/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_unsaved_changes.ts @@ -11,24 +11,14 @@ import { PresentationContainer, SerializedPanelState, } from '@kbn/presentation-containers'; -import { PublishingSubject } from '@kbn/presentation-publishing'; +import { + getInitialValuesFromComparators, + PublishingSubject, + runComparators, + StateComparators, +} from '@kbn/presentation-publishing'; import { BehaviorSubject, combineLatest } from 'rxjs'; import { combineLatestWith, debounceTime, map } from 'rxjs/operators'; -import { EmbeddableStateComparators } from './types'; - -const defaultComparator = (a: T, b: T) => a === b; - -const getInitialValuesFromComparators = ( - comparators: EmbeddableStateComparators, - comparatorKeys: Array -) => { - const initialValues: Partial = {}; - for (const key of comparatorKeys) { - const comparatorSubject = comparators[key][0]; // 0th element of tuple is the subject - initialValues[key] = comparatorSubject?.value; - } - return initialValues; -}; const getDefaultDiffingApi = () => { return { @@ -38,31 +28,10 @@ const getDefaultDiffingApi = () => { }; }; -const runComparators = ( - comparators: EmbeddableStateComparators, - comparatorKeys: Array, - lastSavedState: StateType | undefined, - latestState: Partial -) => { - if (!lastSavedState) { - // if the parent API provides last saved state, but it's empty for this panel, all of our latest state is unsaved. - return latestState; - } - const latestChanges: Partial = {}; - for (const key of comparatorKeys) { - const customComparator = comparators[key]?.[2]; // 2nd element of the tuple is the custom comparator - const comparator = customComparator ?? defaultComparator; - if (!comparator(lastSavedState?.[key], latestState[key], lastSavedState, latestState)) { - latestChanges[key] = latestState[key]; - } - } - return Object.keys(latestChanges).length > 0 ? latestChanges : undefined; -}; - export const startTrackingEmbeddableUnsavedChanges = ( uuid: string, parentApi: PresentationContainer | undefined, - comparators: EmbeddableStateComparators, + comparators: StateComparators, deserializeState: (state: SerializedPanelState) => StateType ) => { if (Object.keys(comparators).length === 0) return getDefaultDiffingApi(); diff --git a/src/plugins/embeddable/public/react_embeddable_system/types.ts b/src/plugins/embeddable/public/react_embeddable_system/types.ts index 247c2f891b718..6c54b13ce5c51 100644 --- a/src/plugins/embeddable/public/react_embeddable_system/types.ts +++ b/src/plugins/embeddable/public/react_embeddable_system/types.ts @@ -5,9 +5,13 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -import { HasSerializableState, SerializedPanelState } from '@kbn/presentation-containers'; +import { + HasSerializableState, + PresentationContainer, + SerializedPanelState, +} from '@kbn/presentation-containers'; import { DefaultPresentationPanelApi } from '@kbn/presentation-panel-plugin/public/panel_component/types'; -import { HasType, PublishesUnsavedChanges, PublishingSubject } from '@kbn/presentation-publishing'; +import { HasType, PublishesUnsavedChanges, StateComparators } from '@kbn/presentation-publishing'; import React, { ReactElement } from 'react'; export type ReactEmbeddableRegistration< @@ -41,27 +45,9 @@ export interface ReactEmbeddableFactory< initialState: StateType, buildApi: ( apiRegistration: ReactEmbeddableApiRegistration, - comparators: EmbeddableStateComparators - ) => ApiType + comparators: StateComparators + ) => ApiType, + uuid: string, + parentApi?: PresentationContainer ) => Promise<{ Component: React.FC<{}>; api: ApiType }>; } - -/** - * State comparators - */ -export type EmbeddableComparatorFunction = ( - last: StateType[KeyType] | undefined, - current: StateType[KeyType] | undefined, - lastState?: Partial, - currentState?: Partial -) => boolean; - -export type EmbeddableComparatorDefinition = [ - PublishingSubject, - (value: StateType[KeyType]) => void, - EmbeddableComparatorFunction? -]; - -export type EmbeddableStateComparators = { - [KeyType in keyof StateType]: EmbeddableComparatorDefinition; -}; diff --git a/src/plugins/event_annotation_listing/public/components/group_editor_flyout/group_editor_controls/annotation_list.tsx b/src/plugins/event_annotation_listing/public/components/group_editor_flyout/group_editor_controls/annotation_list.tsx index 176190d07374b..597c30df90356 100644 --- a/src/plugins/event_annotation_listing/public/components/group_editor_flyout/group_editor_controls/annotation_list.tsx +++ b/src/plugins/event_annotation_listing/public/components/group_editor_flyout/group_editor_controls/annotation_list.tsx @@ -8,7 +8,8 @@ import { css } from '@emotion/react'; import { - DragDrop, + Droppable, + Draggable, DropTargetSwapDuplicateCombine, ReorderProvider, useDragDropContext, @@ -93,10 +94,10 @@ export const AnnotationList = ({ background-color: ${euiThemeVars.euiColorLightestShade}; padding: ${euiThemeVars.euiSizeS}; border-radius: ${euiThemeVars.euiBorderRadius}; - overflow: hidden; + overflow: visible; - .domDragDrop-isActiveGroup { - padding: ${euiThemeVars.euiSizeS}; + .domDragDrop-group { + padding: ${euiThemeVars.euiSizeXS} ${euiThemeVars.euiSizeS}; margin: -${euiThemeVars.euiSizeS} -${euiThemeVars.euiSizeS} 0 -${euiThemeVars.euiSizeS}; } `} @@ -106,11 +107,14 @@ export const AnnotationList = ({
- { - const sourceAnnotation = source - ? annotations.find(({ id }) => id === source.id) - : undefined; - reorderAnnotations(sourceAnnotation, annotation); - }} > - selectAnnotation(annotation)} - onRemoveClick={() => - updateAnnotations(annotations.filter(({ id }) => id !== annotation.id)) - } - accessorConfig={getAnnotationAccessor(annotation)} - label={annotation.label} + { + const sourceAnnotation = source + ? annotations.find(({ id }) => id === source.id) + : undefined; + reorderAnnotations(sourceAnnotation, annotation); + }} > - - - + selectAnnotation(annotation)} + onRemoveClick={() => + updateAnnotations(annotations.filter(({ id }) => id !== annotation.id)) + } + accessorConfig={getAnnotationAccessor(annotation)} + label={annotation.label} + > + + + +
))} - - addNewAnnotation(sourceId)} +
- addNewAnnotation()} - /> - + addNewAnnotation(sourceId)} + > + addNewAnnotation()} + /> + +
); }; diff --git a/src/plugins/expressions/common/expression_types/specs/datatable.ts b/src/plugins/expressions/common/expression_types/specs/datatable.ts index c2ee9aa7f22da..514ee5c9543f7 100644 --- a/src/plugins/expressions/common/expression_types/specs/datatable.ts +++ b/src/plugins/expressions/common/expression_types/specs/datatable.ts @@ -55,7 +55,14 @@ export type DatatableRow = Record; * Datatable column meta information */ export interface DatatableColumnMeta { + /** + * The Kibana normalized type of the column + */ type: DatatableColumnType; + /** + * The original type of the column from ES + */ + esType?: string; /** * field this column is based on */ diff --git a/src/plugins/interactive_setup/server/elasticsearch_service.ts b/src/plugins/interactive_setup/server/elasticsearch_service.ts index 6994a38912ce1..cc44a9edb4e94 100644 --- a/src/plugins/interactive_setup/server/elasticsearch_service.ts +++ b/src/plugins/interactive_setup/server/elasticsearch_service.ts @@ -393,7 +393,7 @@ export class ElasticsearchService { log: this.logger, kibanaVersion: this.kibanaVersion, ignoreVersionMismatch: false, - esVersionCheckInterval: -1, // Passing a negative number here will result in immediate completion after the first value is emitted + healthCheckInterval: -1, // Passing a negative number here will result in immediate completion after the first value is emitted }) ); } diff --git a/src/plugins/presentation_panel/public/panel_actions/customize_panel_action/custom_time_range_badge.tsx b/src/plugins/presentation_panel/public/panel_actions/customize_panel_action/custom_time_range_badge.tsx index ef43514bbfde6..5708a760d1ba2 100644 --- a/src/plugins/presentation_panel/public/panel_actions/customize_panel_action/custom_time_range_badge.tsx +++ b/src/plugins/presentation_panel/public/panel_actions/customize_panel_action/custom_time_range_badge.tsx @@ -16,7 +16,7 @@ import React from 'react'; import { renderToString } from 'react-dom/server'; import { UI_SETTINGS } from '@kbn/data-plugin/common'; -import { apiPublishesUnifiedSearch, EmbeddableApiContext } from '@kbn/presentation-publishing'; +import { apiPublishesTimeRange, EmbeddableApiContext } from '@kbn/presentation-publishing'; import { core } from '../../kibana_services'; import { customizePanelAction } from '../panel_actions'; @@ -30,7 +30,7 @@ export class CustomTimeRangeBadge public order = 7; public getDisplayName({ embeddable }: EmbeddableApiContext) { - if (!apiPublishesUnifiedSearch(embeddable)) throw new IncompatibleActionError(); + if (!apiPublishesTimeRange(embeddable)) throw new IncompatibleActionError(); const timeRange = embeddable.timeRange$.value; if (!timeRange) return ''; return renderToString( @@ -43,14 +43,14 @@ export class CustomTimeRangeBadge } public couldBecomeCompatible({ embeddable }: EmbeddableApiContext) { - return apiPublishesUnifiedSearch(embeddable); + return apiPublishesTimeRange(embeddable); } public subscribeToCompatibilityChanges( { embeddable }: EmbeddableApiContext, onChange: (isCompatible: boolean, action: CustomTimeRangeBadge) => void ) { - if (!apiPublishesUnifiedSearch(embeddable)) return; + if (!apiPublishesTimeRange(embeddable)) return; return embeddable.timeRange$.subscribe((timeRange) => { onChange(Boolean(timeRange), this); }); @@ -65,7 +65,7 @@ export class CustomTimeRangeBadge } public async isCompatible({ embeddable }: EmbeddableApiContext) { - if (apiPublishesUnifiedSearch(embeddable)) { + if (apiPublishesTimeRange(embeddable)) { const timeRange = embeddable.timeRange$.value; return Boolean(timeRange); } diff --git a/src/plugins/presentation_panel/public/panel_actions/customize_panel_action/customize_panel_editor.tsx b/src/plugins/presentation_panel/public/panel_actions/customize_panel_action/customize_panel_editor.tsx index 964b4e76ff4ff..88f20d4830945 100644 --- a/src/plugins/presentation_panel/public/panel_actions/customize_panel_action/customize_panel_editor.tsx +++ b/src/plugins/presentation_panel/public/panel_actions/customize_panel_action/customize_panel_editor.tsx @@ -30,9 +30,11 @@ import { FormattedMessage } from '@kbn/i18n-react'; import { UI_SETTINGS } from '@kbn/data-plugin/public'; import { + apiPublishesTimeRange, apiPublishesUnifiedSearch, getInheritedViewMode, getPanelTitle, + PublishesUnifiedSearch, } from '@kbn/presentation-publishing'; import { core } from '../../kibana_services'; @@ -225,7 +227,10 @@ export const CustomizePanelEditor = ({ }; const renderCustomTimeRangeComponent = () => { - if (!apiPublishesUnifiedSearch(api) || !(api.isCompatibleWithUnifiedSearch?.() ?? true)) + if ( + !apiPublishesTimeRange(api) || + !((api as PublishesUnifiedSearch).isCompatibleWithUnifiedSearch?.() ?? true) + ) return null; return ( diff --git a/src/plugins/presentation_panel/public/panel_component/presentation_panel_error.tsx b/src/plugins/presentation_panel/public/panel_component/presentation_panel_error.tsx index 92f7a0045003b..5b7de4ec05cc2 100644 --- a/src/plugins/presentation_panel/public/panel_component/presentation_panel_error.tsx +++ b/src/plugins/presentation_panel/public/panel_component/presentation_panel_error.tsx @@ -10,10 +10,9 @@ import { EuiButtonEmpty, EuiEmptyPrompt, EuiText } from '@elastic/eui'; import React, { useEffect, useMemo, useState } from 'react'; import { ErrorLike } from '@kbn/expressions-plugin/common'; -import { Markdown } from '@kbn/shared-ux-markdown'; +import { useStateFromPublishingSubject } from '@kbn/presentation-publishing'; import { renderSearchError } from '@kbn/search-errors'; - -import { usePanelTitle } from '@kbn/presentation-publishing'; +import { Markdown } from '@kbn/shared-ux-markdown'; import { Subscription } from 'rxjs'; import { editPanelAction } from '../panel_actions/panel_actions'; import { getErrorCallToAction } from './presentation_panel_strings'; @@ -36,7 +35,7 @@ export const PresentationPanelError = ({ [api, isEditable] ); - const panelTitle = usePanelTitle(api); + const panelTitle = useStateFromPublishingSubject(api?.panelTitle); const ariaLabel = useMemo( () => (panelTitle ? getErrorCallToAction(panelTitle) : label), [label, panelTitle] diff --git a/src/plugins/unified_doc_viewer/public/components/doc_viewer_table/table.tsx b/src/plugins/unified_doc_viewer/public/components/doc_viewer_table/table.tsx index b8e5b9cd37970..ad957053b7dd8 100644 --- a/src/plugins/unified_doc_viewer/public/components/doc_viewer_table/table.tsx +++ b/src/plugins/unified_doc_viewer/public/components/doc_viewer_table/table.tsx @@ -38,7 +38,11 @@ import { isNestedFieldParent, usePager, } from '@kbn/discover-utils'; -import { fieldNameWildcardMatcher, getFieldSearchMatchingHighlight } from '@kbn/field-utils'; +import { + fieldNameWildcardMatcher, + getFieldSearchMatchingHighlight, + getTextBasedColumnIconType, +} from '@kbn/field-utils'; import type { DocViewRenderProps, FieldRecordLegacy } from '@kbn/unified-doc-viewer/types'; import { FieldName } from '@kbn/unified-doc-viewer'; import { getUnifiedDocViewerServices } from '../../plugin'; @@ -106,7 +110,7 @@ const updateSearchText = debounce( export const DocViewerTable = ({ columns, - columnTypes, + columnsMeta, hit, dataView, hideActionsColumn, @@ -167,8 +171,10 @@ export const DocViewerTable = ({ (field: string) => { const fieldMapping = mapping(field); const displayName = fieldMapping?.displayName ?? field; - const fieldType = columnTypes - ? columnTypes[field] // for text-based results types come separately + const columnMeta = columnsMeta?.[field]; + const columnIconType = getTextBasedColumnIconType(columnMeta); + const fieldType = columnIconType + ? columnIconType // for text-based results types come separately : isNestedFieldParent(field, dataView) ? 'nested' : fieldMapping @@ -212,7 +218,7 @@ export const DocViewerTable = ({ onToggleColumn, filter, columns, - columnTypes, + columnsMeta, flattened, pinnedFields, onTogglePinned, diff --git a/test/functional/apps/dashboard/group1/url_field_formatter.ts b/test/functional/apps/dashboard/group1/url_field_formatter.ts index d2a4be0598a35..12863bcc17fc4 100644 --- a/test/functional/apps/dashboard/group1/url_field_formatter.ts +++ b/test/functional/apps/dashboard/group1/url_field_formatter.ts @@ -65,6 +65,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await dashboard.waitForRenderComplete(); const fieldLink = await visChart.getFieldLinkInVisTable(`${fieldName}: Descending`); const fieldValue = await fieldLink.getVisibleText(); + await fieldLink.moveMouseTo(); await fieldLink.click(); await retry.try(async () => { await checkUrl(fieldValue); diff --git a/test/functional/apps/dashboard/group5/embed_mode.ts b/test/functional/apps/dashboard/group5/embed_mode.ts index d8ff2f42a3a38..25eabca77f718 100644 --- a/test/functional/apps/dashboard/group5/embed_mode.ts +++ b/test/functional/apps/dashboard/group5/embed_mode.ts @@ -24,8 +24,7 @@ export default function ({ const screenshot = getService('screenshots'); const log = getService('log'); - // Failing: See https://github.com/elastic/kibana/issues/176882 - describe.skip('embed mode', () => { + describe('embed mode', () => { /* * Note: The baseline images used in all of the screenshot tests in this test suite were taken directly from the CI environment * in order to overcome a known issue with the pixel density of fonts being significantly different when running locally versus diff --git a/test/functional/apps/discover/group2/_data_grid_field_tokens.ts b/test/functional/apps/discover/group2/_data_grid_field_tokens.ts index 27ba295e48898..1d60fe3cd8c79 100644 --- a/test/functional/apps/discover/group2/_data_grid_field_tokens.ts +++ b/test/functional/apps/discover/group2/_data_grid_field_tokens.ts @@ -130,19 +130,19 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.unifiedFieldList.clickFieldListItemAdd('ip'); await PageObjects.unifiedFieldList.clickFieldListItemAdd('geo.coordinates'); - expect(await findFirstColumnTokens()).to.eql(['Number', 'String', 'IP address', 'Geo point']); + expect(await findFirstColumnTokens()).to.eql(['Number', 'Text', 'IP address', 'Geo point']); expect(await findFirstDocViewerTokens()).to.eql([ - 'String', - 'String', + 'Text', + 'Text', 'Date', - 'String', + 'Text', 'Number', 'IP address', - 'String', + 'Text', 'Geo point', - 'String', - 'String', + 'Keyword', + 'Keyword', ]); }); diff --git a/test/functional/apps/discover/group3/_sidebar.ts b/test/functional/apps/discover/group3/_sidebar.ts index c81722ec78cbf..d536e09920590 100644 --- a/test/functional/apps/discover/group3/_sidebar.ts +++ b/test/functional/apps/discover/group3/_sidebar.ts @@ -96,9 +96,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('should show filters by type in text-based view', async function () { - await kibanaServer.uiSettings.update({ 'discover:enableESQL': true }); - await browser.refresh(); - await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); await PageObjects.unifiedFieldList.openSidebarFieldFilter(); let options = await find.allByCssSelector('[data-test-subj*="typeFilter"]'); @@ -114,7 +111,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); await PageObjects.unifiedFieldList.openSidebarFieldFilter(); options = await find.allByCssSelector('[data-test-subj*="typeFilter"]'); - expect(options).to.have.length(5); + expect(options).to.have.length(6); expect(await PageObjects.unifiedFieldList.getSidebarAriaDescription()).to.be( '82 available fields.' @@ -131,9 +128,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('should show empty fields in text-based view', async function () { - await kibanaServer.uiSettings.update({ 'discover:enableESQL': true }); - await browser.refresh(); - await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); await PageObjects.discover.selectTextBaseLang(); @@ -433,9 +427,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('should show selected and available fields in text-based mode', async function () { - await kibanaServer.uiSettings.update({ 'discover:enableESQL': true }); - await browser.refresh(); - await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); expect(await PageObjects.unifiedFieldList.getSidebarAriaDescription()).to.be( diff --git a/test/functional/apps/discover/group3/_sidebar_field_stats.ts b/test/functional/apps/discover/group3/_sidebar_field_stats.ts new file mode 100644 index 0000000000000..7923bc311dedc --- /dev/null +++ b/test/functional/apps/discover/group3/_sidebar_field_stats.ts @@ -0,0 +1,305 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import expect from '@kbn/expect'; +import { FtrProviderContext } from '../ftr_provider_context'; + +export default function ({ getService, getPageObjects }: FtrProviderContext) { + const esArchiver = getService('esArchiver'); + const kibanaServer = getService('kibanaServer'); + const PageObjects = getPageObjects([ + 'common', + 'discover', + 'timePicker', + 'header', + 'unifiedFieldList', + ]); + const testSubjects = getService('testSubjects'); + const find = getService('find'); + const monacoEditor = getService('monacoEditor'); + const retry = getService('retry'); + + describe('discover sidebar field stats popover', function describeIndexTests() { + before(async function () { + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); + await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover'); + await kibanaServer.uiSettings.replace({ + defaultIndex: 'logstash-*', + }); + }); + + after(async () => { + await kibanaServer.importExport.unload('test/functional/fixtures/kbn_archiver/discover'); + await kibanaServer.savedObjects.cleanStandardList(); + await kibanaServer.uiSettings.replace({}); + }); + + describe('data view fields', function () { + before(async () => { + await PageObjects.timePicker.setDefaultAbsoluteRangeViaUiSettings(); + await PageObjects.common.navigateToApp('discover'); + await PageObjects.discover.waitUntilSearchingHasFinished(); + + await PageObjects.discover.addRuntimeField( + '_is_large', + 'emit(doc["bytes"].value > 1024)', + 'boolean' + ); + + await retry.waitFor('form to close', async () => { + return !(await testSubjects.exists('fieldEditor')); + }); + + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); + }); + + it('should show a top values popover for a boolean runtime field', async () => { + await PageObjects.unifiedFieldList.clickFieldListItem('_is_large'); + await testSubjects.existOrFail('dscFieldStats-topValues'); + expect(await testSubjects.getVisibleText('dscFieldStats-title')).to.be('Top values'); + const topValuesRows = await testSubjects.findAll('dscFieldStats-topValues-bucket'); + expect(topValuesRows.length).to.eql(2); + await testSubjects.missingOrFail('unifiedFieldStats-buttonGroup'); + await testSubjects.missingOrFail('unifiedFieldStats-histogram'); + expect(await testSubjects.getVisibleText('dscFieldStats-statsFooter')).to.contain( + '14,004 records' + ); + await PageObjects.unifiedFieldList.closeFieldPopover(); + }); + + it('should show a histogram and top values popover for numeric field', async () => { + await PageObjects.unifiedFieldList.clickFieldListItem('bytes'); + await testSubjects.existOrFail('dscFieldStats-topValues'); + expect(await testSubjects.getVisibleText('dscFieldStats-title')).to.contain('Top values'); + expect(await testSubjects.getVisibleText('dscFieldStats-title')).to.contain('Distribution'); + const topValuesRows = await testSubjects.findAll('dscFieldStats-topValues-bucket'); + expect(topValuesRows.length).to.eql(11); + await testSubjects.click('dscFieldStats-buttonGroup-distributionButton'); + expect( + await find.existsByCssSelector('[data-test-subj="unifiedFieldStats-histogram"] .echChart') + ).to.eql(true); + expect(await testSubjects.getVisibleText('dscFieldStats-statsFooter')).to.contain( + '14,004 records' + ); + await PageObjects.unifiedFieldList.closeFieldPopover(); + }); + + it('should show a top values popover for a keyword field', async () => { + await PageObjects.unifiedFieldList.clickFieldListItem('extension'); + await testSubjects.existOrFail('dscFieldStats-topValues'); + expect(await testSubjects.getVisibleText('dscFieldStats-title')).to.be('Top values'); + const topValuesRows = await testSubjects.findAll('dscFieldStats-topValues-bucket'); + expect(topValuesRows.length).to.eql(5); + await testSubjects.missingOrFail('unifiedFieldStats-buttonGroup'); + await testSubjects.missingOrFail('unifiedFieldStats-histogram'); + expect(await testSubjects.getVisibleText('dscFieldStats-statsFooter')).to.contain( + '14,004 records' + ); + await PageObjects.unifiedFieldList.closeFieldPopover(); + }); + + it('should show a top values popover for an ip field', async () => { + await PageObjects.unifiedFieldList.clickFieldListItem('clientip'); + await testSubjects.existOrFail('dscFieldStats-topValues'); + expect(await testSubjects.getVisibleText('dscFieldStats-title')).to.be('Top values'); + const topValuesRows = await testSubjects.findAll('dscFieldStats-topValues-bucket'); + expect(topValuesRows.length).to.eql(11); + await testSubjects.missingOrFail('unifiedFieldStats-buttonGroup'); + await testSubjects.missingOrFail('unifiedFieldStats-histogram'); + expect(await testSubjects.getVisibleText('dscFieldStats-statsFooter')).to.contain( + '14,004 records' + ); + await PageObjects.unifiedFieldList.closeFieldPopover(); + }); + + it('should show a date histogram popover for a date field', async () => { + await PageObjects.unifiedFieldList.clickFieldListItem('@timestamp'); + await testSubjects.existOrFail('unifiedFieldStats-timeDistribution'); + await testSubjects.missingOrFail('dscFieldStats-buttonGroup-topValuesButton'); + expect(await testSubjects.getVisibleText('dscFieldStats-statsFooter')).to.contain( + '14,004 records' + ); + await PageObjects.unifiedFieldList.closeFieldPopover(); + }); + + it('should show examples for geo points field', async () => { + await PageObjects.unifiedFieldList.clickFieldListItem('geo.coordinates'); + await testSubjects.existOrFail('dscFieldStats-topValues'); + expect(await testSubjects.getVisibleText('dscFieldStats-title')).to.be('Examples'); + const topValuesRows = await testSubjects.findAll('dscFieldStats-topValues-bucket'); + expect(topValuesRows.length).to.eql(11); + await testSubjects.missingOrFail('unifiedFieldStats-buttonGroup'); + await testSubjects.missingOrFail('unifiedFieldStats-histogram'); + expect(await testSubjects.getVisibleText('dscFieldStats-statsFooter')).to.contain( + '100 sample records' + ); + await PageObjects.unifiedFieldList.closeFieldPopover(); + }); + }); + + describe('text based columns', function () { + before(async () => { + const TEST_START_TIME = 'Sep 23, 2015 @ 06:31:44.000'; + const TEST_END_TIME = 'Sep 23, 2015 @ 18:31:44.000'; + await PageObjects.timePicker.setAbsoluteRange(TEST_START_TIME, TEST_END_TIME); + await PageObjects.common.navigateToApp('discover'); + await PageObjects.discover.waitUntilSearchingHasFinished(); + + await PageObjects.discover.selectTextBaseLang(); + + const testQuery = `from logstash-* [METADATA _index, _id] | sort @timestamp desc | limit 500`; + await monacoEditor.setCodeEditorValue(testQuery); + await testSubjects.click('querySubmitButton'); + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); + }); + + it('should show top values popover for numeric field', async () => { + await PageObjects.unifiedFieldList.clickFieldListItem('bytes'); + await testSubjects.existOrFail('dscFieldStats-topValues'); + expect(await testSubjects.getVisibleText('dscFieldStats-title')).to.be('Top values'); + const topValuesRows = await testSubjects.findAll('dscFieldStats-topValues-bucket'); + expect(topValuesRows.length).to.eql(10); + expect(await testSubjects.getVisibleText('dscFieldStats-statsFooter')).to.contain( + '42 sample values' + ); + await PageObjects.unifiedFieldList.closeFieldPopover(); + }); + + it('should show a top values popover for a keyword field', async () => { + await PageObjects.unifiedFieldList.clickFieldListItem('extension.raw'); + await testSubjects.existOrFail('dscFieldStats-topValues'); + expect(await testSubjects.getVisibleText('dscFieldStats-title')).to.be('Top values'); + const topValuesRows = await testSubjects.findAll('dscFieldStats-topValues-bucket'); + expect(topValuesRows.length).to.eql(5); + await testSubjects.missingOrFail('unifiedFieldStats-buttonGroup'); + await testSubjects.missingOrFail('unifiedFieldStats-histogram'); + expect(await testSubjects.getVisibleText('dscFieldStats-statsFooter')).to.contain( + '500 sample values' + ); + await PageObjects.unifiedFieldList.closeFieldPopover(); + }); + + it('should show a top values popover for an ip field', async () => { + await PageObjects.unifiedFieldList.clickFieldListItem('clientip'); + await testSubjects.existOrFail('dscFieldStats-topValues'); + expect(await testSubjects.getVisibleText('dscFieldStats-title')).to.be('Top values'); + const topValuesRows = await testSubjects.findAll('dscFieldStats-topValues-bucket'); + expect(topValuesRows.length).to.eql(10); + await testSubjects.missingOrFail('unifiedFieldStats-buttonGroup'); + await testSubjects.missingOrFail('unifiedFieldStats-histogram'); + expect(await testSubjects.getVisibleText('dscFieldStats-statsFooter')).to.contain( + '32 sample values' + ); + await PageObjects.unifiedFieldList.closeFieldPopover(); + }); + + it('should show a top values popover for _index field', async () => { + await PageObjects.unifiedFieldList.clickFieldListItem('_index'); + await testSubjects.existOrFail('dscFieldStats-topValues'); + expect(await testSubjects.getVisibleText('dscFieldStats-title')).to.be('Top values'); + const topValuesRows = await testSubjects.findAll('dscFieldStats-topValues-bucket'); + expect(topValuesRows.length).to.eql(1); + await testSubjects.missingOrFail('unifiedFieldStats-buttonGroup'); + await testSubjects.missingOrFail('unifiedFieldStats-histogram'); + expect(await testSubjects.getVisibleText('dscFieldStats-statsFooter')).to.contain( + '500 sample values' + ); + await PageObjects.unifiedFieldList.closeFieldPopover(); + }); + + it('should not have stats for a date field yet', async () => { + await PageObjects.unifiedFieldList.clickFieldListItem('@timestamp'); + await testSubjects.missingOrFail('dscFieldStats-statsFooter'); + await PageObjects.unifiedFieldList.closeFieldPopover(); + }); + + it('should show examples for geo points field', async () => { + await PageObjects.unifiedFieldList.clickFieldListItem('geo.coordinates'); + await testSubjects.existOrFail('dscFieldStats-topValues'); + expect(await testSubjects.getVisibleText('dscFieldStats-title')).to.be('Examples'); + const topValuesRows = await testSubjects.findAll('dscFieldStats-topValues-bucket'); + expect(topValuesRows.length).to.eql(11); + await testSubjects.missingOrFail('unifiedFieldStats-buttonGroup'); + await testSubjects.missingOrFail('unifiedFieldStats-histogram'); + expect(await testSubjects.getVisibleText('dscFieldStats-statsFooter')).to.contain( + '100 sample records' + ); + await PageObjects.unifiedFieldList.closeFieldPopover(); + }); + + it('should show examples for text field', async () => { + await PageObjects.unifiedFieldList.clickFieldListItem('extension'); + await testSubjects.existOrFail('dscFieldStats-topValues'); + expect(await testSubjects.getVisibleText('dscFieldStats-title')).to.be('Examples'); + const topValuesRows = await testSubjects.findAll('dscFieldStats-topValues-bucket'); + expect(topValuesRows.length).to.eql(5); + await testSubjects.missingOrFail('unifiedFieldStats-buttonGroup'); + await testSubjects.missingOrFail('unifiedFieldStats-histogram'); + expect(await testSubjects.getVisibleText('dscFieldStats-statsFooter')).to.contain( + '100 sample records' + ); + await PageObjects.unifiedFieldList.closeFieldPopover(); + }); + + it('should show examples for _id field', async () => { + await PageObjects.unifiedFieldList.clickFieldListItem('_id'); + await testSubjects.existOrFail('dscFieldStats-topValues'); + expect(await testSubjects.getVisibleText('dscFieldStats-title')).to.be('Examples'); + const topValuesRows = await testSubjects.findAll('dscFieldStats-topValues-bucket'); + expect(topValuesRows.length).to.eql(11); + await testSubjects.missingOrFail('unifiedFieldStats-buttonGroup'); + await testSubjects.missingOrFail('unifiedFieldStats-histogram'); + expect(await testSubjects.getVisibleText('dscFieldStats-statsFooter')).to.contain( + '100 sample records' + ); + await PageObjects.unifiedFieldList.closeFieldPopover(); + }); + + it('should show a top values popover for a more complex query', async () => { + const testQuery = `from logstash-* | sort @timestamp desc | limit 50 | stats avg(bytes) by geo.dest | limit 3`; + await monacoEditor.setCodeEditorValue(testQuery); + await testSubjects.click('querySubmitButton'); + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); + + await PageObjects.unifiedFieldList.clickFieldListItem('avg(bytes)'); + await testSubjects.existOrFail('dscFieldStats-topValues'); + expect(await testSubjects.getVisibleText('dscFieldStats-title')).to.be('Top values'); + const topValuesRows = await testSubjects.findAll('dscFieldStats-topValues-bucket'); + expect(topValuesRows.length).to.eql(3); + expect(await testSubjects.getVisibleText('dscFieldStats-statsFooter')).to.contain( + '3 sample values' + ); + await PageObjects.unifiedFieldList.closeFieldPopover(); + }); + + it('should show a top values popover for a boolean field', async () => { + const testQuery = `row enabled = true`; + await monacoEditor.setCodeEditorValue(testQuery); + await testSubjects.click('querySubmitButton'); + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); + + await PageObjects.unifiedFieldList.clickFieldListItem('enabled'); + await testSubjects.existOrFail('dscFieldStats-topValues'); + expect(await testSubjects.getVisibleText('dscFieldStats-title')).to.be('Top values'); + const topValuesRows = await testSubjects.findAll('dscFieldStats-topValues-bucket'); + expect(topValuesRows.length).to.eql(1); + expect(await PageObjects.unifiedFieldList.getFieldStatsTopValueBucketsVisibleText()).to.be( + 'true\n100%' + ); + expect(await testSubjects.getVisibleText('dscFieldStats-statsFooter')).to.contain( + '1 sample value' + ); + await PageObjects.unifiedFieldList.closeFieldPopover(); + }); + }); + }); +} diff --git a/test/functional/apps/discover/group3/index.ts b/test/functional/apps/discover/group3/index.ts index 60f835154d5e9..2fe5a4ebb1db1 100644 --- a/test/functional/apps/discover/group3/index.ts +++ b/test/functional/apps/discover/group3/index.ts @@ -24,6 +24,7 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) { loadTestFile(require.resolve('./_time_field_column')); loadTestFile(require.resolve('./_drag_drop')); loadTestFile(require.resolve('./_sidebar')); + loadTestFile(require.resolve('./_sidebar_field_stats')); loadTestFile(require.resolve('./_request_counts')); loadTestFile(require.resolve('./_doc_viewer')); loadTestFile(require.resolve('./_view_mode_toggle')); diff --git a/test/functional/page_objects/discover_page.ts b/test/functional/page_objects/discover_page.ts index 9ec3bb1330305..5e1c74bc78d4c 100644 --- a/test/functional/page_objects/discover_page.ts +++ b/test/functional/page_objects/discover_page.ts @@ -763,9 +763,12 @@ export class DiscoverPageObject extends FtrService { } } - public async addRuntimeField(name: string, script: string) { + public async addRuntimeField(name: string, script: string, type?: string) { await this.clickAddField(); await this.fieldEditor.setName(name); + if (type) { + await this.fieldEditor.setFieldType(type); + } await this.fieldEditor.enableValue(); await this.fieldEditor.typeScript(script); await this.fieldEditor.save(); @@ -807,12 +810,12 @@ export class DiscoverPageObject extends FtrService { * */ public async dragFieldWithKeyboardToTable(fieldName: string) { const field = await this.find.byCssSelector( - `[data-test-subj="domDragDrop_draggable-${fieldName}"] [data-test-subj="domDragDrop-keyboardHandler"]` + `[data-test-subj="dscFieldListPanelField-${fieldName}"] [data-test-subj="domDragDrop-keyboardHandler"]` ); await field.focus(); await this.retry.try(async () => { await this.browser.pressKeys(this.browser.keys.ENTER); - await this.testSubjects.exists('.domDragDrop-isDropTarget'); // checks if we're in dnd mode and there's any drop target active + await this.testSubjects.exists('.domDroppable--active'); // checks if we're in dnd mode and there's any drop target active }); await this.browser.pressKeys(this.browser.keys.RIGHT); await this.browser.pressKeys(this.browser.keys.ENTER); diff --git a/test/functional/page_objects/unified_field_list.ts b/test/functional/page_objects/unified_field_list.ts index 378b20cc02e24..152a1b4c1c660 100644 --- a/test/functional/page_objects/unified_field_list.ts +++ b/test/functional/page_objects/unified_field_list.ts @@ -116,6 +116,13 @@ export class UnifiedFieldListPageObject extends FtrService { }); } + public async closeFieldPopover() { + await this.browser.pressKeys(this.browser.keys.ESCAPE); + await this.retry.waitFor('popover is closed', async () => { + return !(await this.testSubjects.exists('fieldPopoverHeader_fieldDisplayName')); + }); + } + public async clickFieldListItem(field: string) { await this.testSubjects.moveMouseTo(`field-${field}`); await this.testSubjects.click(`field-${field}`); diff --git a/test/functional/screenshots/baseline/dashboard_embed_mode.png b/test/functional/screenshots/baseline/dashboard_embed_mode.png index c96c621a8c45b..720e8757ba280 100644 Binary files a/test/functional/screenshots/baseline/dashboard_embed_mode.png and b/test/functional/screenshots/baseline/dashboard_embed_mode.png differ diff --git a/test/functional/screenshots/baseline/dashboard_embed_mode_scrolling.png b/test/functional/screenshots/baseline/dashboard_embed_mode_scrolling.png index a98a60b96ea68..3aeae029b130c 100644 Binary files a/test/functional/screenshots/baseline/dashboard_embed_mode_scrolling.png and b/test/functional/screenshots/baseline/dashboard_embed_mode_scrolling.png differ diff --git a/test/functional/screenshots/baseline/dashboard_embed_mode_with_url_params.png b/test/functional/screenshots/baseline/dashboard_embed_mode_with_url_params.png index 26a18ede2d686..d4db452c93516 100644 Binary files a/test/functional/screenshots/baseline/dashboard_embed_mode_with_url_params.png and b/test/functional/screenshots/baseline/dashboard_embed_mode_with_url_params.png differ diff --git a/tsconfig.base.json b/tsconfig.base.json index 674ca428983e6..d64319e211b71 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -1364,6 +1364,8 @@ "@kbn/search-examples-plugin/*": ["examples/search_examples/*"], "@kbn/search-index-documents": ["packages/kbn-search-index-documents"], "@kbn/search-index-documents/*": ["packages/kbn-search-index-documents/*"], + "@kbn/search-playground": ["x-pack/plugins/search_playground"], + "@kbn/search-playground/*": ["x-pack/plugins/search_playground/*"], "@kbn/search-response-warnings": ["packages/kbn-search-response-warnings"], "@kbn/search-response-warnings/*": ["packages/kbn-search-response-warnings/*"], "@kbn/searchprofiler-plugin": ["x-pack/plugins/searchprofiler"], diff --git a/x-pack/.i18nrc.json b/x-pack/.i18nrc.json index 03399acb752da..51ceb3b79f4fc 100644 --- a/x-pack/.i18nrc.json +++ b/x-pack/.i18nrc.json @@ -105,6 +105,7 @@ ], "xpack.runtimeFields": "plugins/runtime_fields", "xpack.screenshotting": "plugins/screenshotting", + "xpack.searchPlayground": "plugins/search_playground", "xpack.searchProfiler": "plugins/searchprofiler", "xpack.security": "plugins/security", "xpack.server": "legacy/server", diff --git a/x-pack/packages/kbn-data-forge/src/run.ts b/x-pack/packages/kbn-data-forge/src/run.ts index 7cd88870fc0a6..af569e80bea2d 100644 --- a/x-pack/packages/kbn-data-forge/src/run.ts +++ b/x-pack/packages/kbn-data-forge/src/run.ts @@ -23,5 +23,6 @@ export async function run(config: Config, client: Client, logger: ToolingLog) { await indexSchedule(config, client, logger); const indicesCreated = [...indices]; indices.clear(); + await client.indices.refresh({ index: indicesCreated }); return indicesCreated; } diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.gen.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.gen.ts index d8af61a2e2d9c..8224d2e32686d 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.gen.ts +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.gen.ts @@ -40,7 +40,6 @@ export const ExecuteConnectorRequestBody = z.object({ isEnabledRAGAlerts: z.boolean().optional(), replacements: z.array(Replacement), size: z.number().optional(), - llmType: z.enum(['bedrock', 'openai']), }); export type ExecuteConnectorRequestBodyInput = z.input; diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.schema.yaml b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.schema.yaml index 936d28ce62589..6e36d8e8c2d81 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.schema.yaml +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.schema.yaml @@ -26,7 +26,6 @@ paths: type: object required: - params - - llmType - replacements - subAction properties: @@ -61,11 +60,6 @@ paths: $ref: '../conversations/common_attributes.schema.yaml#/components/schemas/Replacement' size: type: number - llmType: - type: string - enum: - - bedrock - - openai responses: '200': description: Successful response diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts index b95d0f8918705..04bf99a88fd0d 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.gen.ts @@ -145,10 +145,6 @@ export const ApiConfig = z.object({ * connector Id */ connectorId: z.string(), - /** - * connector Type Title - */ - connectorTypeTitle: z.string(), /** * defaultSystemPromptId */ diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.schema.yaml b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.schema.yaml index 1359543f2e588..208f7017d16dc 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.schema.yaml +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/conversations/common_attributes.schema.yaml @@ -117,14 +117,10 @@ components: type: object required: - connectorId - - connectorTypeTitle properties: connectorId: type: string description: connector Id - connectorTypeTitle: - type: string - description: connector Type Title defaultSystemPromptId: type: string description: defaultSystemPromptId diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_bulk_actions_conversations.test.ts b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_bulk_actions_conversations.test.ts index 011788adf083f..06351ad4b0827 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_bulk_actions_conversations.test.ts +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_bulk_actions_conversations.test.ts @@ -16,7 +16,7 @@ import { IToasts } from '@kbn/core-notifications-browser'; const conversation1 = { id: 'conversation1', title: 'Conversation 1', - apiConfig: { connectorId: '123', connectorTypeTitle: 'OpenAI' }, + apiConfig: { connectorId: '123' }, replacements: [], category: 'default', messages: [ diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/index.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/index.test.tsx index 585dc12e8e7c7..c54cfa56b4898 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/index.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/index.test.tsx @@ -26,7 +26,6 @@ const mockHttp = { const apiConfig: Conversation['apiConfig'] = { connectorId: 'foo', - connectorTypeTitle: 'OpenAI', model: 'gpt-4', provider: OpenAiProviderType.OpenAi, }; @@ -53,7 +52,7 @@ describe('API tests', () => { expect(mockHttp.fetch).toHaveBeenCalledWith( '/internal/elastic_assistant/actions/connector/foo/_execute', { - body: '{"model":"gpt-4","message":"This is a test","subAction":"invokeAI","conversationId":"test","replacements":[],"isEnabledKnowledgeBase":true,"isEnabledRAGAlerts":false,"llmType":"openai"}', + body: '{"model":"gpt-4","message":"This is a test","subAction":"invokeAI","conversationId":"test","replacements":[],"isEnabledKnowledgeBase":true,"isEnabledRAGAlerts":false}', headers: { 'Content-Type': 'application/json' }, method: 'POST', signal: undefined, @@ -73,7 +72,7 @@ describe('API tests', () => { expect(mockHttp.fetch).toHaveBeenCalledWith( '/internal/elastic_assistant/actions/connector/foo/_execute', { - body: '{"model":"gpt-4","message":"This is a test","subAction":"invokeStream","conversationId":"test","replacements":[],"isEnabledKnowledgeBase":false,"isEnabledRAGAlerts":false,"llmType":"openai"}', + body: '{"model":"gpt-4","message":"This is a test","subAction":"invokeStream","conversationId":"test","replacements":[],"isEnabledKnowledgeBase":false,"isEnabledRAGAlerts":false}', method: 'POST', asResponse: true, rawResponse: true, @@ -99,7 +98,7 @@ describe('API tests', () => { expect(mockHttp.fetch).toHaveBeenCalledWith( '/internal/elastic_assistant/actions/connector/foo/_execute', { - body: '{"model":"gpt-4","message":"This is a test","subAction":"invokeAI","conversationId":"test","replacements":[{"uuid":"auuid","value":"real.hostname"}],"isEnabledKnowledgeBase":true,"isEnabledRAGAlerts":true,"llmType":"openai","alertsIndexPattern":".alerts-security.alerts-default","allow":["a","b","c"],"allowReplacement":["b","c"],"size":30}', + body: '{"model":"gpt-4","message":"This is a test","subAction":"invokeAI","conversationId":"test","replacements":[{"uuid":"auuid","value":"real.hostname"}],"isEnabledKnowledgeBase":true,"isEnabledRAGAlerts":true,"alertsIndexPattern":".alerts-security.alerts-default","allow":["a","b","c"],"allowReplacement":["b","c"],"size":30}', headers: { 'Content-Type': 'application/json', }, @@ -122,7 +121,7 @@ describe('API tests', () => { expect(mockHttp.fetch).toHaveBeenCalledWith( '/internal/elastic_assistant/actions/connector/foo/_execute', { - body: '{"model":"gpt-4","message":"This is a test","subAction":"invokeAI","conversationId":"test","replacements":[],"isEnabledKnowledgeBase":false,"isEnabledRAGAlerts":false,"llmType":"openai"}', + body: '{"model":"gpt-4","message":"This is a test","subAction":"invokeAI","conversationId":"test","replacements":[],"isEnabledKnowledgeBase":false,"isEnabledRAGAlerts":false}', method: 'POST', headers: { 'Content-Type': 'application/json', @@ -145,7 +144,7 @@ describe('API tests', () => { expect(mockHttp.fetch).toHaveBeenCalledWith( '/internal/elastic_assistant/actions/connector/foo/_execute', { - body: '{"model":"gpt-4","message":"This is a test","subAction":"invokeAI","conversationId":"test","replacements":[],"isEnabledKnowledgeBase":false,"isEnabledRAGAlerts":true,"llmType":"openai"}', + body: '{"model":"gpt-4","message":"This is a test","subAction":"invokeAI","conversationId":"test","replacements":[],"isEnabledKnowledgeBase":false,"isEnabledRAGAlerts":true}', method: 'POST', headers: { 'Content-Type': 'application/json', diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/index.tsx index bfd567d2f99ca..f5296bb07499a 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/index.tsx @@ -9,7 +9,7 @@ import { HttpSetup } from '@kbn/core/public'; import { IHttpFetchError } from '@kbn/core-http-browser'; import { ApiConfig, Replacement } from '@kbn/elastic-assistant-common'; import { API_ERROR } from '../translations'; -import { getOptionalRequestParams, llmTypeDictionary } from '../helpers'; +import { getOptionalRequestParams } from '../helpers'; export * from './conversations'; export interface FetchConnectorExecuteAction { @@ -53,7 +53,6 @@ export const fetchConnectorExecuteAction = async ({ signal, size, }: FetchConnectorExecuteAction): Promise => { - const llmType = llmTypeDictionary[apiConfig.connectorTypeTitle]; // TODO: Remove in part 3 of streaming work for security solution // tracked here: https://github.com/elastic/security-team/issues/7363 // In part 3 I will make enhancements to langchain to introduce streaming @@ -76,7 +75,6 @@ export const fetchConnectorExecuteAction = async ({ replacements, isEnabledKnowledgeBase, isEnabledRAGAlerts, - llmType, ...optionalRequestParams, }; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_selector/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_selector/index.tsx index 7a7316c3e6678..17599dedd4176 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_selector/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_selector/index.tsx @@ -118,7 +118,6 @@ export const ConversationSelector: React.FC = React.memo( ? { apiConfig: { connectorId: defaultConnector.id, - connectorTypeTitle: defaultConnector.connectorTypeTitle, provider: defaultConnector.apiProvider, defaultSystemPromptId: defaultSystemPrompt?.id, }, diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_settings/conversation_settings.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_settings/conversation_settings.test.tsx index fdfea79f4b073..fb75b9d911dda 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_settings/conversation_settings.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_settings/conversation_settings.test.tsx @@ -102,7 +102,6 @@ const mockConnector = { id: 'cool-id-bro', actionTypeId: '.gen-ai', name: 'cool name', - connectorTypeTitle: 'OpenAI', }; jest.mock('../../../connectorland/connector_selector', () => ({ // @ts-ignore @@ -231,7 +230,6 @@ describe('ConversationSettings', () => { ...mockConvos[welcomeConvo.title], apiConfig: { connectorId: mockConnector.id, - connectorTypeTitle: 'OpenAI', model: undefined, provider: undefined, }, @@ -243,7 +241,6 @@ describe('ConversationSettings', () => { ...mockConvos[welcomeConvo.title], apiConfig: { connectorId: mockConnector.id, - connectorTypeTitle: 'OpenAI', model: undefined, provider: undefined, }, @@ -331,7 +328,6 @@ describe('ConversationSettings', () => { id: 'not-the-right-id', apiConfig: { connectorId: mockConnector.id, - connectorTypeTitle: 'OpenAI', model: undefined, provider: undefined, }, diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_settings/conversation_settings.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_settings/conversation_settings.tsx index 08485e7fca4e9..544d08b35e888 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_settings/conversation_settings.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_settings/conversation_settings.tsx @@ -47,7 +47,6 @@ export interface ConversationSettingsProps { */ export const ConversationSettings: React.FC = React.memo( ({ - actionTypeRegistry, allSystemPrompts, defaultConnector, selectedConversation, @@ -68,7 +67,6 @@ export const ConversationSettings: React.FC = React.m }, [allSystemPrompts, selectedConversation]); const { data: connectors, isSuccess: areConnectorsFetched } = useLoadConnectors({ - actionTypeRegistry, http, }); @@ -89,7 +87,6 @@ export const ConversationSettings: React.FC = React.m ? { apiConfig: { connectorId: defaultConnector.id, - connectorTypeTitle: defaultConnector.connectorTypeTitle, provider: defaultConnector.apiProvider, defaultSystemPromptId: defaultSystemPrompt?.id, }, @@ -231,7 +228,6 @@ export const ConversationSettings: React.FC = React.m apiConfig: { ...selectedConversation.apiConfig, connectorId: connector.id, - connectorTypeTitle: connector.connectorTypeTitle, provider: config?.apiProvider, model: config?.defaultModel, }, @@ -257,7 +253,6 @@ export const ConversationSettings: React.FC = React.m : {} ).apiConfig ?? {}), connectorId: connector?.id, - connectorTypeTitle: connector?.connectorTypeTitle, provider: config?.apiProvider, model: config?.defaultModel, }, diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/helpers.test.ts b/x-pack/packages/kbn-elastic-assistant/impl/assistant/helpers.test.ts index a63aa5b809aae..4bb9d099bc7c4 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/helpers.test.ts +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/helpers.test.ts @@ -23,7 +23,7 @@ describe('helpers', () => { category: 'assistant', theme: {}, messages: [], - apiConfig: { connectorId: '123', connectorTypeTitle: 'OpenAI' }, + apiConfig: { connectorId: '123' }, replacements: [], title: 'conversation_id', }; @@ -46,7 +46,7 @@ describe('helpers', () => { }, }, ], - apiConfig: { connectorId: '123', connectorTypeTitle: 'OpenAI' }, + apiConfig: { connectorId: '123' }, replacements: [], category: 'assistant', title: 'conversation_id', @@ -60,7 +60,7 @@ describe('helpers', () => { id: 'conversation_id', title: 'conversation_id', messages: enterpriseMessaging, - apiConfig: { connectorId: '123', connectorTypeTitle: 'OpenAI' }, + apiConfig: { connectorId: '123' }, replacements: [], category: 'assistant', }; @@ -86,7 +86,7 @@ describe('helpers', () => { }, }, ], - apiConfig: { connectorId: '123', connectorTypeTitle: 'OpenAI' }, + apiConfig: { connectorId: '123' }, replacements: [], }; const result = getBlockBotConversation(conversation, isAssistantEnabled); @@ -102,7 +102,7 @@ describe('helpers', () => { title: 'conversation_id', category: 'assistant', messages: [], - apiConfig: { connectorId: '123', connectorTypeTitle: 'OpenAI' }, + apiConfig: { connectorId: '123' }, replacements: [], }; const result = getBlockBotConversation(conversation, isAssistantEnabled); @@ -124,7 +124,7 @@ describe('helpers', () => { }, }, ], - apiConfig: { connectorId: '123', connectorTypeTitle: 'OpenAI' }, + apiConfig: { connectorId: '123' }, replacements: [], }; const result = getBlockBotConversation(conversation, isAssistantEnabled); @@ -151,7 +151,6 @@ describe('helpers', () => { const connectors: AIConnector[] = [ { actionTypeId: '.gen-ai', - connectorTypeTitle: 'OpenAI', isPreconfigured: false, isDeprecated: false, referencedByCount: 0, @@ -175,7 +174,6 @@ describe('helpers', () => { const connectors: AIConnector[] = [ { actionTypeId: '.gen-ai', - connectorTypeTitle: 'OpenAI', isPreconfigured: false, isDeprecated: false, referencedByCount: 0, @@ -191,7 +189,6 @@ describe('helpers', () => { }, { actionTypeId: '.gen-ai', - connectorTypeTitle: 'OpenAI', isPreconfigured: false, isDeprecated: false, referencedByCount: 0, @@ -268,7 +265,7 @@ describe('helpers', () => { messages, category: 'assistant', theme: {}, - apiConfig: { connectorId: '123', connectorTypeTitle: 'OpenAI' }, + apiConfig: { connectorId: '123' }, replacements: [], }; const baseConversations = { diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/helpers.ts b/x-pack/packages/kbn-elastic-assistant/impl/assistant/helpers.ts index b5308334dafbc..c78d7aee079d0 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/helpers.ts +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/helpers.ts @@ -118,9 +118,3 @@ export const getOptionalRequestParams = ({ ...optionalSize, }; }; - -export const llmTypeDictionary: Record = { - 'Amazon Bedrock': 'bedrock', - 'Azure OpenAI': 'openai', - OpenAI: 'openai', -}; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/index.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/index.test.tsx index f7caee3462bc2..48733ce80cb9f 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/index.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/index.test.tsx @@ -50,7 +50,7 @@ const mockData = { title: 'Welcome', category: 'assistant', messages: [], - apiConfig: { connectorId: '123', connectorTypeTitle: 'OpenAI' }, + apiConfig: { connectorId: '123' }, replacements: [], }, 'electric sheep': { @@ -58,7 +58,7 @@ const mockData = { category: 'assistant', title: 'electric sheep', messages: [], - apiConfig: { connectorId: '123', connectorTypeTitle: 'OpenAI' }, + apiConfig: { connectorId: '123' }, replacements: [], }, }; @@ -169,7 +169,7 @@ describe('Assistant', () => { expect(chatSendSpy).toHaveBeenLastCalledWith( expect.objectContaining({ currentConversation: { - apiConfig: { connectorId: '123', connectorTypeTitle: 'OpenAI' }, + apiConfig: { connectorId: '123' }, replacements: [], category: 'assistant', id: 'Welcome Id', diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/index.tsx index a322372e75395..64fffb8181678 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/index.tsx @@ -80,7 +80,6 @@ const AssistantComponent: React.FC = ({ setConversationTitle, }) => { const { - actionTypeRegistry, assistantTelemetry, augmentMessageCodeBlocks, assistantAvailability: { isAssistantEnabled }, @@ -136,7 +135,6 @@ const AssistantComponent: React.FC = ({ // Connector details const { data: connectors, isSuccess: areConnectorsFetched } = useLoadConnectors({ - actionTypeRegistry, http, }); const defaultConnector = useMemo(() => getDefaultConnector(connectors), [connectors]); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/index.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/index.test.tsx index 2e45c4109b0ad..454c9bec9fa06 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/index.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/index.test.tsx @@ -23,7 +23,6 @@ const BASE_CONVERSATION: Conversation = { ...WELCOME_CONVERSATION, apiConfig: { connectorId: '123', - connectorTypeTitle: 'OpenAI', defaultSystemPromptId: mockSystemPrompt.id, }, }; @@ -377,7 +376,6 @@ describe('SystemPrompt', () => { category: 'assistant', apiConfig: { connectorId: '123', - connectorTypeTitle: 'OpenAI', defaultSystemPromptId: undefined, }, title: 'second', @@ -462,7 +460,6 @@ describe('SystemPrompt', () => { ...secondMockConversation, apiConfig: { connectorId: '123', - connectorTypeTitle: 'OpenAI', defaultSystemPromptId: mockSystemPrompt.id, }, }, diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_modal/system_prompt_settings.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_modal/system_prompt_settings.tsx index adc8157f9b49b..f49284f6a7175 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_modal/system_prompt_settings.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_modal/system_prompt_settings.tsx @@ -144,7 +144,6 @@ export const SystemPromptSettings: React.FC = React.memo( apiConfig: { defaultSystemPromptId: getDefaultSystemPromptId(convo), connectorId: defaultConnector?.id ?? '', - connectorTypeTitle: defaultConnector?.connectorTypeTitle ?? '', }, }), })) @@ -211,7 +210,6 @@ export const SystemPromptSettings: React.FC = React.memo( [ conversationSettings, conversationsSettingsBulkActions, - defaultConnector?.connectorTypeTitle, defaultConnector?.id, selectedSystemPrompt, setConversationSettings, diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/evaluation_settings/evaluation_settings.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/evaluation_settings/evaluation_settings.tsx index f7f89ac1cfe17..09cdf6717ca6c 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/evaluation_settings/evaluation_settings.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/evaluation_settings/evaluation_settings.tsx @@ -53,7 +53,7 @@ interface Props { */ export const EvaluationSettings: React.FC = React.memo(({ onEvaluationSettingsChange }) => { const { actionTypeRegistry, basePath, http } = useAssistantContext(); - const { data: connectors } = useLoadConnectors({ actionTypeRegistry, http }); + const { data: connectors } = useLoadConnectors({ http }); const { data: evalResponse, mutate: performEvaluation, diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/helpers.test.ts b/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/helpers.test.ts index 60f44d2314c4d..9d101b4423f26 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/helpers.test.ts +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/helpers.test.ts @@ -93,7 +93,6 @@ describe('useConversation helpers', () => { const conversation: Conversation = { apiConfig: { connectorId: '123', - connectorTypeTitle: 'OpenAI', defaultSystemPromptId: '3', }, category: 'assistant', @@ -111,7 +110,7 @@ describe('useConversation helpers', () => { test('should return the default (starred) isNewConversationDefault system prompt if conversation system prompt does not exist', () => { const conversationWithoutSystemPrompt: Conversation = { - apiConfig: { connectorId: '123', connectorTypeTitle: 'OpenAI' }, + apiConfig: { connectorId: '123' }, replacements: [], category: 'assistant', id: '1', @@ -128,7 +127,7 @@ describe('useConversation helpers', () => { test('should return the default (starred) isNewConversationDefault system prompt if conversation system prompt does not exist within all system prompts', () => { const conversationWithoutSystemPrompt: Conversation = { - apiConfig: { connectorId: '123', connectorTypeTitle: 'OpenAI' }, + apiConfig: { connectorId: '123' }, replacements: [], category: 'assistant', id: '4', // this id does not exist within allSystemPrompts @@ -145,7 +144,7 @@ describe('useConversation helpers', () => { test('should return the first prompt if both conversation system prompt and default new system prompt do not exist', () => { const conversationWithoutSystemPrompt: Conversation = { - apiConfig: { connectorId: '123', connectorTypeTitle: 'OpenAI' }, + apiConfig: { connectorId: '123' }, replacements: [], category: 'assistant', id: '1', @@ -162,7 +161,7 @@ describe('useConversation helpers', () => { test('should return undefined if conversation system prompt does not exist and there are no system prompts', () => { const conversationWithoutSystemPrompt: Conversation = { - apiConfig: { connectorId: '123', connectorTypeTitle: 'OpenAI' }, + apiConfig: { connectorId: '123' }, replacements: [], category: 'assistant', id: '1', @@ -179,7 +178,7 @@ describe('useConversation helpers', () => { test('should return undefined if conversation system prompt does not exist within all system prompts', () => { const conversationWithoutSystemPrompt: Conversation = { - apiConfig: { connectorId: '123', connectorTypeTitle: 'OpenAI' }, + apiConfig: { connectorId: '123' }, replacements: [], category: 'assistant', id: '4', // this id does not exist within allSystemPrompts diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/index.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/index.test.tsx index fda09e1a148fb..29567aed6f1da 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/index.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/index.test.tsx @@ -36,7 +36,6 @@ const mockConvo = { messages: [message, anotherMessage], apiConfig: { connectorId: '123', - connectorTypeTitle: 'OpenAI', defaultSystemPromptId: 'default-system-prompt', }, }; @@ -69,7 +68,6 @@ describe('useConversation', () => { replacements: [], apiConfig: { connectorId: '123', - connectorTypeTitle: 'OpenAI', defaultSystemPromptId: 'default-system-prompt', }, title: mockConvo.title, diff --git a/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_selector/index.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_selector/index.test.tsx index 0c984c03fc3e9..fbc89665b8bdf 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_selector/index.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_selector/index.test.tsx @@ -90,10 +90,7 @@ describe('Connector selector', () => { expect(getByTestId('connector-selector')).toBeInTheDocument(); fireEvent.click(getByTestId('connector-selector')); fireEvent.click(getByTestId(connectorTwo.id)); - expect(onConnectorSelectionChange).toHaveBeenCalledWith({ - ...connectorTwo, - connectorTypeTitle: 'OpenAI', - }); + expect(onConnectorSelectionChange).toHaveBeenCalledWith(connectorTwo); }); it('Calls onConnectorSelectionChange once new connector is saved', () => { const { getByTestId } = render( @@ -106,10 +103,7 @@ describe('Connector selector', () => { fireEvent.click(getByTestId('modal-mock')); - expect(onConnectorSelectionChange).toHaveBeenCalledWith({ - ...newConnector, - connectorTypeTitle: 'OpenAI', - }); + expect(onConnectorSelectionChange).toHaveBeenCalledWith(newConnector); expect(mockRefetchConnectors).toHaveBeenCalled(); expect(setIsOpen).toHaveBeenCalledWith(false); }); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_selector/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_selector/index.tsx index 33b5cb030b5a9..c93b5b5c5c4a7 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_selector/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_selector/index.tsx @@ -30,8 +30,6 @@ interface Props { } export type AIConnector = ActionConnector & { - // ex: Bedrock, OpenAI - connectorTypeTitle: string; // related to OpenAI connectors, ex: Azure OpenAI, OpenAI apiProvider?: OpenAiProviderType; }; @@ -57,7 +55,7 @@ export const ConnectorSelector: React.FC = React.memo( isLoading: isLoadingConnectors, isFetching: isFetchingConnectors, refetch: refetchConnectors, - } = useLoadConnectors({ actionTypeRegistry, http }); + } = useLoadConnectors({ http }); const isLoading = isLoadingConnectors || isFetchingConnectors; const localIsDisabled = isDisabled || !assistantAvailability.hasConnectorsReadPrivilege; @@ -91,7 +89,8 @@ export const ConnectorSelector: React.FC = React.memo( () => (aiConnectors ?? []).map((connector) => { const connectorTypeTitle = - getGenAiConfig(connector)?.apiProvider ?? connector.connectorTypeTitle; + getGenAiConfig(connector)?.apiProvider ?? + getActionTypeTitle(actionTypeRegistry.get(connector.actionTypeId)); const connectorDetails = connector.isPreconfigured ? i18n.PRECONFIGURED_CONNECTOR : connectorTypeTitle; @@ -111,7 +110,7 @@ export const ConnectorSelector: React.FC = React.memo( ), }; }), - [aiConnectors, displayFancy] + [actionTypeRegistry, aiConnectors, displayFancy] ); // Only include add new connector option if user has privilege @@ -151,12 +150,11 @@ export const ConnectorSelector: React.FC = React.memo( (connector: ActionConnector) => { onConnectorSelectionChange({ ...connector, - connectorTypeTitle: getActionTypeTitle(actionTypeRegistry.get(connector.actionTypeId)), }); refetchConnectors?.(); cleanupAndCloseModal(); }, - [actionTypeRegistry, cleanupAndCloseModal, onConnectorSelectionChange, refetchConnectors] + [cleanupAndCloseModal, onConnectorSelectionChange, refetchConnectors] ); return ( diff --git a/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_selector_inline/connector_selector_inline.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_selector_inline/connector_selector_inline.test.tsx index 03d829bf22adc..44cfd59bdbecc 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_selector_inline/connector_selector_inline.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_selector_inline/connector_selector_inline.test.tsx @@ -77,7 +77,7 @@ describe('ConnectorSelectorInline', () => { id: 'conversation_id', category: 'assistant', messages: [], - apiConfig: { connectorId: '123', connectorTypeTitle: 'OpenAI' }, + apiConfig: { connectorId: '123' }, replacements: [], title: 'conversation_id', }; @@ -98,7 +98,7 @@ describe('ConnectorSelectorInline', () => { id: 'conversation_id', category: 'assistant', messages: [], - apiConfig: { connectorId: '123', connectorTypeTitle: 'OpenAI' }, + apiConfig: { connectorId: '123' }, replacements: [], title: 'conversation_id', }; @@ -122,7 +122,7 @@ describe('ConnectorSelectorInline', () => { id: 'conversation_id', category: 'assistant', messages: [], - apiConfig: { connectorId: '123', connectorTypeTitle: 'OpenAI' }, + apiConfig: { connectorId: '123' }, replacements: [], title: 'conversation_id', }; @@ -143,12 +143,11 @@ describe('ConnectorSelectorInline', () => { expect(setApiConfig).toHaveBeenCalledWith({ apiConfig: { connectorId: connectorTwo.id, - connectorTypeTitle: 'OpenAI', model: undefined, provider: 'OpenAI', }, conversation: { - apiConfig: { connectorId: '123', connectorTypeTitle: 'OpenAI' }, + apiConfig: { connectorId: '123' }, replacements: [], category: 'assistant', id: 'conversation_id', @@ -162,7 +161,7 @@ describe('ConnectorSelectorInline', () => { id: 'conversation_id', category: 'assistant', messages: [], - apiConfig: { connectorId: '123', connectorTypeTitle: 'OpenAI' }, + apiConfig: { connectorId: '123' }, replacements: [], title: 'conversation_id', }; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_selector_inline/connector_selector_inline.tsx b/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_selector_inline/connector_selector_inline.tsx index 4b05e93305163..842b921f54c35 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_selector_inline/connector_selector_inline.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_selector_inline/connector_selector_inline.tsx @@ -68,11 +68,10 @@ const placeholderButtonClassName = css` export const ConnectorSelectorInline: React.FC = React.memo( ({ isDisabled = false, selectedConnectorId, selectedConversation, onConnectorSelected }) => { const [isOpen, setIsOpen] = useState(false); - const { actionTypeRegistry, assistantAvailability, http } = useAssistantContext(); + const { assistantAvailability, http } = useAssistantContext(); const { setApiConfig } = useConversation(); const { data: aiConnectors } = useLoadConnectors({ - actionTypeRegistry, http, }); @@ -103,7 +102,6 @@ export const ConnectorSelectorInline: React.FC = React.memo( apiConfig: { ...selectedConversation.apiConfig, connectorId, - connectorTypeTitle: connector.connectorTypeTitle, // With the inline component, prefer config args to handle 'new connector' case provider: apiProvider ?? config?.apiProvider, model: model ?? config?.defaultModel, diff --git a/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_setup/index.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_setup/index.test.tsx index 4abb8998cf18f..4d30ab549f4c8 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_setup/index.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_setup/index.test.tsx @@ -65,11 +65,11 @@ describe('useConnectorSetup', () => { ).toEqual([ { username: 'You', - timestamp: 'at: 7/17/2023, 1:00:36 PM', + timestamp: `at: ${new Date('2024-03-18T18:59:18.174Z').toLocaleString()}`, }, { username: 'Assistant', - timestamp: 'at: 7/17/2023, 1:00:40 PM', + timestamp: `at: ${new Date('2024-03-19T18:59:18.174Z').toLocaleString()}`, }, ]); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_setup/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_setup/index.tsx index 2d02e96c7372e..b57cf286d27f1 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_setup/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_setup/index.tsx @@ -25,7 +25,7 @@ import * as i18n from '../translations'; import { useAssistantContext } from '../../assistant_context'; import { useLoadConnectors } from '../use_load_connectors'; import { AssistantAvatar } from '../../assistant/assistant_avatar/assistant_avatar'; -import { getActionTypeTitle, getGenAiConfig } from '../helpers'; +import { getGenAiConfig } from '../helpers'; const ConnectorButtonWrapper = styled.div` margin-bottom: 10px; @@ -58,7 +58,7 @@ export const useConnectorSetup = ({ data: connectors, isSuccess: areConnectorsFetched, refetch: refetchConnectors, - } = useLoadConnectors({ actionTypeRegistry, http }); + } = useLoadConnectors({ http }); const isConnectorConfigured = areConnectorsFetched && !!connectors?.length; const [isConnectorModalVisible, setIsConnectorModalVisible] = useState(false); @@ -117,7 +117,7 @@ export const useConnectorSetup = ({ conversation.messages[index].timestamp == null || conversation.messages[index].timestamp.length === 0 ) { - conversation.messages[index].timestamp = new Date().toLocaleString(); + conversation.messages[index].timestamp = new Date().toISOString(); } const isLastMessage = index === length - 1; const enableStreaming = @@ -151,7 +151,9 @@ export const useConnectorSetup = ({ () => conversation.messages.slice(0, currentMessageIndex + 1).map((message, index) => { const isUser = message.role === 'user'; - + const timestamp = `${i18n.CONNECTOR_SETUP_TIMESTAMP_AT}: ${new Date( + message.timestamp + ).toLocaleString()}`; const commentProps: EuiCommentProps = { username: isUser ? i18n.CONNECTOR_SETUP_USER_YOU : i18n.CONNECTOR_SETUP_USER_ASSISTANT, children: commentBody(message, index, conversation.messages.length), @@ -163,7 +165,7 @@ export const useConnectorSetup = ({ iconType={AssistantAvatar} /> ), - timestamp: `${i18n.CONNECTOR_SETUP_TIMESTAMP_AT}: ${message.timestamp}`, + timestamp, }; return commentProps; }), @@ -173,16 +175,12 @@ export const useConnectorSetup = ({ const onSaveConnector = useCallback( async (connector: ActionConnector) => { const config = getGenAiConfig(connector); - // add action type title to new connector - const connectorTypeTitle = getActionTypeTitle(actionTypeRegistry.get(connector.actionTypeId)); // persist only the active conversation - const updatedConversation = await setApiConfig({ conversation, apiConfig: { ...conversation.apiConfig, connectorId: connector.id, - connectorTypeTitle, provider: config?.apiProvider, model: config?.defaultModel, }, @@ -195,7 +193,7 @@ export const useConnectorSetup = ({ setIsConnectorModalVisible(false); } }, - [actionTypeRegistry, conversation, onConversationUpdate, refetchConnectors, setApiConfig] + [conversation, onConversationUpdate, refetchConnectors, setApiConfig] ); return { diff --git a/x-pack/packages/kbn-elastic-assistant/impl/connectorland/use_load_connectors/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/connectorland/use_load_connectors/index.tsx index 0bb401bcd5469..b93c166a9c5d7 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/connectorland/use_load_connectors/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/connectorland/use_load_connectors/index.tsx @@ -10,13 +10,10 @@ import { useQuery } from '@tanstack/react-query'; import type { ServerError } from '@kbn/cases-plugin/public/types'; import { loadAllActions as loadConnectors } from '@kbn/triggers-actions-ui-plugin/public/common/constants'; import type { IHttpFetchError } from '@kbn/core-http-browser'; -import { ActionTypeRegistryContract } from '@kbn/triggers-actions-ui-plugin/public'; import { HttpSetup } from '@kbn/core-http-browser'; import { IToasts } from '@kbn/core-notifications-browser'; -import { useMemo } from 'react'; import { OpenAiProviderType } from '@kbn/stack-connectors-plugin/common/openai/constants'; import { AIConnector } from '../connector_selector'; -import { getActionTypeTitle } from '../helpers'; import * as i18n from '../translations'; /** @@ -26,7 +23,6 @@ import * as i18n from '../translations'; const QUERY_KEY = ['elastic-assistant, load-connectors']; export interface Props { - actionTypeRegistry: ActionTypeRegistryContract; http: HttpSetup; toasts?: IToasts; } @@ -37,27 +33,9 @@ const actionTypeKey = { }; export const useLoadConnectors = ({ - actionTypeRegistry, http, toasts, }: Props): UseQueryResult => { - const connectorDetails = useMemo( - () => - actionTypeRegistry - ? { - [actionTypeKey.bedrock]: getActionTypeTitle( - actionTypeRegistry.get(actionTypeKey.bedrock) - ), - [actionTypeKey.openai]: getActionTypeTitle( - actionTypeRegistry.get(actionTypeKey.openai) - ), - } - : { - [actionTypeKey.bedrock]: 'Amazon Bedrock', - [actionTypeKey.openai]: 'OpenAI', - }, - [actionTypeRegistry] - ); return useQuery( QUERY_KEY, async () => { @@ -70,7 +48,6 @@ export const useLoadConnectors = ({ ? [ { ...connector, - connectorTypeTitle: connectorDetails[connector.actionTypeId], apiProvider: !connector.isPreconfigured && !connector.isSystemAction && diff --git a/x-pack/packages/kbn-elastic-assistant/impl/mock/connectors.ts b/x-pack/packages/kbn-elastic-assistant/impl/mock/connectors.ts index 855cf6293d7a5..05b4e96d2b0da 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/mock/connectors.ts +++ b/x-pack/packages/kbn-elastic-assistant/impl/mock/connectors.ts @@ -34,7 +34,6 @@ export const mockActionTypes = [ export const mockConnectors: AIConnector[] = [ { id: 'connectorId', - connectorTypeTitle: 'OpenAI', name: 'Captain Connector', isMissingSecrets: false, actionTypeId: '.gen-ai', @@ -48,7 +47,6 @@ export const mockConnectors: AIConnector[] = [ }, { id: 'c29c28a0-20fe-11ee-9306-a1f4d42ec542', - connectorTypeTitle: 'OpenAI', name: 'Professor Connector', isMissingSecrets: false, actionTypeId: '.gen-ai', diff --git a/x-pack/packages/kbn-elastic-assistant/impl/mock/conversation.ts b/x-pack/packages/kbn-elastic-assistant/impl/mock/conversation.ts index fc466a1f462fa..435e74c547256 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/mock/conversation.ts +++ b/x-pack/packages/kbn-elastic-assistant/impl/mock/conversation.ts @@ -18,12 +18,11 @@ export const alertConvo: Conversation = { content: 'You are a helpful, expert assistant who answers questions about Elastic Security. Do not answer questions unrelated to Elastic Security.\nIf you answer a question related to KQL or EQL, it should be immediately usable within an Elastic Security timeline; please always format the output correctly with back ticks. Any answer provided for Query DSL should also be usable in a security timeline. This means you should only ever include the "filter" portion of the query.\nUse the following context to answer questions:\n\nCONTEXT:\n"""\ndestination.ip,67bf8338-261a-4de6-b43e-d30b59e884a7\nhost.name,0b2e352b-35fc-47bd-a8d4-43019ed38a25\nkibana.alert.rule.name,critical hosts\nsource.ip,94277492-11f8-493b-9c52-c1c9ecd330d2\n"""\n\nEvaluate the event from the context above and format your output neatly in markdown syntax for my Elastic Security case.\nAdd your description, recommended actions and bulleted triage steps. Use the MITRE ATT&CK data provided to add more context and recommendations from MITRE, and hyperlink to the relevant pages on MITRE\'s website. Be sure to include the user and host risk score data from the context. Your response should include steps that point to Elastic Security specific features, including endpoint response actions, the Elastic Agent OSQuery manager integration (with example osquery queries), timelines and entity analytics and link to all the relevant Elastic Security documentation.', role: 'user', - timestamp: '7/18/2023, 10:39:11 AM', + timestamp: '2023-03-19T18:59:18.174Z', }, ], apiConfig: { connectorId: 'c29c28a0-20fe-11ee-9306-a1f4d42ec542', - connectorTypeTitle: 'OpenAI', provider: OpenAiProviderType.OpenAi, }, replacements: [ @@ -42,7 +41,6 @@ export const emptyWelcomeConvo: Conversation = { replacements: [], apiConfig: { connectorId: 'c29c28a0-20fe-11ee-9306-a1f4d42ec542', - connectorTypeTitle: 'OpenAI', provider: OpenAiProviderType.OpenAi, }, }; @@ -54,13 +52,13 @@ export const welcomeConvo: Conversation = { content: 'You are a helpful, expert assistant who answers questions about Elastic Security. Do not answer questions unrelated to Elastic Security.\nIf you answer a question related to KQL or EQL, it should be immediately usable within an Elastic Security timeline; please always format the output correctly with back ticks. Any answer provided for Query DSL should also be usable in a security timeline. This means you should only ever include the "filter" portion of the query.\nUse the following context to answer questions:\n\n\n\nhow do i write host.name: * in EQL?', role: 'user', - timestamp: '7/17/2023, 1:00:36 PM', + timestamp: '2024-03-18T18:59:18.174Z', }, { role: 'assistant', content: "In EQL (Event Query Language), you can write the equivalent of `host.name: *` using the `exists` operator. Here's how you can write it:\n\n```\nexists(host.name)\n```\n\nThis query will match all events where the `host.name` field exists, effectively giving you the same result as `host.name: *`.", - timestamp: '7/17/2023, 1:00:40 PM', + timestamp: '2024-03-19T18:59:18.174Z', }, ], }; @@ -74,7 +72,6 @@ export const customConvo: Conversation = { replacements: [], apiConfig: { connectorId: 'c29c28a0-20fe-11ee-9306-a1f4d42ec542', - connectorTypeTitle: 'OpenAI', provider: OpenAiProviderType.OpenAi, }, }; diff --git a/x-pack/packages/ml/aiops_components/src/document_count_chart/document_count_chart.tsx b/x-pack/packages/ml/aiops_components/src/document_count_chart/document_count_chart.tsx index 3c8f3c46bb866..69134e2078601 100644 --- a/x-pack/packages/ml/aiops_components/src/document_count_chart/document_count_chart.tsx +++ b/x-pack/packages/ml/aiops_components/src/document_count_chart/document_count_chart.tsx @@ -436,7 +436,7 @@ export const DocumentCountChart: FC = (props) => {
boolean | undefined; +} + +/** + * Start has the same contract as Setup for now. + */ +export type AuthorizationServiceStart = AuthorizationServiceSetup; diff --git a/x-pack/packages/security/plugin_types_public/src/authorization/index.ts b/x-pack/packages/security/plugin_types_public/src/authorization/index.ts new file mode 100644 index 0000000000000..e00b9dc817909 --- /dev/null +++ b/x-pack/packages/security/plugin_types_public/src/authorization/index.ts @@ -0,0 +1,8 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +export type { AuthorizationServiceSetup, AuthorizationServiceStart } from './authorization_service'; diff --git a/x-pack/packages/security/plugin_types_public/src/plugin.ts b/x-pack/packages/security/plugin_types_public/src/plugin.ts index 28c5822a2e131..672be02cf38d4 100644 --- a/x-pack/packages/security/plugin_types_public/src/plugin.ts +++ b/x-pack/packages/security/plugin_types_public/src/plugin.ts @@ -7,6 +7,7 @@ import type { SecurityLicense } from '@kbn/security-plugin-types-common'; import type { AuthenticationServiceSetup, AuthenticationServiceStart } from './authentication'; +import type { AuthorizationServiceSetup, AuthorizationServiceStart } from './authorization'; import type { SecurityNavControlServiceStart } from './nav_control'; import type { UserProfileAPIClient } from './user_profile'; @@ -15,6 +16,10 @@ export interface SecurityPluginSetup { * Exposes authentication information about the currently logged in user. */ authc: AuthenticationServiceSetup; + /** + * Exposes authorization configuration. + */ + authz: AuthorizationServiceSetup; /** * Exposes information about the available security features under the current license. */ @@ -30,6 +35,10 @@ export interface SecurityPluginStart { * Exposes authentication information about the currently logged in user. */ authc: AuthenticationServiceStart; + /** + * Exposes authorization configuration. + */ + authz: AuthorizationServiceStart; /** * A set of methods to work with Kibana user profiles. */ diff --git a/x-pack/plugins/actions/server/application/connector/methods/get_all/get_all.test.ts b/x-pack/plugins/actions/server/application/connector/methods/get_all/get_all.test.ts index 2e264300490f8..2032653712a59 100644 --- a/x-pack/plugins/actions/server/application/connector/methods/get_all/get_all.test.ts +++ b/x-pack/plugins/actions/server/application/connector/methods/get_all/get_all.test.ts @@ -10,7 +10,10 @@ import { ActionsAuthorization } from '../../../../authorization/actions_authoriz import { connectorTokenClientMock } from '../../../../lib/connector_token_client.mock'; import { getOAuthJwtAccessToken } from '../../../../lib/get_oauth_jwt_access_token'; import { getOAuthClientCredentialsAccessToken } from '../../../../lib/get_oauth_client_credentials_access_token'; -import { savedObjectsClientMock } from '@kbn/core-saved-objects-api-server-mocks'; +import { + savedObjectsClientMock, + savedObjectsRepositoryMock, +} from '@kbn/core-saved-objects-api-server-mocks'; import { actionsAuthorizationMock } from '../../../../authorization/actions_authorization.mock'; import { elasticsearchServiceMock } from '@kbn/core-elasticsearch-server-mocks'; import { actionExecutorMock } from '../../../../lib/action_executor.mock'; @@ -21,6 +24,7 @@ import { loggingSystemMock } from '@kbn/core-logging-server-mocks'; import { Logger } from '@kbn/logging'; import { eventLogClientMock } from '@kbn/event-log-plugin/server/event_log_client.mock'; import { ActionTypeRegistry } from '../../../../action_type_registry'; +import { getAllUnsecured } from './get_all'; jest.mock('@kbn/core-saved-objects-utils-server', () => { const actual = jest.requireActual('@kbn/core-saved-objects-utils-server'); @@ -77,6 +81,7 @@ const logger = loggingSystemMock.create().get() as jest.Mocked; const eventLogClient = eventLogClientMock.create(); const getEventLogClient = jest.fn(); const connectorTokenClient = connectorTokenClientMock.create(); +const internalSavedObjectsRepository = savedObjectsRepositoryMock.create(); let actionsClient: ActionsClient; let actionTypeRegistry: ActionTypeRegistry; @@ -551,3 +556,447 @@ describe('getAll()', () => { ); }); }); + +describe('getAllUnsecured()', () => { + beforeEach(() => { + jest.resetAllMocks(); + jest.clearAllMocks(); + }); + + test('calls internalSavedObjectRepository with parameters and returns inMemoryConnectors correctly', async () => { + const expectedResult = { + total: 1, + per_page: 10, + page: 1, + saved_objects: [ + { + id: '1', + type: 'type', + attributes: { + name: 'test', + isMissingSecrets: false, + config: { + foo: 'bar', + }, + secrets: 'this should not be returned', + }, + score: 1, + references: [], + }, + ], + }; + internalSavedObjectsRepository.find.mockResolvedValueOnce(expectedResult); + scopedClusterClient.asInternalUser.search.mockResponse( + // @ts-expect-error not full search response + { + aggregations: { + '1': { doc_count: 6 }, + testPreconfigured: { doc_count: 2 }, + 'system-connector-.cases': { doc_count: 2 }, + }, + } + ); + + const result = await getAllUnsecured({ + esClient: scopedClusterClient.asInternalUser, + inMemoryConnectors: [ + { + id: 'testPreconfigured', + actionTypeId: '.slack', + secrets: {}, + isPreconfigured: true, + isDeprecated: false, + isSystemAction: false, + name: 'test', + config: { + foo: 'bar', + }, + }, + /** + * System actions will not + * be returned from getAllUnsecured + */ + { + id: 'system-connector-.cases', + actionTypeId: '.cases', + name: 'System action: .cases', + config: {}, + secrets: {}, + isDeprecated: false, + isMissingSecrets: false, + isPreconfigured: false, + isSystemAction: true, + }, + ], + internalSavedObjectsRepository, + kibanaIndices, + logger, + spaceId: 'default', + }); + + expect(result).toEqual([ + { + id: '1', + name: 'test', + isMissingSecrets: false, + config: { foo: 'bar' }, + isPreconfigured: false, + isDeprecated: false, + isSystemAction: false, + referencedByCount: 6, + }, + { + id: 'testPreconfigured', + actionTypeId: '.slack', + name: 'test', + isPreconfigured: true, + isSystemAction: false, + isDeprecated: false, + referencedByCount: 2, + }, + ]); + + expect(internalSavedObjectsRepository.find).toHaveBeenCalledWith({ + perPage: 10000, + type: 'action', + }); + + expect(scopedClusterClient.asInternalUser.search).toHaveBeenCalledWith({ + index: kibanaIndices, + ignore_unavailable: true, + body: { + aggs: { + '1': { + filter: { + bool: { + must: { + nested: { + path: 'references', + query: { + bool: { + filter: { + bool: { + must: [ + { + term: { + 'references.id': '1', + }, + }, + { + term: { + 'references.type': 'action', + }, + }, + ], + }, + }, + }, + }, + }, + }, + }, + }, + }, + testPreconfigured: { + filter: { + bool: { + must: { + nested: { + path: 'references', + query: { + bool: { + filter: { + bool: { + must: [ + { + term: { + 'references.id': 'testPreconfigured', + }, + }, + { + term: { + 'references.type': 'action', + }, + }, + ], + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + size: 0, + query: { + match_all: {}, + }, + }, + }); + + expect(auditLogger.log).not.toHaveBeenCalled(); + expect(authorization.ensureAuthorized).not.toHaveBeenCalled(); + }); + + test('passed custom space id if defined', async () => { + const expectedResult = { + total: 1, + per_page: 10, + page: 1, + saved_objects: [ + { + id: '1', + type: 'type', + attributes: { + name: 'test', + isMissingSecrets: false, + config: { + foo: 'bar', + }, + secrets: 'this should not be returned', + }, + score: 1, + references: [], + }, + ], + }; + internalSavedObjectsRepository.find.mockResolvedValueOnce(expectedResult); + scopedClusterClient.asInternalUser.search.mockResponse( + // @ts-expect-error not full search response + { + aggregations: { + '1': { doc_count: 6 }, + testPreconfigured: { doc_count: 2 }, + 'system-connector-.cases': { doc_count: 2 }, + }, + } + ); + + const result = await getAllUnsecured({ + esClient: scopedClusterClient.asInternalUser, + inMemoryConnectors: [ + { + id: 'testPreconfigured', + actionTypeId: '.slack', + secrets: {}, + isPreconfigured: true, + isDeprecated: false, + isSystemAction: false, + name: 'test', + config: { + foo: 'bar', + }, + }, + /** + * System actions will not + * be returned from getAllUnsecured + */ + { + id: 'system-connector-.cases', + actionTypeId: '.cases', + name: 'System action: .cases', + config: {}, + secrets: {}, + isDeprecated: false, + isMissingSecrets: false, + isPreconfigured: false, + isSystemAction: true, + }, + ], + internalSavedObjectsRepository, + kibanaIndices, + logger, + spaceId: 'custom', + }); + + expect(result).toEqual([ + { + id: '1', + name: 'test', + isMissingSecrets: false, + config: { foo: 'bar' }, + isPreconfigured: false, + isDeprecated: false, + isSystemAction: false, + referencedByCount: 6, + }, + { + id: 'testPreconfigured', + actionTypeId: '.slack', + name: 'test', + isPreconfigured: true, + isSystemAction: false, + isDeprecated: false, + referencedByCount: 2, + }, + ]); + + expect(internalSavedObjectsRepository.find).toHaveBeenCalledWith({ + perPage: 10000, + type: 'action', + namespaces: ['custom'], + }); + + expect(scopedClusterClient.asInternalUser.search).toHaveBeenCalledWith({ + index: kibanaIndices, + ignore_unavailable: true, + body: { + aggs: { + '1': { + filter: { + bool: { + must: { + nested: { + path: 'references', + query: { + bool: { + filter: { + bool: { + must: [ + { + term: { + 'references.id': '1', + }, + }, + { + term: { + 'references.type': 'action', + }, + }, + ], + }, + }, + }, + }, + }, + }, + }, + }, + }, + testPreconfigured: { + filter: { + bool: { + must: { + nested: { + path: 'references', + query: { + bool: { + filter: { + bool: { + must: [ + { + term: { + 'references.id': 'testPreconfigured', + }, + }, + { + term: { + 'references.type': 'action', + }, + }, + ], + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + size: 0, + query: { + match_all: {}, + }, + }, + }); + + expect(auditLogger.log).not.toHaveBeenCalled(); + expect(authorization.ensureAuthorized).not.toHaveBeenCalled(); + }); + + test('validates connectors before return', async () => { + internalSavedObjectsRepository.find.mockResolvedValueOnce({ + total: 1, + per_page: 10, + page: 1, + saved_objects: [ + { + id: '1', + type: 'type', + attributes: { + name: 'test', + isMissingSecrets: false, + config: { + foo: 'bar', + }, + }, + score: 1, + references: [], + }, + ], + }); + scopedClusterClient.asInternalUser.search.mockResponse( + // @ts-expect-error not full search response + { + aggregations: { + '1': { doc_count: 6 }, + testPreconfigured: { doc_count: 2 }, + }, + } + ); + + const result = await getAllUnsecured({ + esClient: scopedClusterClient.asInternalUser, + inMemoryConnectors: [ + { + id: 'testPreconfigured', + actionTypeId: '.slack', + secrets: {}, + isPreconfigured: true, + isDeprecated: false, + isSystemAction: false, + name: 'test', + config: { + foo: 'bar', + }, + }, + ], + internalSavedObjectsRepository, + kibanaIndices, + logger, + spaceId: 'default', + }); + + expect(result).toEqual([ + { + config: { + foo: 'bar', + }, + id: '1', + isDeprecated: false, + isMissingSecrets: false, + isPreconfigured: false, + isSystemAction: false, + name: 'test', + referencedByCount: 6, + }, + { + actionTypeId: '.slack', + id: 'testPreconfigured', + isDeprecated: false, + isPreconfigured: true, + isSystemAction: false, + name: 'test', + referencedByCount: 2, + }, + ]); + + expect(logger.warn).toHaveBeenCalledWith( + 'Error validating connector: 1, Error: [actionTypeId]: expected value of type [string] but got [undefined]' + ); + }); +}); diff --git a/x-pack/plugins/actions/server/application/connector/methods/get_all/get_all.ts b/x-pack/plugins/actions/server/application/connector/methods/get_all/get_all.ts index 8d764a9c632e0..9c3b9c13924fd 100644 --- a/x-pack/plugins/actions/server/application/connector/methods/get_all/get_all.ts +++ b/x-pack/plugins/actions/server/application/connector/methods/get_all/get_all.ts @@ -9,12 +9,28 @@ * Get all actions with in-memory connectors */ import * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import { AuditLogger } from '@kbn/security-plugin-types-server'; +import { ElasticsearchClient, Logger } from '@kbn/core/server'; +import { omit } from 'lodash'; +import { InMemoryConnector } from '../../../..'; +import { SavedObjectClientForFind } from '../../../../data/connector/types/params'; import { connectorWithExtraFindDataSchema } from '../../schemas'; import { findConnectorsSo, searchConnectorsSo } from '../../../../data/connector'; import { GetAllParams, InjectExtraFindDataParams } from './types'; import { ConnectorAuditAction, connectorAuditEvent } from '../../../../lib/audit_events'; import { connectorFromSavedObject, isConnectorDeprecated } from '../../lib'; import { ConnectorWithExtraFindData } from '../../types'; +import { GetAllUnsecuredParams } from './types/params'; + +interface GetAllHelperOpts { + auditLogger?: AuditLogger; + esClient: ElasticsearchClient; + inMemoryConnectors: InMemoryConnector[]; + kibanaIndices: string[]; + logger: Logger; + namespace?: string; + savedObjectsClient: SavedObjectClientForFind; +} export async function getAll({ context, @@ -32,28 +48,70 @@ export async function getAll({ throw error; } + return await getAllHelper({ + auditLogger: context.auditLogger, + esClient: context.scopedClusterClient.asInternalUser, + inMemoryConnectors: includeSystemActions + ? context.inMemoryConnectors + : context.inMemoryConnectors.filter((connector) => !connector.isSystemAction), + kibanaIndices: context.kibanaIndices, + logger: context.logger, + savedObjectsClient: context.unsecuredSavedObjectsClient, + }); +} + +export async function getAllUnsecured({ + esClient, + inMemoryConnectors, + internalSavedObjectsRepository, + kibanaIndices, + logger, + spaceId, +}: GetAllUnsecuredParams): Promise { + const namespace = spaceId && spaceId !== 'default' ? spaceId : undefined; + + const connectors = await getAllHelper({ + esClient, + // Unsecured execution does not currently support system actions so we filter them out + inMemoryConnectors: inMemoryConnectors.filter((connector) => !connector.isSystemAction), + kibanaIndices, + logger, + namespace, + savedObjectsClient: internalSavedObjectsRepository, + }); + + return connectors.map((connector) => omit(connector, 'secrets')); +} + +async function getAllHelper({ + auditLogger, + esClient, + inMemoryConnectors, + kibanaIndices, + logger, + namespace, + savedObjectsClient, +}: GetAllHelperOpts): Promise { const savedObjectsActions = ( - await findConnectorsSo({ unsecuredSavedObjectsClient: context.unsecuredSavedObjectsClient }) + await findConnectorsSo({ savedObjectsClient, namespace }) ).saved_objects.map((rawAction) => connectorFromSavedObject(rawAction, isConnectorDeprecated(rawAction.attributes)) ); - savedObjectsActions.forEach(({ id }) => - context.auditLogger?.log( - connectorAuditEvent({ - action: ConnectorAuditAction.FIND, - savedObject: { type: 'action', id }, - }) - ) - ); - - const inMemoryConnectorsFiltered = includeSystemActions - ? context.inMemoryConnectors - : context.inMemoryConnectors.filter((connector) => !connector.isSystemAction); + if (auditLogger) { + savedObjectsActions.forEach(({ id }) => + auditLogger.log( + connectorAuditEvent({ + action: ConnectorAuditAction.FIND, + savedObject: { type: 'action', id }, + }) + ) + ); + } const mergedResult = [ ...savedObjectsActions, - ...inMemoryConnectorsFiltered.map((inMemoryConnector) => ({ + ...inMemoryConnectors.map((inMemoryConnector) => ({ id: inMemoryConnector.id, actionTypeId: inMemoryConnector.actionTypeId, name: inMemoryConnector.name, @@ -64,8 +122,8 @@ export async function getAll({ ].sort((a, b) => a.name.localeCompare(b.name)); const connectors = await injectExtraFindData({ - kibanaIndices: context.kibanaIndices, - scopedClusterClient: context.scopedClusterClient, + kibanaIndices, + esClient, connectors: mergedResult, }); @@ -74,7 +132,7 @@ export async function getAll({ try { connectorWithExtraFindDataSchema.validate(connector); } catch (e) { - context.logger.warn(`Error validating connector: ${connector.id}, ${e}`); + logger.warn(`Error validating connector: ${connector.id}, ${e}`); } }); @@ -83,7 +141,7 @@ export async function getAll({ async function injectExtraFindData({ kibanaIndices, - scopedClusterClient, + esClient, connectors, }: InjectExtraFindDataParams): Promise { const aggs: Record = {}; @@ -121,7 +179,7 @@ async function injectExtraFindData({ }; } - const aggregationResult = await searchConnectorsSo({ scopedClusterClient, kibanaIndices, aggs }); + const aggregationResult = await searchConnectorsSo({ esClient, kibanaIndices, aggs }); return connectors.map((connector) => ({ ...connector, diff --git a/x-pack/plugins/actions/server/application/connector/methods/get_all/index.ts b/x-pack/plugins/actions/server/application/connector/methods/get_all/index.ts index dcbc4c6fbc957..5b3da65578d65 100644 --- a/x-pack/plugins/actions/server/application/connector/methods/get_all/index.ts +++ b/x-pack/plugins/actions/server/application/connector/methods/get_all/index.ts @@ -5,4 +5,4 @@ * 2.0. */ -export { getAll } from './get_all'; +export { getAll, getAllUnsecured } from './get_all'; diff --git a/x-pack/plugins/actions/server/application/connector/methods/get_all/types/params.ts b/x-pack/plugins/actions/server/application/connector/methods/get_all/types/params.ts index 4e5157a1fdce0..ca0afdb782f7d 100644 --- a/x-pack/plugins/actions/server/application/connector/methods/get_all/types/params.ts +++ b/x-pack/plugins/actions/server/application/connector/methods/get_all/types/params.ts @@ -5,7 +5,10 @@ * 2.0. */ -import { IScopedClusterClient } from '@kbn/core-elasticsearch-server'; +import { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; +import { ISavedObjectsRepository, Logger } from '@kbn/core/server'; +import { AuditLogger } from '@kbn/security-plugin/server'; +import { InMemoryConnector } from '../../../../..'; import { ActionsClientContext } from '../../../../../actions_client'; import { Connector } from '../../../types'; @@ -14,8 +17,18 @@ export interface GetAllParams { context: ActionsClientContext; } +export interface GetAllUnsecuredParams { + auditLogger?: AuditLogger; + esClient: ElasticsearchClient; + inMemoryConnectors: InMemoryConnector[]; + internalSavedObjectsRepository: ISavedObjectsRepository; + kibanaIndices: string[]; + logger: Logger; + spaceId: string; +} + export interface InjectExtraFindDataParams { kibanaIndices: string[]; - scopedClusterClient: IScopedClusterClient; + esClient: ElasticsearchClient; connectors: Connector[]; } diff --git a/x-pack/plugins/actions/server/create_unsecured_execute_function.test.ts b/x-pack/plugins/actions/server/create_unsecured_execute_function.test.ts index bce0647389396..aec25f34473cf 100644 --- a/x-pack/plugins/actions/server/create_unsecured_execute_function.test.ts +++ b/x-pack/plugins/actions/server/create_unsecured_execute_function.test.ts @@ -529,7 +529,7 @@ describe('bulkExecute()', () => { }, { id: '456', - actionTypeId: 'not-in-allowlist', + actionTypeId: '.index', config: {}, isPreconfigured: true, isDeprecated: false, @@ -554,7 +554,7 @@ describe('bulkExecute()', () => { }, ]) ).rejects.toThrowErrorMatchingInlineSnapshot( - `"not-in-allowlist actions cannot be scheduled for unsecured actions execution"` + `".index actions cannot be scheduled for unsecured actions execution"` ); } ); diff --git a/x-pack/plugins/actions/server/create_unsecured_execute_function.ts b/x-pack/plugins/actions/server/create_unsecured_execute_function.ts index a64a2494e5077..c37ca980867dd 100644 --- a/x-pack/plugins/actions/server/create_unsecured_execute_function.ts +++ b/x-pack/plugins/actions/server/create_unsecured_execute_function.ts @@ -10,6 +10,7 @@ import { TaskManagerStartContract } from '@kbn/task-manager-plugin/server'; import { ActionTypeRegistryContract as ConnectorTypeRegistryContract, InMemoryConnector, + UNALLOWED_FOR_UNSECURE_EXECUTION_CONNECTOR_TYPE_IDS, } from './types'; import { ACTION_TASK_PARAMS_SAVED_OBJECT_TYPE } from './constants/saved_objects'; import { ExecuteOptions as ActionExecutorOptions } from './lib/action_executor'; @@ -18,9 +19,6 @@ import { ExecutionResponseItem, ExecutionResponseType } from './create_execute_f import { ActionsConfigurationUtilities } from './actions_config'; import { hasReachedTheQueuedActionsLimit } from './lib/has_reached_queued_actions_limit'; -// This allowlist should only contain connector types that don't require API keys for -// execution. -const ALLOWED_CONNECTOR_TYPE_IDS = ['.email']; interface CreateBulkUnsecuredExecuteFunctionOptions { taskManager: TaskManagerStartContract; connectorTypeRegistry: ConnectorTypeRegistryContract; @@ -98,7 +96,7 @@ export function createBulkUnsecuredExecutionEnqueuerFunction({ connectorTypeRegistry.ensureActionTypeEnabled(actionTypeId); } - if (!ALLOWED_CONNECTOR_TYPE_IDS.includes(actionTypeId)) { + if (UNALLOWED_FOR_UNSECURE_EXECUTION_CONNECTOR_TYPE_IDS.includes(actionTypeId)) { throw new Error( `${actionTypeId} actions cannot be scheduled for unsecured actions execution` ); diff --git a/x-pack/plugins/actions/server/data/connector/find_connectors_so.ts b/x-pack/plugins/actions/server/data/connector/find_connectors_so.ts index da232f5b2aa83..238ae18a1b62b 100644 --- a/x-pack/plugins/actions/server/data/connector/find_connectors_so.ts +++ b/x-pack/plugins/actions/server/data/connector/find_connectors_so.ts @@ -9,10 +9,12 @@ import { FindConnectorsSoResult, FindConnectorsSoParams } from './types'; import { MAX_ACTIONS_RETURNED } from './constants'; export const findConnectorsSo = async ({ - unsecuredSavedObjectsClient, + savedObjectsClient, + namespace, }: FindConnectorsSoParams): Promise => { - return unsecuredSavedObjectsClient.find({ + return savedObjectsClient.find({ perPage: MAX_ACTIONS_RETURNED, type: 'action', + ...(namespace ? { namespaces: [namespace] } : {}), }); }; diff --git a/x-pack/plugins/actions/server/data/connector/search_connectors_so.ts b/x-pack/plugins/actions/server/data/connector/search_connectors_so.ts index 09d3ae3b532d9..ab549899348ae 100644 --- a/x-pack/plugins/actions/server/data/connector/search_connectors_so.ts +++ b/x-pack/plugins/actions/server/data/connector/search_connectors_so.ts @@ -8,11 +8,11 @@ import { SearchConnectorsSoParams } from './types'; export const searchConnectorsSo = async ({ - scopedClusterClient, + esClient, kibanaIndices, aggs, }: SearchConnectorsSoParams) => { - return scopedClusterClient.asInternalUser.search({ + return esClient.search({ index: kibanaIndices, ignore_unavailable: true, body: { diff --git a/x-pack/plugins/actions/server/data/connector/types/params.ts b/x-pack/plugins/actions/server/data/connector/types/params.ts index 73d8ea6dadd14..c23447fb37486 100644 --- a/x-pack/plugins/actions/server/data/connector/types/params.ts +++ b/x-pack/plugins/actions/server/data/connector/types/params.ts @@ -5,18 +5,21 @@ * 2.0. */ -import { IScopedClusterClient } from '@kbn/core-elasticsearch-server'; +import { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { SavedObjectsClientContract } from '@kbn/core-saved-objects-api-server'; +import { SavedObjectsClient } from '@kbn/core/server'; +export type SavedObjectClientForFind = Pick; export interface SearchConnectorsSoParams { kibanaIndices: string[]; - scopedClusterClient: IScopedClusterClient; + esClient: ElasticsearchClient; aggs: Record; } export interface FindConnectorsSoParams { - unsecuredSavedObjectsClient: SavedObjectsClientContract; + savedObjectsClient: SavedObjectClientForFind; + namespace?: string; } export interface GetConnectorSoParams { diff --git a/x-pack/plugins/actions/server/integration_tests/__snapshots__/connector_types.test.ts.snap b/x-pack/plugins/actions/server/integration_tests/__snapshots__/connector_types.test.ts.snap index 9b74e91c6eac5..cd582c8459ce7 100644 --- a/x-pack/plugins/actions/server/integration_tests/__snapshots__/connector_types.test.ts.snap +++ b/x-pack/plugins/actions/server/integration_tests/__snapshots__/connector_types.test.ts.snap @@ -3794,6 +3794,75 @@ Object { ], "type": "alternatives", }, + "otherFields": Object { + "flags": Object { + "default": null, + "error": [Function], + "presence": "optional", + }, + "matches": Array [ + Object { + "schema": Object { + "flags": Object { + "error": [Function], + }, + "rules": Array [ + Object { + "args": Object { + "key": Object { + "flags": Object { + "error": [Function], + }, + "rules": Array [ + Object { + "args": Object { + "method": [Function], + }, + "name": "custom", + }, + Object { + "args": Object { + "method": [Function], + }, + "name": "custom", + }, + ], + "type": "string", + }, + "value": Object { + "flags": Object { + "error": [Function], + }, + "type": "any", + }, + }, + "name": "entries", + }, + Object { + "args": Object { + "method": [Function], + }, + "name": "custom", + }, + ], + "type": "record", + }, + }, + Object { + "schema": Object { + "allow": Array [ + null, + ], + "flags": Object { + "error": [Function], + "only": true, + }, + "type": "any", + }, + }, + ], + "type": "alternatives", + }, "parent": Object { "flags": Object { "default": null, diff --git a/x-pack/plugins/actions/server/lib/action_execution_source.ts b/x-pack/plugins/actions/server/lib/action_execution_source.ts index 9701b759f981e..6df716ad19c54 100644 --- a/x-pack/plugins/actions/server/lib/action_execution_source.ts +++ b/x-pack/plugins/actions/server/lib/action_execution_source.ts @@ -11,6 +11,7 @@ export enum ActionExecutionSourceType { SAVED_OBJECT = 'SAVED_OBJECT', HTTP_REQUEST = 'HTTP_REQUEST', NOTIFICATION = 'NOTIFICATION', + BACKGROUND_TASK = 'BACKGROUND_TASK', } export interface ActionExecutionSource { @@ -20,6 +21,11 @@ export interface ActionExecutionSource { export type HttpRequestExecutionSource = ActionExecutionSource; export type SavedObjectExecutionSource = ActionExecutionSource>; +export interface BackgroundTaskSource { + taskId: string; + taskType: string; +} +export type BackgroundTaskExecutionSource = ActionExecutionSource; export interface NotificationSource { requesterId: string; connectorId: string; @@ -58,6 +64,15 @@ export function asNotificationExecutionSource( }; } +export function asBackgroundTaskExecutionSource( + source: BackgroundTaskSource +): BackgroundTaskExecutionSource { + return { + type: ActionExecutionSourceType.BACKGROUND_TASK, + source, + }; +} + export function isHttpRequestExecutionSource( executionSource?: ActionExecutionSource ): executionSource is HttpRequestExecutionSource { @@ -75,3 +90,9 @@ export function isNotificationExecutionSource( ): executionSource is NotificationExecutionSource { return executionSource?.type === ActionExecutionSourceType.NOTIFICATION; } + +export function isBackgroundTaskExecutionSource( + executionSource?: ActionExecutionSource +): executionSource is BackgroundTaskExecutionSource { + return executionSource?.type === ActionExecutionSourceType.BACKGROUND_TASK; +} diff --git a/x-pack/plugins/actions/server/lib/action_executor.mock.ts b/x-pack/plugins/actions/server/lib/action_executor.mock.ts index 50a721d9dadc4..4d11535d655a6 100644 --- a/x-pack/plugins/actions/server/lib/action_executor.mock.ts +++ b/x-pack/plugins/actions/server/lib/action_executor.mock.ts @@ -11,8 +11,8 @@ const createActionExecutorMock = () => { const mocked: jest.Mocked = { initialize: jest.fn(), execute: jest.fn().mockResolvedValue({ status: 'ok', actionId: '' }), + executeUnsecured: jest.fn().mockResolvedValue({ status: 'ok', actionId: '' }), logCancellation: jest.fn(), - getActionInfoInternal: jest.fn(), }; return mocked; }; diff --git a/x-pack/plugins/actions/server/lib/action_executor.test.ts b/x-pack/plugins/actions/server/lib/action_executor.test.ts index 6b59c14630ba1..703a431393048 100644 --- a/x-pack/plugins/actions/server/lib/action_executor.test.ts +++ b/x-pack/plugins/actions/server/lib/action_executor.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { KibanaRequest, SavedObjectsErrorHelpers } from '@kbn/core/server'; +import { KibanaRequest } from '@kbn/core/server'; import { schema } from '@kbn/config-schema'; import { ActionExecutor } from './action_executor'; import { actionTypeRegistryMock } from '../action_type_registry.mock'; @@ -13,9 +13,10 @@ import { encryptedSavedObjectsMock } from '@kbn/encrypted-saved-objects-plugin/s import { httpServerMock, loggingSystemMock } from '@kbn/core/server/mocks'; import { eventLoggerMock } from '@kbn/event-log-plugin/server/mocks'; import { spacesServiceMock } from '@kbn/spaces-plugin/server/spaces_service/spaces_service.mock'; -import { ActionType } from '../types'; +import { ActionType as ConnectorType } from '../types'; import { actionsAuthorizationMock, actionsMock } from '../mocks'; import { + asBackgroundTaskExecutionSource, asHttpRequestExecutionSource, asSavedObjectExecutionSource, } from './action_execution_source'; @@ -28,19 +29,29 @@ import { getErrorSource } from '@kbn/task-manager-plugin/server/task_running'; const actionExecutor = new ActionExecutor({ isESOCanEncrypt: true }); const services = actionsMock.createServices(); +const unsecuredServices = actionsMock.createUnsecuredServices(); const encryptedSavedObjectsClient = encryptedSavedObjectsMock.createClient(); -const actionTypeRegistry = actionTypeRegistryMock.create(); +const connectorTypeRegistry = actionTypeRegistryMock.create(); const eventLogger = eventLoggerMock.create(); +const CONNECTOR_ID = '1'; +const ACTION_EXECUTION_ID = '2'; +const ACTION_PARAMS = { foo: true }; + +const executeUnsecuredParams = { + actionExecutionId: ACTION_EXECUTION_ID, + actionId: CONNECTOR_ID, + params: ACTION_PARAMS, + spaceId: 'some-namespace', +}; + const executeParams = { - actionId: '1', - params: { - foo: true, - }, + actionExecutionId: ACTION_EXECUTION_ID, + actionId: CONNECTOR_ID, + params: ACTION_PARAMS, executionId: '123abc', request: {} as KibanaRequest, - actionExecutionId: '2', }; const spacesMock = spacesServiceMock.createStartContract(); @@ -51,12 +62,13 @@ const securityMockStart = securityMock.createStart(); const authorizationMock = actionsAuthorizationMock.create(); const getActionsAuthorizationWithRequest = jest.fn(); -actionExecutor.initialize({ +const actionExecutorInitializationParams = { logger: loggerMock, spaces: spacesMock, security: securityMockStart, getServices: () => services, - actionTypeRegistry, + getUnsecuredServices: () => unsecuredServices, + actionTypeRegistry: connectorTypeRegistry, encryptedSavedObjectsClient, eventLogger, getActionsAuthorizationWithRequest, @@ -78,1733 +90,1217 @@ actionExecutor.initialize({ { actionTypeId: '.cases', config: {}, - id: 'system-connector-.cases', - name: 'System action: .cases', - secrets: {}, - isPreconfigured: false, - isDeprecated: false, - isSystemAction: true, - }, - ], -}); - -beforeEach(() => { - jest.resetAllMocks(); - spacesMock.getSpaceId.mockReturnValue('some-namespace'); - loggerMock.get.mockImplementation(() => loggerMock); - const mockRealm = { name: 'default_native', type: 'native' }; - securityMockStart.authc.getCurrentUser.mockImplementation(() => ({ - authentication_realm: mockRealm, - authentication_provider: mockRealm, - authentication_type: 'realm', - lookup_realm: mockRealm, - elastic_cloud_user: true, - enabled: true, - profile_uid: '123', - roles: ['superuser'], - username: 'coolguy', - })); - - getActionsAuthorizationWithRequest.mockReturnValue(authorizationMock); -}); - -test('successfully executes', async () => { - const actionType: jest.Mocked = { - id: 'test', - name: 'Test', - minimumLicenseRequired: 'basic', - supportedFeatureIds: ['alerting'], - validate: { - config: { schema: schema.object({ bar: schema.boolean() }) }, - secrets: { schema: schema.object({ baz: schema.boolean() }) }, - params: { schema: schema.object({ foo: schema.boolean() }) }, - }, - executor: jest.fn(), - }; - const actionSavedObject = { - id: '1', - type: 'action', - attributes: { - name: '1', - actionTypeId: 'test', - config: { - bar: true, - }, - secrets: { - baz: true, - }, - isMissingSecrets: false, - }, - references: [], - }; - encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValueOnce(actionSavedObject); - actionTypeRegistry.get.mockReturnValueOnce(actionType); - await actionExecutor.execute(executeParams); - - expect(encryptedSavedObjectsClient.getDecryptedAsInternalUser).toHaveBeenCalledWith( - 'action', - '1', - { namespace: 'some-namespace' } - ); - - expect(actionTypeRegistry.get).toHaveBeenCalledWith('test'); - expect(actionTypeRegistry.isActionExecutable).toHaveBeenCalledWith('1', 'test', { - notifyUsage: true, - }); - - expect(actionType.executor).toHaveBeenCalledWith({ - actionId: '1', - services: expect.anything(), - config: { - bar: true, - }, - secrets: { - baz: true, - }, - params: { foo: true }, - logger: loggerMock, - }); - - expect(loggerMock.debug).toBeCalledWith('executing action test:1: 1'); - expect(eventLogger.logEvent.mock.calls).toMatchInlineSnapshot(` - Array [ - Array [ - Object { - "event": Object { - "action": "execute-start", - "kind": "action", - }, - "kibana": Object { - "action": Object { - "execution": Object { - "uuid": "2", - }, - "id": "1", - "name": "1", - }, - "alert": Object { - "rule": Object { - "execution": Object { - "uuid": "123abc", - }, - }, - }, - "saved_objects": Array [ - Object { - "id": "1", - "namespace": "some-namespace", - "rel": "primary", - "type": "action", - "type_id": "test", - }, - ], - "space_ids": Array [ - "some-namespace", - ], - }, - "message": "action started: test:1: 1", - }, - ], - Array [ - Object { - "event": Object { - "action": "execute", - "kind": "action", - "outcome": "success", - }, - "kibana": Object { - "action": Object { - "execution": Object { - "uuid": "2", - }, - "id": "1", - "name": "1", - }, - "alert": Object { - "rule": Object { - "execution": Object { - "uuid": "123abc", - }, - }, - }, - "saved_objects": Array [ - Object { - "id": "1", - "namespace": "some-namespace", - "rel": "primary", - "type": "action", - "type_id": "test", - }, - ], - "space_ids": Array [ - "some-namespace", - ], - }, - "message": "action executed: test:1: 1", - "user": Object { - "id": "123", - "name": "coolguy", - }, - }, - ], - ] - `); -}); - -test('successfully executes when http_request source is specified', async () => { - const actionType: jest.Mocked = { - id: 'test', - name: 'Test', - minimumLicenseRequired: 'basic', - supportedFeatureIds: ['alerting'], - validate: { - config: { schema: schema.object({ bar: schema.boolean() }) }, - secrets: { schema: schema.object({ baz: schema.boolean() }) }, - params: { schema: schema.object({ foo: schema.boolean() }) }, - }, - executor: jest.fn(), - }; - const actionSavedObject = { - id: '1', - type: 'action', - attributes: { - name: '1', - actionTypeId: 'test', - config: { - bar: true, - }, - secrets: { - baz: true, - }, - isMissingSecrets: false, - }, - references: [], - }; - encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValueOnce(actionSavedObject); - actionTypeRegistry.get.mockReturnValueOnce(actionType); - await actionExecutor.execute({ - ...executeParams, - source: asHttpRequestExecutionSource(httpServerMock.createKibanaRequest()), - }); - - expect(encryptedSavedObjectsClient.getDecryptedAsInternalUser).toHaveBeenCalledWith( - 'action', - '1', - { namespace: 'some-namespace' } - ); - - expect(actionTypeRegistry.get).toHaveBeenCalledWith('test'); - expect(actionTypeRegistry.isActionExecutable).toHaveBeenCalledWith('1', 'test', { - notifyUsage: true, - }); - - expect(actionType.executor).toHaveBeenCalledWith({ - actionId: '1', - services: expect.anything(), - config: { - bar: true, - }, - secrets: { - baz: true, - }, - params: { foo: true }, - logger: loggerMock, - source: { - source: expect.anything(), - type: 'HTTP_REQUEST', - }, - }); - - expect(loggerMock.debug).toBeCalledWith('executing action test:1: 1'); - expect(eventLogger.logEvent.mock.calls).toMatchInlineSnapshot(` - Array [ - Array [ - Object { - "event": Object { - "action": "execute-start", - "kind": "action", - }, - "kibana": Object { - "action": Object { - "execution": Object { - "source": "http_request", - "uuid": "2", - }, - "id": "1", - "name": "1", - }, - "alert": Object { - "rule": Object { - "execution": Object { - "uuid": "123abc", - }, - }, - }, - "saved_objects": Array [ - Object { - "id": "1", - "namespace": "some-namespace", - "rel": "primary", - "type": "action", - "type_id": "test", - }, - ], - "space_ids": Array [ - "some-namespace", - ], - }, - "message": "action started: test:1: 1", - }, - ], - Array [ - Object { - "event": Object { - "action": "execute", - "kind": "action", - "outcome": "success", - }, - "kibana": Object { - "action": Object { - "execution": Object { - "source": "http_request", - "uuid": "2", - }, - "id": "1", - "name": "1", - }, - "alert": Object { - "rule": Object { - "execution": Object { - "uuid": "123abc", - }, - }, - }, - "saved_objects": Array [ - Object { - "id": "1", - "namespace": "some-namespace", - "rel": "primary", - "type": "action", - "type_id": "test", - }, - ], - "space_ids": Array [ - "some-namespace", - ], - }, - "message": "action executed: test:1: 1", - "user": Object { - "id": "123", - "name": "coolguy", - }, - }, - ], - ] - `); -}); - -test('successfully executes when saved_object source is specified', async () => { - const actionType: jest.Mocked = { - id: 'test', - name: 'Test', - minimumLicenseRequired: 'basic', - supportedFeatureIds: ['alerting'], - validate: { - config: { schema: schema.object({ bar: schema.boolean() }) }, - secrets: { schema: schema.object({ baz: schema.boolean() }) }, - params: { schema: schema.object({ foo: schema.boolean() }) }, - }, - executor: jest.fn(), - }; - const actionSavedObject = { - id: '1', - type: 'action', - attributes: { - name: '1', - actionTypeId: 'test', - config: { - bar: true, - }, - secrets: { - baz: true, - }, - isMissingSecrets: false, - }, - references: [], - }; - encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValueOnce(actionSavedObject); - actionTypeRegistry.get.mockReturnValueOnce(actionType); - await actionExecutor.execute({ - ...executeParams, - source: asSavedObjectExecutionSource({ - id: '573891ae-8c48-49cb-a197-0cd5ec34a88b', - type: 'alert', - }), - }); - - expect(encryptedSavedObjectsClient.getDecryptedAsInternalUser).toHaveBeenCalledWith( - 'action', - '1', - { namespace: 'some-namespace' } - ); - - expect(actionTypeRegistry.get).toHaveBeenCalledWith('test'); - expect(actionTypeRegistry.isActionExecutable).toHaveBeenCalledWith('1', 'test', { - notifyUsage: true, - }); - - expect(actionType.executor).toHaveBeenCalledWith({ - actionId: '1', - services: expect.anything(), - config: { - bar: true, - }, - secrets: { - baz: true, - }, - params: { foo: true }, - logger: loggerMock, - source: { - source: { - id: '573891ae-8c48-49cb-a197-0cd5ec34a88b', - type: 'alert', - }, - type: 'SAVED_OBJECT', - }, - }); - - expect(loggerMock.debug).toBeCalledWith('executing action test:1: 1'); - expect(eventLogger.logEvent.mock.calls).toMatchInlineSnapshot(` - Array [ - Array [ - Object { - "event": Object { - "action": "execute-start", - "kind": "action", - }, - "kibana": Object { - "action": Object { - "execution": Object { - "source": "alert", - "uuid": "2", - }, - "id": "1", - "name": "1", - }, - "alert": Object { - "rule": Object { - "execution": Object { - "uuid": "123abc", - }, - }, - }, - "saved_objects": Array [ - Object { - "id": "1", - "namespace": "some-namespace", - "rel": "primary", - "type": "action", - "type_id": "test", - }, - ], - "space_ids": Array [ - "some-namespace", - ], - }, - "message": "action started: test:1: 1", - }, - ], - Array [ - Object { - "event": Object { - "action": "execute", - "kind": "action", - "outcome": "success", - }, - "kibana": Object { - "action": Object { - "execution": Object { - "source": "alert", - "uuid": "2", - }, - "id": "1", - "name": "1", - }, - "alert": Object { - "rule": Object { - "execution": Object { - "uuid": "123abc", - }, - }, - }, - "saved_objects": Array [ - Object { - "id": "1", - "namespace": "some-namespace", - "rel": "primary", - "type": "action", - "type_id": "test", - }, - ], - "space_ids": Array [ - "some-namespace", - ], - }, - "message": "action executed: test:1: 1", - "user": Object { - "id": "123", - "name": "coolguy", - }, - }, - ], - ] - `); -}); - -test('successfully executes with preconfigured connector', async () => { - const actionType: jest.Mocked = { - id: 'test', - name: 'Test', - minimumLicenseRequired: 'basic', - supportedFeatureIds: ['alerting'], - validate: { - config: { schema: schema.object({ bar: schema.string() }) }, - secrets: { schema: schema.object({ apiKey: schema.string() }) }, - params: { schema: schema.object({ foo: schema.boolean() }) }, - }, - executor: jest.fn(), - }; - - actionTypeRegistry.get.mockReturnValueOnce(actionType); - await actionExecutor.execute({ ...executeParams, actionId: 'preconfigured' }); - - expect(encryptedSavedObjectsClient.getDecryptedAsInternalUser).not.toHaveBeenCalled(); - - expect(actionTypeRegistry.get).toHaveBeenCalledWith('test'); - expect(actionTypeRegistry.isActionExecutable).toHaveBeenCalledWith('preconfigured', 'test', { - notifyUsage: true, - }); - - expect(actionType.executor).toHaveBeenCalledWith({ - actionId: 'preconfigured', - services: expect.anything(), - config: { - bar: 'preconfigured', - }, - secrets: { - apiKey: 'abc', - }, - params: { foo: true }, - logger: loggerMock, - }); - - expect(loggerMock.debug).toBeCalledWith('executing action test:preconfigured: Preconfigured'); - expect(eventLogger.logEvent.mock.calls).toMatchInlineSnapshot(` - Array [ - Array [ - Object { - "event": Object { - "action": "execute-start", - "kind": "action", - }, - "kibana": Object { - "action": Object { - "execution": Object { - "uuid": "2", - }, - "id": "preconfigured", - "name": "Preconfigured", - }, - "alert": Object { - "rule": Object { - "execution": Object { - "uuid": "123abc", - }, - }, - }, - "saved_objects": Array [ - Object { - "id": "preconfigured", - "namespace": "some-namespace", - "rel": "primary", - "space_agnostic": true, - "type": "action", - "type_id": "test", - }, - ], - "space_ids": Array [ - "some-namespace", - ], - }, - "message": "action started: test:preconfigured: Preconfigured", - }, - ], - Array [ - Object { - "event": Object { - "action": "execute", - "kind": "action", - "outcome": "success", - }, - "kibana": Object { - "action": Object { - "execution": Object { - "uuid": "2", - }, - "id": "preconfigured", - "name": "Preconfigured", - }, - "alert": Object { - "rule": Object { - "execution": Object { - "uuid": "123abc", - }, - }, - }, - "saved_objects": Array [ - Object { - "id": "preconfigured", - "namespace": "some-namespace", - "rel": "primary", - "space_agnostic": true, - "type": "action", - "type_id": "test", - }, - ], - "space_ids": Array [ - "some-namespace", - ], - }, - "message": "action executed: test:preconfigured: Preconfigured", - "user": Object { - "id": "123", - "name": "coolguy", - }, - }, - ], - ] - `); -}); - -test('successfully executes with system connector', async () => { - const actionType: jest.Mocked = { - id: '.cases', - name: 'Cases', - minimumLicenseRequired: 'platinum', - supportedFeatureIds: ['alerting'], - isSystemActionType: true, - validate: { - config: { schema: schema.any() }, - secrets: { schema: schema.any() }, - params: { schema: schema.any() }, - }, - executor: jest.fn(), - }; - - actionTypeRegistry.get.mockReturnValueOnce(actionType); - await actionExecutor.execute({ ...executeParams, actionId: 'system-connector-.cases' }); - - expect(encryptedSavedObjectsClient.getDecryptedAsInternalUser).not.toHaveBeenCalled(); - - expect(actionTypeRegistry.get).toHaveBeenCalledWith('.cases'); - expect(actionTypeRegistry.isActionExecutable).toHaveBeenCalledWith( - 'system-connector-.cases', - '.cases', - { - notifyUsage: true, - } - ); - - expect(actionType.executor).toHaveBeenCalledWith({ - actionId: 'system-connector-.cases', - services: expect.anything(), - config: {}, - secrets: {}, - params: { foo: true }, - logger: loggerMock, - request: {}, - }); - - expect(loggerMock.debug).toBeCalledWith( - 'executing action .cases:system-connector-.cases: System action: .cases' - ); - expect(eventLogger.logEvent.mock.calls).toMatchInlineSnapshot(` - Array [ - Array [ - Object { - "event": Object { - "action": "execute-start", - "kind": "action", - }, - "kibana": Object { - "action": Object { - "execution": Object { - "uuid": "2", - }, - "id": "system-connector-.cases", - "name": "System action: .cases", - }, - "alert": Object { - "rule": Object { - "execution": Object { - "uuid": "123abc", - }, - }, - }, - "saved_objects": Array [ - Object { - "id": "system-connector-.cases", - "namespace": "some-namespace", - "rel": "primary", - "space_agnostic": true, - "type": "action", - "type_id": ".cases", - }, - ], - "space_ids": Array [ - "some-namespace", - ], - }, - "message": "action started: .cases:system-connector-.cases: System action: .cases", - }, - ], - Array [ - Object { - "event": Object { - "action": "execute", - "kind": "action", - "outcome": "success", - }, - "kibana": Object { - "action": Object { - "execution": Object { - "uuid": "2", - }, - "id": "system-connector-.cases", - "name": "System action: .cases", - }, - "alert": Object { - "rule": Object { - "execution": Object { - "uuid": "123abc", - }, - }, - }, - "saved_objects": Array [ - Object { - "id": "system-connector-.cases", - "namespace": "some-namespace", - "rel": "primary", - "space_agnostic": true, - "type": "action", - "type_id": ".cases", - }, - ], - "space_ids": Array [ - "some-namespace", - ], - }, - "message": "action executed: .cases:system-connector-.cases: System action: .cases", - "user": Object { - "id": "123", - "name": "coolguy", - }, - }, - ], - ] - `); -}); - -test('passes the Kibana request on the executor of a system action', async () => { - const actionType: jest.Mocked = { - id: '.cases', - name: 'Cases', - minimumLicenseRequired: 'platinum', - supportedFeatureIds: ['alerting'], - isSystemActionType: true, - validate: { - config: { schema: schema.any() }, - secrets: { schema: schema.any() }, - params: { schema: schema.any() }, - }, - executor: jest.fn(), - }; - - actionTypeRegistry.get.mockReturnValueOnce(actionType); - await actionExecutor.execute({ ...executeParams, actionId: 'system-connector-.cases' }); - - expect(actionType.executor).toHaveBeenCalledWith({ - actionId: 'system-connector-.cases', - services: expect.anything(), - config: {}, - secrets: {}, - params: { foo: true }, - logger: loggerMock, - request: {}, - }); -}); - -test('does not pass the Kibana request on the executor if the action is not a system action', async () => { - const actionType: jest.Mocked = { - id: 'test', - name: 'Test', - minimumLicenseRequired: 'basic', - supportedFeatureIds: ['alerting'], - validate: { - config: { schema: schema.object({ bar: schema.boolean() }) }, - secrets: { schema: schema.object({ baz: schema.boolean() }) }, - params: { schema: schema.object({ foo: schema.boolean() }) }, - }, - executor: jest.fn(), - }; - - const actionSavedObject = { - id: '1', - type: 'action', - attributes: { - name: '1', - actionTypeId: 'test', - config: { - bar: true, - }, - secrets: { - baz: true, - }, - isMissingSecrets: false, - }, - references: [], - }; - - encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValueOnce(actionSavedObject); - actionTypeRegistry.get.mockReturnValueOnce(actionType); - await actionExecutor.execute(executeParams); - - const args = actionType.executor.mock.calls[0][0]; - - expect(args.request).toBeUndefined(); -}); - -test('successfully authorize system actions', async () => { - const actionType: jest.Mocked = { - id: '.cases', - name: 'Cases', - minimumLicenseRequired: 'platinum', - supportedFeatureIds: ['alerting'], - getKibanaPrivileges: () => ['test/create'], - isSystemActionType: true, - validate: { - config: { schema: schema.any() }, - secrets: { schema: schema.any() }, - params: { schema: schema.any() }, - }, - executor: jest.fn(), - }; - - actionTypeRegistry.get.mockReturnValueOnce(actionType); - actionTypeRegistry.isSystemActionType.mockReturnValueOnce(true); - actionTypeRegistry.getSystemActionKibanaPrivileges.mockReturnValueOnce(['test/create']); - - await actionExecutor.execute({ ...executeParams, actionId: 'system-connector-.cases' }); - - expect(authorizationMock.ensureAuthorized).toBeCalledWith({ - actionTypeId: '.cases', - operation: 'execute', - additionalPrivileges: ['test/create'], - }); -}); - -test('actionType Executor returns status "error" and an error message', async () => { - const actionType: jest.Mocked = { - id: 'test', - name: 'Test', - minimumLicenseRequired: 'basic', - supportedFeatureIds: ['alerting'], - validate: { - config: { schema: schema.any() }, - secrets: { schema: schema.any() }, - params: { schema: schema.any() }, - }, - executor: jest.fn().mockReturnValue({ - actionId: 'test', - status: 'error', - message: 'test error message', - retry: true, - }), - }; - const actionSavedObject = { - id: '1', - type: 'action', - attributes: { - name: '1', - actionTypeId: 'test', - config: { - bar: true, - }, - secrets: { - baz: true, - }, - isMissingSecrets: false, - }, - references: [], - }; - encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValueOnce(actionSavedObject); - actionTypeRegistry.get.mockReturnValueOnce(actionType); - const result = await actionExecutor.execute(executeParams); - - expect(result).toEqual({ - actionId: 'test', - errorSource: TaskErrorSource.USER, - message: 'test error message', - retry: true, - status: 'error', - }); -}); - -test('Execute of SentinelOne sub-actions require create privilege', async () => { - const actionType: jest.Mocked = { - id: '.sentinelone', - name: 'sentinelone', - minimumLicenseRequired: 'enterprise', - supportedFeatureIds: [SecurityConnectorFeatureId], - validate: { - config: { schema: schema.any() }, - secrets: { schema: schema.any() }, - params: { schema: schema.any() }, - }, - executor: jest.fn(), - }; - const actionSavedObject = { - id: '1', - type: 'action', - attributes: { - name: '1', - actionTypeId: '.sentinelone', - config: { - bar: true, - }, - secrets: { - baz: true, - }, - isMissingSecrets: false, - }, - references: [], - }; - - encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValueOnce(actionSavedObject); - actionTypeRegistry.get.mockReturnValueOnce(actionType); - - await actionExecutor.execute({ ...executeParams, actionId: 'sentinel-one-connector-authz' }); - - expect(authorizationMock.ensureAuthorized).toHaveBeenCalledWith({ - operation: 'execute', - actionTypeId: '.sentinelone', - }); -}); - -test('pass the params to the actionTypeRegistry when authorizing system actions', async () => { - const actionType: jest.Mocked = { - id: '.cases', - name: 'Cases', - minimumLicenseRequired: 'platinum', - supportedFeatureIds: ['alerting'], - getKibanaPrivileges: () => ['test/create'], - isSystemActionType: true, - validate: { - config: { schema: schema.any() }, - secrets: { schema: schema.any() }, - params: { schema: schema.any() }, - }, - executor: jest.fn(), - }; - - actionTypeRegistry.get.mockReturnValueOnce(actionType); - actionTypeRegistry.isSystemActionType.mockReturnValueOnce(true); - actionTypeRegistry.getSystemActionKibanaPrivileges.mockReturnValueOnce(['test/create']); - - await actionExecutor.execute({ - ...executeParams, - params: { foo: 'bar' }, - actionId: 'system-connector-.cases', - }); - - expect(actionTypeRegistry.getSystemActionKibanaPrivileges).toHaveBeenCalledWith('.cases', { - foo: 'bar', - }); - - expect(authorizationMock.ensureAuthorized).toBeCalledWith({ - actionTypeId: '.cases', - operation: 'execute', - additionalPrivileges: ['test/create'], - }); -}); - -test('does not authorize non system actions', async () => { - const actionType: jest.Mocked = { - id: 'test', - name: 'Test', - minimumLicenseRequired: 'basic', - supportedFeatureIds: ['alerting'], - validate: { - config: { schema: schema.object({ bar: schema.string() }) }, - secrets: { schema: schema.object({ apiKey: schema.string() }) }, - params: { schema: schema.object({ foo: schema.boolean() }) }, - }, - executor: jest.fn(), - }; - - actionTypeRegistry.get.mockReturnValueOnce(actionType); - actionTypeRegistry.isSystemActionType.mockReturnValueOnce(false); - - await actionExecutor.execute({ ...executeParams, actionId: 'preconfigured' }); - - expect(authorizationMock.ensureAuthorized).not.toBeCalled(); -}); - -test('successfully executes as a task', async () => { - const actionType: jest.Mocked = { - id: 'test', - name: 'Test', - minimumLicenseRequired: 'basic', - supportedFeatureIds: ['alerting'], - validate: { - config: { schema: schema.object({ bar: schema.boolean() }) }, - secrets: { schema: schema.object({ baz: schema.boolean() }) }, - params: { schema: schema.object({ foo: schema.boolean() }) }, - }, - executor: jest.fn(), - }; - const actionSavedObject = { - id: '1', - type: 'action', - attributes: { - name: '1', - actionTypeId: 'test', - isMissingSecrets: false, - config: { - bar: true, - }, - secrets: { - baz: true, - }, - }, - references: [], - }; - encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValueOnce(actionSavedObject); - actionTypeRegistry.get.mockReturnValueOnce(actionType); - - const scheduleDelay = 10000; // milliseconds - const scheduled = new Date(Date.now() - scheduleDelay); - const attempts = 1; - await actionExecutor.execute({ - ...executeParams, - taskInfo: { - scheduled, - attempts, - }, - }); - - const eventTask = eventLogger.logEvent.mock.calls[0][0]?.kibana?.task; - expect(eventTask).toBeDefined(); - expect(eventTask?.scheduled).toBe(scheduled.toISOString()); - expect(eventTask?.schedule_delay).toBeGreaterThanOrEqual(scheduleDelay * 1000 * 1000); - expect(eventTask?.schedule_delay).toBeLessThanOrEqual(2 * scheduleDelay * 1000 * 1000); -}); - -test('provides empty config when config and / or secrets is empty', async () => { - const actionType: jest.Mocked = { - id: 'test', - name: 'Test', - minimumLicenseRequired: 'basic', - supportedFeatureIds: ['alerting'], - validate: { - config: { schema: schema.object({}) }, - secrets: { schema: schema.object({}) }, - params: { schema: schema.object({ foo: schema.boolean() }) }, - }, - executor: jest.fn(), - }; - const actionSavedObject = { - id: '1', - type: 'action', - attributes: { - name: '1', - actionTypeId: 'test', - isMissingSecrets: false, - config: {}, - secrets: {}, - }, - references: [], - }; - encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValueOnce(actionSavedObject); - actionTypeRegistry.get.mockReturnValueOnce(actionType); - await actionExecutor.execute(executeParams); - - expect(actionType.executor).toHaveBeenCalledTimes(1); - const executorCall = actionType.executor.mock.calls[0][0]; - expect(executorCall.config).toMatchInlineSnapshot(`Object {}`); -}); - -test('throws an error when config is invalid', async () => { - const actionType: jest.Mocked = { - id: 'test', - name: 'Test', - minimumLicenseRequired: 'basic', - supportedFeatureIds: ['alerting'], - validate: { - secrets: { schema: schema.object({}) }, - params: { schema: schema.object({ foo: schema.boolean() }) }, - config: { - schema: schema.object({ - param1: schema.string(), - }), - }, - }, - executor: jest.fn(), - }; - const actionSavedObject = { - id: '1', - type: 'action', - attributes: { - name: '1', - actionTypeId: 'test', - }, - references: [], - }; - encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValueOnce(actionSavedObject); - actionTypeRegistry.get.mockReturnValueOnce(actionType); - - const result = await actionExecutor.execute(executeParams); - expect(result).toEqual({ - actionId: '1', - status: 'error', - retry: false, - message: `error validating action type config: [param1]: expected value of type [string] but got [undefined]`, - errorSource: TaskErrorSource.FRAMEWORK, - }); -}); - -test('returns an error when connector is invalid', async () => { - const actionType: jest.Mocked = { - id: 'test', - name: 'Test', - minimumLicenseRequired: 'basic', - supportedFeatureIds: ['alerting'], - validate: { - secrets: { schema: schema.object({}) }, - config: { schema: schema.object({}) }, - params: { schema: schema.object({ foo: schema.boolean() }) }, - connector: () => { - return 'error'; - }, - }, - executor: jest.fn(), - }; - const actionSavedObject = { - id: '1', - type: 'action', - attributes: { - name: '1', - actionTypeId: 'test', - isMissingSecrets: false, - secrets: {}, - }, - references: [], - }; - encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValueOnce(actionSavedObject); - actionTypeRegistry.get.mockReturnValueOnce(actionType); - - const result = await actionExecutor.execute(executeParams); - expect(result).toEqual({ - actionId: '1', - status: 'error', - retry: false, - message: `error validating action type connector: config must be defined`, - errorSource: TaskErrorSource.FRAMEWORK, - }); -}); - -test('throws an error when params is invalid', async () => { - const actionType: jest.Mocked = { - id: 'test', - name: 'Test', - minimumLicenseRequired: 'basic', - supportedFeatureIds: ['alerting'], - validate: { - config: { schema: schema.object({}) }, - secrets: { schema: schema.object({}) }, - params: { - schema: schema.object({ - param1: schema.string(), - }), - }, - }, - executor: jest.fn(), - }; - const actionSavedObject = { - id: '1', - type: 'action', - attributes: { - name: '1', - actionTypeId: 'test', - }, - references: [], - }; - encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValueOnce(actionSavedObject); - actionTypeRegistry.get.mockReturnValueOnce(actionType); - - const result = await actionExecutor.execute(executeParams); - expect(result).toEqual({ - actionId: '1', - status: 'error', - retry: false, - message: `error validating action params: [param1]: expected value of type [string] but got [undefined]`, - errorSource: TaskErrorSource.FRAMEWORK, - }); -}); - -test('throws an error when failing to load action through savedObjectsClient', async () => { - encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockRejectedValueOnce( - new Error('No access') - ); - - try { - await actionExecutor.execute(executeParams); - } catch (e) { - expect(e.message).toBe('No access'); - expect(getErrorSource(e)).toBe(TaskErrorSource.FRAMEWORK); - } -}); - -test('throws a USER error when the action SO is not found', async () => { - encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockRejectedValueOnce( - SavedObjectsErrorHelpers.createGenericNotFoundError() - ); - - try { - await actionExecutor.execute(executeParams); - } catch (e) { - expect(e.message).toBe('Not Found'); - expect(getErrorSource(e)).toBe(TaskErrorSource.USER); - } -}); - -test('throws an error if actionType is not enabled', async () => { - const actionType: jest.Mocked = { - id: 'test', - name: 'Test', - minimumLicenseRequired: 'basic', - supportedFeatureIds: ['alerting'], - validate: { - config: { schema: schema.object({}) }, - secrets: { schema: schema.object({}) }, - params: { schema: schema.object({}) }, - }, - executor: jest.fn(), - }; - const actionSavedObject = { - id: '1', - type: 'action', - attributes: { - name: '1', - actionTypeId: 'test', - }, - references: [], - }; - encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValueOnce(actionSavedObject); - actionTypeRegistry.get.mockReturnValueOnce(actionType); - actionTypeRegistry.ensureActionTypeEnabled.mockImplementationOnce(() => { - throw new Error('not enabled for test'); - }); - - try { - await actionExecutor.execute(executeParams); - } catch (e) { - expect(e.message).toBe('not enabled for test'); - expect(getErrorSource(e)).toBe(TaskErrorSource.FRAMEWORK); - } - - expect(actionTypeRegistry.ensureActionTypeEnabled).toHaveBeenCalledWith('test'); -}); - -test('should not throws an error if actionType is preconfigured', async () => { - const actionType: jest.Mocked = { - id: 'test', - name: 'Test', - minimumLicenseRequired: 'basic', - supportedFeatureIds: ['alerting'], - validate: { - config: { schema: schema.object({ bar: schema.boolean() }) }, - secrets: { schema: schema.object({ baz: schema.boolean() }) }, - params: { schema: schema.object({ foo: schema.boolean() }) }, - }, - executor: jest.fn(), - }; - const actionSavedObject = { - id: '1', - type: 'action', - attributes: { - name: '1', - actionTypeId: 'test', - config: { - bar: true, - }, - secrets: { - baz: true, - }, - isMissingSecrets: false, + id: 'system-connector-.cases', + name: 'System action: .cases', + secrets: {}, + isPreconfigured: false, + isDeprecated: false, + isSystemAction: true, }, - references: [], - }; - encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValueOnce(actionSavedObject); - actionTypeRegistry.get.mockReturnValueOnce(actionType); - actionTypeRegistry.ensureActionTypeEnabled.mockImplementationOnce(() => { - throw new Error('not enabled for test'); - }); - actionTypeRegistry.isActionExecutable.mockImplementationOnce(() => true); - await actionExecutor.execute(executeParams); + ], +}; +actionExecutor.initialize(actionExecutorInitializationParams); + +const connectorType: jest.Mocked = { + id: 'test', + name: 'Test', + minimumLicenseRequired: 'basic', + supportedFeatureIds: ['alerting'], + validate: { + config: { schema: schema.object({ bar: schema.boolean() }) }, + secrets: { schema: schema.object({ baz: schema.boolean() }) }, + params: { schema: schema.object({ foo: schema.boolean() }) }, + }, + executor: jest.fn(), +}; - expect(actionTypeRegistry.ensureActionTypeEnabled).toHaveBeenCalledTimes(0); - expect(actionType.executor).toHaveBeenCalledWith({ - actionId: '1', - services: expect.anything(), +const systemConnectorType: jest.Mocked = { + id: '.cases', + name: 'Cases', + minimumLicenseRequired: 'platinum', + supportedFeatureIds: ['alerting'], + isSystemActionType: true, + validate: { + config: { schema: schema.any() }, + secrets: { schema: schema.any() }, + params: { schema: schema.any() }, + }, + executor: jest.fn(), +}; + +const connectorSavedObject = { + id: CONNECTOR_ID, + type: 'action', + attributes: { + name: '1', + actionTypeId: 'test', config: { bar: true, }, secrets: { baz: true, }, - params: { foo: true }, - logger: loggerMock, - }); -}); + isMissingSecrets: false, + }, + references: [], +}; -test('should not throws an error if actionType is system action', async () => { - const actionType: jest.Mocked = { - id: '.cases', - name: 'Cases', - minimumLicenseRequired: 'platinum', - supportedFeatureIds: ['alerting'], - isSystemActionType: true, - validate: { - config: { schema: schema.any() }, - secrets: { schema: schema.any() }, - params: { schema: schema.any() }, +const getBaseExecuteStartEventLogDoc = (unsecured: boolean) => { + return { + event: { + action: 'execute-start', + kind: 'action', + }, + kibana: { + action: { + execution: { + uuid: ACTION_EXECUTION_ID, + }, + id: CONNECTOR_ID, + name: '1', + }, + ...(unsecured + ? {} + : { + alert: { + rule: { + execution: { + uuid: '123abc', + }, + }, + }, + }), + saved_objects: [ + { + id: '1', + namespace: 'some-namespace', + rel: 'primary', + type: 'action', + type_id: 'test', + }, + ], + space_ids: ['some-namespace'], }, - executor: jest.fn(), + message: 'action started: test:1: 1', }; +}; - const actionSavedObject = { - id: '1', - type: 'action', - attributes: { - name: '1', - actionTypeId: '.cases', - config: {}, - secrets: {}, +const getBaseExecuteEventLogDoc = (unsecured: boolean) => { + const base = getBaseExecuteStartEventLogDoc(unsecured); + return { + ...base, + event: { + ...base.event, + action: 'execute', + outcome: 'success', + }, + message: 'action executed: test:1: 1', + user: { + ...(unsecured + ? {} + : { + id: '123', + name: 'coolguy', + }), }, - references: [], }; +}; - encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValueOnce(actionSavedObject); - actionTypeRegistry.get.mockReturnValueOnce(actionType); - actionTypeRegistry.ensureActionTypeEnabled.mockImplementationOnce(() => { - throw new Error('not enabled for test'); - }); - actionTypeRegistry.isActionExecutable.mockImplementationOnce(() => true); - await actionExecutor.execute(executeParams); - - expect(actionTypeRegistry.ensureActionTypeEnabled).toHaveBeenCalledTimes(0); - expect(actionType.executor).toHaveBeenCalledWith({ - actionId: '1', - services: expect.anything(), - config: {}, - secrets: {}, - params: { foo: true }, - logger: loggerMock, - request: {}, - }); -}); - -test('throws an error when passing isESOCanEncrypt with value of false', async () => { - const customActionExecutor = new ActionExecutor({ isESOCanEncrypt: false }); - customActionExecutor.initialize({ - logger: loggingSystemMock.create().get(), - spaces: spacesMock, - getServices: () => services, - actionTypeRegistry, - encryptedSavedObjectsClient, - eventLogger: eventLoggerMock.create(), - inMemoryConnectors: [], - getActionsAuthorizationWithRequest, - }); +beforeEach(() => { + jest.resetAllMocks(); + jest.clearAllMocks(); + spacesMock.getSpaceId.mockReturnValue('some-namespace'); + loggerMock.get.mockImplementation(() => loggerMock); + const mockRealm = { name: 'default_native', type: 'native' }; + securityMockStart.authc.getCurrentUser.mockImplementation(() => ({ + authentication_realm: mockRealm, + authentication_provider: mockRealm, + authentication_type: 'realm', + lookup_realm: mockRealm, + elastic_cloud_user: true, + enabled: true, + profile_uid: '123', + roles: ['superuser'], + username: 'coolguy', + })); - try { - await customActionExecutor.execute(executeParams); - } catch (e) { - expect(e.message).toBe( - 'Unable to execute action because the Encrypted Saved Objects plugin is missing encryption key. Please set xpack.encryptedSavedObjects.encryptionKey in the kibana.yml or use the bin/kibana-encryption-keys command.' - ); - expect(getErrorSource(e)).toBe(TaskErrorSource.USER); - } + getActionsAuthorizationWithRequest.mockReturnValue(authorizationMock); }); -test('should not throw error if action is preconfigured and isESOCanEncrypt is false', async () => { - const customActionExecutor = new ActionExecutor({ isESOCanEncrypt: false }); - customActionExecutor.initialize({ - logger: loggingSystemMock.create().get(), - spaces: spacesMock, - getServices: () => services, - actionTypeRegistry, - encryptedSavedObjectsClient, - eventLogger: eventLoggerMock.create(), - getActionsAuthorizationWithRequest, - inMemoryConnectors: [ - { - id: 'preconfigured', - name: 'Preconfigured', - actionTypeId: 'test', +describe('Action Executor', () => { + for (const executeUnsecure of [false, true]) { + const label = executeUnsecure ? 'executes unsecured' : 'executes'; + + test(`successfully ${label}`, async () => { + encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValueOnce( + connectorSavedObject + ); + connectorTypeRegistry.get.mockReturnValueOnce(connectorType); + + if (executeUnsecure) { + await actionExecutor.executeUnsecured(executeUnsecuredParams); + } else { + await actionExecutor.execute(executeParams); + } + + if (executeUnsecure) { + expect(spacesMock.getSpaceId).not.toHaveBeenCalled(); + expect(securityMockStart.authc.getCurrentUser).not.toHaveBeenCalled(); + } else { + expect(spacesMock.getSpaceId).toHaveBeenCalled(); + expect(securityMockStart.authc.getCurrentUser).toHaveBeenCalled(); + } + + expect(connectorTypeRegistry.isSystemActionType).toHaveBeenCalled(); + expect(encryptedSavedObjectsClient.getDecryptedAsInternalUser).toHaveBeenCalledWith( + 'action', + CONNECTOR_ID, + { namespace: 'some-namespace' } + ); + expect(authorizationMock.ensureAuthorized).not.toBeCalled(); + + expect(connectorTypeRegistry.get).toHaveBeenCalledWith('test'); + expect(connectorTypeRegistry.isActionExecutable).toHaveBeenCalledWith(CONNECTOR_ID, 'test', { + notifyUsage: true, + }); + + expect(connectorType.executor).toHaveBeenCalledWith({ + actionId: CONNECTOR_ID, + services: expect.anything(), config: { - bar: 'preconfigured', + bar: true, }, secrets: { - apiKey: 'abc', + baz: true, }, - isPreconfigured: true, - isDeprecated: false, - isSystemAction: false, - }, - ], - }); - const actionType: jest.Mocked = { - id: 'test', - name: 'Test', - minimumLicenseRequired: 'basic', - supportedFeatureIds: ['alerting'], - validate: { - config: { schema: schema.object({ bar: schema.string() }) }, - secrets: { schema: schema.object({ apiKey: schema.string() }) }, - params: { schema: schema.object({ foo: schema.boolean() }) }, - }, - executor: jest.fn(), - }; - - actionTypeRegistry.get.mockReturnValueOnce(actionType); - await actionExecutor.execute({ ...executeParams, actionId: 'preconfigured' }); + params: { foo: true }, + logger: loggerMock, + }); - expect(encryptedSavedObjectsClient.getDecryptedAsInternalUser).not.toHaveBeenCalled(); - - expect(actionTypeRegistry.get).toHaveBeenCalledWith('test'); - expect(actionTypeRegistry.isActionExecutable).toHaveBeenCalledWith('preconfigured', 'test', { - notifyUsage: true, - }); + expect(loggerMock.debug).toBeCalledWith('executing action test:1: 1'); + expect(eventLogger.logEvent).toHaveBeenCalledTimes(2); - expect(actionType.executor).toHaveBeenCalledWith({ - actionId: 'preconfigured', - services: expect.anything(), - config: { - bar: 'preconfigured', - }, - secrets: { - apiKey: 'abc', - }, - params: { foo: true }, - logger: loggerMock, - }); + const execStartDoc = getBaseExecuteStartEventLogDoc(executeUnsecure); + const execDoc = getBaseExecuteEventLogDoc(executeUnsecure); + expect(eventLogger.logEvent).toHaveBeenNthCalledWith(1, execStartDoc); + expect(eventLogger.logEvent).toHaveBeenNthCalledWith(2, execDoc); + }); - expect(loggerMock.debug).toBeCalledWith('executing action test:preconfigured: Preconfigured'); - expect(eventLogger.logEvent.mock.calls).toMatchInlineSnapshot(` - Array [ - Array [ - Object { - "event": Object { - "action": "execute-start", - "kind": "action", + for (const executionSource of [ + { + name: `http`, + sourceType: `http_request`, + source: asHttpRequestExecutionSource(httpServerMock.createKibanaRequest()), + }, + { + name: `saved_object`, + sourceType: `alert`, + source: asSavedObjectExecutionSource({ + id: '573891ae-8c48-49cb-a197-0cd5ec34a88b', + type: 'alert', + }), + }, + { + name: `background_task`, + sourceType: `background_task`, + source: asBackgroundTaskExecutionSource({ taskId: 'task:123', taskType: 'taskType' }), + }, + ]) { + test(`successfully ${label} with ${executionSource.name} source`, async () => { + encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValueOnce( + connectorSavedObject + ); + connectorTypeRegistry.get.mockReturnValueOnce(connectorType); + + if (executeUnsecure) { + await actionExecutor.executeUnsecured({ + ...executeUnsecuredParams, + source: executionSource.source, + }); + } else { + await actionExecutor.execute({ ...executeParams, source: executionSource.source }); + } + + expect(encryptedSavedObjectsClient.getDecryptedAsInternalUser).toHaveBeenCalledWith( + 'action', + CONNECTOR_ID, + { namespace: 'some-namespace' } + ); + + expect(connectorTypeRegistry.get).toHaveBeenCalledWith('test'); + expect(connectorTypeRegistry.isActionExecutable).toHaveBeenCalledWith( + CONNECTOR_ID, + 'test', + { + notifyUsage: true, + } + ); + + expect(connectorType.executor).toHaveBeenCalledWith({ + actionId: CONNECTOR_ID, + services: expect.anything(), + config: { + bar: true, + }, + secrets: { + baz: true, }, - "kibana": Object { - "action": Object { - "execution": Object { - "uuid": "2", + params: { foo: true }, + logger: loggerMock, + source: executionSource.source, + }); + + expect(loggerMock.debug).toBeCalledWith('executing action test:1: 1'); + expect(eventLogger.logEvent).toHaveBeenCalledTimes(2); + + const execStartDoc = getBaseExecuteStartEventLogDoc(executeUnsecure); + const execDoc = getBaseExecuteEventLogDoc(executeUnsecure); + expect(eventLogger.logEvent).toHaveBeenNthCalledWith(1, { + ...execStartDoc, + kibana: { + ...execStartDoc.kibana, + action: { + ...execStartDoc.kibana.action, + execution: { + ...execStartDoc.kibana.action.execution, + source: executionSource.sourceType, }, - "id": "preconfigured", - "name": "Preconfigured", }, - "alert": Object { - "rule": Object { - "execution": Object { - "uuid": "123abc", - }, + }, + }); + expect(eventLogger.logEvent).toHaveBeenNthCalledWith(2, { + ...execDoc, + kibana: { + ...execDoc.kibana, + + action: { + ...execDoc.kibana.action, + execution: { + ...execDoc.kibana.action.execution, + source: executionSource.sourceType, }, }, - "saved_objects": Array [ - Object { - "id": "preconfigured", - "namespace": "some-namespace", - "rel": "primary", - "space_agnostic": true, - "type": "action", - "type_id": "test", - }, - ], - "space_ids": Array [ - "some-namespace", - ], }, - "message": "action started: test:preconfigured: Preconfigured", + }); + }); + } + + test(`successfully ${label} with preconfigured connector`, async () => { + connectorTypeRegistry.get.mockReturnValueOnce({ + ...connectorType, + validate: { + config: { schema: schema.object({ bar: schema.string() }) }, + secrets: { schema: schema.object({ apiKey: schema.string() }) }, + params: { schema: schema.object({ foo: schema.boolean() }) }, }, - ], - Array [ - Object { - "event": Object { - "action": "execute", - "kind": "action", - "outcome": "success", + }); + + if (executeUnsecure) { + await actionExecutor.executeUnsecured({ + ...executeUnsecuredParams, + actionId: 'preconfigured', + }); + } else { + await actionExecutor.execute({ ...executeParams, actionId: 'preconfigured' }); + } + + expect(encryptedSavedObjectsClient.getDecryptedAsInternalUser).not.toHaveBeenCalled(); + + expect(connectorTypeRegistry.get).toHaveBeenCalledWith('test'); + expect(connectorTypeRegistry.isActionExecutable).toHaveBeenCalledWith( + 'preconfigured', + 'test', + { + notifyUsage: true, + } + ); + + expect(connectorType.executor).toHaveBeenCalledWith({ + actionId: 'preconfigured', + services: expect.anything(), + config: { + bar: 'preconfigured', + }, + secrets: { + apiKey: 'abc', + }, + params: { foo: true }, + logger: loggerMock, + }); + + expect(loggerMock.debug).toBeCalledWith('executing action test:preconfigured: Preconfigured'); + expect(eventLogger.logEvent).toHaveBeenCalledTimes(2); + + const execStartDoc = getBaseExecuteStartEventLogDoc(executeUnsecure); + const execDoc = getBaseExecuteEventLogDoc(executeUnsecure); + expect(eventLogger.logEvent).toHaveBeenNthCalledWith(1, { + ...execStartDoc, + kibana: { + ...execStartDoc.kibana, + action: { + ...execStartDoc.kibana.action, + id: 'preconfigured', + name: 'Preconfigured', }, - "kibana": Object { - "action": Object { - "execution": Object { - "uuid": "2", - }, - "id": "preconfigured", - "name": "Preconfigured", + saved_objects: [ + { + id: 'preconfigured', + namespace: 'some-namespace', + rel: 'primary', + type: 'action', + type_id: 'test', + space_agnostic: true, }, - "alert": Object { - "rule": Object { - "execution": Object { - "uuid": "123abc", - }, - }, + ], + }, + message: 'action started: test:preconfigured: Preconfigured', + }); + expect(eventLogger.logEvent).toHaveBeenNthCalledWith(2, { + ...execDoc, + kibana: { + ...execDoc.kibana, + action: { + ...execDoc.kibana.action, + id: 'preconfigured', + name: 'Preconfigured', + }, + saved_objects: [ + { + id: 'preconfigured', + namespace: 'some-namespace', + rel: 'primary', + type: 'action', + type_id: 'test', + space_agnostic: true, }, - "saved_objects": Array [ - Object { - "id": "preconfigured", - "namespace": "some-namespace", - "rel": "primary", - "space_agnostic": true, - "type": "action", - "type_id": "test", - }, - ], - "space_ids": Array [ - "some-namespace", - ], + ], + }, + message: 'action executed: test:preconfigured: Preconfigured', + }); + }); + + test(`${label} with system connector`, async () => { + connectorTypeRegistry.get.mockReturnValueOnce(systemConnectorType); + connectorTypeRegistry.isSystemActionType.mockReturnValueOnce(true); + + if (executeUnsecure) { + const result = await actionExecutor.executeUnsecured({ + ...executeUnsecuredParams, + actionId: 'system-connector-.cases', + }); + expect(result).toEqual({ + actionId: 'system-connector-.cases', + errorSource: 'user', + message: 'Cannot execute unsecured system action', + retry: false, + status: 'error', + }); + + expect(systemConnectorType.executor).not.toHaveBeenCalled(); + } else { + await actionExecutor.execute({ ...executeParams, actionId: 'system-connector-.cases' }); + + expect(systemConnectorType.executor).toHaveBeenCalledWith({ + actionId: 'system-connector-.cases', + services: expect.anything(), + config: {}, + secrets: {}, + params: { foo: true }, + logger: loggerMock, + request: {}, + }); + } + + expect(encryptedSavedObjectsClient.getDecryptedAsInternalUser).not.toHaveBeenCalled(); + expect(connectorTypeRegistry.get).toHaveBeenCalledWith('.cases'); + expect(connectorTypeRegistry.isActionExecutable).toHaveBeenCalledWith( + 'system-connector-.cases', + '.cases', + { + notifyUsage: true, + } + ); + expect(loggerMock.debug).toBeCalledWith( + 'executing action .cases:system-connector-.cases: System action: .cases' + ); + expect(eventLogger.logEvent).toHaveBeenCalledTimes(2); + + const execStartDoc = getBaseExecuteStartEventLogDoc(executeUnsecure); + const execDoc = getBaseExecuteEventLogDoc(executeUnsecure); + expect(eventLogger.logEvent).toHaveBeenNthCalledWith(1, { + ...execStartDoc, + kibana: { + ...execStartDoc.kibana, + action: { + ...execStartDoc.kibana.action, + id: 'system-connector-.cases', + name: 'System action: .cases', + }, + saved_objects: [ + { + id: 'system-connector-.cases', + namespace: 'some-namespace', + rel: 'primary', + type: 'action', + type_id: '.cases', + space_agnostic: true, + }, + ], + }, + message: 'action started: .cases:system-connector-.cases: System action: .cases', + }); + expect(eventLogger.logEvent).toHaveBeenNthCalledWith(2, { + ...execDoc, + ...(executeUnsecure + ? { error: { message: `Cannot execute unsecured system action` } } + : {}), + event: { + ...execDoc.event, + outcome: executeUnsecure ? 'failure' : 'success', + }, + kibana: { + ...execDoc.kibana, + action: { + ...execDoc.kibana.action, + id: 'system-connector-.cases', + name: 'System action: .cases', + }, + saved_objects: [ + { + id: 'system-connector-.cases', + namespace: 'some-namespace', + rel: 'primary', + type: 'action', + type_id: '.cases', + space_agnostic: true, + }, + ], + }, + message: `action ${ + executeUnsecure ? 'execution failure' : 'executed' + }: .cases:system-connector-.cases: System action: .cases`, + }); + }); + + test(`${label} should return error status with error message when executor returns an error`, async () => { + encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValueOnce( + connectorSavedObject + ); + connectorTypeRegistry.get.mockReturnValueOnce({ + ...connectorType, + executor: jest.fn().mockReturnValue({ + actionId: 'test', + status: 'error', + message: 'test error message', + retry: true, + }), + }); + + const result = executeUnsecure + ? await actionExecutor.executeUnsecured(executeUnsecuredParams) + : await actionExecutor.execute(executeParams); + + expect(result).toEqual({ + actionId: 'test', + errorSource: TaskErrorSource.USER, + message: 'test error message', + retry: true, + status: 'error', + }); + }); + + test(`${label} should handle SentinelOne connector type`, async () => { + const sentinelOneConnectorType: jest.Mocked = { + id: '.sentinelone', + name: 'sentinelone', + minimumLicenseRequired: 'enterprise', + supportedFeatureIds: [SecurityConnectorFeatureId], + validate: { + config: { schema: schema.any() }, + secrets: { schema: schema.any() }, + params: { schema: schema.any() }, + }, + executor: jest.fn(), + }; + const sentinelOneSavedObject = { + id: '1', + type: 'action', + attributes: { + name: '1', + actionTypeId: '.sentinelone', + config: { + bar: true, }, - "message": "action executed: test:preconfigured: Preconfigured", - "user": Object { - "id": "123", - "name": "coolguy", + secrets: { + baz: true, }, + isMissingSecrets: false, }, - ], - ] - `); -}); - -test('should not throw error if action is system action and isESOCanEncrypt is false', async () => { - const customActionExecutor = new ActionExecutor({ isESOCanEncrypt: false }); - customActionExecutor.initialize({ - logger: loggingSystemMock.create().get(), - spaces: spacesMock, - getServices: () => services, - actionTypeRegistry, - encryptedSavedObjectsClient, - eventLogger: eventLoggerMock.create(), - getActionsAuthorizationWithRequest, - inMemoryConnectors: [ - { - actionTypeId: '.cases', + references: [], + }; + + encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValueOnce( + sentinelOneSavedObject + ); + connectorTypeRegistry.get.mockReturnValueOnce(sentinelOneConnectorType); + + if (executeUnsecure) { + await actionExecutor.executeUnsecured({ + ...executeUnsecuredParams, + actionId: 'sentinel-one-connector-authz', + }); + expect(authorizationMock.ensureAuthorized).not.toHaveBeenCalled(); + } else { + await actionExecutor.execute({ + ...executeParams, + actionId: 'sentinel-one-connector-authz', + }); + expect(authorizationMock.ensureAuthorized).toHaveBeenCalledWith({ + operation: 'execute', + actionTypeId: '.sentinelone', + }); + } + }); + + test(`${label} with taskInfo`, async () => { + if (executeUnsecure) return; + + encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValueOnce( + connectorSavedObject + ); + connectorTypeRegistry.get.mockReturnValueOnce(connectorType); + const scheduleDelay = 10000; // milliseconds + const scheduled = new Date(Date.now() - scheduleDelay); + const attempts = 1; + await actionExecutor.execute({ + ...executeParams, + taskInfo: { + scheduled, + attempts, + }, + }); + + const eventTask = eventLogger.logEvent.mock.calls[0][0]?.kibana?.task; + expect(eventTask).toBeDefined(); + expect(eventTask?.scheduled).toBe(scheduled.toISOString()); + expect(eventTask?.schedule_delay).toBeGreaterThanOrEqual(scheduleDelay * 1000 * 1000); + expect(eventTask?.schedule_delay).toBeLessThanOrEqual(2 * scheduleDelay * 1000 * 1000); + }); + + test(`${label} provides empty config when config and/or secrets is empty`, async () => { + encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValueOnce({ + ...connectorSavedObject, + attributes: { + ...connectorSavedObject.attributes, + config: {}, + secrets: {}, + }, + }); + connectorTypeRegistry.get.mockReturnValueOnce({ + ...connectorType, + validate: { + config: { schema: schema.object({}) }, + secrets: { schema: schema.object({}) }, + params: { schema: schema.object({ foo: schema.boolean() }) }, + }, + }); + + if (executeUnsecure) { + await actionExecutor.executeUnsecured(executeUnsecuredParams); + } else { + await actionExecutor.execute(executeParams); + } + + expect(connectorType.executor).toHaveBeenCalledTimes(1); + const executorCall = connectorType.executor.mock.calls[0][0]; + expect(executorCall.config).toMatchInlineSnapshot(`Object {}`); + }); + + test(`${label} returns error when config is invalid`, async () => { + encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValueOnce({ + ...connectorSavedObject, + attributes: { + name: CONNECTOR_ID, + actionTypeId: 'test', + }, + }); + connectorTypeRegistry.get.mockReturnValueOnce({ + ...connectorType, + validate: { + secrets: { schema: schema.object({}) }, + params: { schema: schema.object({ foo: schema.boolean() }) }, + config: { + schema: schema.object({ + param1: schema.string(), + }), + }, + }, + }); + + const result = executeUnsecure + ? await actionExecutor.executeUnsecured(executeUnsecuredParams) + : await actionExecutor.execute(executeParams); + + expect(result).toEqual({ + actionId: '1', + status: 'error', + retry: false, + message: `error validating action type config: [param1]: expected value of type [string] but got [undefined]`, + errorSource: TaskErrorSource.FRAMEWORK, + }); + }); + + test(`${label} returns error when connector is invalid`, async () => { + encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValueOnce({ + ...connectorSavedObject, + attributes: { + name: CONNECTOR_ID, + actionTypeId: 'test', + isMissingSecrets: false, + secrets: {}, + }, + }); + connectorTypeRegistry.get.mockReturnValueOnce({ + ...connectorType, + validate: { + secrets: { schema: schema.object({}) }, + config: { schema: schema.object({}) }, + params: { schema: schema.object({ foo: schema.boolean() }) }, + connector: () => { + return 'error'; + }, + }, + }); + + const result = executeUnsecure + ? await actionExecutor.executeUnsecured(executeUnsecuredParams) + : await actionExecutor.execute(executeParams); + + expect(result).toEqual({ + actionId: '1', + status: 'error', + retry: false, + message: `error validating action type connector: config must be defined`, + errorSource: TaskErrorSource.FRAMEWORK, + }); + }); + + test(`${label} returns error when params are invalid`, async () => { + encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValueOnce({ + ...connectorSavedObject, + attributes: { + name: CONNECTOR_ID, + actionTypeId: 'test', + }, + }); + connectorTypeRegistry.get.mockReturnValueOnce({ + ...connectorType, + validate: { + config: { schema: schema.object({}) }, + secrets: { schema: schema.object({}) }, + params: { + schema: schema.object({ + param1: schema.string(), + }), + }, + }, + }); + + const result = executeUnsecure + ? await actionExecutor.executeUnsecured(executeUnsecuredParams) + : await actionExecutor.execute(executeParams); + + expect(result).toEqual({ + actionId: '1', + status: 'error', + retry: false, + message: `error validating action params: [param1]: expected value of type [string] but got [undefined]`, + errorSource: TaskErrorSource.FRAMEWORK, + }); + }); + + test(`${label} throws error when unable to read connector through saved object client`, async () => { + encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockRejectedValueOnce( + new Error('No access') + ); + + try { + if (executeUnsecure) { + await actionExecutor.executeUnsecured(executeUnsecuredParams); + } else { + await actionExecutor.execute(executeParams); + } + } catch (e) { + expect(e.message).toBe('No access'); + expect(getErrorSource(e)).toBe(TaskErrorSource.FRAMEWORK); + } + }); + + test(`${label} throws error if connector type is not enabled`, async () => { + encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValueOnce( + connectorSavedObject + ); + connectorTypeRegistry.get.mockReturnValueOnce(connectorType); + connectorTypeRegistry.ensureActionTypeEnabled.mockImplementationOnce(() => { + throw new Error('not enabled for test'); + }); + + try { + if (executeUnsecure) { + await actionExecutor.executeUnsecured(executeUnsecuredParams); + } else { + await actionExecutor.execute(executeParams); + } + } catch (e) { + expect(e.message).toBe('not enabled for test'); + expect(getErrorSource(e)).toBe(TaskErrorSource.FRAMEWORK); + } + }); + + test(`${label} does not throw error if connector type is not enabled but connector is preconfigured`, async () => { + encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValueOnce( + connectorSavedObject + ); + connectorTypeRegistry.get.mockReturnValueOnce(connectorType); + connectorTypeRegistry.ensureActionTypeEnabled.mockImplementationOnce(() => { + throw new Error('not enabled for test'); + }); + connectorTypeRegistry.isActionExecutable.mockImplementationOnce(() => true); + + if (executeUnsecure) { + await actionExecutor.executeUnsecured(executeUnsecuredParams); + } else { + await actionExecutor.execute(executeParams); + } + + expect(connectorTypeRegistry.ensureActionTypeEnabled).toHaveBeenCalledTimes(0); + expect(connectorType.executor).toHaveBeenCalledWith({ + actionId: '1', + services: expect.anything(), + config: { + bar: true, + }, + secrets: { + baz: true, + }, + params: { foo: true }, + logger: loggerMock, + }); + }); + + test(`${label} does not throw error if connector type is not enabled but connector is system action`, async () => { + if (executeUnsecure) return; + encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValueOnce({ + ...connectorSavedObject, + attributes: { + name: '1', + actionTypeId: '.cases', + config: {}, + secrets: {}, + }, + }); + connectorTypeRegistry.get.mockReturnValueOnce(systemConnectorType); + connectorTypeRegistry.ensureActionTypeEnabled.mockImplementationOnce(() => { + throw new Error('not enabled for test'); + }); + connectorTypeRegistry.isActionExecutable.mockImplementationOnce(() => true); + + await actionExecutor.execute(executeParams); + + expect(connectorTypeRegistry.ensureActionTypeEnabled).toHaveBeenCalledTimes(0); + expect(systemConnectorType.executor).toHaveBeenCalledWith({ + actionId: '1', + services: expect.anything(), config: {}, - id: 'system-connector-.cases', - name: 'System action: .cases', secrets: {}, - isPreconfigured: false, - isDeprecated: false, - isSystemAction: true, - }, - ], - }); + params: { foo: true }, + logger: loggerMock, + request: {}, + }); + }); + + test(`${label} throws error if isESOCanEncrypt is false`, async () => { + const customActionExecutor = new ActionExecutor({ isESOCanEncrypt: false }); + customActionExecutor.initialize({ + ...actionExecutorInitializationParams, + inMemoryConnectors: [], + }); + + try { + if (executeUnsecure) { + await customActionExecutor.executeUnsecured(executeUnsecuredParams); + } else { + await customActionExecutor.execute(executeParams); + } + } catch (e) { + expect(e.message).toBe( + 'Unable to execute action because the Encrypted Saved Objects plugin is missing encryption key. Please set xpack.encryptedSavedObjects.encryptionKey in the kibana.yml or use the bin/kibana-encryption-keys command.' + ); + expect(getErrorSource(e)).toBe(TaskErrorSource.USER); + } + }); + + test(`${label} does not throw error if isESOCanEncrypt is false but connector is preconfigured`, async () => { + const customActionExecutor = new ActionExecutor({ isESOCanEncrypt: false }); + customActionExecutor.initialize(actionExecutorInitializationParams); + + connectorTypeRegistry.get.mockReturnValueOnce({ + ...connectorType, + validate: { + config: { schema: schema.object({ bar: schema.string() }) }, + secrets: { schema: schema.object({ apiKey: schema.string() }) }, + params: { schema: schema.object({ foo: schema.boolean() }) }, + }, + }); + + if (executeUnsecure) { + await customActionExecutor.executeUnsecured({ + ...executeUnsecuredParams, + actionId: 'preconfigured', + }); + } else { + await customActionExecutor.execute({ ...executeParams, actionId: 'preconfigured' }); + } + + expect(encryptedSavedObjectsClient.getDecryptedAsInternalUser).not.toHaveBeenCalled(); + + expect(connectorTypeRegistry.get).toHaveBeenCalledWith('test'); + expect(connectorTypeRegistry.isActionExecutable).toHaveBeenCalledWith( + 'preconfigured', + 'test', + { + notifyUsage: true, + } + ); - const actionType: jest.Mocked = { - id: '.cases', - name: 'Cases', - minimumLicenseRequired: 'platinum', - supportedFeatureIds: ['alerting'], - isSystemActionType: true, - validate: { - config: { schema: schema.any() }, - secrets: { schema: schema.any() }, - params: { schema: schema.any() }, - }, - executor: jest.fn(), - }; + expect(connectorType.executor).toHaveBeenCalledWith({ + actionId: 'preconfigured', + services: expect.anything(), + config: { + bar: 'preconfigured', + }, + secrets: { + apiKey: 'abc', + }, + params: { foo: true }, + logger: loggerMock, + }); + + expect(loggerMock.debug).toBeCalledWith('executing action test:preconfigured: Preconfigured'); + expect(eventLogger.logEvent).toHaveBeenCalledTimes(2); + + const execStartDoc = getBaseExecuteStartEventLogDoc(executeUnsecure); + const execDoc = getBaseExecuteEventLogDoc(executeUnsecure); + expect(eventLogger.logEvent).toHaveBeenNthCalledWith(1, { + ...execStartDoc, + kibana: { + ...execStartDoc.kibana, + action: { + ...execStartDoc.kibana.action, + id: 'preconfigured', + name: 'Preconfigured', + }, + saved_objects: [ + { + id: 'preconfigured', + namespace: 'some-namespace', + rel: 'primary', + type: 'action', + type_id: 'test', + space_agnostic: true, + }, + ], + }, + message: 'action started: test:preconfigured: Preconfigured', + }); + expect(eventLogger.logEvent).toHaveBeenNthCalledWith(2, { + ...execDoc, + kibana: { + ...execDoc.kibana, + action: { + ...execDoc.kibana.action, + id: 'preconfigured', + name: 'Preconfigured', + }, + saved_objects: [ + { + id: 'preconfigured', + namespace: 'some-namespace', + rel: 'primary', + type: 'action', + type_id: 'test', + space_agnostic: true, + }, + ], + }, + message: 'action executed: test:preconfigured: Preconfigured', + }); + }); - actionTypeRegistry.get.mockReturnValueOnce(actionType); - await actionExecutor.execute({ ...executeParams, actionId: 'system-connector-.cases' }); + test(`${label} does not throw error if isESOCanEncrypt is false but connector is a system action`, async () => { + if (executeUnsecure) return; + const customActionExecutor = new ActionExecutor({ isESOCanEncrypt: false }); + customActionExecutor.initialize(actionExecutorInitializationParams); - expect(encryptedSavedObjectsClient.getDecryptedAsInternalUser).not.toHaveBeenCalled(); + connectorTypeRegistry.get.mockReturnValueOnce(systemConnectorType); + connectorTypeRegistry.isSystemActionType.mockReturnValueOnce(true); - expect(actionTypeRegistry.get).toHaveBeenCalledWith('.cases'); - expect(actionTypeRegistry.isActionExecutable).toHaveBeenCalledWith( - 'system-connector-.cases', - '.cases', - { - notifyUsage: true, - } - ); + await customActionExecutor.execute({ + ...executeParams, + actionId: 'system-connector-.cases', + }); - expect(actionType.executor).toHaveBeenCalledWith({ - actionId: 'system-connector-.cases', - services: expect.anything(), - config: {}, - secrets: {}, - params: { foo: true }, - logger: loggerMock, - request: {}, - }); + expect(encryptedSavedObjectsClient.getDecryptedAsInternalUser).not.toHaveBeenCalled(); - expect(loggerMock.debug).toBeCalledWith( - 'executing action .cases:system-connector-.cases: System action: .cases' - ); - expect(eventLogger.logEvent.mock.calls).toMatchInlineSnapshot(` - Array [ - Array [ - Object { - "event": Object { - "action": "execute-start", - "kind": "action", + expect(connectorTypeRegistry.get).toHaveBeenCalledWith('.cases'); + expect(connectorTypeRegistry.isActionExecutable).toHaveBeenCalledWith( + 'system-connector-.cases', + '.cases', + { + notifyUsage: true, + } + ); + + expect(systemConnectorType.executor).toHaveBeenCalledWith({ + actionId: 'system-connector-.cases', + services: expect.anything(), + config: {}, + secrets: {}, + params: { foo: true }, + logger: loggerMock, + request: {}, + }); + + expect(loggerMock.debug).toBeCalledWith( + 'executing action .cases:system-connector-.cases: System action: .cases' + ); + expect(eventLogger.logEvent).toHaveBeenCalledTimes(2); + + const execStartDoc = getBaseExecuteStartEventLogDoc(executeUnsecure); + const execDoc = getBaseExecuteEventLogDoc(executeUnsecure); + expect(eventLogger.logEvent).toHaveBeenNthCalledWith(1, { + ...execStartDoc, + kibana: { + ...execStartDoc.kibana, + action: { + ...execStartDoc.kibana.action, + id: 'system-connector-.cases', + name: 'System action: .cases', }, - "kibana": Object { - "action": Object { - "execution": Object { - "uuid": "2", - }, - "id": "system-connector-.cases", - "name": "System action: .cases", - }, - "alert": Object { - "rule": Object { - "execution": Object { - "uuid": "123abc", - }, - }, + saved_objects: [ + { + id: 'system-connector-.cases', + namespace: 'some-namespace', + rel: 'primary', + type: 'action', + type_id: '.cases', + space_agnostic: true, }, - "saved_objects": Array [ - Object { - "id": "system-connector-.cases", - "namespace": "some-namespace", - "rel": "primary", - "space_agnostic": true, - "type": "action", - "type_id": ".cases", - }, - ], - "space_ids": Array [ - "some-namespace", - ], - }, - "message": "action started: .cases:system-connector-.cases: System action: .cases", + ], }, - ], - Array [ - Object { - "event": Object { - "action": "execute", - "kind": "action", - "outcome": "success", + message: 'action started: .cases:system-connector-.cases: System action: .cases', + }); + expect(eventLogger.logEvent).toHaveBeenNthCalledWith(2, { + ...execDoc, + ...(executeUnsecure + ? { error: { message: `Cannot execute unsecured system action` } } + : {}), + event: { + ...execDoc.event, + outcome: executeUnsecure ? 'failure' : 'success', + }, + kibana: { + ...execDoc.kibana, + action: { + ...execDoc.kibana.action, + id: 'system-connector-.cases', + name: 'System action: .cases', }, - "kibana": Object { - "action": Object { - "execution": Object { - "uuid": "2", - }, - "id": "system-connector-.cases", - "name": "System action: .cases", - }, - "alert": Object { - "rule": Object { - "execution": Object { - "uuid": "123abc", - }, - }, + saved_objects: [ + { + id: 'system-connector-.cases', + namespace: 'some-namespace', + rel: 'primary', + type: 'action', + type_id: '.cases', + space_agnostic: true, }, - "saved_objects": Array [ - Object { - "id": "system-connector-.cases", - "namespace": "some-namespace", - "rel": "primary", - "space_agnostic": true, - "type": "action", - "type_id": ".cases", - }, - ], - "space_ids": Array [ - "some-namespace", - ], + ], + }, + message: `action ${ + executeUnsecure ? 'execution failure' : 'executed' + }: .cases:system-connector-.cases: System action: .cases`, + }); + }); + + test(`${label} does not log warning when executor succeeds`, async () => { + connectorType.executor.mockResolvedValueOnce({ + actionId: '1', + status: 'ok', + }); + encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValueOnce( + connectorSavedObject + ); + connectorTypeRegistry.get.mockReturnValueOnce(connectorType); + + if (executeUnsecure) { + await actionExecutor.executeUnsecured(executeUnsecuredParams); + } else { + await actionExecutor.execute(executeParams); + } + expect(loggerMock.warn).not.toBeCalled(); + }); + + test(`${label} logs warning when executor returns error gracefully`, async () => { + connectorType.executor.mockResolvedValueOnce({ + actionId: '1', + status: 'error', + message: 'message for action execution error', + serviceMessage: 'serviceMessage for action execution error', + }); + encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValueOnce( + connectorSavedObject + ); + connectorTypeRegistry.get.mockReturnValueOnce(connectorType); + + if (executeUnsecure) { + await actionExecutor.executeUnsecured(executeUnsecuredParams); + } else { + await actionExecutor.execute(executeParams); + } + expect(loggerMock.warn).toBeCalledWith( + 'action execution failure: test:1: 1: message for action execution error: serviceMessage for action execution error' + ); + }); + + test(`${label} logs warning and error when executor throws error`, async () => { + const err = new Error('this action execution is intended to fail'); + err.stack = 'foo error\n stack 1\n stack 2\n stack 3'; + connectorType.executor.mockRejectedValueOnce(err); + encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValueOnce( + connectorSavedObject + ); + connectorTypeRegistry.get.mockReturnValueOnce(connectorType); + + if (executeUnsecure) { + await actionExecutor.executeUnsecured(executeUnsecuredParams); + } else { + await actionExecutor.execute(executeParams); + } + expect(loggerMock.warn).toBeCalledWith( + 'action execution failure: test:1: 1: an error occurred while running the action: this action execution is intended to fail; retry: true' + ); + expect(loggerMock.error).toBeCalledWith(err, { + error: { stack_trace: 'foo error\n stack 1\n stack 2\n stack 3' }, + tags: ['test', '1', 'action-run-failed'], + }); + }); + + test(`${label} logs warning when executor returns invalid status`, async () => { + connectorType.executor.mockResolvedValueOnce({ + actionId: '1', + // @ts-expect-error + status: 'invalid-status', + message: 'message for action execution error', + serviceMessage: 'serviceMessage for action execution error', + }); + encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValueOnce( + connectorSavedObject + ); + connectorTypeRegistry.get.mockReturnValueOnce(connectorType); + + if (executeUnsecure) { + await actionExecutor.executeUnsecured(executeUnsecuredParams); + } else { + await actionExecutor.execute(executeParams); + } + expect(loggerMock.warn).toBeCalledWith( + 'action execution failure: test:1: 1: returned unexpected result "invalid-status"' + ); + }); + + test(`${label} with action type in UNALLOWED_FOR_UNSECURE_EXECUTION_CONNECTOR_TYPE_IDS list`, async () => { + encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValueOnce({ + ...connectorSavedObject, + attributes: { + ...connectorSavedObject.attributes, + actionTypeId: '.index', + }, + }); + connectorTypeRegistry.get.mockReturnValueOnce(connectorType); + if (executeUnsecure) { + const result = await actionExecutor.executeUnsecured(executeUnsecuredParams); + expect(result).toEqual({ + actionId: CONNECTOR_ID, + errorSource: 'user', + message: + 'Cannot execute unsecured ".index" action - execution of this type is not allowed', + retry: false, + status: 'error', + }); + expect(connectorType.executor).not.toHaveBeenCalled(); + } else { + await actionExecutor.execute(executeParams); + + expect(connectorType.executor).toHaveBeenCalledWith({ + actionId: CONNECTOR_ID, + services: expect.anything(), + config: { + bar: true, }, - "message": "action executed: .cases:system-connector-.cases: System action: .cases", - "user": Object { - "id": "123", - "name": "coolguy", + secrets: { + baz: true, }, - }, - ], - ] - `); + params: { foo: true }, + logger: loggerMock, + }); + } + }); + } }); -test('does not log warning when alert executor succeeds', async () => { - const executorMock = setupActionExecutorMock(); - executorMock.mockResolvedValue({ - actionId: '1', - status: 'ok', - }); - await actionExecutor.execute(executeParams); - expect(loggerMock.warn).not.toBeCalled(); -}); +describe('System actions', () => { + test('calls ensureAuthorized on system actions if additional privileges are specified', async () => { + connectorTypeRegistry.get.mockReturnValueOnce({ + ...systemConnectorType, + getKibanaPrivileges: () => ['test/create'], + }); + connectorTypeRegistry.isSystemActionType.mockReturnValueOnce(true); + connectorTypeRegistry.getSystemActionKibanaPrivileges.mockReturnValueOnce(['test/create']); -test('logs a warning when alert executor has an error', async () => { - const executorMock = setupActionExecutorMock(); - executorMock.mockResolvedValue({ - actionId: '1', - status: 'error', - message: 'message for action execution error', - serviceMessage: 'serviceMessage for action execution error', - }); - await actionExecutor.execute(executeParams); - expect(loggerMock.warn).toBeCalledWith( - 'action execution failure: test:1: action-1: message for action execution error: serviceMessage for action execution error' - ); -}); + await actionExecutor.execute({ ...executeParams, actionId: 'system-connector-.cases' }); -test('logs a warning and error when alert executor throws an error', async () => { - const executorMock = setupActionExecutorMock(); - const err = new Error('this action execution is intended to fail'); - err.stack = 'foo error\n stack 1\n stack 2\n stack 3'; - executorMock.mockRejectedValue(err); - await actionExecutor.execute(executeParams); - expect(loggerMock.warn).toBeCalledWith( - 'action execution failure: test:1: action-1: an error occurred while running the action: this action execution is intended to fail; retry: true' - ); - expect(loggerMock.error).toBeCalledWith(err, { - error: { stack_trace: 'foo error\n stack 1\n stack 2\n stack 3' }, - tags: ['test', '1', 'action-run-failed'], + expect(authorizationMock.ensureAuthorized).toBeCalledWith({ + actionTypeId: '.cases', + operation: 'execute', + additionalPrivileges: ['test/create'], + }); }); -}); -test('logs a warning when alert executor returns invalid status', async () => { - const executorMock = setupActionExecutorMock(); - // object typed as any as it has an invalid status value, but we want to test that - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const alertExecutionStatus: any = { - actionId: '1', - status: 'invalid-status', - message: 'message for action execution error', - serviceMessage: 'serviceMessage for action execution error', - }; - executorMock.mockResolvedValue(alertExecutionStatus); - await actionExecutor.execute(executeParams); - expect(loggerMock.warn).toBeCalledWith( - 'action execution failure: test:1: action-1: returned unexpected result "invalid-status"' - ); + test('pass the params to the connectorTypeRegistry when authorizing system actions', async () => { + connectorTypeRegistry.get.mockReturnValueOnce({ + ...systemConnectorType, + getKibanaPrivileges: () => ['test/create'], + }); + connectorTypeRegistry.isSystemActionType.mockReturnValueOnce(true); + connectorTypeRegistry.getSystemActionKibanaPrivileges.mockReturnValueOnce(['test/create']); + + await actionExecutor.execute({ + ...executeParams, + params: { foo: 'bar' }, + actionId: 'system-connector-.cases', + }); + + expect(connectorTypeRegistry.getSystemActionKibanaPrivileges).toHaveBeenCalledWith('.cases', { + foo: 'bar', + }); + + expect(authorizationMock.ensureAuthorized).toBeCalledWith({ + actionTypeId: '.cases', + operation: 'execute', + additionalPrivileges: ['test/create'], + }); + }); }); test('writes to event log for execute timeout', async () => { @@ -2130,19 +1626,11 @@ test('writes usage data to event log for streaming OpenAI events', async () => { function setupActionExecutorMock( actionTypeId = 'test', - validationOverride?: ActionType['validate'] + validationOverride?: ConnectorType['validate'] ) { - const actionType: jest.Mocked = { - id: 'test', - name: 'Test', - minimumLicenseRequired: 'basic', - supportedFeatureIds: ['alerting'], - validate: validationOverride || { - config: { schema: schema.object({ bar: schema.boolean() }) }, - secrets: { schema: schema.object({ baz: schema.boolean() }) }, - params: { schema: schema.object({ foo: schema.boolean() }) }, - }, - executor: jest.fn(), + const thisConnectorType: jest.Mocked = { + ...connectorType, + ...(validationOverride ? { validate: validationOverride } : {}), }; const actionSavedObject = { id: '1', @@ -2161,6 +1649,6 @@ function setupActionExecutorMock( references: [], }; encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValueOnce(actionSavedObject); - actionTypeRegistry.get.mockReturnValueOnce(actionType); - return actionType.executor; + connectorTypeRegistry.get.mockReturnValueOnce(thisConnectorType); + return thisConnectorType.executor; } diff --git a/x-pack/plugins/actions/server/lib/action_executor.ts b/x-pack/plugins/actions/server/lib/action_executor.ts index 9a8a17d612cf7..6ab2df73fec37 100644 --- a/x-pack/plugins/actions/server/lib/action_executor.ts +++ b/x-pack/plugins/actions/server/lib/action_executor.ts @@ -13,7 +13,7 @@ import { withSpan } from '@kbn/apm-utils'; import { EncryptedSavedObjectsClient } from '@kbn/encrypted-saved-objects-plugin/server'; import { SpacesServiceStart } from '@kbn/spaces-plugin/server'; import { IEventLogger, SAVED_OBJECT_REL_PRIMARY } from '@kbn/event-log-plugin/server'; -import { SecurityPluginStart } from '@kbn/security-plugin/server'; +import { AuthenticatedUser, SecurityPluginStart } from '@kbn/security-plugin/server'; import { createTaskRunError, TaskErrorSource } from '@kbn/task-manager-plugin/server'; import { getGenAiTokenTracking, shouldTrackGenAiToken } from './gen_ai_token_tracking'; import { @@ -30,8 +30,12 @@ import { ActionTypeRegistryContract, ActionTypeSecrets, GetServicesFunction, + GetUnsecuredServicesFunction, InMemoryConnector, RawAction, + Services, + UNALLOWED_FOR_UNSECURE_EXECUTION_CONNECTOR_TYPE_IDS, + UnsecuredServices, ValidatorServices, } from '../types'; import { EVENT_LOG_ACTIONS } from '../constants/event_log'; @@ -49,6 +53,7 @@ export interface ActionExecutorContext { spaces?: SpacesServiceStart; security?: SecurityPluginStart; getServices: GetServicesFunction; + getUnsecuredServices: GetUnsecuredServicesFunction; encryptedSavedObjectsClient: EncryptedSavedObjectsClient; actionTypeRegistry: ActionTypeRegistryContract; eventLogger: IEventLogger; @@ -62,19 +67,35 @@ export interface TaskInfo { } export interface ExecuteOptions { - actionId: string; actionExecutionId: string; + actionId: string; + consumer?: string; + executionId?: string; isEphemeral?: boolean; - request: KibanaRequest; params: Record; + relatedSavedObjects?: RelatedSavedObjects; + request: KibanaRequest; source?: ActionExecutionSource; taskInfo?: TaskInfo; - actionInfo?: ActionInfo; - executionId?: string; - consumer?: string; - relatedSavedObjects?: RelatedSavedObjects; } +type ExecuteHelperOptions = Omit, 'request'> & { + currentUser?: AuthenticatedUser | null; + checkCanExecuteFn?: (connectorTypeId: string) => Promise; + executeLabel: string; + namespace: { namespace?: string }; + request?: KibanaRequest; + services: Services | UnsecuredServices; + spaceId?: string; +}; + +type UnsecuredExecuteOptions = Pick< + ExecuteOptions, + 'actionExecutionId' | 'actionId' | 'params' | 'relatedSavedObjects' | 'source' +> & { + spaceId: string; +}; + export type ActionExecutorContract = PublicMethodsOf; export class ActionExecutor { @@ -97,45 +118,269 @@ export class ActionExecutor { } public async execute({ + actionExecutionId, actionId, - params, + consumer, + executionId, + isEphemeral, request, + params, + relatedSavedObjects, source, - isEphemeral, taskInfo, + }: ExecuteOptions): Promise> { + const { + actionTypeRegistry, + getActionsAuthorizationWithRequest, + getServices, + security, + spaces, + } = this.actionExecutorContext!; + + const services = getServices(request); + const spaceId = spaces && spaces.getSpaceId(request); + const namespace = spaceId && spaceId !== 'default' ? { namespace: spaceId } : {}; + const authorization = getActionsAuthorizationWithRequest(request); + const currentUser = security?.authc.getCurrentUser(request); + + return await this.executeHelper({ + actionExecutionId, + actionId, + consumer, + currentUser, + checkCanExecuteFn: async (connectorTypeId: string) => { + /** + * Ensures correct permissions for execution and + * performs authorization checks for system actions. + * It will thrown an error in case of failure. + */ + await ensureAuthorizedToExecute({ + params, + actionId, + actionTypeId: connectorTypeId, + actionTypeRegistry, + authorization, + }); + }, + executeLabel: `execute_action`, + executionId, + isEphemeral, + namespace, + params, + relatedSavedObjects, + request, + services, + source, + spaceId, + taskInfo, + }); + } + + public async executeUnsecured({ + actionExecutionId, + actionId, + params, + relatedSavedObjects, + spaceId, + source, + }: UnsecuredExecuteOptions): Promise> { + const { actionTypeRegistry, getUnsecuredServices } = this.actionExecutorContext!; + + const services = getUnsecuredServices(); + const namespace = spaceId && spaceId !== 'default' ? { namespace: spaceId } : {}; + + return await this.executeHelper({ + actionExecutionId, + actionId, + checkCanExecuteFn: async (connectorTypeId: string) => { + let errorMessage: string | null = null; + if (UNALLOWED_FOR_UNSECURE_EXECUTION_CONNECTOR_TYPE_IDS.includes(connectorTypeId)) { + errorMessage = `Cannot execute unsecured "${connectorTypeId}" action - execution of this type is not allowed`; + } + + // We don't allow execute system actions in unsecured manner because they require a request + if (actionTypeRegistry.isSystemActionType(connectorTypeId)) { + errorMessage = `Cannot execute unsecured system action`; + } + + if (errorMessage) { + throw new ActionExecutionError(errorMessage, ActionExecutionErrorReason.Authorization, { + actionId, + status: 'error', + message: errorMessage, + retry: false, + errorSource: TaskErrorSource.USER, + }); + } + }, + executeLabel: `execute_unsecured_action`, + namespace, + params, + relatedSavedObjects, + services, + source, + spaceId, + }); + } + + public async logCancellation({ + actionId, + request, + relatedSavedObjects, + source, executionId, + taskInfo, consumer, - relatedSavedObjects, actionExecutionId, - }: ExecuteOptions): Promise> { + }: { + actionId: string; + actionExecutionId: string; + request: KibanaRequest; + taskInfo?: TaskInfo; + executionId?: string; + relatedSavedObjects: RelatedSavedObjects; + source?: ActionExecutionSource; + consumer?: string; + }) { + const { spaces, eventLogger } = this.actionExecutorContext!; + + const spaceId = spaces && spaces.getSpaceId(request); + const namespace = spaceId && spaceId !== 'default' ? { namespace: spaceId } : {}; + + if (!this.actionInfo || this.actionInfo.actionId !== actionId) { + this.actionInfo = await this.getActionInfoInternal(actionId, namespace.namespace); + } + + const task = taskInfo + ? { + task: { + scheduled: taskInfo.scheduled.toISOString(), + scheduleDelay: Millis2Nanos * (Date.now() - taskInfo.scheduled.getTime()), + }, + } + : {}; + // Write event log entry + const event = createActionEventLogRecordObject({ + actionId, + consumer, + action: EVENT_LOG_ACTIONS.executeTimeout, + message: `action: ${this.actionInfo.actionTypeId}:${actionId}: '${ + this.actionInfo.name ?? '' + }' execution cancelled due to timeout - exceeded default timeout of "5m"`, + ...namespace, + ...task, + executionId, + spaceId, + savedObjects: [ + { + type: 'action', + id: actionId, + typeId: this.actionInfo.actionTypeId, + relation: SAVED_OBJECT_REL_PRIMARY, + }, + ], + relatedSavedObjects, + actionExecutionId, + isInMemory: this.actionInfo.isInMemory, + ...(source ? { source } : {}), + }); + + eventLogger.logEvent(event); + } + + private async getActionInfoInternal( + actionId: string, + namespace: string | undefined + ): Promise { + const { encryptedSavedObjectsClient, inMemoryConnectors } = this.actionExecutorContext!; + + // check to see if it's in memory connector first + const inMemoryAction = inMemoryConnectors.find( + (inMemoryConnector) => inMemoryConnector.id === actionId + ); + if (inMemoryAction) { + return { + actionTypeId: inMemoryAction.actionTypeId, + name: inMemoryAction.name, + config: inMemoryAction.config, + secrets: inMemoryAction.secrets, + actionId, + isInMemory: true, + rawAction: { ...inMemoryAction, isMissingSecrets: false }, + }; + } + + if (!this.isESOCanEncrypt) { + throw createTaskRunError( + new Error( + `Unable to execute action because the Encrypted Saved Objects plugin is missing encryption key. Please set xpack.encryptedSavedObjects.encryptionKey in the kibana.yml or use the bin/kibana-encryption-keys command.` + ), + TaskErrorSource.USER + ); + } + + try { + const rawAction = await encryptedSavedObjectsClient.getDecryptedAsInternalUser( + 'action', + actionId, + { + namespace: namespace === 'default' ? undefined : namespace, + } + ); + const { + attributes: { secrets, actionTypeId, config, name }, + } = rawAction; + + return { + actionTypeId, + name, + config, + secrets, + actionId, + rawAction: rawAction.attributes, + }; + } catch (e) { + if (SavedObjectsErrorHelpers.isNotFoundError(e)) { + throw createTaskRunError(e, TaskErrorSource.USER); + } + throw createTaskRunError(e, TaskErrorSource.FRAMEWORK); + } + } + + private async executeHelper({ + actionExecutionId, + actionId, + consumer, + currentUser, + checkCanExecuteFn, + executeLabel, + executionId, + isEphemeral, + namespace, + params, + relatedSavedObjects, + request, + services, + source, + spaceId, + taskInfo, + }: ExecuteHelperOptions): Promise> { if (!this.isInitialized) { throw new Error('ActionExecutor not initialized'); } return withSpan( { - name: `execute_action`, + name: executeLabel, type: 'actions', labels: { actions_connector_id: actionId, }, }, async (span) => { - const { - spaces, - getServices, - actionTypeRegistry, - eventLogger, - security, - getActionsAuthorizationWithRequest, - } = this.actionExecutorContext!; + const { actionTypeRegistry, eventLogger } = this.actionExecutorContext!; - const services = getServices(request); - const spaceId = spaces && spaces.getSpaceId(request); - const namespace = spaceId && spaceId !== 'default' ? { namespace: spaceId } : {}; - const authorization = getActionsAuthorizationWithRequest(request); - - const actionInfo = await this.getActionInfoInternal(actionId, request, namespace.namespace); + const actionInfo = await this.getActionInfoInternal(actionId, namespace.namespace); const { actionTypeId, name, config, secrets } = actionInfo; @@ -143,7 +388,11 @@ export class ActionExecutor { this.actionInfo = actionInfo; } - if (!actionTypeRegistry.isActionExecutable(actionId, actionTypeId, { notifyUsage: true })) { + if ( + !actionTypeRegistry.isActionExecutable(actionId, actionTypeId, { + notifyUsage: true, + }) + ) { try { actionTypeRegistry.ensureActionTypeEnabled(actionTypeId); } catch (e) { @@ -176,11 +425,10 @@ export class ActionExecutor { } const loggerId = actionTypeId.startsWith('.') ? actionTypeId.substring(1) : actionTypeId; - let { logger } = this.actionExecutorContext!; - logger = logger.get(loggerId); + const logger = this.actionExecutorContext!.logger.get(loggerId); if (span) { - span.name = `execute_action ${actionTypeId}`; + span.name = `${executeLabel} ${actionTypeId}`; span.addLabels({ actions_connector_type_id: actionTypeId, }); @@ -236,18 +484,9 @@ export class ActionExecutor { let rawResult: ActionTypeExecutorRawResult; try { - /** - * Ensures correct permissions for execution and - * performs authorization checks for system actions. - * It will thrown an error in case of failure. - */ - await ensureAuthorizedToExecute({ - params, - actionId, - actionTypeId, - actionTypeRegistry, - authorization, - }); + if (checkCanExecuteFn) { + await checkCanExecuteFn(actionTypeId); + } rawResult = await actionType.executor({ actionId, @@ -295,8 +534,6 @@ export class ActionExecutor { function completeEventLogging() { eventLogger.stopTiming(event); - const currentUser = security?.authc.getCurrentUser(request); - event.user = event.user || {}; event.user.name = currentUser?.username; event.user.id = currentUser?.profile_uid; @@ -366,129 +603,6 @@ export class ActionExecutor { } ); } - - public async logCancellation({ - actionId, - request, - relatedSavedObjects, - source, - executionId, - taskInfo, - consumer, - actionExecutionId, - }: { - actionId: string; - actionExecutionId: string; - request: KibanaRequest; - taskInfo?: TaskInfo; - executionId?: string; - relatedSavedObjects: RelatedSavedObjects; - source?: ActionExecutionSource; - consumer?: string; - }) { - const { spaces, eventLogger } = this.actionExecutorContext!; - - const spaceId = spaces && spaces.getSpaceId(request); - const namespace = spaceId && spaceId !== 'default' ? { namespace: spaceId } : {}; - if (!this.actionInfo || this.actionInfo.actionId !== actionId) { - this.actionInfo = await this.getActionInfoInternal(actionId, request, namespace.namespace); - } - const task = taskInfo - ? { - task: { - scheduled: taskInfo.scheduled.toISOString(), - scheduleDelay: Millis2Nanos * (Date.now() - taskInfo.scheduled.getTime()), - }, - } - : {}; - // Write event log entry - const event = createActionEventLogRecordObject({ - actionId, - consumer, - action: EVENT_LOG_ACTIONS.executeTimeout, - message: `action: ${this.actionInfo.actionTypeId}:${actionId}: '${ - this.actionInfo.name ?? '' - }' execution cancelled due to timeout - exceeded default timeout of "5m"`, - ...namespace, - ...task, - executionId, - spaceId, - savedObjects: [ - { - type: 'action', - id: actionId, - typeId: this.actionInfo.actionTypeId, - relation: SAVED_OBJECT_REL_PRIMARY, - }, - ], - relatedSavedObjects, - actionExecutionId, - isInMemory: this.actionInfo.isInMemory, - ...(source ? { source } : {}), - }); - - eventLogger.logEvent(event); - } - - public async getActionInfoInternal( - actionId: string, - request: KibanaRequest, - namespace: string | undefined - ): Promise { - const { encryptedSavedObjectsClient, inMemoryConnectors } = this.actionExecutorContext!; - - // check to see if it's in memory action first - const inMemoryAction = inMemoryConnectors.find( - (inMemoryConnector) => inMemoryConnector.id === actionId - ); - if (inMemoryAction) { - return { - actionTypeId: inMemoryAction.actionTypeId, - name: inMemoryAction.name, - config: inMemoryAction.config, - secrets: inMemoryAction.secrets, - actionId, - isInMemory: true, - rawAction: { ...inMemoryAction, isMissingSecrets: false }, - }; - } - - if (!this.isESOCanEncrypt) { - throw createTaskRunError( - new Error( - `Unable to execute action because the Encrypted Saved Objects plugin is missing encryption key. Please set xpack.encryptedSavedObjects.encryptionKey in the kibana.yml or use the bin/kibana-encryption-keys command.` - ), - TaskErrorSource.USER - ); - } - - try { - const rawAction = await encryptedSavedObjectsClient.getDecryptedAsInternalUser( - 'action', - actionId, - { - namespace: namespace === 'default' ? undefined : namespace, - } - ); - const { - attributes: { secrets, actionTypeId, config, name }, - } = rawAction; - - return { - actionTypeId, - name, - config, - secrets, - actionId, - rawAction: rawAction.attributes, - }; - } catch (e) { - if (SavedObjectsErrorHelpers.isNotFoundError(e)) { - throw createTaskRunError(e, TaskErrorSource.USER); - } - throw createTaskRunError(e, TaskErrorSource.FRAMEWORK); - } - } } export interface ActionInfo { diff --git a/x-pack/plugins/actions/server/lib/index.ts b/x-pack/plugins/actions/server/lib/index.ts index 828e08a4ad4db..e97198ee7b432 100644 --- a/x-pack/plugins/actions/server/lib/index.ts +++ b/x-pack/plugins/actions/server/lib/index.ts @@ -37,3 +37,4 @@ export { } from './action_execution_source'; export { validateEmptyStrings } from './validate_empty_strings'; export { parseDate } from './parse_date'; +export type { RelatedSavedObjects } from './related_saved_objects'; diff --git a/x-pack/plugins/actions/server/lib/task_runner_factory.test.ts b/x-pack/plugins/actions/server/lib/task_runner_factory.test.ts index 8fcb031ce1359..96a3059ef852a 100644 --- a/x-pack/plugins/actions/server/lib/task_runner_factory.test.ts +++ b/x-pack/plugins/actions/server/lib/task_runner_factory.test.ts @@ -52,32 +52,6 @@ let fakeTimer: sinon.SinonFakeTimers; let taskRunnerFactory: TaskRunnerFactory; let mockedTaskInstance: ConcreteTaskInstance; -const mockAction = { - id: '1', - type: 'action', - attributes: { - name: '1', - actionTypeId: 'test', - config: { - bar: true, - }, - secrets: { - baz: true, - }, - isMissingSecrets: false, - }, - references: [], -}; - -const mockActionInfo = { - actionTypeId: mockAction.attributes.actionTypeId, - name: mockAction.attributes.name, - config: mockAction.attributes.config, - secrets: mockAction.attributes.secrets, - actionId: mockAction.id, - rawAction: mockAction.attributes, -}; - beforeAll(() => { fakeTimer = sinon.useFakeTimers(); mockedTaskInstance = { @@ -108,9 +82,15 @@ const services = { savedObjectsClient: savedObjectsClientMock.create(), }; +const unsecuredServices = { + log: jest.fn(), + savedObjectsClient: savedObjectsRepositoryMock.create(), +}; + const actionExecutorInitializerParams = { logger: loggingSystemMock.create().get(), getServices: jest.fn().mockReturnValue(services), + getUnsecuredServices: jest.fn().mockReturnValue(unsecuredServices), actionTypeRegistry, getActionsAuthorizationWithRequest: jest.fn().mockReturnValue(actionsAuthorizationMock.create()), encryptedSavedObjectsClient: mockedEncryptedSavedObjectsClient, @@ -132,7 +112,6 @@ describe('Task Runner Factory', () => { jest.resetAllMocks(); jest.clearAllMocks(); actionExecutorInitializerParams.getServices.mockReturnValue(services); - mockedActionExecutor.getActionInfoInternal.mockResolvedValueOnce(mockActionInfo); }); test(`throws an error if factory isn't initialized`, () => { diff --git a/x-pack/plugins/actions/server/mocks.ts b/x-pack/plugins/actions/server/mocks.ts index 7655ad6de945d..ac7d42d658e2b 100644 --- a/x-pack/plugins/actions/server/mocks.ts +++ b/x-pack/plugins/actions/server/mocks.ts @@ -9,12 +9,13 @@ import { elasticsearchServiceMock, loggingSystemMock, savedObjectsClientMock, + savedObjectsRepositoryMock, } from '@kbn/core/server/mocks'; import { encryptedSavedObjectsMock } from '@kbn/encrypted-saved-objects-plugin/server/mocks'; import { Logger } from '@kbn/core/server'; import { actionsClientMock } from './actions_client/actions_client.mock'; import { PluginSetupContract, PluginStartContract, renderActionParameterTemplates } from './plugin'; -import { Services } from './types'; +import { Services, UnsecuredServices } from './types'; import { actionsAuthorizationMock } from './authorization/actions_authorization.mock'; import { ConnectorTokenClient } from './lib/connector_token_client'; import { unsecuredActionsClientMock } from './unsecured_actions_client/unsecured_actions_client.mock'; @@ -86,8 +87,26 @@ const createServicesMock = () => { return mock; }; +const createUnsecuredServicesMock = () => { + const mock: jest.Mocked< + UnsecuredServices & { + savedObjectsClient: ReturnType; + } + > = { + savedObjectsClient: savedObjectsRepositoryMock.create(), + scopedClusterClient: elasticsearchServiceMock.createScopedClusterClient().asCurrentUser, + connectorTokenClient: new ConnectorTokenClient({ + unsecuredSavedObjectsClient: savedObjectsRepositoryMock.create(), + encryptedSavedObjectsClient: encryptedSavedObjectsMock.createClient(), + logger, + }), + }; + return mock; +}; + export const actionsMock = { createServices: createServicesMock, + createUnsecuredServices: createUnsecuredServicesMock, createSetup: createSetupMock, createStart: createStartMock, }; diff --git a/x-pack/plugins/actions/server/plugin.ts b/x-pack/plugins/actions/server/plugin.ts index 6479ed1b1d05a..1ef28b10e6440 100644 --- a/x-pack/plugins/actions/server/plugin.ts +++ b/x-pack/plugins/actions/server/plugin.ts @@ -18,6 +18,7 @@ import { ElasticsearchServiceStart, SavedObjectsClientContract, SavedObjectsBulkGetObject, + ISavedObjectsRepository, } from '@kbn/core/server'; import { SECURITY_EXTENSION_ID } from '@kbn/core-saved-objects-server'; import { @@ -65,6 +66,7 @@ import { ActionTypeSecrets, ActionTypeParams, ActionsRequestHandlerContext, + UnsecuredServices, } from './types'; import { ActionsConfigurationUtilities, getActionsConfigurationUtilities } from './actions_config'; @@ -484,17 +486,23 @@ export class ActionsPlugin implements Plugin { const internalSavedObjectsRepository = core.savedObjects.createInternalRepository([ + ACTION_SAVED_OBJECT_TYPE, ACTION_TASK_PARAMS_SAVED_OBJECT_TYPE, ]); return new UnsecuredActionsClient({ - internalSavedObjectsRepository, + actionExecutor: actionExecutor!, + clusterClient: core.elasticsearch.client, executionEnqueuer: createBulkUnsecuredExecutionEnqueuerFunction({ taskManager: plugins.taskManager, connectorTypeRegistry: actionTypeRegistry!, inMemoryConnectors: this.inMemoryConnectors, configurationUtilities: actionsConfigUtils, }), + inMemoryConnectors: this.inMemoryConnectors, + internalSavedObjectsRepository, + kibanaIndices: core.savedObjects.getAllIndices(), + logger: this.logger, }); }; @@ -523,6 +531,9 @@ export class ActionsPlugin implements Plugin core.savedObjects.getScopedClient(request); + const getInternalSavedObjectsRepositoryWithoutAccessToActions = () => + core.savedObjects.createInternalRepository(); + actionExecutor!.initialize({ logger, eventLogger: this.eventLogger!, @@ -534,6 +545,12 @@ export class ActionsPlugin implements Plugin this.getUnsecuredSavedObjectsClient(core.savedObjects, request) ), + getUnsecuredServices: this.getUnsecuredServicesFactory( + getInternalSavedObjectsRepositoryWithoutAccessToActions, + core.elasticsearch, + encryptedSavedObjectsClient, + () => core.savedObjects.createInternalRepository(includedHiddenTypes) + ), encryptedSavedObjectsClient, actionTypeRegistry: actionTypeRegistry!, inMemoryConnectors: this.inMemoryConnectors, @@ -629,6 +646,25 @@ export class ActionsPlugin implements Plugin ISavedObjectsRepository, + elasticsearch: ElasticsearchServiceStart, + encryptedSavedObjectsClient: EncryptedSavedObjectsClient, + unsecuredSavedObjectsRepository: () => ISavedObjectsRepository + ): () => UnsecuredServices { + return () => { + return { + savedObjectsClient: getSavedObjectRepository(), + scopedClusterClient: elasticsearch.client.asInternalUser, + connectorTokenClient: new ConnectorTokenClient({ + unsecuredSavedObjectsClient: unsecuredSavedObjectsRepository(), + encryptedSavedObjectsClient, + logger: this.logger, + }), + }; + }; + } + private getInMemoryConnectors = () => this.inMemoryConnectors; private setSystemActions = () => { diff --git a/x-pack/plugins/actions/server/types.ts b/x-pack/plugins/actions/server/types.ts index 239305eaafc10..aa6c7b26cf0ae 100644 --- a/x-pack/plugins/actions/server/types.ts +++ b/x-pack/plugins/actions/server/types.ts @@ -15,6 +15,7 @@ import { CustomRequestHandlerContext, SavedObjectReference, Logger, + ISavedObjectsRepository, } from '@kbn/core/server'; import { AnySchema } from 'joi'; import { SubActionConnector } from './sub_action_framework/sub_action_connector'; @@ -30,6 +31,7 @@ import { ActionsConfigurationUtilities } from './actions_config'; export type { ActionTypeExecutorResult, ActionTypeExecutorRawResult } from '../common'; export type WithoutQueryAndParams = Pick>; export type GetServicesFunction = (request: KibanaRequest) => Services; +export type GetUnsecuredServicesFunction = () => UnsecuredServices; export type ActionTypeRegistryContract = PublicMethodsOf; export type SpaceIdToNamespaceFunction = (spaceId?: string) => string | undefined; export type ActionTypeConfig = Record; @@ -49,6 +51,12 @@ export interface Services { connectorTokenClient: ConnectorTokenClient; } +export interface UnsecuredServices { + savedObjectsClient: ISavedObjectsRepository; + scopedClusterClient: ElasticsearchClient; + connectorTokenClient: ConnectorTokenClient; +} + export interface ActionsApiRequestHandlerContext { getActionsClient: () => ActionsClient; listTypes: ActionTypeRegistry['list']; @@ -70,7 +78,7 @@ export interface ActionTypeExecutorOptions< Params > { actionId: string; - services: Services; + services: Services | UnsecuredServices; config: Config; secrets: Secrets; params: Params; @@ -234,3 +242,7 @@ export interface ConnectorToken extends SavedObjectAttributes { createdAt: string; updatedAt?: string; } + +// This unallowlist should only contain connector types that require a request or API key for +// execution. +export const UNALLOWED_FOR_UNSECURE_EXECUTION_CONNECTOR_TYPE_IDS = ['.index']; diff --git a/x-pack/plugins/actions/server/unsecured_actions_client/unsecured_actions_client.mock.ts b/x-pack/plugins/actions/server/unsecured_actions_client/unsecured_actions_client.mock.ts index 61318a4707ca8..748847d579eeb 100644 --- a/x-pack/plugins/actions/server/unsecured_actions_client/unsecured_actions_client.mock.ts +++ b/x-pack/plugins/actions/server/unsecured_actions_client/unsecured_actions_client.mock.ts @@ -11,6 +11,8 @@ export type UnsecuredActionsClientMock = jest.Mocked; const createUnsecuredActionsClientMock = () => { const mocked: UnsecuredActionsClientMock = { + getAll: jest.fn(), + execute: jest.fn(), bulkEnqueueExecution: jest.fn(), }; return mocked; diff --git a/x-pack/plugins/actions/server/unsecured_actions_client/unsecured_actions_client.test.ts b/x-pack/plugins/actions/server/unsecured_actions_client/unsecured_actions_client.test.ts index 7d0d4d687a71a..89145d80eea19 100644 --- a/x-pack/plugins/actions/server/unsecured_actions_client/unsecured_actions_client.test.ts +++ b/x-pack/plugins/actions/server/unsecured_actions_client/unsecured_actions_client.test.ts @@ -5,20 +5,259 @@ * 2.0. */ -import { UnsecuredActionsClient } from './unsecured_actions_client'; -import { savedObjectsRepositoryMock } from '@kbn/core/server/mocks'; +import { v4 as uuidv4 } from 'uuid'; +import { + elasticsearchServiceMock, + loggingSystemMock, + savedObjectsRepositoryMock, +} from '@kbn/core/server/mocks'; import { asNotificationExecutionSource } from '../lib'; +import { actionExecutorMock } from '../lib/action_executor.mock'; +import { UnsecuredActionsClient } from './unsecured_actions_client'; +import { Logger } from '@kbn/core/server'; +import { getAllUnsecured } from '../application/connector/methods/get_all/get_all'; + +jest.mock('../application/connector/methods/get_all/get_all'); + +const mockGetAllUnsecured = getAllUnsecured as jest.MockedFunction; const internalSavedObjectsRepository = savedObjectsRepositoryMock.create(); +const actionExecutor = actionExecutorMock.create(); const executionEnqueuer = jest.fn(); - +const logger = loggingSystemMock.create().get() as jest.Mocked; +const clusterClient = elasticsearchServiceMock.createClusterClient(); +const inMemoryConnectors = [ + { + id: 'testPreconfigured', + actionTypeId: '.slack', + secrets: {}, + isPreconfigured: true, + isDeprecated: false, + isSystemAction: false, + name: 'test', + config: { + foo: 'bar', + }, + }, + /** + * System actions will not + * be returned from getAllUnsecured + */ + { + id: 'system-connector-.cases', + actionTypeId: '.cases', + name: 'System action: .cases', + config: {}, + secrets: {}, + isDeprecated: false, + isMissingSecrets: false, + isPreconfigured: false, + isSystemAction: true, + }, +]; let unsecuredActionsClient: UnsecuredActionsClient; beforeEach(() => { jest.resetAllMocks(); unsecuredActionsClient = new UnsecuredActionsClient({ - internalSavedObjectsRepository, + actionExecutor, + clusterClient, executionEnqueuer, + inMemoryConnectors, + internalSavedObjectsRepository, + kibanaIndices: ['.kibana'], + logger, + }); +}); + +describe('getAll()', () => { + test('calls getAllUnsecured library method with appropriate parameters', async () => { + const expectedResult = [ + { + actionTypeId: 'test', + id: '1', + name: 'test', + isMissingSecrets: false, + config: { foo: 'bar' }, + isPreconfigured: false, + isDeprecated: false, + isSystemAction: false, + referencedByCount: 6, + }, + { + id: 'testPreconfigured', + actionTypeId: '.slack', + name: 'test', + isPreconfigured: true, + isSystemAction: false, + isDeprecated: false, + referencedByCount: 2, + }, + ]; + mockGetAllUnsecured.mockResolvedValueOnce(expectedResult); + const result = await unsecuredActionsClient.getAll('default'); + expect(result).toEqual(expectedResult); + expect(mockGetAllUnsecured).toHaveBeenCalledWith({ + esClient: clusterClient.asInternalUser, + inMemoryConnectors, + kibanaIndices: ['.kibana'], + logger, + internalSavedObjectsRepository, + spaceId: 'default', + }); + }); + + test('throws error if getAllUnsecured throws errors', async () => { + mockGetAllUnsecured.mockImplementationOnce(() => { + throw new Error('failfail'); + }); + await expect( + unsecuredActionsClient.getAll('customSpace') + ).rejects.toThrowErrorMatchingInlineSnapshot(`"failfail"`); + expect(mockGetAllUnsecured).toHaveBeenCalledWith({ + esClient: clusterClient.asInternalUser, + inMemoryConnectors, + kibanaIndices: ['.kibana'], + logger, + internalSavedObjectsRepository, + spaceId: 'customSpace', + }); + }); +}); + +describe('execute()', () => { + test('throws error when executing action with not allowed requester id', async () => { + await expect( + unsecuredActionsClient.execute({ + requesterId: 'badId', + id: '1', + spaceId: 'default', + params: { + name: 'my name', + }, + }) + ).rejects.toThrowErrorMatchingInlineSnapshot( + `"\\"badId\\" feature is not allow-listed for UnsecuredActionsClient access."` + ); + }); + + test('calls the actionExecutor with the appropriate parameters', async () => { + const actionId = uuidv4(); + actionExecutor.executeUnsecured.mockResolvedValue({ status: 'ok', actionId }); + await expect( + unsecuredActionsClient.execute({ + requesterId: 'background_task', + id: actionId, + spaceId: 'default', + params: { + name: 'my name', + }, + }) + ).resolves.toMatchObject({ status: 'ok', actionId }); + + expect(actionExecutor.executeUnsecured).toHaveBeenCalledWith({ + actionId, + params: { + name: 'my name', + }, + spaceId: 'default', + actionExecutionId: expect.any(String), + }); + expect(logger.warn).toHaveBeenCalledWith( + `Calling "execute" in UnsecuredActionsClient without any relatedSavedObjects data. Consider including this for traceability.` + ); + }); + + test('injects source using related saved objects task info if provided', async () => { + const actionId = uuidv4(); + actionExecutor.executeUnsecured.mockResolvedValue({ status: 'ok', actionId }); + + await expect( + unsecuredActionsClient.execute({ + requesterId: 'background_task', + id: actionId, + params: { + name: 'my name', + }, + spaceId: 'custom', + relatedSavedObjects: [ + { + id: 'some-id', + typeId: 'some-type-id', + type: 'task', + }, + ], + }) + ).resolves.toMatchObject({ status: 'ok', actionId }); + + expect(actionExecutor.executeUnsecured).toHaveBeenCalledWith({ + actionId, + params: { + name: 'my name', + }, + spaceId: 'custom', + source: { + source: { + taskId: 'some-id', + taskType: 'some-type-id', + }, + type: 'BACKGROUND_TASK', + }, + relatedSavedObjects: [ + { + id: 'some-id', + typeId: 'some-type-id', + type: 'task', + }, + ], + actionExecutionId: expect.any(String), + }); + expect(logger.warn).not.toHaveBeenCalled(); + }); + + test('defaults to unknown if task type not provided in related saved objects', async () => { + const actionId = uuidv4(); + actionExecutor.executeUnsecured.mockResolvedValue({ status: 'ok', actionId }); + + await expect( + unsecuredActionsClient.execute({ + requesterId: 'background_task', + id: actionId, + params: { + name: 'my name', + }, + spaceId: 'custom', + relatedSavedObjects: [ + { + id: 'some-id', + type: 'task', + }, + ], + }) + ).resolves.toMatchObject({ status: 'ok', actionId }); + + expect(actionExecutor.executeUnsecured).toHaveBeenCalledWith({ + actionId, + params: { + name: 'my name', + }, + spaceId: 'custom', + source: { + source: { + taskId: 'some-id', + taskType: 'unknown', + }, + type: 'BACKGROUND_TASK', + }, + relatedSavedObjects: [ + { + id: 'some-id', + type: 'task', + }, + ], + actionExecutionId: expect.any(String), + }); + expect(logger.warn).not.toHaveBeenCalled(); }); }); diff --git a/x-pack/plugins/actions/server/unsecured_actions_client/unsecured_actions_client.ts b/x-pack/plugins/actions/server/unsecured_actions_client/unsecured_actions_client.ts index baa2cf34c1d41..8331f6890486c 100644 --- a/x-pack/plugins/actions/server/unsecured_actions_client/unsecured_actions_client.ts +++ b/x-pack/plugins/actions/server/unsecured_actions_client/unsecured_actions_client.ts @@ -5,30 +5,56 @@ * 2.0. */ -import { ISavedObjectsRepository } from '@kbn/core/server'; +import { v4 as uuidv4 } from 'uuid'; +import { IClusterClient, ISavedObjectsRepository, Logger } from '@kbn/core/server'; import { BulkUnsecuredExecutionEnqueuer, ExecuteOptions, ExecutionResponse, } from '../create_unsecured_execute_function'; -import { asNotificationExecutionSource } from '../lib'; +import { + ActionExecutorContract, + asNotificationExecutionSource, + type RelatedSavedObjects, +} from '../lib'; +import { ActionTypeExecutorResult, InMemoryConnector } from '../types'; +import { asBackgroundTaskExecutionSource } from '../lib/action_execution_source'; +import { ConnectorWithExtraFindData } from '../application/connector/types'; +import { getAllUnsecured } from '../application/connector/methods/get_all/get_all'; +// requests from the notification service (for system notification) const NOTIFICATION_REQUESTER_ID = 'notifications'; +// requests from background tasks (primarily for EDR) +const BACKGROUND_TASK_REQUESTER_ID = 'background_task'; + // allowlist for features wanting access to the unsecured actions client // which allows actions to be enqueued for execution without a user request const ALLOWED_REQUESTER_IDS = [ NOTIFICATION_REQUESTER_ID, + BACKGROUND_TASK_REQUESTER_ID, // For functional testing 'functional_tester', ]; export interface UnsecuredActionsClientOpts { - internalSavedObjectsRepository: ISavedObjectsRepository; + actionExecutor: ActionExecutorContract; + clusterClient: IClusterClient; executionEnqueuer: BulkUnsecuredExecutionEnqueuer; + inMemoryConnectors: InMemoryConnector[]; + internalSavedObjectsRepository: ISavedObjectsRepository; + kibanaIndices: string[]; + logger: Logger; } +type UnsecuredExecuteOptions = Omit & { + spaceId: string; + requesterId: string; +}; + export interface IUnsecuredActionsClient { + getAll: (spaceId: string) => Promise; + execute: (opts: UnsecuredExecuteOptions) => Promise>; bulkEnqueueExecution: ( requesterId: string, actionsToExecute: ExecuteOptions[] @@ -36,12 +62,38 @@ export interface IUnsecuredActionsClient { } export class UnsecuredActionsClient { - private readonly internalSavedObjectsRepository: ISavedObjectsRepository; - private readonly executionEnqueuer: BulkUnsecuredExecutionEnqueuer; + constructor(private readonly opts: UnsecuredActionsClientOpts) {} - constructor(params: UnsecuredActionsClientOpts) { - this.executionEnqueuer = params.executionEnqueuer; - this.internalSavedObjectsRepository = params.internalSavedObjectsRepository; + public async execute({ + requesterId, + id, + params, + relatedSavedObjects, + spaceId, + }: UnsecuredExecuteOptions) { + // Check that requesterId is allowed + if (!ALLOWED_REQUESTER_IDS.includes(requesterId)) { + throw new Error( + `"${requesterId}" feature is not allow-listed for UnsecuredActionsClient access.` + ); + } + + if (!relatedSavedObjects) { + this.opts.logger.warn( + `Calling "execute" in UnsecuredActionsClient without any relatedSavedObjects data. Consider including this for traceability.` + ); + } + + const source = this.getSourceFromRequester(requesterId, id, relatedSavedObjects); + + return this.opts.actionExecutor.executeUnsecured({ + actionExecutionId: uuidv4(), + actionId: id, + params, + relatedSavedObjects, + spaceId, + ...source, + }); } public async bulkEnqueueExecution( @@ -54,25 +106,59 @@ export class UnsecuredActionsClient { `"${requesterId}" feature is not allow-listed for UnsecuredActionsClient access.` ); } + // Inject source based on requesterId - return this.executionEnqueuer( - this.internalSavedObjectsRepository, - this.injectSource(requesterId, actionsToExecute) - ); + const actionsToEnqueue = actionsToExecute.map((action) => { + const source = this.getSourceFromRequester( + requesterId, + action.id, + action.relatedSavedObjects + ); + return { + ...action, + ...source, + }; + }); + return this.opts.executionEnqueuer(this.opts.internalSavedObjectsRepository, actionsToEnqueue); } - private injectSource(requesterId: string, actionsToExecute: ExecuteOptions[]): ExecuteOptions[] { + public async getAll(spaceId: string): Promise { + return getAllUnsecured({ + esClient: this.opts.clusterClient.asInternalUser, + inMemoryConnectors: this.opts.inMemoryConnectors, + kibanaIndices: this.opts.kibanaIndices, + logger: this.opts.logger, + internalSavedObjectsRepository: this.opts.internalSavedObjectsRepository, + spaceId, + }); + } + + private getSourceFromRequester( + requesterId: string, + actionId: string, + relatedSavedObjects?: RelatedSavedObjects + ) { switch (requesterId) { case NOTIFICATION_REQUESTER_ID: - return actionsToExecute.map((actionToExecute) => ({ - ...actionToExecute, + return { source: asNotificationExecutionSource({ requesterId, - connectorId: actionToExecute.id, + connectorId: actionId, }), - })); + }; + case BACKGROUND_TASK_REQUESTER_ID: + const taskSO = (relatedSavedObjects ?? []).find((rso) => rso.type === 'task'); + if (taskSO) { + return { + source: asBackgroundTaskExecutionSource({ + taskId: taskSO.id, + taskType: taskSO.typeId ?? 'unknown', + }), + }; + } + return {}; default: - return actionsToExecute; + return {}; } } } diff --git a/x-pack/plugins/actions/tsconfig.json b/x-pack/plugins/actions/tsconfig.json index d30c8bdde7d60..aae2d31c7aa09 100644 --- a/x-pack/plugins/actions/tsconfig.json +++ b/x-pack/plugins/actions/tsconfig.json @@ -44,7 +44,8 @@ "@kbn/core-logging-server-mocks", "@kbn/serverless", "@kbn/actions-types", - "@kbn/core-test-helpers-kbn-server" + "@kbn/core-test-helpers-kbn-server", + "@kbn/security-plugin-types-server" ], "exclude": [ "target/**/*", diff --git a/x-pack/plugins/alerting/common/index.ts b/x-pack/plugins/alerting/common/index.ts index f9c9724fbb3b2..2c71a3a17379f 100644 --- a/x-pack/plugins/alerting/common/index.ts +++ b/x-pack/plugins/alerting/common/index.ts @@ -90,6 +90,6 @@ export const INTERNAL_ALERTING_API_MAINTENANCE_WINDOW_PATH = export const INTERNAL_ALERTING_API_GET_ACTIVE_MAINTENANCE_WINDOWS_PATH = `${INTERNAL_ALERTING_API_MAINTENANCE_WINDOW_PATH}/_active` as const; -export const ALERTS_FEATURE_ID = 'alerts'; +export const ALERTING_FEATURE_ID = 'alerts'; export const MONITORING_HISTORY_LIMIT = 200; export const ENABLE_MAINTENANCE_WINDOWS = true; diff --git a/x-pack/plugins/alerting/public/hooks/use_get_rule_types.ts b/x-pack/plugins/alerting/public/hooks/use_get_rule_types.ts index b0871f89cc5df..d7fdd51bd1132 100644 --- a/x-pack/plugins/alerting/public/hooks/use_get_rule_types.ts +++ b/x-pack/plugins/alerting/public/hooks/use_get_rule_types.ts @@ -8,7 +8,7 @@ import { useQuery } from '@tanstack/react-query'; import { i18n } from '@kbn/i18n'; import { useKibana } from '../utils/kibana_react'; -import { loadRuleTypes } from '../services/alert_api'; +import { loadRuleTypes } from '../services/rule_api'; export const useGetRuleTypes = () => { const { diff --git a/x-pack/plugins/alerting/public/pages/maintenance_windows/components/create_maintenance_windows_form.test.tsx b/x-pack/plugins/alerting/public/pages/maintenance_windows/components/create_maintenance_windows_form.test.tsx index a354e47975baf..acf926ac7ff2d 100644 --- a/x-pack/plugins/alerting/public/pages/maintenance_windows/components/create_maintenance_windows_form.test.tsx +++ b/x-pack/plugins/alerting/public/pages/maintenance_windows/components/create_maintenance_windows_form.test.tsx @@ -14,11 +14,11 @@ import { } from './create_maintenance_windows_form'; jest.mock('../../../utils/kibana_react'); -jest.mock('../../../services/alert_api', () => ({ +jest.mock('../../../services/rule_api', () => ({ loadRuleTypes: jest.fn(), })); -const { loadRuleTypes } = jest.requireMock('../../../services/alert_api'); +const { loadRuleTypes } = jest.requireMock('../../../services/rule_api'); const { useKibana, useUiSetting } = jest.requireMock('../../../utils/kibana_react'); const formProps: CreateMaintenanceWindowFormProps = { diff --git a/x-pack/plugins/alerting/public/plugin.test.ts b/x-pack/plugins/alerting/public/plugin.test.ts index a37ab89af03c0..3d6165cf18f6e 100644 --- a/x-pack/plugins/alerting/public/plugin.test.ts +++ b/x-pack/plugins/alerting/public/plugin.test.ts @@ -12,7 +12,7 @@ import { managementPluginMock, } from '@kbn/management-plugin/public/mocks'; -jest.mock('./services/alert_api', () => ({ +jest.mock('./services/rule_api', () => ({ loadRule: jest.fn(), loadRuleType: jest.fn(), })); @@ -24,7 +24,7 @@ const mockSection = createManagementSectionMock(); describe('Alerting Public Plugin', () => { describe('start()', () => { it(`should fallback to the viewInAppRelativeUrl part of the rule object if navigation isn't registered`, async () => { - const { loadRule, loadRuleType } = jest.requireMock('./services/alert_api'); + const { loadRule, loadRuleType } = jest.requireMock('./services/rule_api'); loadRule.mockResolvedValue({ alertTypeId: 'foo', consumer: 'abc', diff --git a/x-pack/plugins/alerting/public/plugin.ts b/x-pack/plugins/alerting/public/plugin.ts index d044919ea293e..5d2f96680ca90 100644 --- a/x-pack/plugins/alerting/public/plugin.ts +++ b/x-pack/plugins/alerting/public/plugin.ts @@ -14,7 +14,7 @@ import type { DataPublicPluginStart } from '@kbn/data-plugin/public'; import type { UnifiedSearchPublicPluginStart } from '@kbn/unified-search-plugin/public'; import { AlertNavigationRegistry, AlertNavigationHandler } from './alert_navigation_registry'; -import { loadRule, loadRuleType } from './services/alert_api'; +import { loadRule, loadRuleType } from './services/rule_api'; import { ENABLE_MAINTENANCE_WINDOWS, Rule, MAINTENANCE_WINDOWS_APP_ID } from '../common'; export interface PluginSetupContract { diff --git a/x-pack/plugins/alerting/public/services/alert_api.test.ts b/x-pack/plugins/alerting/public/services/rule_api.test.ts similarity index 99% rename from x-pack/plugins/alerting/public/services/alert_api.test.ts rename to x-pack/plugins/alerting/public/services/rule_api.test.ts index 13c118bb1e78f..d9131221be11a 100644 --- a/x-pack/plugins/alerting/public/services/alert_api.test.ts +++ b/x-pack/plugins/alerting/public/services/rule_api.test.ts @@ -7,7 +7,7 @@ import { Rule, RuleType } from '../../common'; import { httpServiceMock } from '@kbn/core/public/mocks'; -import { loadRule, loadRuleType, loadRuleTypes } from './alert_api'; +import { loadRule, loadRuleType, loadRuleTypes } from './rule_api'; const http = httpServiceMock.createStartContract(); diff --git a/x-pack/plugins/alerting/public/services/alert_api.ts b/x-pack/plugins/alerting/public/services/rule_api.ts similarity index 100% rename from x-pack/plugins/alerting/public/services/alert_api.ts rename to x-pack/plugins/alerting/public/services/rule_api.ts diff --git a/x-pack/plugins/alerting/server/application/rule/methods/create/create_rule.test.ts b/x-pack/plugins/alerting/server/application/rule/methods/create/create_rule.test.ts index 21a7b170e2871..07063b4fee4af 100644 --- a/x-pack/plugins/alerting/server/application/rule/methods/create/create_rule.test.ts +++ b/x-pack/plugins/alerting/server/application/rule/methods/create/create_rule.test.ts @@ -226,7 +226,7 @@ describe('create()', () => { return rulesClient.create(options); } - test('ensures user is authorised to create this type of alert under the consumer', async () => { + test('ensures user is authorised to create this type of rule under the consumer', async () => { const data = getMockData({ alertTypeId: 'myType', consumer: 'myApp', @@ -242,18 +242,18 @@ describe('create()', () => { }); }); - test('throws when user is not authorised to create this type of alert', async () => { + test('throws when user is not authorised to create this type of rule', async () => { const data = getMockData({ alertTypeId: 'myType', consumer: 'myApp', }); authorization.ensureAuthorized.mockRejectedValue( - new Error(`Unauthorized to create a "myType" alert for "myApp"`) + new Error(`Unauthorized to create a "myType" rule for "myApp"`) ); await expect(tryToExecuteOperation({ data })).rejects.toMatchInlineSnapshot( - `[Error: Unauthorized to create a "myType" alert for "myApp"]` + `[Error: Unauthorized to create a "myType" rule for "myApp"]` ); expect(authorization.ensureAuthorized).toHaveBeenCalledWith({ @@ -325,7 +325,7 @@ describe('create()', () => { }); }); - test('creates an alert', async () => { + test('creates an rule', async () => { const data = getMockData(); const createdAttributes = { ...data, @@ -556,7 +556,7 @@ describe('create()', () => { expect(actionsClient.isActionTypeEnabled).toHaveBeenCalledWith('test', { notifyUsage: true }); }); - test('creates an alert with a custom id', async () => { + test('creates an rule with a custom id', async () => { const data = getMockData(); const createdAttributes = { ...data, @@ -736,7 +736,7 @@ describe('create()', () => { `); }); - test('creates an alert with multiple actions', async () => { + test('creates an rule with multiple actions', async () => { const data = getMockData({ actions: [ { @@ -1443,7 +1443,7 @@ describe('create()', () => { expect(actionsClient.isSystemAction).toHaveBeenCalledTimes(3); }); - test('creates a disabled alert', async () => { + test('creates a disabled rule', async () => { const data = getMockData({ enabled: false }); unsecuredSavedObjectsClient.create.mockResolvedValueOnce({ id: '1', @@ -1893,14 +1893,14 @@ describe('create()', () => { `); }); - test('should trim alert name when creating API key', async () => { - const data = getMockData({ name: ' my alert name ' }); + test('should trim rule name when creating API key', async () => { + const data = getMockData({ name: ' my rule name ' }); unsecuredSavedObjectsClient.create.mockResolvedValueOnce({ id: '1', type: RULE_SAVED_OBJECT_TYPE, attributes: { enabled: false, - name: ' my alert name ', + name: ' my rule name ', alertTypeId: '123', schedule: { interval: 10000 }, params: { @@ -1931,10 +1931,10 @@ describe('create()', () => { }); await rulesClient.create({ data }); - expect(rulesClientParams.createAPIKey).toHaveBeenCalledWith('Alerting: 123/my alert name'); + expect(rulesClientParams.createAPIKey).toHaveBeenCalledWith('Alerting: 123/my rule name'); }); - test('should create alert with given notifyWhen value if notifyWhen is not null', async () => { + test('should create rule with given notifyWhen value if notifyWhen is not null', async () => { const data = getMockData({ notifyWhen: 'onActionGroupChange', throttle: '10m' }); const createdAttributes = { ...data, @@ -2075,7 +2075,7 @@ describe('create()', () => { `); }); - test('should create alert with notifyWhen = onThrottleInterval if notifyWhen is null and throttle is set', async () => { + test('should create rule with notifyWhen = onThrottleInterval if notifyWhen is null and throttle is set', async () => { const data = getMockData({ throttle: '10m' }); const createdAttributes = { ...data, @@ -2216,7 +2216,7 @@ describe('create()', () => { `); }); - test('should create alert with notifyWhen = onActiveAlert if notifyWhen is null and throttle is null', async () => { + test('should create rule with notifyWhen = onActiveAlert if notifyWhen is null and throttle is null', async () => { const data = getMockData(); const createdAttributes = { ...data, @@ -2357,7 +2357,7 @@ describe('create()', () => { `); }); - test('should create alerts with mapped_params', async () => { + test('should create rules with mapped_params', async () => { const data = getMockData({ params: { bar: true, @@ -2742,11 +2742,11 @@ describe('create()', () => { `"Task manager error"` ); expect(rulesClientParams.logger.error).toHaveBeenCalledWith( - 'Failed to cleanup alert "1" after scheduling task failed. Error: Saved object delete error' + 'Failed to cleanup rule "1" after scheduling task failed. Error: Saved object delete error' ); }); - test('throws an error if alert type not registered', async () => { + test('throws an error if rule type not registered', async () => { const data = getMockData(); ruleTypeRegistry.get.mockImplementation(() => { throw new Error('Invalid type'); @@ -2865,7 +2865,7 @@ describe('create()', () => { ); }); - test(`doesn't create API key for disabled alerts`, async () => { + test(`doesn't create API key for disabled rules`, async () => { const data = getMockData({ enabled: false }); unsecuredSavedObjectsClient.create.mockResolvedValueOnce({ id: '1', diff --git a/x-pack/plugins/alerting/server/application/rule/methods/create/create_rule.ts b/x-pack/plugins/alerting/server/application/rule/methods/create/create_rule.ts index b9e4dedf4d133..ef55b67ef08db 100644 --- a/x-pack/plugins/alerting/server/application/rule/methods/create/create_rule.ts +++ b/x-pack/plugins/alerting/server/application/rule/methods/create/create_rule.ts @@ -114,10 +114,10 @@ export async function createRule( context.ruleTypeRegistry.ensureRuleTypeEnabled(data.alertTypeId); - // Throws an error if alert type isn't registered + // Throws an error if rule type isn't registered const ruleType = context.ruleTypeRegistry.get(data.alertTypeId); - const validatedAlertTypeParams = validateRuleTypeParams(data.params, ruleType.validate.params); + const validatedRuleTypeParams = validateRuleTypeParams(data.params, ruleType.validate.params); const username = await context.getUserName(); let createdAPIKey = null; @@ -161,7 +161,7 @@ export async function createRule( params: updatedParams, actions, } = await withSpan({ name: 'extractReferences', type: 'rules' }, () => - extractReferences(context, ruleType, data.actions, validatedAlertTypeParams) + extractReferences(context, ruleType, data.actions, validatedRuleTypeParams) ); const createTime = Date.now(); diff --git a/x-pack/plugins/alerting/server/application/rule/methods/mute_alert/mute_instance.ts b/x-pack/plugins/alerting/server/application/rule/methods/mute_alert/mute_instance.ts index 5758794b550fb..d49af9aba93b6 100644 --- a/x-pack/plugins/alerting/server/application/rule/methods/mute_alert/mute_instance.ts +++ b/x-pack/plugins/alerting/server/application/rule/methods/mute_alert/mute_instance.ts @@ -21,6 +21,7 @@ export async function muteInstance( context: RulesClientContext, params: MuteAlertParams ): Promise { + const ruleId = params.alertId; try { muteAlertParamsSchema.validate(params); } catch (error) { @@ -29,18 +30,18 @@ export async function muteInstance( return await retryIfConflicts( context.logger, - `rulesClient.muteInstance('${params.alertId}')`, + `rulesClient.muteInstance('${ruleId}')`, async () => await muteInstanceWithOCC(context, params) ); } async function muteInstanceWithOCC( context: RulesClientContext, - { alertId, alertInstanceId }: MuteAlertParams + { alertId: ruleId, alertInstanceId }: MuteAlertParams ) { const { attributes, version } = await context.unsecuredSavedObjectsClient.get( RULE_SAVED_OBJECT_TYPE, - alertId + ruleId ); try { @@ -58,7 +59,7 @@ async function muteInstanceWithOCC( context.auditLogger?.log( ruleAuditEvent({ action: RuleAuditAction.MUTE_ALERT, - savedObject: { type: RULE_SAVED_OBJECT_TYPE, id: alertId }, + savedObject: { type: RULE_SAVED_OBJECT_TYPE, id: ruleId }, error, }) ); @@ -69,7 +70,7 @@ async function muteInstanceWithOCC( ruleAuditEvent({ action: RuleAuditAction.MUTE_ALERT, outcome: 'unknown', - savedObject: { type: RULE_SAVED_OBJECT_TYPE, id: alertId }, + savedObject: { type: RULE_SAVED_OBJECT_TYPE, id: ruleId }, }) ); @@ -81,7 +82,7 @@ async function muteInstanceWithOCC( await updateRuleSo({ savedObjectsClient: context.unsecuredSavedObjectsClient, savedObjectsUpdateOptions: { version }, - id: alertId, + id: ruleId, updateRuleAttributes: updateMeta(context, { mutedInstanceIds, updatedBy: await context.getUserName(), diff --git a/x-pack/plugins/alerting/server/authorization/alerting_authorization.ts b/x-pack/plugins/alerting/server/authorization/alerting_authorization.ts index 90f4b189b1197..68edc6667aeed 100644 --- a/x-pack/plugins/alerting/server/authorization/alerting_authorization.ts +++ b/x-pack/plugins/alerting/server/authorization/alerting_authorization.ts @@ -14,7 +14,7 @@ import { SecurityPluginSetup } from '@kbn/security-plugin/server'; import { PluginStartContract as FeaturesPluginStart } from '@kbn/features-plugin/server'; import { Space } from '@kbn/spaces-plugin/server'; import { RegistryRuleType } from '../rule_type_registry'; -import { ALERTS_FEATURE_ID, RuleTypeRegistry } from '../types'; +import { ALERTING_FEATURE_ID, RuleTypeRegistry } from '../types'; import { asFiltersByRuleTypeAndConsumer, asFiltersBySpaceId, @@ -130,7 +130,7 @@ export class AlertingAuthorization { this.allPossibleConsumers = this.featuresIds.then((featuresIds) => { return featuresIds.size - ? asAuthorizedConsumers([ALERTS_FEATURE_ID, ...featuresIds], { + ? asAuthorizedConsumers([ALERTING_FEATURE_ID, ...featuresIds], { read: true, all: true, }) @@ -338,7 +338,7 @@ export class AlertingAuthorization { >(); const allPossibleConsumers = await this.allPossibleConsumers; const addLegacyConsumerPrivileges = (legacyConsumer: string) => - legacyConsumer === ALERTS_FEATURE_ID || isEmpty(featuresIds); + legacyConsumer === ALERTING_FEATURE_ID || isEmpty(featuresIds); for (const feature of fIds) { const featureDef = this.features .getKibanaFeatures() @@ -504,6 +504,6 @@ export const getValidConsumer = ({ legacyConsumer: string; producer: string; }): string => - legacyConsumer === ALERTS_FEATURE_ID || validLegacyConsumers.includes(legacyConsumer) + legacyConsumer === ALERTING_FEATURE_ID || validLegacyConsumers.includes(legacyConsumer) ? producer : legacyConsumer; diff --git a/x-pack/plugins/alerting/server/lib/alerting_event_logger/alerting_event_logger.test.ts b/x-pack/plugins/alerting/server/lib/alerting_event_logger/alerting_event_logger.test.ts index 451ca628f8607..62d2a2f14162d 100644 --- a/x-pack/plugins/alerting/server/lib/alerting_event_logger/alerting_event_logger.test.ts +++ b/x-pack/plugins/alerting/server/lib/alerting_event_logger/alerting_event_logger.test.ts @@ -777,7 +777,6 @@ describe('AlertingEventLogger', () => { [TaskRunnerTimerSpan.StartTaskRun]: 10, [TaskRunnerTimerSpan.TotalRunDuration]: 20, [TaskRunnerTimerSpan.PrepareRule]: 30, - [TaskRunnerTimerSpan.PrepareToRun]: 35, [TaskRunnerTimerSpan.RuleTypeRun]: 40, [TaskRunnerTimerSpan.ProcessAlerts]: 50, [TaskRunnerTimerSpan.PersistAlerts]: 60, @@ -801,7 +800,6 @@ describe('AlertingEventLogger', () => { claim_to_start_duration_ms: 10, total_run_duration_ms: 20, prepare_rule_duration_ms: 30, - prepare_to_run_duration_ms: 35, rule_type_run_duration_ms: 40, process_alerts_duration_ms: 50, persist_alerts_duration_ms: 60, @@ -840,7 +838,6 @@ describe('AlertingEventLogger', () => { [TaskRunnerTimerSpan.StartTaskRun]: 10, [TaskRunnerTimerSpan.TotalRunDuration]: 20, [TaskRunnerTimerSpan.PrepareRule]: 30, - [TaskRunnerTimerSpan.PrepareToRun]: 35, [TaskRunnerTimerSpan.RuleTypeRun]: 40, [TaskRunnerTimerSpan.ProcessAlerts]: 50, [TaskRunnerTimerSpan.PersistAlerts]: 60, @@ -875,7 +872,6 @@ describe('AlertingEventLogger', () => { claim_to_start_duration_ms: 10, total_run_duration_ms: 20, prepare_rule_duration_ms: 30, - prepare_to_run_duration_ms: 35, rule_type_run_duration_ms: 40, process_alerts_duration_ms: 50, persist_alerts_duration_ms: 60, diff --git a/x-pack/plugins/alerting/server/plugin.ts b/x-pack/plugins/alerting/server/plugin.ts index 34472ed6066d9..f5850abf5f99f 100644 --- a/x-pack/plugins/alerting/server/plugin.ts +++ b/x-pack/plugins/alerting/server/plugin.ts @@ -64,7 +64,7 @@ import { RulesClientFactory } from './rules_client_factory'; import { RulesSettingsClientFactory } from './rules_settings_client_factory'; import { MaintenanceWindowClientFactory } from './maintenance_window_client_factory'; import { ILicenseState, LicenseState } from './lib/license_state'; -import { AlertingRequestHandlerContext, ALERTS_FEATURE_ID, RuleAlertData } from './types'; +import { AlertingRequestHandlerContext, ALERTING_FEATURE_ID, RuleAlertData } from './types'; import { defineRoutes } from './routes'; import { AlertInstanceContext, @@ -320,7 +320,7 @@ export class AlertingPlugin { } // Usage counter for telemetry - this.usageCounter = plugins.usageCollection?.createUsageCounter(ALERTS_FEATURE_ID); + this.usageCounter = plugins.usageCollection?.createUsageCounter(ALERTING_FEATURE_ID); const getSearchSourceMigrations = plugins.data.search.searchSource.getAllMigrations.bind( plugins.data.search.searchSource diff --git a/x-pack/plugins/alerting/server/rule_type_registry.ts b/x-pack/plugins/alerting/server/rule_type_registry.ts index 2ed57e878291a..79c959a62eedf 100644 --- a/x-pack/plugins/alerting/server/rule_type_registry.ts +++ b/x-pack/plugins/alerting/server/rule_type_registry.ts @@ -39,7 +39,6 @@ import { AlertingRulesConfig } from '.'; import { AlertsService } from './alerts_service/alerts_service'; import { getRuleTypeIdValidLegacyConsumers } from './rule_type_registry_deprecated_consumers'; import { AlertingConfig } from './config'; -import { rawRuleSchemaV1 } from './saved_objects/schemas/raw_rule'; export interface ConstructorOptions { config: AlertingConfig; @@ -315,7 +314,6 @@ export class RuleTypeRegistry { spaceId: schema.string(), consumer: schema.maybe(schema.string()), }), - indirectParamsSchema: rawRuleSchemaV1, }, }); diff --git a/x-pack/plugins/alerting/server/rule_type_registry_deprecated_consumers.ts b/x-pack/plugins/alerting/server/rule_type_registry_deprecated_consumers.ts index ecb96f0248a35..e91e99203e8d4 100644 --- a/x-pack/plugins/alerting/server/rule_type_registry_deprecated_consumers.ts +++ b/x-pack/plugins/alerting/server/rule_type_registry_deprecated_consumers.ts @@ -5,77 +5,77 @@ * 2.0. */ -import { ALERTS_FEATURE_ID } from './types'; +import { ALERTING_FEATURE_ID } from './types'; export const ruleTypeIdWithValidLegacyConsumers: Record = { - 'example.always-firing': [ALERTS_FEATURE_ID], - 'example.people-in-space': [ALERTS_FEATURE_ID], - transform_health: [ALERTS_FEATURE_ID], - '.index-threshold': [ALERTS_FEATURE_ID], - '.geo-containment': [ALERTS_FEATURE_ID], - '.es-query': [ALERTS_FEATURE_ID, 'discover'], - 'xpack.ml.anomaly_detection_alert': [ALERTS_FEATURE_ID], - 'xpack.ml.anomaly_detection_jobs_health': [ALERTS_FEATURE_ID], - 'xpack.synthetics.alerts.monitorStatus': [ALERTS_FEATURE_ID], - 'xpack.synthetics.alerts.tls': [ALERTS_FEATURE_ID], - 'xpack.uptime.alerts.monitorStatus': [ALERTS_FEATURE_ID], - 'xpack.uptime.alerts.tlsCertificate': [ALERTS_FEATURE_ID], - 'xpack.uptime.alerts.durationAnomaly': [ALERTS_FEATURE_ID], - 'xpack.uptime.alerts.tls': [ALERTS_FEATURE_ID], - 'siem.eqlRule': [ALERTS_FEATURE_ID], - 'siem.savedQueryRule': [ALERTS_FEATURE_ID], - 'siem.indicatorRule': [ALERTS_FEATURE_ID], - 'siem.mlRule': [ALERTS_FEATURE_ID], - 'siem.queryRule': [ALERTS_FEATURE_ID], - 'siem.thresholdRule': [ALERTS_FEATURE_ID], - 'siem.newTermsRule': [ALERTS_FEATURE_ID], - 'siem.notifications': [ALERTS_FEATURE_ID], - 'slo.rules.burnRate': [ALERTS_FEATURE_ID], - 'logs.alert.document.count': [ALERTS_FEATURE_ID], - 'metrics.alert.inventory.threshold': [ALERTS_FEATURE_ID], - 'metrics.alert.threshold': [ALERTS_FEATURE_ID], - monitoring_alert_cluster_health: [ALERTS_FEATURE_ID], - monitoring_alert_license_expiration: [ALERTS_FEATURE_ID], - monitoring_alert_cpu_usage: [ALERTS_FEATURE_ID], - monitoring_alert_missing_monitoring_data: [ALERTS_FEATURE_ID], - monitoring_alert_disk_usage: [ALERTS_FEATURE_ID], - monitoring_alert_thread_pool_search_rejections: [ALERTS_FEATURE_ID], - monitoring_alert_thread_pool_write_rejections: [ALERTS_FEATURE_ID], - monitoring_alert_jvm_memory_usage: [ALERTS_FEATURE_ID], - monitoring_alert_nodes_changed: [ALERTS_FEATURE_ID], - monitoring_alert_logstash_version_mismatch: [ALERTS_FEATURE_ID], - monitoring_alert_kibana_version_mismatch: [ALERTS_FEATURE_ID], - monitoring_alert_elasticsearch_version_mismatch: [ALERTS_FEATURE_ID], - monitoring_ccr_read_exceptions: [ALERTS_FEATURE_ID], - monitoring_shard_size: [ALERTS_FEATURE_ID], - 'apm.transaction_duration': [ALERTS_FEATURE_ID], - 'apm.anomaly': [ALERTS_FEATURE_ID], - 'apm.error_rate': [ALERTS_FEATURE_ID], - 'apm.transaction_error_rate': [ALERTS_FEATURE_ID], - 'test.always-firing': [ALERTS_FEATURE_ID], - 'test.always-firing-alert-as-data': [ALERTS_FEATURE_ID], - 'test.authorization': [ALERTS_FEATURE_ID], - 'test.cancellableRule': [ALERTS_FEATURE_ID], - 'test.cumulative-firing': [ALERTS_FEATURE_ID], - 'test.exceedsAlertLimit': [ALERTS_FEATURE_ID], - 'test.failing': [ALERTS_FEATURE_ID], - 'test.gold.noop': [ALERTS_FEATURE_ID], - 'test.longRunning': [ALERTS_FEATURE_ID], - 'test.multipleSearches': [ALERTS_FEATURE_ID], - 'test.never-firing': [ALERTS_FEATURE_ID], - 'test.noop': [ALERTS_FEATURE_ID], - 'test.onlyContextVariables': [ALERTS_FEATURE_ID], - 'test.onlyStateVariables': [ALERTS_FEATURE_ID], - 'test.patternFiring': [ALERTS_FEATURE_ID], - 'test.patternFiringAad': [ALERTS_FEATURE_ID], - 'test.patternFiringAutoRecoverFalse': [ALERTS_FEATURE_ID], - 'test.patternLongRunning': [ALERTS_FEATURE_ID], - 'test.patternLongRunning.cancelAlertsOnRuleTimeout': [ALERTS_FEATURE_ID], - 'test.patternSuccessOrFailure': [ALERTS_FEATURE_ID], - 'test.restricted-noop': [ALERTS_FEATURE_ID], - 'test.throw': [ALERTS_FEATURE_ID], - 'test.unrestricted-noop': [ALERTS_FEATURE_ID], - 'test.validation': [ALERTS_FEATURE_ID], + 'example.always-firing': [ALERTING_FEATURE_ID], + 'example.people-in-space': [ALERTING_FEATURE_ID], + transform_health: [ALERTING_FEATURE_ID], + '.index-threshold': [ALERTING_FEATURE_ID], + '.geo-containment': [ALERTING_FEATURE_ID], + '.es-query': [ALERTING_FEATURE_ID, 'discover'], + 'xpack.ml.anomaly_detection_alert': [ALERTING_FEATURE_ID], + 'xpack.ml.anomaly_detection_jobs_health': [ALERTING_FEATURE_ID], + 'xpack.synthetics.alerts.monitorStatus': [ALERTING_FEATURE_ID], + 'xpack.synthetics.alerts.tls': [ALERTING_FEATURE_ID], + 'xpack.uptime.alerts.monitorStatus': [ALERTING_FEATURE_ID], + 'xpack.uptime.alerts.tlsCertificate': [ALERTING_FEATURE_ID], + 'xpack.uptime.alerts.durationAnomaly': [ALERTING_FEATURE_ID], + 'xpack.uptime.alerts.tls': [ALERTING_FEATURE_ID], + 'siem.eqlRule': [ALERTING_FEATURE_ID], + 'siem.savedQueryRule': [ALERTING_FEATURE_ID], + 'siem.indicatorRule': [ALERTING_FEATURE_ID], + 'siem.mlRule': [ALERTING_FEATURE_ID], + 'siem.queryRule': [ALERTING_FEATURE_ID], + 'siem.thresholdRule': [ALERTING_FEATURE_ID], + 'siem.newTermsRule': [ALERTING_FEATURE_ID], + 'siem.notifications': [ALERTING_FEATURE_ID], + 'slo.rules.burnRate': [ALERTING_FEATURE_ID], + 'logs.alert.document.count': [ALERTING_FEATURE_ID], + 'metrics.alert.inventory.threshold': [ALERTING_FEATURE_ID], + 'metrics.alert.threshold': [ALERTING_FEATURE_ID], + monitoring_alert_cluster_health: [ALERTING_FEATURE_ID], + monitoring_alert_license_expiration: [ALERTING_FEATURE_ID], + monitoring_alert_cpu_usage: [ALERTING_FEATURE_ID], + monitoring_alert_missing_monitoring_data: [ALERTING_FEATURE_ID], + monitoring_alert_disk_usage: [ALERTING_FEATURE_ID], + monitoring_alert_thread_pool_search_rejections: [ALERTING_FEATURE_ID], + monitoring_alert_thread_pool_write_rejections: [ALERTING_FEATURE_ID], + monitoring_alert_jvm_memory_usage: [ALERTING_FEATURE_ID], + monitoring_alert_nodes_changed: [ALERTING_FEATURE_ID], + monitoring_alert_logstash_version_mismatch: [ALERTING_FEATURE_ID], + monitoring_alert_kibana_version_mismatch: [ALERTING_FEATURE_ID], + monitoring_alert_elasticsearch_version_mismatch: [ALERTING_FEATURE_ID], + monitoring_ccr_read_exceptions: [ALERTING_FEATURE_ID], + monitoring_shard_size: [ALERTING_FEATURE_ID], + 'apm.transaction_duration': [ALERTING_FEATURE_ID], + 'apm.anomaly': [ALERTING_FEATURE_ID], + 'apm.error_rate': [ALERTING_FEATURE_ID], + 'apm.transaction_error_rate': [ALERTING_FEATURE_ID], + 'test.always-firing': [ALERTING_FEATURE_ID], + 'test.always-firing-alert-as-data': [ALERTING_FEATURE_ID], + 'test.authorization': [ALERTING_FEATURE_ID], + 'test.cancellableRule': [ALERTING_FEATURE_ID], + 'test.cumulative-firing': [ALERTING_FEATURE_ID], + 'test.exceedsAlertLimit': [ALERTING_FEATURE_ID], + 'test.failing': [ALERTING_FEATURE_ID], + 'test.gold.noop': [ALERTING_FEATURE_ID], + 'test.longRunning': [ALERTING_FEATURE_ID], + 'test.multipleSearches': [ALERTING_FEATURE_ID], + 'test.never-firing': [ALERTING_FEATURE_ID], + 'test.noop': [ALERTING_FEATURE_ID], + 'test.onlyContextVariables': [ALERTING_FEATURE_ID], + 'test.onlyStateVariables': [ALERTING_FEATURE_ID], + 'test.patternFiring': [ALERTING_FEATURE_ID], + 'test.patternFiringAad': [ALERTING_FEATURE_ID], + 'test.patternFiringAutoRecoverFalse': [ALERTING_FEATURE_ID], + 'test.patternLongRunning': [ALERTING_FEATURE_ID], + 'test.patternLongRunning.cancelAlertsOnRuleTimeout': [ALERTING_FEATURE_ID], + 'test.patternSuccessOrFailure': [ALERTING_FEATURE_ID], + 'test.restricted-noop': [ALERTING_FEATURE_ID], + 'test.throw': [ALERTING_FEATURE_ID], + 'test.unrestricted-noop': [ALERTING_FEATURE_ID], + 'test.validation': [ALERTING_FEATURE_ID], }; const getRuleTypeIdValidLegacyConsumers = (ruleTypeId: string): string[] => { diff --git a/x-pack/plugins/alerting/server/rules_client/lib/create_rule_saved_object.ts b/x-pack/plugins/alerting/server/rules_client/lib/create_rule_saved_object.ts index cc0d6a895dcc0..938d421e79554 100644 --- a/x-pack/plugins/alerting/server/rules_client/lib/create_rule_saved_object.ts +++ b/x-pack/plugins/alerting/server/rules_client/lib/create_rule_saved_object.ts @@ -108,7 +108,7 @@ export async function createRuleSavedObject ({ let rulesClient: RulesClient; -const MockAlertId = 'alert-id'; +const MockRuleId = 'rule-id'; const ConflictAfterRetries = RetryForConflictsAttempts + 1; @@ -120,7 +120,7 @@ async function update(success: boolean) { rulesClientParams.uiSettings.asScopedToClient = uiSettingsServiceMock.createStartContract().asScopedToClient; await rulesClient.update({ - id: MockAlertId, + id: MockRuleId, data: { schedule: { interval: '1m' }, name: 'cba', @@ -133,18 +133,18 @@ async function update(success: boolean) { }); } catch (err) { // only checking the warn messages in this test - expect(logger.warn).lastCalledWith(`rulesClient.update('alert-id') conflict, exceeded retries`); + expect(logger.warn).lastCalledWith(`rulesClient.update('rule-id') conflict, exceeded retries`); return expectConflict(success, err, 'create'); } expectSuccess(success, 2, 'create'); // only checking the debug messages in this test - expect(logger.debug).nthCalledWith(1, `rulesClient.update('alert-id') conflict, retrying ...`); + expect(logger.debug).nthCalledWith(1, `rulesClient.update('rule-id') conflict, retrying ...`); } async function updateApiKey(success: boolean) { try { - await rulesClient.updateApiKey({ id: MockAlertId }); + await rulesClient.updateApiKey({ id: MockRuleId }); } catch (err) { return expectConflict(success, err); } @@ -153,10 +153,10 @@ async function updateApiKey(success: boolean) { } async function enable(success: boolean) { - setupRawAlertMocks({}, { enabled: false }); + setupRawRuleMocks({}, { enabled: false }); try { - await rulesClient.enable({ id: MockAlertId }); + await rulesClient.enable({ id: MockRuleId }); } catch (err) { return expectConflict(success, err); } @@ -168,7 +168,7 @@ async function enable(success: boolean) { async function disable(success: boolean) { try { - await rulesClient.disable({ id: MockAlertId }); + await rulesClient.disable({ id: MockRuleId }); } catch (err) { return expectConflict(success, err); } @@ -178,7 +178,7 @@ async function disable(success: boolean) { async function muteAll(success: boolean) { try { - await rulesClient.muteAll({ id: MockAlertId }); + await rulesClient.muteAll({ id: MockRuleId }); } catch (err) { return expectConflict(success, err); } @@ -188,7 +188,7 @@ async function muteAll(success: boolean) { async function unmuteAll(success: boolean) { try { - await rulesClient.unmuteAll({ id: MockAlertId }); + await rulesClient.unmuteAll({ id: MockRuleId }); } catch (err) { return expectConflict(success, err); } @@ -198,7 +198,7 @@ async function unmuteAll(success: boolean) { async function muteInstance(success: boolean) { try { - await rulesClient.muteInstance({ alertId: MockAlertId, alertInstanceId: 'instance-id' }); + await rulesClient.muteInstance({ alertId: MockRuleId, alertInstanceId: 'instance-id' }); } catch (err) { return expectConflict(success, err); } @@ -207,9 +207,9 @@ async function muteInstance(success: boolean) { } async function unmuteInstance(success: boolean) { - setupRawAlertMocks({}, { mutedInstanceIds: ['instance-id'] }); + setupRawRuleMocks({}, { mutedInstanceIds: ['instance-id'] }); try { - await rulesClient.unmuteInstance({ alertId: MockAlertId, alertInstanceId: 'instance-id' }); + await rulesClient.unmuteInstance({ alertId: MockRuleId, alertInstanceId: 'instance-id' }); } catch (err) { return expectConflict(success, err); } @@ -233,7 +233,7 @@ function expectSuccess( function expectConflict(success: boolean, err: Error, method: 'update' | 'create' = 'update') { const conflictErrorMessage = SavedObjectsErrorHelpers.createConflictError( RULE_SAVED_OBJECT_TYPE, - MockAlertId + MockRuleId ).message; expect(`${err}`).toBe(`Error: ${conflictErrorMessage}`); @@ -253,7 +253,7 @@ function testFn(fn: (success: boolean) => unknown, success: boolean) { function mockSavedObjectUpdateConflictErrorTimes(times: number) { // default success value const mockUpdateValue = { - id: MockAlertId, + id: MockRuleId, type: RULE_SAVED_OBJECT_TYPE, attributes: { actions: [], @@ -268,21 +268,21 @@ function mockSavedObjectUpdateConflictErrorTimes(times: number) { // queue up specified number of errors before a success call for (let i = 0; i < times; i++) { unsecuredSavedObjectsClient.update.mockRejectedValueOnce( - SavedObjectsErrorHelpers.createConflictError(RULE_SAVED_OBJECT_TYPE, MockAlertId) + SavedObjectsErrorHelpers.createConflictError(RULE_SAVED_OBJECT_TYPE, MockRuleId) ); unsecuredSavedObjectsClient.create.mockRejectedValueOnce( - SavedObjectsErrorHelpers.createConflictError(RULE_SAVED_OBJECT_TYPE, MockAlertId) + SavedObjectsErrorHelpers.createConflictError(RULE_SAVED_OBJECT_TYPE, MockRuleId) ); } } // set up mocks needed to get the tested methods to run -function setupRawAlertMocks( +function setupRawRuleMocks( overrides: Record = {}, attributeOverrides: Record = {} ) { const rawRule = { - id: MockAlertId, + id: MockRuleId, type: RULE_SAVED_OBJECT_TYPE, attributes: { enabled: true, @@ -405,5 +405,5 @@ beforeEach(() => { rulesClient = new RulesClient(rulesClientParams); - setupRawAlertMocks(); + setupRawRuleMocks(); }); diff --git a/x-pack/plugins/alerting/server/task_runner/rule_loader.test.ts b/x-pack/plugins/alerting/server/task_runner/rule_loader.test.ts index f7d2bc2b0950f..4524c08b56688 100644 --- a/x-pack/plugins/alerting/server/task_runner/rule_loader.test.ts +++ b/x-pack/plugins/alerting/server/task_runner/rule_loader.test.ts @@ -19,7 +19,7 @@ import { ruleTypeRegistryMock } from '../rule_type_registry.mock'; import { rulesClientMock } from '../rules_client.mock'; import { Rule } from '../types'; import { MONITORING_HISTORY_LIMIT, RuleExecutionStatusErrorReasons } from '../../common'; -import { ErrorWithReason, getReasonFromError } from '../lib/error_with_reason'; +import { getReasonFromError } from '../lib/error_with_reason'; import { mockedRawRuleSO, mockedRule } from './fixtures'; import { RULE_SAVED_OBJECT_TYPE } from '../saved_objects'; import { getErrorSource, TaskErrorSource } from '@kbn/task-manager-plugin/server/task_running'; @@ -48,26 +48,16 @@ describe('rule_loader', () => { bar: schema.boolean(), }); - const getDefaultValidateRuleParams = ({ - error, - enabled: ruleEnabled = true, - }: { - error?: ErrorWithReason; - enabled?: boolean; - }) => ({ + const getDefaultValidateRuleParams = (ruleEnabled: boolean = true) => ({ paramValidator, ruleId, spaceId, ruleTypeRegistry, - ruleData: error - ? { error } - : { - data: { - indirectParams: { ...mockedRawRuleSO.attributes, enabled: ruleEnabled }, - version: '1', - references: [], - }, - }, + ruleData: { + rawRule: { ...mockedRawRuleSO.attributes, enabled: ruleEnabled }, + version: '1', + references: [], + }, }); beforeEach(() => { @@ -92,7 +82,7 @@ describe('rule_loader', () => { describe('succeeds', () => { test('validates and returns the results', () => { const result = validateRuleAndCreateFakeRequest({ - ...getDefaultValidateRuleParams({}), + ...getDefaultValidateRuleParams(), context, }); @@ -107,27 +97,11 @@ describe('rule_loader', () => { }); }); - test('throws when there is decrypt attributes error', () => { - let outcome = 'success'; - try { - validateRuleAndCreateFakeRequest({ - ...getDefaultValidateRuleParams({ - error: new ErrorWithReason(RuleExecutionStatusErrorReasons.Decrypt, new Error('test')), - }), - context, - }); - } catch (err) { - outcome = 'failure'; - expect(getReasonFromError(err)).toBe(RuleExecutionStatusErrorReasons.Decrypt); - } - expect(outcome).toBe('failure'); - }); - test('throws when rule is not enabled', async () => { let outcome = 'success'; try { validateRuleAndCreateFakeRequest({ - ...getDefaultValidateRuleParams({ enabled: false }), + ...getDefaultValidateRuleParams(false), context, }); } catch (err) { @@ -146,7 +120,7 @@ describe('rule_loader', () => { let outcome = 'success'; try { validateRuleAndCreateFakeRequest({ - ...getDefaultValidateRuleParams({}), + ...getDefaultValidateRuleParams(), context, }); } catch (err) { @@ -164,7 +138,7 @@ describe('rule_loader', () => { let outcome = 'success'; try { validateRuleAndCreateFakeRequest({ - ...getDefaultValidateRuleParams({}), + ...getDefaultValidateRuleParams(), context, }); } catch (err) { @@ -182,7 +156,7 @@ describe('rule_loader', () => { contextMock.spaceIdToNamespace.mockReturnValue(undefined); const result = await getDecryptedRule(context, ruleId, 'default'); - expect(result.indirectParams).toEqual({ + expect(result.rawRule).toEqual({ ...mockedRawRuleSO.attributes, apiKey, enabled, @@ -201,7 +175,7 @@ describe('rule_loader', () => { const result = await getDecryptedRule(context, ruleId, spaceId); expect(contextMock.spaceIdToNamespace.mock.calls[0]).toEqual([spaceId]); - expect(result.indirectParams).toEqual({ + expect(result.rawRule).toEqual({ ...mockedRawRuleSO.attributes, apiKey, enabled, diff --git a/x-pack/plugins/alerting/server/task_runner/rule_loader.ts b/x-pack/plugins/alerting/server/task_runner/rule_loader.ts index 555a38886d3c5..ae80b03bd0b4e 100644 --- a/x-pack/plugins/alerting/server/task_runner/rule_loader.ts +++ b/x-pack/plugins/alerting/server/task_runner/rule_loader.ts @@ -14,10 +14,6 @@ import { SavedObjectReference, SavedObjectsErrorHelpers, } from '@kbn/core/server'; -import { - LoadedIndirectParams, - LoadIndirectParamsResult, -} from '@kbn/task-manager-plugin/server/task'; import { createTaskRunError, TaskErrorSource } from '@kbn/task-manager-plugin/server'; import { RunRuleParams, TaskRunnerContext } from './types'; import { ErrorWithReason, validateRuleTypeParams } from '../lib'; @@ -30,18 +26,16 @@ import { import { MONITORING_HISTORY_LIMIT, RuleTypeParams } from '../../common'; import { RULE_SAVED_OBJECT_TYPE } from '../saved_objects'; -export interface RuleData extends LoadedIndirectParams { - indirectParams: RawRule; +interface RuleData { + rawRule: RawRule; version: string | undefined; references: SavedObjectReference[]; } -export type RuleDataResult = LoadIndirectParamsResult; - interface ValidateRuleAndCreateFakeRequestParams { context: TaskRunnerContext; paramValidator?: RuleTypeParamsValidator; - ruleData: RuleDataResult; + ruleData: RuleData; ruleId: string; ruleTypeRegistry: RuleTypeRegistry; spaceId: string; @@ -56,23 +50,16 @@ interface ValidateRuleAndCreateFakeRequestParams export function validateRuleAndCreateFakeRequest( params: ValidateRuleAndCreateFakeRequestParams ): RunRuleParams { - // If there was a prior error loading the decrypted rule SO, exit early - if (params.ruleData.error) { - throw params.ruleData.error; - } - const { context, paramValidator, - ruleData: { - data: { indirectParams, references, version }, - }, + ruleData: { rawRule, references, version }, ruleId, ruleTypeRegistry, spaceId, } = params; - const { enabled, apiKey, alertTypeId: ruleTypeId } = indirectParams; + const { enabled, apiKey, alertTypeId: ruleTypeId } = rawRule; if (!enabled) { throw createTaskRunError( @@ -89,7 +76,7 @@ export function validateRuleAndCreateFakeRequest( const rule = rulesClient.getAlertFromRaw({ id: ruleId, ruleTypeId, - rawRule: indirectParams as RawRule, + rawRule, references, includeLegacyId: false, omitGeneratedValues: false, @@ -150,15 +137,16 @@ export async function getDecryptedRule( { namespace } ); } catch (e) { + const error = new ErrorWithReason(RuleExecutionStatusErrorReasons.Decrypt, e); if (SavedObjectsErrorHelpers.isNotFoundError(e)) { - throw createTaskRunError(e, TaskErrorSource.USER); + throw createTaskRunError(error, TaskErrorSource.USER); } - throw createTaskRunError(e, TaskErrorSource.FRAMEWORK); + throw createTaskRunError(error, TaskErrorSource.FRAMEWORK); } return { version: rawRule.version, - indirectParams: rawRule.attributes, + rawRule: rawRule.attributes, references: rawRule.references, }; } diff --git a/x-pack/plugins/alerting/server/task_runner/task_runner.test.ts b/x-pack/plugins/alerting/server/task_runner/task_runner.test.ts index 56263e0e245a3..cd9ca14d07a1e 100644 --- a/x-pack/plugins/alerting/server/task_runner/task_runner.test.ts +++ b/x-pack/plugins/alerting/server/task_runner/task_runner.test.ts @@ -3285,52 +3285,6 @@ describe('Task Runner', () => { expect(mockUsageCounter.incrementCounter).not.toHaveBeenCalled(); }); - test('loadIndirectParams Fetches the ruleData and returns the indirectParams', async () => { - encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValue(mockedRawRuleSO); - const taskRunner = new TaskRunner({ - ruleType, - taskInstance: { - ...mockedTaskInstance, - state: { - ...mockedTaskInstance.state, - previousStartedAt: new Date(Date.now() - 5 * 60 * 1000).toISOString(), - }, - }, - context: taskRunnerFactoryInitializerParams, - inMemoryMetrics, - }); - - const result = await taskRunner.loadIndirectParams(); - - expect(encryptedSavedObjectsClient.getDecryptedAsInternalUser).toHaveBeenCalledTimes(1); - expect(result).toEqual({ - data: expect.objectContaining({ indirectParams: mockedRawRuleSO.attributes }), - }); - }); - - test('loadIndirectParams return error when cannot fetch the ruleData', async () => { - const error = new Error('test'); - encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockRejectedValueOnce(error); - const taskRunner = new TaskRunner({ - ruleType, - taskInstance: { - ...mockedTaskInstance, - state: { - ...mockedTaskInstance.state, - previousStartedAt: new Date(Date.now() - 5 * 60 * 1000).toISOString(), - }, - }, - context: taskRunnerFactoryInitializerParams, - inMemoryMetrics, - }); - - const result = await taskRunner.loadIndirectParams(); - - expect(encryptedSavedObjectsClient.getDecryptedAsInternalUser).toHaveBeenCalledTimes(1); - expect(result).toEqual({ error }); - expect(getErrorSource(result.error as Error)).toBe(TaskErrorSource.FRAMEWORK); - }); - function testAlertingEventLogCalls({ ruleContext = alertingEventLoggerInitializer, activeAlerts = 0, @@ -3398,7 +3352,6 @@ describe('Task Runner', () => { claim_to_start_duration_ms: 0, persist_alerts_duration_ms: 0, prepare_rule_duration_ms: 0, - prepare_to_run_duration_ms: 0, process_alerts_duration_ms: 0, process_rule_duration_ms: 0, rule_type_run_duration_ms: 0, @@ -3434,7 +3387,6 @@ describe('Task Runner', () => { claim_to_start_duration_ms: 0, persist_alerts_duration_ms: 0, prepare_rule_duration_ms: 0, - prepare_to_run_duration_ms: 0, process_alerts_duration_ms: 0, process_rule_duration_ms: 0, rule_type_run_duration_ms: 0, @@ -3468,7 +3420,6 @@ describe('Task Runner', () => { claim_to_start_duration_ms: 0, persist_alerts_duration_ms: 0, prepare_rule_duration_ms: 0, - prepare_to_run_duration_ms: 0, process_alerts_duration_ms: 0, process_rule_duration_ms: 0, rule_type_run_duration_ms: 0, diff --git a/x-pack/plugins/alerting/server/task_runner/task_runner.ts b/x-pack/plugins/alerting/server/task_runner/task_runner.ts index e65e74c732691..2831ad0657b61 100644 --- a/x-pack/plugins/alerting/server/task_runner/task_runner.ts +++ b/x-pack/plugins/alerting/server/task_runner/task_runner.ts @@ -22,7 +22,6 @@ import { TaskRunnerContext } from './types'; import { getExecutorServices } from './get_executor_services'; import { ElasticsearchError, - ErrorWithReason, executionStatusFromError, executionStatusFromState, getNextRun, @@ -66,12 +65,7 @@ import { import { IExecutionStatusAndMetrics } from '../lib/rule_execution_status'; import { RuleRunMetricsStore } from '../lib/rule_run_metrics_store'; import { AlertingEventLogger } from '../lib/alerting_event_logger/alerting_event_logger'; -import { - getDecryptedRule, - RuleData, - RuleDataResult, - validateRuleAndCreateFakeRequest, -} from './rule_loader'; +import { getDecryptedRule, validateRuleAndCreateFakeRequest } from './rule_loader'; import { TaskRunnerTimer, TaskRunnerTimerSpan } from './task_runner_timer'; import { RuleMonitoringService } from '../monitoring/rule_monitoring_service'; import { ILastRun, lastRunFromState, lastRunToRaw } from '../lib/last_run_status'; @@ -151,7 +145,6 @@ export class TaskRunner< private ruleMonitoring: RuleMonitoringService; private ruleRunning: RunningHandler; private ruleResult: RuleResultService; - private ruleData?: RuleDataResult; private maintenanceWindows: MaintenanceWindow[] = []; private maintenanceWindowsWithoutScopedQueryIds: string[] = []; private ruleTypeRunner: RuleTypeRunner< @@ -442,12 +435,37 @@ export class TaskRunner< * - clear expired snoozes */ private async prepareToRun(): Promise> { - return await this.timer.runWithTimer(TaskRunnerTimerSpan.PrepareToRun, async () => { + return await this.timer.runWithTimer(TaskRunnerTimerSpan.PrepareRule, async () => { const { - params: { alertId: ruleId, spaceId }, + params: { alertId: ruleId, spaceId, consumer }, startedAt, } = this.taskInstance; + // Initially use consumer as stored inside the task instance + // This allows us to populate a consumer value for event log + // `execute-start` events (which are indexed before the rule SO is read) + // and in the event of decryption errors (where we cannot read the rule SO) + // Because "consumer" is set when a rule is created, this value should be static + // for the life of a rule but there may be edge cases where migrations cause + // the consumer values to become out of sync. + if (consumer) { + this.ruleConsumer = consumer; + } + + // Start the event logger so that something is logged in the + // event that rule SO decryption fails. + const namespace = this.context.spaceIdToNamespace(spaceId); + this.alertingEventLogger.initialize({ + ruleId, + ruleType: this.ruleType as UntypedNormalizedRuleType, + consumer: this.ruleConsumer!, + spaceId, + executionId: this.executionId, + taskScheduledAt: this.taskInstance.scheduledAt, + ...(namespace ? { namespace } : {}), + }); + this.alertingEventLogger.start(this.runDate); + if (apm.currentTransaction) { apm.currentTransaction.name = `Execute Alerting Rule`; apm.currentTransaction.addLabels({ @@ -466,13 +484,10 @@ export class TaskRunner< this.timer.setDuration(TaskRunnerTimerSpan.StartTaskRun, startedAt); } - // Load rule SO (indirect task params) if necessary - if (!this.ruleData) { - this.ruleData = await this.loadIndirectParams(); - } + const ruleData = await getDecryptedRule(this.context, ruleId, spaceId); const runRuleParams = validateRuleAndCreateFakeRequest({ - ruleData: this.ruleData, + ruleData, paramValidator: this.ruleType.validate.params, ruleId, spaceId, @@ -651,53 +666,8 @@ export class TaskRunner< }); } - async loadIndirectParams(): Promise> { - this.runDate = new Date(); - return await this.timer.runWithTimer(TaskRunnerTimerSpan.PrepareRule, async () => { - try { - const { - params: { alertId: ruleId, spaceId, consumer }, - } = this.taskInstance; - - // Initially use consumer as stored inside the task instance - // This allows us to populate a consumer value for event log - // `execute-start` events (which are indexed before the rule SO is read) - // and in the event of decryption errors (where we cannot read the rule SO) - // Because "consumer" is set when a rule is created, this value should be static - // for the life of a rule but there may be edge cases where migrations cause - // the consumer values to become out of sync. - if (consumer) { - this.ruleConsumer = consumer; - } - - // Start the event logger so that something is logged in the - // event that rule SO decryption fails. - const namespace = this.context.spaceIdToNamespace(spaceId); - this.alertingEventLogger.initialize({ - ruleId, - ruleType: this.ruleType as UntypedNormalizedRuleType, - consumer: this.ruleConsumer!, - spaceId, - executionId: this.executionId, - taskScheduledAt: this.taskInstance.scheduledAt, - ...(namespace ? { namespace } : {}), - }); - this.alertingEventLogger.start(this.runDate); - - const data = await getDecryptedRule(this.context, ruleId, spaceId); - this.ruleData = { data }; - } catch (err) { - const error = createTaskRunError( - new ErrorWithReason(RuleExecutionStatusErrorReasons.Decrypt, err), - getErrorSource(err) - ); - this.ruleData = { error }; - } - return this.ruleData; - }); - } - async run(): Promise { + this.runDate = new Date(); const { params: { alertId: ruleId, spaceId }, startedAt, @@ -714,7 +684,7 @@ export class TaskRunner< // fetch the rule again to ensure we return the correct schedule as it may have // changed during the task execution const data = await getDecryptedRule(this.context, ruleId, spaceId); - schedule = asOk(data.indirectParams.schedule); + schedule = asOk(data.rawRule.schedule); } catch (err) { stateWithMetrics = asErr(err); schedule = asErr(err); diff --git a/x-pack/plugins/alerting/server/task_runner/task_runner_cancel.test.ts b/x-pack/plugins/alerting/server/task_runner/task_runner_cancel.test.ts index 9a7367533b7c8..8723fa98ef4fc 100644 --- a/x-pack/plugins/alerting/server/task_runner/task_runner_cancel.test.ts +++ b/x-pack/plugins/alerting/server/task_runner/task_runner_cancel.test.ts @@ -531,7 +531,6 @@ describe('Task Runner Cancel', () => { claim_to_start_duration_ms: 0, persist_alerts_duration_ms: 0, prepare_rule_duration_ms: 0, - prepare_to_run_duration_ms: 0, process_alerts_duration_ms: 0, process_rule_duration_ms: 0, rule_type_run_duration_ms: 0, diff --git a/x-pack/plugins/alerting/server/task_runner/task_runner_timer.test.ts b/x-pack/plugins/alerting/server/task_runner/task_runner_timer.test.ts index 137f1f747c42e..3cabaa1fe0450 100644 --- a/x-pack/plugins/alerting/server/task_runner/task_runner_timer.test.ts +++ b/x-pack/plugins/alerting/server/task_runner/task_runner_timer.test.ts @@ -34,7 +34,6 @@ describe('TaskRunnerTimer', () => { claim_to_start_duration_ms: 259200000, persist_alerts_duration_ms: 0, prepare_rule_duration_ms: 0, - prepare_to_run_duration_ms: 0, process_alerts_duration_ms: 0, process_rule_duration_ms: 0, rule_type_run_duration_ms: 0, @@ -53,7 +52,6 @@ describe('TaskRunnerTimer', () => { claim_to_start_duration_ms: 432000000, persist_alerts_duration_ms: 0, prepare_rule_duration_ms: 0, - prepare_to_run_duration_ms: 0, process_alerts_duration_ms: 0, process_rule_duration_ms: 0, rule_type_run_duration_ms: 0, diff --git a/x-pack/plugins/alerting/server/task_runner/task_runner_timer.ts b/x-pack/plugins/alerting/server/task_runner/task_runner_timer.ts index 237fe66793d1e..bcf07834acb66 100644 --- a/x-pack/plugins/alerting/server/task_runner/task_runner_timer.ts +++ b/x-pack/plugins/alerting/server/task_runner/task_runner_timer.ts @@ -10,7 +10,6 @@ import { Logger } from '@kbn/core/server'; export enum TaskRunnerTimerSpan { StartTaskRun = 'claim_to_start_duration_ms', TotalRunDuration = 'total_run_duration_ms', - PrepareToRun = 'prepare_to_run_duration_ms', PrepareRule = 'prepare_rule_duration_ms', RuleTypeRun = 'rule_type_run_duration_ms', ProcessAlerts = 'process_alerts_duration_ms', @@ -61,7 +60,6 @@ export class TaskRunnerTimer { [TaskRunnerTimerSpan.StartTaskRun]: this.timings[TaskRunnerTimerSpan.StartTaskRun] ?? 0, [TaskRunnerTimerSpan.TotalRunDuration]: this.timings[TaskRunnerTimerSpan.TotalRunDuration] ?? 0, - [TaskRunnerTimerSpan.PrepareToRun]: this.timings[TaskRunnerTimerSpan.PrepareToRun] ?? 0, [TaskRunnerTimerSpan.PrepareRule]: this.timings[TaskRunnerTimerSpan.PrepareRule] ?? 0, [TaskRunnerTimerSpan.RuleTypeRun]: this.timings[TaskRunnerTimerSpan.RuleTypeRun] ?? 0, [TaskRunnerTimerSpan.ProcessAlerts]: this.timings[TaskRunnerTimerSpan.ProcessAlerts] ?? 0, diff --git a/x-pack/plugins/cases/public/components/app/index.tsx b/x-pack/plugins/cases/public/components/app/index.tsx index 49258c655556c..cc6c572275721 100644 --- a/x-pack/plugins/cases/public/components/app/index.tsx +++ b/x-pack/plugins/cases/public/components/app/index.tsx @@ -7,7 +7,6 @@ import React from 'react'; import type { ScopedFilesClient } from '@kbn/files-plugin/public'; -import { EuiFlexGroup } from '@elastic/eui'; import type { ExternalReferenceAttachmentTypeRegistry } from '../../client/attachment_framework/external_reference_registry'; import type { PersistableStateAttachmentTypeRegistry } from '../../client/attachment_framework/persistable_state_registry'; @@ -33,7 +32,7 @@ const CasesAppComponent: React.FC = ({ const userCapabilities = useApplicationCapabilities(); return ( - +
{getCasesLazy({ externalReferenceAttachmentTypeRegistry, persistableStateAttachmentTypeRegistry, @@ -44,7 +43,7 @@ const CasesAppComponent: React.FC = ({ basePath: '/', features: { alerts: { enabled: true, sync: false } }, })} - +
); }; diff --git a/x-pack/plugins/cases/public/components/case_view/components/edit_tags.test.tsx b/x-pack/plugins/cases/public/components/case_view/components/edit_tags.test.tsx index b1ac130d015c6..7ced679368434 100644 --- a/x-pack/plugins/cases/public/components/case_view/components/edit_tags.test.tsx +++ b/x-pack/plugins/cases/public/components/case_view/components/edit_tags.test.tsx @@ -25,7 +25,8 @@ const defaultProps: EditTagsProps = { tags: [], }; -describe('EditTags ', () => { +// FLAKY: https://github.com/elastic/kibana/issues/175655 +describe.skip('EditTags ', () => { let appMockRender: AppMockRenderer; const sampleTags = ['coke', 'pepsi']; diff --git a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_create_drilldown/flyout_create_drilldown.test.tsx b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_create_drilldown/flyout_create_drilldown.test.tsx index 50fe2e570b9a6..441e7525ce3a4 100644 --- a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_create_drilldown/flyout_create_drilldown.test.tsx +++ b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_create_drilldown/flyout_create_drilldown.test.tsx @@ -18,6 +18,7 @@ import { import { coreMock } from '@kbn/core/public/mocks'; import { uiActionsEnhancedPluginMock } from '@kbn/ui-actions-enhanced-plugin/public/mocks'; import { UiActionsEnhancedActionFactory } from '@kbn/ui-actions-enhanced-plugin/public'; +import { DynamicActionsSerializedState } from '@kbn/embeddable-enhanced-plugin/public/plugin'; function createAction( allPossibleTriggers = ['VALUE_CLICK_TRIGGER'], @@ -50,6 +51,9 @@ function createAction( ]); return new FlyoutCreateDrilldownAction(params); } +const dynamicActionsState$ = new BehaviorSubject({ + dynamicActions: { events: [] }, +}); const compatibleEmbeddableApi = { enhancements: { @@ -59,6 +63,10 @@ const compatibleEmbeddableApi = { uiActions: uiActionsEnhancedPluginMock.createStartContract(), }), }, + setDynamicActions: (newDynamicActions: DynamicActionsSerializedState['enhancements']) => { + dynamicActionsState$.next(newDynamicActions); + }, + dynamicActionsState$, parentApi: { type: 'dashboard', }, diff --git a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_edit_drilldown/flyout_edit_drilldown.test.tsx b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_edit_drilldown/flyout_edit_drilldown.test.tsx index 1aa64bd6e5a9e..bd9ac25429768 100644 --- a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_edit_drilldown/flyout_edit_drilldown.test.tsx +++ b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_edit_drilldown/flyout_edit_drilldown.test.tsx @@ -5,15 +5,17 @@ * 2.0. */ -import { BehaviorSubject, Subject } from 'rxjs'; -import { FlyoutEditDrilldownAction, FlyoutEditDrilldownParams } from './flyout_edit_drilldown'; import { coreMock } from '@kbn/core/public/mocks'; +import { DynamicActionsSerializedState } from '@kbn/embeddable-enhanced-plugin/public/plugin'; import type { ViewMode } from '@kbn/presentation-publishing'; +import { SerializedEvent } from '@kbn/ui-actions-enhanced-plugin/common'; import { - UiActionsEnhancedMemoryActionStorage as MemoryActionStorage, UiActionsEnhancedDynamicActionManager as DynamicActionManager, + UiActionsEnhancedMemoryActionStorage as MemoryActionStorage, } from '@kbn/ui-actions-enhanced-plugin/public'; import { uiActionsEnhancedPluginMock } from '@kbn/ui-actions-enhanced-plugin/public/mocks'; +import { BehaviorSubject, Subject } from 'rxjs'; +import { FlyoutEditDrilldownAction, FlyoutEditDrilldownParams } from './flyout_edit_drilldown'; function createAction(overlays = coreMock.createStart().overlays) { const uiActionsPlugin = uiActionsEnhancedPluginMock.createPlugin(); @@ -37,6 +39,9 @@ function createAction(overlays = coreMock.createStart().overlays) { }; return new FlyoutEditDrilldownAction(params); } +const dynamicActionsState$ = new BehaviorSubject({ + dynamicActions: { events: [{} as SerializedEvent] }, +}); const compatibleEmbeddableApi = { enhancements: { @@ -46,6 +51,10 @@ const compatibleEmbeddableApi = { uiActions: uiActionsEnhancedPluginMock.createStartContract(), }), }, + setDynamicActions: (newDynamicActions: DynamicActionsSerializedState['enhancements']) => { + dynamicActionsState$.next(newDynamicActions); + }, + dynamicActionsState$, supportedTriggers: () => { return ['VALUE_CLICK_TRIGGER']; }, @@ -82,14 +91,17 @@ describe('isCompatible', () => { }); test('not compatible if no drilldowns', async () => { + const newDynamicActionsState$ = new BehaviorSubject< + DynamicActionsSerializedState['enhancements'] + >({ + dynamicActions: { events: [] }, + }); + const embeddableApi = { ...compatibleEmbeddableApi, - enhancements: { - dynamicActions: new DynamicActionManager({ - storage: new MemoryActionStorage(), - isCompatible: async () => true, - uiActions: uiActionsEnhancedPluginMock.createStartContract(), - }), + dynamicActionsState$: newDynamicActionsState$, + setDynamicActions: (newDynamicActions: DynamicActionsSerializedState['enhancements']) => { + newDynamicActionsState$.next(newDynamicActions); }, }; const action = createAction(); diff --git a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_edit_drilldown/flyout_edit_drilldown.tsx b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_edit_drilldown/flyout_edit_drilldown.tsx index ebd4a6a3441e9..bf5588e762574 100644 --- a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_edit_drilldown/flyout_edit_drilldown.tsx +++ b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_edit_drilldown/flyout_edit_drilldown.tsx @@ -69,9 +69,8 @@ export class FlyoutEditDrilldownAction implements Action { public readonly MenuItem = MenuItem as any; public async isCompatible({ embeddable }: EmbeddableApiContext) { - if (!isApiCompatible(embeddable)) return false; - if (getInheritedViewMode(embeddable) !== 'edit') return false; - return embeddable.enhancements.dynamicActions.state.get().events.length > 0; + if (!isApiCompatible(embeddable) || getInheritedViewMode(embeddable) !== 'edit') return false; + return (embeddable.dynamicActionsState$.getValue()?.dynamicActions.events ?? []).length > 0; } public async execute({ embeddable }: EmbeddableApiContext) { diff --git a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_edit_drilldown/menu_item.test.tsx b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_edit_drilldown/menu_item.test.tsx index 5503a2cb882fa..ddd13b0322340 100644 --- a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_edit_drilldown/menu_item.test.tsx +++ b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_edit_drilldown/menu_item.test.tsx @@ -5,21 +5,29 @@ * 2.0. */ -import React from 'react'; -import { render, act } from '@testing-library/react'; -import { MenuItem } from './menu_item'; +import { DynamicActionsSerializedState } from '@kbn/embeddable-enhanced-plugin/public/plugin'; import { createStateContainer } from '@kbn/kibana-utils-plugin/public'; +import { SerializedEvent } from '@kbn/ui-actions-enhanced-plugin/common'; import { UiActionsEnhancedDynamicActionManager as DynamicActionManager } from '@kbn/ui-actions-enhanced-plugin/public'; -import { EnhancedEmbeddable } from '@kbn/embeddable-enhanced-plugin/public'; +import { act, render } from '@testing-library/react'; +import React from 'react'; +import { BehaviorSubject } from 'rxjs'; +import { FlyoutEditDrilldownActionApi } from './flyout_edit_drilldown'; +import { MenuItem } from './menu_item'; test('', () => { - const state = createStateContainer<{ events: object[] }>({ events: [] }); + const dynamicActionsState$ = new BehaviorSubject({ + dynamicActions: { events: [] }, + }); + + const state = createStateContainer<{ events: SerializedEvent[] }>({ events: [] }); const context = { embeddable: { enhancements: { dynamicActions: { state } as unknown as DynamicActionManager, }, - } as unknown as EnhancedEmbeddable, + dynamicActionsState$, + } as unknown as FlyoutEditDrilldownActionApi, trigger: {}, }; const { getByText, queryByText } = render(); @@ -28,7 +36,9 @@ test('', () => { expect(queryByText('0')).not.toBeInTheDocument(); act(() => { - state.set({ events: [{}] }); + dynamicActionsState$.next({ + dynamicActions: { events: [{} as SerializedEvent] }, + }); }); expect(queryByText('1')).toBeInTheDocument(); diff --git a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_edit_drilldown/menu_item.tsx b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_edit_drilldown/menu_item.tsx index 939c19bbd1315..13698c5becde9 100644 --- a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_edit_drilldown/menu_item.tsx +++ b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_edit_drilldown/menu_item.tsx @@ -5,15 +5,22 @@ * 2.0. */ -import React from 'react'; -import { EuiNotificationBadge, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; -import { useContainerState } from '@kbn/kibana-utils-plugin/public'; -import { EnhancedEmbeddableContext } from '@kbn/embeddable-enhanced-plugin/public'; +import { EuiFlexGroup, EuiFlexItem, EuiNotificationBadge } from '@elastic/eui'; +import { useStateFromPublishingSubject } from '@kbn/presentation-publishing'; +import React, { useMemo } from 'react'; +import { FlyoutEditDrilldownActionApi } from './flyout_edit_drilldown'; import { txtDisplayName } from './i18n'; -export const MenuItem = ({ context }: { context: EnhancedEmbeddableContext }) => { - const { events } = useContainerState(context.embeddable.enhancements.dynamicActions.state); - const count = events.length; +export const MenuItem = ({ + context: { embeddable }, +}: { + context: { embeddable: FlyoutEditDrilldownActionApi }; +}) => { + const dynamicActionsState = useStateFromPublishingSubject(embeddable.dynamicActionsState$); + + const count = useMemo(() => { + return (dynamicActionsState?.dynamicActions?.events ?? []).length; + }, [dynamicActionsState]); return ( diff --git a/x-pack/plugins/data_visualizer/public/application/data_drift/document_count_chart_single_brush/document_count_chart_singular.tsx b/x-pack/plugins/data_visualizer/public/application/data_drift/document_count_chart_single_brush/document_count_chart_singular.tsx index d67f0b42f4f45..d281834b4e509 100644 --- a/x-pack/plugins/data_visualizer/public/application/data_drift/document_count_chart_single_brush/document_count_chart_singular.tsx +++ b/x-pack/plugins/data_visualizer/public/application/data_drift/document_count_chart_single_brush/document_count_chart_singular.tsx @@ -383,7 +383,7 @@ export const DocumentCountChartWithBrush: FC = (props)
({ apiConfig: { connectorId: '1', defaultSystemPromptId: 'Default', - connectorTypeTitle: 'Test connector', model: 'model', }, excludeFromLastConversationStorage: false, @@ -91,7 +90,6 @@ export const getUpdateConversationSchemaMock = ( apiConfig: { connectorId: '2', defaultSystemPromptId: 'Default', - connectorTypeTitle: 'Test connector', model: 'model', }, excludeFromLastConversationStorage: false, @@ -131,7 +129,6 @@ export const getConversationMock = ( apiConfig: { connectorId: '1', defaultSystemPromptId: 'Default', - connectorTypeTitle: 'OpenAI', }, replacements: [], title: 'test', @@ -156,7 +153,6 @@ export const getQueryConversationParams = ( apiConfig: { connectorId: '2', defaultSystemPromptId: 'Default', - connectorTypeTitle: 'Test connector', model: 'model', }, category: 'assistant', @@ -180,7 +176,6 @@ export const getQueryConversationParams = ( apiConfig: { connectorId: '1', defaultSystemPromptId: 'Default', - connectorTypeTitle: 'Test connector', model: 'model', }, excludeFromLastConversationStorage: false, diff --git a/x-pack/plugins/elastic_assistant/server/__mocks__/response.ts b/x-pack/plugins/elastic_assistant/server/__mocks__/response.ts index 5ba6946c68688..3b71dfcfbb67c 100644 --- a/x-pack/plugins/elastic_assistant/server/__mocks__/response.ts +++ b/x-pack/plugins/elastic_assistant/server/__mocks__/response.ts @@ -69,7 +69,6 @@ export const getConversationResponseMock = ( title: 'test', apiConfig: { connectorId: '1', - connectorTypeTitle: 'test-connector', defaultSystemPromptId: 'default-system-prompt', model: 'test-model', provider: 'OpenAI', diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/append_conversation_messages.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/append_conversation_messages.ts index 227e462d7a408..37b4805afe206 100644 --- a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/append_conversation_messages.ts +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/append_conversation_messages.ts @@ -95,7 +95,7 @@ export const transformToUpdateScheme = (updatedAt: string, messages: Message[]) return { updated_at: updatedAt, messages: messages?.map((message) => ({ - '@timestamp': new Date(message.timestamp).toISOString(), + '@timestamp': message.timestamp, content: message.content, is_error: message.isError, reader: message.reader, diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/create_conversation.test.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/create_conversation.test.ts index 5d6851538be0c..2ac98390ccef0 100644 --- a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/create_conversation.test.ts +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/create_conversation.test.ts @@ -30,7 +30,6 @@ export const getCreateConversationMock = (): ConversationCreateProps => ({ title: 'test', apiConfig: { connectorId: '1', - connectorTypeTitle: 'test-connector', defaultSystemPromptId: 'default-system-prompt', model: 'test-model', provider: 'OpenAI', @@ -47,7 +46,6 @@ export const getConversationResponseMock = (): ConversationResponse => ({ title: 'test', apiConfig: { connectorId: '1', - connectorTypeTitle: 'test-connector', defaultSystemPromptId: 'default-system-prompt', model: 'test-model', provider: 'OpenAI', @@ -96,7 +94,6 @@ export const getSearchConversationMock = exclude_from_last_conversation_storage: false, api_config: { connector_id: 'c1', - connector_type_title: 'title-c-1', default_system_prompt_id: 'prompt-1', model: 'test', provider: 'Azure OpenAI', diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/create_conversation.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/create_conversation.ts index 6558d6c5123dc..7dc36f9d4bd36 100644 --- a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/create_conversation.ts +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/create_conversation.ts @@ -86,7 +86,6 @@ export const transformToCreateScheme = ( api_config: apiConfig ? { connector_id: apiConfig.connectorId, - connector_type_title: apiConfig.connectorTypeTitle, default_system_prompt_id: apiConfig.defaultSystemPromptId, model: apiConfig.model, provider: apiConfig.provider, @@ -95,7 +94,7 @@ export const transformToCreateScheme = ( exclude_from_last_conversation_storage: excludeFromLastConversationStorage, is_default: isDefault, messages: messages?.map((message) => ({ - '@timestamp': new Date(message.timestamp).toISOString(), + '@timestamp': message.timestamp, content: message.content, is_error: message.isError, reader: message.reader, diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/field_maps_configuration.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/field_maps_configuration.ts index 9c2461ac928f5..870c71157813f 100644 --- a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/field_maps_configuration.ts +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/field_maps_configuration.ts @@ -147,11 +147,6 @@ export const conversationsFieldMap: FieldMap = { array: false, required: false, }, - 'api_config.connector_type_title': { - type: 'keyword', - array: false, - required: false, - }, 'api_config.default_system_prompt_id': { type: 'keyword', array: false, diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/get_conversation.test.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/get_conversation.test.ts index 1ea3962c9def9..e0b10ab8df5c4 100644 --- a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/get_conversation.test.ts +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/get_conversation.test.ts @@ -26,7 +26,6 @@ export const getConversationResponseMock = (): ConversationResponse => ({ timestamp: '2020-04-20T15:25:31.830Z', apiConfig: { connectorId: 'c1', - connectorTypeTitle: 'title-c-1', defaultSystemPromptId: 'prompt-1', model: 'test', provider: 'Azure OpenAI', @@ -79,7 +78,6 @@ export const getSearchConversationMock = exclude_from_last_conversation_storage: false, api_config: { connector_id: 'c1', - connector_type_title: 'title-c-1', default_system_prompt_id: 'prompt-1', model: 'test', provider: 'Azure OpenAI', diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/helpers.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/helpers.ts index 3d022c0063fa5..baaa0a6e94a9f 100644 --- a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/helpers.ts +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/helpers.ts @@ -21,9 +21,6 @@ export const getUpdateScript = ({ if (params.assignEmpty == true || params.api_config.containsKey('connector_id')) { ctx._source.api_config.connector_id = params.api_config.connector_id; } - if (params.assignEmpty == true || params.api_config.containsKey('connector_type_title')) { - ctx._source.api_config.connector_type_title = params.api_config.connector_type_title; - } if (params.assignEmpty == true || params.api_config.containsKey('default_system_prompt_id')) { ctx._source.api_config.default_system_prompt_id = params.api_config.default_system_prompt_id; } diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/index.test.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/index.test.ts index ec1a36ceb3563..5e644861726a1 100644 --- a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/index.test.ts +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/index.test.ts @@ -61,7 +61,6 @@ describe('AIAssistantConversationsDataClient', () => { api_config: { connector_id: 'bedbf764-b991-4115-a9fc-1cfeaef21046', model: 'anthropic.claude-v2', - connector_type_title: 'Amazon Bedrock', }, namespace: 'hghjghjghghjghg33', created_at: '2024-01-25T01:32:37.649Z', @@ -113,7 +112,6 @@ describe('AIAssistantConversationsDataClient', () => { expect(result).toEqual({ apiConfig: { connectorId: 'bedbf764-b991-4115-a9fc-1cfeaef21046', - connectorTypeTitle: 'Amazon Bedrock', defaultSystemPromptId: undefined, model: 'anthropic.claude-v2', provider: undefined, @@ -180,7 +178,6 @@ describe('AIAssistantConversationsDataClient', () => { params: { api_config: { connector_id: '2', - connector_type_title: 'Test connector', default_system_prompt_id: 'Default', model: 'model', provider: undefined, diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/transforms.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/transforms.ts index b9d745dc0b625..fa70914d07e9b 100644 --- a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/transforms.ts +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/transforms.ts @@ -36,7 +36,6 @@ export const transformESToConversations = ( ? { apiConfig: { connectorId: conversationSchema.api_config.connector_id, - connectorTypeTitle: conversationSchema.api_config.connector_type_title, defaultSystemPromptId: conversationSchema.api_config.default_system_prompt_id, model: conversationSchema.api_config.model, provider: conversationSchema.api_config.provider, @@ -49,7 +48,7 @@ export const transformESToConversations = ( messages: // eslint-disable-next-line @typescript-eslint/no-explicit-any conversationSchema.messages?.map((message: Record) => ({ - timestamp: new Date(message['@timestamp']).toLocaleString(), + timestamp: message['@timestamp'], // always return anonymized data from the client content: replaceOriginalValuesWithUuidValues({ messageContent: message.content, diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/types.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/types.ts index 9eb4633c366ec..24ef8b2e8a941 100644 --- a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/types.ts +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/types.ts @@ -39,7 +39,6 @@ export interface SearchEsConversationSchema { }>; api_config?: { connector_id: string; - connector_type_title: string; default_system_prompt_id?: string; provider?: Provider; model?: string; @@ -74,7 +73,6 @@ export interface CreateMessageSchema { }>; api_config?: { connector_id?: string; - connector_type_title?: string; default_system_prompt_id?: string; provider?: Provider; model?: string; diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/update_conversation.test.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/update_conversation.test.ts index 3b1983d5f77e8..0d2679e839c71 100644 --- a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/update_conversation.test.ts +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/update_conversation.test.ts @@ -7,7 +7,11 @@ import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { loggerMock } from '@kbn/logging-mocks'; -import { updateConversation } from './update_conversation'; +import { + UpdateConversationSchema, + transformToUpdateScheme, + updateConversation, +} from './update_conversation'; import { getConversation } from './get_conversation'; import { ConversationResponse, ConversationUpdateProps } from '@kbn/elastic-assistant-common'; import { AuthenticatedUser } from '@kbn/security-plugin-types-common'; @@ -17,7 +21,6 @@ export const getUpdateConversationOptionsMock = (): ConversationUpdateProps => ( title: 'test', apiConfig: { connectorId: '1', - connectorTypeTitle: 'test-connector', defaultSystemPromptId: 'default-system-prompt', model: 'test-model', provider: 'OpenAI', @@ -40,14 +43,24 @@ export const getConversationResponseMock = (): ConversationResponse => ({ title: 'test', apiConfig: { connectorId: '1', - connectorTypeTitle: 'test-connector', defaultSystemPromptId: 'default-system-prompt', model: 'test-model', provider: 'OpenAI', }, category: 'assistant', excludeFromLastConversationStorage: false, - messages: [], + messages: [ + { + content: 'Message 3', + role: 'user', + timestamp: '2024-02-14T22:29:43.862Z', + }, + { + content: 'Message 4', + role: 'user', + timestamp: '2024-02-14T22:29:43.862Z', + }, + ], replacements: [], createdAt: '2020-04-20T15:25:31.830Z', namespace: 'default', @@ -113,3 +126,74 @@ describe('updateConversation', () => { expect(updatedList).toEqual(null); }); }); + +describe('transformToUpdateScheme', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + afterEach(() => { + jest.clearAllMocks(); + }); + + test('it returns a transformed conversation with converted string datetime to ISO from the client', async () => { + const conversation: ConversationUpdateProps = getUpdateConversationOptionsMock(); + const existingConversation = getConversationResponseMock(); + (getConversation as unknown as jest.Mock).mockResolvedValueOnce(existingConversation); + + const updateAt = new Date().toISOString(); + const transformed = transformToUpdateScheme(updateAt, { + ...conversation, + messages: [ + { + content: 'Message 3', + role: 'user', + timestamp: '2011-10-05T14:48:00.000Z', + }, + { + content: 'Message 4', + role: 'user', + timestamp: '2011-10-06T14:48:00.000Z', + }, + ], + }); + const expected: UpdateConversationSchema = { + id: conversation.id, + title: 'test', + api_config: { + connector_id: '1', + default_system_prompt_id: 'default-system-prompt', + model: 'test-model', + provider: 'OpenAI', + }, + exclude_from_last_conversation_storage: false, + replacements: [], + updated_at: updateAt, + messages: [ + { + '@timestamp': '2011-10-05T14:48:00.000Z', + content: 'Message 3', + is_error: undefined, + reader: undefined, + role: 'user', + trace_data: { + trace_id: undefined, + transaction_id: undefined, + }, + }, + { + '@timestamp': '2011-10-06T14:48:00.000Z', + content: 'Message 4', + is_error: undefined, + reader: undefined, + role: 'user', + trace_data: { + trace_id: undefined, + transaction_id: undefined, + }, + }, + ], + }; + expect(transformed).toEqual(expected); + }); +}); diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/update_conversation.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/update_conversation.ts index 933a8c08a51fe..8395c26f9916e 100644 --- a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/update_conversation.ts +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/update_conversation.ts @@ -37,7 +37,6 @@ export interface UpdateConversationSchema { }>; api_config?: { connector_id?: string; - connector_type_title?: string; default_system_prompt_id?: string; provider?: Provider; model?: string; @@ -118,7 +117,6 @@ export const transformToUpdateScheme = ( title, api_config: { connector_id: apiConfig?.connectorId, - connector_type_title: apiConfig?.connectorTypeTitle, default_system_prompt_id: apiConfig?.defaultSystemPromptId, model: apiConfig?.model, provider: apiConfig?.provider, @@ -126,7 +124,7 @@ export const transformToUpdateScheme = ( exclude_from_last_conversation_storage: excludeFromLastConversationStorage, replacements, messages: messages?.map((message) => ({ - '@timestamp': new Date(message.timestamp).toISOString(), + '@timestamp': message.timestamp, content: message.content, is_error: message.isError, reader: message.reader, diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/find.test.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/find.test.ts index a16cf81fb8de3..bc4f8c574a8a9 100644 --- a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/find.test.ts +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/find.test.ts @@ -25,7 +25,6 @@ export const findDocumentsResponseMock = (): ConversationResponse => ({ timestamp: '2020-04-20T15:25:31.830Z', apiConfig: { connectorId: 'c1', - connectorTypeTitle: 'title-c-1', defaultSystemPromptId: 'prompt-1', model: 'test', provider: 'Azure OpenAI', @@ -70,7 +69,6 @@ export const getSearchConversationMock = exclude_from_last_conversation_storage: false, api_config: { connector_id: 'c1', - connector_type_title: 'title-c-1', default_system_prompt_id: 'prompt-1', model: 'test', provider: 'Azure OpenAI', @@ -137,7 +135,6 @@ describe('findDocuments', () => { '@timestamp': '2020-04-20T15:25:31.830Z', api_config: { connector_id: 'c1', - connector_type_title: 'title-c-1', default_system_prompt_id: 'prompt-1', model: 'test', provider: 'Azure OpenAI', diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/index.test.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/index.test.ts index e375b10425123..fa27331f6c6c5 100644 --- a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/index.test.ts +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/index.test.ts @@ -134,7 +134,6 @@ describe('AIAssistantDataClient', () => { api_config: { connector_id: 'bedbf764-b991-4115-a9fc-1cfeaef21046', model: 'anthropic.claude-v2', - connector_type_title: 'Amazon Bedrock', }, namespace: 'hghjghjghghjghg33', created_at: '2024-01-25T01:32:37.649Z', @@ -194,7 +193,6 @@ describe('AIAssistantDataClient', () => { '@timestamp': '2024-01-25T01:32:37.649Z', api_config: { connector_id: 'bedbf764-b991-4115-a9fc-1cfeaef21046', - connector_type_title: 'Amazon Bedrock', model: 'anthropic.claude-v2', }, created_at: '2024-01-25T01:32:37.649Z', diff --git a/x-pack/plugins/elastic_assistant/server/lib/executor.test.ts b/x-pack/plugins/elastic_assistant/server/lib/executor.test.ts index dedaad2331f41..7c41c32cc89c0 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/executor.test.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/executor.test.ts @@ -29,6 +29,7 @@ const testProps: Omit = { subAction: 'invokeAI', subActionParams: { messages: [{ content: 'hello', role: 'user' }] }, }, + llmType: '.bedrock', request, connectorId, onLlmResponse, diff --git a/x-pack/plugins/elastic_assistant/server/lib/executor.ts b/x-pack/plugins/elastic_assistant/server/lib/executor.ts index 7d5c917e2c890..a0a2c71c30d63 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/executor.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/executor.ts @@ -18,6 +18,7 @@ export interface Props { connectorId: string; params: InvokeAIActionsParams; request: KibanaRequest; + llmType: string; } interface StaticResponse { connector_id: string; @@ -44,6 +45,7 @@ export const executeAction = async ({ actions, params, connectorId, + llmType, request, }: Props): Promise => { const actionsClient = await actions.getActionsClientWithRequest(request); @@ -76,7 +78,7 @@ export const executeAction = async ({ } // do not await, blocks stream for UI - handleStreamStorage(readable, request.body.llmType, onLlmResponse); + handleStreamStorage(readable, llmType, onLlmResponse); return readable.pipe(new PassThrough()); }; diff --git a/x-pack/plugins/elastic_assistant/server/lib/langchain/llm/actions_client_llm.ts b/x-pack/plugins/elastic_assistant/server/lib/langchain/llm/actions_client_llm.ts index ff7086e148b54..b00d6b6233502 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/langchain/llm/actions_client_llm.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/langchain/llm/actions_client_llm.ts @@ -81,9 +81,7 @@ export class ActionsClientLlm extends LLM { subActionParams: { model: this.#request.body.model, messages: [assistantMessage], // the assistant message - ...(this.#request.body.llmType === 'openai' - ? { n: 1, stop: null, temperature: 0.2 } - : {}), + ...(this.llmType === '.gen-ai' ? { n: 1, stop: null, temperature: 0.2 } : {}), }, }, }; diff --git a/x-pack/plugins/elastic_assistant/server/lib/parse_stream.test.ts b/x-pack/plugins/elastic_assistant/server/lib/parse_stream.test.ts index 079824b11416d..331c026f8ed7c 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/parse_stream.test.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/parse_stream.test.ts @@ -52,11 +52,11 @@ describe('handleStreamStorage', () => { it('saves the final string successful streaming event', async () => { stream.complete(); - await handleStreamStorage(stream.transform, 'openai', onMessageSent); + await handleStreamStorage(stream.transform, '.gen-ai', onMessageSent); expect(onMessageSent).toHaveBeenCalledWith('Single.'); }); it('saves the error message on a failed streaming event', async () => { - const tokenPromise = handleStreamStorage(stream.transform, 'openai', onMessageSent); + const tokenPromise = handleStreamStorage(stream.transform, '.gen-ai', onMessageSent); stream.fail(); await expect(tokenPromise).resolves.not.toThrow(); @@ -73,11 +73,11 @@ describe('handleStreamStorage', () => { it('saves the final string successful streaming event', async () => { stream.complete(); - await handleStreamStorage(stream.transform, 'bedrock', onMessageSent); + await handleStreamStorage(stream.transform, '.bedrock', onMessageSent); expect(onMessageSent).toHaveBeenCalledWith('Simple.'); }); it('saves the error message on a failed streaming event', async () => { - const tokenPromise = handleStreamStorage(stream.transform, 'bedrock', onMessageSent); + const tokenPromise = handleStreamStorage(stream.transform, '.bedrock', onMessageSent); stream.fail(); await expect(tokenPromise).resolves.not.toThrow(); diff --git a/x-pack/plugins/elastic_assistant/server/lib/parse_stream.ts b/x-pack/plugins/elastic_assistant/server/lib/parse_stream.ts index fed0a1cfb37bd..834fc1ce788ae 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/parse_stream.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/parse_stream.ts @@ -18,7 +18,7 @@ export const handleStreamStorage: ( onMessageSent?: (content: string) => void ) => Promise = async (responseStream, llmType, onMessageSent) => { try { - const parser = llmType === 'bedrock' ? parseBedrockStream : parseOpenAIStream; + const parser = llmType === '.bedrock' ? parseBedrockStream : parseOpenAIStream; // TODO @steph add abort signal const parsedResponse = await parser(responseStream); if (onMessageSent) { diff --git a/x-pack/plugins/elastic_assistant/server/routes/evaluate/post_evaluate.ts b/x-pack/plugins/elastic_assistant/server/routes/evaluate/post_evaluate.ts index c0157d03a5abc..5a5dd8a8768a3 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/evaluate/post_evaluate.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/evaluate/post_evaluate.ts @@ -154,7 +154,6 @@ export const postEvaluateRoute = ( isEnabledKnowledgeBase: true, isEnabledRAGAlerts: true, conversationId: '', - llmType: 'openai', }, }; diff --git a/x-pack/plugins/elastic_assistant/server/routes/post_actions_connector_execute.test.ts b/x-pack/plugins/elastic_assistant/server/routes/post_actions_connector_execute.test.ts index 098c25c9c881b..48205e153f37b 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/post_actions_connector_execute.test.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/post_actions_connector_execute.test.ts @@ -20,7 +20,9 @@ import { INVOKE_ASSISTANT_SUCCESS_EVENT, } from '../lib/telemetry/event_based_telemetry'; import { getConversationResponseMock } from '../ai_assistant_data_clients/conversations/update_conversation.test'; +import { actionsClientMock } from '@kbn/actions-plugin/server/actions_client/actions_client.mock'; +const actionsClient = actionsClientMock.create(); jest.mock('../lib/build_response', () => ({ buildResponse: jest.fn().mockImplementation((x) => x), })); @@ -67,7 +69,9 @@ const existingConversation = getConversationResponseMock(); const reportEvent = jest.fn(); const mockContext = { elasticAssistant: { - actions: jest.fn(), + actions: { + getActionsClientWithRequest: jest.fn().mockResolvedValue(actionsClient), + }, getRegisteredTools: jest.fn(() => []), logger: loggingSystemMock.createLogger(), telemetry: { ...coreMock.createSetup().analytics, reportEvent }, @@ -136,6 +140,22 @@ describe('postActionsConnectorExecuteRoute', () => { beforeEach(() => { jest.clearAllMocks(); + actionsClient.getBulk.mockResolvedValue([ + { + id: '1', + isPreconfigured: false, + isSystemAction: false, + isDeprecated: false, + name: 'my name', + actionTypeId: '.gen-ai', + isMissingSecrets: false, + config: { + a: true, + b: true, + c: true, + }, + }, + ]); }); it('returns the expected response when isEnabledKnowledgeBase=false', async () => { diff --git a/x-pack/plugins/elastic_assistant/server/routes/post_actions_connector_execute.ts b/x-pack/plugins/elastic_assistant/server/routes/post_actions_connector_execute.ts index ee75fd92b6063..41cba9e51d7c8 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/post_actions_connector_execute.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/post_actions_connector_execute.ts @@ -65,6 +65,9 @@ export const postActionsConnectorExecuteRoute = ( const telemetry = assistantContext.telemetry; try { + // Get the actions plugin start contract from the request context for the agents + const actionsClient = await assistantContext.actions.getActionsClientWithRequest(request); + const authenticatedUser = assistantContext.getCurrentUser(); if (authenticatedUser == null) { return response.unauthorized({ @@ -188,6 +191,10 @@ export const postActionsConnectorExecuteRoute = ( } const connectorId = decodeURIComponent(request.params.connectorId); + const connectors = await actionsClient.getBulk({ + ids: [connectorId], + throwIfSystemAction: false, + }); // get the actions plugin start contract from the request context: const actions = (await context.elasticAssistant).actions; @@ -201,12 +208,13 @@ export const postActionsConnectorExecuteRoute = ( actions, request, connectorId, + llmType: connectors[0]?.actionTypeId, params: { subAction: request.body.subAction, subActionParams: { model: request.body.model, messages: [...(prevMessages ?? []), ...(newMessage ? [newMessage] : [])], - ...(request.body.llmType === 'openai' + ...(connectors[0]?.actionTypeId === '.gen-ai' ? { n: 1, stop: null, temperature: 0.2 } : {}), }, diff --git a/x-pack/plugins/elastic_assistant/server/routes/user_conversations/update_route.test.ts b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/update_route.test.ts index 57aceaec745ec..31c5ba2d4a2e5 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/user_conversations/update_route.test.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/update_route.test.ts @@ -121,7 +121,6 @@ describe('Update conversation route', () => { ...getUpdateConversationSchemaMock(), apiConfig: { connectorId: '123', - connectorTypeTitle: 'OpenAI', defaultSystemPromptId: 'test', }, }, diff --git a/x-pack/plugins/embeddable_enhanced/public/actions/panel_notifications_action.test.ts b/x-pack/plugins/embeddable_enhanced/public/actions/panel_notifications_action.test.ts index 87f0d4e8cf04c..b79cc3719abaa 100644 --- a/x-pack/plugins/embeddable_enhanced/public/actions/panel_notifications_action.test.ts +++ b/x-pack/plugins/embeddable_enhanced/public/actions/panel_notifications_action.test.ts @@ -5,29 +5,40 @@ * 2.0. */ -import { PanelNotificationsAction } from './panel_notifications_action'; -import { EnhancedEmbeddableContext } from '../types'; import { ViewMode } from '@kbn/embeddable-plugin/public'; +import { EmbeddableApiContext, PublishesWritableViewMode } from '@kbn/presentation-publishing'; +import { + DynamicActionManager, + SerializedEvent, +} from '@kbn/ui-actions-enhanced-plugin/public/dynamic_actions'; +import { BehaviorSubject } from 'rxjs'; +import { HasDynamicActions } from '../embeddables/interfaces/has_dynamic_actions'; +import { DynamicActionsSerializedState } from '../plugin'; +import { + PanelNotificationsAction, + PanelNotificationsActionApi, +} from './panel_notifications_action'; + +const createContext = (events: SerializedEvent[] = []): EmbeddableApiContext => { + const dynamicActionsState$ = new BehaviorSubject({ + dynamicActions: { events }, + }); + const viewMode$ = new BehaviorSubject(ViewMode.VIEW); -const createContext = (events: unknown[] = [], isEditMode = false): EnhancedEmbeddableContext => - ({ + return { embeddable: { - getInput: () => - ({ - viewMode: isEditMode ? ViewMode.EDIT : ViewMode.VIEW, - } as unknown), enhancements: { - dynamicActions: { - state: { - get: () => - ({ - events, - } as unknown), - }, - }, + dynamicActions: {} as unknown as DynamicActionManager, + }, + setDynamicActions: (value: DynamicActionsSerializedState['enhancements']) => { + dynamicActionsState$.next(value); }, - }, - } as EnhancedEmbeddableContext); + dynamicActionsState$, + viewMode: viewMode$, + setViewMode: (value: ViewMode) => viewMode$.next(value), + } as PanelNotificationsActionApi & PublishesWritableViewMode, + } as EmbeddableApiContext; +}; describe('PanelNotificationsAction', () => { describe('getDisplayName', () => { @@ -35,17 +46,29 @@ describe('PanelNotificationsAction', () => { const context = createContext(); const action = new PanelNotificationsAction(); - const name = await action.getDisplayName(context); + const name = action.getDisplayName(context); expect(name).toBe('0'); }); test('returns "2" if embeddable has two events', async () => { - const context = createContext([{}, {}]); + const context = createContext([{}, {}] as SerializedEvent[]); const action = new PanelNotificationsAction(); - const name = await action.getDisplayName(context); + const name = action.getDisplayName(context); expect(name).toBe('2'); }); + + test('updates display name when dynamic actions is updated', async () => { + const context = createContext([{}, {}] as SerializedEvent[]); + const action = new PanelNotificationsAction(); + + (context.embeddable as HasDynamicActions).setDynamicActions({ + dynamicActions: { events: [{}, {}, {}] as SerializedEvent[] }, + }); + + const name = action.getDisplayName(context); + expect(name).toBe('3'); + }); }); describe('getDisplayNameTooltip', () => { @@ -53,54 +76,69 @@ describe('PanelNotificationsAction', () => { const context = createContext(); const action = new PanelNotificationsAction(); - const name = await action.getDisplayNameTooltip(context); + const name = action.getDisplayNameTooltip(context); expect(name).toBe(''); }); test('returns "1 drilldown" if embeddable has one event', async () => { - const context = createContext([{}]); + const context = createContext([{} as SerializedEvent]); const action = new PanelNotificationsAction(); - const name = await action.getDisplayNameTooltip(context); + const name = action.getDisplayNameTooltip(context); expect(name).toBe('Panel has 1 drilldown'); }); test('returns "2 drilldowns" if embeddable has two events', async () => { - const context = createContext([{}, {}]); + const context = createContext([{}, {}] as SerializedEvent[]); const action = new PanelNotificationsAction(); - const name = await action.getDisplayNameTooltip(context); + const name = action.getDisplayNameTooltip(context); expect(name).toBe('Panel has 2 drilldowns'); }); test('returns "3 drilldowns" if embeddable has three events', async () => { - const context = createContext([{}, {}, {}]); + const context = createContext([{}, {}, {}] as SerializedEvent[]); const action = new PanelNotificationsAction(); - const name = await action.getDisplayNameTooltip(context); + const name = action.getDisplayNameTooltip(context); expect(name).toBe('Panel has 3 drilldowns'); }); + + test('updates tooltip when dynamic actions is updated', async () => { + const context = createContext([{}, {}, {}] as SerializedEvent[]); + const action = new PanelNotificationsAction(); + + (context.embeddable as HasDynamicActions).setDynamicActions({ + dynamicActions: { events: [{}, {}] as SerializedEvent[] }, + }); + + const name = action.getDisplayNameTooltip(context); + expect(name).toBe('Panel has 2 drilldowns'); + }); }); describe('isCompatible', () => { test('returns false if not in "edit" mode', async () => { - const context = createContext([{}]); + const context = createContext([{} as SerializedEvent]); const action = new PanelNotificationsAction(); const result = await action.isCompatible(context); expect(result).toBe(false); }); - test('returns true when in "edit" mode', async () => { - const context = createContext([{}], true); - const action = new PanelNotificationsAction(); + test('returns true when switching to "edit" mode', async () => { + const context = createContext([{} as SerializedEvent]); + const action = new PanelNotificationsAction(); + (context.embeddable as PublishesWritableViewMode).setViewMode(ViewMode.EDIT); const result = await action.isCompatible(context); expect(result).toBe(true); }); - test('returns false when no embeddable has no events', async () => { - const context = createContext([], true); + test('returns false when in edit mode but embeddable has no events', async () => { + const context = createContext([]); + (context.embeddable as PublishesWritableViewMode).setViewMode(ViewMode.EDIT); + const action = new PanelNotificationsAction(); const result = await action.isCompatible(context); diff --git a/x-pack/plugins/embeddable_enhanced/public/actions/panel_notifications_action.ts b/x-pack/plugins/embeddable_enhanced/public/actions/panel_notifications_action.ts index 8c1de7cf56b34..413b6ec45b63f 100644 --- a/x-pack/plugins/embeddable_enhanced/public/actions/panel_notifications_action.ts +++ b/x-pack/plugins/embeddable_enhanced/public/actions/panel_notifications_action.ts @@ -5,10 +5,22 @@ * 2.0. */ +import { ViewMode } from '@kbn/embeddable-plugin/public'; import { i18n } from '@kbn/i18n'; +import { + apiCanAccessViewMode, + CanAccessViewMode, + EmbeddableApiContext, + getInheritedViewMode, + getViewModeSubject, +} from '@kbn/presentation-publishing'; import { UiActionsActionDefinition as ActionDefinition } from '@kbn/ui-actions-plugin/public'; -import { ViewMode } from '@kbn/embeddable-plugin/public'; -import { EnhancedEmbeddableContext, EnhancedEmbeddable } from '../types'; + +import { BehaviorSubject, merge } from 'rxjs'; +import { + apiHasDynamicActions, + HasDynamicActions, +} from '../embeddables/interfaces/has_dynamic_actions'; export const txtOneDrilldown = i18n.translate( 'xpack.embeddableEnhanced.actions.panelNotifications.oneDrilldown', @@ -27,53 +39,64 @@ export const txtManyDrilldowns = (count: number) => export const ACTION_PANEL_NOTIFICATIONS = 'ACTION_PANEL_NOTIFICATIONS'; +export type PanelNotificationsActionApi = CanAccessViewMode & HasDynamicActions; + +const isApiCompatible = (api: unknown | null): api is PanelNotificationsActionApi => + apiHasDynamicActions(api) && apiCanAccessViewMode(api); + /** * This action renders in "edit" mode number of events (dynamic action) a panel * has attached to it. */ -export class PanelNotificationsAction implements ActionDefinition { +export class PanelNotificationsAction implements ActionDefinition { public readonly id = ACTION_PANEL_NOTIFICATIONS; public type = ACTION_PANEL_NOTIFICATIONS; - private getEventCount(embeddable: EnhancedEmbeddable): number { - return embeddable.enhancements.dynamicActions.state.get().events.length; + private getEventCount({ embeddable }: EmbeddableApiContext): number { + return isApiCompatible(embeddable) + ? (embeddable.dynamicActionsState$.getValue()?.dynamicActions.events ?? []).length + : 0; } - public getIconType = ({ embeddable }: EnhancedEmbeddableContext) => ''; + public getIconType = () => ''; - public readonly getDisplayName = ({ embeddable }: EnhancedEmbeddableContext) => { - return String(this.getEventCount(embeddable)); + public readonly getDisplayName = ({ embeddable }: EmbeddableApiContext) => { + return String(this.getEventCount({ embeddable })); }; - public couldBecomeCompatible({ embeddable }: EnhancedEmbeddableContext) { - return Boolean(!!embeddable.getInput && embeddable.getRoot); + public couldBecomeCompatible({ embeddable }: EmbeddableApiContext) { + return isApiCompatible(embeddable); } public subscribeToCompatibilityChanges = ( - { embeddable }: EnhancedEmbeddableContext, + { embeddable }: EmbeddableApiContext, onChange: (isCompatible: boolean, action: PanelNotificationsAction) => void ) => { - // There is no notification for when a dynamic action is added or removed, so we subscribe to the embeddable root instead as a proxy. - return embeddable - .getRoot() - .getInput$() - .subscribe(() => { - onChange( - embeddable.getInput().viewMode === ViewMode.EDIT && this.getEventCount(embeddable) > 0, - this - ); - }); + if (!isApiCompatible(embeddable)) return; + + return merge( + getViewModeSubject(embeddable) ?? new BehaviorSubject(ViewMode.VIEW), + embeddable.dynamicActionsState$ + ).subscribe(() => { + onChange( + getInheritedViewMode(embeddable) === ViewMode.EDIT && + this.getEventCount({ embeddable }) > 0, + this + ); + }); }; - public readonly getDisplayNameTooltip = ({ embeddable }: EnhancedEmbeddableContext) => { - const count = this.getEventCount(embeddable); + public readonly getDisplayNameTooltip = ({ embeddable }: EmbeddableApiContext) => { + const count = this.getEventCount({ embeddable }); return !count ? '' : count === 1 ? txtOneDrilldown : txtManyDrilldowns(count); }; - public readonly isCompatible = async ({ embeddable }: EnhancedEmbeddableContext) => { - if (!embeddable?.getInput) return false; - if (embeddable.getInput().viewMode !== ViewMode.EDIT) return false; - return this.getEventCount(embeddable) > 0; + public readonly isCompatible = async ({ embeddable }: EmbeddableApiContext) => { + return ( + isApiCompatible(embeddable) && + getInheritedViewMode(embeddable) === ViewMode.EDIT && + this.getEventCount({ embeddable }) > 0 + ); }; public readonly execute = async () => {}; diff --git a/x-pack/plugins/embeddable_enhanced/public/embeddables/embeddable_action_storage.test.ts b/x-pack/plugins/embeddable_enhanced/public/embeddables/dynamic_action_storage.test.ts similarity index 62% rename from x-pack/plugins/embeddable_enhanced/public/embeddables/embeddable_action_storage.test.ts rename to x-pack/plugins/embeddable_enhanced/public/embeddables/dynamic_action_storage.test.ts index f86f03f3564b9..ff78a9f0003c6 100644 --- a/x-pack/plugins/embeddable_enhanced/public/embeddables/embeddable_action_storage.test.ts +++ b/x-pack/plugins/embeddable_enhanced/public/embeddables/dynamic_action_storage.test.ts @@ -5,114 +5,107 @@ * 2.0. */ -import { - Embeddable, - ViewMode, - VALUE_CLICK_TRIGGER, - SELECT_RANGE_TRIGGER, -} from '@kbn/embeddable-plugin/public'; -import { - EmbeddableActionStorage, - EmbeddableWithDynamicActionsInput, -} from './embeddable_action_storage'; -import { UiActionsEnhancedSerializedEvent } from '@kbn/ui-actions-enhanced-plugin/public'; +import { SELECT_RANGE_TRIGGER, VALUE_CLICK_TRIGGER } from '@kbn/embeddable-plugin/public'; import { of } from '@kbn/kibana-utils-plugin/public'; +import { UiActionsEnhancedSerializedEvent } from '@kbn/ui-actions-enhanced-plugin/public'; +import { BehaviorSubject } from 'rxjs'; +import { DynamicActionStorage, DynamicActionStorageApi } from './dynamic_action_storage'; // use real const to make test fail in case someone accidentally changes it import { APPLY_FILTER_TRIGGER } from '@kbn/data-plugin/public'; +import { DynamicActionsSerializedState } from '../plugin'; +import { SerializedAction } from '@kbn/ui-actions-enhanced-plugin/common/types'; -class TestEmbeddable extends Embeddable { - public readonly type = 'test'; - constructor() { - super({ id: 'test', viewMode: ViewMode.VIEW }, {}); - } - reload() {} -} +const getApi = (): DynamicActionStorageApi => { + const dynamicActionsState$ = new BehaviorSubject({ + dynamicActions: { events: [] }, + }); + return { + setDynamicActions: (newDynamicActions) => { + dynamicActionsState$.next(newDynamicActions); + }, + dynamicActionsState$, + }; +}; describe('EmbeddableActionStorage', () => { describe('.create()', () => { test('method exists', () => { - const embeddable = new TestEmbeddable(); - const storage = new EmbeddableActionStorage(embeddable); + const storage = new DynamicActionStorage('testId', () => 'testTitle', getApi()); expect(typeof storage.create).toBe('function'); }); test('can add event to embeddable', async () => { - const embeddable = new TestEmbeddable(); - const storage = new EmbeddableActionStorage(embeddable); + const api = getApi(); + const storage = new DynamicActionStorage('testId', () => 'testTitle', api); const event: UiActionsEnhancedSerializedEvent = { eventId: 'EVENT_ID', triggers: ['TRIGGER-ID'], - action: {} as any, + action: {} as SerializedAction, }; - const events1 = embeddable.getInput().enhancements?.dynamicActions?.events || []; + const events1 = api.dynamicActionsState$.getValue()?.dynamicActions.events ?? []; expect(events1).toEqual([]); + const spy = jest.spyOn(api, 'setDynamicActions'); await storage.create(event); + expect(spy).toBeCalledWith({ + dynamicActions: { + events: [ + { + eventId: 'EVENT_ID', + triggers: ['TRIGGER-ID'], + action: {} as SerializedAction, + }, + ], + }, + }); - const events2 = embeddable.getInput().enhancements?.dynamicActions?.events || []; + const events2 = api.dynamicActionsState$.getValue()?.dynamicActions.events ?? []; expect(events2).toEqual([event]); }); - test('does not merge .getInput() into .updateInput()', async () => { - const embeddable = new TestEmbeddable(); - const storage = new EmbeddableActionStorage(embeddable); - const event: UiActionsEnhancedSerializedEvent = { - eventId: 'EVENT_ID', - triggers: ['TRIGGER-ID'], - action: {} as any, - }; - - const spy = jest.spyOn(embeddable, 'updateInput'); - - await storage.create(event); - - expect(spy.mock.calls[0][0].id).toBe(undefined); - expect(spy.mock.calls[0][0].viewMode).toBe(undefined); - }); - test('can create multiple events', async () => { - const embeddable = new TestEmbeddable(); - const storage = new EmbeddableActionStorage(embeddable); + const api = getApi(); + const storage = new DynamicActionStorage('testId', () => 'testTitle', api); const event1: UiActionsEnhancedSerializedEvent = { eventId: 'EVENT_ID1', triggers: ['TRIGGER-ID'], - action: {} as any, + action: {} as SerializedAction, }; const event2: UiActionsEnhancedSerializedEvent = { eventId: 'EVENT_ID2', triggers: ['TRIGGER-ID'], - action: {} as any, + action: {} as SerializedAction, }; const event3: UiActionsEnhancedSerializedEvent = { eventId: 'EVENT_ID3', triggers: ['TRIGGER-ID'], - action: {} as any, + action: {} as SerializedAction, }; - const events1 = embeddable.getInput().enhancements?.dynamicActions?.events || []; + const events1 = api.dynamicActionsState$.getValue()?.dynamicActions.events ?? []; expect(events1).toEqual([]); await storage.create(event1); - const events2 = embeddable.getInput().enhancements?.dynamicActions?.events || []; + const events2 = api.dynamicActionsState$.getValue()?.dynamicActions.events ?? []; expect(events2).toEqual([event1]); await storage.create(event2); await storage.create(event3); - const events3 = embeddable.getInput().enhancements?.dynamicActions?.events || []; + const events3 = api.dynamicActionsState$.getValue()?.dynamicActions.events ?? []; expect(events3).toEqual([event1, event2, event3]); }); test('throws when creating an event with the same ID', async () => { - const embeddable = new TestEmbeddable(); - const storage = new EmbeddableActionStorage(embeddable); + const storage = new DynamicActionStorage('testId', () => 'testTitle', getApi()); + const event: UiActionsEnhancedSerializedEvent = { eventId: 'EVENT_ID', triggers: ['TRIGGER-ID'], - action: {} as any, + action: {} as SerializedAction, }; await storage.create(event); @@ -120,126 +113,124 @@ describe('EmbeddableActionStorage', () => { expect(error).toBeInstanceOf(Error); expect(error.message).toMatchInlineSnapshot( - `"[EEXIST]: Event with [eventId = EVENT_ID] already exists on [embeddable.id = test, embeddable.title = undefined]."` + `"[EEXIST]: Event with [eventId = EVENT_ID] already exists on [embeddable.id = testId, embeddable.title = testTitle]."` ); }); }); describe('.update()', () => { test('method exists', () => { - const embeddable = new TestEmbeddable(); - const storage = new EmbeddableActionStorage(embeddable); + const storage = new DynamicActionStorage('testId', () => 'testTitle', getApi()); expect(typeof storage.update).toBe('function'); }); test('can update an existing event', async () => { - const embeddable = new TestEmbeddable(); - const storage = new EmbeddableActionStorage(embeddable); + const api = getApi(); + const storage = new DynamicActionStorage('testId', () => 'testTitle', api); const event1: UiActionsEnhancedSerializedEvent = { eventId: 'EVENT_ID', triggers: ['TRIGGER-ID'], action: { name: 'foo', - } as any, + } as SerializedAction, }; const event2: UiActionsEnhancedSerializedEvent = { eventId: 'EVENT_ID', triggers: ['TRIGGER-ID'], action: { name: 'bar', - } as any, + } as SerializedAction, }; await storage.create(event1); await storage.update(event2); - const events = embeddable.getInput().enhancements?.dynamicActions?.events || []; + const events = api.dynamicActionsState$.getValue()?.dynamicActions.events ?? []; expect(events).toEqual([event2]); }); test('updates event in place of the old event', async () => { - const embeddable = new TestEmbeddable(); - const storage = new EmbeddableActionStorage(embeddable); + const api = getApi(); + const storage = new DynamicActionStorage('testId', () => 'testTitle', api); const event1: UiActionsEnhancedSerializedEvent = { eventId: 'EVENT_ID1', triggers: ['TRIGGER-ID'], action: { name: 'foo', - } as any, + } as SerializedAction, }; const event2: UiActionsEnhancedSerializedEvent = { eventId: 'EVENT_ID2', triggers: ['TRIGGER-ID'], action: { name: 'bar', - } as any, + } as SerializedAction, }; const event22: UiActionsEnhancedSerializedEvent = { eventId: 'EVENT_ID2', triggers: ['TRIGGER-ID'], action: { name: 'baz', - } as any, + } as SerializedAction, }; const event3: UiActionsEnhancedSerializedEvent = { eventId: 'EVENT_ID3', triggers: ['TRIGGER-ID'], action: { name: 'qux', - } as any, + } as SerializedAction, }; await storage.create(event1); await storage.create(event2); await storage.create(event3); - const events1 = embeddable.getInput().enhancements?.dynamicActions?.events || []; + const events1 = api.dynamicActionsState$.getValue()?.dynamicActions.events ?? []; expect(events1).toEqual([event1, event2, event3]); await storage.update(event22); - const events2 = embeddable.getInput().enhancements?.dynamicActions?.events || []; + const events2 = api.dynamicActionsState$.getValue()?.dynamicActions.events ?? []; expect(events2).toEqual([event1, event22, event3]); await storage.update(event2); - const events3 = embeddable.getInput().enhancements?.dynamicActions?.events || []; + const events3 = api.dynamicActionsState$.getValue()?.dynamicActions.events ?? []; expect(events3).toEqual([event1, event2, event3]); }); test('throws when updating event, but storage is empty', async () => { - const embeddable = new TestEmbeddable(); - const storage = new EmbeddableActionStorage(embeddable); + const storage = new DynamicActionStorage('testId', () => 'testTitle', getApi()); const event: UiActionsEnhancedSerializedEvent = { eventId: 'EVENT_ID', triggers: ['TRIGGER-ID'], - action: {} as any, + action: {} as SerializedAction, }; const [, error] = await of(storage.update(event)); expect(error).toBeInstanceOf(Error); expect(error.message).toMatchInlineSnapshot( - `"[ENOENT]: Event with [eventId = EVENT_ID] could not be updated as it does not exist in [embeddable.id = test, embeddable.title = undefined]."` + `"[ENOENT]: Event with [eventId = EVENT_ID] could not be updated as it does not exist in [embeddable.id = testId, embeddable.title = testTitle]."` ); }); test('throws when updating event with ID that is not stored', async () => { - const embeddable = new TestEmbeddable(); - const storage = new EmbeddableActionStorage(embeddable); + const api = getApi(); + const storage = new DynamicActionStorage('testId', () => 'testTitle', api); const event1: UiActionsEnhancedSerializedEvent = { eventId: 'EVENT_ID1', triggers: ['TRIGGER-ID'], - action: {} as any, + action: {} as SerializedAction, }; const event2: UiActionsEnhancedSerializedEvent = { eventId: 'EVENT_ID2', triggers: ['TRIGGER-ID'], - action: {} as any, + action: {} as SerializedAction, }; await storage.create(event1); @@ -247,104 +238,101 @@ describe('EmbeddableActionStorage', () => { expect(error).toBeInstanceOf(Error); expect(error.message).toMatchInlineSnapshot( - `"[ENOENT]: Event with [eventId = EVENT_ID2] could not be updated as it does not exist in [embeddable.id = test, embeddable.title = undefined]."` + `"[ENOENT]: Event with [eventId = EVENT_ID2] could not be updated as it does not exist in [embeddable.id = testId, embeddable.title = testTitle]."` ); }); }); describe('.remove()', () => { test('method exists', () => { - const embeddable = new TestEmbeddable(); - const storage = new EmbeddableActionStorage(embeddable); + const storage = new DynamicActionStorage('testId', () => 'testTitle', getApi()); expect(typeof storage.remove).toBe('function'); }); test('can remove existing event', async () => { - const embeddable = new TestEmbeddable(); - const storage = new EmbeddableActionStorage(embeddable); + const api = getApi(); + const storage = new DynamicActionStorage('testId', () => 'testTitle', api); const event: UiActionsEnhancedSerializedEvent = { eventId: 'EVENT_ID', triggers: ['TRIGGER-ID'], - action: {} as any, + action: {} as SerializedAction, }; await storage.create(event); await storage.remove(event.eventId); - const events = embeddable.getInput().enhancements?.dynamicActions?.events || []; + const events = api.dynamicActionsState$.getValue()?.dynamicActions.events ?? []; expect(events).toEqual([]); }); test('removes correct events in a list of events', async () => { - const embeddable = new TestEmbeddable(); - const storage = new EmbeddableActionStorage(embeddable); + const api = getApi(); + const storage = new DynamicActionStorage('testId', () => 'testTitle', api); const event1: UiActionsEnhancedSerializedEvent = { eventId: 'EVENT_ID1', triggers: ['TRIGGER-ID'], action: { name: 'foo', - } as any, + } as SerializedAction, }; const event2: UiActionsEnhancedSerializedEvent = { eventId: 'EVENT_ID2', triggers: ['TRIGGER-ID'], action: { name: 'bar', - } as any, + } as SerializedAction, }; const event3: UiActionsEnhancedSerializedEvent = { eventId: 'EVENT_ID3', triggers: ['TRIGGER-ID'], action: { name: 'qux', - } as any, + } as SerializedAction, }; await storage.create(event1); await storage.create(event2); await storage.create(event3); - const events1 = embeddable.getInput().enhancements?.dynamicActions?.events || []; + const events1 = api.dynamicActionsState$.getValue()?.dynamicActions.events ?? []; expect(events1).toEqual([event1, event2, event3]); await storage.remove(event2.eventId); - const events2 = embeddable.getInput().enhancements?.dynamicActions?.events || []; + const events2 = api.dynamicActionsState$.getValue()?.dynamicActions.events ?? []; expect(events2).toEqual([event1, event3]); await storage.remove(event3.eventId); - const events3 = embeddable.getInput().enhancements?.dynamicActions?.events || []; + const events3 = api.dynamicActionsState$.getValue()?.dynamicActions.events ?? []; expect(events3).toEqual([event1]); await storage.remove(event1.eventId); - const events4 = embeddable.getInput().enhancements?.dynamicActions?.events || []; + const events4 = api.dynamicActionsState$.getValue()?.dynamicActions.events ?? []; expect(events4).toEqual([]); }); test('throws when removing an event from an empty storage', async () => { - const embeddable = new TestEmbeddable(); - const storage = new EmbeddableActionStorage(embeddable); + const storage = new DynamicActionStorage('testId', () => 'testTitle', getApi()); const [, error] = await of(storage.remove('EVENT_ID')); expect(error).toBeInstanceOf(Error); expect(error.message).toMatchInlineSnapshot( - `"[ENOENT]: Event with [eventId = EVENT_ID] could not be removed as it does not exist in [embeddable.id = test, embeddable.title = undefined]."` + `"[ENOENT]: Event with [eventId = EVENT_ID] could not be removed as it does not exist in [embeddable.id = testId, embeddable.title = testTitle]."` ); }); test('throws when removing with ID that does not exist in storage', async () => { - const embeddable = new TestEmbeddable(); - const storage = new EmbeddableActionStorage(embeddable); + const storage = new DynamicActionStorage('testId', () => 'testTitle', getApi()); const event: UiActionsEnhancedSerializedEvent = { eventId: 'EVENT_ID', triggers: ['TRIGGER-ID'], - action: {} as any, + action: {} as SerializedAction, }; await storage.create(event); @@ -353,26 +341,24 @@ describe('EmbeddableActionStorage', () => { expect(error).toBeInstanceOf(Error); expect(error.message).toMatchInlineSnapshot( - `"[ENOENT]: Event with [eventId = WRONG_ID] could not be removed as it does not exist in [embeddable.id = test, embeddable.title = undefined]."` + `"[ENOENT]: Event with [eventId = WRONG_ID] could not be removed as it does not exist in [embeddable.id = testId, embeddable.title = testTitle]."` ); }); }); describe('.read()', () => { test('method exists', () => { - const embeddable = new TestEmbeddable(); - const storage = new EmbeddableActionStorage(embeddable); + const storage = new DynamicActionStorage('testId', () => 'testTitle', getApi()); expect(typeof storage.read).toBe('function'); }); test('can read an existing event out of storage', async () => { - const embeddable = new TestEmbeddable(); - const storage = new EmbeddableActionStorage(embeddable); + const storage = new DynamicActionStorage('testId', () => 'testTitle', getApi()); const event: UiActionsEnhancedSerializedEvent = { eventId: 'EVENT_ID', triggers: ['TRIGGER-ID'], - action: {} as any, + action: {} as SerializedAction, }; await storage.create(event); @@ -382,25 +368,23 @@ describe('EmbeddableActionStorage', () => { }); test('throws when reading from empty storage', async () => { - const embeddable = new TestEmbeddable(); - const storage = new EmbeddableActionStorage(embeddable); + const storage = new DynamicActionStorage('testId', () => 'testTitle', getApi()); const [, error] = await of(storage.read('EVENT_ID')); expect(error).toBeInstanceOf(Error); expect(error.message).toMatchInlineSnapshot( - `"[ENOENT]: Event with [eventId = EVENT_ID] could not be found in [embeddable.id = test, embeddable.title = undefined]."` + `"[ENOENT]: Event with [eventId = EVENT_ID] could not be found in [embeddable.id = testId, embeddable.title = testTitle]."` ); }); test('throws when reading event with ID not existing in storage', async () => { - const embeddable = new TestEmbeddable(); - const storage = new EmbeddableActionStorage(embeddable); + const storage = new DynamicActionStorage('testId', () => 'testTitle', getApi()); const event: UiActionsEnhancedSerializedEvent = { eventId: 'EVENT_ID', triggers: ['TRIGGER-ID'], - action: {} as any, + action: {} as SerializedAction, }; await storage.create(event); @@ -408,28 +392,27 @@ describe('EmbeddableActionStorage', () => { expect(error).toBeInstanceOf(Error); expect(error.message).toMatchInlineSnapshot( - `"[ENOENT]: Event with [eventId = WRONG_ID] could not be found in [embeddable.id = test, embeddable.title = undefined]."` + `"[ENOENT]: Event with [eventId = WRONG_ID] could not be found in [embeddable.id = testId, embeddable.title = testTitle]."` ); }); test('returns correct event when multiple events are stored', async () => { - const embeddable = new TestEmbeddable(); - const storage = new EmbeddableActionStorage(embeddable); + const storage = new DynamicActionStorage('testId', () => 'testTitle', getApi()); const event1: UiActionsEnhancedSerializedEvent = { eventId: 'EVENT_ID1', triggers: ['TRIGGER-ID'], - action: {} as any, + action: {} as SerializedAction, }; const event2: UiActionsEnhancedSerializedEvent = { eventId: 'EVENT_ID2', triggers: ['TRIGGER-ID'], - action: {} as any, + action: {} as SerializedAction, }; const event3: UiActionsEnhancedSerializedEvent = { eventId: 'EVENT_ID3', triggers: ['TRIGGER-ID'], - action: {} as any, + action: {} as SerializedAction, }; await storage.create(event1); @@ -450,144 +433,124 @@ describe('EmbeddableActionStorage', () => { describe('.count()', () => { test('method exists', () => { - const embeddable = new TestEmbeddable(); - const storage = new EmbeddableActionStorage(embeddable); + const storage = new DynamicActionStorage('testId', () => 'testTitle', getApi()); expect(typeof storage.count).toBe('function'); }); test('returns 0 when storage is empty', async () => { - const embeddable = new TestEmbeddable(); - const storage = new EmbeddableActionStorage(embeddable); - + const storage = new DynamicActionStorage('testId', () => 'testTitle', getApi()); const count = await storage.count(); - expect(count).toBe(0); }); test('returns correct number of events in storage', async () => { - const embeddable = new TestEmbeddable(); - const storage = new EmbeddableActionStorage(embeddable); - + const storage = new DynamicActionStorage('testId', () => 'testTitle', getApi()); expect(await storage.count()).toBe(0); await storage.create({ eventId: 'EVENT_ID1', triggers: ['TRIGGER-ID'], - action: {} as any, + action: {} as SerializedAction, }); - expect(await storage.count()).toBe(1); await storage.create({ eventId: 'EVENT_ID2', triggers: ['TRIGGER-ID'], - action: {} as any, + action: {} as SerializedAction, }); - expect(await storage.count()).toBe(2); await storage.remove('EVENT_ID1'); - expect(await storage.count()).toBe(1); await storage.remove('EVENT_ID2'); - expect(await storage.count()).toBe(0); }); }); describe('.list()', () => { test('method exists', () => { - const embeddable = new TestEmbeddable(); - const storage = new EmbeddableActionStorage(embeddable); + const storage = new DynamicActionStorage('testId', () => 'testTitle', getApi()); expect(typeof storage.list).toBe('function'); }); test('returns empty array when storage is empty', async () => { - const embeddable = new TestEmbeddable(); - const storage = new EmbeddableActionStorage(embeddable); - + const storage = new DynamicActionStorage('testId', () => 'testTitle', getApi()); const list = await storage.list(); - expect(list).toEqual([]); }); test('returns correct list of events in storage', async () => { - const embeddable = new TestEmbeddable(); - const storage = new EmbeddableActionStorage(embeddable); + const storage = new DynamicActionStorage('testId', () => 'testTitle', getApi()); const event1: UiActionsEnhancedSerializedEvent = { eventId: 'EVENT_ID1', triggers: ['TRIGGER-ID'], - action: {} as any, + action: {} as SerializedAction, }; const event2: UiActionsEnhancedSerializedEvent = { eventId: 'EVENT_ID2', triggers: ['TRIGGER-ID'], - action: {} as any, + action: {} as SerializedAction, }; expect(await storage.list()).toEqual([]); await storage.create(event1); - expect(await storage.list()).toEqual([event1]); await storage.create(event2); - expect(await storage.list()).toEqual([event1, event2]); await storage.remove('EVENT_ID1'); - expect(await storage.list()).toEqual([event2]); await storage.remove('EVENT_ID2'); - expect(await storage.list()).toEqual([]); }); }); describe('migrate', () => { test('DASHBOARD_TO_DASHBOARD_DRILLDOWN triggers migration', async () => { - const embeddable = new TestEmbeddable(); + const api = getApi(); + const storage = new DynamicActionStorage('testId', () => 'testTitle', api); + const OTHER_TRIGGER = 'OTHER_TRIGGER'; - embeddable.updateInput({ - enhancements: { - dynamicActions: { - events: [ - { - eventId: '1', - triggers: [OTHER_TRIGGER, VALUE_CLICK_TRIGGER], - action: { - factoryId: 'DASHBOARD_TO_DASHBOARD_DRILLDOWN', - name: '', - config: {}, - }, + api.setDynamicActions({ + dynamicActions: { + events: [ + { + eventId: '1', + triggers: [OTHER_TRIGGER, VALUE_CLICK_TRIGGER], + action: { + factoryId: 'DASHBOARD_TO_DASHBOARD_DRILLDOWN', + name: '', + config: {}, }, - { - eventId: '3', - triggers: [OTHER_TRIGGER, SELECT_RANGE_TRIGGER], - action: { - factoryId: 'DASHBOARD_TO_DASHBOARD_DRILLDOWN', - name: '', - config: {}, - }, + }, + { + eventId: '3', + triggers: [OTHER_TRIGGER, SELECT_RANGE_TRIGGER], + action: { + factoryId: 'DASHBOARD_TO_DASHBOARD_DRILLDOWN', + name: '', + config: {}, }, - { - eventId: '3', - triggers: [OTHER_TRIGGER], - action: { - factoryId: 'SOME_OTHER', - name: '', - config: {}, - }, + }, + { + eventId: '3', + triggers: [OTHER_TRIGGER], + action: { + factoryId: 'SOME_OTHER', + name: '', + config: {}, }, - ], - }, + }, + ], }, }); - const storage = new EmbeddableActionStorage(embeddable); const [event1, event2, event3] = await storage.list(); expect(event1.triggers).toEqual([OTHER_TRIGGER, APPLY_FILTER_TRIGGER]); diff --git a/x-pack/plugins/embeddable_enhanced/public/embeddables/embeddable_action_storage.ts b/x-pack/plugins/embeddable_enhanced/public/embeddables/dynamic_action_storage.ts similarity index 55% rename from x-pack/plugins/embeddable_enhanced/public/embeddables/embeddable_action_storage.ts rename to x-pack/plugins/embeddable_enhanced/public/embeddables/dynamic_action_storage.ts index 2eebc52ba55cf..ae3e56e84519b 100644 --- a/x-pack/plugins/embeddable_enhanced/public/embeddables/embeddable_action_storage.ts +++ b/x-pack/plugins/embeddable_enhanced/public/embeddables/dynamic_action_storage.ts @@ -5,105 +5,94 @@ * 2.0. */ -import type { SerializableRecord } from '@kbn/utility-types'; +import { SELECT_RANGE_TRIGGER, VALUE_CLICK_TRIGGER } from '@kbn/embeddable-plugin/public'; import { DynamicActionsState, UiActionsEnhancedAbstractActionStorage as AbstractActionStorage, UiActionsEnhancedSerializedEvent as SerializedEvent, } from '@kbn/ui-actions-enhanced-plugin/public'; -import { - EmbeddableInput, - EmbeddableOutput, - IEmbeddable, - VALUE_CLICK_TRIGGER, - SELECT_RANGE_TRIGGER, -} from '@kbn/embeddable-plugin/public'; - -export interface EmbeddableWithDynamicActionsInput extends EmbeddableInput { - enhancements?: { - dynamicActions: DynamicActionsState; - [key: string]: SerializableRecord; - }; -} - -export type EmbeddableWithDynamicActions< - I extends EmbeddableWithDynamicActionsInput = EmbeddableWithDynamicActionsInput, - O extends EmbeddableOutput = EmbeddableOutput -> = IEmbeddable; - -export class EmbeddableActionStorage extends AbstractActionStorage { - constructor(private readonly embbeddable: EmbeddableWithDynamicActions) { +import { HasDynamicActions } from './interfaces/has_dynamic_actions'; + +export type DynamicActionStorageApi = Pick< + HasDynamicActions, + 'setDynamicActions' | 'dynamicActionsState$' +>; +export class DynamicActionStorage extends AbstractActionStorage { + constructor( + private id: string, + private getPanelTitle: () => string | undefined, + private readonly api: DynamicActionStorageApi + ) { super(); } - private put(input: EmbeddableWithDynamicActionsInput, events: SerializedEvent[]) { - this.embbeddable.updateInput({ - enhancements: { - ...(input.enhancements || {}), - dynamicActions: { - ...(input.enhancements?.dynamicActions || {}), - events, - }, - }, - }); + private put(dynamicActionsState: DynamicActionsState) { + this.api.setDynamicActions({ dynamicActions: dynamicActionsState }); } public async create(event: SerializedEvent) { - const input = this.embbeddable.getInput(); - const events = this.getEventsFromEmbeddable(); + const events = this.getEvents(); const exists = !!events.find(({ eventId }) => eventId === event.eventId); if (exists) { throw new Error( `[EEXIST]: Event with [eventId = ${event.eventId}] already exists on ` + - `[embeddable.id = ${input.id}, embeddable.title = ${input.title}].` + `[embeddable.id = ${this.id}, embeddable.title = ${this.getPanelTitle()}].` ); } - this.put(input, [...events, event]); + this.put({ + events: [...events, event], + }); } public async update(event: SerializedEvent) { - const input = this.embbeddable.getInput(); - const events = this.getEventsFromEmbeddable(); + const dynamicActionsState = this.api.dynamicActionsState$.getValue(); + const events = this.getEvents(); const index = events.findIndex(({ eventId }) => eventId === event.eventId); if (index === -1) { throw new Error( `[ENOENT]: Event with [eventId = ${event.eventId}] could not be ` + `updated as it does not exist in ` + - `[embeddable.id = ${input.id}, embeddable.title = ${input.title}].` + `[embeddable.id = ${this.id}, embeddable.title = ${this.getPanelTitle()}].` ); } - this.put(input, [...events.slice(0, index), event, ...events.slice(index + 1)]); + this.put({ + ...dynamicActionsState, + events: [...events.slice(0, index), event, ...events.slice(index + 1)], + }); } public async remove(eventId: string) { - const input = this.embbeddable.getInput(); - const events = this.getEventsFromEmbeddable(); + const dynamicActionsState = this.api.dynamicActionsState$.getValue(); + + const events = this.getEvents(); const index = events.findIndex((event) => eventId === event.eventId); if (index === -1) { throw new Error( `[ENOENT]: Event with [eventId = ${eventId}] could not be ` + `removed as it does not exist in ` + - `[embeddable.id = ${input.id}, embeddable.title = ${input.title}].` + `[embeddable.id = ${this.id}, embeddable.title = ${this.getPanelTitle()}].` ); } - this.put(input, [...events.slice(0, index), ...events.slice(index + 1)]); + this.put({ + ...dynamicActionsState, + events: [...events.slice(0, index), ...events.slice(index + 1)], + }); } public async read(eventId: string): Promise { - const input = this.embbeddable.getInput(); - const events = this.getEventsFromEmbeddable(); + const events = this.getEvents(); const event = events.find((ev) => eventId === ev.eventId); if (!event) { throw new Error( `[ENOENT]: Event with [eventId = ${eventId}] could not be found in ` + - `[embeddable.id = ${input.id}, embeddable.title = ${input.title}].` + `[embeddable.id = ${this.id}, embeddable.title = ${this.getPanelTitle()}].` ); } @@ -111,12 +100,12 @@ export class EmbeddableActionStorage extends AbstractActionStorage { } public async list(): Promise { - return this.getEventsFromEmbeddable(); + return this.getEvents(); } - private getEventsFromEmbeddable() { - const input = this.embbeddable.getInput(); - const events = input.enhancements?.dynamicActions?.events || []; + private getEvents() { + const dynamicActionsState = this.api.dynamicActionsState$.getValue(); + const events = dynamicActionsState?.dynamicActions?.events ?? []; return this.migrate(events); } diff --git a/x-pack/plugins/embeddable_enhanced/public/embeddables/index.ts b/x-pack/plugins/embeddable_enhanced/public/embeddables/index.ts index 437136949fe83..dbf85c53a2006 100644 --- a/x-pack/plugins/embeddable_enhanced/public/embeddables/index.ts +++ b/x-pack/plugins/embeddable_enhanced/public/embeddables/index.ts @@ -5,5 +5,4 @@ * 2.0. */ -export * from './is_enhanced_embeddable'; -export * from './embeddable_action_storage'; +export * from './dynamic_action_storage'; diff --git a/x-pack/plugins/embeddable_enhanced/public/embeddables/interfaces/has_dynamic_actions.ts b/x-pack/plugins/embeddable_enhanced/public/embeddables/interfaces/has_dynamic_actions.ts index d92fd2138b56b..324b573d56ad6 100644 --- a/x-pack/plugins/embeddable_enhanced/public/embeddables/interfaces/has_dynamic_actions.ts +++ b/x-pack/plugins/embeddable_enhanced/public/embeddables/interfaces/has_dynamic_actions.ts @@ -5,16 +5,23 @@ * 2.0. */ +import { PublishingSubject } from '@kbn/presentation-publishing'; import { UiActionsEnhancedDynamicActionManager as DynamicActionManager } from '@kbn/ui-actions-enhanced-plugin/public'; +import { DynamicActionsSerializedState } from '../../plugin'; export interface HasDynamicActions { - enhancements: { - dynamicActions: DynamicActionManager; - }; + enhancements: { dynamicActions: DynamicActionManager }; + setDynamicActions: (newState: DynamicActionsSerializedState['enhancements']) => void; + dynamicActionsState$: PublishingSubject; } export const apiHasDynamicActions = (api: unknown): api is HasDynamicActions => { + const apiMaybeHasDynamicActions = api as HasDynamicActions; return Boolean( - api && typeof (api as HasDynamicActions).enhancements?.dynamicActions === 'object' + apiMaybeHasDynamicActions && + apiMaybeHasDynamicActions.enhancements && + typeof apiMaybeHasDynamicActions.enhancements.dynamicActions === 'object' && + typeof apiMaybeHasDynamicActions.setDynamicActions === 'function' && + apiMaybeHasDynamicActions.dynamicActionsState$ ); }; diff --git a/x-pack/plugins/embeddable_enhanced/public/embeddables/is_enhanced_embeddable.ts b/x-pack/plugins/embeddable_enhanced/public/embeddables/is_enhanced_embeddable.ts deleted file mode 100644 index 7a2dc821180b2..0000000000000 --- a/x-pack/plugins/embeddable_enhanced/public/embeddables/is_enhanced_embeddable.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { IEmbeddable } from '@kbn/embeddable-plugin/public'; -import { EnhancedEmbeddable } from '../types'; - -export const isEnhancedEmbeddable = ( - maybeEnhancedEmbeddable: E -): maybeEnhancedEmbeddable is EnhancedEmbeddable => - typeof (maybeEnhancedEmbeddable as EnhancedEmbeddable) - ?.enhancements?.dynamicActions === 'object'; diff --git a/x-pack/plugins/embeddable_enhanced/public/index.ts b/x-pack/plugins/embeddable_enhanced/public/index.ts index 53fec5c83522a..e14c8629ced9b 100644 --- a/x-pack/plugins/embeddable_enhanced/public/index.ts +++ b/x-pack/plugins/embeddable_enhanced/public/index.ts @@ -11,7 +11,7 @@ import { EmbeddableEnhancedPlugin } from './plugin'; export type { SetupContract as EmbeddableEnhancedSetupContract, SetupDependencies as EmbeddableEnhancedSetupDependencies, - StartContract as EmbeddableEnhancedStartContract, + StartContract as EmbeddableEnhancedPluginStart, StartDependencies as EmbeddableEnhancedStartDependencies, } from './plugin'; @@ -20,7 +20,6 @@ export function plugin(context: PluginInitializerContext) { } export type { EnhancedEmbeddable, EnhancedEmbeddableContext } from './types'; -export { isEnhancedEmbeddable } from './embeddables'; export { type HasDynamicActions, apiHasDynamicActions, diff --git a/x-pack/plugins/embeddable_enhanced/public/mocks.ts b/x-pack/plugins/embeddable_enhanced/public/mocks.ts index 77b5b496a7f17..37845a9ff0a1e 100644 --- a/x-pack/plugins/embeddable_enhanced/public/mocks.ts +++ b/x-pack/plugins/embeddable_enhanced/public/mocks.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { EmbeddableEnhancedSetupContract, EmbeddableEnhancedStartContract } from '.'; +import { EmbeddableEnhancedSetupContract, EmbeddableEnhancedPluginStart } from '.'; export type Setup = jest.Mocked; -export type Start = jest.Mocked; +export type Start = jest.Mocked; const createSetupContract = (): Setup => { const setupContract: Setup = {}; @@ -17,7 +17,9 @@ const createSetupContract = (): Setup => { }; const createStartContract = (): Start => { - const startContract: Start = {}; + const startContract: Start = { + initializeReactEmbeddableDynamicActions: jest.fn(), + }; return startContract; }; diff --git a/x-pack/plugins/embeddable_enhanced/public/plugin.ts b/x-pack/plugins/embeddable_enhanced/public/plugin.ts index b46390d529c23..58e6a04ee661e 100644 --- a/x-pack/plugins/embeddable_enhanced/public/plugin.ts +++ b/x-pack/plugins/embeddable_enhanced/public/plugin.ts @@ -5,8 +5,10 @@ * 2.0. */ -import { CoreStart, CoreSetup, Plugin, PluginInitializerContext } from '@kbn/core/public'; +import { CoreSetup, CoreStart, Plugin, PluginInitializerContext } from '@kbn/core/public'; import { + defaultEmbeddableFactoryProvider, + EmbeddableContext, EmbeddableFactory, EmbeddableFactoryDefinition, EmbeddableInput, @@ -14,22 +16,25 @@ import { EmbeddableSetup, EmbeddableStart, IEmbeddable, - defaultEmbeddableFactoryProvider, - EmbeddableContext, PANEL_NOTIFICATION_TRIGGER, } from '@kbn/embeddable-plugin/public'; +import { apiHasUniqueId, StateComparators } from '@kbn/presentation-publishing'; +import type { FinderAttributes } from '@kbn/saved-objects-finder-plugin/common'; import { - UiActionsEnhancedDynamicActionManager as DynamicActionManager, AdvancedUiActionsSetup, AdvancedUiActionsStart, + DynamicActionsState, + UiActionsEnhancedDynamicActionManager as DynamicActionManager, } from '@kbn/ui-actions-enhanced-plugin/public'; -import type { FinderAttributes } from '@kbn/saved-objects-finder-plugin/common'; -import { EnhancedEmbeddable } from './types'; -import { - EmbeddableActionStorage, - EmbeddableWithDynamicActions, -} from './embeddables/embeddable_action_storage'; +import deepEqual from 'react-fast-compare'; +import { BehaviorSubject, distinctUntilChanged } from 'rxjs'; import { PanelNotificationsAction } from './actions'; +import { + DynamicActionStorage, + type DynamicActionStorageApi, +} from './embeddables/dynamic_action_storage'; +import { HasDynamicActions } from './embeddables/interfaces/has_dynamic_actions'; +import { EnhancedEmbeddable } from './types'; export interface SetupDependencies { embeddable: EmbeddableSetup; @@ -44,8 +49,21 @@ export interface StartDependencies { // eslint-disable-next-line @typescript-eslint/no-empty-interface export interface SetupContract {} -// eslint-disable-next-line @typescript-eslint/no-empty-interface -export interface StartContract {} +export interface StartContract { + initializeReactEmbeddableDynamicActions: ( + uuid: string, + getTitle: () => string | undefined, + state: DynamicActionsSerializedState + ) => { + dynamicActionsApi: HasDynamicActions; + dynamicActionsComparator: StateComparators; + serializeDynamicActions: () => DynamicActionsSerializedState; + }; +} + +export interface DynamicActionsSerializedState { + enhancements?: { dynamicActions: DynamicActionsState }; +} export class EmbeddableEnhancedPlugin implements Plugin @@ -66,7 +84,9 @@ export class EmbeddableEnhancedPlugin public start(core: CoreStart, plugins: StartDependencies): StartContract { this.uiActions = plugins.uiActionsEnhanced; - return {}; + return { + initializeReactEmbeddableDynamicActions: this.initializeDynamicActions.bind(this), + }; } public stop() {} @@ -110,12 +130,92 @@ export class EmbeddableEnhancedPlugin return true; }; + private initializeDynamicActions( + uuid: string, + getTitle: () => string | undefined, + state: DynamicActionsSerializedState + ): { + dynamicActionsApi: HasDynamicActions; + dynamicActionsComparator: StateComparators; + serializeDynamicActions: () => DynamicActionsSerializedState; + } { + const dynamicActionsState$ = new BehaviorSubject( + { dynamicActions: { events: [] }, ...(state.enhancements ?? {}) } + ); + const api: DynamicActionStorageApi = { + dynamicActionsState$, + setDynamicActions: (newState) => dynamicActionsState$.next(newState), + }; + const storage = new DynamicActionStorage(uuid, getTitle, api); + const dynamicActions = new DynamicActionManager({ + isCompatible: async (context: unknown) => { + return apiHasUniqueId(context) && context.uuid === uuid; + }, + storage, + uiActions: this.uiActions!, + }); + this.startDynamicActions(dynamicActions); + + return { + dynamicActionsApi: { ...api, enhancements: { dynamicActions } }, + dynamicActionsComparator: { + enhancements: [ + dynamicActionsState$, + api.setDynamicActions, + (a, b) => { + return deepEqual(a, b); + }, + ], + }, + serializeDynamicActions: () => { + return { enhancements: dynamicActionsState$.getValue() }; + }, + }; + } + + /** + * TODO: Remove this entire enhanceEmbeddableWithDynamicActions method once the embeddable refactor work is complete + */ private enhanceEmbeddableWithDynamicActions( embeddable: E ): EnhancedEmbeddable { const enhancedEmbeddable = embeddable as EnhancedEmbeddable; - const storage = new EmbeddableActionStorage(embeddable as EmbeddableWithDynamicActions); + const dynamicActionsState$ = new BehaviorSubject( + { + dynamicActions: { events: [] }, + ...(embeddable.getInput().enhancements ?? {}), + } + ); + const api = { + dynamicActionsState$, + setDynamicActions: (newState: DynamicActionsSerializedState['enhancements']) => { + embeddable.updateInput({ enhancements: newState }); + }, + }; + + /** + * Keep the dynamicActionsState$ publishing subject in sync with changes to the embeddable's input. + */ + embeddable + .getInput$() + .pipe( + distinctUntilChanged(({ enhancements: old }, { enhancements: updated }) => + deepEqual(old, updated) + ) + ) + .subscribe((input) => { + dynamicActionsState$.next({ + dynamicActions: { events: [] }, + ...(input.enhancements ?? {}), + } as DynamicActionsSerializedState['enhancements']); + }); + + const storage = new DynamicActionStorage( + String(embeddable.runtimeId), + embeddable.getTitle, + api + ); const dynamicActions = new DynamicActionManager({ isCompatible: async (context: unknown) => { if (!this.isEmbeddableContext(context)) return false; @@ -125,10 +225,30 @@ export class EmbeddableEnhancedPlugin uiActions: this.uiActions!, }); + const stop = this.startDynamicActions(dynamicActions); + embeddable.getInput$().subscribe({ + next: () => { + storage.reload$.next(); + }, + error: stop, + complete: stop, + }); + + enhancedEmbeddable.enhancements = { + ...enhancedEmbeddable.enhancements, + dynamicActions, + }; + enhancedEmbeddable.dynamicActionsState$ = api.dynamicActionsState$; + enhancedEmbeddable.setDynamicActions = api.setDynamicActions; + + return enhancedEmbeddable; + } + + private startDynamicActions(dynamicActions: DynamicActionManager) { dynamicActions.start().catch((error) => { /* eslint-disable no-console */ - console.log('Failed to start embeddable dynamic actions', embeddable); + console.log('Failed to start embeddable dynamic actions', dynamicActions); console.error(error); /* eslint-enable */ }); @@ -137,25 +257,12 @@ export class EmbeddableEnhancedPlugin dynamicActions.stop().catch((error) => { /* eslint-disable no-console */ - console.log('Failed to stop embeddable dynamic actions', embeddable); + console.log('Failed to stop embeddable dynamic actions', dynamicActions); console.error(error); /* eslint-enable */ }); }; - embeddable.getInput$().subscribe({ - next: () => { - storage.reload$.next(); - }, - error: stop, - complete: stop, - }); - - enhancedEmbeddable.enhancements = { - ...enhancedEmbeddable.enhancements, - dynamicActions, - }; - - return enhancedEmbeddable; + return stop; } } diff --git a/x-pack/plugins/embeddable_enhanced/public/types.ts b/x-pack/plugins/embeddable_enhanced/public/types.ts index fd5a0f689f74b..c065e3b89060e 100644 --- a/x-pack/plugins/embeddable_enhanced/public/types.ts +++ b/x-pack/plugins/embeddable_enhanced/public/types.ts @@ -6,16 +6,9 @@ */ import { IEmbeddable } from '@kbn/embeddable-plugin/public'; -import { UiActionsEnhancedDynamicActionManager as DynamicActionManager } from '@kbn/ui-actions-enhanced-plugin/public'; +import { HasDynamicActions } from './embeddables/interfaces/has_dynamic_actions'; -export type EnhancedEmbeddable = E & { - enhancements: { - /** - * Default implementation of dynamic action manager for embeddables. - */ - dynamicActions: DynamicActionManager; - }; -}; +export type EnhancedEmbeddable = E & HasDynamicActions; /** * @deprecated use `EmbeddableApiContext` from `@kbn/presentation-publishing` diff --git a/x-pack/plugins/embeddable_enhanced/tsconfig.json b/x-pack/plugins/embeddable_enhanced/tsconfig.json index 2c7f1c5d23270..7aa9a6a2f42a6 100644 --- a/x-pack/plugins/embeddable_enhanced/tsconfig.json +++ b/x-pack/plugins/embeddable_enhanced/tsconfig.json @@ -14,8 +14,8 @@ "@kbn/i18n", "@kbn/kibana-utils-plugin", "@kbn/data-plugin", - "@kbn/utility-types", "@kbn/saved-objects-finder-plugin", + "@kbn/presentation-publishing", ], "exclude": [ "target/**/*", diff --git a/x-pack/plugins/enterprise_search/common/__mocks__/initial_app_data.ts b/x-pack/plugins/enterprise_search/common/__mocks__/initial_app_data.ts index 957f2893540ce..5ed2c6893be5f 100644 --- a/x-pack/plugins/enterprise_search/common/__mocks__/initial_app_data.ts +++ b/x-pack/plugins/enterprise_search/common/__mocks__/initial_app_data.ts @@ -38,7 +38,6 @@ export const DEFAULT_INITIAL_APP_DATA = { hasIncrementalSyncEnabled: true, hasNativeConnectors: true, hasWebCrawler: true, - showAIPlayground: false, }, appSearch: { accountId: 'some-id-string', diff --git a/x-pack/plugins/enterprise_search/common/constants.ts b/x-pack/plugins/enterprise_search/common/constants.ts index f1f60450e3c4a..e5da9ee1c0e30 100644 --- a/x-pack/plugins/enterprise_search/common/constants.ts +++ b/x-pack/plugins/enterprise_search/common/constants.ts @@ -187,6 +187,7 @@ export const ENTERPRISE_SEARCH_ANALYTICS_LOGS_SOURCE_ID = 'ent-search-analytics- export const APP_SEARCH_URL = '/app/enterprise_search/app_search'; export const ENTERPRISE_SEARCH_ELASTICSEARCH_URL = '/app/enterprise_search/elasticsearch'; export const WORKPLACE_SEARCH_URL = '/app/enterprise_search/workplace_search'; +export const CREATE_NEW_INDEX_URL = '/search_indices/new_index'; export const ENTERPRISE_SEARCH_DOCUMENTS_DEFAULT_DOC_COUNT = 25; @@ -227,7 +228,6 @@ export const DEFAULT_PRODUCT_FEATURES: ProductFeatures = { hasIncrementalSyncEnabled: true, hasNativeConnectors: true, hasWebCrawler: true, - showAIPlayground: false, }; export const CONNECTORS_ACCESS_CONTROL_INDEX_PREFIX = '.search-acl-filter-'; diff --git a/x-pack/plugins/enterprise_search/common/locators/create_index_locator.tsx b/x-pack/plugins/enterprise_search/common/locators/create_index_locator.tsx new file mode 100644 index 0000000000000..c5d8b80125f62 --- /dev/null +++ b/x-pack/plugins/enterprise_search/common/locators/create_index_locator.tsx @@ -0,0 +1,25 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { LocatorDefinition } from '@kbn/share-plugin/common'; +import { SerializableRecord } from '@kbn/utility-types'; + +import { CREATE_NEW_INDEX_URL, ENTERPRISE_SEARCH_CONTENT_PLUGIN } from '../constants'; + +export type CreatIndexLocatorParams = SerializableRecord; + +export class CreatIndexLocatorDefinition implements LocatorDefinition { + public readonly id = 'CREATE_INDEX_LOCATOR_ID'; + + public readonly getLocation = async () => { + return { + app: ENTERPRISE_SEARCH_CONTENT_PLUGIN.ID, + path: CREATE_NEW_INDEX_URL, + state: {}, + }; + }; +} diff --git a/x-pack/plugins/enterprise_search/common/types/index.ts b/x-pack/plugins/enterprise_search/common/types/index.ts index 650a852f47e6b..1d9fb9b2cb0c1 100644 --- a/x-pack/plugins/enterprise_search/common/types/index.ts +++ b/x-pack/plugins/enterprise_search/common/types/index.ts @@ -43,8 +43,6 @@ export interface ProductFeatures { hasIncrementalSyncEnabled: boolean; hasNativeConnectors: boolean; hasWebCrawler: boolean; - // Temp Feature Flag for AI Playground page - showAIPlayground: boolean; } export interface SearchOAuth { diff --git a/x-pack/plugins/enterprise_search/kibana.jsonc b/x-pack/plugins/enterprise_search/kibana.jsonc index ff58e36304577..dbc9d4fad0081 100644 --- a/x-pack/plugins/enterprise_search/kibana.jsonc +++ b/x-pack/plugins/enterprise_search/kibana.jsonc @@ -23,7 +23,8 @@ "lens", "embeddable", "share", - "console" + "console", + "searchPlayground" ], "optionalPlugins": [ "customIntegrations", diff --git a/x-pack/plugins/enterprise_search/public/applications/__mocks__/kea_logic/kibana_logic.mock.ts b/x-pack/plugins/enterprise_search/public/applications/__mocks__/kea_logic/kibana_logic.mock.ts index bc397d3c1fcd6..80d42ffefe882 100644 --- a/x-pack/plugins/enterprise_search/public/applications/__mocks__/kea_logic/kibana_logic.mock.ts +++ b/x-pack/plugins/enterprise_search/public/applications/__mocks__/kea_logic/kibana_logic.mock.ts @@ -14,6 +14,7 @@ import { dataPluginMock } from '@kbn/data-plugin/public/mocks'; import { LensPublicStart } from '@kbn/lens-plugin/public'; import { mlPluginMock } from '@kbn/ml-plugin/public/mocks'; +import { searchPlaygroundMock } from '@kbn/search-playground/__mocks__/search_playground_mock'; import { securityMock } from '@kbn/security-plugin/public/mocks'; import { sharePluginMock } from '@kbn/share-plugin/public/mocks'; @@ -58,6 +59,7 @@ export const mockKibanaValues = { hasWebCrawler: true, }, renderHeaderActions: jest.fn(), + searchPlayground: searchPlaygroundMock.createStart(), security: securityMock.createStart(), setBreadcrumbs: jest.fn(), setChromeIsVisible: jest.fn(), diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/layout/page_template.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/layout/page_template.tsx index 0bc6dc03c4388..a4d514e0ec1d8 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/layout/page_template.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/layout/page_template.tsx @@ -17,6 +17,7 @@ export const EnterpriseSearchContentPageTemplate: React.FC = children, pageChrome, pageViewTelemetry, + restrictWidth = true, ...pageTemplateProps }) => { return ( @@ -26,7 +27,7 @@ export const EnterpriseSearchContentPageTemplate: React.FC = items: useEnterpriseSearchNav(), name: ENTERPRISE_SEARCH_CONTENT_PLUGIN.NAME, }} - restrictWidth + restrictWidth={restrictWidth} setPageChrome={pageChrome && } > {pageViewTelemetry && ( diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/playground/playground.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/playground/playground.tsx new file mode 100644 index 0000000000000..f4e7dd4adb216 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/playground/playground.tsx @@ -0,0 +1,43 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; + +import { useValues } from 'kea'; + +import { i18n } from '@kbn/i18n'; + +import { KibanaLogic } from '../../../shared/kibana'; +import { EnterpriseSearchContentPageTemplate } from '../layout/page_template'; + +export const Playground: React.FC = () => { + const { searchPlayground } = useValues(KibanaLogic); + + return ( + + ], + }} + pageViewTelemetry="Playground" + restrictWidth={false} + customPageSections + bottomBorder="extended" + > + + + + ); +}; diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/playground/types.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/playground/types.ts new file mode 100644 index 0000000000000..71a46c5c9a1bc --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/playground/types.ts @@ -0,0 +1,19 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +export enum MessageRole { + 'user' = 'user', + 'assistant' = 'assistant', + 'system' = 'system', +} + +export interface Message { + id: string; + content: string | React.ReactNode; + createdAt?: Date; + role: MessageRole; +} diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/index.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/index.tsx index 2ec701aa9847b..ea219fe9fa6eb 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/index.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/index.tsx @@ -23,6 +23,7 @@ import { VersionMismatchPage } from '../shared/version_mismatch'; import { ConnectorsRouter } from './components/connectors/connectors_router'; import { CrawlersRouter } from './components/connectors/crawlers_router'; import { NotFound } from './components/not_found'; +import { Playground } from './components/playground/playground'; import { SearchIndicesRouter } from './components/search_indices'; import { CONNECTORS_PATH, @@ -31,6 +32,7 @@ import { ROOT_PATH, SEARCH_INDICES_PATH, SETUP_GUIDE_PATH, + PLAYGROUND_PATH, } from './routes'; export const EnterpriseSearchContent: React.FC = (props) => { @@ -82,6 +84,9 @@ export const EnterpriseSearchContentConfigured: React.FC + + + diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/routes.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/routes.ts index 8fc6fcbfb5272..902870752035c 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/routes.ts +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/routes.ts @@ -13,6 +13,7 @@ export const ERROR_STATE_PATH = '/error_state'; export const SEARCH_INDICES_PATH = `${ROOT_PATH}search_indices`; export const CONNECTORS_PATH = `${ROOT_PATH}connectors`; export const CRAWLERS_PATH = `${ROOT_PATH}crawlers`; +export const PLAYGROUND_PATH = `${ROOT_PATH}playground`; export const SETTINGS_PATH = `${ROOT_PATH}settings`; export const NEW_INDEX_PATH = `${SEARCH_INDICES_PATH}/new_index`; diff --git a/x-pack/plugins/enterprise_search/public/applications/index.tsx b/x-pack/plugins/enterprise_search/public/applications/index.tsx index 928b6bfbac46c..77fc9f181db3f 100644 --- a/x-pack/plugins/enterprise_search/public/applications/index.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/index.tsx @@ -121,6 +121,7 @@ export const renderApp = ( params.setHeaderActionMenu( HeaderActions ? renderHeaderActions.bind(null, HeaderActions, store, params) : undefined ), + searchPlayground: plugins.searchPlayground, security, setBreadcrumbs: chrome.setBreadcrumbs, setChromeIsVisible: chrome.setIsVisible, diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/kibana/kibana_logic.ts b/x-pack/plugins/enterprise_search/public/applications/shared/kibana/kibana_logic.ts index 7361897b21ef9..12088c50ab88e 100644 --- a/x-pack/plugins/enterprise_search/public/applications/shared/kibana/kibana_logic.ts +++ b/x-pack/plugins/enterprise_search/public/applications/shared/kibana/kibana_logic.ts @@ -25,6 +25,7 @@ import { GuidedOnboardingPluginStart } from '@kbn/guided-onboarding-plugin/publi import { LensPublicStart } from '@kbn/lens-plugin/public'; import { MlPluginStart } from '@kbn/ml-plugin/public'; import { ELASTICSEARCH_URL_PLACEHOLDER } from '@kbn/search-api-panels/constants'; +import { SearchPlaygroundPluginStart } from '@kbn/search-playground/public'; import { AuthenticatedUser, SecurityPluginStart } from '@kbn/security-plugin/public'; import { SharePluginStart } from '@kbn/share-plugin/public'; @@ -55,6 +56,7 @@ export interface KibanaLogicProps { productAccess: ProductAccess; productFeatures: ProductFeatures; renderHeaderActions(HeaderActions?: FC): void; + searchPlayground: SearchPlaygroundPluginStart; security: SecurityPluginStart; setBreadcrumbs(crumbs: ChromeBreadcrumb[]): void; setChromeIsVisible(isVisible: boolean): void; @@ -100,6 +102,7 @@ export const KibanaLogic = kea>({ productAccess: [props.productAccess, {}], productFeatures: [props.productFeatures, {}], renderHeaderActions: [props.renderHeaderActions, {}], + searchPlayground: [props.searchPlayground || {}, {}], security: [props.security, {}], setBreadcrumbs: [props.setBreadcrumbs, {}], setChromeIsVisible: [props.setChromeIsVisible, {}], diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/layout/nav.test.tsx b/x-pack/plugins/enterprise_search/public/applications/shared/layout/nav.test.tsx index d643a2371984c..b24f5251af259 100644 --- a/x-pack/plugins/enterprise_search/public/applications/shared/layout/nav.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/shared/layout/nav.test.tsx @@ -57,6 +57,12 @@ const baseNavItems = [ items: undefined, name: 'Web crawlers', }, + { + href: '/app/enterprise_search/content/playground', + id: 'playground', + items: undefined, + name: 'Playground', + }, ], name: 'Content', }, diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/layout/nav.tsx b/x-pack/plugins/enterprise_search/public/applications/shared/layout/nav.tsx index 5f0efc3688d6d..4a3cb6dc197fc 100644 --- a/x-pack/plugins/enterprise_search/public/applications/shared/layout/nav.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/shared/layout/nav.tsx @@ -26,6 +26,7 @@ import { import { SEARCH_APPLICATIONS_PATH, SearchApplicationViewTabs } from '../../applications/routes'; import { useIndicesNav } from '../../enterprise_search_content/components/search_index/indices/indices_nav'; import { + PLAYGROUND_PATH, CONNECTORS_PATH, CRAWLERS_PATH, SEARCH_INDICES_PATH, @@ -92,6 +93,17 @@ export const useEnterpriseSearchNav = () => { to: ENTERPRISE_SEARCH_CONTENT_PLUGIN.URL + CRAWLERS_PATH, }), }, + { + id: 'playground', + name: i18n.translate('xpack.enterpriseSearch.nav.PlaygroundTitle', { + defaultMessage: 'Playground', + }), + ...generateNavLink({ + shouldNotCreateHref: true, + shouldShowActiveForSubroutes: true, + to: ENTERPRISE_SEARCH_CONTENT_PLUGIN.URL + PLAYGROUND_PATH, + }), + }, ], name: i18n.translate('xpack.enterpriseSearch.nav.contentTitle', { defaultMessage: 'Content', diff --git a/x-pack/plugins/enterprise_search/public/applications/test_helpers/test_utils.test_helper.tsx b/x-pack/plugins/enterprise_search/public/applications/test_helpers/test_utils.test_helper.tsx index 571cb0e092416..86eeb909480f2 100644 --- a/x-pack/plugins/enterprise_search/public/applications/test_helpers/test_utils.test_helper.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/test_helpers/test_utils.test_helper.tsx @@ -22,6 +22,7 @@ import { dataPluginMock } from '@kbn/data-plugin/public/mocks'; import { I18nProvider } from '@kbn/i18n-react'; import { LensPublicStart } from '@kbn/lens-plugin/public'; import { mlPluginMock } from '@kbn/ml-plugin/public/mocks'; +import { searchPlaygroundMock } from '@kbn/search-playground/__mocks__/search_playground_mock'; import { securityMock } from '@kbn/security-plugin/public/mocks'; import { sharePluginMock } from '@kbn/share-plugin/public/mocks'; @@ -73,9 +74,9 @@ export const mockKibanaProps: KibanaLogicProps = { hasIncrementalSyncEnabled: true, hasNativeConnectors: true, hasWebCrawler: true, - showAIPlayground: false, }, renderHeaderActions: jest.fn(), + searchPlayground: searchPlaygroundMock.createStart(), security: securityMock.createStart(), setBreadcrumbs: jest.fn(), setChromeIsVisible: jest.fn(), diff --git a/x-pack/plugins/enterprise_search/public/plugin.ts b/x-pack/plugins/enterprise_search/public/plugin.ts index 721bdd4ff3bf6..81884546e44f4 100644 --- a/x-pack/plugins/enterprise_search/public/plugin.ts +++ b/x-pack/plugins/enterprise_search/public/plugin.ts @@ -18,14 +18,16 @@ import { DEFAULT_APP_CATEGORIES, } from '@kbn/core/public'; import { DataPublicPluginStart } from '@kbn/data-plugin/public'; + import { GuidedOnboardingPluginStart } from '@kbn/guided-onboarding-plugin/public'; import type { HomePublicPluginSetup } from '@kbn/home-plugin/public'; import { LensPublicStart } from '@kbn/lens-plugin/public'; import { LicensingPluginStart } from '@kbn/licensing-plugin/public'; import { MlPluginStart } from '@kbn/ml-plugin/public'; import { ELASTICSEARCH_URL_PLACEHOLDER } from '@kbn/search-api-panels/constants'; +import { SearchPlaygroundPluginStart } from '@kbn/search-playground/public'; import { SecurityPluginSetup, SecurityPluginStart } from '@kbn/security-plugin/public'; -import { SharePluginStart } from '@kbn/share-plugin/public'; +import { SharePluginSetup, SharePluginStart } from '@kbn/share-plugin/public'; import { ANALYTICS_PLUGIN, @@ -40,6 +42,10 @@ import { VECTOR_SEARCH_PLUGIN, WORKPLACE_SEARCH_PLUGIN, } from '../common/constants'; +import { + CreatIndexLocatorDefinition, + CreatIndexLocatorParams, +} from '../common/locators/create_index_locator'; import { ClientConfigType, InitialAppData } from '../common/types'; import { docLinks } from './applications/shared/doc_links'; @@ -56,6 +62,7 @@ interface PluginsSetup { cloud?: CloudSetup; home?: HomePublicPluginSetup; security: SecurityPluginSetup; + share: SharePluginSetup; } export interface PluginsStart { @@ -67,6 +74,7 @@ export interface PluginsStart { lens: LensPublicStart; licensing: LicensingPluginStart; ml: MlPluginStart; + searchPlayground: SearchPlaygroundPluginStart; security: SecurityPluginStart; share: SharePluginStart; } @@ -143,7 +151,7 @@ export class EnterpriseSearchPlugin implements Plugin { if (!config.ui?.enabled) { return; } - const { cloud } = plugins; + const { cloud, share } = plugins; core.application.register({ appRoute: ENTERPRISE_SEARCH_OVERVIEW_PLUGIN.URL, @@ -320,6 +328,8 @@ export class EnterpriseSearchPlugin implements Plugin { visibleIn: [], }); + share.url.locators.create(new CreatIndexLocatorDefinition()); + if (config.canDeployEntSearch) { core.application.register({ appRoute: APP_SEARCH_PLUGIN.URL, diff --git a/x-pack/plugins/enterprise_search/server/index.ts b/x-pack/plugins/enterprise_search/server/index.ts index 949c66cc37892..53d8cbca7f540 100644 --- a/x-pack/plugins/enterprise_search/server/index.ts +++ b/x-pack/plugins/enterprise_search/server/index.ts @@ -39,8 +39,6 @@ export const configSchema = schema.object({ ui: schema.object({ enabled: schema.boolean({ defaultValue: true }), }), - // Temp Feature Flag for AI Playground page - showAIPlayground: schema.boolean({ defaultValue: false }), }); export type ConfigType = TypeOf; diff --git a/x-pack/plugins/enterprise_search/server/lib/enterprise_search_config_api.test.ts b/x-pack/plugins/enterprise_search/server/lib/enterprise_search_config_api.test.ts index 2b34ed6e3245f..fb17854f6f674 100644 --- a/x-pack/plugins/enterprise_search/server/lib/enterprise_search_config_api.test.ts +++ b/x-pack/plugins/enterprise_search/server/lib/enterprise_search_config_api.test.ts @@ -211,7 +211,6 @@ describe('callEnterpriseSearchConfigAPI', () => { hasDefaultIngestPipeline: false, hasNativeConnectors: false, hasWebCrawler: false, - showAIPlayground: false, host: '', }; @@ -225,7 +224,6 @@ describe('callEnterpriseSearchConfigAPI', () => { hasDefaultIngestPipeline: false, hasNativeConnectors: false, hasWebCrawler: false, - showAIPlayground: false, }, kibanaVersion: '1.0.0', }); diff --git a/x-pack/plugins/enterprise_search/server/lib/enterprise_search_config_api.ts b/x-pack/plugins/enterprise_search/server/lib/enterprise_search_config_api.ts index 1cfb6d033051f..90fccce31344b 100644 --- a/x-pack/plugins/enterprise_search/server/lib/enterprise_search_config_api.ts +++ b/x-pack/plugins/enterprise_search/server/lib/enterprise_search_config_api.ts @@ -56,7 +56,6 @@ export const callEnterpriseSearchConfigAPI = async ({ hasIncrementalSyncEnabled: config.hasIncrementalSyncEnabled, hasNativeConnectors: config.hasNativeConnectors, hasWebCrawler: config.hasWebCrawler, - showAIPlayground: config.showAIPlayground, }, kibanaVersion: kibanaPackageJson.version, }; @@ -112,7 +111,6 @@ export const callEnterpriseSearchConfigAPI = async ({ hasIncrementalSyncEnabled: config.hasIncrementalSyncEnabled, hasNativeConnectors: config.hasNativeConnectors, hasWebCrawler: config.hasWebCrawler, - showAIPlayground: config.showAIPlayground, }, publicUrl: stripTrailingSlash(data?.settings?.external_url), readOnlyMode: !!data?.settings?.read_only_mode, diff --git a/x-pack/plugins/enterprise_search/tsconfig.json b/x-pack/plugins/enterprise_search/tsconfig.json index afe5f39650f33..678654ed47a40 100644 --- a/x-pack/plugins/enterprise_search/tsconfig.json +++ b/x-pack/plugins/enterprise_search/tsconfig.json @@ -68,6 +68,8 @@ "@kbn/code-editor", "@kbn/console-plugin", "@kbn/core-notifications-browser", - "@kbn/es-errors" + "@kbn/es-errors", + "@kbn/search-playground", + "@kbn/utility-types" ] } diff --git a/x-pack/plugins/event_log/generated/mappings.json b/x-pack/plugins/event_log/generated/mappings.json index 84c7b8acd303f..561217eeae803 100644 --- a/x-pack/plugins/event_log/generated/mappings.json +++ b/x-pack/plugins/event_log/generated/mappings.json @@ -398,9 +398,6 @@ "prepare_rule_duration_ms": { "type": "long" }, - "prepare_to_run_duration_ms": { - "type": "long" - }, "total_run_duration_ms": { "type": "long" }, diff --git a/x-pack/plugins/event_log/generated/schemas.ts b/x-pack/plugins/event_log/generated/schemas.ts index d4865320c042d..b8be2221ec1ed 100644 --- a/x-pack/plugins/event_log/generated/schemas.ts +++ b/x-pack/plugins/event_log/generated/schemas.ts @@ -175,7 +175,6 @@ export const EventSchema = schema.maybe( claim_to_start_duration_ms: ecsStringOrNumber(), persist_alerts_duration_ms: ecsStringOrNumber(), prepare_rule_duration_ms: ecsStringOrNumber(), - prepare_to_run_duration_ms: ecsStringOrNumber(), total_run_duration_ms: ecsStringOrNumber(), total_enrichment_duration_ms: ecsStringOrNumber(), }) diff --git a/x-pack/plugins/event_log/scripts/mappings.js b/x-pack/plugins/event_log/scripts/mappings.js index db5334d7d4ef6..6d0ec3635ab41 100644 --- a/x-pack/plugins/event_log/scripts/mappings.js +++ b/x-pack/plugins/event_log/scripts/mappings.js @@ -173,9 +173,6 @@ exports.EcsCustomPropertyMappings = { prepare_rule_duration_ms: { type: 'long', }, - prepare_to_run_duration_ms: { - type: 'long', - }, total_run_duration_ms: { type: 'long', }, diff --git a/x-pack/plugins/features/server/__snapshots__/oss_features.test.ts.snap b/x-pack/plugins/features/server/__snapshots__/oss_features.test.ts.snap index 11b6f64b0ef5a..c573d2a659060 100644 --- a/x-pack/plugins/features/server/__snapshots__/oss_features.test.ts.snap +++ b/x-pack/plugins/features/server/__snapshots__/oss_features.test.ts.snap @@ -434,7 +434,7 @@ Array [ "reporting", ], }, - "name": "Download CSV reports from Saved Search panels", + "name": "Generate CSV reports from Saved Search panels", "savedObject": Object { "all": Array [], "read": Array [], diff --git a/x-pack/plugins/features/server/oss_features.ts b/x-pack/plugins/features/server/oss_features.ts index 21eb4a2556074..d737468c5d212 100644 --- a/x-pack/plugins/features/server/oss_features.ts +++ b/x-pack/plugins/features/server/oss_features.ts @@ -605,7 +605,7 @@ const reportingFeatures: { { id: 'download_csv_report', name: i18n.translate('xpack.features.ossFeatures.reporting.dashboardDownloadCSV', { - defaultMessage: 'Download CSV reports from Saved Search panels', + defaultMessage: 'Generate CSV reports from Saved Search panels', }), includeIn: 'all', savedObject: { all: [], read: [] }, diff --git a/x-pack/plugins/fleet/common/services/simplified_package_policy_helper.ts b/x-pack/plugins/fleet/common/services/simplified_package_policy_helper.ts index ca42d65d8a399..697ef7c077f2e 100644 --- a/x-pack/plugins/fleet/common/services/simplified_package_policy_helper.ts +++ b/x-pack/plugins/fleet/common/services/simplified_package_policy_helper.ts @@ -146,6 +146,7 @@ export function simplifiedPackagePolicytoNewPackagePolicy( vars: packageLevelVars, } = data; const packagePolicy = packageToPackagePolicy(packageInfo, policyId, namespace, name, description); + if (packagePolicy.package && options?.experimental_data_stream_features) { packagePolicy.package.experimental_data_stream_features = options.experimental_data_stream_features; diff --git a/x-pack/plugins/fleet/common/types/models/preconfiguration.ts b/x-pack/plugins/fleet/common/types/models/preconfiguration.ts index c6ad134fb31c9..8363116bf3bb1 100644 --- a/x-pack/plugins/fleet/common/types/models/preconfiguration.ts +++ b/x-pack/plugins/fleet/common/types/models/preconfiguration.ts @@ -5,6 +5,8 @@ * 2.0. */ +import type { SimplifiedPackagePolicy } from '../../services/simplified_package_policy_helper'; + import type { PackagePolicyPackage, NewPackagePolicy, @@ -24,12 +26,16 @@ export interface PreconfiguredAgentPolicy extends Omit> & { - id?: string | number; - name: string; - package: Partial & { name: string }; - inputs?: InputsOverride[]; - } + | (Partial> & { + id?: string | number; + name: string; + package: Partial & { name: string }; + inputs?: InputsOverride[]; + }) + | (Omit & { + id: string; + package: { name: string }; + }) >; } diff --git a/x-pack/plugins/fleet/server/services/agent_policies/__snapshots__/full_agent_policy.test.ts.snap b/x-pack/plugins/fleet/server/services/agent_policies/__snapshots__/full_agent_policy.test.ts.snap index 21192a1158009..86f8126c1c45a 100644 --- a/x-pack/plugins/fleet/server/services/agent_policies/__snapshots__/full_agent_policy.test.ts.snap +++ b/x-pack/plugins/fleet/server/services/agent_policies/__snapshots__/full_agent_policy.test.ts.snap @@ -12,7 +12,7 @@ Object { "logs": false, "metrics": true, "namespace": "default", - "use_output": "test-id", + "use_output": "default", }, "protection": Object { "enabled": false, @@ -35,7 +35,7 @@ Object { ], }, }, - "test-id": Object { + "default": Object { "_elastic_agent_checks": Object { "cluster": Array [ "monitor", @@ -61,7 +61,7 @@ Object { "preset": "balanced", "type": "elasticsearch", }, - "test-id": Object { + "default": Object { "hosts": Array [ "http://127.0.0.1:9201", ], @@ -106,6 +106,13 @@ Object { "id": "agent-policy", "inputs": Array [], "output_permissions": Object { + "default": Object { + "_elastic_agent_checks": Object { + "cluster": Array [ + "monitor", + ], + }, + }, "monitoring-output-id": Object { "_elastic_agent_checks": Object { "cluster": Array [ @@ -123,25 +130,18 @@ Object { ], }, }, - "test-id": Object { - "_elastic_agent_checks": Object { - "cluster": Array [ - "monitor", - ], - }, - }, }, "outputs": Object { - "monitoring-output-id": Object { + "default": Object { "hosts": Array [ - "http://es-monitoring.co:9201", + "http://127.0.0.1:9201", ], "preset": "balanced", "type": "elasticsearch", }, - "test-id": Object { + "monitoring-output-id": Object { "hosts": Array [ - "http://127.0.0.1:9201", + "http://es-monitoring.co:9201", ], "preset": "balanced", "type": "elasticsearch", diff --git a/x-pack/plugins/fleet/server/services/agent_policies/full_agent_policy.test.ts b/x-pack/plugins/fleet/server/services/agent_policies/full_agent_policy.test.ts index 09bf54773509f..0ecd385c2516c 100644 --- a/x-pack/plugins/fleet/server/services/agent_policies/full_agent_policy.test.ts +++ b/x-pack/plugins/fleet/server/services/agent_policies/full_agent_policy.test.ts @@ -93,6 +93,15 @@ jest.mock('../output', () => { type: 'elasticsearch', hosts: ['http://127.0.0.1:9201'], }, + 'test-remote-id': { + id: 'test-remote-id', + is_default: true, + is_default_monitoring: true, + name: 'default', + // @ts-ignore + type: 'remote_elasticsearch', + hosts: ['http://127.0.0.1:9201'], + }, }; return { outputService: { @@ -197,7 +206,7 @@ describe('getFullAgentPolicy', () => { expect(agentPolicy).toMatchObject({ id: 'agent-policy', outputs: { - 'test-id': { + default: { type: 'elasticsearch', hosts: ['http://127.0.0.1:9201'], }, @@ -228,7 +237,7 @@ describe('getFullAgentPolicy', () => { expect(agentPolicy).toMatchObject({ id: 'agent-policy', outputs: { - 'test-id': { + default: { type: 'elasticsearch', hosts: ['http://127.0.0.1:9201'], }, @@ -244,7 +253,7 @@ describe('getFullAgentPolicy', () => { }, monitoring: { namespace: 'default', - use_output: 'test-id', + use_output: 'default', enabled: true, logs: true, metrics: false, @@ -264,7 +273,7 @@ describe('getFullAgentPolicy', () => { expect(agentPolicy).toMatchObject({ id: 'agent-policy', outputs: { - 'test-id': { + default: { type: 'elasticsearch', hosts: ['http://127.0.0.1:9201'], }, @@ -280,7 +289,7 @@ describe('getFullAgentPolicy', () => { }, monitoring: { namespace: 'default', - use_output: 'test-id', + use_output: 'default', enabled: true, logs: false, metrics: true, @@ -358,7 +367,7 @@ describe('getFullAgentPolicy', () => { expect(agentPolicy).toMatchSnapshot(); }); - it('should use output id from default policy id', async () => { + it('should use "default" as the default policy id', async () => { mockAgentPolicy({ id: 'policy', status: 'active', @@ -372,7 +381,24 @@ describe('getFullAgentPolicy', () => { const agentPolicy = await getFullAgentPolicy(savedObjectsClientMock.create(), 'agent-policy'); - expect(agentPolicy?.outputs['test-id']).toBeDefined(); + expect(agentPolicy?.outputs.default).toBeDefined(); + }); + + it('should use output id as the default policy id when remote elasticsearch', async () => { + mockAgentPolicy({ + id: 'policy', + status: 'active', + package_policies: [], + is_managed: false, + namespace: 'default', + revision: 1, + data_output_id: 'test-remote-id', + monitoring_output_id: 'test-remote-id', + }); + + const agentPolicy = await getFullAgentPolicy(savedObjectsClientMock.create(), 'agent-policy'); + + expect(agentPolicy?.outputs['test-remote-id']).toBeDefined(); }); it('should return the sourceURI from the agent policy', async () => { @@ -387,7 +413,7 @@ describe('getFullAgentPolicy', () => { expect(agentPolicy).toMatchObject({ id: 'agent-policy', outputs: { - 'test-id': { + default: { type: 'elasticsearch', hosts: ['http://127.0.0.1:9201'], }, @@ -403,7 +429,7 @@ describe('getFullAgentPolicy', () => { }, monitoring: { namespace: 'default', - use_output: 'test-id', + use_output: 'default', enabled: true, logs: false, metrics: true, @@ -427,7 +453,7 @@ describe('getFullAgentPolicy', () => { expect(agentPolicy).toMatchObject({ id: 'agent-policy', outputs: { - 'test-id': { + default: { type: 'elasticsearch', hosts: ['http://127.0.0.1:9201'], }, @@ -440,7 +466,7 @@ describe('getFullAgentPolicy', () => { agent: { monitoring: { namespace: 'default', - use_output: 'test-id', + use_output: 'default', enabled: true, logs: false, metrics: true, @@ -626,7 +652,7 @@ describe('getFullAgentPolicy', () => { }, ], type: 'test-logs', - use_output: 'test-id', + use_output: 'default', }, { data_stream: { @@ -652,11 +678,11 @@ describe('getFullAgentPolicy', () => { }, ], type: 'test-logs', - use_output: 'test-id', + use_output: 'default', }, ], output_permissions: { - 'test-id': { + default: { _elastic_agent_checks: { cluster: ['monitor'], }, @@ -679,7 +705,7 @@ describe('getFullAgentPolicy', () => { }, }, outputs: { - 'test-id': { + default: { hosts: ['http://127.0.0.1:9201'], preset: 'balanced', type: 'elasticsearch', diff --git a/x-pack/plugins/fleet/server/services/agent_policies/full_agent_policy.ts b/x-pack/plugins/fleet/server/services/agent_policies/full_agent_policy.ts index 3a35eb9373cb6..ab277a97774d0 100644 --- a/x-pack/plugins/fleet/server/services/agent_policies/full_agent_policy.ts +++ b/x-pack/plugins/fleet/server/services/agent_policies/full_agent_policy.ts @@ -31,7 +31,12 @@ import type { PackageInfo, } from '../../../common/types'; import { agentPolicyService } from '../agent_policy'; -import { dataTypes, kafkaCompressionType, outputType } from '../../../common/constants'; +import { + dataTypes, + DEFAULT_OUTPUT, + kafkaCompressionType, + outputType, +} from '../../../common/constants'; import { getPackageInfo } from '../epm/packages'; import { pkgToPkgKey, splitPkgKey } from '../epm/registry'; @@ -490,8 +495,12 @@ export function transformOutputToFullPolicyOutput( /** * Get id used in full agent policy (sent to the agents) + * we use "default" for the default policy to avoid breaking changes */ function getOutputIdForAgentPolicy(output: Output) { + if (output.is_default && output.type === outputType.Elasticsearch) { + return DEFAULT_OUTPUT.name; + } return output.id; } diff --git a/x-pack/plugins/fleet/server/services/preconfiguration.test.ts b/x-pack/plugins/fleet/server/services/preconfiguration.test.ts index fa81ae68a0445..d9fd99bfc2f24 100644 --- a/x-pack/plugins/fleet/server/services/preconfiguration.test.ts +++ b/x-pack/plugins/fleet/server/services/preconfiguration.test.ts @@ -233,6 +233,22 @@ jest.mock('./epm/packages/get', () => ({ return { status: 'installed', ...installedPackage, + policy_templates: [ + { + name: 'test_template', + inputs: [ + { + type: 'foo', + vars: [ + { + name: 'bar', + type: 'text', + }, + ], + }, + ], + }, + ], }; }, getInstallation({ pkgName }: { pkgName: string }) { @@ -379,6 +395,72 @@ describe('policy preconfiguration', () => { expect(nonFatalErrors.length).toBe(0); }); + it('should install packages and configure agent policies successfully if using simplified package policy', async () => { + const soClient = getPutPreconfiguredPackagesMock(); + const esClient = elasticsearchServiceMock.createClusterClient().asInternalUser; + + const { policies, packages, nonFatalErrors } = await ensurePreconfiguredPackagesAndPolicies( + soClient, + esClient, + [ + { + name: 'Test policy', + namespace: 'default', + id: 'test-id', + package_policies: [ + { + id: 'test-1', + name: 'Test package', + namespace: 'default', + description: 'test', + package: { name: 'test_package' }, + inputs: { + 'test_template-foo': { + vars: { + bar: 'test', + }, + }, + }, + }, + ], + }, + ] as PreconfiguredAgentPolicy[], + [{ name: 'test_package', version: '3.0.0' }], + mockDefaultOutput, + mockDefaultDownloadService, + DEFAULT_SPACE_ID + ); + + expect(policies.length).toEqual(1); + expect(policies[0].id).toBe('test-id'); + expect(packages).toEqual(expect.arrayContaining(['test_package-3.0.0'])); + expect(nonFatalErrors.length).toBe(0); + + expect(mockedPackagePolicyService.create).toBeCalledWith( + expect.anything(), + expect.anything(), + expect.objectContaining({ + description: 'test', + enabled: true, + inputs: [ + { + enabled: true, + policy_template: 'test_template', + streams: [], + type: 'foo', + vars: { bar: { type: 'text', value: 'test' } }, + }, + ], + name: 'Test package', + namespace: 'default', + package: { name: 'test_package', title: 'test_package', version: '3.0.0' }, + policy_id: 'test-id', + vars: undefined, + }), + expect.objectContaining({ id: 'test-1' }) + ); + }); + it('should install prelease packages if needed', async () => { const soClient = getPutPreconfiguredPackagesMock(); const esClient = elasticsearchServiceMock.createClusterClient().asInternalUser; @@ -869,7 +951,9 @@ describe('policy preconfiguration', () => { const esClient = elasticsearchServiceMock.createClusterClient().asInternalUser; // Install an older version of a test package - mockInstalledPackages.set('test_package', { version: '0.9.0' }); + mockInstalledPackages.set('test_package', { + version: '0.9.0', + }); const { policies, packages, nonFatalErrors } = await ensurePreconfiguredPackagesAndPolicies( diff --git a/x-pack/plugins/fleet/server/services/preconfiguration.ts b/x-pack/plugins/fleet/server/services/preconfiguration.ts index a6c05bf969ff2..abab7edcc103b 100644 --- a/x-pack/plugins/fleet/server/services/preconfiguration.ts +++ b/x-pack/plugins/fleet/server/services/preconfiguration.ts @@ -25,6 +25,10 @@ import type { import type { PreconfigurationError } from '../../common/constants'; import { PRECONFIGURATION_LATEST_KEYWORD } from '../../common/constants'; import { PRECONFIGURATION_DELETION_RECORD_SAVED_OBJECT_TYPE } from '../constants'; +import { + type SimplifiedPackagePolicy, + simplifiedPackagePolicytoNewPackagePolicy, +} from '../../common/services/simplified_package_policy_helper'; import { FleetError } from '../errors'; @@ -34,7 +38,7 @@ import { getInstallation, getPackageInfo } from './epm/packages'; import { ensurePackagesCompletedInstall } from './epm/packages/install'; import { bulkInstallPackages } from './epm/packages/bulk_install_packages'; import { agentPolicyService, addPackageToAgentPolicy } from './agent_policy'; -import type { InputsOverride } from './package_policy'; +import { type InputsOverride, packagePolicyService } from './package_policy'; import { preconfigurePackageInputs } from './package_policy'; import { appContextService } from './app_context'; import type { UpgradeManagedPackagePoliciesResult } from './managed_package_policies'; @@ -219,7 +223,8 @@ export async function ensurePreconfiguredPackagesAndPolicies( true ); const installedPackagePolicies = await Promise.all( - packagePolicies.map(async ({ package: pkg, name, ...newPackagePolicy }) => { + packagePolicies.map(async (preconfiguredPackagePolicy) => { + const { package: pkg, ...newPackagePolicy } = preconfiguredPackagePolicy; const installedPackage = await getInstallation({ savedObjectsClient: soClient, pkgName: pkg.name, @@ -245,22 +250,23 @@ export async function ensurePreconfiguredPackagesAndPolicies( '[{agentPolicyName}] could not be added. [{pkgName}] is not installed, add [{pkgName}] to [{packagesConfigValue}] or remove it from [{packagePolicyName}].', values: { agentPolicyName: preconfiguredAgentPolicy.name, - packagePolicyName: name, + packagePolicyName: newPackagePolicy.name, pkgName: pkg.name, packagesConfigValue: 'xpack.fleet.packages', }, }) ); } - return { name, installedPackage, ...newPackagePolicy }; + return { installedPackage, packagePolicy: newPackagePolicy }; }) ); const packagePoliciesToAdd = installedPackagePolicies.filter((installablePackagePolicy) => { return !(agentPolicyWithPackagePolicies?.package_policies as PackagePolicy[]).some( (packagePolicy) => - (packagePolicy.id !== undefined && packagePolicy.id === installablePackagePolicy.id) || - packagePolicy.name === installablePackagePolicy.name + (packagePolicy.id !== undefined && + packagePolicy.id === installablePackagePolicy.packagePolicy.id) || + packagePolicy.name === installablePackagePolicy.packagePolicy.name ); }); logger.debug(`Adding preconfigured package policies ${packagePoliciesToAdd}`); @@ -330,14 +336,16 @@ async function addPreconfiguredPolicyPackages( soClient: SavedObjectsClientContract, esClient: ElasticsearchClient, agentPolicy: AgentPolicy, - installedPackagePolicies: Array< - Partial> & { - id?: string | number; - name: string; - installedPackage: Installation; - inputs?: InputsOverride[]; - } - >, + installedPackagePolicies: Array<{ + installedPackage: Installation; + packagePolicy: + | (Partial> & { + id?: string | number; + name: string; + inputs?: InputsOverride[]; + }) + | (Omit & { id: string }); + }>, defaultOutput: Output, bumpAgentPolicyRevison = false ) { @@ -346,9 +354,8 @@ async function addPreconfiguredPolicyPackages( const packageInfoMap = new Map(); // Add packages synchronously to avoid overwriting - for (const { installedPackage, id, name, description, inputs } of installedPackagePolicies) { + for (const { installedPackage, packagePolicy } of installedPackagePolicies) { let packageInfo: PackageInfo; - if (packageInfoMap.has(installedPackage.name)) { packageInfo = packageInfoMap.get(installedPackage.name)!; } else { @@ -359,18 +366,45 @@ async function addPreconfiguredPolicyPackages( }); } - await addPackageToAgentPolicy( - soClient, - esClient, - installedPackage, - agentPolicy, - defaultOutput, - packageInfo, - name, - id, - description, - (policy) => preconfigurePackageInputs(policy, packageInfo, inputs), - bumpAgentPolicyRevison - ); + if (Array.isArray(packagePolicy.inputs)) { + const { id, name, description, inputs } = packagePolicy; + await addPackageToAgentPolicy( + soClient, + esClient, + installedPackage, + agentPolicy, + defaultOutput, + packageInfo, + name, + id, + description, + (policy) => preconfigurePackageInputs(policy, packageInfo, inputs), + bumpAgentPolicyRevison + ); + } else { + const simplifiedPackagePolicy = packagePolicy as SimplifiedPackagePolicy; + const id = simplifiedPackagePolicy.id?.toString(); + // Simplified package policy + const newPackagePolicy = simplifiedPackagePolicytoNewPackagePolicy( + { + ...(simplifiedPackagePolicy as SimplifiedPackagePolicy), + id, + policy_id: agentPolicy.id, + namespace: packagePolicy.namespace || agentPolicy.namespace, + }, + packageInfo, + {} + ); + + await packagePolicyService.create(soClient, esClient, newPackagePolicy, { + id, + bumpRevision: bumpAgentPolicyRevison, + skipEnsureInstalled: true, + skipUniqueNameVerification: true, + overwrite: true, + force: true, // To add package to managed policy we need the force flag + packageInfo, + }); + } } } diff --git a/x-pack/plugins/fleet/server/types/models/package_policy.ts b/x-pack/plugins/fleet/server/types/models/package_policy.ts index 7153982498c29..de7277af63b2c 100644 --- a/x-pack/plugins/fleet/server/types/models/package_policy.ts +++ b/x-pack/plugins/fleet/server/types/models/package_policy.ts @@ -160,18 +160,11 @@ const SimplifiedVarsSchema = schema.recordOf( ) ); -export const SimplifiedCreatePackagePolicyRequestBodySchema = schema.object({ +export const SimplifiedPackagePolicyBaseSchema = schema.object({ id: schema.maybe(schema.string()), name: schema.string(), description: schema.maybe(schema.string()), - policy_id: schema.string(), namespace: schema.maybe(schema.string()), - package: schema.object({ - name: schema.string(), - version: schema.string(), - experimental_data_stream_features: schema.maybe(ExperimentalDataStreamFeatures), - }), - force: schema.maybe(schema.boolean()), vars: schema.maybe(SimplifiedVarsSchema), inputs: schema.maybe( schema.recordOf( @@ -193,6 +186,26 @@ export const SimplifiedCreatePackagePolicyRequestBodySchema = schema.object({ ), }); +export const SimplifiedPackagePolicyPreconfiguredSchema = SimplifiedPackagePolicyBaseSchema.extends( + { + id: schema.string(), + package: schema.object({ + name: schema.string(), + }), + } +); + +export const SimplifiedCreatePackagePolicyRequestBodySchema = + SimplifiedPackagePolicyBaseSchema.extends({ + policy_id: schema.string(), + force: schema.maybe(schema.boolean()), + package: schema.object({ + name: schema.string(), + version: schema.string(), + experimental_data_stream_features: schema.maybe(ExperimentalDataStreamFeatures), + }), + }); + export const UpdatePackagePolicyRequestBodySchema = schema.object({ ...CreatePackagePolicyProps, name: schema.maybe(schema.string()), diff --git a/x-pack/plugins/fleet/server/types/models/preconfiguration.ts b/x-pack/plugins/fleet/server/types/models/preconfiguration.ts index e814616268d3d..ce8fb7df3937d 100644 --- a/x-pack/plugins/fleet/server/types/models/preconfiguration.ts +++ b/x-pack/plugins/fleet/server/types/models/preconfiguration.ts @@ -19,7 +19,10 @@ import { } from './output'; import { AgentPolicyBaseSchema, AgentPolicyNamespaceSchema } from './agent_policy'; -import { PackagePolicyNamespaceSchema } from './package_policy'; +import { + PackagePolicyNamespaceSchema, + SimplifiedPackagePolicyPreconfiguredSchema, +} from './package_policy'; const varsSchema = schema.maybe( schema.arrayOf( @@ -139,47 +142,50 @@ export const PreconfiguredAgentPoliciesSchema = schema.arrayOf( data_output_id: schema.maybe(schema.string()), monitoring_output_id: schema.maybe(schema.string()), package_policies: schema.arrayOf( - schema.object({ - id: schema.maybe(schema.oneOf([schema.string(), schema.number()])), - name: schema.string(), - package: schema.object({ - name: schema.string({ - validate: (value) => { - if (value === 'synthetics') { - return i18n.translate('xpack.fleet.config.disableSynthetics', { - defaultMessage: - 'Synthetics package is not supported via kibana.yml config. Please use Synthetics App to create monitors in private locations. https://www.elastic.co/guide/en/observability/current/synthetics-private-location.html', - }); - } - }, + schema.oneOf([ + schema.object({ + id: schema.maybe(schema.oneOf([schema.string(), schema.number()])), + name: schema.string(), + package: schema.object({ + name: schema.string({ + validate: (value) => { + if (value === 'synthetics') { + return i18n.translate('xpack.fleet.config.disableSynthetics', { + defaultMessage: + 'Synthetics package is not supported via kibana.yml config. Please use Synthetics App to create monitors in private locations. https://www.elastic.co/guide/en/observability/current/synthetics-private-location.html', + }); + } + }, + }), }), + description: schema.maybe(schema.string()), + namespace: schema.maybe(PackagePolicyNamespaceSchema), + inputs: schema.maybe( + schema.arrayOf( + schema.object({ + type: schema.string(), + enabled: schema.maybe(schema.boolean()), + keep_enabled: schema.maybe(schema.boolean()), + vars: varsSchema, + streams: schema.maybe( + schema.arrayOf( + schema.object({ + data_stream: schema.object({ + type: schema.maybe(schema.string()), + dataset: schema.string(), + }), + enabled: schema.maybe(schema.boolean()), + keep_enabled: schema.maybe(schema.boolean()), + vars: varsSchema, + }) + ) + ), + }) + ) + ), }), - description: schema.maybe(schema.string()), - namespace: schema.maybe(PackagePolicyNamespaceSchema), - inputs: schema.maybe( - schema.arrayOf( - schema.object({ - type: schema.string(), - enabled: schema.maybe(schema.boolean()), - keep_enabled: schema.maybe(schema.boolean()), - vars: varsSchema, - streams: schema.maybe( - schema.arrayOf( - schema.object({ - data_stream: schema.object({ - type: schema.maybe(schema.string()), - dataset: schema.string(), - }), - enabled: schema.maybe(schema.boolean()), - keep_enabled: schema.maybe(schema.boolean()), - vars: varsSchema, - }) - ) - ), - }) - ) - ), - }) + SimplifiedPackagePolicyPreconfiguredSchema, + ]) ), }), { diff --git a/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/fields/_field_list_item.scss b/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/fields/_field_list_item.scss index cc733972808e3..82767bf9249a7 100644 --- a/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/fields/_field_list_item.scss +++ b/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/fields/_field_list_item.scss @@ -60,4 +60,4 @@ .mappingsEditor__fieldsListItem__actions { padding-left: $euiSizeS; -} +} \ No newline at end of file diff --git a/x-pack/plugins/lens/public/datasources/common/field_item.scss b/x-pack/plugins/lens/public/datasources/common/field_item.scss index 4e1949c19fc4a..b9927ae4e7bf8 100644 --- a/x-pack/plugins/lens/public/datasources/common/field_item.scss +++ b/x-pack/plugins/lens/public/datasources/common/field_item.scss @@ -1,4 +1,4 @@ .lnsFieldItem__fieldPanel { min-width: 260px; max-width: 300px; -} +} \ No newline at end of file diff --git a/x-pack/plugins/lens/public/datasources/common/field_item.test.tsx b/x-pack/plugins/lens/public/datasources/common/field_item.test.tsx index afd178a64ece5..46eeee7af1f43 100644 --- a/x-pack/plugins/lens/public/datasources/common/field_item.test.tsx +++ b/x-pack/plugins/lens/public/datasources/common/field_item.test.tsx @@ -23,7 +23,6 @@ import { dataPluginMock } from '@kbn/data-plugin/public/mocks'; import { dataViewPluginMocks } from '@kbn/data-views-plugin/public/mocks'; import { DataView, DataViewField } from '@kbn/data-views-plugin/common'; import { loadFieldStats } from '@kbn/unified-field-list/src/services/field_stats'; -import { DOCUMENT_FIELD_NAME } from '../../../common/constants'; import { FieldIcon } from '@kbn/field-utils'; import { FieldStats, FieldPopoverFooter } from '@kbn/unified-field-list'; @@ -31,7 +30,7 @@ jest.mock('@kbn/unified-field-list/src/services/field_stats', () => ({ loadFieldStats: jest.fn().mockResolvedValue({}), })); -const clickField = async (wrapper: ReactWrapper, field: string) => { +const clickField = async (wrapper: ReactWrapper, field?: string) => { await act(async () => { await wrapper .find(`[data-test-subj="lnsFieldListPanelField-${field}"] .kbnFieldButton__button`) @@ -91,14 +90,14 @@ describe('Lens Field Item', () => { fields: [ { name: 'timestamp', - displayName: 'timestampLabel', + displayName: 'timestamp', type: 'date', aggregatable: true, searchable: true, }, { name: 'bytes', - displayName: 'bytesLabel', + displayName: 'bytes', type: 'number', aggregatable: true, searchable: true, @@ -154,7 +153,7 @@ describe('Lens Field Item', () => { filters: [], field: { name: 'bytes', - displayName: 'bytesLabel', + displayName: 'bytes', type: 'number', aggregatable: true, searchable: true, @@ -189,7 +188,7 @@ describe('Lens Field Item', () => { // Using .toContain over .toEqual because this element includes text from // which can't be seen, but shows in the text content expect(wrapper.find('[data-test-subj="lnsFieldListPanelField"]').first().text()).toContain( - 'bytesLabel' + 'bytes' ); }); @@ -260,7 +259,7 @@ describe('Lens Field Item', () => { const field = { name: 'test', - displayName: 'testLabel', + displayName: 'test', type: 'string', aggregatable: true, searchable: true, @@ -422,7 +421,7 @@ describe('Lens Field Item', () => { field: documentField, }); - await clickField(wrapper, DOCUMENT_FIELD_NAME); + await clickField(wrapper, documentField.name); await wrapper.update(); diff --git a/x-pack/plugins/lens/public/datasources/common/field_item.tsx b/x-pack/plugins/lens/public/datasources/common/field_item.tsx index 0cf86ab0494a0..efa13eb708e5a 100644 --- a/x-pack/plugins/lens/public/datasources/common/field_item.tsx +++ b/x-pack/plugins/lens/public/datasources/common/field_item.tsx @@ -22,7 +22,7 @@ import { FieldItemButton, type GetCustomFieldType, } from '@kbn/unified-field-list'; -import { DragDrop } from '@kbn/dom-drag-drop'; +import { Draggable } from '@kbn/dom-drag-drop'; import { generateFilters, getEsQueryConfig } from '@kbn/data-plugin/public'; import { type DatatableColumn } from '@kbn/expressions-plugin/common'; import { DatasourceDataPanelProps } from '../../types'; @@ -200,19 +200,18 @@ export function InnerFieldItem(props: FieldItemProps) { closePopover={closePopover} panelClassName="lnsFieldItem__fieldPanel" initialFocus=".lnsFieldItem__fieldPanel" - className="lnsFieldItem__popoverAnchor" data-test-subj="lnsFieldListPanelField" panelProps={{ 'data-test-subj': 'lnsFieldListPanelFieldContent', }} container={document.querySelector('.application') || undefined} button={ - {isTextBasedColumnField(field) ? ( @@ -223,7 +222,7 @@ export function InnerFieldItem(props: FieldItemProps) { ) : ( )} - + } renderHeader={() => { return ( diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/buttons/draggable_dimension_button.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/buttons/draggable_dimension_button.tsx index ae226521799eb..aa3315972b719 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/buttons/draggable_dimension_button.tsx +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/buttons/draggable_dimension_button.tsx @@ -7,11 +7,12 @@ import React, { useMemo, useCallback, ReactElement } from 'react'; import { - DragDrop, DragDropIdentifier, useDragDropContext, DropType, DropTargetSwapDuplicateCombine, + Draggable, + Droppable, } from '@kbn/dom-drag-drop'; import { isDraggedField } from '../../../../utils'; import { @@ -50,8 +51,8 @@ export function DraggableDimensionButton({ }; order: [2, number, number, number]; onDrop: (source: DragDropIdentifier, dropTarget: DragDropIdentifier, dropType?: DropType) => void; - onDragStart: () => void; - onDragEnd: () => void; + onDragStart?: () => void; + onDragEnd?: () => void; activeVisualization: Visualization; group: VisualizationDimensionGroupConfig; children: ReactElement; @@ -138,24 +139,29 @@ export function DraggableDimensionButton({ className="lnsLayerPanel__dimensionContainer" data-test-subj={group.dataTestSubj} > - 1 ? reorderableGroup : undefined} value={value} - onDrop={handleOnDrop} onDragStart={onDragStart} onDragEnd={onDragEnd} > - {children} - + 1 ? reorderableGroup : undefined} + value={value} + onDrop={handleOnDrop} + > + {children} + +
); } diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/buttons/empty_dimension_button.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/buttons/empty_dimension_button.tsx index 0c6195d51cfe4..f8562a161c2a7 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/buttons/empty_dimension_button.tsx +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/buttons/empty_dimension_button.tsx @@ -9,11 +9,11 @@ import React, { useMemo, useState, useEffect } from 'react'; import { FormattedMessage } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; import { - DragDrop, DragDropIdentifier, useDragDropContext, DropType, DropTargetSwapDuplicateCombine, + Droppable, } from '@kbn/dom-drag-drop'; import { EmptyDimensionButton as EmptyDimensionButtonInner } from '@kbn/visualization-ui-components'; import { css } from '@emotion/react'; @@ -180,7 +180,7 @@ export function EmptyDimensionButton({ return (
- )}
- +
); } diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_panel.scss b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_panel.scss index f2e3c26258182..2776e57753d7a 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_panel.scss +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_panel.scss @@ -78,7 +78,7 @@ } } -.domDragDrop-isReplacing { +.domDroppable--replacing { .dimensionTrigger__textLabel { text-decoration: line-through; } diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_panel.test.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_panel.test.tsx index 119e5216488f2..f1b303527ebbe 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_panel.test.tsx +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_panel.test.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { screen, fireEvent, act } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import { ChildDragDropProvider, DragDrop } from '@kbn/dom-drag-drop'; +import { ChildDragDropProvider, Droppable, Draggable } from '@kbn/dom-drag-drop'; import { FramePublicAPI, Visualization, VisualizationConfigProps } from '../../../types'; import { LayerPanel } from './layer_panel'; import { coreMock } from '@kbn/core/public/mocks'; @@ -25,7 +25,7 @@ import { import { createIndexPatternServiceMock } from '../../../mocks/data_views_service_mock'; import { DimensionButton } from '@kbn/visualization-ui-components'; import { LensAppState } from '../../../state_management'; -import { ProviderProps } from '@kbn/dom-drag-drop/src'; +import type { ProviderProps } from '@kbn/dom-drag-drop/src'; import { LayerPanelProps } from './types'; jest.mock('../../../id_generator'); @@ -676,9 +676,9 @@ describe('LayerPanel', () => { source: draggingField, }) ); - const dragDropElement = screen.getByTestId('lnsDragDrop'); - fireEvent.dragOver(dragDropElement); - fireEvent.drop(dragDropElement); + const droppableElement = screen.getByTestId('lnsDragDrop-domDroppable'); + fireEvent.dragOver(droppableElement); + fireEvent.drop(droppableElement); expect(onDropToDimension).toHaveBeenCalledWith( expect.objectContaining({ @@ -720,17 +720,17 @@ describe('LayerPanel', () => { ); expect( - instance.find('[data-test-subj="lnsGroupTestId"] DragDrop').first().prop('dropType') + instance.find('[data-test-subj="lnsGroupTestId"] Droppable').first().prop('dropType') ).toEqual(undefined); - const dragDropElement = instance - .find('[data-test-subj="lnsGroupTestId"] DragDrop') + const droppableElement = instance + .find('[data-test-subj="lnsGroupTestId"] Droppable') .first() .find(DimensionButton) .first(); - dragDropElement.simulate('dragOver'); - dragDropElement.simulate('drop'); + droppableElement.simulate('dragOver'); + droppableElement.simulate('drop'); expect(onDropToDimension).not.toHaveBeenCalled(); }); @@ -774,11 +774,11 @@ describe('LayerPanel', () => { // Simulate drop on the pre-populated dimension - const dragDropElement = instance - .find('[data-test-subj="lnsGroupTestId2"] DragDrop .domDragDrop') + const droppableElement = instance + .find('[data-test-subj="lnsGroupTestId2"] Droppable .domDroppable') .at(0); - dragDropElement.simulate('dragOver'); - dragDropElement.simulate('drop'); + droppableElement.simulate('dragOver'); + droppableElement.simulate('drop'); expect(onDropToDimension).toHaveBeenCalledWith( expect.objectContaining({ @@ -791,12 +791,12 @@ describe('LayerPanel', () => { // Simulate drop on the empty dimension - const updatedDragDropElement = instance - .find('[data-test-subj="lnsGroupTestId2"] DragDrop .domDragDrop') + const updatedDroppableElement = instance + .find('[data-test-subj="lnsGroupTestId2"] Droppable .domDroppable') .last(); - updatedDragDropElement.simulate('dragOver'); - updatedDragDropElement.simulate('drop'); + updatedDroppableElement.simulate('dragOver'); + updatedDroppableElement.simulate('drop'); expect(onDropToDimension).toHaveBeenCalledWith( expect.objectContaining({ @@ -828,7 +828,7 @@ describe('LayerPanel', () => { { attachTo: holder } ); act(() => { - instance.find(DragDrop).at(1).prop('onDrop')!(draggingOperation, 'reorder'); + instance.find(Droppable).at(1).prop('onDrop')!(draggingOperation, 'reorder'); }); expect(onDropToDimension).toHaveBeenCalledWith( expect.objectContaining({ @@ -837,7 +837,7 @@ describe('LayerPanel', () => { }) ); const secondButton = instance - .find(DragDrop) + .find(Draggable) .at(1) .find('[data-test-subj="lnsDragDrop-keyboardHandler"]') .at(1) @@ -864,7 +864,7 @@ describe('LayerPanel', () => { ); act(() => { - instance.find(DragDrop).at(2).prop('onDrop')!(draggingOperation, 'duplicate_compatible'); + instance.find(Droppable).at(2).prop('onDrop')!(draggingOperation, 'duplicate_compatible'); }); expect(onDropToDimension).toHaveBeenCalledWith( expect.objectContaining({ @@ -901,7 +901,7 @@ describe('LayerPanel', () => { ); act(() => { - instance.find(DragDrop).at(3).prop('onDrop')!(draggingOperation, 'replace_compatible'); + instance.find(Droppable).at(3).prop('onDrop')!(draggingOperation, 'replace_compatible'); }); expect(onDropToDimension).toHaveBeenCalledWith( expect.objectContaining({ @@ -946,7 +946,7 @@ describe('LayerPanel', () => { ); act(() => { - instance.find(DragDrop).at(3).prop('onDrop')!(draggingOperation, 'replace_compatible'); + instance.find(Droppable).at(3).prop('onDrop')!(draggingOperation, 'replace_compatible'); }); expect(onDropToDimension).toHaveBeenCalledWith( @@ -997,7 +997,7 @@ describe('LayerPanel', () => { ); act(() => { - instance.find(DragDrop).at(3).prop('onDrop')!(draggingOperation, 'replace_compatible'); + instance.find(Droppable).at(3).prop('onDrop')!(draggingOperation, 'replace_compatible'); }); expect(onDropToDimension).toHaveBeenCalledWith( @@ -1033,7 +1033,7 @@ describe('LayerPanel', () => { ); act(() => { - instance.find(DragDrop).at(3).prop('onDrop')!(draggingOperation, 'duplicate_compatible'); + instance.find(Droppable).at(3).prop('onDrop')!(draggingOperation, 'duplicate_compatible'); }); }); }); diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_panel.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_panel.tsx index 6ed48175ef224..86fd90fbcb67b 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_panel.tsx +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_panel.tsx @@ -49,8 +49,6 @@ export function LayerPanel(props: LayerPanelProps) { const [isPanelSettingsOpen, setPanelSettingsOpen] = useState(false); - const [hideTooltip, setHideTooltip] = useState(false); - const { framePublicAPI, layerId, @@ -552,8 +550,6 @@ export function LayerPanel(props: LayerPanelProps) { state={layerDatasourceState} layerDatasource={layerDatasource} datasourceLayers={framePublicAPI.datasourceLayers} - onDragStart={() => setHideTooltip(true)} - onDragEnd={() => setHideTooltip(false)} onDrop={onDrop} indexPatterns={dataViews.indexPatterns} > @@ -591,7 +587,6 @@ export function LayerPanel(props: LayerPanelProps) { {activeVisualization?.DimensionTriggerComponent?.({ columnId, label: columnLabelMap?.[columnId] ?? '', - hideTooltip, })} )} diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/editor_frame.test.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/editor_frame.test.tsx index d99f6418870fa..f99eeaa7688a2 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/editor_frame.test.tsx +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/editor_frame.test.tsx @@ -29,7 +29,7 @@ import { renderWithReduxStore, } from '../../mocks'; import { inspectorPluginMock } from '@kbn/inspector-plugin/public/mocks'; -import { DragDrop, useDragDropContext } from '@kbn/dom-drag-drop'; +import { Droppable, useDragDropContext } from '@kbn/dom-drag-drop'; import { uiActionsPluginMock } from '@kbn/ui-actions-plugin/public/mocks'; import { chartPluginMock } from '@kbn/charts-plugin/public/mocks'; import { expressionsPluginMock } from '@kbn/expressions-plugin/public/mocks'; @@ -626,7 +626,7 @@ describe('editor_frame', () => { instance.update(); act(() => { - instance.find('[data-test-subj="mockVisA"]').find(DragDrop).prop('onDrop')!( + instance.find('[data-test-subj="mockVisA"]').find(Droppable).prop('onDrop')!( { indexPatternId: '1', field: {}, @@ -711,7 +711,7 @@ describe('editor_frame', () => { instance.update(); act(() => { - instance.find(DragDrop).filter('[dataTestSubj="lnsWorkspace"]').prop('onDrop')!( + instance.find(Droppable).filter('[dataTestSubj="lnsWorkspace"]').prop('onDrop')!( { indexPatternId: '1', field: {}, diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/editor_frame.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/editor_frame.tsx index 7d2d256d37c67..45b11b1c7724b 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/editor_frame.tsx +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/editor_frame.tsx @@ -115,7 +115,10 @@ export function EditorFrame(props: EditorFrameProps) { }, []); return ( - + {getVisualizeGeoFieldMessage(props.fieldType)} -

-
+
diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel.test.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel.test.tsx index c73f427fcd7f9..e6d67bb4eb3db 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel.test.tsx +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel.test.tsx @@ -936,14 +936,12 @@ describe('workspace_panel', () => { datasourceState: {}, }), }); - expect(screen.getByTestId('lnsWorkspace').classList).toContain('domDragDrop-isDropTarget'); + expect(screen.getByTestId('lnsWorkspace').classList).toContain('domDroppable--active'); }); it('should refuse to drop if there are no suggestions', () => { renderWithDndAndRedux(); - expect(screen.getByTestId('lnsWorkspace').classList).not.toContain( - 'domDragDrop-isDropTarget' - ); + expect(screen.getByTestId('lnsWorkspace').classList).not.toContain('domDroppable--active'); }); }); }); diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel.tsx index 3e90a4179f9eb..c659d726f7b8a 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel.tsx +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel.tsx @@ -25,7 +25,7 @@ import { VIS_EVENT_TO_TRIGGER } from '@kbn/visualizations-plugin/public'; import type { DefaultInspectorAdapters } from '@kbn/expressions-plugin/common'; import type { Datatable } from '@kbn/expressions-plugin/public'; import { DropIllustration } from '@kbn/chart-icons'; -import { DragDrop, useDragDropContext, DragDropIdentifier } from '@kbn/dom-drag-drop'; +import { useDragDropContext, DragDropIdentifier, Droppable } from '@kbn/dom-drag-drop'; import { reportPerformanceMetricEvent } from '@kbn/ebt-tools'; import { ChartSizeSpec, isChartSizeEvent } from '@kbn/chart-expressions-common'; import { trackUiCounterEvents } from '../../../lens_ui_telemetry'; @@ -638,19 +638,18 @@ export const InnerWorkspacePanel = React.memo(function InnerWorkspacePanel({ : renderDragDropPrompt; return ( -
{renderWorkspaceContents()}
-
+ ); }; diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel_wrapper.scss b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel_wrapper.scss index 705b942cf85ff..db0ca2613cc2f 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel_wrapper.scss +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel_wrapper.scss @@ -46,7 +46,7 @@ } .lnsWorkspacePanel__dragDrop { - &.domDragDrop-isDropTarget { + &.domDroppable--active { p { transition: filter $euiAnimSpeedFast ease-in-out; filter: blur(5px); @@ -59,7 +59,7 @@ } } - &.domDragDrop-isActiveDropTarget { + &.domDroppable--hover { .lnsDropIllustration__hand { animation: lnsWorkspacePanel__illustrationPulseContinuous 1.5s ease-in-out 0s infinite normal forwards; } diff --git a/x-pack/plugins/lens/public/mocks/index.ts b/x-pack/plugins/lens/public/mocks/index.ts index f90ecc9b99fe9..f8bf55e3c2e8f 100644 --- a/x-pack/plugins/lens/public/mocks/index.ts +++ b/x-pack/plugins/lens/public/mocks/index.ts @@ -55,7 +55,7 @@ export function createMockedDragDropContext( dataTestSubjPrefix: 'lnsDragDrop', dragging: undefined, keyboardMode: false, - activeDropTarget: undefined, + hoveredDropTarget: undefined, dropTargetsByOrder: undefined, ...partialState, }, diff --git a/x-pack/plugins/lens/public/types.ts b/x-pack/plugins/lens/public/types.ts index e2419c09dfef4..cf8a1eaede8b5 100644 --- a/x-pack/plugins/lens/public/types.ts +++ b/x-pack/plugins/lens/public/types.ts @@ -1241,8 +1241,7 @@ export interface Visualization null | ReactElement<{ columnId: string; label: string; hideTooltip?: boolean }>; + }) => null | ReactElement<{ columnId: string; label: string }>; getAddLayerButtonComponent?: ( props: AddLayerButtonProps ) => null | ReactElement; diff --git a/x-pack/plugins/maps/public/classes/styles/color_palettes.ts b/x-pack/plugins/maps/public/classes/styles/color_palettes.ts index a4fd893ea8c90..232728cc72f00 100644 --- a/x-pack/plugins/maps/public/classes/styles/color_palettes.ts +++ b/x-pack/plugins/maps/public/classes/styles/color_palettes.ts @@ -12,8 +12,8 @@ import { euiPaletteForTemperature, euiPaletteCool, euiPaletteWarm, - euiPaletteNegative, - euiPalettePositive, + euiPaletteRed, + euiPaletteGreen, euiPaletteGray, euiPaletteColorBlind, EuiColorPalettePickerPaletteProps, @@ -59,9 +59,9 @@ const COLOR_PALETTES: COLOR_PALETTE[] = [ { value: 'Greens', getPalette: (steps: number) => { - return euiPalettePositive(steps); + return euiPaletteGreen(steps); }, - palette: euiPalettePositive(8), + palette: euiPaletteGreen(8), type: 'gradient', }, { @@ -75,9 +75,9 @@ const COLOR_PALETTES: COLOR_PALETTE[] = [ { value: 'Reds', getPalette: (steps: number) => { - return euiPaletteNegative(steps); + return euiPaletteRed(steps); }, - palette: euiPaletteNegative(8), + palette: euiPaletteRed(8), type: 'gradient', }, { diff --git a/x-pack/plugins/maps/public/connected_components/mb_map/transform_request.test.ts b/x-pack/plugins/maps/public/connected_components/mb_map/transform_request.test.ts new file mode 100644 index 0000000000000..c1b2003c782ba --- /dev/null +++ b/x-pack/plugins/maps/public/connected_components/mb_map/transform_request.test.ts @@ -0,0 +1,34 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { transformRequest } from './transform_request'; + +describe('transformRequest', () => { + let location: Location; + + beforeEach(() => { + location = global.window.location; + // @ts-expect-error we need to set our own location value + delete global.window.location; + global.window.location = { + origin: 'https://transform.test.local', + } as unknown as Location; + }); + + afterEach(() => { + Object.defineProperty(global.window, 'location', { value: location }); + }); + + it.each([ + ['/internal/maps/fake/path', 'https://transform.test.local/internal/maps/fake/path'], + ['/', 'https://transform.test.local/'], + [' /with/space', 'https://transform.test.local/with/space'], + ])('converts %s to absolute URL', (input, output) => { + const { url } = transformRequest(input, 'Foo'); + expect(url).toBe(output); + }); +}); diff --git a/x-pack/plugins/maps/public/connected_components/mb_map/transform_request.ts b/x-pack/plugins/maps/public/connected_components/mb_map/transform_request.ts index c30fc533a322f..0b331f0257473 100644 --- a/x-pack/plugins/maps/public/connected_components/mb_map/transform_request.ts +++ b/x-pack/plugins/maps/public/connected_components/mb_map/transform_request.ts @@ -14,14 +14,27 @@ import { MVT_GETTILE_API_PATH, MVT_GETGRIDTILE_API_PATH, } from '../../../common/constants'; -import { getHttp } from '../../kibana_services'; -const FONTS = getHttp().basePath.prepend(FONTS_API_PATH); -const GETTILE = getHttp().basePath.prepend(MVT_GETTILE_API_PATH); -const GETGRIDTILE = getHttp().basePath.prepend(MVT_GETGRIDTILE_API_PATH); +/** + * This URL could be used from inside a Worker which may have a different base + * URL. This function takes a string that may be a path and converts it to an + * absolute URL. + */ +function prepareAbsoluteUrl(pathOrUrl: string): string { + pathOrUrl = pathOrUrl.trim(); + if (pathOrUrl.startsWith('/')) { + return new URL(pathOrUrl, window.location.origin).toString(); + } + return pathOrUrl; +} -export function transformRequest(url: string, resourceType: string | undefined) { - if (resourceType === 'Glyphs' && url.startsWith(FONTS)) { +/** + * @param pathOrUrl - Assumed to be a full URL or a path starting with "/" + * @param resourceType - Indicator of what type of resource is being requested + */ +export function transformRequest(pathOrUrl: string, resourceType: string | undefined) { + const url = prepareAbsoluteUrl(pathOrUrl); + if (resourceType === 'Glyphs' && url.includes(FONTS_API_PATH)) { return { url, method: 'GET' as 'GET', @@ -32,7 +45,7 @@ export function transformRequest(url: string, resourceType: string | undefined) }; } - if (resourceType === 'Tile' && url.startsWith(GETTILE)) { + if (resourceType === 'Tile' && url.includes(MVT_GETTILE_API_PATH)) { return { url, method: 'GET' as 'GET', @@ -43,7 +56,7 @@ export function transformRequest(url: string, resourceType: string | undefined) }; } - if (resourceType === 'Tile' && url.startsWith(GETGRIDTILE)) { + if (resourceType === 'Tile' && url.includes(MVT_GETGRIDTILE_API_PATH)) { return { url, method: 'GET' as 'GET', diff --git a/x-pack/plugins/ml/public/application/components/scatterplot_matrix/scatterplot_matrix_vega_lite_spec.ts b/x-pack/plugins/ml/public/application/components/scatterplot_matrix/scatterplot_matrix_vega_lite_spec.ts index 3b01eb7ed5366..96889679ed155 100644 --- a/x-pack/plugins/ml/public/application/components/scatterplot_matrix/scatterplot_matrix_vega_lite_spec.ts +++ b/x-pack/plugins/ml/public/application/components/scatterplot_matrix/scatterplot_matrix_vega_lite_spec.ts @@ -11,7 +11,7 @@ import type { TopLevelSpec } from 'vega-lite/build/vega-lite'; import type { euiLightVars as euiThemeLight } from '@kbn/ui-theme'; -import { euiPaletteColorBlind, euiPaletteNegative, euiPalettePositive } from '@elastic/eui'; +import { euiPaletteColorBlind, euiPaletteRed, euiPaletteGreen } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; @@ -25,11 +25,11 @@ export const USER_SELECTION = 'user_selection'; export const SINGLE_POINT_CLICK = 'single_point_click'; export const COLOR_BLUR = '#bbb'; -export const COLOR_OUTLIER = euiPaletteNegative(2)[1]; +export const COLOR_OUTLIER = euiPaletteRed(2)[1]; export const COLOR_SELECTION = euiPaletteColorBlind()[2]; export const COLOR_RANGE_OUTLIER = [euiPaletteColorBlind()[1], euiPaletteColorBlind()[2]]; export const COLOR_RANGE_NOMINAL = euiPaletteColorBlind({ rotations: 2 }); -export const COLOR_RANGE_QUANTITATIVE = euiPalettePositive(5); +export const COLOR_RANGE_QUANTITATIVE = euiPaletteGreen(5); const CUSTOM_VIS_FIELDS_PATH = 'fields'; export const getColorSpec = ( diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/use_columns.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/use_columns.tsx index 6c4018b4b9cf2..0f9b1dab9e491 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/use_columns.tsx +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/use_columns.tsx @@ -148,7 +148,7 @@ export const DFAnalyticsJobIdLink = ({ jobId }: { jobId: string }) => { }); return ( - + {jobId} ); diff --git a/x-pack/plugins/ml/public/application/explorer/anomaly_timeline.tsx b/x-pack/plugins/ml/public/application/explorer/anomaly_timeline.tsx index 4751b65bef325..90b3182cd65fe 100644 --- a/x-pack/plugins/ml/public/application/explorer/anomaly_timeline.tsx +++ b/x-pack/plugins/ml/public/application/explorer/anomaly_timeline.tsx @@ -413,7 +413,7 @@ export const AnomalyTimeline: FC = React.memo( {menuPanels[0].items!.length > 0 ? ( = React.memo( )} - + { diff --git a/x-pack/plugins/ml/public/application/explorer/components/explorer_query_bar/explorer_query_bar.tsx b/x-pack/plugins/ml/public/application/explorer/components/explorer_query_bar/explorer_query_bar.tsx index a531326320337..fcfcbd7d43690 100644 --- a/x-pack/plugins/ml/public/application/explorer/components/explorer_query_bar/explorer_query_bar.tsx +++ b/x-pack/plugins/ml/public/application/explorer/components/explorer_query_bar/explorer_query_bar.tsx @@ -158,7 +158,7 @@ export const ExplorerQueryBar: FC = ({ return ( = ({ diff --git a/x-pack/plugins/ml/public/application/jobs/jobs_list/components/jobs_list/job_id_link.tsx b/x-pack/plugins/ml/public/application/jobs/jobs_list/components/jobs_list/job_id_link.tsx index 60e9556e5072e..fea1c3d7fab3e 100644 --- a/x-pack/plugins/ml/public/application/jobs/jobs_list/components/jobs_list/job_id_link.tsx +++ b/x-pack/plugins/ml/public/application/jobs/jobs_list/components/jobs_list/job_id_link.tsx @@ -68,7 +68,7 @@ export const AnomalyDetectionJobIdLink = (props: AnomalyDetectionJobIdLinkProps) {props.id} diff --git a/x-pack/plugins/ml/public/application/memory_usage/memory_item_colors.ts b/x-pack/plugins/ml/public/application/memory_usage/memory_item_colors.ts index ee6baaf33f740..05be88f45ed11 100644 --- a/x-pack/plugins/ml/public/application/memory_usage/memory_item_colors.ts +++ b/x-pack/plugins/ml/public/application/memory_usage/memory_item_colors.ts @@ -9,7 +9,7 @@ import { euiPaletteComplementary, euiPaletteForTemperature, euiPaletteGray, - euiPalettePositive, + euiPaletteGreen, euiPaletteWarm, } from '@elastic/eui'; import type { MlSavedObjectType } from '../../../common/types/saved_objects'; @@ -21,7 +21,7 @@ export function getMemoryItemColor(typeIn: MemoryItem) { case 'anomaly-detector': return euiPaletteWarm(5)[1]; case 'data-frame-analytics': - return euiPalettePositive(5)[2]; + return euiPaletteGreen(5)[2]; case 'trained-model': return euiPaletteForTemperature(5)[1]; case 'estimated-available-memory': diff --git a/x-pack/plugins/ml/public/application/model_management/model_link.tsx b/x-pack/plugins/ml/public/application/model_management/model_link.tsx index 003c00d720435..7a1f3392476d7 100644 --- a/x-pack/plugins/ml/public/application/model_management/model_link.tsx +++ b/x-pack/plugins/ml/public/application/model_management/model_link.tsx @@ -22,7 +22,7 @@ export const TrainedModelLink: FC = ({ id }) => { }); return ( - + {id} ); diff --git a/x-pack/plugins/ml/public/embeddables/anomaly_charts/anomaly_charts_embeddable.tsx b/x-pack/plugins/ml/public/embeddables/anomaly_charts/anomaly_charts_embeddable.tsx index 1b8e77514e108..ded0f536ae96a 100644 --- a/x-pack/plugins/ml/public/embeddables/anomaly_charts/anomaly_charts_embeddable.tsx +++ b/x-pack/plugins/ml/public/embeddables/anomaly_charts/anomaly_charts_embeddable.tsx @@ -12,6 +12,7 @@ import { i18n } from '@kbn/i18n'; import { Subject, Subscription, type BehaviorSubject } from 'rxjs'; import { KibanaContextProvider, KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; import type { IContainer } from '@kbn/embeddable-plugin/public'; +import { embeddableInputToSubject } from '@kbn/embeddable-plugin/public'; import { embeddableOutputToSubject } from '@kbn/embeddable-plugin/public'; import type { MlEntityField } from '@kbn/ml-anomaly-utils'; import { EmbeddableAnomalyChartsContainer } from './embeddable_anomaly_charts_container_lazy'; @@ -43,6 +44,7 @@ export class AnomalyChartsEmbeddable extends AnomalyDetectionEmbeddable< public readonly type: string = ANOMALY_EXPLORER_CHARTS_EMBEDDABLE_TYPE; // API + public readonly jobIds: BehaviorSubject; public entityFields: BehaviorSubject; private apiSubscriptions = new Subscription(); @@ -54,6 +56,12 @@ export class AnomalyChartsEmbeddable extends AnomalyDetectionEmbeddable< ) { super(initialInput, services[2].anomalyDetectorService, services[1].data.dataViews, parent); + this.jobIds = embeddableInputToSubject( + this.apiSubscriptions, + this, + 'jobIds' + ); + this.entityFields = embeddableOutputToSubject( this.apiSubscriptions, this, diff --git a/x-pack/plugins/ml/public/embeddables/anomaly_charts/types.ts b/x-pack/plugins/ml/public/embeddables/anomaly_charts/types.ts new file mode 100644 index 0000000000000..198602b836c1a --- /dev/null +++ b/x-pack/plugins/ml/public/embeddables/anomaly_charts/types.ts @@ -0,0 +1,22 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { MlEntityField } from '@kbn/ml-anomaly-utils'; +import type { HasType, PublishingSubject } from '@kbn/presentation-publishing'; +import type { JobId } from '../../shared'; +import type { AnomalyExplorerChartsEmbeddableType } from '../constants'; +import type { MlEmbeddableBaseApi } from '../types'; + +export interface AnomalyChartsFieldSelectionApi { + jobIds: PublishingSubject; + entityFields: PublishingSubject; +} + +export interface AnomalyChartsEmbeddableApi + extends HasType, + MlEmbeddableBaseApi, + AnomalyChartsFieldSelectionApi {} diff --git a/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_embeddable.tsx b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_embeddable.tsx index 968d505dc46ee..6e5a8a02ac35e 100644 --- a/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_embeddable.tsx +++ b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_embeddable.tsx @@ -16,11 +16,13 @@ import { Subject, Subscription, type BehaviorSubject } from 'rxjs'; import type { AnomalySwimlaneEmbeddableInput, AnomalySwimlaneEmbeddableOutput, + AnomalySwimlaneEmbeddableUserInput, AnomalySwimlaneServices, } from '..'; import { ANOMALY_SWIMLANE_EMBEDDABLE_TYPE } from '..'; import type { JobId } from '../../../common/types/anomaly_detection_jobs'; import type { MlDependencies } from '../../application/app'; +import type { SwimlaneType } from '../../application/explorer/explorer_constants'; import { SWIM_LANE_SELECTION_TRIGGER } from '../../ui_actions'; import { AnomalyDetectionEmbeddable } from '../common/anomaly_detection_embeddable'; import { EmbeddableLoading } from '../common/components/embeddable_loading_fallback'; @@ -43,9 +45,12 @@ export class AnomalySwimlaneEmbeddable extends AnomalyDetectionEmbeddable< public readonly type: string = ANOMALY_SWIMLANE_EMBEDDABLE_TYPE; // API - public viewBy: BehaviorSubject; - public perPage: BehaviorSubject; - public fromPage: BehaviorSubject; + public readonly jobIds: BehaviorSubject; + public readonly viewBy: BehaviorSubject; + public readonly swimlaneType: BehaviorSubject; + public readonly perPage: BehaviorSubject; + public readonly fromPage: BehaviorSubject; + public readonly interval: BehaviorSubject; private apiSubscriptions = new Subscription(); @@ -56,12 +61,24 @@ export class AnomalySwimlaneEmbeddable extends AnomalyDetectionEmbeddable< ) { super(initialInput, services[2].anomalyDetectorService, services[1].data.dataViews, parent); + this.jobIds = embeddableInputToSubject( + this.apiSubscriptions, + this, + 'jobIds' + ); + this.viewBy = embeddableInputToSubject( this.apiSubscriptions, this, 'viewBy' ); + this.swimlaneType = embeddableInputToSubject( + this.apiSubscriptions, + this, + 'swimlaneType' + ); + this.perPage = embeddableOutputToSubject( this.apiSubscriptions, this, @@ -73,6 +90,16 @@ export class AnomalySwimlaneEmbeddable extends AnomalyDetectionEmbeddable< this, 'fromPage' ); + + this.interval = embeddableOutputToSubject( + this.apiSubscriptions, + this, + 'interval' + ); + } + + public updateUserInput(update: AnomalySwimlaneEmbeddableUserInput) { + this.updateInput(update); } public reportsEmbeddableLoad() { diff --git a/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_embeddable_factory.ts b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_embeddable_factory.ts index a9ab9c9f3424a..ebab6f5356994 100644 --- a/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_embeddable_factory.ts +++ b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_embeddable_factory.ts @@ -56,7 +56,12 @@ export class AnomalySwimlaneEmbeddableFactory try { const { resolveAnomalySwimlaneUserInput } = await import('./anomaly_swimlane_setup_flyout'); - return await resolveAnomalySwimlaneUserInput(coreStart, deps.data.dataViews); + const userInput = await resolveAnomalySwimlaneUserInput(coreStart, deps.data.dataViews); + + return { + ...userInput, + title: userInput.panelTitle, + }; } catch (e) { return Promise.reject(); } diff --git a/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_initializer.tsx b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_initializer.tsx index d6875a9ce7a0d..92943f4286c12 100644 --- a/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_initializer.tsx +++ b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_initializer.tsx @@ -25,13 +25,9 @@ import { FormattedMessage } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; import type { SwimlaneType } from '../../application/explorer/explorer_constants'; import { SWIMLANE_TYPE } from '../../application/explorer/explorer_constants'; -import type { AnomalySwimlaneEmbeddableInput } from '..'; +import type { AnomalySwimlaneEmbeddableInput, AnomalySwimlaneEmbeddableUserInput } from '..'; -interface ExplicitInput { - panelTitle: string; - swimlaneType: SwimlaneType; - viewBy?: string; -} +export type ExplicitInput = Omit; export interface AnomalySwimlaneInitializerProps { defaultTitle: string; diff --git a/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_setup_flyout.tsx b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_setup_flyout.tsx index 34ba32cd4a127..fa9185bb026a9 100644 --- a/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_setup_flyout.tsx +++ b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_setup_flyout.tsx @@ -14,15 +14,15 @@ import { VIEW_BY_JOB_LABEL } from '../../application/explorer/explorer_constants import { AnomalySwimlaneInitializer } from './anomaly_swimlane_initializer'; import { getDefaultSwimlanePanelTitle } from './anomaly_swimlane_embeddable'; import { HttpService } from '../../application/services/http_service'; -import type { AnomalySwimlaneEmbeddableInput } from '..'; +import type { AnomalySwimlaneEmbeddableInput, AnomalySwimlaneEmbeddableUserInput } from '..'; import { resolveJobSelection } from '../common/resolve_job_selection'; import { mlApiServicesProvider } from '../../application/services/ml_api_service'; export async function resolveAnomalySwimlaneUserInput( coreStart: CoreStart, dataViews: DataViewsContract, - input?: AnomalySwimlaneEmbeddableInput -): Promise> { + input?: Partial +): Promise { const { http, overlays, theme, i18n } = coreStart; const { getJobs } = mlApiServicesProvider(new HttpService(http)); @@ -44,7 +44,6 @@ export async function resolveAnomalySwimlaneUserInput( modalSession.close(); resolve({ jobIds, - title: explicitInput.panelTitle, ...explicitInput, }); }} diff --git a/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/types.ts b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/types.ts new file mode 100644 index 0000000000000..bb9548f78f61a --- /dev/null +++ b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/types.ts @@ -0,0 +1,48 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { + HasType, + PublishesWritablePanelTitle, + PublishingSubject, +} from '@kbn/presentation-publishing'; +import { apiIsOfType } from '@kbn/presentation-publishing'; +import { isPopulatedObject } from '@kbn/ml-is-populated-object'; +import type { SwimlaneType } from '../../application/explorer/explorer_constants'; +import type { JobId } from '../../shared'; +import type { AnomalySwimLaneEmbeddableType } from '../constants'; +import { ANOMALY_SWIMLANE_EMBEDDABLE_TYPE } from '../constants'; +import type { AnomalySwimlaneEmbeddableUserInput, MlEmbeddableBaseApi } from '../types'; +import type { AppStateSelectedCells } from '../../application/explorer/explorer_utils'; + +export interface AnomalySwimLaneComponentApi { + jobIds: PublishingSubject; + swimlaneType: PublishingSubject; + viewBy: PublishingSubject; + perPage: PublishingSubject; + fromPage: PublishingSubject; + interval: PublishingSubject; + updateUserInput: (input: AnomalySwimlaneEmbeddableUserInput) => void; +} + +export interface AnomalySwimLaneEmbeddableApi + extends HasType, + PublishesWritablePanelTitle, + MlEmbeddableBaseApi, + AnomalySwimLaneComponentApi {} + +export interface AnomalySwimLaneActionContext { + embeddable: AnomalySwimLaneEmbeddableApi; + data?: AppStateSelectedCells; +} + +export function isSwimLaneEmbeddableContext(arg: unknown): arg is AnomalySwimLaneActionContext { + return ( + isPopulatedObject(arg, ['embeddable']) && + apiIsOfType(arg.embeddable, ANOMALY_SWIMLANE_EMBEDDABLE_TYPE) + ); +} diff --git a/x-pack/plugins/ml/public/embeddables/common/anomaly_detection_embeddable.ts b/x-pack/plugins/ml/public/embeddables/common/anomaly_detection_embeddable.ts index 08c00273c44a0..84a03b05e869f 100644 --- a/x-pack/plugins/ml/public/embeddables/common/anomaly_detection_embeddable.ts +++ b/x-pack/plugins/ml/public/embeddables/common/anomaly_detection_embeddable.ts @@ -5,14 +5,15 @@ * 2.0. */ +import { type DataView } from '@kbn/data-views-plugin/common'; +import { type DataViewsContract } from '@kbn/data-views-plugin/public'; import { Embeddable, type EmbeddableInput, type EmbeddableOutput, type IContainer, } from '@kbn/embeddable-plugin/public'; -import { type DataView } from '@kbn/data-views-plugin/common'; -import { type DataViewsContract } from '@kbn/data-views-plugin/public'; +import type { BehaviorSubject } from 'rxjs'; import { firstValueFrom } from 'rxjs'; import { type AnomalyDetectorService } from '../../application/services/anomaly_detector_service'; import type { JobId } from '../../shared'; @@ -28,7 +29,8 @@ export abstract class AnomalyDetectionEmbeddable< // Need to defer embeddable load in order to resolve data views deferEmbeddableLoad = true; - public jobIds: JobId[] = []; + // API + public abstract jobIds: BehaviorSubject; protected constructor( initialInput: Input, @@ -46,8 +48,6 @@ export abstract class AnomalyDetectionEmbeddable< protected async initializeOutput(initialInput: CommonInput) { const { jobIds } = initialInput; - this.jobIds = jobIds; - try { const jobs = await firstValueFrom(this.anomalyDetectorService.getJobs$(jobIds)); diff --git a/x-pack/plugins/ml/public/embeddables/types.ts b/x-pack/plugins/ml/public/embeddables/types.ts index a0bd799352d4f..14ee0e7c6d444 100644 --- a/x-pack/plugins/ml/public/embeddables/types.ts +++ b/x-pack/plugins/ml/public/embeddables/types.ts @@ -11,6 +11,13 @@ import type { DataView } from '@kbn/data-views-plugin/common'; import type { EmbeddableInput, EmbeddableOutput, IEmbeddable } from '@kbn/embeddable-plugin/public'; import type { Filter, Query, TimeRange } from '@kbn/es-query'; import type { MlEntityField } from '@kbn/ml-anomaly-utils'; +import type { + EmbeddableApiContext, + HasParentApi, + HasType, + PublishesUnifiedSearch, + PublishesViewMode, +} from '@kbn/presentation-publishing'; import type { JobId } from '../../common/types/anomaly_detection_jobs'; import type { MlDependencies } from '../application/app'; import type { MlCapabilitiesService } from '../application/capabilities/check_capabilities'; @@ -30,6 +37,18 @@ import type { MlEmbeddableTypes, } from './constants'; +export type MlEmbeddableBaseApi = Partial< + HasParentApi & PublishesViewMode & PublishesUnifiedSearch +>; + +/** Manual input by the user */ +export interface AnomalySwimlaneEmbeddableUserInput { + jobIds: JobId[]; + panelTitle: string; + swimlaneType: SwimlaneType; + viewBy?: string; +} + export interface AnomalySwimlaneEmbeddableCustomInput { jobIds: JobId[]; swimlaneType: SwimlaneType; @@ -66,8 +85,11 @@ export interface AnomalySwimlaneEmbeddableCustomOutput { export type AnomalySwimlaneEmbeddableOutput = EmbeddableOutput & AnomalySwimlaneEmbeddableCustomOutput; -export interface EditSwimlanePanelContext { - embeddable: IEmbeddable; +export type EditSwimLaneActionApi = HasType & + Partial>; + +export interface EditSwimlanePanelContext extends EmbeddableApiContext { + embeddable: EditSwimLaneActionApi; } export interface SwimLaneDrilldownContext extends EditSwimlanePanelContext { diff --git a/x-pack/plugins/ml/public/ui_actions/apply_influencer_filters_action.tsx b/x-pack/plugins/ml/public/ui_actions/apply_influencer_filters_action.tsx index 96508aae89771..b2d785bf6dab3 100644 --- a/x-pack/plugins/ml/public/ui_actions/apply_influencer_filters_action.tsx +++ b/x-pack/plugins/ml/public/ui_actions/apply_influencer_filters_action.tsx @@ -5,16 +5,17 @@ * 2.0. */ +import { DASHBOARD_APP_ID } from '@kbn/dashboard-plugin/public'; import type { Filter } from '@kbn/es-query'; import { FilterStateStore } from '@kbn/es-query'; import { i18n } from '@kbn/i18n'; +import type { EmbeddableApiContext } from '@kbn/presentation-publishing'; import type { UiActionsActionDefinition } from '@kbn/ui-actions-plugin/public'; import { firstValueFrom } from 'rxjs'; -import { DASHBOARD_APP_ID } from '@kbn/dashboard-plugin/public'; -import type { MlCoreSetup } from '../plugin'; +import { isAnomalySwimlaneSelectionTriggerContext } from './triggers'; import { SWIMLANE_TYPE, VIEW_BY_JOB_LABEL } from '../application/explorer/explorer_constants'; import type { SwimLaneDrilldownContext } from '../embeddables'; -import { ANOMALY_SWIMLANE_EMBEDDABLE_TYPE } from '../embeddables'; +import type { MlCoreSetup } from '../plugin'; import { CONTROLLED_BY_SWIM_LANE_FILTER } from './constants'; export const APPLY_INFLUENCER_FILTERS_ACTION = 'applyInfluencerFiltersAction'; @@ -27,7 +28,7 @@ export function createApplyInfluencerFiltersAction( return { id: 'apply-to-current-view', type: APPLY_INFLUENCER_FILTERS_ACTION, - getIconType(context: SwimLaneDrilldownContext): string { + getIconType(): string { return 'filter'; }, getDisplayName() { @@ -73,18 +74,18 @@ export function createApplyInfluencerFiltersAction( }) ); }, - async isCompatible({ embeddable, data }) { + async isCompatible(context: EmbeddableApiContext) { const [{ application }] = await getStartServices(); const appId = await firstValueFrom(application.currentAppId$); // Only compatible with view by influencer swim lanes and single selection return ( - embeddable.type === ANOMALY_SWIMLANE_EMBEDDABLE_TYPE && - data !== undefined && - data.type === SWIMLANE_TYPE.VIEW_BY && - data.viewByFieldName !== VIEW_BY_JOB_LABEL && - data.lanes.length === 1 && - supportedApps.includes(appId!) + supportedApps.includes(appId!) && + isAnomalySwimlaneSelectionTriggerContext(context) && + context.data !== undefined && + context.data.type === SWIMLANE_TYPE.VIEW_BY && + context.data.viewByFieldName !== VIEW_BY_JOB_LABEL && + context.data.lanes.length === 1 ); }, }; diff --git a/x-pack/plugins/ml/public/ui_actions/apply_time_range_action.tsx b/x-pack/plugins/ml/public/ui_actions/apply_time_range_action.tsx index 2b6071db2388c..30dc1b0d54c73 100644 --- a/x-pack/plugins/ml/public/ui_actions/apply_time_range_action.tsx +++ b/x-pack/plugins/ml/public/ui_actions/apply_time_range_action.tsx @@ -5,22 +5,32 @@ * 2.0. */ +import { DASHBOARD_APP_ID } from '@kbn/dashboard-plugin/public'; import { i18n } from '@kbn/i18n'; -import moment from 'moment'; +import type { EmbeddableApiContext } from '@kbn/presentation-publishing'; import type { UiActionsActionDefinition } from '@kbn/ui-actions-plugin/public'; -import { DASHBOARD_APP_ID } from '@kbn/dashboard-plugin/public'; +import moment from 'moment'; import { firstValueFrom } from 'rxjs'; +import { isAnomalySwimlaneSelectionTriggerContext } from './triggers'; +import type { AppStateSelectedCells } from '../application/explorer/explorer_utils'; +import type { AnomalySwimLaneEmbeddableApi } from '../embeddables/anomaly_swimlane/types'; import type { MlCoreSetup } from '../plugin'; -import type { SwimLaneDrilldownContext } from '../embeddables'; -import { ANOMALY_SWIMLANE_EMBEDDABLE_TYPE } from '../embeddables'; export const APPLY_TIME_RANGE_SELECTION_ACTION = 'applyTimeRangeSelectionAction'; const supportedApps = [DASHBOARD_APP_ID]; +export interface ApplyTimeRangeSelectionActionContext extends EmbeddableApiContext { + embeddable: AnomalySwimLaneEmbeddableApi; + /** + * Optional data provided by swim lane selection + */ + data?: AppStateSelectedCells; +} + export function createApplyTimeRangeSelectionAction( getStartServices: MlCoreSetup['getStartServices'] -): UiActionsActionDefinition { +): UiActionsActionDefinition { return { id: 'apply-time-range-selection', type: APPLY_TIME_RANGE_SELECTION_ACTION, @@ -37,9 +47,9 @@ export function createApplyTimeRangeSelectionAction( } const [, pluginStart] = await getStartServices(); const timefilter = pluginStart.data.query.timefilter.timefilter; - const { interval } = embeddable.getOutput(); + const { interval } = embeddable; - if (!interval) { + if (!interval.getValue()) { throw new Error('Interval is required to set a time range'); } @@ -53,14 +63,10 @@ export function createApplyTimeRangeSelectionAction( mode: 'absolute', }); }, - async isCompatible({ embeddable, data }) { + async isCompatible(context) { const [{ application }] = await getStartServices(); const appId = await firstValueFrom(application.currentAppId$); - return ( - embeddable.type === ANOMALY_SWIMLANE_EMBEDDABLE_TYPE && - data !== undefined && - supportedApps.includes(appId!) - ); + return isAnomalySwimlaneSelectionTriggerContext(context) && supportedApps.includes(appId!); }, }; } diff --git a/x-pack/plugins/ml/public/ui_actions/edit_swimlane_panel_action.tsx b/x-pack/plugins/ml/public/ui_actions/edit_swimlane_panel_action.tsx index c2933014e9feb..bdeea57f5e298 100644 --- a/x-pack/plugins/ml/public/ui_actions/edit_swimlane_panel_action.tsx +++ b/x-pack/plugins/ml/public/ui_actions/edit_swimlane_panel_action.tsx @@ -6,30 +6,36 @@ */ import { i18n } from '@kbn/i18n'; +import type { EmbeddableApiContext } from '@kbn/presentation-publishing'; import type { UiActionsActionDefinition } from '@kbn/ui-actions-plugin/public'; -import { ViewMode } from '@kbn/embeddable-plugin/public'; +import { IncompatibleActionError } from '@kbn/ui-actions-plugin/public'; +import type { AnomalySwimLaneEmbeddableApi } from '../embeddables/anomaly_swimlane/types'; import type { MlCoreSetup } from '../plugin'; -import type { EditSwimlanePanelContext } from '../embeddables'; -import { ANOMALY_SWIMLANE_EMBEDDABLE_TYPE } from '../embeddables'; +import { isSwimLaneEmbeddableContext } from '../embeddables/anomaly_swimlane/types'; export const EDIT_SWIMLANE_PANEL_ACTION = 'editSwimlanePanelAction'; +export type EditSwimlanePanelActionContext = EmbeddableApiContext & { + embeddable: AnomalySwimLaneEmbeddableApi; +}; + export function createEditSwimlanePanelAction( getStartServices: MlCoreSetup['getStartServices'] -): UiActionsActionDefinition { +): UiActionsActionDefinition { return { id: 'edit-anomaly-swimlane', type: EDIT_SWIMLANE_PANEL_ACTION, - getIconType(context): string { + order: 50, + getIconType(): string { return 'pencil'; }, getDisplayName: () => i18n.translate('xpack.ml.actions.editSwimlaneTitle', { defaultMessage: 'Edit swim lane', }), - async execute({ embeddable }) { - if (!embeddable) { - throw new Error('Not possible to execute an action without the embeddable context'); + async execute(context) { + if (!isSwimLaneEmbeddableContext(context)) { + throw new IncompatibleActionError(); } const [coreStart, deps] = await getStartServices(); @@ -39,20 +45,24 @@ export function createEditSwimlanePanelAction( '../embeddables/anomaly_swimlane/anomaly_swimlane_setup_flyout' ); - const result = await resolveAnomalySwimlaneUserInput( - coreStart, - deps.data.dataViews, - embeddable.getInput() - ); - embeddable.updateInput(result); + const { jobIds, viewBy, swimlaneType, panelTitle } = context.embeddable; + + const result = await resolveAnomalySwimlaneUserInput(coreStart, deps.data.dataViews, { + jobIds: jobIds.getValue(), + swimlaneType: swimlaneType.getValue(), + viewBy: viewBy.getValue(), + title: panelTitle?.getValue(), + }); + + context.embeddable.updateUserInput(result); + context.embeddable.setPanelTitle(result.panelTitle); } catch (e) { return Promise.reject(); } }, - async isCompatible({ embeddable }) { + async isCompatible(context: EmbeddableApiContext) { return ( - embeddable.type === ANOMALY_SWIMLANE_EMBEDDABLE_TYPE && - embeddable.getInput().viewMode === ViewMode.EDIT + isSwimLaneEmbeddableContext(context) && context.embeddable.viewMode?.getValue() === 'edit' ); }, }; diff --git a/x-pack/plugins/ml/public/ui_actions/index.ts b/x-pack/plugins/ml/public/ui_actions/index.ts index bdbd5f3f3e858..e55b1fc1c7b00 100644 --- a/x-pack/plugins/ml/public/ui_actions/index.ts +++ b/x-pack/plugins/ml/public/ui_actions/index.ts @@ -6,31 +6,31 @@ */ import type { CoreSetup } from '@kbn/core/public'; -import type { UiActionsSetup } from '@kbn/ui-actions-plugin/public'; import { CONTEXT_MENU_TRIGGER } from '@kbn/embeddable-plugin/public'; import { CREATE_PATTERN_ANALYSIS_TO_ML_AD_JOB_TRIGGER } from '@kbn/ml-ui-actions'; +import type { UiActionsSetup } from '@kbn/ui-actions-plugin/public'; +import type { MlPluginStart, MlStartDependencies } from '../plugin'; +import { createApplyEntityFieldFiltersAction } from './apply_entity_filters_action'; +import { createApplyInfluencerFiltersAction } from './apply_influencer_filters_action'; +import { createApplyTimeRangeSelectionAction } from './apply_time_range_action'; +import { createClearSelectionAction } from './clear_selection_action'; +import { createEditAnomalyChartsPanelAction } from './edit_anomaly_charts_panel_action'; import { createEditSwimlanePanelAction } from './edit_swimlane_panel_action'; -import { createOpenInExplorerAction } from './open_in_anomaly_explorer_action'; -import { createVisToADJobAction } from './open_vis_in_ml_action'; import { createCategorizationADJobAction, createCategorizationADJobTrigger, } from './open_create_categorization_job_action'; -import type { MlPluginStart, MlStartDependencies } from '../plugin'; -import { createApplyInfluencerFiltersAction } from './apply_influencer_filters_action'; +import { createOpenInExplorerAction } from './open_in_anomaly_explorer_action'; +import { createVisToADJobAction } from './open_vis_in_ml_action'; import { entityFieldSelectionTrigger, EXPLORER_ENTITY_FIELD_SELECTION_TRIGGER, - SWIM_LANE_SELECTION_TRIGGER, swimLaneSelectionTrigger, + SWIM_LANE_SELECTION_TRIGGER, } from './triggers'; -import { createApplyTimeRangeSelectionAction } from './apply_time_range_action'; -import { createClearSelectionAction } from './clear_selection_action'; -import { createEditAnomalyChartsPanelAction } from './edit_anomaly_charts_panel_action'; -import { createApplyEntityFieldFiltersAction } from './apply_entity_filters_action'; +export { APPLY_INFLUENCER_FILTERS_ACTION } from './apply_influencer_filters_action'; export { APPLY_TIME_RANGE_SELECTION_ACTION } from './apply_time_range_action'; export { EDIT_SWIMLANE_PANEL_ACTION } from './edit_swimlane_panel_action'; -export { APPLY_INFLUENCER_FILTERS_ACTION } from './apply_influencer_filters_action'; export { OPEN_IN_ANOMALY_EXPLORER_ACTION } from './open_in_anomaly_explorer_action'; export { CREATE_LENS_VIS_TO_ML_AD_JOB_ACTION } from './open_vis_in_ml_action'; export { SWIM_LANE_SELECTION_TRIGGER }; @@ -53,18 +53,14 @@ export function registerMlUiActions( const categorizationADJobAction = createCategorizationADJobAction(core.getStartServices); // Register actions - uiActions.registerAction(editSwimlanePanelAction); - uiActions.registerAction(applyInfluencerFiltersAction); uiActions.registerAction(applyEntityFieldFilterAction); uiActions.registerAction(applyTimeRangeSelectionAction); - uiActions.registerAction(clearSelectionAction); - uiActions.registerAction(editExplorerPanelAction); uiActions.registerAction(categorizationADJobAction); // Assign triggers - uiActions.attachAction(CONTEXT_MENU_TRIGGER, editSwimlanePanelAction.id); - uiActions.attachAction(CONTEXT_MENU_TRIGGER, editExplorerPanelAction.id); - uiActions.attachAction(CONTEXT_MENU_TRIGGER, openInExplorerAction.id); + uiActions.addTriggerAction(CONTEXT_MENU_TRIGGER, editSwimlanePanelAction); + uiActions.addTriggerAction(CONTEXT_MENU_TRIGGER, editExplorerPanelAction); + uiActions.addTriggerAction(CONTEXT_MENU_TRIGGER, openInExplorerAction); uiActions.registerTrigger(swimLaneSelectionTrigger); uiActions.registerTrigger(entityFieldSelectionTrigger); diff --git a/x-pack/plugins/ml/public/ui_actions/open_in_anomaly_explorer_action.tsx b/x-pack/plugins/ml/public/ui_actions/open_in_anomaly_explorer_action.tsx index e955245adec86..d9a0d8dc060ba 100644 --- a/x-pack/plugins/ml/public/ui_actions/open_in_anomaly_explorer_action.tsx +++ b/x-pack/plugins/ml/public/ui_actions/open_in_anomaly_explorer_action.tsx @@ -10,42 +10,22 @@ import { i18n } from '@kbn/i18n'; import type { MlEntityField } from '@kbn/ml-anomaly-utils'; import { ML_ENTITY_FIELD_OPERATIONS } from '@kbn/ml-anomaly-utils'; import { isPopulatedObject } from '@kbn/ml-is-populated-object'; -import type { - EmbeddableApiContext, - HasParentApi, - HasType, - PublishesUnifiedSearch, - PublishingSubject, -} from '@kbn/presentation-publishing'; -import { apiHasType, apiIsOfType } from '@kbn/presentation-publishing'; -import { createAction } from '@kbn/ui-actions-plugin/public'; +import type { EmbeddableApiContext } from '@kbn/presentation-publishing'; +import { apiIsOfType } from '@kbn/presentation-publishing'; +import type { UiActionsActionDefinition } from '@kbn/ui-actions-plugin/public'; import type { SerializableRecord } from '@kbn/utility-types'; import { ML_APP_LOCATOR } from '../../common/constants/locator'; import type { ExplorerAppState } from '../../common/types/locator'; import type { AppStateSelectedCells } from '../application/explorer/explorer_utils'; -import type { - AnomalyExplorerChartsEmbeddableType, - AnomalySwimLaneEmbeddableType, -} from '../embeddables'; -import { - ANOMALY_EXPLORER_CHARTS_EMBEDDABLE_TYPE, - ANOMALY_SWIMLANE_EMBEDDABLE_TYPE, -} from '../embeddables'; +import type { MlEmbeddableBaseApi } from '../embeddables'; +import { ANOMALY_EXPLORER_CHARTS_EMBEDDABLE_TYPE } from '../embeddables'; +import type { AnomalyChartsEmbeddableApi } from '../embeddables/anomaly_charts/types'; +import type { AnomalySwimLaneEmbeddableApi } from '../embeddables/anomaly_swimlane/types'; import type { MlCoreSetup } from '../plugin'; -import type { JobId } from '../shared'; - -export interface AnomalyChartsFieldSelectionApi { - entityFields: PublishingSubject; -} - -export interface SwimLaneDrilldownApi { - viewBy: PublishingSubject; - perPage: PublishingSubject; - fromPage: PublishingSubject; -} +import { isSwimLaneEmbeddableContext } from '../embeddables/anomaly_swimlane/types'; export interface OpenInAnomalyExplorerSwimLaneActionContext extends EmbeddableApiContext { - embeddable: OpenInAnomalyExplorerFromSwimLaneActionApi; + embeddable: AnomalySwimLaneEmbeddableApi; /** * Optional data provided by swim lane selection */ @@ -53,37 +33,15 @@ export interface OpenInAnomalyExplorerSwimLaneActionContext extends EmbeddableAp } export interface OpenInAnomalyExplorerAnomalyChartsActionContext extends EmbeddableApiContext { - embeddable: OpenInAnomalyExplorerFromAnomalyChartActionApi; + embeddable: AnomalyChartsEmbeddableApi; /** * Optional fields selected using anomaly charts */ data?: MlEntityField[]; } -export type OpenInAnomalyExplorerBaseActionApi = Partial< - HasParentApi & PublishesUnifiedSearch & { jobIds: JobId[] } ->; - -export type OpenInAnomalyExplorerFromSwimLaneActionApi = HasType & - OpenInAnomalyExplorerBaseActionApi & - SwimLaneDrilldownApi; - -export type OpenInAnomalyExplorerFromAnomalyChartActionApi = - HasType & - OpenInAnomalyExplorerBaseActionApi & - AnomalyChartsFieldSelectionApi; - export const OPEN_IN_ANOMALY_EXPLORER_ACTION = 'openInAnomalyExplorerAction'; -export function isSwimLaneEmbeddableContext( - arg: unknown -): arg is OpenInAnomalyExplorerSwimLaneActionContext { - return ( - isPopulatedObject(arg, ['embeddable']) && - apiIsOfType(arg.embeddable, ANOMALY_SWIMLANE_EMBEDDABLE_TYPE) - ); -} - export function isAnomalyChartsEmbeddableContext( arg: unknown ): arg is OpenInAnomalyExplorerAnomalyChartsActionContext { @@ -93,17 +51,19 @@ export function isAnomalyChartsEmbeddableContext( ); } -export const isApiCompatible = (api: unknown | null): api is OpenInAnomalyExplorerBaseActionApi => - Boolean(apiHasType(api)); - -const getTimeRange = (embeddable: OpenInAnomalyExplorerBaseActionApi): TimeRange | undefined => { +const getTimeRange = (embeddable: MlEmbeddableBaseApi): TimeRange | undefined => { return embeddable.timeRange$?.getValue() ?? embeddable.parentApi?.timeRange$?.getValue(); }; -export function createOpenInExplorerAction(getStartServices: MlCoreSetup['getStartServices']) { - return createAction({ +export function createOpenInExplorerAction( + getStartServices: MlCoreSetup['getStartServices'] +): UiActionsActionDefinition< + OpenInAnomalyExplorerSwimLaneActionContext | OpenInAnomalyExplorerAnomalyChartsActionContext +> { + return { id: 'open-in-anomaly-explorer', type: OPEN_IN_ANOMALY_EXPLORER_ACTION, + order: 40, getIconType(): string { return 'visTable'; }, @@ -124,7 +84,7 @@ export function createOpenInExplorerAction(getStartServices: MlCoreSetup['getSta return locator.getUrl({ page: 'explorer', pageState: { - jobIds, + jobIds: jobIds.getValue(), timeRange: getTimeRange(embeddable), mlExplorerSwimlane: { viewByFromPage: fromPage.getValue(), @@ -177,7 +137,7 @@ export function createOpenInExplorerAction(getStartServices: MlCoreSetup['getSta return locator.getUrl({ page: 'explorer', pageState: { - jobIds, + jobIds: jobIds.getValue(), timeRange: getTimeRange(embeddable), // @ts-ignore QueryDslQueryContainer is not compatible with SerializableRecord ...(mlExplorerFilter ? ({ mlExplorerFilter } as SerializableRecord) : {}), @@ -199,5 +159,5 @@ export function createOpenInExplorerAction(getStartServices: MlCoreSetup['getSta async isCompatible(context: EmbeddableApiContext) { return isSwimLaneEmbeddableContext(context) || isAnomalyChartsEmbeddableContext(context); }, - }); + }; } diff --git a/x-pack/plugins/ml/public/ui_actions/triggers.ts b/x-pack/plugins/ml/public/ui_actions/triggers.ts index d13af630388e3..049f8544f0e95 100644 --- a/x-pack/plugins/ml/public/ui_actions/triggers.ts +++ b/x-pack/plugins/ml/public/ui_actions/triggers.ts @@ -6,6 +6,10 @@ */ import type { Trigger } from '@kbn/ui-actions-plugin/public'; +import type { EmbeddableApiContext } from '@kbn/presentation-publishing'; +import type { AppStateSelectedCells } from '../application/explorer/explorer_utils'; +import type { AnomalySwimLaneEmbeddableApi } from '../embeddables/anomaly_swimlane/types'; +import { isSwimLaneEmbeddableContext } from '../embeddables/anomaly_swimlane/types'; export const SWIM_LANE_SELECTION_TRIGGER = 'SWIM_LANE_SELECTION_TRIGGER'; @@ -25,3 +29,17 @@ export const entityFieldSelectionTrigger: Trigger = { title: '', description: 'Entity field selection triggered', }; + +export interface AnomalySwimLaneSelectionTriggerContext extends EmbeddableApiContext { + embeddable: AnomalySwimLaneEmbeddableApi; + /** + * Data provided by swim lane selection + */ + data: AppStateSelectedCells; +} + +export const isAnomalySwimlaneSelectionTriggerContext = ( + context: unknown +): context is AnomalySwimLaneSelectionTriggerContext => { + return isSwimLaneEmbeddableContext(context) && context.data !== undefined; +}; diff --git a/x-pack/plugins/monitoring/server/config.test.ts b/x-pack/plugins/monitoring/server/config.test.ts index 02d63ac16ba17..f7833dcba452f 100644 --- a/x-pack/plugins/monitoring/server/config.test.ts +++ b/x-pack/plugins/monitoring/server/config.test.ts @@ -61,6 +61,7 @@ describe('config schema', () => { "customHeaders": Object {}, "healthCheck": Object { "delay": "PT2.5S", + "startupDelay": "PT0.5S", }, "idleSocketTimeout": "PT1M", "ignoreVersionMismatch": false, diff --git a/x-pack/plugins/observability_solution/apm/ftr_e2e/cypress/e2e/dependencies/dependencies.cy.ts b/x-pack/plugins/observability_solution/apm/ftr_e2e/cypress/e2e/dependencies/dependencies.cy.ts index 11741c3d3066b..3040f7650dc08 100644 --- a/x-pack/plugins/observability_solution/apm/ftr_e2e/cypress/e2e/dependencies/dependencies.cy.ts +++ b/x-pack/plugins/observability_solution/apm/ftr_e2e/cypress/e2e/dependencies/dependencies.cy.ts @@ -122,7 +122,8 @@ describe('Dependencies', () => { }); }); -describe('Dependencies with high volume of data', () => { +// FLAKY: https://github.com/elastic/kibana/issues/179083 +describe.skip('Dependencies with high volume of data', () => { before(() => { synthtrace.index( generateManyDependencies({ @@ -142,10 +143,7 @@ describe('Dependencies with high volume of data', () => { it('shows dependencies inventory page', () => { cy.visitKibana( - `/app/apm/dependencies/inventory?${new URLSearchParams({ - ...timeRange, - kuery: 'elasticsearch*', - })}` + `/app/apm/dependencies/inventory?${new URLSearchParams(timeRange)}` ); cy.getByTestSubj('dependenciesTable'); diff --git a/x-pack/plugins/observability_solution/apm/public/components/alerting/rule_types/register_apm_rule_types.ts b/x-pack/plugins/observability_solution/apm/public/components/alerting/rule_types/register_apm_rule_types.ts index 86465817689fd..f95b5503fd5ec 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/alerting/rule_types/register_apm_rule_types.ts +++ b/x-pack/plugins/observability_solution/apm/public/components/alerting/rule_types/register_apm_rule_types.ts @@ -47,7 +47,7 @@ export function registerApmRuleTypes( }, iconClass: 'bell', documentationUrl(docLinks) { - return `${docLinks.links.alerting.apmRules}`; + return `${docLinks.links.alerting.apmRulesErrorCount}`; }, ruleParamsExpression: lazy(() => import('./error_count_rule_type')), validate: () => ({ @@ -80,7 +80,7 @@ export function registerApmRuleTypes( }, iconClass: 'bell', documentationUrl(docLinks) { - return `${docLinks.links.alerting.apmRules}`; + return `${docLinks.links.alerting.apmRulesTransactionDuration}`; }, ruleParamsExpression: lazy( () => import('./transaction_duration_rule_type') @@ -116,7 +116,7 @@ export function registerApmRuleTypes( }), iconClass: 'bell', documentationUrl(docLinks) { - return `${docLinks.links.alerting.apmRules}`; + return `${docLinks.links.alerting.apmRulesTransactionError}`; }, ruleParamsExpression: lazy( () => import('./transaction_error_rate_rule_type') @@ -146,7 +146,7 @@ export function registerApmRuleTypes( }), iconClass: 'bell', documentationUrl(docLinks) { - return `${docLinks.links.alerting.apmRules}`; + return `${docLinks.links.alerting.apmRulesAnomaly}`; }, ruleParamsExpression: lazy(() => import('./anomaly_rule_type')), validate: validateAnomalyRule, diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/service_dashboards/actions/goto_dashboard.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/service_dashboards/actions/goto_dashboard.tsx index f196077c41a4d..1d1c923e6a597 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/service_dashboards/actions/goto_dashboard.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/service_dashboards/actions/goto_dashboard.tsx @@ -30,7 +30,7 @@ export function GotoDashboard({ data-test-subj="apmGotoDashboardGoToDashboardButton" color="text" size="s" - iconType={'visGauge'} + iconType="visGauge" href={url} > {i18n.translate('xpack.apm.serviceDashboards.contextMenu.goToDashboard', { diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/service_dashboards/actions/link_dashboard.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/service_dashboards/actions/link_dashboard.tsx index 0db2654c1d66b..03dc390fc93ce 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/service_dashboards/actions/link_dashboard.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/service_dashboards/actions/link_dashboard.tsx @@ -29,7 +29,7 @@ export function LinkDashboard({ setIsModalVisible(true)} > diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/service_dashboards/actions/save_dashboard_modal.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/service_dashboards/actions/save_dashboard_modal.tsx index 6872b0d2cc805..406a1b3e43190 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/service_dashboards/actions/save_dashboard_modal.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/service_dashboards/actions/save_dashboard_modal.tsx @@ -53,29 +53,29 @@ export function SaveDashboardModal({ const { data: allAvailableDashboards, status } = useDashboardFetcher(); const history = useHistory(); - let defaultOption: EuiComboBoxOptionOption | undefined; + const [isLoading, setIsLoading] = useState(false); - const [serviceFiltersEnabled, setserviceFiltersEnabled] = useState( + const [serviceFiltersEnabled, setServiceFiltersEnabled] = useState( (currentDashboard?.serviceEnvironmentFilterEnabled && currentDashboard?.serviceNameFilterEnabled) ?? true ); - if (currentDashboard) { - const { title, dashboardSavedObjectId } = currentDashboard; - defaultOption = { label: title, value: dashboardSavedObjectId }; - } - - const [selectedDashboard, setSelectedDashboard] = useState( - defaultOption ? [defaultOption] : [] + const [selectedDashboard, setSelectedDashboard] = useState< + Array> + >( + currentDashboard + ? [ + { + label: currentDashboard.title, + value: currentDashboard.dashboardSavedObjectId, + }, + ] + : [] ); const isEditMode = !!currentDashboard?.id; - const reloadCustomDashboards = useCallback(() => { - onRefresh(); - }, [onRefresh]); - const options = allAvailableDashboards?.map( (dashboardItem: DashboardItem) => ({ label: dashboardItem.attributes.title, @@ -92,6 +92,7 @@ export function SaveDashboardModal({ const [newDashboard] = selectedDashboard; try { if (newDashboard.value) { + setIsLoading(true); await callApmApi('POST /internal/apm/custom-dashboard', { params: { query: { customDashboardId: currentDashboard?.id }, @@ -117,7 +118,7 @@ export function SaveDashboardModal({ dashboardId: newDashboard.value, }), }); - reloadCustomDashboards(); + onRefresh(); } } catch (error) { console.error(error); @@ -132,6 +133,7 @@ export function SaveDashboardModal({ text: error.body.message, }); } + setIsLoading(false); onClose(); }, [ @@ -139,7 +141,7 @@ export function SaveDashboardModal({ notifications.toasts, serviceFiltersEnabled, onClose, - reloadCustomDashboards, + onRefresh, isEditMode, serviceName, currentDashboard, @@ -170,7 +172,7 @@ export function SaveDashboardModal({

} - onChange={() => setserviceFiltersEnabled(!serviceFiltersEnabled)} + onChange={() => setServiceFiltersEnabled(!serviceFiltersEnabled)} checked={serviceFiltersEnabled} />
@@ -220,6 +222,7 @@ export function SaveDashboardModal({ {i18n.translate( 'xpack.apm.serviceDashboards.selectDashboard.cancel', @@ -231,6 +234,7 @@ export function SaveDashboardModal({ {isEditMode diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/service_dashboards/actions/unlink_dashboard.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/service_dashboards/actions/unlink_dashboard.tsx index c43d3d289b767..3e68e8f54ebef 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/service_dashboards/actions/unlink_dashboard.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/service_dashboards/actions/unlink_dashboard.tsx @@ -85,7 +85,7 @@ export function UnlinkDashboard({ setIsModalVisible(true)} > diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/service_dashboards/context_menu.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/service_dashboards/context_menu.tsx index 2eb48b7f66848..bf7da532054bf 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/service_dashboards/context_menu.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/service_dashboards/context_menu.tsx @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ - +import { i18n } from '@kbn/i18n'; import React, { useState } from 'react'; import { EuiButtonIcon, @@ -36,7 +36,10 @@ export function ContextMenu({ items }: Props) { display="base" size="s" iconType="boxesVertical" - aria-label="More" + aria-label={i18n.translate( + 'xpack.apm.serviceDashboards.contextMenu.moreLabel', + { defaultMessage: 'More' } + )} onClick={onButtonClick} /> } @@ -47,8 +50,11 @@ export function ContextMenu({ items }: Props) { > ( - {item} + items={items.map((item, index) => ( + + {' '} + {item} + ))} />
diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/service_dashboards/dashboard_selector.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/service_dashboards/dashboard_selector.tsx index 7dbcbe714a428..5925340151a7d 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/service_dashboards/dashboard_selector.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/service_dashboards/dashboard_selector.tsx @@ -90,8 +90,8 @@ export function DashboardSelector({ selectedDashboard ? [ { - value: selectedDashboard?.dashboardSavedObjectId, - label: selectedDashboard?.title, + value: selectedDashboard.dashboardSavedObjectId, + label: selectedDashboard.title, }, ] : [] diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/service_dashboards/index.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/service_dashboards/index.tsx index 7426ec382b87f..4bfe04df040b3 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/service_dashboards/index.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/service_dashboards/index.tsx @@ -83,7 +83,7 @@ export function ServiceDashboards() { ); useEffect(() => { - const filteredServiceDashbords = (data?.serviceDashboards ?? []).reduce( + const filteredServiceDashboards = (data?.serviceDashboards ?? []).reduce( ( result: MergedServiceDashboard[], serviceDashboard: SavedApmCustomDashboard @@ -102,8 +102,8 @@ export function ServiceDashboards() { [] ); - setServiceDashboards(filteredServiceDashbords); - }, [allAvailableDashboards, data?.serviceDashboards]); + setServiceDashboards(filteredServiceDashboards); + }, [allAvailableDashboards, data]); const getCreationOptions = useCallback((): Promise => { @@ -127,7 +127,6 @@ export function ServiceDashboards() { timeRange: { from: rangeFrom, to: rangeTo }, query: { query: kuery, language: 'kuery' }, }); - // eslint-disable-next-line react-hooks/exhaustive-deps }, [ dataView, serviceName, @@ -136,6 +135,7 @@ export function ServiceDashboards() { dashboard, rangeFrom, rangeTo, + currentDashboard, ]); const getLocatorParams = useCallback( diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/service_inventory/service_list/column_header_with_tooltip.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/service_inventory/service_list/column_header_with_tooltip.tsx new file mode 100644 index 0000000000000..4bedb7c6f829b --- /dev/null +++ b/x-pack/plugins/observability_solution/apm/public/components/app/service_inventory/service_list/column_header_with_tooltip.tsx @@ -0,0 +1,53 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { EuiFlexGroup, EuiPopover, EuiIcon } from '@elastic/eui'; +import React, { useCallback } from 'react'; +import useToggle from 'react-use/lib/useToggle'; + +export function ColumnHeaderWithTooltip({ + label, + tooltipContent, +}: { + label: string; + tooltipContent: string; +}) { + const [isPopoverOpen, togglePopover] = useToggle(false); + + const onButtonClick = useCallback( + (e: React.MouseEvent) => { + e.preventDefault(); + e.stopPropagation(); + togglePopover(); + }, + [togglePopover] + ); + + return ( + +
{label}
+ + + + } + isOpen={isPopoverOpen} + closePopover={togglePopover} + offset={10} + anchorPosition="upCenter" + panelStyle={{ maxWidth: 350 }} + > + {tooltipContent} + +
+ ); +} diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/service_inventory/service_list/index.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/service_inventory/service_list/index.tsx index ba55defaaf4d7..b25f352f609f6 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/service_inventory/service_list/index.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/service_inventory/service_list/index.tsx @@ -57,6 +57,7 @@ import { TableSearchBar, } from '../../../shared/managed_table'; import { HealthBadge } from './health_badge'; +import { ColumnHeaderWithTooltip } from './column_header_with_tooltip'; type ServicesDetailedStatisticsAPIResponse = APIReturnType<'POST /internal/apm/services/detailed_statistics'>; @@ -91,10 +92,23 @@ export function getServiceColumns({ ? [ { field: ServiceInventoryFieldName.AlertsCount, - name: i18n.translate('xpack.apm.servicesTable.alertsColumnLabel', { - defaultMessage: 'Active alerts', - }), - width: `${unit * 8}px`, + name: ( + + ), + width: `${unit * 6}px`, sortable: true, render: (_, { serviceName, alertsCount }) => { if (!alertsCount) { diff --git a/x-pack/plugins/observability_solution/apm/public/locator/helpers.ts b/x-pack/plugins/observability_solution/apm/public/locator/helpers.ts index 8cc727dfa11e8..61ac0b75c50fb 100644 --- a/x-pack/plugins/observability_solution/apm/public/locator/helpers.ts +++ b/x-pack/plugins/observability_solution/apm/public/locator/helpers.ts @@ -29,6 +29,7 @@ export const APMLocatorPayloadValidator = t.union([ metrics: null, logs: null, errors: null, + transactions: null, }), }), t.type({ @@ -90,6 +91,7 @@ export function getPathForServiceDetail( logs: '/services/{serviceName}/logs', metrics: '/services/{serviceName}/metrics', traces: '/services/{serviceName}/transactions', + transactions: '/services/{serviceName}/transactions/view', errors: '/services/{serviceName}/errors', default: '/services/{serviceName}/overview', } as const; diff --git a/x-pack/plugins/observability_solution/exploratory_view/public/components/shared/exploratory_view/configurations/lens_attributes/heatmap_attributes.ts b/x-pack/plugins/observability_solution/exploratory_view/public/components/shared/exploratory_view/configurations/lens_attributes/heatmap_attributes.ts index d62bd8684b48c..8835d02c3317f 100644 --- a/x-pack/plugins/observability_solution/exploratory_view/public/components/shared/exploratory_view/configurations/lens_attributes/heatmap_attributes.ts +++ b/x-pack/plugins/observability_solution/exploratory_view/public/components/shared/exploratory_view/configurations/lens_attributes/heatmap_attributes.ts @@ -7,7 +7,7 @@ import { FormulaPublicApi, HeatmapVisualizationState } from '@kbn/lens-plugin/public'; -import { euiPaletteNegative } from '@elastic/eui'; +import { euiPaletteRed } from '@elastic/eui'; import { ColorStop } from '@kbn/coloring'; import { LayerConfig } from '../lens_attributes'; import { SingleMetricLensAttributes } from './single_metric_attributes'; @@ -52,7 +52,7 @@ export class HeatMapLensAttributes extends SingleMetricLensAttributes { } getHeatmapState() { - const negativePalette = euiPaletteNegative(5); + const negativePalette = euiPaletteRed(5); const layerConfig = this.layerConfigs[0]; return { diff --git a/x-pack/plugins/observability_solution/infra/public/alerting/metric_threshold/components/alert_details_app_section.tsx b/x-pack/plugins/observability_solution/infra/public/alerting/metric_threshold/components/alert_details_app_section.tsx index 165edd080e45c..6ededb941a589 100644 --- a/x-pack/plugins/observability_solution/infra/public/alerting/metric_threshold/components/alert_details_app_section.tsx +++ b/x-pack/plugins/observability_solution/infra/public/alerting/metric_threshold/components/alert_details_app_section.tsx @@ -102,7 +102,7 @@ export function AlertDetailsAppSection({ ), }, ]); - }, [alert, rule, ruleLink, setAlertSummaryFields]); + }, [rule, ruleLink, setAlertSummaryFields]); return !!rule.params.criteria ? ( diff --git a/x-pack/plugins/observability_solution/infra/public/common/visualizations/translations.ts b/x-pack/plugins/observability_solution/infra/public/common/visualizations/translations.ts index c29f4e49d9eba..1a0446584e944 100644 --- a/x-pack/plugins/observability_solution/infra/public/common/visualizations/translations.ts +++ b/x-pack/plugins/observability_solution/infra/public/common/visualizations/translations.ts @@ -11,6 +11,9 @@ export const METRICS_TOOLTIP = { hostCount: i18n.translate('xpack.infra.hostsViewPage.metrics.tooltip.hostCount', { defaultMessage: 'Number of hosts returned by your search criteria.', }), + alertsCount: i18n.translate('xpack.infra.hostsViewPage.metrics.tooltip.alertsCount', { + defaultMessage: 'The count of the active alerts', + }), cpuUsage: i18n.translate('xpack.infra.hostsViewPage.metrics.tooltip.cpuUsage', { defaultMessage: diff --git a/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/components/table/column_header.tsx b/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/components/table/column_header.tsx index e5c5858fba86e..d2f2bf2702205 100644 --- a/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/components/table/column_header.tsx +++ b/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/components/table/column_header.tsx @@ -14,10 +14,11 @@ interface Props { label: string; toolTip?: string; formula?: string; + showDocumentationLink?: boolean; } -export const ColumnHeader = React.memo(({ label, toolTip, formula }: Props) => { - return ( +export const ColumnHeader = React.memo( + ({ label, toolTip, formula, showDocumentationLink = true }: Props) => (
{ {toolTip && ( - + )} - ); -}); + ) +); diff --git a/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/hooks/use_hosts_table.tsx b/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/hooks/use_hosts_table.tsx index c54877bd11a20..e026dbf5aca66 100644 --- a/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/hooks/use_hosts_table.tsx +++ b/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/hooks/use_hosts_table.tsx @@ -27,7 +27,7 @@ import { Sorting, useHostsTableUrlState } from './use_hosts_table_url_state'; import { useHostsViewContext } from './use_hosts_view'; import { useMetricsDataViewContext } from './use_metrics_data_view'; import { ColumnHeader } from '../components/table/column_header'; -import { TABLE_COLUMN_LABEL } from '../translations'; +import { TABLE_COLUMN_LABEL, TABLE_CONTENT_LABEL } from '../translations'; import { METRICS_TOOLTIP } from '../../../../common/visualizations'; import { buildCombinedHostsFilter } from '../../../../utils/filters/build'; @@ -117,10 +117,6 @@ const sortTableData = return sortValues(aValue, bValue, { direction, field }); }; -/** - * Columns translations - */ - /** * Build a table columns and items starting from the snapshot nodes. */ @@ -207,6 +203,8 @@ export const useHostsTable = () => { return items.sort(sortTableData(sorting)).slice(startIndex, endIndex); }, [items, pagination, sorting]); + const metricColumnsWidth = displayAlerts ? '11%' : '15%'; + const columns: Array> = useMemo( () => [ { @@ -231,7 +229,14 @@ export const useHostsTable = () => { ...(displayAlerts ? [ { - name: TABLE_COLUMN_LABEL.alertsCount, + name: ( + + ), + width: '95px', field: 'alertsCount', sortable: true, 'data-test-subj': 'hostsView-tableRow-alertsCount', @@ -240,18 +245,18 @@ export const useHostsTable = () => { return null; } return ( - + { setProperties({ detailsItemId: row.id === detailsItemId ? null : row.id }); }} - onClickAriaLabel={TABLE_COLUMN_LABEL.alertsCount} + onClickAriaLabel={TABLE_CONTENT_LABEL.activeAlerts} iconOnClick={() => { setProperties({ detailsItemId: row.id === detailsItemId ? null : row.id }); }} - iconOnClickAriaLabel={TABLE_COLUMN_LABEL.alertsCount} + iconOnClickAriaLabel={TABLE_CONTENT_LABEL.activeAlerts} > {alertsCount} @@ -270,7 +275,7 @@ export const useHostsTable = () => { render: (title: HostNodeRow['title']) => ( reportHostEntryClick(title)} /> ), - width: '20%', + width: displayAlerts ? '15%' : '20%', }, { name: ( @@ -280,6 +285,7 @@ export const useHostsTable = () => { formula={formulas?.cpuUsage.value} /> ), + width: metricColumnsWidth, field: 'cpu', sortable: true, 'data-test-subj': 'hostsView-tableRow-cpuUsage', @@ -294,6 +300,7 @@ export const useHostsTable = () => { formula={formulas?.normalizedLoad1m.value} /> ), + width: metricColumnsWidth, field: 'normalizedLoad1m', sortable: true, 'data-test-subj': 'hostsView-tableRow-normalizedLoad1m', @@ -308,6 +315,7 @@ export const useHostsTable = () => { formula={formulas?.memoryUsage.value} /> ), + width: metricColumnsWidth, field: 'memory', sortable: true, 'data-test-subj': 'hostsView-tableRow-memoryUsage', @@ -322,6 +330,7 @@ export const useHostsTable = () => { formula={formulas?.memoryFree.value} /> ), + width: metricColumnsWidth, field: 'memoryFree', sortable: true, 'data-test-subj': 'hostsView-tableRow-memoryFree', @@ -336,6 +345,7 @@ export const useHostsTable = () => { formula={formulas?.diskUsage.value} /> ), + width: metricColumnsWidth, field: 'diskSpaceUsage', sortable: true, 'data-test-subj': 'hostsView-tableRow-diskSpaceUsage', @@ -350,6 +360,7 @@ export const useHostsTable = () => { formula={formulas?.rx.value} /> ), + width: '10%', field: 'rx', sortable: true, 'data-test-subj': 'hostsView-tableRow-rx', @@ -364,6 +375,7 @@ export const useHostsTable = () => { formula={formulas?.tx.value} /> ), + width: '10%', field: 'tx', sortable: true, 'data-test-subj': 'hostsView-tableRow-tx', @@ -383,6 +395,7 @@ export const useHostsTable = () => { reportHostEntryClick, setProperties, displayAlerts, + metricColumnsWidth, ] ); diff --git a/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/translations.ts b/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/translations.ts index 9be99e1d70a8b..3f686c6e02056 100644 --- a/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/translations.ts +++ b/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/translations.ts @@ -9,7 +9,7 @@ import { i18n } from '@kbn/i18n'; export const TABLE_COLUMN_LABEL = { alertsCount: i18n.translate('xpack.infra.hostsViewPage.table.alertsColumnHeader', { - defaultMessage: 'Active alerts', + defaultMessage: 'Alerts', }), title: i18n.translate('xpack.infra.hostsViewPage.table.nameColumnHeader', { @@ -48,3 +48,9 @@ export const TABLE_COLUMN_LABEL = { defaultMessage: 'Toggle dialog with details', }), }; + +export const TABLE_CONTENT_LABEL = { + activeAlerts: i18n.translate('xpack.infra.hostsViewPage.table.tooltip.activeAlertsExplanation', { + defaultMessage: 'Active alerts', + }), +}; diff --git a/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/lib/get_color_palette.ts b/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/lib/get_color_palette.ts index 41b8ad2d2e2ed..2795e81c4d522 100644 --- a/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/lib/get_color_palette.ts +++ b/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/lib/get_color_palette.ts @@ -9,8 +9,8 @@ import { euiPaletteCool, euiPaletteForStatus, euiPaletteForTemperature, - euiPaletteNegative, - euiPalettePositive, + euiPaletteRed, + euiPaletteGreen, euiPaletteWarm, } from '@elastic/eui'; import { InventoryColorPalette } from '../../../../lib/lib'; @@ -24,9 +24,9 @@ const createColorPalette = (name: InventoryColorPalette = 'cool', steps: number case 'warm': return euiPaletteWarm(steps); case 'positive': - return euiPalettePositive(steps); + return euiPaletteGreen(steps); case 'negative': - return euiPaletteNegative(steps); + return euiPaletteRed(steps); default: return euiPaletteCool(steps); } diff --git a/x-pack/plugins/observability_solution/infra/server/lib/alerting/inventory_metric_threshold/inventory_metric_threshold_executor.test.ts b/x-pack/plugins/observability_solution/infra/server/lib/alerting/inventory_metric_threshold/inventory_metric_threshold_executor.test.ts index bd6350ba59dd0..b0ffe0b354b13 100644 --- a/x-pack/plugins/observability_solution/infra/server/lib/alerting/inventory_metric_threshold/inventory_metric_threshold_executor.test.ts +++ b/x-pack/plugins/observability_solution/infra/server/lib/alerting/inventory_metric_threshold/inventory_metric_threshold_executor.test.ts @@ -9,11 +9,7 @@ import { AlertInstanceContext as AlertContext, AlertInstanceState as AlertState, } from '@kbn/alerting-plugin/server'; -import { - AlertInstanceMock, - RuleExecutorServicesMock, - alertsMock, -} from '@kbn/alerting-plugin/server/mocks'; +import { RuleExecutorServicesMock, alertsMock } from '@kbn/alerting-plugin/server/mocks'; import { LifecycleAlertServices } from '@kbn/rule-registry-plugin/server'; import { ruleRegistryMocks } from '@kbn/rule-registry-plugin/server/mocks'; import { createLifecycleRuleExecutorMock } from '@kbn/rule-registry-plugin/server/utils/create_lifecycle_rule_executor_mock'; @@ -34,13 +30,11 @@ import { logsSharedPluginMock } from '@kbn/logs-shared-plugin/server/mocks'; jest.mock('./evaluate_condition', () => ({ evaluateCondition: jest.fn() })); interface AlertTestInstance { - instance: AlertInstanceMock; - actionQueue: any[]; - state: any; + actionGroup: string; + payload: any[]; + context: any[]; } -const persistAlertInstances = false; - const fakeLogger = (msg: string, meta?: Meta) => {}; const logger = { @@ -138,46 +132,42 @@ const mockLibs = { }, logger, } as unknown as InfraBackendLibs; +const alerts = new Map(); +let services: RuleExecutorServicesMock & LifecycleAlertServices; -const alertsServices = alertsMock.createRuleExecutorServices(); -const services: RuleExecutorServicesMock & - LifecycleAlertServices = { - ...alertsServices, - ...ruleRegistryMocks.createLifecycleAlertServices(alertsServices), -}; - -const alertInstances = new Map(); - -services.alertFactory.create.mockImplementation((instanceID: string) => { - const newAlertInstance: AlertTestInstance = { - instance: alertsMock.createAlertFactory.create(), - actionQueue: [], - state: {}, +const setup = () => { + const alertsServices = alertsMock.createRuleExecutorServices(); + services = { + ...alertsServices, + ...ruleRegistryMocks.createLifecycleAlertServices(alertsServices), }; - const alertInstance: AlertTestInstance = persistAlertInstances - ? alertInstances.get(instanceID) || newAlertInstance - : newAlertInstance; - alertInstances.set(instanceID, alertInstance); + services.alertsClient.report.mockImplementation((params: any) => { + alerts.set(params.id, { actionGroup: params.actionGroup, context: [], payload: [] }); + return { + uuid: `uuid-${params.id}`, + start: new Date().toISOString(), + alertDoc: {}, + }; + }); - (alertInstance.instance.scheduleActions as jest.Mock).mockImplementation( - (id: string, action: any) => { - alertInstance.actionQueue.push({ id, action }); - return alertInstance.instance; + services.alertsClient.setAlertData.mockImplementation((params: any) => { + const alert = alerts.get(params.id); + if (alert) { + alert.payload.push(params.payload); + alert.context.push(params.context); } - ); - - return alertInstance.instance; -}); + }); +}; function mostRecentAction(id: string) { - const instance = alertInstances.get(id); + const instance = alerts.get(id); if (!instance) return undefined; - return instance.actionQueue.pop(); + return instance.context.pop(); } function clearInstances() { - alertInstances.clear(); + alerts.clear(); } const executor = createInventoryMetricThresholdExecutor(mockLibs); @@ -194,6 +184,9 @@ const baseCriterion = { describe('The inventory threshold alert type', () => { describe('querying with Hosts and rule tags', () => { afterAll(() => clearInstances()); + + setup(); + const execute = (comparator: Comparator, threshold: number[], options?: any) => executor({ ...mockOptions, @@ -219,6 +212,18 @@ describe('The inventory threshold alert type', () => { const instanceIdA = 'host-01'; const instanceIdB = 'host-02'; + test('throws error when alertsClient is null', async () => { + try { + services.alertsClient = null; + await execute(Comparator.GT, [0.75]); + } catch (e) { + expect(e).toMatchInlineSnapshot( + '[Error: Expected alertsClient not to be null! There may have been an issue installing alert resources.]' + ); + setup(); + } + }); + test('when tags are present in the source, rule tags and source tags are combined in alert context', async () => { setEvaluationResults({ 'host-01': { @@ -255,13 +260,13 @@ describe('The inventory threshold alert type', () => { }, }); await execute(Comparator.GT, [0.75]); - expect(mostRecentAction(instanceIdA).action.tags).toStrictEqual([ + expect(mostRecentAction(instanceIdA).tags).toStrictEqual([ 'host-01_tag1', 'host-01_tag2', 'ruleTag1', 'ruleTag2', ]); - expect(mostRecentAction(instanceIdB).action.tags).toStrictEqual([ + expect(mostRecentAction(instanceIdB).tags).toStrictEqual([ 'host-02_tag1', 'host-02_tag2', 'ruleTag1', @@ -305,8 +310,8 @@ describe('The inventory threshold alert type', () => { }, }); await execute(Comparator.GT, [0.75]); - expect(mostRecentAction(instanceIdA).action.tags).toStrictEqual(['ruleTag1', 'ruleTag2']); - expect(mostRecentAction(instanceIdB).action.tags).toStrictEqual(['ruleTag1', 'ruleTag2']); + expect(mostRecentAction(instanceIdA).tags).toStrictEqual(['ruleTag1', 'ruleTag2']); + expect(mostRecentAction(instanceIdB).tags).toStrictEqual(['ruleTag1', 'ruleTag2']); }); test('should call evaluation query with delay', async () => { diff --git a/x-pack/plugins/observability_solution/infra/server/lib/alerting/inventory_metric_threshold/inventory_metric_threshold_executor.ts b/x-pack/plugins/observability_solution/infra/server/lib/alerting/inventory_metric_threshold/inventory_metric_threshold_executor.ts index 7f4159f39c525..7124ce9db597f 100644 --- a/x-pack/plugins/observability_solution/infra/server/lib/alerting/inventory_metric_threshold/inventory_metric_threshold_executor.ts +++ b/x-pack/plugins/observability_solution/infra/server/lib/alerting/inventory_metric_threshold/inventory_metric_threshold_executor.ts @@ -8,7 +8,6 @@ import { i18n } from '@kbn/i18n'; import { ALERT_REASON, - ALERT_ACTION_GROUP, ALERT_EVALUATION_VALUES, ALERT_EVALUATION_THRESHOLD, } from '@kbn/rule-data-utils'; @@ -19,9 +18,10 @@ import { AlertInstanceContext as AlertContext, AlertInstanceState as AlertState, } from '@kbn/alerting-plugin/common'; -import { Alert, RuleTypeState } from '@kbn/alerting-plugin/server'; +import { AlertsClientError, RuleExecutorOptions, RuleTypeState } from '@kbn/alerting-plugin/server'; import { getAlertUrl } from '@kbn/observability-plugin/common'; import { SnapshotMetricType } from '@kbn/metrics-data-access-plugin/common'; +import { ObservabilityMetricsAlert } from '@kbn/alerts-as-data-utils'; import { getOriginalActionGroup } from '../../../utils/get_original_action_group'; import { AlertStates, @@ -42,7 +42,6 @@ import { stateToAlertMessage, } from '../common/messages'; import { - AdditionalContext, createScopedLogger, flattenAdditionalContext, getContextForRecoveredAlerts, @@ -59,99 +58,85 @@ type InventoryMetricThresholdAllowedActionGroups = ActionGroupIdsOf< export const FIRED_ACTIONS_ID = 'metrics.inventory_threshold.fired'; export const WARNING_ACTIONS_ID = 'metrics.inventory_threshold.warning'; -type InventoryThrehsoldActionGroup = typeof FIRED_ACTIONS_ID | typeof WARNING_ACTIONS_ID; - export type InventoryMetricThresholdRuleTypeState = RuleTypeState; // no specific state used export type InventoryMetricThresholdAlertState = AlertState; // no specific state used export type InventoryMetricThresholdAlertContext = AlertContext; // no specific instance context used -type InventoryMetricThresholdAlert = Alert< - InventoryMetricThresholdAlertState, - InventoryMetricThresholdAlertContext, - InventoryMetricThresholdAllowedActionGroups ->; -type InventoryMetricThresholdAlertFactory = ( - id: string, - reason: string, - actionGroup: InventoryThrehsoldActionGroup, - additionalContext?: AdditionalContext | null, - evaluationValues?: Array, - thresholds?: Array -) => InventoryMetricThresholdAlert; - -export const createInventoryMetricThresholdExecutor = (libs: InfraBackendLibs) => - libs.metricsRules.createLifecycleRuleExecutor< - InventoryMetricThresholdParams & Record, - InventoryMetricThresholdRuleTypeState, - InventoryMetricThresholdAlertState, - InventoryMetricThresholdAlertContext, - InventoryMetricThresholdAllowedActionGroups - >( - async ({ +export type InventoryMetricThresholdAlert = Omit< + ObservabilityMetricsAlert, + 'kibana.alert.evaluation.values' | 'kibana.alert.evaluation.threshold' +> & { + // Defining a custom type for this because the schema generation script doesn't allow explicit null values + [ALERT_EVALUATION_VALUES]?: Array; + [ALERT_EVALUATION_THRESHOLD]?: Array; +}; + +export const createInventoryMetricThresholdExecutor = + (libs: InfraBackendLibs) => + async ( + options: RuleExecutorOptions< + InventoryMetricThresholdParams & Record, + InventoryMetricThresholdRuleTypeState, + InventoryMetricThresholdAlertState, + InventoryMetricThresholdAlertContext, + InventoryMetricThresholdAllowedActionGroups, + InventoryMetricThresholdAlert + > + ) => { + const { services, params, + startedAt, executionId, spaceId, - startedAt, rule: { id: ruleId, tags: ruleTags }, getTimeRange, - }) => { - const startTime = Date.now(); + } = options; - const { criteria, filterQuery, sourceId = 'default', nodeType, alertOnNoData } = params; + const startTime = Date.now(); - if (criteria.length === 0) throw new Error('Cannot execute an alert with 0 conditions'); + const { criteria, filterQuery, sourceId = 'default', nodeType, alertOnNoData } = params; - const logger = createScopedLogger(libs.logger, 'inventoryRule', { - alertId: ruleId, - executionId, - }); + if (criteria.length === 0) throw new Error('Cannot execute an alert with 0 conditions'); - const esClient = services.scopedClusterClient.asCurrentUser; - - const { - alertWithLifecycle, - savedObjectsClient, - getAlertStartedDate, - getAlertUuid, - getAlertByAlertUuid, - alertFactory: baseAlertFactory, - } = services; - const alertFactory: InventoryMetricThresholdAlertFactory = ( - id, - reason, - actionGroup, - additionalContext, - evaluationValues, - thresholds - ) => - alertWithLifecycle({ - id, - fields: { - [ALERT_REASON]: reason, - [ALERT_ACTION_GROUP]: actionGroup, - [ALERT_EVALUATION_VALUES]: evaluationValues, - [ALERT_EVALUATION_THRESHOLD]: thresholds, - ...flattenAdditionalContext(additionalContext), - }, + const logger = createScopedLogger(libs.logger, 'inventoryRule', { + alertId: ruleId, + executionId, + }); + + const esClient = services.scopedClusterClient.asCurrentUser; + + const { savedObjectsClient, alertsClient } = services; + + if (!alertsClient) { + throw new AlertsClientError(); + } + + if (!params.filterQuery && params.filterQueryText) { + try { + const { fromKueryExpression } = await import('@kbn/es-query'); + fromKueryExpression(params.filterQueryText); + } catch (e) { + logger.error(e.message); + + const actionGroup = FIRED_ACTIONS.id; // Change this to an Error action group when able, + const reason = buildInvalidQueryAlertReason(params.filterQueryText); + + const { uuid, start } = alertsClient.report({ + id: UNGROUPED_FACTORY_KEY, + actionGroup, }); - if (!params.filterQuery && params.filterQueryText) { - try { - const { fromKueryExpression } = await import('@kbn/es-query'); - fromKueryExpression(params.filterQueryText); - } catch (e) { - logger.error(e.message); - const actionGroupId = FIRED_ACTIONS.id; // Change this to an Error action group when able - const reason = buildInvalidQueryAlertReason(params.filterQueryText); - const alert = alertFactory(UNGROUPED_FACTORY_KEY, reason, actionGroupId); - const indexedStartedAt = - getAlertStartedDate(UNGROUPED_FACTORY_KEY) ?? startedAt.toISOString(); - const alertUuid = getAlertUuid(UNGROUPED_FACTORY_KEY); - - alert.scheduleActions(actionGroupId, { + const indexedStartedAt = start ?? startedAt.toISOString(); + + alertsClient.setAlertData({ + id: UNGROUPED_FACTORY_KEY, + payload: { + [ALERT_REASON]: reason, + }, + context: { alertDetailsUrl: await getAlertUrl( - alertUuid, + uuid, spaceId, indexedStartedAt, libs.alertsLocator, @@ -170,181 +155,139 @@ export const createInventoryMetricThresholdExecutor = (libs: InfraBackendLibs) = timestamp: indexedStartedAt, spaceId, }), - }); + }, + }); - return { state: {} }; - } + return { state: {} }; } - const source = await libs.sources.getSourceConfiguration(savedObjectsClient, sourceId); - - const [, { logsShared }] = await libs.getStartServices(); - const logQueryFields: LogQueryFields | undefined = await logsShared.logViews - .getClient(savedObjectsClient, esClient) - .getResolvedLogView({ - type: 'log-view-reference', - logViewId: sourceId, - }) - .then( - ({ indices }) => ({ indexPattern: indices }), - () => undefined - ); - - const compositeSize = libs.configuration.alerting.inventory_threshold.group_by_page_size; - const { dateEnd } = getTimeRange(); - const results = await Promise.all( - criteria.map((condition) => - evaluateCondition({ - compositeSize, - condition, - esClient, - executionTimestamp: new Date(dateEnd), - filterQuery, - logger, - logQueryFields, - nodeType, - source, - }) - ) + } + const source = await libs.sources.getSourceConfiguration(savedObjectsClient, sourceId); + + const [, { logsShared }] = await libs.getStartServices(); + const logQueryFields: LogQueryFields | undefined = await logsShared.logViews + .getClient(savedObjectsClient, esClient) + .getResolvedLogView({ + type: 'log-view-reference', + logViewId: sourceId, + }) + .then( + ({ indices }) => ({ indexPattern: indices }), + () => undefined ); - let scheduledActionsCount = 0; - const alertLimit = baseAlertFactory.alertLimit.getValue(); - let hasReachedLimit = false; - const inventoryItems = Object.keys(first(results)!); - for (const group of inventoryItems) { - if (scheduledActionsCount >= alertLimit) { - // need to set this so that warning is displayed in the UI and in the logs - hasReachedLimit = true; - break; // once limit is reached, we break out of the loop and don't schedule any more alerts - } - // AND logic; all criteria must be across the threshold - const shouldAlertFire = results.every((result) => result[group]?.shouldFire); - const shouldAlertWarn = results.every((result) => result[group]?.shouldWarn); - // AND logic; because we need to evaluate all criteria, if one of them reports no data then the - // whole alert is in a No Data/Error state - const isNoData = results.some((result) => result[group]?.isNoData); - const isError = results.some((result) => result[group]?.isError); - - const nextState = isError - ? AlertStates.ERROR - : isNoData - ? AlertStates.NO_DATA - : shouldAlertFire - ? AlertStates.ALERT - : shouldAlertWarn - ? AlertStates.WARNING - : AlertStates.OK; - let reason; - if (nextState === AlertStates.ALERT || nextState === AlertStates.WARNING) { + const compositeSize = libs.configuration.alerting.inventory_threshold.group_by_page_size; + const { dateEnd } = getTimeRange(); + const results = await Promise.all( + criteria.map((condition) => + evaluateCondition({ + compositeSize, + condition, + esClient, + executionTimestamp: new Date(dateEnd), + filterQuery, + logger, + logQueryFields, + nodeType, + source, + }) + ) + ); + + let scheduledActionsCount = 0; + const alertLimit = alertsClient.getAlertLimitValue(); + let hasReachedLimit = false; + const inventoryItems = Object.keys(first(results)!); + for (const group of inventoryItems) { + if (scheduledActionsCount >= alertLimit) { + // need to set this so that warning is displayed in the UI and in the logs + hasReachedLimit = true; + break; // once limit is reached, we break out of the loop and don't schedule any more alerts + } + // AND logic; all criteria must be across the threshold + const shouldAlertFire = results.every((result) => result[group]?.shouldFire); + const shouldAlertWarn = results.every((result) => result[group]?.shouldWarn); + // AND logic; because we need to evaluate all criteria, if one of them reports no data then the + // whole alert is in a No Data/Error state + const isNoData = results.some((result) => result[group]?.isNoData); + const isError = results.some((result) => result[group]?.isError); + + const nextState = isError + ? AlertStates.ERROR + : isNoData + ? AlertStates.NO_DATA + : shouldAlertFire + ? AlertStates.ALERT + : shouldAlertWarn + ? AlertStates.WARNING + : AlertStates.OK; + let reason; + if (nextState === AlertStates.ALERT || nextState === AlertStates.WARNING) { + reason = results + .map((result) => + buildReasonWithVerboseMetricName( + group, + result[group], + buildFiredAlertReason, + nextState === AlertStates.WARNING + ) + ) + .join('\n'); + } + if (alertOnNoData) { + if (nextState === AlertStates.NO_DATA) { reason = results + .filter((result) => result[group].isNoData) .map((result) => - buildReasonWithVerboseMetricName( - group, - result[group], - buildFiredAlertReason, - nextState === AlertStates.WARNING - ) + buildReasonWithVerboseMetricName(group, result[group], buildNoDataAlertReason) + ) + .join('\n'); + } else if (nextState === AlertStates.ERROR) { + reason = results + .filter((result) => result[group].isError) + .map((result) => + buildReasonWithVerboseMetricName(group, result[group], buildErrorAlertReason) ) .join('\n'); } - if (alertOnNoData) { - if (nextState === AlertStates.NO_DATA) { - reason = results - .filter((result) => result[group].isNoData) - .map((result) => - buildReasonWithVerboseMetricName(group, result[group], buildNoDataAlertReason) - ) - .join('\n'); - } else if (nextState === AlertStates.ERROR) { - reason = results - .filter((result) => result[group].isError) - .map((result) => - buildReasonWithVerboseMetricName(group, result[group], buildErrorAlertReason) - ) - .join('\n'); - } - } - if (reason) { - const actionGroupId = - nextState === AlertStates.WARNING ? WARNING_ACTIONS_ID : FIRED_ACTIONS_ID; - - const additionalContext = results && results.length > 0 ? results[0][group].context : {}; - additionalContext.tags = Array.from( - new Set([...(additionalContext.tags ?? []), ...ruleTags]) - ); - - const evaluationValues = getEvaluationValues(results, group); - const thresholds = getThresholds(criteria); + } + if (reason) { + const actionGroup = + nextState === AlertStates.WARNING ? WARNING_ACTIONS_ID : FIRED_ACTIONS_ID; - const alert = alertFactory( - group, - reason, - actionGroupId, - additionalContext, - evaluationValues, - thresholds - ); - const indexedStartedAt = getAlertStartedDate(group) ?? startedAt.toISOString(); - const alertUuid = getAlertUuid(group); + const additionalContext = results && results.length > 0 ? results[0][group].context : {}; + additionalContext.tags = Array.from( + new Set([...(additionalContext.tags ?? []), ...ruleTags]) + ); - scheduledActionsCount++; + const evaluationValues = getEvaluationValues(results, group); + const thresholds = getThresholds(criteria); - const context = { - alertDetailsUrl: await getAlertUrl( - alertUuid, - spaceId, - indexedStartedAt, - libs.alertsLocator, - libs.basePath.publicBaseUrl - ), - alertState: stateToAlertMessage[nextState], - group, - reason, - metric: mapToConditionsLookup(criteria, (c) => c.metric), - timestamp: startedAt.toISOString(), - threshold: mapToConditionsLookup(criteria, (c) => c.threshold), - value: mapToConditionsLookup(results, (result) => - formatMetric(result[group].metric, result[group].currentValue) - ), - viewInAppUrl: getInventoryViewInAppUrlWithSpaceId({ - basePath: libs.basePath, - criteria, - nodeType, - timestamp: indexedStartedAt, - spaceId, - hostName: additionalContext?.host?.name, - }), - ...additionalContext, - }; - alert.scheduleActions(actionGroupId, context); - } - } + const { uuid, start } = alertsClient.report({ + id: group, + actionGroup, + }); - baseAlertFactory.alertLimit.setLimitReached(hasReachedLimit); - const { getRecoveredAlerts } = services.alertFactory.done(); - const recoveredAlerts = getRecoveredAlerts(); + const indexedStartedAt = start ?? startedAt.toISOString(); - for (const alert of recoveredAlerts) { - const recoveredAlertId = alert.getId(); - const indexedStartedAt = getAlertStartedDate(recoveredAlertId) ?? startedAt.toISOString(); - const alertUuid = getAlertUuid(recoveredAlertId); - const alertHits = alertUuid ? await getAlertByAlertUuid(alertUuid) : undefined; - const additionalContext = getContextForRecoveredAlerts(alertHits); - const originalActionGroup = getOriginalActionGroup(alertHits); + scheduledActionsCount++; - alert.setContext({ + const context = { alertDetailsUrl: await getAlertUrl( - alertUuid, + uuid, spaceId, indexedStartedAt, libs.alertsLocator, libs.basePath.publicBaseUrl ), - alertState: stateToAlertMessage[AlertStates.OK], - group: recoveredAlertId, + alertState: stateToAlertMessage[nextState], + group, + reason, metric: mapToConditionsLookup(criteria, (c) => c.metric), - threshold: mapToConditionsLookup(criteria, (c) => c.threshold), timestamp: startedAt.toISOString(), + threshold: mapToConditionsLookup(criteria, (c) => c.threshold), + value: mapToConditionsLookup(results, (result) => + formatMetric(result[group].metric, result[group].currentValue) + ), viewInAppUrl: getInventoryViewInAppUrlWithSpaceId({ basePath: libs.basePath, criteria, @@ -353,19 +296,73 @@ export const createInventoryMetricThresholdExecutor = (libs: InfraBackendLibs) = spaceId, hostName: additionalContext?.host?.name, }), - originalAlertState: translateActionGroupToAlertState(originalActionGroup), - originalAlertStateWasALERT: originalActionGroup === FIRED_ACTIONS_ID, - originalAlertStateWasWARNING: originalActionGroup === WARNING_ACTIONS_ID, ...additionalContext, + }; + + const payload = { + [ALERT_REASON]: reason, + [ALERT_EVALUATION_VALUES]: evaluationValues, + [ALERT_EVALUATION_THRESHOLD]: thresholds, + ...flattenAdditionalContext(additionalContext), + }; + + alertsClient.setAlertData({ + id: group, + payload, + context, }); } + } - const stopTime = Date.now(); - logger.debug(`Scheduled ${scheduledActionsCount} actions in ${stopTime - startTime}ms`); - - return { state: {} }; + alertsClient.setAlertLimitReached(hasReachedLimit); + const recoveredAlerts = alertsClient.getRecoveredAlerts() ?? []; + + for (const recoveredAlert of recoveredAlerts) { + const recoveredAlertId = recoveredAlert.alert.getId(); + const indexedStartedAt = recoveredAlert.alert.getStart() ?? startedAt.toISOString(); + const alertUuid = recoveredAlert.alert.getUuid(); + const alertHits = recoveredAlert.hit; + const additionalContext = getContextForRecoveredAlerts(alertHits); + const originalActionGroup = getOriginalActionGroup(alertHits); + + const recoveredContext = { + alertDetailsUrl: await getAlertUrl( + alertUuid, + spaceId, + indexedStartedAt, + libs.alertsLocator, + libs.basePath.publicBaseUrl + ), + alertState: stateToAlertMessage[AlertStates.OK], + group: recoveredAlertId, + metric: mapToConditionsLookup(criteria, (c) => c.metric), + threshold: mapToConditionsLookup(criteria, (c) => c.threshold), + timestamp: startedAt.toISOString(), + viewInAppUrl: getInventoryViewInAppUrlWithSpaceId({ + basePath: libs.basePath, + criteria, + nodeType, + timestamp: indexedStartedAt, + spaceId, + hostName: additionalContext?.host?.name, + }), + originalAlertState: translateActionGroupToAlertState(originalActionGroup), + originalAlertStateWasALERT: originalActionGroup === FIRED_ACTIONS_ID, + originalAlertStateWasWARNING: originalActionGroup === WARNING_ACTIONS_ID, + ...additionalContext, + }; + + alertsClient.setAlertData({ + id: recoveredAlertId, + context: recoveredContext, + }); } - ); + + const stopTime = Date.now(); + logger.debug(`Scheduled ${scheduledActionsCount} actions in ${stopTime - startTime}ms`); + + return { state: {} }; + }; const formatThreshold = (metric: SnapshotMetricType, value: number | number[]) => { const metricFormatter = get(METRIC_FORMATTERS, metric, METRIC_FORMATTERS.count); diff --git a/x-pack/plugins/observability_solution/infra/server/lib/alerting/metric_threshold/register_metric_threshold_rule_type.ts b/x-pack/plugins/observability_solution/infra/server/lib/alerting/metric_threshold/register_metric_threshold_rule_type.ts index 108bf49102393..e7ea693a0e74d 100644 --- a/x-pack/plugins/observability_solution/infra/server/lib/alerting/metric_threshold/register_metric_threshold_rule_type.ts +++ b/x-pack/plugins/observability_solution/infra/server/lib/alerting/metric_threshold/register_metric_threshold_rule_type.ts @@ -11,7 +11,6 @@ import { i18n } from '@kbn/i18n'; import { ActionGroupIdsOf } from '@kbn/alerting-plugin/common'; import { GetViewInAppRelativeUrlFnOpts, - IRuleTypeAlerts, PluginSetupContract, RuleType, } from '@kbn/alerting-plugin/server'; @@ -45,7 +44,6 @@ import { FIRED_ACTIONS, WARNING_ACTIONS, NO_DATA_ACTIONS, - MetricThresholdAlert, } from './metric_threshold_executor'; import { MetricsRulesTypeAlertDefinition } from '../register_rule_types'; import { O11Y_AAD_FIELDS } from '../../../../common/constants'; @@ -199,10 +197,7 @@ export async function registerMetricThresholdRuleType( }, category: DEFAULT_APP_CATEGORIES.observability.id, producer: 'infrastructure', - alerts: { - ...MetricsRulesTypeAlertDefinition, - shouldWrite: true, - } as IRuleTypeAlerts, + alerts: MetricsRulesTypeAlertDefinition, getViewInAppRelativeUrl: ({ rule }: GetViewInAppRelativeUrlFnOpts<{}>) => observabilityPaths.ruleDetails(rule.id), }); diff --git a/x-pack/plugins/observability_solution/infra/server/lib/alerting/register_rule_types.ts b/x-pack/plugins/observability_solution/infra/server/lib/alerting/register_rule_types.ts index c26d92d5291c0..40eb1fb5c3e89 100644 --- a/x-pack/plugins/observability_solution/infra/server/lib/alerting/register_rule_types.ts +++ b/x-pack/plugins/observability_solution/infra/server/lib/alerting/register_rule_types.ts @@ -12,6 +12,7 @@ import { registerInventoryThresholdRuleType } from './inventory_metric_threshold import { registerLogThresholdRuleType } from './log_threshold/register_log_threshold_rule_type'; import { InfraBackendLibs } from '../infra_types'; import type { InfraConfig } from '../../types'; +import { MetricThresholdAlert } from './metric_threshold/metric_threshold_executor'; export const LOGS_RULES_ALERT_CONTEXT = 'observability.logs'; // Defines which alerts-as-data index logs rules will use @@ -24,12 +25,12 @@ export const LogsRulesTypeAlertDefinition: IRuleTypeAlerts = { export const METRICS_RULES_ALERT_CONTEXT = 'observability.metrics'; // Defines which alerts-as-data index metrics rules will use -export const MetricsRulesTypeAlertDefinition: IRuleTypeAlerts = { +export const MetricsRulesTypeAlertDefinition: IRuleTypeAlerts = { context: METRICS_RULES_ALERT_CONTEXT, mappings: { fieldMap: legacyExperimentalFieldMap }, useEcs: true, useLegacyAlerts: true, - shouldWrite: false, + shouldWrite: true, }; const registerRuleTypes = ( diff --git a/x-pack/plugins/observability_solution/observability/common/custom_threshold_rule/get_apm_app_url.ts b/x-pack/plugins/observability_solution/observability/common/custom_threshold_rule/get_apm_app_url.ts new file mode 100644 index 0000000000000..bca653b3d2415 --- /dev/null +++ b/x-pack/plugins/observability_solution/observability/common/custom_threshold_rule/get_apm_app_url.ts @@ -0,0 +1,36 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { LocatorPublic } from '@kbn/share-plugin/common'; +import { SerializableRecord } from '@kbn/utility-types'; + +export const APM_APP_LOCATOR_ID = 'APM_LOCATOR'; + +const getApmLocatorParams = (params: SerializableRecord) => { + return { + serviceName: params.serviceName, + serviceOverviewTab: params.serviceOverviewTab, + query: { + environment: params.environment, + transactionType: params.transactionType, + transactionName: params.transactionName, + rangeFrom: params.rangeFrom, + rangeTo: params.rangeTo, + }, + }; +}; + +export const getApmAppLocator = (baseLocator?: LocatorPublic) => { + if (!baseLocator) return; + + return { + ...baseLocator, + getRedirectUrl: (params: SerializableRecord) => + baseLocator.getRedirectUrl(getApmLocatorParams(params)), + navigate: (params: SerializableRecord) => baseLocator.navigate(getApmLocatorParams(params)), + }; +}; diff --git a/x-pack/plugins/observability_solution/observability/common/custom_threshold_rule/helpers/get_alert_source_links.test.ts b/x-pack/plugins/observability_solution/observability/common/custom_threshold_rule/helpers/get_alert_source_links.test.ts new file mode 100644 index 0000000000000..86e2ddf594904 --- /dev/null +++ b/x-pack/plugins/observability_solution/observability/common/custom_threshold_rule/helpers/get_alert_source_links.test.ts @@ -0,0 +1,186 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { LocatorPublic } from '@kbn/share-plugin/common'; +import { SerializableRecord } from '@kbn/utility-types'; +import { generateSourceLink } from './get_alert_source_links'; + +describe('getAlertSourceLinks', () => { + const apmLocator = { + getRedirectUrl: jest.fn(), + } as unknown as LocatorPublic; + + const prepend = (url: string) => `kibana${url}`; + + const timeRange = { + from: '2023-12-07T16:00:15.403Z', + to: '2023-12-07T21:00:15.403Z', + }; + + const serviceName = 'test-service'; + + beforeEach(() => { + jest.clearAllMocks(); + }); + + it('Should generate correct link for host.name', () => { + const link = generateSourceLink({ field: 'host.name', value: 'host-0' }, timeRange, prepend); + expect(link).toBe( + `kibana/app/metrics/detail/host/host-0?assetDetails=(dateRange:(from:'2023-12-07T16:00:15.403Z',to:'2023-12-07T21:00:15.403Z'))` + ); + }); + + it('Should generate correct link for container.id', () => { + const link = generateSourceLink( + { field: 'container.id', value: 'container-0' }, + timeRange, + prepend + ); + expect(link).toBe( + `kibana/app/metrics/detail/container/container-0?_a=(time:(from:'2023-12-07T16:00:15.403Z',to:'2023-12-07T21:00:15.403Z',interval:>=1m))` + ); + }); + + it('Should generate correct link for kubernetes.pod.id', () => { + const link = generateSourceLink( + { field: 'kubernetes.pod.id', value: 'pod-0' }, + timeRange, + prepend + ); + expect(link).toBe( + `kibana/app/metrics/detail/pod/pod-0?_a=(time:(from:'2023-12-07T16:00:15.403Z',to:'2023-12-07T21:00:15.403Z',interval:>=1m))` + ); + }); + + it('Should generate correct link for cloud.instance.id', () => { + const link = generateSourceLink( + { field: 'cloud.instance.id', value: 'cloud-instance-0' }, + timeRange, + prepend + ); + expect(link).toBe( + `kibana/app/metrics/detail/awsEC2/cloud-instance-0?_a=(time:(from:'2023-12-07T16:00:15.403Z',to:'2023-12-07T21:00:15.403Z',interval:>=1m))` + ); + }); + + it('Should generate correct link for aws.s3.instance.id', () => { + const link = generateSourceLink( + { field: 'aws.s3.instance.id', value: 'aws-s3-instance-0' }, + timeRange, + prepend + ); + expect(link).toBe( + `kibana/app/metrics/detail/awsS3/aws-s3-instance-0?_a=(time:(from:'2023-12-07T16:00:15.403Z',to:'2023-12-07T21:00:15.403Z',interval:>=1m))` + ); + }); + + it('Should generate correct link for aws.rds.instance.id', () => { + const link = generateSourceLink( + { field: 'aws.rds.instance.id', value: 'aws-rds-instance-0' }, + timeRange, + prepend + ); + expect(link).toBe( + `kibana/app/metrics/detail/awsRDS/aws-rds-instance-0?_a=(time:(from:'2023-12-07T16:00:15.403Z',to:'2023-12-07T21:00:15.403Z',interval:>=1m))` + ); + }); + + it('Should generate correct link for aws.sqs.instance.id', () => { + const link = generateSourceLink( + { field: 'aws.sqs.instance.id', value: 'aws-sqs-instance-0' }, + timeRange, + prepend + ); + expect(link).toBe( + `kibana/app/metrics/detail/awsSQS/aws-sqs-instance-0?_a=(time:(from:'2023-12-07T16:00:15.403Z',to:'2023-12-07T21:00:15.403Z',interval:>=1m))` + ); + }); + + it('Should generate correct link for service.name', () => { + generateSourceLink( + { field: 'service.name', value: 'test-service' }, + timeRange, + prepend, + serviceName, + apmLocator + ); + expect(apmLocator.getRedirectUrl).toHaveBeenCalledWith({ + query: { + environment: 'ENVIRONMENT_ALL', + rangeFrom: '2023-12-07T16:00:15.403Z', + rangeTo: '2023-12-07T21:00:15.403Z', + transactionName: undefined, + transactionType: undefined, + }, + serviceName: 'test-service', + serviceOverviewTab: undefined, + }); + }); + + it('Should generate correct link for service.environment', () => { + generateSourceLink( + { field: 'service.environment', value: 'test-env' }, + timeRange, + prepend, + serviceName, + apmLocator + ); + expect(apmLocator.getRedirectUrl).toHaveBeenCalledWith({ + query: { + environment: 'test-env', + rangeFrom: '2023-12-07T16:00:15.403Z', + rangeTo: '2023-12-07T21:00:15.403Z', + transactionName: undefined, + transactionType: undefined, + }, + serviceName: 'test-service', + serviceOverviewTab: undefined, + }); + }); + + it('Should generate correct link for transaction.type', () => { + generateSourceLink( + { field: 'transaction.type', value: 'test-request' }, + timeRange, + prepend, + serviceName, + apmLocator + ); + expect(apmLocator.getRedirectUrl).toHaveBeenCalledWith({ + query: { + environment: 'ENVIRONMENT_ALL', + rangeFrom: '2023-12-07T16:00:15.403Z', + rangeTo: '2023-12-07T21:00:15.403Z', + transactionName: undefined, + transactionType: 'test-request', + }, + serviceName: 'test-service', + serviceOverviewTab: undefined, + }); + }); + + it('Should generate correct link for transaction.name', () => { + generateSourceLink( + { field: 'transaction.name', value: 'test-transaction' }, + timeRange, + prepend, + serviceName, + apmLocator + ); + expect(apmLocator.getRedirectUrl).toHaveBeenCalledWith({ + query: { + environment: 'ENVIRONMENT_ALL', + rangeFrom: '2023-12-07T16:00:15.403Z', + rangeTo: '2023-12-07T21:00:15.403Z', + transactionName: 'test-transaction', + transactionType: undefined, + }, + serviceName: 'test-service', + serviceOverviewTab: 'transactions', + }); + }); +}); diff --git a/x-pack/plugins/observability_solution/observability/common/custom_threshold_rule/helpers/get_alert_source_links.ts b/x-pack/plugins/observability_solution/observability/common/custom_threshold_rule/helpers/get_alert_source_links.ts new file mode 100644 index 0000000000000..ef30e6394ccb2 --- /dev/null +++ b/x-pack/plugins/observability_solution/observability/common/custom_threshold_rule/helpers/get_alert_source_links.ts @@ -0,0 +1,117 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { + SERVICE_ENVIRONMENT, + SERVICE_NAME, + TRANSACTION_NAME, + TRANSACTION_TYPE, +} from '@kbn/observability-shared-plugin/common'; +import { LocatorPublic } from '@kbn/share-plugin/common'; +import { SerializableRecord } from '@kbn/utility-types'; +import { getApmAppLocator } from '../get_apm_app_url'; +import { Group, TimeRange } from '../types'; + +const HOST_NAME = 'host.name'; +const CONTAINER_ID = 'container.id'; +const KUBERNETES_POD_ID = 'kubernetes.pod.id'; +const AWS_EC2_INSTANCE = 'cloud.instance.id'; +const AWS_S3_BUCKET = 'aws.s3.instance.id'; +const AWS_RDS_DATABASES = 'aws.rds.instance.id'; +const AWS_SQS_QUEUE = 'aws.sqs.instance.id'; + +const METRICS_DETAILS_PATH = '/app/metrics/detail'; + +const infraSources = [ + HOST_NAME, + CONTAINER_ID, + KUBERNETES_POD_ID, + AWS_EC2_INSTANCE, + AWS_S3_BUCKET, + AWS_RDS_DATABASES, + AWS_SQS_QUEUE, +]; + +const apmSources = [SERVICE_NAME, SERVICE_ENVIRONMENT, TRANSACTION_TYPE, TRANSACTION_NAME]; + +const infraSourceLinks: Record = { + [HOST_NAME]: `${METRICS_DETAILS_PATH}/host`, + [CONTAINER_ID]: `${METRICS_DETAILS_PATH}/container`, + [KUBERNETES_POD_ID]: `${METRICS_DETAILS_PATH}/pod`, + [AWS_EC2_INSTANCE]: `${METRICS_DETAILS_PATH}/awsEC2`, + [AWS_S3_BUCKET]: `${METRICS_DETAILS_PATH}/awsS3`, + [AWS_RDS_DATABASES]: `${METRICS_DETAILS_PATH}/awsRDS`, + [AWS_SQS_QUEUE]: `${METRICS_DETAILS_PATH}/awsSQS`, +}; + +const generateInfraSourceLink = ( + { field, value }: Group, + hostTimeRange: string, + infraTimeRange: string +) => { + const link = + field === HOST_NAME + ? `${infraSourceLinks[field]}/${value}?${hostTimeRange}` + : `${infraSourceLinks[field]}/${value}?${infraTimeRange}`; + + return link; +}; + +const generateApmSourceLink = ( + { field, value }: Group, + timeRange: TimeRange, + serviceName?: string, + baseLocator?: LocatorPublic +) => { + if (!serviceName) { + return undefined; + } + + let apmLocatorPayload: SerializableRecord = { + serviceName, + environment: 'ENVIRONMENT_ALL', + rangeFrom: timeRange.from, + rangeTo: timeRange.to, + }; + + if (field === TRANSACTION_NAME) { + apmLocatorPayload = { + ...apmLocatorPayload, + serviceOverviewTab: 'transactions', + transactionName: value, + }; + } else if (field === TRANSACTION_TYPE) { + apmLocatorPayload = { + ...apmLocatorPayload, + transactionType: value, + }; + } else if (field === SERVICE_ENVIRONMENT) { + apmLocatorPayload = { + ...apmLocatorPayload, + environment: value, + }; + } + + const apmAppLocator = getApmAppLocator(baseLocator); + return apmAppLocator?.getRedirectUrl(apmLocatorPayload); +}; + +export const generateSourceLink = ( + { field, value }: Group, + timeRange: TimeRange, + prepend?: (url: string) => string, + serviceName?: string, + baseLocator?: LocatorPublic +) => { + if (infraSources.includes(field)) { + const hostTimeRange = `assetDetails=(dateRange:(from:'${timeRange.from}',to:'${timeRange.to}'))`; + const infraTimeRange = `_a=(time:(from:'${timeRange.from}',to:'${timeRange.to}',interval:>=1m))`; + return prepend?.(generateInfraSourceLink({ field, value }, hostTimeRange, infraTimeRange)); + } else if (apmSources.includes(field)) { + return generateApmSourceLink({ field, value }, timeRange, serviceName, baseLocator); + } +}; diff --git a/x-pack/plugins/observability_solution/observability/common/custom_threshold_rule/types.ts b/x-pack/plugins/observability_solution/observability/common/custom_threshold_rule/types.ts index 73a3e1959169e..78221a307e989 100644 --- a/x-pack/plugins/observability_solution/observability/common/custom_threshold_rule/types.ts +++ b/x-pack/plugins/observability_solution/observability/common/custom_threshold_rule/types.ts @@ -116,6 +116,11 @@ export interface Group { value: string; } +export interface TimeRange { + from?: string; + to?: string; +} + export interface SearchConfigurationType { index: SerializedSearchSourceFields; query: { @@ -138,7 +143,7 @@ export interface SearchConfigurationWithExtractedReferenceType { // Custom threshold alert types // Alert fields['kibana.alert.group] type -export type GroupBy = Array<{ field: string; value: string }>; +export type GroupBy = Group[]; /* * Utils diff --git a/x-pack/plugins/observability_solution/observability/public/components/custom_threshold/components/alert_details_app_section/__snapshots__/alert_details_app_section.test.tsx.snap b/x-pack/plugins/observability_solution/observability/public/components/custom_threshold/components/alert_details_app_section/__snapshots__/alert_details_app_section.test.tsx.snap index 24a7545443fda..efa0222912f4f 100644 --- a/x-pack/plugins/observability_solution/observability/public/components/custom_threshold/components/alert_details_app_section/__snapshots__/alert_details_app_section.test.tsx.snap +++ b/x-pack/plugins/observability_solution/observability/public/components/custom_threshold/components/alert_details_app_section/__snapshots__/alert_details_app_section.test.tsx.snap @@ -66,8 +66,8 @@ Array [ }, }, "timeRange": Object { - "from": "2023-03-28T10:43:13.802Z", - "to": "2023-03-29T13:14:09.581Z", + "from": "now-15m", + "to": "now", }, }, Object {}, diff --git a/x-pack/plugins/observability_solution/observability/public/components/custom_threshold/components/alert_details_app_section/alert_details_app_section.test.tsx b/x-pack/plugins/observability_solution/observability/public/components/custom_threshold/components/alert_details_app_section/alert_details_app_section.test.tsx index fe61d56cfb9bd..95a9ec179f0ef 100644 --- a/x-pack/plugins/observability_solution/observability/public/components/custom_threshold/components/alert_details_app_section/alert_details_app_section.test.tsx +++ b/x-pack/plugins/observability_solution/observability/public/components/custom_threshold/components/alert_details_app_section/alert_details_app_section.test.tsx @@ -64,6 +64,15 @@ jest.mock('../../../../utils/kibana_react', () => ({ data: { search: jest.fn(), }, + share: { + url: { + locators: { + get: jest + .fn() + .mockReturnValue({ getRedirectUrl: jest.fn().mockReturnValue('/view-in-app-url') }), + }, + }, + }, }, }), })); @@ -105,19 +114,34 @@ describe('AlertDetailsAppSection', () => { it('should render alert summary fields', async () => { renderComponent(); - expect(mockedSetAlertSummaryFields).toBeCalledTimes(1); + expect(mockedSetAlertSummaryFields).toBeCalledTimes(2); expect(mockedSetAlertSummaryFields).toBeCalledWith([ { label: 'Source', value: ( - + + + + + View related logs + + + ), }, { @@ -139,7 +163,7 @@ describe('AlertDetailsAppSection', () => { const alertFields = { tags: [], 'kibana.alert.group': undefined }; renderComponent({}, alertFields); - expect(mockedSetAlertSummaryFields).toBeCalledTimes(1); + expect(mockedSetAlertSummaryFields).toBeCalledTimes(2); expect(mockedSetAlertSummaryFields).toBeCalledWith([ { label: 'Rule', diff --git a/x-pack/plugins/observability_solution/observability/public/components/custom_threshold/components/alert_details_app_section/alert_details_app_section.tsx b/x-pack/plugins/observability_solution/observability/public/components/custom_threshold/components/alert_details_app_section/alert_details_app_section.tsx index 764a634caafbf..2797cd0e25daf 100644 --- a/x-pack/plugins/observability_solution/observability/public/components/custom_threshold/components/alert_details_app_section/alert_details_app_section.tsx +++ b/x-pack/plugins/observability_solution/observability/public/components/custom_threshold/components/alert_details_app_section/alert_details_app_section.tsx @@ -37,6 +37,8 @@ import type { RangeEventAnnotationConfig, } from '@kbn/event-annotation-common'; import moment from 'moment'; +import { LOGS_EXPLORER_LOCATOR_ID, LogsExplorerLocatorParams } from '@kbn/deeplinks-observability'; +import { TimeRange } from '@kbn/es-query'; import { AlertHistoryChart } from './alert_history'; import { useLicense } from '../../../../hooks/use_license'; import { useKibana } from '../../../../utils/kibana_react'; @@ -51,6 +53,8 @@ import { LogRateAnalysis } from './log_rate_analysis'; import { Groups } from './groups'; import { Tags } from './tags'; import { RuleConditionChart } from '../rule_condition_chart/rule_condition_chart'; +import { getViewInAppUrl } from '../../../../../common/custom_threshold_rule/get_view_in_app_url'; +import { SearchConfigurationWithExtractedReferenceType } from '../../../../../common/custom_threshold_rule/types'; interface AppSectionProps { alert: CustomThresholdAlert; @@ -105,19 +109,26 @@ export default function AlertDetailsAppSection({ setAlertSummaryFields, }: AppSectionProps) { const services = useKibana().services; - const { charts, data } = services; + const { + charts, + data, + share: { + url: { locators }, + }, + } = services; const { hasAtLeast } = useLicense(); const { euiTheme } = useEuiTheme(); const hasLogRateAnalysisLicense = hasAtLeast('platinum'); const [dataView, setDataView] = useState(); const [, setDataViewError] = useState(); + const [viewInAppUrl, setViewInAppUrl] = useState(); + const [timeRange, setTimeRange] = useState({ from: 'now-15m', to: 'now' }); const ruleParams = rule.params as RuleTypeParams & AlertParams; const chartProps = { baseTheme: charts.theme.useChartsBaseTheme(), }; const alertStart = alert.fields[ALERT_START]; const alertEnd = alert.fields[ALERT_END]; - const timeRange = getPaddedAlertTimeRange(alertStart!, alertEnd); const groups = alert.fields[ALERT_GROUP]; const tags = alert.fields[TAGS]; @@ -154,6 +165,25 @@ export default function AlertDetailsAppSection({ const annotations: EventAnnotationConfig[] = []; annotations.push(alertStartAnnotation, alertRangeAnnotation); + useEffect(() => { + setTimeRange(getPaddedAlertTimeRange(alertStart!, alertEnd)); + }, [alertStart, alertEnd]); + + useEffect(() => { + const appUrl = getViewInAppUrl({ + dataViewId: dataView?.id, + groups, + logsExplorerLocator: locators.get(LOGS_EXPLORER_LOCATOR_ID), + metrics: ruleParams.criteria[0]?.metrics, + searchConfiguration: + ruleParams.searchConfiguration as SearchConfigurationWithExtractedReferenceType, + startedAt: alertStart, + endedAt: alertEnd, + }); + + setViewInAppUrl(appUrl); + }, [dataView, alertStart, alertEnd, groups, ruleParams, locators]); + useEffect(() => { const alertSummaryFields = []; if (groups) { @@ -164,7 +194,28 @@ export default function AlertDetailsAppSection({ defaultMessage: 'Source', } ), - value: , + value: ( + <> + + + + {i18n.translate( + 'xpack.observability.alertDetailsAppSection.a.viewRelatedLogsLabel', + { + defaultMessage: 'View related logs', + } + )} + + + + ), }); } if (tags && tags.length > 0) { @@ -193,7 +244,7 @@ export default function AlertDetailsAppSection({ }); setAlertSummaryFields(alertSummaryFields); - }, [groups, tags, rule, ruleLink, setAlertSummaryFields]); + }, [groups, tags, rule, ruleLink, setAlertSummaryFields, timeRange, alertEnd, viewInAppUrl]); useEffect(() => { const initDataView = async () => { diff --git a/x-pack/plugins/observability_solution/observability/public/components/custom_threshold/components/alert_details_app_section/groups.tsx b/x-pack/plugins/observability_solution/observability/public/components/custom_threshold/components/alert_details_app_section/groups.tsx index c68fa2a391448..b818fb737c2ee 100644 --- a/x-pack/plugins/observability_solution/observability/public/components/custom_threshold/components/alert_details_app_section/groups.tsx +++ b/x-pack/plugins/observability_solution/observability/public/components/custom_threshold/components/alert_details_app_section/groups.tsx @@ -5,16 +5,68 @@ * 2.0. */ -import React from 'react'; +import { EuiLink } from '@elastic/eui'; +import React, { useEffect, useState } from 'react'; +import { SERVICE_NAME } from '@kbn/observability-shared-plugin/common'; +import { useKibana } from '../../../../utils/kibana_react'; +import { TimeRange, Group } from '../../../../../common/custom_threshold_rule/types'; +import { generateSourceLink } from '../../../../../common/custom_threshold_rule/helpers/get_alert_source_links'; +import { APM_APP_LOCATOR_ID } from '../../../../../common/custom_threshold_rule/get_apm_app_url'; + +export function Groups({ groups, timeRange }: { groups: Group[]; timeRange: TimeRange }) { + const { + http: { + basePath: { prepend }, + }, + share: { + url: { locators }, + }, + } = useKibana().services; + + const [sourceLinks, setSourceLinks] = useState>({}); + + const serviceName = groups.find((group) => group.field === SERVICE_NAME)?.value; + + useEffect(() => { + if (!groups) return; + + let links: Record = {}; + + groups.map((group) => { + const link = generateSourceLink( + group, + timeRange, + prepend, + serviceName, + locators.get(APM_APP_LOCATOR_ID) + ); + links = { + ...links, + [group.field]: link, + }; + }); + + setSourceLinks(links); + }, [groups, locators, prepend, serviceName, timeRange]); -export function Groups({ groups }: { groups: Array<{ field: string; value: string }> }) { return ( <> {groups && groups.map((group) => { return ( - {group.field}: {group.value} + {group.field}:{' '} + {sourceLinks[group.field] ? ( + + {group.value} + + ) : ( + {group.value} + )}
); diff --git a/x-pack/plugins/observability_solution/observability/public/components/custom_threshold/types.ts b/x-pack/plugins/observability_solution/observability/public/components/custom_threshold/types.ts index e748637bb380d..0c345cf0a9720 100644 --- a/x-pack/plugins/observability_solution/observability/public/components/custom_threshold/types.ts +++ b/x-pack/plugins/observability_solution/observability/public/components/custom_threshold/types.ts @@ -49,11 +49,6 @@ export type MetricExpression = Omit ({ __esModule: true, useKibana: jest.fn(() => mockUseKibanaReturnValue), })); - +const prependMock = jest.fn().mockImplementation((args) => args); +mockUseKibanaReturnValue.services.http.basePath.prepend = prependMock; jest.mock('@kbn/triggers-actions-ui-plugin/public/common/lib/kibana/kibana_react', () => ({ useKibana: jest.fn(() => ({ services: { @@ -71,6 +72,17 @@ const config = { }, } as ConfigSchema; +const getFormatterMock = jest.fn(); +const createRuleTypeRegistryMock = () => ({ + getFormatter: getFormatterMock, + registerFormatter: () => {}, + list: () => ['ruleType1', 'ruleType2'], +}); + +export const createObservabilityRuleTypeRegistryMock = () => + createRuleTypeRegistryMock() as ObservabilityRuleTypeRegistry & + ReturnType; + jest.spyOn(pluginContext, 'usePluginContext').mockImplementation(() => ({ appMountParameters: {} as AppMountParameters, core: {} as CoreStart, @@ -84,6 +96,7 @@ jest.spyOn(pluginContext, 'usePluginContext').mockImplementation(() => ({ describe('ObservabilityActions component', () => { beforeEach(() => { jest.clearAllMocks(); + getFormatterMock.mockReturnValue(jest.fn().mockReturnValue('a reason')); }); const setup = async (pageId: string) => { @@ -214,4 +227,26 @@ describe('ObservabilityActions component', () => { 0 ); }); + + it('should show a valid url when clicking "View in app"', async () => { + getFormatterMock.mockReturnValue( + jest.fn().mockReturnValue({ + reason: 'a reason', + link: 'http://localhost:5620/app/o11y/log-explorer', + hasBasePath: false, + }) + ); + const wrapper = await setup(RULE_DETAILS_PAGE_ID); + + expect( + wrapper.find('[data-test-subj="o11yAlertActionsButton"]').first().getElement().props + ).toEqual(expect.objectContaining({ href: 'http://localhost:5620/app/o11y/log-explorer' })); + + prependMock.mockClear(); + + await waitFor(() => { + wrapper.find('[data-test-subj="o11yAlertActionsButton"]').first().simulate('mouseOver'); + expect(prependMock).toBeCalledTimes(1); + }); + }); }); diff --git a/x-pack/plugins/observability_solution/observability/public/pages/alerts/components/alert_actions.tsx b/x-pack/plugins/observability_solution/observability/public/pages/alerts/components/alert_actions.tsx index 2c840babd21ef..c98cb0d82a44c 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/alerts/components/alert_actions.tsx +++ b/x-pack/plugins/observability_solution/observability/public/pages/alerts/components/alert_actions.tsx @@ -90,7 +90,17 @@ export function AlertActions({ } else { setViewInAppUrl(alertLink); } - }, [observabilityAlert.hasBasePath, observabilityAlert.link, prepend]); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []); + + const handleViewInAppUrl = useCallback(() => { + const alertLink = observabilityAlert.link as unknown as string; + if (!observabilityAlert.hasBasePath) { + setViewInAppUrl(prepend(alertLink ?? '')); + } else { + setViewInAppUrl(alertLink); + } + }, [observabilityAlert.link, observabilityAlert.hasBasePath, prepend]); const [isPopoverOpen, setIsPopoverOpen] = useState(false); @@ -201,6 +211,7 @@ export function AlertActions({ defaultMessage: 'View in app', })} color="text" + onMouseOver={handleViewInAppUrl} href={viewInAppUrl} iconType="eye" size="s" diff --git a/x-pack/plugins/observability_solution/observability/public/pages/rule_details/rule_details.tsx b/x-pack/plugins/observability_solution/observability/public/pages/rule_details/rule_details.tsx index 90ed7866a1560..23d93b35ad330 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/rule_details/rule_details.tsx +++ b/x-pack/plugins/observability_solution/observability/public/pages/rule_details/rule_details.tsx @@ -9,7 +9,7 @@ import React, { useState, useEffect, useRef } from 'react'; import { useParams, useLocation } from 'react-router-dom'; import { EuiSpacer, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { ALERTS_FEATURE_ID, RuleExecutionStatusErrorReasons } from '@kbn/alerting-plugin/common'; +import { ALERTING_FEATURE_ID, RuleExecutionStatusErrorReasons } from '@kbn/alerting-plugin/common'; import type { BoolQuery } from '@kbn/es-query'; import type { AlertConsumers } from '@kbn/rule-data-utils'; import { useBreadcrumbs } from '@kbn/observability-shared-plugin/public'; @@ -186,7 +186,7 @@ export function RuleDetailsPage() { const isEditable = isRuleEditable({ capabilities, rule, ruleType, ruleTypeRegistry }); const featureIds = - rule?.consumer === ALERTS_FEATURE_ID && ruleType?.producer + rule?.consumer === ALERTING_FEATURE_ID && ruleType?.producer ? [ruleType.producer as AlertConsumers] : rule ? [rule.consumer as AlertConsumers] diff --git a/x-pack/plugins/observability_solution/observability/public/pages/rules/rules.test.tsx b/x-pack/plugins/observability_solution/observability/public/pages/rules/rules.test.tsx index b7652dbe3422a..9fe1f6030d239 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/rules/rules.test.tsx +++ b/x-pack/plugins/observability_solution/observability/public/pages/rules/rules.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { ALERTS_FEATURE_ID } from '@kbn/alerting-plugin/common'; +import { ALERTING_FEATURE_ID } from '@kbn/alerting-plugin/common'; import { AppMountParameters, CoreStart } from '@kbn/core/public'; import { __IntlProvider as IntlProvider } from '@kbn/i18n-react'; import { observabilityAIAssistantPluginMock } from '@kbn/observability-ai-assistant-plugin/public/mock'; @@ -85,10 +85,10 @@ describe('RulesPage with all capabilities', () => { recoveryActionGroup: { id: 'recovered', name: 'Recovered' }, actionVariables: { context: [], state: [] }, defaultActionGroupId: 'default', - producer: ALERTS_FEATURE_ID, + producer: ALERTING_FEATURE_ID, minimumLicenseRequired: 'basic', authorizedConsumers: { - [ALERTS_FEATURE_ID]: { all: true }, + [ALERTING_FEATURE_ID]: { all: true }, }, ruleTaskTimeout: '1m', }, @@ -100,10 +100,10 @@ describe('RulesPage with all capabilities', () => { recoveryActionGroup: { id: 'recovered', name: 'Recovered' }, actionVariables: { context: [], state: [] }, defaultActionGroupId: 'default', - producer: ALERTS_FEATURE_ID, + producer: ALERTING_FEATURE_ID, minimumLicenseRequired: 'basic', authorizedConsumers: { - [ALERTS_FEATURE_ID]: { all: true }, + [ALERTING_FEATURE_ID]: { all: true }, }, ruleTaskTimeout: '1m', }, @@ -115,10 +115,10 @@ describe('RulesPage with all capabilities', () => { recoveryActionGroup: { id: 'recovered', name: 'Recovered' }, actionVariables: { context: [], state: [] }, defaultActionGroupId: 'default', - producer: ALERTS_FEATURE_ID, + producer: ALERTING_FEATURE_ID, minimumLicenseRequired: 'basic', authorizedConsumers: { - [ALERTS_FEATURE_ID]: { all: true }, + [ALERTING_FEATURE_ID]: { all: true }, }, ruleTaskTimeout: '1m', }, @@ -166,10 +166,10 @@ describe('RulesPage with show only capability', () => { recoveryActionGroup: { id: 'recovered', name: 'Recovered' }, actionVariables: { context: [], state: [] }, defaultActionGroupId: 'default', - producer: ALERTS_FEATURE_ID, + producer: ALERTING_FEATURE_ID, minimumLicenseRequired: 'basic', authorizedConsumers: { - [ALERTS_FEATURE_ID]: { read: true, all: false }, + [ALERTING_FEATURE_ID]: { read: true, all: false }, }, ruleTaskTimeout: '1m', }, @@ -179,10 +179,10 @@ describe('RulesPage with show only capability', () => { recoveryActionGroup: { id: 'recovered', name: 'Recovered' }, actionVariables: { context: [], state: [] }, defaultActionGroupId: 'default', - producer: ALERTS_FEATURE_ID, + producer: ALERTING_FEATURE_ID, minimumLicenseRequired: 'basic', authorizedConsumers: { - [ALERTS_FEATURE_ID]: { read: true, all: false }, + [ALERTING_FEATURE_ID]: { read: true, all: false }, }, ruleTaskTimeout: '1m', id: '2', @@ -196,10 +196,10 @@ describe('RulesPage with show only capability', () => { recoveryActionGroup: { id: 'recovered', name: 'Recovered' }, actionVariables: { context: [], state: [] }, defaultActionGroupId: 'default', - producer: ALERTS_FEATURE_ID, + producer: ALERTING_FEATURE_ID, minimumLicenseRequired: 'basic', authorizedConsumers: { - [ALERTS_FEATURE_ID]: { read: true, all: false }, + [ALERTING_FEATURE_ID]: { read: true, all: false }, }, ruleTaskTimeout: '1m', }, diff --git a/x-pack/plugins/observability_solution/observability/public/pages/rules/rules.tsx b/x-pack/plugins/observability_solution/observability/public/pages/rules/rules.tsx index 1b8d20d580d30..e15818e8ea3ae 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/rules/rules.tsx +++ b/x-pack/plugins/observability_solution/observability/public/pages/rules/rules.tsx @@ -6,7 +6,7 @@ */ import { EuiButton, EuiButtonEmpty, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; -import { ALERTS_FEATURE_ID } from '@kbn/alerting-plugin/common'; +import { ALERTING_FEATURE_ID } from '@kbn/alerting-plugin/common'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import { useBreadcrumbs } from '@kbn/observability-shared-plugin/public'; @@ -64,7 +64,7 @@ export function RulesPage({ activeTab = RULES_TAB_NAME }: RulesPageProps) { const authorizedRuleTypes = [...ruleTypes.values()]; const authorizedToCreateAnyRules = authorizedRuleTypes.some( - (ruleType) => ruleType.authorizedConsumers[ALERTS_FEATURE_ID]?.all + (ruleType) => ruleType.authorizedConsumers[ALERTING_FEATURE_ID]?.all ); const tabs = [ @@ -143,7 +143,7 @@ export function RulesPage({ activeTab = RULES_TAB_NAME }: RulesPageProps) { {addRuleFlyoutVisibility && ( { messages, persist: false, signal: new AbortController().signal, + responseLanguage: 'orcish', ...params, }, requestCallback diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/public/service/complete.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/public/service/complete.ts index 812d486317b57..e979d7b7c910b 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/public/service/complete.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/public/service/complete.ts @@ -44,6 +44,7 @@ export function complete( messages: initialMessages, persist, signal, + responseLanguage, }: { client: Pick; getScreenContexts: () => ObservabilityAIAssistantScreenContext[]; @@ -52,6 +53,7 @@ export function complete( messages: Message[]; persist: boolean; signal: AbortSignal; + responseLanguage: string; }, requestCallback: ( params: ObservabilityAIAssistantAPIClientRequestParamsOf<'POST /internal/observability_ai_assistant/chat/complete'> @@ -63,7 +65,14 @@ export function complete( const response$ = requestCallback({ params: { - body: { connectorId, messages: initialMessages, persist, screenContexts, conversationId }, + body: { + connectorId, + messages: initialMessages, + persist, + screenContexts, + conversationId, + responseLanguage, + }, }, }).pipe( filter( @@ -134,6 +143,7 @@ export function complete( messages: initialMessages.concat(nextMessages), signal, persist, + responseLanguage, }, requestCallback ).subscribe(subscriber); diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/public/service/create_chat_service.test.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/public/service/create_chat_service.test.ts index 2a333d742c5ec..22dee179720ca 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/public/service/create_chat_service.test.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/public/service/create_chat_service.test.ts @@ -33,56 +33,55 @@ async function getConcatenatedMessage( } describe('createChatService', () => { - describe('chat', () => { - let service: ObservabilityAIAssistantChatService; - - const clientSpy = jest.fn(); - - function respondWithChunks({ chunks, status = 200 }: { status?: number; chunks: string[] }) { - const response = { - response: { - status, - body: new ReadableStream({ - start(controller) { - chunks.forEach((chunk) => { - controller.enqueue(new TextEncoder().encode(chunk)); - }); - controller.close(); - }, - }), - }, + let service: ObservabilityAIAssistantChatService; + const clientSpy = jest.fn(); + + function respondWithChunks({ chunks, status = 200 }: { status?: number; chunks: string[] }) { + const response = { + response: { + status, + body: new ReadableStream({ + start(controller) { + chunks.forEach((chunk) => { + controller.enqueue(new TextEncoder().encode(chunk)); + }); + controller.close(); + }, + }), + }, + }; + + clientSpy.mockResolvedValueOnce(response); + } + + beforeEach(async () => { + clientSpy.mockImplementationOnce(async () => { + return { + functionDefinitions: [], + contextDefinitions: [], }; + }); + service = await createChatService({ + analytics: { + optIn: () => {}, + reportEvent: () => {}, + telemetryCounter$: new Observable(), + }, + apiClient: clientSpy, + registrations: [], + signal: new AbortController().signal, + }); + }); - clientSpy.mockResolvedValueOnce(response); - } + afterEach(() => { + clientSpy.mockReset(); + }); + describe('chat', () => { function chat({ signal }: { signal: AbortSignal } = { signal: new AbortController().signal }) { return service.chat('my_test', { signal, messages: [], connectorId: '' }); } - beforeEach(async () => { - clientSpy.mockImplementationOnce(async () => { - return { - functionDefinitions: [], - contextDefinitions: [], - }; - }); - service = await createChatService({ - analytics: { - optIn: () => {}, - reportEvent: () => {}, - telemetryCounter$: new Observable(), - }, - apiClient: clientSpy, - registrations: [], - signal: new AbortController().signal, - }); - }); - - afterEach(() => { - clientSpy.mockReset(); - }); - it('correctly parses a stream of JSON lines', async () => { const chunk1 = '{"id":"my-id","type":"chatCompletionChunk","message":{"content":"My"}}\n{"id":"my-id","type":"chatCompletionChunk","message":{"content":" new"}}'; @@ -230,4 +229,37 @@ describe('createChatService', () => { ).rejects.toEqual(expect.any(AbortError)); }); }); + + describe('complete', () => { + it("sends the user's preferred response language to the API", async () => { + respondWithChunks({ + chunks: [ + '{"id":"my-id","type":"chatCompletionChunk","message":{"content":"Some message"}}', + ], + }); + + const response$ = service.complete({ + connectorId: '', + getScreenContexts: () => [], + messages: [], + persist: false, + signal: new AbortController().signal, + responseLanguage: 'orcish', + }); + + await getConcatenatedMessage(response$); + + expect(clientSpy).toHaveBeenNthCalledWith( + 2, + 'POST /internal/observability_ai_assistant/chat/complete', + expect.objectContaining({ + params: expect.objectContaining({ + body: expect.objectContaining({ + responseLanguage: 'orcish', + }), + }), + }) + ); + }); + }); }); diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/public/service/create_chat_service.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/public/service/create_chat_service.ts index c92d2f7b3daf9..3b94b29bd0d32 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/public/service/create_chat_service.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/public/service/create_chat_service.ts @@ -199,7 +199,15 @@ export async function createChatService({ shareReplay() ); }, - complete({ getScreenContexts, connectorId, conversationId, messages, persist, signal }) { + complete({ + getScreenContexts, + connectorId, + conversationId, + messages, + persist, + signal, + responseLanguage, + }) { return complete( { getScreenContexts, @@ -209,6 +217,7 @@ export async function createChatService({ persist, signal, client, + responseLanguage, }, ({ params }) => { return from( diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/functions/context.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/functions/context.ts index 422c0287e15d7..7db8f63e273f9 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/functions/context.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/functions/context.ts @@ -216,7 +216,7 @@ async function scoreSuggestions({ const newUserMessageContent = dedent(`Given the following question, score the documents that are relevant to the question. on a scale from 0 to 7, - 0 being completely relevant, and 7 being extremely relevant. Information is relevant to the question if it helps in + 0 being completely irrelevant, and 7 being extremely relevant. Information is relevant to the question if it helps in answering the question. Judge it according to the following criteria: - The document is relevant to the question, and the rest of the conversation diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/functions/get_dataset_info.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/functions/get_dataset_info.ts index de3ada6d5f029..e810b669d73f4 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/functions/get_dataset_info.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/functions/get_dataset_info.ts @@ -99,7 +99,6 @@ export function registerGetDatasetInfoFunction({ return (field.esTypes ?? [field.type]).map((type) => { return { name: field.name, - description: field.customLabel || '', type, }; }); diff --git a/x-pack/plugins/observability_solution/synthetics/common/rules/alert_actions.ts b/x-pack/plugins/observability_solution/synthetics/common/rules/alert_actions.ts index 02402c8eed944..3a11325d78b1a 100644 --- a/x-pack/plugins/observability_solution/synthetics/common/rules/alert_actions.ts +++ b/x-pack/plugins/observability_solution/synthetics/common/rules/alert_actions.ts @@ -240,6 +240,7 @@ function getJiraActionParams({ defaultActionMessage }: Translations): JiraAction priority: '2', labels: null, parent: null, + otherFields: null, }, comments: [], }, diff --git a/x-pack/plugins/observability_solution/synthetics/kibana.jsonc b/x-pack/plugins/observability_solution/synthetics/kibana.jsonc index ac894c024e5cd..6a5ce0209da2e 100644 --- a/x-pack/plugins/observability_solution/synthetics/kibana.jsonc +++ b/x-pack/plugins/observability_solution/synthetics/kibana.jsonc @@ -42,7 +42,8 @@ "ml", "serverless", "spaces", - "telemetry" + "telemetry", + "licenseManagement" ], "requiredBundles": [ "data", diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/hooks/use_synthetics_priviliges.test.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/hooks/use_synthetics_priviliges.test.tsx new file mode 100644 index 0000000000000..7d496b3940da8 --- /dev/null +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/hooks/use_synthetics_priviliges.test.tsx @@ -0,0 +1,57 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { renderHook } from '@testing-library/react-hooks'; +import React from 'react'; +import { render, WrappedHelper } from '../utils/testing'; +import { useSyntheticsPrivileges } from './use_synthetics_priviliges'; + +jest.mock('../../../hooks/use_capabilities', () => ({ + useCanReadSyntheticsIndex: jest.fn().mockReturnValue({ canRead: true, loading: false }), +})); + +jest.mock('react-redux', () => { + const actual = jest.requireActual('react-redux'); + return { + ...actual, + useSelector: jest.fn().mockReturnValue({ error: { body: { message: 'License not active' } } }), + }; +}); + +function wrapper({ children }: { children: React.ReactElement }) { + return {children}; +} + +describe('useSyntheticsPrivileges', () => { + it.each([ + [true, null], + [false, ''], + ])( + 'should correctly set the disabled prop of the license nav button if `licenseManagement` enabled is %s', + (enabled, expectedDisabledAttribute) => { + const { + result: { current }, + } = renderHook(() => useSyntheticsPrivileges(), { wrapper }); + + expect(current).not.toBeUndefined(); + + const { getByLabelText } = render(current!, { + core: { + licenseManagement: { enabled }, + }, + }); + + const licenseNavButton = getByLabelText('Navigate to license management'); + + expect(licenseNavButton); + + // there should only be an href if the license management is enabled, otherwise we render a disabled button with no handler + expect(!!licenseNavButton.getAttribute('href')).toEqual(enabled); + expect(licenseNavButton.getAttribute('disabled')).toEqual(expectedDisabledAttribute); + } + ); +}); diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/hooks/use_synthetics_priviliges.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/hooks/use_synthetics_priviliges.tsx index 812b540eea3ae..3de71d4470fdf 100644 --- a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/hooks/use_synthetics_priviliges.tsx +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/hooks/use_synthetics_priviliges.tsx @@ -16,6 +16,7 @@ import { EuiMarkdownFormat, } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; +import { useKibana } from '@kbn/kibana-react-plugin/public'; import { css } from '@emotion/react'; import { i18n } from '@kbn/i18n'; import { selectOverviewStatus } from '../state/overview_status'; @@ -27,6 +28,7 @@ import { SYNTHETICS_INDEX_PATTERN, } from '../../../../common/constants'; import { useSyntheticsSettingsContext } from '../contexts'; +import { ClientPluginsStart } from '../../../plugin'; export const useSyntheticsPrivileges = () => { const { canRead: canReadSyntheticsIndex, loading: isCanReadLoading } = @@ -107,7 +109,11 @@ const Unprivileged = ({ unprivilegedIndices }: { unprivilegedIndices: string[] } ); const LicenseExpired = () => { + const licenseManagementEnabled = + useKibana().services.licenseManagement?.enabled; + const { basePath } = useSyntheticsSettingsContext(); + return ( { } actions={[ {i18n.translate('xpack.synthetics.invalidLicense.licenseManagementLink', { diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/routes.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/routes.tsx index 154ad7e35c82f..69e077ae82e7e 100644 --- a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/routes.tsx +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/routes.tsx @@ -188,7 +188,7 @@ export const PageRouter: FC = () => { apiService.addInspectorRequest = addInspectorRequest; - const isUnPrivileged = useSyntheticsPrivileges(); + const isUnprivileged = useSyntheticsPrivileges(); return ( @@ -205,12 +205,12 @@ export const PageRouter: FC = () => {
- {isUnPrivileged || } + {isUnprivileged || }
diff --git a/x-pack/plugins/observability_solution/synthetics/public/plugin.ts b/x-pack/plugins/observability_solution/synthetics/public/plugin.ts index d4758952e63fe..88d0071ef1f13 100644 --- a/x-pack/plugins/observability_solution/synthetics/public/plugin.ts +++ b/x-pack/plugins/observability_solution/synthetics/public/plugin.ts @@ -50,6 +50,7 @@ import type { ObservabilitySharedPluginSetup, ObservabilitySharedPluginStart, } from '@kbn/observability-shared-plugin/public'; +import { LicenseManagementUIPluginSetup } from '@kbn/license-management-plugin/public/plugin'; import { ObservabilityAIAssistantPublicSetup, ObservabilityAIAssistantPublicStart, @@ -100,6 +101,7 @@ export interface ClientPluginsStart { uiSettings: CoreStart['uiSettings']; usageCollection: UsageCollectionStart; serverless: ServerlessPluginStart; + licenseManagement?: LicenseManagementUIPluginSetup; } export interface UptimePluginServices extends Partial { diff --git a/x-pack/plugins/observability_solution/synthetics/server/plugin.ts b/x-pack/plugins/observability_solution/synthetics/server/plugin.ts index e35ea0f9549bc..76ac2afcf102b 100644 --- a/x-pack/plugins/observability_solution/synthetics/server/plugin.ts +++ b/x-pack/plugins/observability_solution/synthetics/server/plugin.ts @@ -34,16 +34,14 @@ import { uptimeRuleTypeFieldMap } from './alert_rules/common'; export class Plugin implements PluginType { private savedObjectsClient?: SavedObjectsClientContract; - private initContext: PluginInitializerContext; - private logger: Logger; + private readonly logger: Logger; private server?: SyntheticsServerSetup; private syntheticsService?: SyntheticsService; private syntheticsMonitorClient?: SyntheticsMonitorClient; private readonly telemetryEventsSender: TelemetryEventsSender; - constructor(initializerContext: PluginInitializerContext) { - this.initContext = initializerContext; - this.logger = initializerContext.logger.get(); + constructor(private readonly initContext: PluginInitializerContext) { + this.logger = initContext.logger.get(); this.telemetryEventsSender = new TelemetryEventsSender(this.logger); } @@ -52,7 +50,6 @@ export class Plugin implements PluginType { savedObjectsAdapter.config = config; - this.logger = this.initContext.logger.get(); const { ruleDataService } = plugins.ruleRegistry; const ruleDataClient = ruleDataService.initializeIndex({ @@ -110,6 +107,7 @@ export class Plugin implements PluginType { this.server.encryptedSavedObjects = pluginsStart.encryptedSavedObjects; this.server.savedObjectsClient = this.savedObjectsClient; this.server.spaces = pluginsStart.spaces; + this.server.isElasticsearchServerless = coreStart.elasticsearch.getCapabilities().serverless; } this.syntheticsService?.start(pluginsStart.taskManager); diff --git a/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/authentication/check_has_privilege.ts b/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/authentication/check_has_privilege.ts index 17286ac368276..06be332e41df5 100644 --- a/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/authentication/check_has_privilege.ts +++ b/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/authentication/check_has_privilege.ts @@ -9,24 +9,25 @@ import { SecurityIndexPrivilege } from '@elastic/elasticsearch/lib/api/types'; import { UptimeEsClient } from '../../lib'; import { SyntheticsServerSetup } from '../../types'; import { getFakeKibanaRequest } from '../utils/fake_kibana_request'; -import { serviceApiKeyPrivileges, syntheticsIndex } from '../get_api_key'; +import { getServiceApiKeyPrivileges, syntheticsIndex } from '../get_api_key'; -export const checkHasPrivileges = async ( +export const checkHasPrivileges = ( server: SyntheticsServerSetup, apiKey: { id: string; apiKey: string } ) => { - return await server.coreStart.elasticsearch.client + const { indices: index, cluster } = getServiceApiKeyPrivileges(server.isElasticsearchServerless); + return server.coreStart.elasticsearch.client .asScoped(getFakeKibanaRequest({ id: apiKey.id, api_key: apiKey.apiKey })) .asCurrentUser.security.hasPrivileges({ body: { - index: serviceApiKeyPrivileges.indices, - cluster: serviceApiKeyPrivileges.cluster, + index, + cluster, }, }); }; -export const checkIndicesReadPrivileges = async (uptimeEsClient: UptimeEsClient) => { - return await uptimeEsClient.baseESClient.security.hasPrivileges({ +export const checkIndicesReadPrivileges = (uptimeEsClient: UptimeEsClient) => { + return uptimeEsClient.baseESClient.security.hasPrivileges({ body: { index: [ { diff --git a/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/get_api_key.test.ts b/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/get_api_key.test.ts index 172888435d338..e8ce91ec6268d 100644 --- a/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/get_api_key.test.ts +++ b/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/get_api_key.test.ts @@ -5,7 +5,11 @@ * 2.0. */ -import { getAPIKeyForSyntheticsService, syntheticsIndex } from './get_api_key'; +import { + getAPIKeyForSyntheticsService, + getServiceApiKeyPrivileges, + syntheticsIndex, +} from './get_api_key'; import { encryptedSavedObjectsMock } from '@kbn/encrypted-saved-objects-plugin/server/mocks'; import { securityMock } from '@kbn/security-plugin/server/mocks'; import { coreMock } from '@kbn/core/server/mocks'; @@ -84,6 +88,18 @@ describe('getAPIKeyTest', function () { ); }); + it.each([ + [true, ['monitor', 'read_pipeline']], + [false, ['monitor', 'read_pipeline', 'read_ilm']], + ])( + 'Includes/excludes `read_ilm` priv when serverless is mode is %s', + (isServerlessEs, expectedClusterPrivs) => { + const { cluster } = getServiceApiKeyPrivileges(isServerlessEs); + + expect(cluster).toEqual(expectedClusterPrivs); + } + ); + it('invalidates api keys with missing read permissions', async () => { jest.spyOn(authUtils, 'checkHasPrivileges').mockResolvedValue({ index: { diff --git a/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/get_api_key.ts b/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/get_api_key.ts index ec62eb2c80555..66ecf0aff2deb 100644 --- a/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/get_api_key.ts +++ b/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/get_api_key.ts @@ -19,20 +19,24 @@ import { checkHasPrivileges } from './authentication/check_has_privilege'; export const syntheticsIndex = 'synthetics-*'; -export const serviceApiKeyPrivileges = { - cluster: ['monitor', 'read_ilm', 'read_pipeline'] as SecurityClusterPrivilege[], - indices: [ - { - names: [syntheticsIndex], - privileges: [ - 'view_index_metadata', - 'create_doc', - 'auto_configure', - 'read', - ] as SecurityIndexPrivilege[], - }, - ], - run_as: [], +export const getServiceApiKeyPrivileges = (isServerlessEs: boolean) => { + const cluster: SecurityClusterPrivilege[] = ['monitor', 'read_pipeline']; + if (isServerlessEs === false) cluster.push('read_ilm'); + return { + cluster, + indices: [ + { + names: [syntheticsIndex], + privileges: [ + 'view_index_metadata', + 'create_doc', + 'auto_configure', + 'read', + ] as SecurityIndexPrivilege[], + }, + ], + run_as: [], + }; }; export const getAPIKeyForSyntheticsService = async ({ @@ -84,7 +88,7 @@ export const generateAPIKey = async ({ server: SyntheticsServerSetup; request: KibanaRequest; }) => { - const { security } = server; + const { isElasticsearchServerless, security } = server; const isApiKeysEnabled = await security.authc.apiKeys?.areAPIKeysEnabled(); if (!isApiKeysEnabled) { @@ -100,7 +104,7 @@ export const generateAPIKey = async ({ return security.authc.apiKeys?.grantAsInternalUser(request, { name: 'synthetics-api-key (required for Synthetics App)', role_descriptors: { - synthetics_writer: serviceApiKeyPrivileges, + synthetics_writer: getServiceApiKeyPrivileges(isElasticsearchServerless), }, metadata: { description: @@ -202,16 +206,16 @@ export const getSyntheticsEnablement = async ({ server }: { server: SyntheticsSe }; }; -const hasEnablePermissions = async ({ uptimeEsClient }: SyntheticsServerSetup) => { +const hasEnablePermissions = async ({ + uptimeEsClient, + isElasticsearchServerless, +}: SyntheticsServerSetup) => { + const { cluster: clusterPrivs, indices: index } = + getServiceApiKeyPrivileges(isElasticsearchServerless); const hasPrivileges = await uptimeEsClient.baseESClient.security.hasPrivileges({ body: { - cluster: [ - 'manage_security', - 'manage_api_key', - 'manage_own_api_key', - ...serviceApiKeyPrivileges.cluster, - ], - index: serviceApiKeyPrivileges.indices, + cluster: ['manage_security', 'manage_api_key', 'manage_own_api_key', ...clusterPrivs], + index, }, }); @@ -221,7 +225,9 @@ const hasEnablePermissions = async ({ uptimeEsClient }: SyntheticsServerSetup) = manage_api_key: manageApiKey, manage_own_api_key: manageOwnApiKey, monitor, - read_ilm: readILM, + // `read_ilm` is going to be `undefined` when ES is in serverless mode, + // so we default it to the ES capabilities value. + read_ilm: readILM = isElasticsearchServerless, read_pipeline: readPipeline, } = cluster || {}; diff --git a/x-pack/plugins/observability_solution/synthetics/server/types.ts b/x-pack/plugins/observability_solution/synthetics/server/types.ts index a14cf6dcd72c1..9bfab3c676d7f 100644 --- a/x-pack/plugins/observability_solution/synthetics/server/types.ts +++ b/x-pack/plugins/observability_solution/synthetics/server/types.ts @@ -59,6 +59,7 @@ export interface SyntheticsServerSetup { isDev?: boolean; coreStart: CoreStart; pluginsStart: SyntheticsPluginsStartDependencies; + isElasticsearchServerless: boolean; } export interface SyntheticsPluginsSetupDependencies { diff --git a/x-pack/plugins/observability_solution/synthetics/tsconfig.json b/x-pack/plugins/observability_solution/synthetics/tsconfig.json index 9e1f64d07acea..2c2b2a11f08c9 100644 --- a/x-pack/plugins/observability_solution/synthetics/tsconfig.json +++ b/x-pack/plugins/observability_solution/synthetics/tsconfig.json @@ -84,7 +84,8 @@ "@kbn/code-editor-mock", "@kbn/serverless", "@kbn/repo-info", - "@kbn/index-management-plugin" + "@kbn/index-management-plugin", + "@kbn/license-management-plugin" ], "exclude": ["target/**/*"] } diff --git a/x-pack/plugins/observability_solution/uptime/common/rules/alert_actions.ts b/x-pack/plugins/observability_solution/uptime/common/rules/alert_actions.ts index d0232bddea632..007a49be1ba81 100644 --- a/x-pack/plugins/observability_solution/uptime/common/rules/alert_actions.ts +++ b/x-pack/plugins/observability_solution/uptime/common/rules/alert_actions.ts @@ -232,6 +232,7 @@ function getJiraActionParams({ defaultActionMessage }: Translations): JiraAction priority: '2', labels: null, parent: null, + otherFields: null, }, comments: [], }, diff --git a/x-pack/plugins/remote_clusters/public/application/sections/components/remote_cluster_setup_trust/remote_cluster_setup_trust.tsx b/x-pack/plugins/remote_clusters/public/application/sections/components/remote_cluster_setup_trust/remote_cluster_setup_trust.tsx index b1531425f1bca..399e49fc8fc3f 100644 --- a/x-pack/plugins/remote_clusters/public/application/sections/components/remote_cluster_setup_trust/remote_cluster_setup_trust.tsx +++ b/x-pack/plugins/remote_clusters/public/application/sections/components/remote_cluster_setup_trust/remote_cluster_setup_trust.tsx @@ -29,10 +29,6 @@ const i18nTexts = { 'xpack.remoteClusters.clusterWizard.trustStep.setupWithApiKeys.title', { defaultMessage: 'API keys' } ), - apiKeyBadge: i18n.translate( - 'xpack.remoteClusters.clusterWizard.trustStep.setupWithApiKeys.badge', - { defaultMessage: 'BETA' } - ), apiKeyDescription: i18n.translate( 'xpack.remoteClusters.clusterWizard.trustStep.setupWithApiKeys.description', { @@ -90,7 +86,6 @@ export const RemoteClusterSetupTrust = ({ onBack, onSubmit, isSaving }: Props) = diff --git a/x-pack/plugins/reporting/README.md b/x-pack/plugins/reporting/README.md index c0c28c5c6fcd5..f9d6fe4e3db40 100644 --- a/x-pack/plugins/reporting/README.md +++ b/x-pack/plugins/reporting/README.md @@ -5,7 +5,7 @@ An awesome Kibana reporting plugin ## csv_searchsource. This is the endpoint used in the Discover UI. It must be replaced by csv_v2 at some point, when we have more capacity in reporting. https://github.com/elastic/kibana/issues/151190 ## csv_searchsource_immediate. -This should be deprecated. It is historically a customer driven endpoint. This will be replaced in the UI with an async export option in the future. +This is deprecated. This export type provides users with the means to download a CSV export of a saved search without creating a report. It is only available to users when `xpack.reporting.csv.enablePanelActionDownload` is set to `true` in kibana.yml. The default is `false`, which provides users with the means to generate a normal CSV report. ## csv_v2. This new endpoint is designed to have a more automation-friendly signature. It will replace csv_searchsource in the UI at some point, when there is more capacity in reporting. It will need a little more work to have parity: it needs to be able to export "unsaved" searches. diff --git a/x-pack/plugins/reporting/public/management/__test__/report_listing.test.helpers.tsx b/x-pack/plugins/reporting/public/management/__test__/report_listing.test.helpers.tsx index 4c31c55540d80..97c5fae9cc5aa 100644 --- a/x-pack/plugins/reporting/public/management/__test__/report_listing.test.helpers.tsx +++ b/x-pack/plugins/reporting/public/management/__test__/report_listing.test.helpers.tsx @@ -5,33 +5,34 @@ * 2.0. */ -import React from 'react'; -import { registerTestBed } from '@kbn/test-jest-helpers'; -import { act } from 'react-dom/test-utils'; -import { Observable } from 'rxjs'; -import { SerializableRecord } from '@kbn/utility-types'; - import type { NotificationsSetup } from '@kbn/core/public'; import { applicationServiceMock, + coreMock, httpServiceMock, notificationServiceMock, - coreMock, } from '@kbn/core/public/mocks'; - import type { DataPublicPluginStart } from '@kbn/data-plugin/public'; -import type { LocatorPublic, SharePluginSetup, SharePluginStart } from '@kbn/share-plugin/public'; -import type { ILicense } from '@kbn/licensing-plugin/public'; import { dataPluginMock } from '@kbn/data-plugin/public/mocks'; +import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; +import type { ILicense } from '@kbn/licensing-plugin/public'; +import { + ClientConfigType, + InternalApiClientProvider, + Job, + ReportingAPIClient, +} from '@kbn/reporting-public'; +import type { LocatorPublic, SharePluginSetup, SharePluginStart } from '@kbn/share-plugin/public'; import { sharePluginMock } from '@kbn/share-plugin/public/mocks'; +import { registerTestBed } from '@kbn/test-jest-helpers'; +import { SerializableRecord } from '@kbn/utility-types'; +import React from 'react'; +import { act } from 'react-dom/test-utils'; +import { Observable } from 'rxjs'; -import { InternalApiClientProvider, Job, ReportingAPIClient } from '@kbn/reporting-public'; -import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; +import { ListingProps as Props, ReportListing } from '..'; import { mockJobs } from '../../../common/test'; - import { IlmPolicyStatusContextProvider } from '../../lib/ilm_policy_status_context'; - -import { ListingProps as Props, ReportListing } from '..'; import { ReportDiagnostic } from '../components'; export interface TestDependencies { @@ -48,18 +49,15 @@ export interface TestDependencies { share: SharePluginStart; } -export const mockConfig = { +export const mockConfig: ClientConfigType = { csv: { scroll: { duration: '10m', size: 500, }, + enablePanelActionDownload: false, }, poll: { - jobCompletionNotifier: { - interval: 5000, - intervalErrorMultiplier: 3, - }, jobsRefresh: { interval: 5000, intervalErrorMultiplier: 3, diff --git a/x-pack/plugins/reporting/public/plugin.ts b/x-pack/plugins/reporting/public/plugin.ts index 872bf42a9c943..f7dfbc0999f34 100644 --- a/x-pack/plugins/reporting/public/plugin.ts +++ b/x-pack/plugins/reporting/public/plugin.ts @@ -193,7 +193,13 @@ export class ReportingPublicPlugin uiActionsSetup.addTriggerAction( CONTEXT_MENU_TRIGGER, - new ReportingCsvPanelAction({ core, apiClient, startServices$, usesUiCapabilities }) + new ReportingCsvPanelAction({ + core, + apiClient, + startServices$, + usesUiCapabilities, + csvConfig: this.config.csv, + }) ); const reportingStart = this.getContract(core); diff --git a/x-pack/plugins/reporting/server/config/index.ts b/x-pack/plugins/reporting/server/config/index.ts index a012715fa47f1..59f60f35cb717 100644 --- a/x-pack/plugins/reporting/server/config/index.ts +++ b/x-pack/plugins/reporting/server/config/index.ts @@ -13,7 +13,10 @@ import { ConfigSchema, ReportingConfigType } from '@kbn/reporting-server'; export const config: PluginConfigDescriptor = { exposeToBrowser: { - csv: { scroll: true }, + csv: { + enablePanelActionDownload: true, + scroll: true, + }, poll: true, roles: true, export_types: true, diff --git a/x-pack/plugins/reporting/server/core.ts b/x-pack/plugins/reporting/server/core.ts index 3d4276d60e4fa..02f42086dc468 100644 --- a/x-pack/plugins/reporting/server/core.ts +++ b/x-pack/plugins/reporting/server/core.ts @@ -418,6 +418,10 @@ export class ReportingCore { return new ReportingEventLogger(report, task); } + /** + * @deprecated + * Requires `xpack.reporting.csv.enablePanelActionDownload` set to `true` (default is false) + */ public async getCsvSearchSourceImmediate() { const startDeps = await this.getPluginStartDeps(); diff --git a/x-pack/plugins/reporting/server/routes/index.ts b/x-pack/plugins/reporting/server/routes/index.ts index f0ce70e00d6bd..750cd0d5cd6fb 100644 --- a/x-pack/plugins/reporting/server/routes/index.ts +++ b/x-pack/plugins/reporting/server/routes/index.ts @@ -18,9 +18,14 @@ import { registerJobInfoRoutesPublic } from './public/jobs'; export function registerRoutes(reporting: ReportingCore, logger: Logger) { registerDeprecationsRoutes(reporting, logger); registerDiagnosticRoutes(reporting, logger); - registerGenerateCsvFromSavedObjectImmediate(reporting, logger); registerGenerationRoutesInternal(reporting, logger); registerJobInfoRoutesInternal(reporting); registerGenerationRoutesPublic(reporting, logger); registerJobInfoRoutesPublic(reporting); + + // (deprecated) allow users to download CSV without generating a report + const config = reporting.getConfig(); + if (config.csv.enablePanelActionDownload) { + registerGenerateCsvFromSavedObjectImmediate(reporting, logger); + } } diff --git a/x-pack/plugins/search_playground/README.md b/x-pack/plugins/search_playground/README.md new file mode 100644 index 0000000000000..a5f76ad957509 --- /dev/null +++ b/x-pack/plugins/search_playground/README.md @@ -0,0 +1,3 @@ +# Search Playground + +The Search Playground is a tool for developers to experiment with their own data using LLMs. diff --git a/x-pack/plugins/search_playground/__mocks__/fetch_query_source_fields.mock.ts b/x-pack/plugins/search_playground/__mocks__/fetch_query_source_fields.mock.ts new file mode 100644 index 0000000000000..21acf3b60f7ab --- /dev/null +++ b/x-pack/plugins/search_playground/__mocks__/fetch_query_source_fields.mock.ts @@ -0,0 +1,300 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +export const ELSER_PASSAGE_CHUNKED_TWO_INDICES_DOCS = [ + { + _index: 'workplace_index', + _id: '248629d8-64d7-4e91-a4eb-dbd8282d9f24', + _score: 1, + _ignored: ['metadata.summary.keyword', 'text.keyword'], + _source: { + metadata: { + summary: 'This policy', + rolePermissions: ['demo', 'manager'], + name: 'Work From Home Policy', + }, + vector: { + tokens: {}, + model_id: '.elser_model_2', + }, + text: 'Effective: March 2020', + }, + }, + { + _index: 'workplace_index2', + _id: 'b047762c-24eb-4846-aeb5-808346d54c54', + _score: 1, + _ignored: ['content.keyword', 'metadata.summary.keyword'], + _source: { + metadata: { + summary: + 'This policy outlines the guidelines for full-time remote work, including eligibility, equipment and resources, workspace requirements, communication expectations, performance expectations, time tracking and overtime, confidentiality and data security, health and well-being, and policy reviews and updates. Employees are encouraged to direct any questions or concerns', + rolePermissions: ['demo', 'manager'], + name: 'Work From Home Policy', + }, + content: 'Effective', + content_vector: { + tokens: {}, + model_id: '.elser_model_2', + }, + }, + }, +]; + +export const ELSER_PASSAGE_CHUNKED_TWO_INDICES = { + indices: ['workplace_index', 'workplace_index2'], + fields: { + 'vector.tokens': { + rank_features: { + type: 'rank_features', + metadata_field: false, + searchable: true, + aggregatable: false, + indices: ['workplace_index'], + }, + unmapped: { + type: 'unmapped', + metadata_field: false, + searchable: false, + aggregatable: false, + indices: ['workplace_index2'], + }, + }, + metadata: { + object: { + type: 'object', + metadata_field: false, + searchable: false, + aggregatable: false, + }, + }, + 'metadata.rolePermissions.keyword': { + keyword: { + type: 'keyword', + metadata_field: false, + searchable: true, + aggregatable: true, + }, + }, + 'metadata.name.keyword': { + keyword: { + type: 'keyword', + metadata_field: false, + searchable: true, + aggregatable: true, + }, + }, + 'metadata.summary': { + text: { + type: 'text', + metadata_field: false, + searchable: true, + aggregatable: false, + }, + }, + 'content_vector.tokens': { + rank_features: { + type: 'rank_features', + metadata_field: false, + searchable: true, + aggregatable: false, + indices: ['workplace_index2'], + }, + unmapped: { + type: 'unmapped', + metadata_field: false, + searchable: false, + aggregatable: false, + indices: ['workplace_index'], + }, + }, + content: { + unmapped: { + type: 'unmapped', + metadata_field: false, + searchable: false, + aggregatable: false, + indices: ['workplace_index'], + }, + text: { + type: 'text', + metadata_field: false, + searchable: true, + aggregatable: false, + indices: ['workplace_index2'], + }, + }, + 'vector.model_id': { + unmapped: { + type: 'unmapped', + metadata_field: false, + searchable: false, + aggregatable: false, + indices: ['workplace_index2'], + }, + text: { + type: 'text', + metadata_field: false, + searchable: true, + aggregatable: false, + indices: ['workplace_index'], + }, + }, + 'content.keyword': { + keyword: { + type: 'keyword', + metadata_field: false, + searchable: true, + aggregatable: true, + indices: ['workplace_index2'], + }, + unmapped: { + type: 'unmapped', + metadata_field: false, + searchable: false, + aggregatable: false, + indices: ['workplace_index'], + }, + }, + 'content_vector.model_id.keyword': { + keyword: { + type: 'keyword', + metadata_field: false, + searchable: true, + aggregatable: true, + indices: ['workplace_index2'], + }, + unmapped: { + type: 'unmapped', + metadata_field: false, + searchable: false, + aggregatable: false, + indices: ['workplace_index'], + }, + }, + 'metadata.summary.keyword': { + keyword: { + type: 'keyword', + metadata_field: false, + searchable: true, + aggregatable: true, + }, + }, + 'vector.model_id.keyword': { + keyword: { + type: 'keyword', + metadata_field: false, + searchable: true, + aggregatable: true, + indices: ['workplace_index'], + }, + unmapped: { + type: 'unmapped', + metadata_field: false, + searchable: false, + aggregatable: false, + indices: ['workplace_index2'], + }, + }, + content_vector: { + unmapped: { + type: 'unmapped', + metadata_field: false, + searchable: false, + aggregatable: false, + indices: ['workplace_index'], + }, + object: { + type: 'object', + metadata_field: false, + searchable: false, + aggregatable: false, + indices: ['workplace_index2'], + }, + }, + 'metadata.rolePermissions': { + text: { + type: 'text', + metadata_field: false, + searchable: true, + aggregatable: false, + }, + }, + 'content_vector.model_id': { + unmapped: { + type: 'unmapped', + metadata_field: false, + searchable: false, + aggregatable: false, + indices: ['workplace_index'], + }, + text: { + type: 'text', + metadata_field: false, + searchable: true, + aggregatable: false, + indices: ['workplace_index2'], + }, + }, + vector: { + unmapped: { + type: 'unmapped', + metadata_field: false, + searchable: false, + aggregatable: false, + indices: ['workplace_index2'], + }, + object: { + type: 'object', + metadata_field: false, + searchable: false, + aggregatable: false, + indices: ['workplace_index'], + }, + }, + 'text.keyword': { + keyword: { + type: 'keyword', + metadata_field: false, + searchable: true, + aggregatable: true, + indices: ['workplace_index'], + }, + unmapped: { + type: 'unmapped', + metadata_field: false, + searchable: false, + aggregatable: false, + indices: ['workplace_index2'], + }, + }, + text: { + unmapped: { + type: 'unmapped', + metadata_field: false, + searchable: false, + aggregatable: false, + indices: ['workplace_index2'], + }, + text: { + type: 'text', + metadata_field: false, + searchable: true, + aggregatable: false, + indices: ['workplace_index'], + }, + }, + 'metadata.name': { + text: { + type: 'text', + metadata_field: false, + searchable: true, + aggregatable: false, + }, + }, + }, +}; diff --git a/x-pack/plugins/search_playground/__mocks__/search_playground_mock.ts b/x-pack/plugins/search_playground/__mocks__/search_playground_mock.ts new file mode 100644 index 0000000000000..471d02ee9a468 --- /dev/null +++ b/x-pack/plugins/search_playground/__mocks__/search_playground_mock.ts @@ -0,0 +1,24 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { SearchPlaygroundPluginStart } from '../public'; + +export type Start = jest.Mocked; + +const createStartMock = (): Start => { + const startContract: Start = { + PlaygroundProvider: jest.fn(), + PlaygroundToolbar: jest.fn(), + Playground: jest.fn(), + }; + + return startContract; +}; + +export const searchPlaygroundMock = { + createStart: createStartMock, +}; diff --git a/x-pack/plugins/search_playground/common/index.ts b/x-pack/plugins/search_playground/common/index.ts new file mode 100644 index 0000000000000..5d1ac311112a7 --- /dev/null +++ b/x-pack/plugins/search_playground/common/index.ts @@ -0,0 +1,9 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +export const PLUGIN_ID = 'searchPlayground'; +export const PLUGIN_NAME = 'Playground'; diff --git a/x-pack/plugins/search_playground/common/types.ts b/x-pack/plugins/search_playground/common/types.ts new file mode 100644 index 0000000000000..145ddf085df24 --- /dev/null +++ b/x-pack/plugins/search_playground/common/types.ts @@ -0,0 +1,27 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +export type IndicesQuerySourceFields = Record; + +interface ModelFields { + field: string; + model_id: string; + nested: boolean; +} + +export interface QuerySourceFields { + elser_query_fields: ModelFields[]; + dense_vector_query_fields: ModelFields[]; + bm25_query_fields: string[]; + source_fields: string[]; +} + +export enum APIRoutes { + POST_API_KEY = '/internal/search_playground/api_key', + POST_CHAT_MESSAGE = '/internal/search_playground/chat', + POST_QUERY_SOURCE_FIELDS = '/internal/search_playground/query_source_fields', +} diff --git a/x-pack/plugins/search_playground/jest.config.js b/x-pack/plugins/search_playground/jest.config.js new file mode 100644 index 0000000000000..d23d0d55128b5 --- /dev/null +++ b/x-pack/plugins/search_playground/jest.config.js @@ -0,0 +1,15 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +module.exports = { + preset: '@kbn/test', + rootDir: '../../..', + roots: ['/x-pack/plugins/search_playground'], + coverageDirectory: '/target/kibana-coverage/jest/x-pack/plugins/search_playground', + coverageReporters: ['text', 'html'], + collectCoverageFrom: ['/x-pack/plugins/search_playground/{public,server}/**/*.{ts,tsx}'], +}; diff --git a/x-pack/plugins/search_playground/kibana.jsonc b/x-pack/plugins/search_playground/kibana.jsonc new file mode 100644 index 0000000000000..61f4cd97c1507 --- /dev/null +++ b/x-pack/plugins/search_playground/kibana.jsonc @@ -0,0 +1,21 @@ +{ + "type": "plugin", + "id": "@kbn/search-playground", + "owner": "@elastic/enterprise-search-frontend", + "plugin": { + "id": "searchPlayground", + "server": true, + "browser": true, + "configPath": [ + "xpack", + "searchPlayground" + ], + "requiredPlugins": [ + "navigation", + "security" + ], + "requiredBundles": [ + "kibanaReact" + ] + } +} diff --git a/x-pack/plugins/search_playground/public/application.tsx b/x-pack/plugins/search_playground/public/application.tsx new file mode 100644 index 0000000000000..e78028f01d51a --- /dev/null +++ b/x-pack/plugins/search_playground/public/application.tsx @@ -0,0 +1,61 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import ReactDOM from 'react-dom'; +import { CoreStart, AppMountParameters } from '@kbn/core/public'; +import { KibanaThemeProvider } from '@kbn/react-kibana-context-theme'; +import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; +import { I18nProvider } from '@kbn/i18n-react'; +import { BrowserRouter as Router } from '@kbn/shared-ux-router'; +import { i18n } from '@kbn/i18n'; +import { KibanaPageTemplate } from '@kbn/shared-ux-page-kibana-template'; +import { PLUGIN_ID } from '../common'; +import { AppPluginStartDependencies } from './types'; +import { App } from './components/app'; +import { PlaygroundProvider } from './providers/playground_provider'; + +export const renderApp = ( + core: CoreStart, + services: AppPluginStartDependencies, + { appBasePath, element }: AppMountParameters +) => { + const navigation = services.navigation; + + ReactDOM.render( + + + + + + + + + + + + + + , + element + ); + + return () => ReactDOM.unmountComponentAtNode(element); +}; diff --git a/x-pack/plugins/search_playground/public/components/app.tsx b/x-pack/plugins/search_playground/public/components/app.tsx new file mode 100644 index 0000000000000..0c6f900e3a32f --- /dev/null +++ b/x-pack/plugins/search_playground/public/components/app.tsx @@ -0,0 +1,29 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import { KibanaPageTemplate } from '@kbn/shared-ux-page-kibana-template'; + +import { Chat } from './chat'; + +export const App: React.FC = () => { + return ( + + + + ); +}; diff --git a/x-pack/plugins/search_playground/public/components/chat.tsx b/x-pack/plugins/search_playground/public/components/chat.tsx new file mode 100644 index 0000000000000..17df8d0e652a1 --- /dev/null +++ b/x-pack/plugins/search_playground/public/components/chat.tsx @@ -0,0 +1,175 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { useMemo, useState } from 'react'; +import { Controller, useFormContext } from 'react-hook-form'; +import { + EuiButtonIcon, + EuiFlexGroup, + EuiFlexItem, + EuiForm, + EuiHorizontalRule, + EuiSpacer, + useEuiTheme, +} from '@elastic/eui'; +import { v4 as uuidv4 } from 'uuid'; + +import { i18n } from '@kbn/i18n'; + +import { useAutoBottomScroll } from '../hooks/use_auto_bottom_scroll'; +import { ChatSidebar } from './chat_sidebar'; +import { useChat } from '../hooks/use_chat'; +import { ChatForm, ChatFormFields, MessageRole, SummarizationModelName } from '../types'; + +import { MessageList } from './message_list/message_list'; +import { QuestionInput } from './question_input'; +import { StartNewChat } from './start_new_chat'; + +import { TelegramIcon } from './telegram_icon'; +import { transformFromChatMessages } from '../utils/transform_to_messages'; + +export const Chat = () => { + const [showStartPage, setShowStartPage] = useState(true); + const { euiTheme } = useEuiTheme(); + const { + control, + watch, + formState: { isValid, isSubmitting }, + resetField, + handleSubmit, + } = useFormContext(); + const { messages, append, stop: stopRequest } = useChat(); + const selectedIndicesCount = watch(ChatFormFields.indices, []).length; + const messagesRef = useAutoBottomScroll([showStartPage]); + + const onSubmit = async (data: ChatForm) => { + await append( + { content: data.question, role: MessageRole.user, createdAt: new Date() }, + { + data: { + prompt: data[ChatFormFields.prompt], + indices: data[ChatFormFields.indices].join(), + api_key: data[ChatFormFields.openAIKey], + citations: data[ChatFormFields.citations], + elasticsearchQuery: JSON.stringify(data[ChatFormFields.elasticsearchQuery]), + summarization_model: + data[ChatFormFields.summarizationModel] ?? SummarizationModelName.gpt3_5_turbo_1106, + }, + } + ); + + resetField(ChatFormFields.question); + }; + const chatMessages = useMemo( + () => [ + { + id: uuidv4(), + role: MessageRole.system, + content: 'You can start chat now', + }, + ...transformFromChatMessages(messages), + ], + [messages] + ); + + if (showStartPage) { + return setShowStartPage(false)} />; + } + + return ( + + + + + {/* // Set scroll at the border of parent element*/} + + + + + + + + + + !!rule?.trim(), + }} + render={({ field }) => ( + + ) : ( + + ) + } + /> + )} + /> + + + + + + + + + + ); +}; diff --git a/x-pack/plugins/search_playground/public/components/chat_sidebar.tsx b/x-pack/plugins/search_playground/public/components/chat_sidebar.tsx new file mode 100644 index 0000000000000..d26aaaa58e93a --- /dev/null +++ b/x-pack/plugins/search_playground/public/components/chat_sidebar.tsx @@ -0,0 +1,88 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { + EuiAccordion, + EuiFlexGroup, + EuiFlexItem, + EuiSpacer, + EuiText, + EuiTitle, + useEuiTheme, + useGeneratedHtmlId, +} from '@elastic/eui'; +import React, { useState } from 'react'; +import { i18n } from '@kbn/i18n'; +import { SourcesPanelSidebar } from './sources_panel/sources_panel_sidebar'; +import { SummarizationPanel } from './summarization_panel/summarization_panel'; + +interface ChatSidebarProps { + selectedIndicesCount: number; +} + +export const ChatSidebar: React.FC = ({ selectedIndicesCount }) => { + const { euiTheme } = useEuiTheme(); + const accordions = [ + { + id: useGeneratedHtmlId({ prefix: 'summarizationAccordion' }), + title: i18n.translate('xpack.searchPlayground.sidebar.summarizationTitle', { + defaultMessage: 'Summarization', + }), + children: , + }, + { + id: useGeneratedHtmlId({ prefix: 'sourcesAccordion' }), + title: i18n.translate('xpack.searchPlayground.sidebar.sourceTitle', { + defaultMessage: 'Sources', + }), + extraAction: !!selectedIndicesCount && ( + +

+ {i18n.translate('xpack.searchPlayground.sidebar.sourceIndicesCount', { + defaultMessage: '{count, number} {count, plural, one {Index} other {Indices}}', + values: { count: Number(selectedIndicesCount) }, + })} +

+
+ ), + children: , + }, + ]; + const [openAccordionId, setOpenAccordionId] = useState(accordions[0].id); + + return ( + + {accordions.map(({ id, title, extraAction, children }, index) => ( + + +
{title}
+ + } + extraAction={extraAction} + buttonProps={{ paddingSize: 'l' }} + forceState={openAccordionId === id ? 'open' : 'closed'} + onToggle={() => setOpenAccordionId(openAccordionId === id ? '' : id)} + > + {children} + +
+
+ ))} +
+ ); +}; diff --git a/x-pack/plugins/search_playground/public/components/message_list/assistant_message.tsx b/x-pack/plugins/search_playground/public/components/message_list/assistant_message.tsx new file mode 100644 index 0000000000000..b917205999ba7 --- /dev/null +++ b/x-pack/plugins/search_playground/public/components/message_list/assistant_message.tsx @@ -0,0 +1,145 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { useState } from 'react'; + +import moment from 'moment'; + +import { + EuiButtonEmpty, + EuiComment, + EuiFlexGroup, + EuiSpacer, + EuiText, + EuiTitle, +} from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; + +import { FormattedMessage } from '@kbn/i18n-react'; +import { RetrievalDocsFlyout } from './retrieval_docs_flyout'; +import type { AIMessage as AIMessageType } from '../../types'; + +import { CopyActionButton } from './copy_action_button'; +import { CitationsTable } from './citations_table'; + +type AssistantMessageProps = Pick< + AIMessageType, + 'content' | 'createdAt' | 'citations' | 'retrievalDocs' +>; + +export const AssistantMessage: React.FC = ({ + content, + createdAt, + citations, + retrievalDocs, +}) => { + const [isDocsFlyoutOpen, setIsDocsFlyoutOpen] = useState(false); + const username = i18n.translate('xpack.searchPlayground.chat.message.assistant.username', { + defaultMessage: 'AI', + }); + + return ( + <> + {!!retrievalDocs?.length && ( + + +

+ +

+
+ setIsDocsFlyoutOpen(true)} + > + + + + {isDocsFlyoutOpen && ( + setIsDocsFlyoutOpen(false)} + retrievalDocs={retrievalDocs} + /> + )} + + } + /> + )} + + } + > + + +

+ +

+
+
+ + +

{content}

+
+ {!!citations?.length && ( + <> + + +

+ +

+
+ + + + )} +
+ + ); +}; diff --git a/x-pack/plugins/search_playground/public/components/message_list/citations_table.tsx b/x-pack/plugins/search_playground/public/components/message_list/citations_table.tsx new file mode 100644 index 0000000000000..dbc9cc5e95ff9 --- /dev/null +++ b/x-pack/plugins/search_playground/public/components/message_list/citations_table.tsx @@ -0,0 +1,69 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { useState } from 'react'; +import { i18n } from '@kbn/i18n'; +import { EuiBasicTable, EuiButtonEmpty, EuiText } from '@elastic/eui'; +import { AIMessage as AIMessageType, Doc } from '../../types'; + +type CitationsTableProps = Pick; + +export const CitationsTable: React.FC = ({ citations }) => { + const [itemIdToExpandedRowMap, setItemIdToExpandedRowMap] = useState< + Record + >({}); + const toggleDetails = (citation: Doc) => { + const itemIdToExpandedRowMapValues = { ...itemIdToExpandedRowMap }; + + if (itemIdToExpandedRowMapValues[citation.id]) { + delete itemIdToExpandedRowMapValues[citation.id]; + } else { + itemIdToExpandedRowMapValues[citation.id] = {citation.content}; + } + + setItemIdToExpandedRowMap(itemIdToExpandedRowMapValues); + }; + + return ( + { + const itemIdToExpandedRowMapValues = { ...itemIdToExpandedRowMap }; + + return ( + toggleDetails(citation)} + iconType={itemIdToExpandedRowMapValues[citation.id] ? 'arrowDown' : 'arrowRight'} + > + {i18n.translate('xpack.searchPlayground.chat.message.assistant.citations.snippet', { + defaultMessage: 'Snippet', + })} + + ); + }, + }, + ]} + items={citations} + itemId="id" + itemIdToExpandedRowMap={itemIdToExpandedRowMap} + isExpandable + /> + ); +}; diff --git a/x-pack/plugins/search_playground/public/components/message_list/copy_action_button.tsx b/x-pack/plugins/search_playground/public/components/message_list/copy_action_button.tsx new file mode 100644 index 0000000000000..c55ac088c04e2 --- /dev/null +++ b/x-pack/plugins/search_playground/public/components/message_list/copy_action_button.tsx @@ -0,0 +1,30 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; + +import { EuiButtonIcon } from '@elastic/eui'; + +interface CopyActionButtonProps { + copyText: string; + ariaLabel: string; +} + +export const CopyActionButton: React.FC = ({ copyText, ariaLabel }) => { + const handleCopy = () => { + navigator.clipboard.writeText(copyText); + }; + + return ( + + ); +}; diff --git a/x-pack/plugins/search_playground/public/components/message_list/message_list.tsx b/x-pack/plugins/search_playground/public/components/message_list/message_list.tsx new file mode 100644 index 0000000000000..17b04f5845bc0 --- /dev/null +++ b/x-pack/plugins/search_playground/public/components/message_list/message_list.tsx @@ -0,0 +1,45 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; + +import { EuiCommentList } from '@elastic/eui'; + +import { AIMessage, Message, MessageRole } from '../../types'; + +import { AssistantMessage } from './assistant_message'; +import { SystemMessage } from './system_message'; +import { UserMessage } from './user_message'; + +interface MessageListProps { + messages: Message[]; +} + +const mapRoleToMessageComponent = { + [MessageRole.system]: (message: Message) => , + [MessageRole.user]: (message: Message) => ( + + ), + [MessageRole.assistant]: (message: Message) => ( + + ), +}; + +export const MessageList: React.FC = ({ messages }) => ( + + {messages.map((message) => ( + + {mapRoleToMessageComponent[message.role](message)} + + ))} + +); diff --git a/x-pack/plugins/search_playground/public/components/message_list/retrieval_docs_flyout.tsx b/x-pack/plugins/search_playground/public/components/message_list/retrieval_docs_flyout.tsx new file mode 100644 index 0000000000000..9ac8fa384ea0a --- /dev/null +++ b/x-pack/plugins/search_playground/public/components/message_list/retrieval_docs_flyout.tsx @@ -0,0 +1,137 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import { + EuiBadge, + EuiBasicTable, + EuiBasicTableColumn, + EuiCodeBlock, + EuiFlexGroup, + EuiFlexItem, + EuiFlyout, + EuiFlyoutBody, + EuiFlyoutHeader, + EuiPanel, + EuiSpacer, + EuiText, + EuiTextColor, + EuiTitle, +} from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import { Doc } from '../../types'; + +interface RetrievalDocsFlyoutProps { + onClose: () => void; + retrievalDocs: Doc[]; +} + +const RESULT_FIELDS_TRUNCATE_AT = 4; +const truncateFields = (doc: Doc) => + Object.entries(doc) + .slice(0, RESULT_FIELDS_TRUNCATE_AT) + .map(([field, value]) => ({ field, value })); + +export const RetrievalDocsFlyout: React.FC = ({ + onClose, + retrievalDocs, +}) => { + const columns: Array> = [ + { + field: 'field', + name: i18n.translate( + 'xpack.searchPlayground.chat.message.assistant.retrievalDoc.result.nameColumn', + { + defaultMessage: 'Field', + } + ), + render: (field: string) => { + return ( + + + "{field}" + + + ); + }, + truncateText: true, + width: '20%', + }, + { + field: 'value', + name: i18n.translate( + 'xpack.searchPlayground.chat.message.assistant.retrievalDoc.result.valueColumn', + { + defaultMessage: 'Value', + } + ), + render: (value: unknown) => ( + + {(typeof value === 'string' ? value : JSON.stringify(value)).slice(0, 255)} + + ), + }, + ]; + + return ( + + + +

+ {i18n.translate('xpack.searchPlayground.chat.message.assistant.retrievalDoc.title', { + defaultMessage: 'Documents retrieved', + })} +

+
+ + +

+ {i18n.translate('xpack.searchPlayground.chat.message.assistant.retrievalDoc.subtitle', { + defaultMessage: + 'The documents that were referenced in order to create an answer to your query', + })} +

+
+
+ + + {retrievalDocs.map((doc) => ( + + + + + {i18n.translate( + 'xpack.searchPlayground.chat.message.assistant.retrievalDoc.result.id', + { + defaultMessage: 'ID: {id}', + values: { id: doc.id }, + } + )} + + + + + {i18n.translate( + 'xpack.searchPlayground.chat.message.assistant.retrievalDoc.result.fromIndex', + { + defaultMessage: 'from', + } + )} + + workplace_index + + + + + + + ))} + + +
+ ); +}; diff --git a/x-pack/plugins/search_playground/public/components/message_list/system_message.tsx b/x-pack/plugins/search_playground/public/components/message_list/system_message.tsx new file mode 100644 index 0000000000000..16295299a914c --- /dev/null +++ b/x-pack/plugins/search_playground/public/components/message_list/system_message.tsx @@ -0,0 +1,34 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; + +import { EuiComment } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; + +interface SystemMessageProps { + content: React.ReactNode; +} + +export const SystemMessage: React.FC = ({ content }) => { + return ( + + ); +}; diff --git a/x-pack/plugins/search_playground/public/components/message_list/user_message.tsx b/x-pack/plugins/search_playground/public/components/message_list/user_message.tsx new file mode 100644 index 0000000000000..3b0f51a5ccb87 --- /dev/null +++ b/x-pack/plugins/search_playground/public/components/message_list/user_message.tsx @@ -0,0 +1,64 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { useEffect, useState } from 'react'; + +import moment from 'moment'; + +import { EuiComment, EuiText } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import { UserAvatar, UserProfileWithAvatar } from '@kbn/user-profile-components'; + +import type { Message as MessageType } from '../../types'; + +import { CopyActionButton } from './copy_action_button'; +import { useKibana } from '../../hooks/use_kibana'; + +type UserMessageProps = Pick; + +export const UserMessage: React.FC = ({ content, createdAt }) => { + const { services } = useKibana(); + const [currentUserProfile, setCurrentUserProfile] = useState(); + + useEffect(() => { + services.security?.userProfiles.getCurrent({ dataPath: 'avatar' }).then(setCurrentUserProfile); + }, [services]); + + return ( + + } + timelineAvatarAriaLabel={currentUserProfile?.user.username} + actions={ + + } + > + +

{content}

+
+
+ ); +}; diff --git a/x-pack/plugins/search_playground/public/components/question_input.tsx b/x-pack/plugins/search_playground/public/components/question_input.tsx new file mode 100644 index 0000000000000..0077e2ac7bf73 --- /dev/null +++ b/x-pack/plugins/search_playground/public/components/question_input.tsx @@ -0,0 +1,82 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { useCallback } from 'react'; + +import { i18n } from '@kbn/i18n'; +import { EuiTextArea, keys, useEuiTheme } from '@elastic/eui'; + +const MAX_HEIGHT = 200; + +interface QuestionInputProps { + value: string; + onChange: (value: string) => void; + button: React.ReactNode; + isDisabled?: boolean; +} + +export const QuestionInput: React.FC = ({ + value, + onChange, + button, + isDisabled, +}) => { + const { euiTheme } = useEuiTheme(); + const handleChange = useCallback( + (e: React.ChangeEvent) => { + onChange(e.target.value); + + e.target.style.height = 'auto'; + e.target.style.height = `${e.target.scrollHeight}px`; + }, + [onChange] + ); + const handleKeyDown = useCallback((event: React.KeyboardEvent) => { + if (event.key === keys.ENTER && !event.shiftKey) { + event.preventDefault(); + + event.currentTarget.form?.requestSubmit(); + } + }, []); + + return ( +
+ + +
+ {button} +
+
+ ); +}; diff --git a/x-pack/plugins/search_playground/public/components/sources_panel/add_indices_field.tsx b/x-pack/plugins/search_playground/public/components/sources_panel/add_indices_field.tsx new file mode 100644 index 0000000000000..c05923afd72d1 --- /dev/null +++ b/x-pack/plugins/search_playground/public/components/sources_panel/add_indices_field.tsx @@ -0,0 +1,61 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { EuiComboBox, EuiFormRow } from '@elastic/eui'; +import React, { useState } from 'react'; +import { i18n } from '@kbn/i18n'; +import { EuiComboBoxOptionOption } from '@elastic/eui/src/components/combo_box/types'; +import { IndexName } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import { useQueryIndices } from '../../hooks/use_query_indices'; + +interface AddIndicesFieldProps { + selectedIndices: IndexName[]; + onIndexSelect: (index: IndexName) => void; +} + +export const AddIndicesField: React.FC = ({ + selectedIndices, + onIndexSelect, +}) => { + const [query, setQuery] = useState(''); + const { indices, isLoading } = useQueryIndices(query); + const handleChange = (value: Array>) => { + if (value?.[0]?.label) { + onIndexSelect(value[0].label); + } + }; + const handleSearchChange = (searchValue: string) => { + setQuery(searchValue); + }; + + return ( + + ({ + label: index, + disabled: selectedIndices.includes(index), + }))} + isClearable={false} + /> + + ); +}; diff --git a/x-pack/plugins/search_playground/public/components/sources_panel/create_index_callout.tsx b/x-pack/plugins/search_playground/public/components/sources_panel/create_index_callout.tsx new file mode 100644 index 0000000000000..1698570a8d221 --- /dev/null +++ b/x-pack/plugins/search_playground/public/components/sources_panel/create_index_callout.tsx @@ -0,0 +1,61 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { EuiButton, EuiCallOut, EuiSpacer, EuiText } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import { FormattedMessage } from '@kbn/i18n-react'; +import React, { useCallback, useMemo } from 'react'; +import { useKibana } from '../../hooks/use_kibana'; + +export const CreateIndexCallout: React.FC = () => { + const { + services: { application, share }, + } = useKibana(); + const createIndexLocator = useMemo( + () => share.url.locators.get('CREATE_INDEX_LOCATOR_ID'), + [share.url.locators] + ); + const handleNavigateToIndex = useCallback(async () => { + const createIndexUrl = await createIndexLocator?.getUrl({}); + + if (createIndexUrl) { + application?.navigateToUrl(createIndexUrl); + } + }, [application, createIndexLocator]); + + return ( + + +

+ +

+
+ + + + +
+ ); +}; diff --git a/x-pack/plugins/search_playground/public/components/sources_panel/indices_list.tsx b/x-pack/plugins/search_playground/public/components/sources_panel/indices_list.tsx new file mode 100644 index 0000000000000..b127c1ecd8419 --- /dev/null +++ b/x-pack/plugins/search_playground/public/components/sources_panel/indices_list.tsx @@ -0,0 +1,49 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { EuiFormRow, EuiListGroup, EuiListGroupItem } from '@elastic/eui'; +import React from 'react'; +import { i18n } from '@kbn/i18n'; + +interface IndicesListProps { + indices: string[]; + onRemoveClick: (index: string) => void; + hasBorder?: boolean; +} + +export const IndicesList: React.FC = ({ indices, onRemoveClick, hasBorder }) => + indices?.length ? ( + + + {indices.map((index) => ( + onRemoveClick(index), + disabled: indices.length === 1, + }} + /> + ))} + + + ) : null; diff --git a/x-pack/plugins/search_playground/public/components/sources_panel/indices_table.tsx b/x-pack/plugins/search_playground/public/components/sources_panel/indices_table.tsx new file mode 100644 index 0000000000000..85f53eec44be4 --- /dev/null +++ b/x-pack/plugins/search_playground/public/components/sources_panel/indices_table.tsx @@ -0,0 +1,50 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { EuiBasicTable, EuiLink } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import React from 'react'; + +interface IndicesTableProps { + indices: string[]; + onRemoveClick: (index: string) => void; +} + +export const IndicesTable: React.FC = ({ indices, onRemoveClick }) => ( + ({ index }))} + columns={[ + { + field: 'index', + name: i18n.translate('xpack.searchPlayground.sources.indices.table.label', { + defaultMessage: 'Selected indices', + }), + truncateText: true, + render: (index: string) => {index}, + }, + { + actions: [ + { + type: 'icon', + name: i18n.translate('xpack.searchPlayground.sources.indices.table.remove.label', { + defaultMessage: 'Remove', + }), + description: i18n.translate( + 'xpack.searchPlayground.sources.indices.table.remove.description', + { + defaultMessage: 'Remove index', + } + ), + icon: 'minusInCircle', + onClick: (item: { index: string }) => onRemoveClick(item.index), + }, + ], + }, + ]} + hasActions + /> +); diff --git a/x-pack/plugins/search_playground/public/components/sources_panel/sources_panel_for_start_chat.tsx b/x-pack/plugins/search_playground/public/components/sources_panel/sources_panel_for_start_chat.tsx new file mode 100644 index 0000000000000..a907cf0d86547 --- /dev/null +++ b/x-pack/plugins/search_playground/public/components/sources_panel/sources_panel_for_start_chat.tsx @@ -0,0 +1,72 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { EuiFlexGroup, EuiFlexItem, EuiLoadingSpinner } from '@elastic/eui'; +import React, { useEffect } from 'react'; +import { i18n } from '@kbn/i18n'; +import { useController } from 'react-hook-form'; +import { AddIndicesField } from './add_indices_field'; +import { IndicesTable } from './indices_table'; +import { StartChatPanel } from '../start_chat_panel'; +import { CreateIndexCallout } from './create_index_callout'; +import { useSourceIndicesField } from '../../hooks/use_source_indices_field'; +import { useQueryIndices } from '../../hooks/use_query_indices'; +import { ChatFormFields } from '../../types'; +import { useIndicesFields } from '../../hooks/use_indices_fields'; +import { createQuery, getDefaultQueryFields } from '../../utils/create_query'; + +export const SourcesPanelForStartChat: React.FC = () => { + const { selectedIndices, removeIndex, addIndex } = useSourceIndicesField(); + const { indices, isLoading } = useQueryIndices(); + const { fields } = useIndicesFields(selectedIndices || []); + + const { + field: { onChange: elasticsearchQueryOnChange }, + } = useController({ + name: ChatFormFields.elasticsearchQuery, + defaultValue: {}, + }); + + useEffect(() => { + if (fields) { + const defaultFields = getDefaultQueryFields(fields); + elasticsearchQueryOnChange(createQuery(defaultFields, fields)); + } + }, [fields, elasticsearchQueryOnChange]); + + return ( + + {!!selectedIndices?.length && ( + + + + )} + + {isLoading && ( + + + + )} + + {!isLoading && !!indices?.length && ( + + + + )} + + {!isLoading && !indices?.length && } + + ); +}; diff --git a/x-pack/plugins/search_playground/public/components/sources_panel/sources_panel_sidebar.tsx b/x-pack/plugins/search_playground/public/components/sources_panel/sources_panel_sidebar.tsx new file mode 100644 index 0000000000000..76a68605c9b0a --- /dev/null +++ b/x-pack/plugins/search_playground/public/components/sources_panel/sources_panel_sidebar.tsx @@ -0,0 +1,58 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { useEffect } from 'react'; +import { i18n } from '@kbn/i18n'; +import { EuiCallOut, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; +import { useController } from 'react-hook-form'; +import { useSourceIndicesField } from '../../hooks/use_source_indices_field'; +import { useIndicesFields } from '../../hooks/use_indices_fields'; +import { createQuery, getDefaultQueryFields } from '../../utils/create_query'; +import { ChatFormFields } from '../../types'; +import { AddIndicesField } from './add_indices_field'; +import { IndicesList } from './indices_list'; + +export const SourcesPanelSidebar: React.FC = () => { + const { selectedIndices, removeIndex, addIndex } = useSourceIndicesField(); + const { fields } = useIndicesFields(selectedIndices || []); + + const { + field: { onChange: elasticsearchQueryOnChange }, + } = useController({ + name: ChatFormFields.elasticsearchQuery, + defaultValue: {}, + }); + + useEffect(() => { + if (fields) { + const defaultFields = getDefaultQueryFields(fields); + elasticsearchQueryOnChange(createQuery(defaultFields, fields)); + } + }, [selectedIndices, fields, elasticsearchQueryOnChange]); + + return ( + + + + + + + + + + + + + + ); +}; diff --git a/x-pack/plugins/search_playground/public/components/start_chat_panel.tsx b/x-pack/plugins/search_playground/public/components/start_chat_panel.tsx new file mode 100644 index 0000000000000..c155dfd16828e --- /dev/null +++ b/x-pack/plugins/search_playground/public/components/start_chat_panel.tsx @@ -0,0 +1,66 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { + EuiFlexGroup, + EuiFlexItem, + EuiIcon, + EuiPanel, + EuiSpacer, + EuiText, + EuiTitle, +} from '@elastic/eui'; +import React from 'react'; +import { FormattedMessage } from '@kbn/i18n-react'; + +interface StartChatPanelProps { + title: string; + description: string | React.ReactNode; + isValid?: boolean; +} + +export const StartChatPanel: React.FC = ({ + title, + description, + children, + isValid, +}) => ( + + + +
{title}
+
+ + {isValid && ( + + + + + +

+ +

+
+
+
+ )} +
+ + + + + +

{description}

+
+ + {children} +
+
+); diff --git a/x-pack/plugins/search_playground/public/components/start_new_chat.tsx b/x-pack/plugins/search_playground/public/components/start_new_chat.tsx new file mode 100644 index 0000000000000..4720f1122fae6 --- /dev/null +++ b/x-pack/plugins/search_playground/public/components/start_new_chat.tsx @@ -0,0 +1,78 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { EuiButton, EuiFlexGroup, EuiFlexItem, EuiIcon, EuiTitle, useEuiTheme } from '@elastic/eui'; +import { FormattedMessage } from '@kbn/i18n-react'; +import React from 'react'; +import { useFormContext } from 'react-hook-form'; +import { SourcesPanelForStartChat } from './sources_panel/sources_panel_for_start_chat'; +import { SummarizationPanelForStartChat } from './summarization_panel/summarization_panel_for_start_chat'; +import { ChatFormFields } from '../types'; + +const maxWidthPage = 640; + +interface StartNewChatProps { + onStartClick: () => void; +} + +export const StartNewChat: React.FC = ({ onStartClick }) => { + const { euiTheme } = useEuiTheme(); + const { watch } = useFormContext(); + + return ( + + + + + +

+ +

+
+ + +
+
+ + + + + + + + + + + + + + +
+
+ ); +}; diff --git a/x-pack/plugins/search_playground/public/components/summarization_panel/include_citations_field.tsx b/x-pack/plugins/search_playground/public/components/summarization_panel/include_citations_field.tsx new file mode 100644 index 0000000000000..51c5dabe0e293 --- /dev/null +++ b/x-pack/plugins/search_playground/public/components/summarization_panel/include_citations_field.tsx @@ -0,0 +1,30 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import { i18n } from '@kbn/i18n'; +import { EuiFormRow, EuiSwitch } from '@elastic/eui'; + +interface IncludeCitationsFieldProps { + checked: boolean; + onChange: (value: boolean) => void; +} + +export const IncludeCitationsField: React.FC = ({ + checked, + onChange, +}) => ( + + onChange(e.target.checked)} + /> + +); diff --git a/x-pack/plugins/search_playground/public/components/summarization_panel/instructions_field.tsx b/x-pack/plugins/search_playground/public/components/summarization_panel/instructions_field.tsx new file mode 100644 index 0000000000000..864026ad1172b --- /dev/null +++ b/x-pack/plugins/search_playground/public/components/summarization_panel/instructions_field.tsx @@ -0,0 +1,55 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; + +import { EuiFormRow, EuiIcon, EuiTextArea, EuiToolTip } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; + +interface InstructionsFieldProps { + value?: string; + onChange: (value: string) => void; +} + +export const InstructionsField: React.FC = ({ value, onChange }) => { + const handlePromptChange = (e: React.ChangeEvent) => + onChange(e.target.value); + + return ( + + <> + + {i18n.translate('xpack.searchPlayground.sidebar.instructionsField.label', { + defaultMessage: 'Instructions', + })} + + + +
+ } + > + + + ); +}; diff --git a/x-pack/plugins/search_playground/public/components/summarization_panel/open_ai_icon.tsx b/x-pack/plugins/search_playground/public/components/summarization_panel/open_ai_icon.tsx new file mode 100644 index 0000000000000..ed56c974dac91 --- /dev/null +++ b/x-pack/plugins/search_playground/public/components/summarization_panel/open_ai_icon.tsx @@ -0,0 +1,17 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; + +export const OpenAIIcon = () => ( + + + +); diff --git a/x-pack/plugins/search_playground/public/components/summarization_panel/open_ai_key_callout.tsx b/x-pack/plugins/search_playground/public/components/summarization_panel/open_ai_key_callout.tsx new file mode 100644 index 0000000000000..6438914915951 --- /dev/null +++ b/x-pack/plugins/search_playground/public/components/summarization_panel/open_ai_key_callout.tsx @@ -0,0 +1,40 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; + +import { EuiButton, EuiCallOut } from '@elastic/eui'; + +import { i18n } from '@kbn/i18n'; + +interface OpenAIKeyCalloutProps { + openAIFlyOutOpen: () => void; +} + +export const OpenAIKeyCallout: React.FC = ({ openAIFlyOutOpen }) => { + return ( + +

+ {i18n.translate('xpack.searchPlayground.sidebar.openAICallout.description', { + defaultMessage: + 'The AI Playground uses OpenAl models for summarization. Add your OpenAI API key to continue.', + })} +

+ + {i18n.translate('xpack.searchPlayground.sidebar.openAICallout.buttonLabelText', { + defaultMessage: 'Add OpenAI API Key', + })} + +
+ ); +}; diff --git a/x-pack/plugins/search_playground/public/components/summarization_panel/open_ai_key_field.tsx b/x-pack/plugins/search_playground/public/components/summarization_panel/open_ai_key_field.tsx new file mode 100644 index 0000000000000..2ac65c9e386d0 --- /dev/null +++ b/x-pack/plugins/search_playground/public/components/summarization_panel/open_ai_key_field.tsx @@ -0,0 +1,65 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { EuiButton, EuiFieldPassword, EuiFlexGroup, EuiFormRow, keys } from '@elastic/eui'; +import React from 'react'; +import { i18n } from '@kbn/i18n'; +import { useFormContext } from 'react-hook-form'; +import { FormattedMessage } from '@kbn/i18n-react'; +import { ChatFormFields } from '../../types'; + +export const OpenAIKeyField: React.FC = () => { + const [openAITempValue, setOpenAITempValue] = React.useState(''); + const { setValue, watch } = useFormContext(); + const openAIKey = watch(ChatFormFields.openAIKey); + const handleSaveValue = () => { + if (openAITempValue) { + setValue(ChatFormFields.openAIKey, openAITempValue); + } + }; + + return ( + + + { + if (keys.ENTER === key) { + handleSaveValue(); + } + }} + onChange={(e) => setOpenAITempValue(e.target.value)} + /> + + {openAIKey && openAIKey === openAITempValue ? ( + + + + ) : ( + + + + )} + + + ); +}; diff --git a/x-pack/plugins/search_playground/public/components/summarization_panel/open_ai_key_flyout.tsx b/x-pack/plugins/search_playground/public/components/summarization_panel/open_ai_key_flyout.tsx new file mode 100644 index 0000000000000..13d430e4f8aff --- /dev/null +++ b/x-pack/plugins/search_playground/public/components/summarization_panel/open_ai_key_flyout.tsx @@ -0,0 +1,123 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { + EuiButton, + EuiButtonEmpty, + EuiFieldPassword, + EuiFlexGroup, + EuiFlexItem, + EuiFlyout, + EuiFlyoutBody, + EuiFlyoutFooter, + EuiFlyoutHeader, + EuiFormRow, + EuiLink, + EuiSpacer, + EuiText, + EuiTitle, +} from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import { FormattedMessage } from '@kbn/i18n-react'; +import React, { useState } from 'react'; + +export interface OpenAIKeyFlyOutProps { + openAPIKey: string; + onClose: () => void; + onSave: (key: string) => void; +} + +export const OpenAIKeyFlyOut: React.FC = ({ + openAPIKey, + onClose, + onSave, +}) => { + const [apiKey, setApiKey] = useState(openAPIKey); + + const handleSave = () => { + onSave(apiKey); + onClose(); + }; + + return ( + + + +

+ {i18n.translate('xpack.searchPlayground.sidebar.openAIFlyOut.headerTitle', { + defaultMessage: 'OpenAI API Key', + })} +

+
+ +
+ + + + + + + + } + > + + setApiKey(e.target.value)} + /> + + + + + + + + + + + + + + + + + + + +
+ ); +}; diff --git a/x-pack/plugins/search_playground/public/components/summarization_panel/open_ai_summarization_model.tsx b/x-pack/plugins/search_playground/public/components/summarization_panel/open_ai_summarization_model.tsx new file mode 100644 index 0000000000000..322b8c1a61354 --- /dev/null +++ b/x-pack/plugins/search_playground/public/components/summarization_panel/open_ai_summarization_model.tsx @@ -0,0 +1,102 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; + +import { + EuiButtonEmpty, + EuiFlexGroup, + EuiFlexItem, + EuiFormRow, + EuiIcon, + EuiSuperSelect, + EuiSuperSelectOption, + EuiToolTip, +} from '@elastic/eui'; + +import { i18n } from '@kbn/i18n'; +import { SummarizationModelName } from '../../types'; + +import { OpenAIIcon } from './open_ai_icon'; + +const renderSelectOptions = (label: string) => ( + + + + + {label} + +); + +const SummarizationModel: Array> = [ + { + value: SummarizationModelName.gpt3_5, + inputDisplay: renderSelectOptions(SummarizationModelName.gpt3_5), + }, + { + value: SummarizationModelName.gpt3_5_turbo_1106, + inputDisplay: renderSelectOptions(SummarizationModelName.gpt3_5_turbo_1106), + }, + { + value: SummarizationModelName.gpt3_5_turbo_16k, + inputDisplay: renderSelectOptions(SummarizationModelName.gpt3_5_turbo_16k), + }, + { + value: SummarizationModelName.gpt3_5_turbo_16k_0613, + inputDisplay: renderSelectOptions(SummarizationModelName.gpt3_5_turbo_16k_0613), + }, + { + value: SummarizationModelName.gpt3_5_turbo, + inputDisplay: renderSelectOptions(SummarizationModelName.gpt3_5_turbo), + }, +]; + +interface OpenAISummarizationModelProps { + openAIFlyOutOpen: () => void; + model: string; + onSelect: (key: string) => void; +} + +export const OpenAISummarizationModel: React.FC = ({ + model = SummarizationModelName.gpt3_5_turbo_1106, + onSelect, + openAIFlyOutOpen, +}) => { + const onChange = (value: string) => { + onSelect(value); + }; + + return ( + + <> + + {i18n.translate('xpack.searchPlayground.sidebar.summarizationModel.label', { + defaultMessage: 'Summarization Model', + })} + + + +
+ } + labelAppend={ + openAIFlyOutOpen()}> + {i18n.translate('xpack.searchPlayground.sidebar.summarizationModel.editLabel', { + defaultMessage: 'Edit OpenAI API key', + })} + + } + > + + + ); +}; diff --git a/x-pack/plugins/search_playground/public/components/summarization_panel/summarization_panel.tsx b/x-pack/plugins/search_playground/public/components/summarization_panel/summarization_panel.tsx new file mode 100644 index 0000000000000..e9b926cf44eb4 --- /dev/null +++ b/x-pack/plugins/search_playground/public/components/summarization_panel/summarization_panel.tsx @@ -0,0 +1,74 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { useState } from 'react'; +import { Controller, useFormContext } from 'react-hook-form'; + +import { IncludeCitationsField } from './include_citations_field'; +import { InstructionsField } from './instructions_field'; +import { ChatFormFields } from '../../types'; +import { OpenAIKeyFlyOut } from './open_ai_key_flyout'; +import { OpenAISummarizationModel } from './open_ai_summarization_model'; + +export const SummarizationPanel: React.FC = () => { + const { control } = useFormContext(); + const [isOpenAIFlyOutOpen, setIsOpenAIFlyOutOpen] = useState(false); + + const onCloseOpenAIFlyOut = () => { + setIsOpenAIFlyOutOpen(!isOpenAIFlyOutOpen); + }; + const handleOpenAIFlyOut = () => { + setIsOpenAIFlyOutOpen(true); + }; + + return ( + <> + {isOpenAIFlyOutOpen && ( + ( + + )} + /> + )} + + ( + + )} + /> + + } + /> + + ( + + )} + /> + + ); +}; diff --git a/x-pack/plugins/search_playground/public/components/summarization_panel/summarization_panel_for_start_chat.tsx b/x-pack/plugins/search_playground/public/components/summarization_panel/summarization_panel_for_start_chat.tsx new file mode 100644 index 0000000000000..fe35bbae6ca89 --- /dev/null +++ b/x-pack/plugins/search_playground/public/components/summarization_panel/summarization_panel_for_start_chat.tsx @@ -0,0 +1,48 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import { i18n } from '@kbn/i18n'; +import { EuiLink } from '@elastic/eui'; +import { FormattedMessage } from '@kbn/i18n-react'; +import { useFormContext } from 'react-hook-form'; +import { OpenAIKeyField } from './open_ai_key_field'; +import { StartChatPanel } from '../start_chat_panel'; +import { ChatFormFields } from '../../types'; + +const openAIApiKeyLink = 'https://platform.openai.com/api-keys'; + +export const SummarizationPanelForStartChat: React.FC = () => { + const { watch } = useFormContext(); + + return ( + + + + ), + }} + /> + } + isValid={watch(ChatFormFields.openAIKey)} + > + + + ); +}; diff --git a/x-pack/plugins/search_playground/public/components/telegram_icon.tsx b/x-pack/plugins/search_playground/public/components/telegram_icon.tsx new file mode 100644 index 0000000000000..749f6e102df84 --- /dev/null +++ b/x-pack/plugins/search_playground/public/components/telegram_icon.tsx @@ -0,0 +1,17 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; + +export const TelegramIcon = () => ( + + + +); diff --git a/x-pack/plugins/search_playground/public/components/toolbar.tsx b/x-pack/plugins/search_playground/public/components/toolbar.tsx new file mode 100644 index 0000000000000..67f35c5adee57 --- /dev/null +++ b/x-pack/plugins/search_playground/public/components/toolbar.tsx @@ -0,0 +1,20 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { EuiFlexGroup } from '@elastic/eui'; +import React from 'react'; +import { ViewCodeAction } from './view_code/view_code_action'; +import { ViewQueryAction } from './view_query/view_query_action'; + +export const Toolbar: React.FC = () => { + return ( + + + + + ); +}; diff --git a/x-pack/plugins/search_playground/public/components/view_code/create_api_key_form.tsx b/x-pack/plugins/search_playground/public/components/view_code/create_api_key_form.tsx new file mode 100644 index 0000000000000..b0014c7286af3 --- /dev/null +++ b/x-pack/plugins/search_playground/public/components/view_code/create_api_key_form.tsx @@ -0,0 +1,154 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { + EuiButton, + EuiButtonEmpty, + EuiFieldText, + EuiFlexGroup, + EuiForm, + EuiFormControlLayout, + EuiFormRow, + EuiText, +} from '@elastic/eui'; +import React, { Controller, useForm } from 'react-hook-form'; +import { i18n } from '@kbn/i18n'; +import { FormattedMessage } from '@kbn/i18n-react'; +import { useCreateApiKeyQuery } from '../../hooks/use_create_api_key_query'; +import { useKibana } from '../../hooks/use_kibana'; + +enum ApiKeyFormFields { + Name = 'name', + ExpireInDays = 'expiresInDays', +} + +interface ApiKeyForm { + [ApiKeyFormFields.Name]: string; + [ApiKeyFormFields.ExpireInDays]: number; +} + +export const CreateApiKeyForm = () => { + const { http } = useKibana().services; + const managementApiKeysLinks = http.basePath.prepend('/app/management/security/api_keys'); + const { + control, + getValues, + reset, + formState: { isDirty, isValid }, + handleSubmit, + } = useForm(); + const { action, isLoading, isSuccess, isError } = useCreateApiKeyQuery(); + const onSubmit = async (data: ApiKeyForm) => { + await action(data); + + reset(getValues()); + }; + + return ( + + + ( + + )} + /> + + + + ( + + + + + + } + > + + + )} + /> + + + + + {isSuccess && !isDirty ? ( + + + + ) : ( + + + + )} + + + + + + + + ); +}; diff --git a/x-pack/plugins/search_playground/public/components/view_code/view_code_action.tsx b/x-pack/plugins/search_playground/public/components/view_code/view_code_action.tsx new file mode 100644 index 0000000000000..53680a1565a02 --- /dev/null +++ b/x-pack/plugins/search_playground/public/components/view_code/view_code_action.tsx @@ -0,0 +1,37 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { useState } from 'react'; +import { EuiButton } from '@elastic/eui'; +import { useFormContext } from 'react-hook-form'; +import { FormattedMessage } from '@kbn/i18n-react'; +import { ChatForm, ChatFormFields } from '../../types'; +import { ViewCodeFlyout } from './view_code_flyout'; + +export const ViewCodeAction: React.FC = () => { + const { watch } = useFormContext(); + const [showFlyout, setShowFlyout] = useState(false); + const selectedIndices = watch(ChatFormFields.indices); + + return ( + <> + {showFlyout && setShowFlyout(false)} />} + setShowFlyout(true)} + disabled={!selectedIndices || selectedIndices?.length === 0} + > + + + + ); +}; diff --git a/x-pack/plugins/search_playground/public/components/view_code/view_code_flyout.tsx b/x-pack/plugins/search_playground/public/components/view_code/view_code_flyout.tsx new file mode 100644 index 0000000000000..d11e89ee6fc9f --- /dev/null +++ b/x-pack/plugins/search_playground/public/components/view_code/view_code_flyout.tsx @@ -0,0 +1,99 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { + EuiFormLabel, + EuiCodeBlock, + EuiFlyout, + EuiFlyoutBody, + EuiFlyoutHeader, + EuiSpacer, + EuiSteps, + EuiText, + EuiTitle, +} from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import { FormattedMessage } from '@kbn/i18n-react'; +import React, { useMemo } from 'react'; +import { CreateApiKeyForm } from './create_api_key_form'; + +interface ViewCodeFlyoutProps { + onClose: () => void; +} + +export const ViewCodeFlyout: React.FC = ({ onClose }) => { + const steps = useMemo( + () => [ + { + title: i18n.translate('xpack.searchPlayground.viewCode.flyout.step.apiKeyTitle', { + defaultMessage: 'Generate and copy an API key', + }), + children: ( + <> + +

+ +

+
+ + + + ), + }, + { + title: i18n.translate('xpack.searchPlayground.viewCode.flyout.step.createApplication', { + defaultMessage: 'Create application', + }), + children: ( + <> + + + + + + npm install + + + ), + }, + ], + [] + ); + + return ( + + + +

+ +

+
+ + +

+ +

+
+
+ + + +
+ ); +}; diff --git a/x-pack/plugins/search_playground/public/components/view_query/view_query_action.tsx b/x-pack/plugins/search_playground/public/components/view_query/view_query_action.tsx new file mode 100644 index 0000000000000..c2971ec87ed17 --- /dev/null +++ b/x-pack/plugins/search_playground/public/components/view_query/view_query_action.tsx @@ -0,0 +1,31 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { useState } from 'react'; +import { EuiButtonEmpty } from '@elastic/eui'; +import { useFormContext } from 'react-hook-form'; +import { FormattedMessage } from '@kbn/i18n-react'; +import { ViewQueryFlyout } from './view_query_flyout'; +import { ChatForm, ChatFormFields } from '../../types'; + +export const ViewQueryAction: React.FC = () => { + const [showFlyout, setShowFlyout] = useState(false); + const { watch } = useFormContext(); + const selectedIndices: string[] = watch(ChatFormFields.indices); + + return ( + <> + {showFlyout && setShowFlyout(false)} />} + setShowFlyout(true)} disabled={selectedIndices?.length === 0}> + + + + ); +}; diff --git a/x-pack/plugins/search_playground/public/components/view_query/view_query_flyout.tsx b/x-pack/plugins/search_playground/public/components/view_query/view_query_flyout.tsx new file mode 100644 index 0000000000000..cc271bd8fe1e5 --- /dev/null +++ b/x-pack/plugins/search_playground/public/components/view_query/view_query_flyout.tsx @@ -0,0 +1,205 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { + EuiAccordion, + EuiBasicTable, + EuiButton, + EuiButtonEmpty, + EuiCodeBlock, + EuiFlexGroup, + EuiFlexItem, + EuiFlyout, + EuiFlyoutBody, + EuiFlyoutFooter, + EuiFlyoutHeader, + EuiPanel, + EuiSpacer, + EuiSwitch, + EuiText, + EuiTitle, +} from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import { FormattedMessage } from '@kbn/i18n-react'; +import React, { useEffect, useMemo, useState } from 'react'; +import { useController, useFormContext } from 'react-hook-form'; +import { useIndicesFields } from '../../hooks/use_indices_fields'; +import { ChatForm, ChatFormFields } from '../../types'; +import { createQuery, getDefaultQueryFields } from '../../utils/create_query'; + +interface ViewQueryFlyoutProps { + onClose: () => void; +} + +export const ViewQueryFlyout: React.FC = ({ onClose }) => { + const { watch } = useFormContext(); + const selectedIndices: string[] = watch(ChatFormFields.indices); + const { fields } = useIndicesFields(selectedIndices || []); + const defaultFields = useMemo(() => getDefaultQueryFields(fields), [fields]); + const [queryFields, setQueryFields] = useState(defaultFields); + + const { + field: { onChange }, + } = useController({ + name: ChatFormFields.elasticsearchQuery, + defaultValue: {}, + }); + + useEffect(() => { + if (selectedIndices?.length > 0) { + setQueryFields(defaultFields); + } + }, [selectedIndices, defaultFields]); + + const isQueryFieldSelected = (index: string, field: string) => { + return queryFields[index].includes(field); + }; + + const toggleQueryField = (index: string, field: string) => { + if (isQueryFieldSelected(index, field)) { + setQueryFields({ + ...queryFields, + [index]: queryFields[index].filter((x: string) => x !== field), + }); + } else { + setQueryFields({ + ...queryFields, + [index]: [...queryFields[index], field], + }); + } + }; + + const saveQuery = () => { + onChange(createQuery(queryFields, fields)); + + onClose(); + }; + + return ( + + + +

+ +

+
+ + +

+ +

+
+
+ + + + + {JSON.stringify(createQuery(queryFields, fields), null, 2)} + + + + + +
+ +
+
+ {Object.entries(fields).map(([index, group]) => ( + + + +
{index}
+ + } + > + + ({ + field: typeof field === 'string' ? field : field.field, + }))} + columns={[ + { + field: 'field', + name: i18n.translate( + 'xpack.searchPlayground.viewQuery.flyout.table.field', + { defaultMessage: 'Field' } + ), + truncateText: false, + render: (field: string) => field, + }, + { + actions: [ + { + name: 'toggle', + description: i18n.translate( + 'xpack.searchPlayground.viewQuery.flyout.table.toggle', + { defaultMessage: 'Toggle field' } + ), + isPrimary: true, + render: ({ field }: { field: string }) => ( + toggleQueryField(index, field)} + compressed + /> + ), + }, + ], + }, + ]} + hasActions + /> +
+
+
+ ))} +
+
+
+
+ + + + + + + + + + + + + + +
+ ); +}; diff --git a/x-pack/plugins/search_playground/public/embeddable.tsx b/x-pack/plugins/search_playground/public/embeddable.tsx new file mode 100644 index 0000000000000..982060f3ac670 --- /dev/null +++ b/x-pack/plugins/search_playground/public/embeddable.tsx @@ -0,0 +1,42 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { ComponentType, lazy, LazyExoticComponent, Suspense } from 'react'; +import type { App } from './components/app'; +import type { PlaygroundProvider as PlaygroundProviderComponent } from './providers/playground_provider'; +import type { Toolbar } from './components/toolbar'; + +const lazyRender = +

( + Component: LazyExoticComponent> + ): React.FC> => + (props) => + ( + + + + ); + +export const Playground = lazyRender>( + lazy(async () => ({ + default: (await import('./components/app')).App, + })) +); + +export const PlaygroundToolbar = lazyRender>( + lazy(async () => ({ + default: (await import('./components/toolbar')).Toolbar, + })) +); + +export const PlaygroundProvider = lazyRender< + React.ComponentProps +>( + lazy(async () => ({ + default: (await import('./providers/playground_provider')).PlaygroundProvider, + })) +); diff --git a/x-pack/plugins/search_playground/public/hooks/use_ai_assist_chat.ts b/x-pack/plugins/search_playground/public/hooks/use_ai_assist_chat.ts new file mode 100644 index 0000000000000..54c74ae025db7 --- /dev/null +++ b/x-pack/plugins/search_playground/public/hooks/use_ai_assist_chat.ts @@ -0,0 +1,248 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { useCallback, useEffect, useRef, useState } from 'react'; +import useSWR, { KeyedMutator } from 'swr'; +import { v4 as uuidv4 } from 'uuid'; +import { fetchApi } from '../utils/api'; + +import type { + ChatRequest, + ChatRequestOptions, + CreateMessage, + Message, + UseChatHelpers, + UseChatOptions, +} from '../types'; +import { MessageRole } from '../types'; + +const getStreamedResponse = async ( + api: string | ((init: RequestInit) => Promise), + chatRequest: ChatRequest, + mutate: KeyedMutator, + extraMetadataRef: React.MutableRefObject, + messagesRef: React.MutableRefObject, + abortControllerRef: React.MutableRefObject +) => { + const previousMessages = messagesRef.current; + mutate(chatRequest.messages, false); + + const constructedMessagesPayload = chatRequest.messages.map(({ role, content }) => ({ + role, + content, + })); + + return await fetchApi({ + api, + messages: constructedMessagesPayload, + body: { + data: chatRequest.data, + ...extraMetadataRef.current.body, + ...chatRequest.options?.body, + }, + headers: { + ...extraMetadataRef.current.headers, + ...chatRequest.options?.headers, + }, + abortController: () => abortControllerRef.current, + appendMessage(message) { + mutate([...chatRequest.messages, message], false); + }, + handleFailure() { + mutate(previousMessages, false); + }, + onUpdate(merged) { + mutate([...chatRequest.messages, ...merged], false); + }, + }); +}; + +export function useAIAssistChat({ + api = '/api/chat', + id = 'chat', + initialInput = '', + onError, + headers, + body, +}: UseChatOptions & { + key?: string; +} = {}): UseChatHelpers { + const chatKey = [typeof api === 'string' ? api : 'function', id]; + + const [initialMessagesFallback] = useState([]); + + // Store the chat state in SWR, using the chatId as the key to share states. + const { data: messages, mutate } = useSWR([chatKey, 'messages'], null, { + fallbackData: initialMessagesFallback, + }); + + const { data: isLoading = false, mutate: mutateLoading } = useSWR( + [chatKey, 'loading'], + null + ); + + const { data: error = undefined, mutate: setError } = useSWR( + [chatKey, 'error'], + null + ); + + const messagesRef = useRef(messages || []); + useEffect(() => { + messagesRef.current = messages || []; + }, [messages]); + + const abortControllerRef = useRef(null); + + const extraMetadataRef = useRef({ + headers, + body, + }); + + useEffect(() => { + extraMetadataRef.current = { + headers, + body, + }; + }, [headers, body]); + + const triggerRequest = useCallback( + async (chatRequest: ChatRequest) => { + try { + mutateLoading(true); + setError(undefined); + + const abortController = new AbortController(); + abortControllerRef.current = abortController; + + await getStreamedResponse( + api, + chatRequest, + mutate, + extraMetadataRef, + messagesRef, + abortControllerRef + ); + + abortControllerRef.current = null; + } catch (err) { + if ((err as any).name === 'AbortError') { + abortControllerRef.current = null; + return null; + } + + if (onError && err instanceof Error) { + onError(err); + } + + setError(err as Error); + } finally { + mutateLoading(false); + } + }, + [ + mutate, + mutateLoading, + api, + extraMetadataRef, + onError, + setError, + messagesRef, + abortControllerRef, + ] + ); + + const append = useCallback( + async (message: Message | CreateMessage, { options, data }: ChatRequestOptions = {}) => { + if (!message.id) { + message.id = uuidv4(); + } + + const chatRequest: ChatRequest = { + messages: messagesRef.current.concat(message as Message), + options, + data, + }; + + return triggerRequest(chatRequest); + }, + [triggerRequest] + ); + + const reload = useCallback( + async ({ options }: ChatRequestOptions = {}) => { + if (messagesRef.current.length === 0) return null; + + const chatRequest: ChatRequest = { + messages: messagesRef.current, + options, + }; + + return triggerRequest(chatRequest); + }, + [triggerRequest] + ); + + const stop = useCallback(() => { + if (abortControllerRef.current) { + abortControllerRef.current.abort(); + abortControllerRef.current = null; + } + }, []); + + const setMessages = useCallback( + (newMessages: Message[]) => { + mutate(newMessages, false); + messagesRef.current = newMessages; + }, + [mutate] + ); + + const [input, setInput] = useState(initialInput); + + const handleSubmit = useCallback( + (e: React.FormEvent, options: ChatRequestOptions = {}, metadata?: unknown) => { + if (metadata) { + extraMetadataRef.current = { + ...extraMetadataRef.current, + ...metadata, + }; + } + + e.preventDefault(); + if (!input) return; + + append( + { + content: input, + role: MessageRole.user, + createdAt: new Date(), + }, + options + ); + setInput(''); + }, + [input, append] + ); + + const handleInputChange = (e: any) => { + setInput(e.target.value); + }; + + return { + messages: messages || [], + error, + append, + reload, + stop, + setMessages, + input, + setInput, + handleInputChange, + handleSubmit, + isLoading, + }; +} diff --git a/x-pack/plugins/search_playground/public/hooks/use_auto_bottom_scroll.ts b/x-pack/plugins/search_playground/public/hooks/use_auto_bottom_scroll.ts new file mode 100644 index 0000000000000..185d84db89ba9 --- /dev/null +++ b/x-pack/plugins/search_playground/public/hooks/use_auto_bottom_scroll.ts @@ -0,0 +1,41 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { useEffect, useRef, useState } from 'react'; + +export const useAutoBottomScroll = (deps?: any[]): React.RefObject => { + const ref = useRef(null); + const [isAutoScrollMode, setAutoBottomScroll] = useState(true); + + useEffect(() => { + if (ref.current && isAutoScrollMode) { + ref.current.scrollTop = ref.current.scrollHeight; + } + }); + + useEffect(() => { + const currentRef = ref.current; + const calculateAutoScroll = () => { + if (ref.current) { + const newIsAutoScrollMode = + ref.current.scrollTop + ref.current.clientHeight === ref.current.scrollHeight; + + if (newIsAutoScrollMode !== isAutoScrollMode) { + setAutoBottomScroll(newIsAutoScrollMode); + } + } + }; + + currentRef?.addEventListener('scroll', calculateAutoScroll); + + return () => { + currentRef?.removeEventListener('scroll', calculateAutoScroll); + }; + }, [isAutoScrollMode, deps]); + + return ref; +}; diff --git a/x-pack/plugins/search_playground/public/hooks/use_chat.ts b/x-pack/plugins/search_playground/public/hooks/use_chat.ts new file mode 100644 index 0000000000000..8c52d8c1aef27 --- /dev/null +++ b/x-pack/plugins/search_playground/public/hooks/use_chat.ts @@ -0,0 +1,28 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { useAIAssistChat } from './use_ai_assist_chat'; +import { useKibana } from './use_kibana'; +import { APIRoutes, UseChatHelpers } from '../types'; + +export const useChat = (): UseChatHelpers => { + const { services } = useKibana(); + + const chatHelpers = useAIAssistChat({ + api: async (request: RequestInit) => { + const response = await services.http.post(APIRoutes.POST_CHAT_MESSAGE, { + ...request, + rawResponse: true, + asResponse: true, + }); + + return response.response!; + }, + }); + + return chatHelpers; +}; diff --git a/x-pack/plugins/search_playground/public/hooks/use_create_api_key_query.ts b/x-pack/plugins/search_playground/public/hooks/use_create_api_key_query.ts new file mode 100644 index 0000000000000..1bf1b32a2eeb5 --- /dev/null +++ b/x-pack/plugins/search_playground/public/hooks/use_create_api_key_query.ts @@ -0,0 +1,45 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { useMutation } from '@tanstack/react-query'; +import { useFormContext } from 'react-hook-form'; +import { useKibana } from './use_kibana'; +import { APIRoutes, ChatFormFields } from '../types'; + +interface UseApiKeyQueryParams { + name: string; + expiresInDays: number; +} + +export const useCreateApiKeyQuery = () => { + const { services } = useKibana(); + const { getValues } = useFormContext(); + + const { data, isError, isLoading, isSuccess, mutateAsync } = useMutation({ + mutationFn: async ({ name, expiresInDays }: UseApiKeyQueryParams) => { + const response = await services.http.post<{ + apiKey: { encoded: string; name: string; expiration: number }; + }>(APIRoutes.POST_API_KEY, { + body: JSON.stringify({ + name, + expiresInDays, + indices: getValues(ChatFormFields.indices), + }), + }); + + return response.apiKey.encoded; + }, + }); + + return { + apiKey: data, + isLoading, + isSuccess, + isError, + action: mutateAsync, + }; +}; diff --git a/x-pack/plugins/search_playground/public/hooks/use_indices_fields.ts b/x-pack/plugins/search_playground/public/hooks/use_indices_fields.ts new file mode 100644 index 0000000000000..1e0dc14850836 --- /dev/null +++ b/x-pack/plugins/search_playground/public/hooks/use_indices_fields.ts @@ -0,0 +1,34 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { useQuery } from '@tanstack/react-query'; +import { useKibana } from './use_kibana'; +import { APIRoutes, IndicesQuerySourceFields } from '../types'; + +export const useIndicesFields = (indices: string[]) => { + const { services } = useKibana(); + + const { data, isLoading } = useQuery({ + enabled: indices.length > 0, + queryKey: ['fields', indices.toString()], + initialData: {}, + queryFn: async () => { + const response = await services.http.post( + APIRoutes.POST_QUERY_SOURCE_FIELDS, + { + body: JSON.stringify({ + indices, + }), + } + ); + + return response; + }, + }); + + return { fields: data!, isLoading }; +}; diff --git a/x-pack/plugins/search_playground/public/hooks/use_kibana.ts b/x-pack/plugins/search_playground/public/hooks/use_kibana.ts new file mode 100644 index 0000000000000..90fa7597e17dc --- /dev/null +++ b/x-pack/plugins/search_playground/public/hooks/use_kibana.ts @@ -0,0 +1,11 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { useKibana as _useKibana } from '@kbn/kibana-react-plugin/public'; +import { AppServicesContext } from '../types'; + +export const useKibana = () => _useKibana(); diff --git a/x-pack/plugins/search_playground/public/hooks/use_query_indices.ts b/x-pack/plugins/search_playground/public/hooks/use_query_indices.ts new file mode 100644 index 0000000000000..a5806c1412f28 --- /dev/null +++ b/x-pack/plugins/search_playground/public/hooks/use_query_indices.ts @@ -0,0 +1,38 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { useQuery } from '@tanstack/react-query'; +import { IndexName } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import { useKibana } from './use_kibana'; +import { ElasticsearchIndex } from '../types'; + +export const useQueryIndices = ( + query: string = '' +): { indices: IndexName[]; isLoading: boolean } => { + const { services } = useKibana(); + + const { data, isLoading } = useQuery({ + queryKey: ['indices', query], + queryFn: async () => { + const response = await services.http.get<{ + indices: ElasticsearchIndex[]; + }>('/internal/enterprise_search/indices', { + query: { + from: 0, + only_show_search_optimized_indices: false, + return_hidden_indices: false, + search_query: query, + size: 20, + }, + }); + + return response.indices.map((index) => index.name); + }, + }); + + return { indices: data || [], isLoading }; +}; diff --git a/x-pack/plugins/search_playground/public/hooks/use_source_indices_field.ts b/x-pack/plugins/search_playground/public/hooks/use_source_indices_field.ts new file mode 100644 index 0000000000000..1192c475d36c5 --- /dev/null +++ b/x-pack/plugins/search_playground/public/hooks/use_source_indices_field.ts @@ -0,0 +1,28 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { IndexName } from '@elastic/elasticsearch/lib/api/types'; +import { useController } from 'react-hook-form'; +import { ChatFormFields } from '../types'; + +export const useSourceIndicesField = () => { + const { + field: { value: selectedIndices, onChange }, + } = useController({ name: ChatFormFields.indices, defaultValue: [] }); + const addIndex = (newIndex: IndexName) => { + onChange([...selectedIndices, newIndex]); + }; + const removeIndex = (index: IndexName) => { + onChange(selectedIndices.filter((indexName: string) => indexName !== index)); + }; + + return { + selectedIndices, + addIndex, + removeIndex, + }; +}; diff --git a/x-pack/plugins/search_playground/public/index.ts b/x-pack/plugins/search_playground/public/index.ts new file mode 100644 index 0000000000000..b7fc5397bf51e --- /dev/null +++ b/x-pack/plugins/search_playground/public/index.ts @@ -0,0 +1,14 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { SearchPlaygroundPlugin } from './plugin'; + +export function plugin() { + return new SearchPlaygroundPlugin(); +} + +export type { SearchPlaygroundPluginSetup, SearchPlaygroundPluginStart } from './types'; diff --git a/x-pack/plugins/search_playground/public/plugin.ts b/x-pack/plugins/search_playground/public/plugin.ts new file mode 100644 index 0000000000000..41eb85215eda1 --- /dev/null +++ b/x-pack/plugins/search_playground/public/plugin.ts @@ -0,0 +1,45 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { CoreSetup, Plugin, CoreStart, AppMountParameters } from '@kbn/core/public'; +import { PLUGIN_ID, PLUGIN_NAME } from '../common'; +import { PlaygroundToolbar, PlaygroundProvider, Playground } from './embeddable'; +import { + AppPluginStartDependencies, + SearchPlaygroundPluginSetup, + SearchPlaygroundPluginStart, +} from './types'; + +export class SearchPlaygroundPlugin + implements Plugin +{ + public setup(core: CoreSetup): SearchPlaygroundPluginSetup { + return {}; + + core.application.register({ + id: PLUGIN_ID, + appRoute: '/app/search_playground', + title: PLUGIN_NAME, + async mount(params: AppMountParameters) { + const { renderApp } = await import('./application'); + const [coreStart, depsStart] = await core.getStartServices(); + + return renderApp(coreStart, depsStart as AppPluginStartDependencies, params); + }, + }); + } + + public start(core: CoreStart, deps: AppPluginStartDependencies): SearchPlaygroundPluginStart { + return { + PlaygroundProvider, + PlaygroundToolbar, + Playground, + }; + } + + public stop() {} +} diff --git a/x-pack/plugins/search_playground/public/providers/playground_provider.tsx b/x-pack/plugins/search_playground/public/providers/playground_provider.tsx new file mode 100644 index 0000000000000..54e9b3363411f --- /dev/null +++ b/x-pack/plugins/search_playground/public/providers/playground_provider.tsx @@ -0,0 +1,27 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; +import { FormProvider, useForm } from 'react-hook-form'; +import { ChatForm } from '../types'; + +const queryClient = new QueryClient({}); + +export const PlaygroundProvider: React.FC = ({ children }) => { + const form = useForm({ + defaultValues: { + prompt: 'You are an assistant for question-answering tasks.', + }, + }); + + return ( + + {children} + + ); +}; diff --git a/x-pack/plugins/search_playground/public/types.ts b/x-pack/plugins/search_playground/public/types.ts new file mode 100644 index 0000000000000..f0a97b092dd5f --- /dev/null +++ b/x-pack/plugins/search_playground/public/types.ts @@ -0,0 +1,187 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { + HealthStatus, + IndexName, + IndicesStatsIndexMetadataState, + QueryDslQueryContainer, + Uuid, +} from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import { NavigationPublicPluginStart } from '@kbn/navigation-plugin/public'; +import { SecurityPluginStart } from '@kbn/security-plugin/public'; +import { HttpStart } from '@kbn/core-http-browser'; +import React from 'react'; +import { SharePluginStart } from '@kbn/share-plugin/public'; +import type { App } from './components/app'; +import type { PlaygroundProvider as PlaygroundProviderComponent } from './providers/playground_provider'; +import type { Toolbar } from './components/toolbar'; + +export * from '../common/types'; + +// eslint-disable-next-line @typescript-eslint/no-empty-interface +export interface SearchPlaygroundPluginSetup {} +export interface SearchPlaygroundPluginStart { + PlaygroundProvider: React.FC>; + PlaygroundToolbar: React.FC>; + Playground: React.FC>; +} + +export interface AppPluginStartDependencies { + navigation: NavigationPublicPluginStart; +} + +export interface AppServicesContext { + http: HttpStart; + security: SecurityPluginStart; + share: SharePluginStart; +} + +export enum ChatFormFields { + question = 'question', + citations = 'citations', + prompt = 'prompt', + openAIKey = 'api_key', + indices = 'indices', + elasticsearchQuery = 'elasticsearch_query', + summarizationModel = 'summarization_model', +} + +export interface ChatForm { + [ChatFormFields.question]: string; + [ChatFormFields.prompt]: string; + [ChatFormFields.citations]: boolean; + [ChatFormFields.openAIKey]: string; + [ChatFormFields.indices]: string[]; + [ChatFormFields.summarizationModel]: string; + [ChatFormFields.elasticsearchQuery]: QueryDslQueryContainer; +} + +export enum MessageRole { + 'user' = 'human', + 'assistant' = 'assistant', + 'system' = 'system', +} + +export interface Message { + id: string; + content: string | React.ReactNode; + createdAt?: Date; + annotations?: Annotation[]; + role: MessageRole; +} + +export interface DocAnnotation { + metadata: { id: string; score: number }; + pageContent: string; +} + +export interface Annotation { + type: 'citations' | 'retrieved_docs'; + documents: DocAnnotation[]; +} + +export interface Doc { + id: string; + content: string; +} + +export interface AIMessage extends Message { + role: MessageRole.assistant; + citations: Doc[]; + retrievalDocs: Doc[]; +} + +export enum SummarizationModelName { + gpt3_5 = 'gpt-3.5-turbo', + gpt3_5_turbo_1106 = 'gpt-3.5-turbo-1106', + gpt3_5_turbo_16k = 'gpt-3.5-turbo-16k', + gpt3_5_turbo_16k_0613 = 'gpt-3.5-turbo-16k-0613', + gpt3_5_turbo = 'gpt-3.5-turbo-instruct', +} + +export interface ElasticsearchIndex { + count: number; // Elasticsearch _count + has_in_progress_syncs?: boolean; // these default to false if not a connector or crawler + has_pending_syncs?: boolean; + health?: HealthStatus; + hidden: boolean; + name: IndexName; + status?: IndicesStatsIndexMetadataState; + total: { + docs: { + count: number; // Lucene count (includes nested documents) + deleted: number; + }; + store: { + size_in_bytes: string; + }; + }; + uuid?: Uuid; +} + +export type JSONValue = null | string | number | boolean | { [x: string]: JSONValue } | JSONValue[]; + +export interface ChatRequestOptions { + options?: RequestOptions; + data?: Record; +} + +export type CreateMessage = Omit & { + id?: Message['id']; +}; + +export interface ChatRequest extends Pick { + messages: Message[]; +} + +export interface UseChatOptions { + api?: string | ((init: RequestInit) => Promise); + id?: string; + initialInput?: string; + onError?: (error: Error) => void; + headers?: Record | Headers; + body?: object; +} + +export interface AssistantMessage { + id: string; + role: 'assistant'; + content: Array<{ + type: 'text'; + text: { + value: string; + }; + }>; +} + +export interface RequestOptions { + headers?: Record | Headers; + body?: object; +} + +export interface UseChatHelpers { + messages: Message[]; + error: undefined | Error; + append: ( + message: Message | CreateMessage, + chatRequestOptions?: ChatRequestOptions + ) => Promise; + reload: (chatRequestOptions?: ChatRequestOptions) => Promise; + stop: () => void; + setMessages: (messages: Message[]) => void; + input: string; + setInput: React.Dispatch>; + handleInputChange: ( + e: React.ChangeEvent | React.ChangeEvent + ) => void; + handleSubmit: ( + e: React.FormEvent, + chatRequestOptions?: ChatRequestOptions + ) => void; + isLoading: boolean; +} diff --git a/x-pack/plugins/search_playground/public/utils/api.ts b/x-pack/plugins/search_playground/public/utils/api.ts new file mode 100644 index 0000000000000..3cdf8053547b0 --- /dev/null +++ b/x-pack/plugins/search_playground/public/utils/api.ts @@ -0,0 +1,149 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { v4 as uuidv4 } from 'uuid'; +import { readDataStream } from './stream'; +import { Annotation, Message, MessageRole } from '../types'; + +export async function fetchApi({ + api, + messages, + body, + headers, + abortController, + handleFailure, + onUpdate, +}: { + api: string | ((init: RequestInit) => Promise); + messages: Array>; + body: Record; + headers?: HeadersInit; + appendMessage: (message: Message) => void; + abortController?: () => AbortController | null; + handleFailure: () => void; + onUpdate: (mergedMessages: Message[]) => void; +}) { + const requestInit = { + method: 'POST', + body: JSON.stringify({ + messages, + ...body, + }), + headers: { + 'Content-Type': 'application/json', + ...headers, + }, + signal: abortController?.()?.signal, + }; + + const apiRequest = typeof api === 'string' ? fetch(api, requestInit) : api(requestInit); + + const apiResponse = await apiRequest.catch((error) => { + handleFailure(); + throw error; + }); + + if (!apiResponse.ok) { + handleFailure(); + throw new Error((await apiResponse.text()) || 'Failed to fetch the chat response.'); + } + + if (!apiResponse.body) { + throw new Error('The response body is empty.'); + } + + const reader = apiResponse.body.getReader(); + + return await parseDataStream({ + reader, + abortControllerRef: abortController != null ? { current: abortController() } : undefined, + update: onUpdate, + }); +} + +interface PrefixMap { + text?: Message; +} + +function assignAnnotationsToMessage( + message: T, + annotations: Annotation[] | undefined +): T { + if (!message || !annotations || !annotations.length) return message; + return { ...message, annotations: [...annotations] } as T; +} + +export async function parseDataStream({ + reader, + abortControllerRef, + update, + generateId = uuidv4, + getCurrentDate = () => new Date(), +}: { + reader: ReadableStreamDefaultReader; + abortControllerRef?: { + current: AbortController | null; + }; + update: (mergedMessages: Message[]) => void; + generateId?: () => string; + getCurrentDate?: () => Date; +}) { + const createdAt = getCurrentDate(); + const prefixMap: PrefixMap = {}; + let messageAnnotations: Annotation[] | undefined; + + for await (const { type, value } of readDataStream(reader, { + isAborted: () => abortControllerRef?.current === null, + })) { + if (type === 'text') { + if (prefixMap.text) { + prefixMap.text = { + ...prefixMap.text, + content: (prefixMap.text.content || '') + value, + }; + } else { + prefixMap.text = { + id: generateId(), + role: MessageRole.assistant, + content: value, + createdAt, + }; + } + } + + let responseMessage = prefixMap.text; + + if (type === 'message_annotations') { + if (!messageAnnotations) { + messageAnnotations = [...(value as unknown as Annotation[])]; + } else { + messageAnnotations.push(...(value as unknown as Annotation[])); + } + + responseMessage = assignAnnotationsToMessage(prefixMap.text, messageAnnotations); + } + + if (messageAnnotations?.length) { + const messagePrefixKeys: Array = ['text']; + messagePrefixKeys.forEach((key) => { + if (prefixMap[key]) { + (prefixMap[key] as Message).annotations = [...messageAnnotations!]; + } + }); + } + + const mergedMessages = [responseMessage].filter(Boolean).map((message) => ({ + ...assignAnnotationsToMessage(message, messageAnnotations), + })) as Message[]; + + update(mergedMessages); + } + + return { + messages: [prefixMap.text].filter(Boolean) as Message[], + }; +} diff --git a/x-pack/plugins/search_playground/public/utils/create_query.test.ts b/x-pack/plugins/search_playground/public/utils/create_query.test.ts new file mode 100644 index 0000000000000..ba663144f4e43 --- /dev/null +++ b/x-pack/plugins/search_playground/public/utils/create_query.test.ts @@ -0,0 +1,430 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { IndicesQuerySourceFields } from '../types'; +import { createQuery, getDefaultQueryFields, getDefaultSourceFields } from './create_query'; + +describe('create_query', () => { + describe('createQuery', () => { + it('should return a query', () => { + const fields = { + index1: ['field1'], + }; + + const fieldDescriptors: IndicesQuerySourceFields = { + index1: { + elser_query_fields: [{ field: 'field1', model_id: 'model1', nested: false }], + dense_vector_query_fields: [], + bm25_query_fields: [], + source_fields: [], + }, + }; + + expect(createQuery(fields, fieldDescriptors)).toEqual({ + query: { + bool: { + should: [ + { + text_expansion: { + field1: { + model_id: 'model1', + model_text: '{query}', + }, + }, + }, + ], + minimum_should_match: 1, + }, + }, + }); + }); + + it('should return a query from multiple ', () => { + const fields = { + index1: ['field1'], + index2: ['field1'], + }; + + const fieldDescriptors: IndicesQuerySourceFields = { + index1: { + elser_query_fields: [{ field: 'field1', model_id: 'model1', nested: false }], + dense_vector_query_fields: [], + bm25_query_fields: [], + source_fields: [], + }, + index2: { + elser_query_fields: [{ field: 'field1', model_id: 'model1', nested: false }], + dense_vector_query_fields: [], + bm25_query_fields: [], + source_fields: [], + }, + }; + + expect(createQuery(fields, fieldDescriptors)).toEqual({ + query: { + bool: { + should: [ + { + text_expansion: { + field1: { + model_id: 'model1', + model_text: '{query}', + }, + }, + }, + ], + minimum_should_match: 1, + }, + }, + }); + }); + + it('should return a query from multiple fields', () => { + const fields = { + index1: ['field1'], + index2: ['field2'], + }; + + const fieldDescriptors: IndicesQuerySourceFields = { + index1: { + elser_query_fields: [{ field: 'field1', model_id: 'model1', nested: false }], + dense_vector_query_fields: [], + bm25_query_fields: [], + source_fields: [], + }, + index2: { + elser_query_fields: [{ field: 'field2', model_id: 'model1', nested: false }], + dense_vector_query_fields: [], + bm25_query_fields: [], + source_fields: [], + }, + }; + + expect(createQuery(fields, fieldDescriptors)).toEqual({ + query: { + bool: { + should: [ + { + text_expansion: { + field1: { + model_id: 'model1', + model_text: '{query}', + }, + }, + }, + { + text_expansion: { + field2: { + model_id: 'model1', + model_text: '{query}', + }, + }, + }, + ], + minimum_should_match: 1, + }, + }, + }); + }); + + it('should return a hybrid query', () => { + const fields = { + index1: ['field1', 'content', 'title'], + index2: ['field2'], + }; + + const fieldDescriptors: IndicesQuerySourceFields = { + index1: { + elser_query_fields: [{ field: 'field1', model_id: 'model1', nested: false }], + dense_vector_query_fields: [], + bm25_query_fields: ['content', 'title'], + source_fields: [], + }, + index2: { + elser_query_fields: [{ field: 'field2', model_id: 'model1', nested: false }], + dense_vector_query_fields: [], + bm25_query_fields: [], + source_fields: [], + }, + }; + + expect(createQuery(fields, fieldDescriptors)).toEqual({ + query: { + bool: { + should: [ + { + text_expansion: { + field1: { + model_id: 'model1', + model_text: '{query}', + }, + }, + }, + { + multi_match: { + query: '{query}', + fields: ['content', 'title'], + }, + }, + { + text_expansion: { + field2: { + model_id: 'model1', + model_text: '{query}', + }, + }, + }, + ], + minimum_should_match: 1, + }, + }, + }); + }); + + it('dense vector only', () => { + const fields = { + index1: ['field1'], + }; + + const fieldDescriptors: IndicesQuerySourceFields = { + index1: { + elser_query_fields: [], + dense_vector_query_fields: [{ field: 'field1', model_id: 'model1', nested: false }], + bm25_query_fields: ['content', 'title'], + source_fields: [], + }, + index2: { + elser_query_fields: [{ field: 'field2', model_id: 'model1', nested: false }], + dense_vector_query_fields: [], + bm25_query_fields: [], + source_fields: [], + }, + }; + + expect(createQuery(fields, fieldDescriptors)).toEqual({ + knn: [ + { + field: 'field1', + k: 10, + num_candidates: 100, + query_vector_builder: { + text_embedding: { + model_id: 'model1', + model_text: '{query}', + }, + }, + }, + ], + }); + }); + + it('dense vector + bm25 only', () => { + const fields = { + index1: ['field1', 'title', 'content'], + }; + + const fieldDescriptors: IndicesQuerySourceFields = { + index1: { + elser_query_fields: [], + dense_vector_query_fields: [{ field: 'field1', model_id: 'model1', nested: false }], + bm25_query_fields: ['content', 'title'], + source_fields: [], + }, + }; + + expect(createQuery(fields, fieldDescriptors)).toEqual({ + query: { + bool: { + should: [ + { + multi_match: { + query: '{query}', + fields: ['title', 'content'], + }, + }, + ], + minimum_should_match: 1, + }, + }, + knn: [ + { + field: 'field1', + k: 10, + num_candidates: 100, + query_vector_builder: { + text_embedding: { + model_id: 'model1', + model_text: '{query}', + }, + }, + }, + ], + }); + }); + }); + + describe('getDefaultQueryFields', () => { + it('should return default ELSER query fields', () => { + const fieldDescriptors: IndicesQuerySourceFields = { + index1: { + elser_query_fields: [{ field: 'field1', model_id: 'model1', nested: false }], + dense_vector_query_fields: [{ field: 'field1', model_id: 'dense_model', nested: false }], + bm25_query_fields: [], + source_fields: [], + }, + }; + + expect(getDefaultQueryFields(fieldDescriptors)).toEqual({ index1: ['field1'] }); + }); + + it('should return default elser query fields for multiple indices', () => { + const fieldDescriptors: IndicesQuerySourceFields = { + index1: { + elser_query_fields: [{ field: 'field1', model_id: 'model1', nested: false }], + dense_vector_query_fields: [ + { field: 'dv_field1', model_id: 'dense_model', nested: false }, + ], + bm25_query_fields: [], + source_fields: [], + }, + index2: { + elser_query_fields: [{ field: 'vector', model_id: 'model1', nested: false }], + dense_vector_query_fields: [ + { field: 'dv_field1', model_id: 'dense_model', nested: false }, + ], + bm25_query_fields: [], + source_fields: [], + }, + }; + + expect(getDefaultQueryFields(fieldDescriptors)).toEqual({ + index1: ['field1'], + index2: ['vector'], + }); + }); + + it('should return elser query fields for default fields', () => { + const fieldDescriptors: IndicesQuerySourceFields = { + index1: { + elser_query_fields: [{ field: 'field1', model_id: 'model1', nested: false }], + dense_vector_query_fields: [ + { field: 'dv_field1', model_id: 'dense_model', nested: false }, + ], + bm25_query_fields: [], + source_fields: [], + }, + index2: { + elser_query_fields: [{ field: 'vector', model_id: 'model1', nested: false }], + dense_vector_query_fields: [ + { field: 'dv_field1', model_id: 'dense_model', nested: false }, + ], + bm25_query_fields: [], + source_fields: [], + }, + }; + + expect(getDefaultQueryFields(fieldDescriptors)).toEqual({ + index1: ['field1'], + index2: ['vector'], + }); + }); + + it('should fallback to dense vector fields for index', () => { + const fieldDescriptors: IndicesQuerySourceFields = { + index1: { + elser_query_fields: [], + dense_vector_query_fields: [ + { field: 'dv_field1', model_id: 'dense_model', nested: false }, + ], + bm25_query_fields: [], + source_fields: [], + }, + }; + + expect(getDefaultQueryFields(fieldDescriptors)).toEqual({ index1: ['dv_field1'] }); + }); + + it('should fallback to all BM25 fields in index, using suggested fields', () => { + const fieldDescriptors: IndicesQuerySourceFields = { + index1: { + elser_query_fields: [], + dense_vector_query_fields: [], + bm25_query_fields: ['title', 'text', 'content'], + source_fields: [], + }, + }; + + expect(getDefaultQueryFields(fieldDescriptors)).toEqual({ + index1: ['title', 'text', 'content'], + }); + }); + + it('should fallback to all BM25 fields in index, only using first unrecognised field', () => { + const fieldDescriptors: IndicesQuerySourceFields = { + index1: { + elser_query_fields: [], + dense_vector_query_fields: [], + bm25_query_fields: ['unknown1', 'unknown2'], + source_fields: [], + }, + }; + + expect(getDefaultQueryFields(fieldDescriptors)).toEqual({ + index1: ['unknown1'], + }); + }); + }); + + describe('getDefaultSourceFields', () => { + it('should return default source fields', () => { + const fieldDescriptors: IndicesQuerySourceFields = { + 'search-search-labs': { + elser_query_fields: [], + dense_vector_query_fields: [], + bm25_query_fields: [ + 'additional_urls', + 'title', + 'links', + 'id', + 'url_host', + 'url_path', + 'url_path_dir3', + 'body_content', + 'domains', + 'url', + 'url_scheme', + 'meta_description', + 'headings', + 'url_path_dir2', + 'url_path_dir1', + ], + source_fields: [ + 'additional_urls', + 'title', + 'links', + 'id', + 'url_host', + 'url_path', + 'url_path_dir3', + 'body_content', + 'domains', + 'url', + 'url_scheme', + 'meta_description', + 'headings', + 'url_path_dir2', + 'url_path_dir1', + ], + }, + }; + + expect(getDefaultSourceFields(fieldDescriptors)).toEqual({ + 'search-search-labs': ['body_content'], + }); + }); + }); +}); diff --git a/x-pack/plugins/search_playground/public/utils/create_query.ts b/x-pack/plugins/search_playground/public/utils/create_query.ts new file mode 100644 index 0000000000000..4649e9c9d6523 --- /dev/null +++ b/x-pack/plugins/search_playground/public/utils/create_query.ts @@ -0,0 +1,196 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { IndicesQuerySourceFields } from '../types'; + +type IndexFields = Record; + +// These fields are used to suggest the fields to use for the query +// If the field is not found in the suggested fields, +// we will use the first field for BM25 and all fields for vectors +const SUGGESTED_SPARSE_FIELDS = [ + 'vector.tokens', // LangChain field +]; + +const SUGGESTED_BM25_FIELDS = ['title', 'body_content', 'text', 'content']; + +const SUGGESTED_DENSE_VECTOR_FIELDS = ['content_vector.tokens']; + +const SUGGESTED_SOURCE_FIELDS = ['body_content', 'content', 'text']; + +interface Matches { + queryMatches: any[]; + knnMatches: any[]; +} + +export function createQuery(fields: IndexFields, fieldDescriptors: IndicesQuerySourceFields) { + const boolMatches = Object.keys(fields).reduce( + (acc, index) => { + const indexFields = fields[index]; + const indexFieldDescriptors = fieldDescriptors[index]; + + const sparseMatches = + indexFields.map((field) => { + const elserField = indexFieldDescriptors.elser_query_fields.find( + (x) => x.field === field + ); + + if (elserField) { + // when another index has the same field, we don't want to duplicate the match rule + const hasExistingSparseMatch = acc.queryMatches.find( + (x: any) => + x?.text_expansion?.[field] && + x?.text_expansion?.[field].model_id === elserField?.model_id + ); + + if (hasExistingSparseMatch) { + return null; + } + + return { + text_expansion: { + [elserField.field]: { + model_id: elserField.model_id, + model_text: '{query}', + }, + }, + }; + } + return null; + }) || []; + + const bm25Fields = indexFields.filter((field) => + indexFieldDescriptors.bm25_query_fields.includes(field) + ); + + const bm25Match = + bm25Fields.length > 0 + ? { + multi_match: { + query: '{query}', + fields: bm25Fields, + }, + } + : null; + + const knnMatches = indexFields + .map((field) => { + const denseVectorField = indexFieldDescriptors.dense_vector_query_fields.find( + (x) => x.field === field + ); + + if (denseVectorField) { + return { + field: denseVectorField.field, + k: 10, + num_candidates: 100, + query_vector_builder: { + text_embedding: { + model_id: denseVectorField.model_id, + model_text: '{query}', + }, + }, + }; + } + return null; + }) + .filter((x) => !!x); + + const matches = [...sparseMatches, bm25Match].filter((x) => !!x); + + return { + queryMatches: [...acc.queryMatches, ...matches], + knnMatches: [...acc.knnMatches, ...knnMatches], + }; + }, + { + queryMatches: [], + knnMatches: [], + } + ); + + return { + ...(boolMatches.queryMatches.length > 0 + ? { + query: { + bool: { + should: boolMatches.queryMatches, + minimum_should_match: 1, + }, + }, + } + : {}), + ...(boolMatches.knnMatches.length > 0 ? { knn: boolMatches.knnMatches } : {}), + }; +} + +export function getDefaultSourceFields(fieldDescriptors: IndicesQuerySourceFields): IndexFields { + const indexFields = Object.keys(fieldDescriptors).reduce( + (acc: IndexFields, index: string) => { + const indexFieldDescriptors = fieldDescriptors[index]; + + const suggested = indexFieldDescriptors.source_fields.filter((x) => + SUGGESTED_SOURCE_FIELDS.includes(x) + ); + + return { + ...acc, + [index]: suggested, + }; + }, + {} + ); + + return indexFields; +} + +export function getDefaultQueryFields(fieldDescriptors: IndicesQuerySourceFields): IndexFields { + const indexFields = Object.keys(fieldDescriptors).reduce( + (acc: IndexFields, index: string) => { + const indexFieldDescriptors = fieldDescriptors[index]; + const fields: string[] = []; + + if (indexFieldDescriptors.elser_query_fields.length > 0) { + const suggested = indexFieldDescriptors.elser_query_fields.filter((x) => + SUGGESTED_SPARSE_FIELDS.includes(x.field) + ); + if (suggested.length > 0) { + fields.push(...suggested.map((x) => x.field)); + } else { + fields.push(...indexFieldDescriptors.elser_query_fields.map((x) => x.field)); + } + } else if (indexFieldDescriptors.dense_vector_query_fields.length > 0) { + const suggested = indexFieldDescriptors.dense_vector_query_fields.filter((x) => + SUGGESTED_DENSE_VECTOR_FIELDS.includes(x.field) + ); + + if (suggested.length > 0) { + fields.push(...suggested.map((x) => x.field)); + } else { + fields.push(...indexFieldDescriptors.dense_vector_query_fields.map((x) => x.field)); + } + } else if (indexFieldDescriptors.bm25_query_fields.length > 0) { + const suggested = indexFieldDescriptors.bm25_query_fields.filter((x) => + SUGGESTED_BM25_FIELDS.includes(x) + ); + if (suggested.length > 0) { + fields.push(...suggested); + } else { + fields.push(indexFieldDescriptors.bm25_query_fields[0]); + } + } + + return { + ...acc, + [index]: fields, + }; + }, + {} + ); + + return indexFields; +} diff --git a/x-pack/plugins/search_playground/public/utils/stream.ts b/x-pack/plugins/search_playground/public/utils/stream.ts new file mode 100644 index 0000000000000..57146263d2653 --- /dev/null +++ b/x-pack/plugins/search_playground/public/utils/stream.ts @@ -0,0 +1,172 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { JSONValue } from '../types'; + +export interface StreamPart { + code: CODE; + name: NAME; + parse: (value: JSONValue) => { type: NAME; value: TYPE }; +} + +type StreamParts = + | typeof textStreamPart + | typeof errorStreamPart + | typeof messageAnnotationsStreamPart; +/** + * Maps the type of a stream part to its value type. + */ +type StreamPartValueType = { + [P in StreamParts as P['name']]: ReturnType['value']; +}; + +export type StreamPartType = + | ReturnType + | ReturnType + | ReturnType; + +const NEWLINE = '\n'.charCodeAt(0); + +const concatChunks = (chunks: Uint8Array[], totalLength: number) => { + const concatenatedChunks = new Uint8Array(totalLength); + + let offset = 0; + for (const chunk of chunks) { + concatenatedChunks.set(chunk, offset); + offset += chunk.length; + } + chunks.length = 0; + + return concatenatedChunks; +}; + +export async function* readDataStream( + reader: ReadableStreamDefaultReader, + { isAborted }: { isAborted?: () => boolean } = {} +): AsyncGenerator { + const decoder = new TextDecoder(); + const chunks: Uint8Array[] = []; + let totalLength = 0; + + while (true) { + const { value } = await reader.read(); + + if (value) { + chunks.push(value); + totalLength += value.length; + if (value[value.length - 1] !== NEWLINE) { + continue; + } + } + + if (chunks.length === 0) { + break; + } + + const concatenatedChunks = concatChunks(chunks, totalLength); + totalLength = 0; + + const streamParts = decoder + .decode(concatenatedChunks, { stream: true }) + .split('\n') + .filter((line) => line !== '') + .map(parseStreamPart); + + for (const streamPart of streamParts) { + yield streamPart; + } + + if (isAborted?.()) { + reader.cancel(); + break; + } + } +} + +const createStreamPart = ( + code: CODE, + name: NAME, + parse: (value: JSONValue) => { type: NAME; value: TYPE } +): StreamPart => { + return { + code, + name, + parse, + }; +}; + +const textStreamPart = createStreamPart('0', 'text', (value) => { + if (typeof value !== 'string') { + throw new Error('"text" parts expect a string value.'); + } + return { type: 'text', value }; +}); + +const errorStreamPart = createStreamPart('3', 'error', (value) => { + if (typeof value !== 'string') { + throw new Error('"error" parts expect a string value.'); + } + return { type: 'error', value }; +}); + +const messageAnnotationsStreamPart = createStreamPart('8', 'message_annotations', (value) => { + if (!Array.isArray(value)) { + throw new Error('"message_annotations" parts expect an array value.'); + } + + return { type: 'message_annotations', value }; +}); + +const streamParts = [textStreamPart, errorStreamPart, messageAnnotationsStreamPart] as const; + +type StreamPartMap = { + [P in StreamParts as P['code']]: P; +}; + +const streamPartsByCode: StreamPartMap = streamParts.reduce( + (acc, part) => ({ + ...acc, + [part.code]: part, + }), + {} as StreamPartMap +); + +const validCodes = streamParts.map((part) => part.code); + +export const parseStreamPart = (line: string): StreamPartType => { + const firstSeparatorIndex = line.indexOf(':'); + + if (firstSeparatorIndex === -1) { + throw new Error('Failed to parse stream string. No separator found.'); + } + + const prefix = line.slice(0, firstSeparatorIndex) as keyof StreamPartMap; + + if (!validCodes.includes(prefix)) { + throw new Error(`Failed to parse stream string. Invalid code ${prefix}.`); + } + + const code = prefix as keyof StreamPartMap; + + const textValue = line.slice(firstSeparatorIndex + 1); + const jsonValue: JSONValue = JSON.parse(textValue); + + return streamPartsByCode[code].parse(jsonValue); +}; + +export const formatStreamPart = ( + type: T, + value: StreamPartValueType[T] +): string => { + const streamPart = streamParts.find((part) => part.name === type); + + if (!streamPart) { + throw new Error(`Invalid stream part type: ${type as string}`); + } + + return `${streamPart.code}:${JSON.stringify(value)}\n`; +}; diff --git a/x-pack/plugins/search_playground/public/utils/transform_annotation_to_doc.ts b/x-pack/plugins/search_playground/public/utils/transform_annotation_to_doc.ts new file mode 100644 index 0000000000000..ae5fdeb989990 --- /dev/null +++ b/x-pack/plugins/search_playground/public/utils/transform_annotation_to_doc.ts @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { DocAnnotation, Doc } from '../types'; + +export const transformAnnotationToDoc = (docAnnotation: DocAnnotation): Doc => ({ + id: docAnnotation.metadata.id, + content: docAnnotation.pageContent, +}); diff --git a/x-pack/plugins/search_playground/public/utils/transform_to_messages.ts b/x-pack/plugins/search_playground/public/utils/transform_to_messages.ts new file mode 100644 index 0000000000000..76c7fb76fa5c4 --- /dev/null +++ b/x-pack/plugins/search_playground/public/utils/transform_to_messages.ts @@ -0,0 +1,37 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { AIMessage, Message, MessageRole, UseChatHelpers } from '../types'; +import { transformAnnotationToDoc } from './transform_annotation_to_doc'; + +export const transformFromChatMessages = (messages: UseChatHelpers['messages']): Message[] => + messages.map(({ id, content, createdAt, role, annotations }) => { + const commonMessageProp = { + id, + content, + createdAt, + role: role === MessageRole.assistant ? MessageRole.assistant : MessageRole.user, + }; + + if (role === MessageRole.assistant) { + return { + ...commonMessageProp, + citations: Array.isArray(annotations) + ? annotations + .find((annotation) => annotation.type === 'citations') + ?.documents?.map(transformAnnotationToDoc) + : [], + retrievalDocs: Array.isArray(annotations) + ? annotations + .find((annotation) => annotation.type === 'retrieved_docs') + ?.documents?.map(transformAnnotationToDoc) + : [], + } as AIMessage; + } + + return commonMessageProp; + }); diff --git a/x-pack/plugins/search_playground/server/index.ts b/x-pack/plugins/search_playground/server/index.ts new file mode 100644 index 0000000000000..b47f80abe4854 --- /dev/null +++ b/x-pack/plugins/search_playground/server/index.ts @@ -0,0 +1,15 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { PluginInitializerContext } from '@kbn/core/server'; + +export async function plugin(initializerContext: PluginInitializerContext) { + const { SearchPlaygroundPlugin } = await import('./plugin'); + return new SearchPlaygroundPlugin(initializerContext); +} + +export type { SearchPlaygroundPluginSetup, SearchPlaygroundPluginStart } from './types'; diff --git a/x-pack/plugins/search_playground/server/plugin.ts b/x-pack/plugins/search_playground/server/plugin.ts new file mode 100644 index 0000000000000..3bdcff27a817e --- /dev/null +++ b/x-pack/plugins/search_playground/server/plugin.ts @@ -0,0 +1,36 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { PluginInitializerContext, CoreSetup, CoreStart, Plugin, Logger } from '@kbn/core/server'; + +import { SearchPlaygroundPluginSetup, SearchPlaygroundPluginStart } from './types'; +import { defineRoutes } from './routes'; + +export class SearchPlaygroundPlugin + implements Plugin +{ + private readonly logger: Logger; + + constructor(initializerContext: PluginInitializerContext) { + this.logger = initializerContext.logger.get(); + } + + public setup(core: CoreSetup) { + this.logger.debug('searchPlayground: Setup'); + const router = core.http.createRouter(); + + defineRoutes({ router, log: this.logger }); + + return {}; + } + + public start(core: CoreStart) { + return {}; + } + + public stop() {} +} diff --git a/x-pack/plugins/search_playground/server/routes.ts b/x-pack/plugins/search_playground/server/routes.ts new file mode 100644 index 0000000000000..5f8fcd836fd0e --- /dev/null +++ b/x-pack/plugins/search_playground/server/routes.ts @@ -0,0 +1,147 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { schema } from '@kbn/config-schema'; +import { ChatOpenAI } from '@langchain/openai'; +import { streamFactory } from '@kbn/ml-response-stream/server'; +import { Logger } from '@kbn/logging'; +import { IRouter } from '@kbn/core/server'; +import { fetchFields } from './utils/fetch_query_source_fields'; +import { AssistClientOptionsWithClient, createAssist as Assist } from './utils/assist'; +import { ConversationalChain } from './utils/conversational_chain'; +import { Prompt } from './utils/prompt'; +import { errorHandler } from './utils/error_handler'; +import { APIRoutes } from './types'; + +export function defineRoutes({ log, router }: { log: Logger; router: IRouter }) { + router.post( + { + path: APIRoutes.POST_QUERY_SOURCE_FIELDS, + validate: { + body: schema.object({ + indices: schema.arrayOf(schema.string()), + }), + }, + }, + errorHandler(async (context, request, response) => { + const { client } = (await context.core).elasticsearch; + + const { indices } = request.body; + + const fields = await fetchFields(client, indices); + + return response.ok({ + body: fields, + }); + }) + ); + + router.post( + { + path: APIRoutes.POST_CHAT_MESSAGE, + validate: { + body: schema.object({ + data: schema.any(), + messages: schema.any(), + }), + }, + }, + errorHandler(async (context, request, response) => { + const { client } = (await context.core).elasticsearch; + + const aiClient = Assist({ + es_client: client.asCurrentUser, + } as AssistClientOptionsWithClient); + + const { messages, data } = await request.body; + + const model = new ChatOpenAI({ + openAIApiKey: data.api_key, + }); + + const chain = ConversationalChain({ + model, + rag: { + index: data.indices, + retriever: (question: string) => { + try { + const query = JSON.parse(data.elasticsearchQuery.replace(/{query}/g, question)); + return query.query; + } catch (e) { + log.error('Failed to parse the Elasticsearch query', e); + } + }, + }, + prompt: Prompt(data.prompt, { + citations: data.citations, + context: true, + type: 'openai', + }), + }); + + const stream = await chain.stream(aiClient, messages); + + const { end, push, responseWithHeaders } = streamFactory(request.headers, log); + + const reader = (stream as ReadableStream).getReader(); + const textDecoder = new TextDecoder(); + + async function pushStreamUpdate() { + reader.read().then(({ done, value }: { done: boolean; value?: Uint8Array }) => { + if (done) { + end(); + return; + } + push(textDecoder.decode(value)); + pushStreamUpdate(); + }); + } + + pushStreamUpdate(); + + return response.ok(responseWithHeaders); + }) + ); + + router.post( + { + path: APIRoutes.POST_API_KEY, + validate: { + body: schema.object({ + name: schema.string(), + expiresInDays: schema.number(), + indices: schema.arrayOf(schema.string()), + }), + }, + }, + errorHandler(async (context, request, response) => { + const { name, expiresInDays, indices } = request.body; + const { client } = (await context.core).elasticsearch; + + const apiKey = await client.asCurrentUser.security.createApiKey({ + name, + expiration: `${expiresInDays}d`, + role_descriptors: { + [`playground-${name}-role`]: { + cluster: [], + indices: [ + { + names: indices, + privileges: ['read'], + }, + ], + }, + }, + }); + + return response.ok({ + body: { apiKey }, + headers: { 'content-type': 'application/json' }, + }); + }) + ); +} diff --git a/x-pack/plugins/search_playground/server/types.ts b/x-pack/plugins/search_playground/server/types.ts new file mode 100644 index 0000000000000..bf28b884df0b1 --- /dev/null +++ b/x-pack/plugins/search_playground/server/types.ts @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +// eslint-disable-next-line @typescript-eslint/no-empty-interface +export interface SearchPlaygroundPluginSetup {} +// eslint-disable-next-line @typescript-eslint/no-empty-interface +export interface SearchPlaygroundPluginStart {} + +export * from '../common/types'; diff --git a/x-pack/plugins/search_playground/server/utils/assist.ts b/x-pack/plugins/search_playground/server/utils/assist.ts new file mode 100644 index 0000000000000..82847394ea4e9 --- /dev/null +++ b/x-pack/plugins/search_playground/server/utils/assist.ts @@ -0,0 +1,47 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { Client as ElasticsearchClient } from '@elastic/elasticsearch'; + +export interface AssistClientOptionsWithCreds { + cloud_id: string; + api_key: string; +} +export interface AssistClientOptionsWithClient { + es_client: ElasticsearchClient; +} + +export type AssistOptions = AssistClientOptionsWithCreds | AssistClientOptionsWithClient; + +export class AssistClient { + private options: AssistOptions; + protected client: ElasticsearchClient; + + constructor(options: AssistOptions) { + this.options = options as AssistClientOptionsWithCreds; + if ('es_client' in options) { + this.client = (options as AssistClientOptionsWithClient).es_client; + } else { + this.client = new ElasticsearchClient({ + cloud: { + id: this.options.cloud_id, + }, + auth: { + apiKey: this.options.api_key, + }, + }); + } + } + + getClient() { + return this.client; + } +} + +export function createAssist(options: AssistOptions) { + return new AssistClient(options); +} diff --git a/x-pack/plugins/search_playground/server/utils/conversational_chain.ts b/x-pack/plugins/search_playground/server/utils/conversational_chain.ts new file mode 100644 index 0000000000000..c4f5bc353a08b --- /dev/null +++ b/x-pack/plugins/search_playground/server/utils/conversational_chain.ts @@ -0,0 +1,179 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { SearchHit } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import { Document } from '@langchain/core/documents'; +import { BaseChatModel } from '@langchain/core/language_models/chat_models'; +import { ChatPromptTemplate, PromptTemplate } from '@langchain/core/prompts'; +import { Runnable, RunnableLambda, RunnableSequence } from '@langchain/core/runnables'; +import { BytesOutputParser, StringOutputParser } from '@langchain/core/output_parsers'; +import { + createStreamDataTransformer, + experimental_StreamData, + Message as VercelChatMessage, +} from 'ai'; +import { ElasticsearchRetriever } from './elasticsearch_retriever'; +import { renderTemplate } from './render_template'; + +import { AssistClient } from './assist'; +import { getCitations } from './get_citations'; + +interface RAGOptions { + index: string; + retriever: (question: string) => object; + doc_context?: string; + hit_doc_mapper?: (hit: SearchHit) => Document; + content_field?: string; +} + +interface ConversationalChainOptions { + model: BaseChatModel; + prompt: string; + rag?: RAGOptions; +} + +const CONDENSE_QUESTION_TEMPLATE = `Given the following conversation and a follow up question, rephrase the follow up question to be a standalone question, in its original language. Be verbose in your answer. + +Chat History: +{chat_history} + +Follow Up Input: {question} +Standalone question:`; + +const condenseQuestionPrompt = PromptTemplate.fromTemplate(CONDENSE_QUESTION_TEMPLATE); + +const formatVercelMessages = (chatHistory: VercelChatMessage[]) => { + const formattedDialogueTurns = chatHistory.map((message) => { + if (message.role === 'user') { + return `Human: ${message.content}`; + } else if (message.role === 'assistant') { + return `Assistant: ${message.content}`; + } else { + return `${message.role}: ${message.content}`; + } + }); + return formattedDialogueTurns.join('\n'); +}; + +class ConversationalChainFn { + options: ConversationalChainOptions; + + constructor(options: ConversationalChainOptions) { + this.options = options; + } + + async stream(client: AssistClient, msgs: VercelChatMessage[]) { + const data = new experimental_StreamData(); + + const messages = msgs ?? []; + const previousMessages = messages.slice(0, -1); + const question = messages[messages.length - 1]!.content; + const retrievedDocs: Document[] = []; + + let retrievalChain: Runnable = RunnableLambda.from((input) => ''); + + if (this.options.rag) { + const retriever = new ElasticsearchRetriever({ + retriever: this.options.rag.retriever, + index: this.options.rag.index, + client: client.getClient(), + content_field: this.options.rag.content_field ?? 'text', + hit_doc_mapper: this.options.rag.hit_doc_mapper ?? undefined, + k: 3, + }); + + const buildContext = (docs: Document[]) => { + const template = this.options.rag?.doc_context ?? `{pageContent}`; + + const serializedDocs = docs.map((doc, i) => + renderTemplate( + ` + position: ${i + 1} + ${template}`, + { + pageContent: doc.pageContent, + ...doc.metadata, + } + ) + ); + return serializedDocs.join('\n'); + }; + + retrievalChain = retriever.pipe(buildContext); + } + + const standaloneQuestionChain = RunnableSequence.from([ + condenseQuestionPrompt, + this.options.model, + new StringOutputParser(), + ]); + + const prompt = ChatPromptTemplate.fromTemplate(this.options.prompt); + + const answerChain = RunnableSequence.from([ + { + context: RunnableSequence.from([(input) => input.question, retrievalChain]), + chat_history: (input) => input.chat_history, + question: (input) => input.question, + }, + prompt, + this.options.model, + ]); + + const conversationalRetrievalQAChain = RunnableSequence.from([ + { + question: standaloneQuestionChain, + chat_history: (input) => input.chat_history, + }, + answerChain, + new BytesOutputParser(), + ]); + + const stream = await conversationalRetrievalQAChain.stream( + { + question, + chat_history: formatVercelMessages(previousMessages), + }, + { + callbacks: [ + { + handleRetrieverEnd(documents) { + retrievedDocs.push(...documents); + data.appendMessageAnnotation({ + type: 'retrieved_docs', + documents: documents as any, + }); + }, + handleChainEnd(outputs, runId, parentRunId) { + if (outputs?.constructor?.name === 'AIMessageChunk') { + data.appendMessageAnnotation({ + type: 'citations', + documents: getCitations( + outputs.content as string, + 'inline', + retrievedDocs + ) as any, + }); + } + + // check that main chain (without parent) is finished: + if (parentRunId == null) { + data.close(); + } + }, + }, + ], + } + ); + + return stream.pipeThrough(createStreamDataTransformer(true)).pipeThrough(data.stream); + } +} + +export function ConversationalChain(options: ConversationalChainOptions): ConversationalChainFn { + return new ConversationalChainFn(options); +} diff --git a/x-pack/plugins/search_playground/server/utils/elasticsearch_retriever.ts b/x-pack/plugins/search_playground/server/utils/elasticsearch_retriever.ts new file mode 100644 index 0000000000000..78e23c677e53d --- /dev/null +++ b/x-pack/plugins/search_playground/server/utils/elasticsearch_retriever.ts @@ -0,0 +1,95 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { BaseRetriever, type BaseRetrieverInput } from '@langchain/core/retrievers'; +import { Document } from '@langchain/core/documents'; +import { Client } from '@elastic/elasticsearch'; +import { SearchHit } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; + +export interface ElasticsearchRetrieverInput extends BaseRetrieverInput { + /** + * The body of the query to send to Elasticsearch + */ + retriever: (query: string) => object; + /** + * The name of the field the content resides in + */ + content_field: string | ((hit: SearchHit) => Document); + + index: string; + + client: Client; + + k: number; + + hit_doc_mapper?: HitDocMapper; +} + +type HitDocMapper = (hit: SearchHit) => Document; + +export class ElasticsearchRetriever extends BaseRetriever { + static lc_name() { + return 'ElasticsearchRetriever'; + } + + lc_namespace = ['langchain', 'retrievers', 'elasticsearch']; + + query_body_fn: (query: string) => object; + + index: string; + + content_field: string | ((hit: SearchHit) => Document); + + hit_doc_mapper?: HitDocMapper; + + k: number; + + client: Client; + + constructor(params: ElasticsearchRetrieverInput) { + super(params); + this.content_field = params.content_field; + this.query_body_fn = params.retriever; + this.content_field = params.content_field; + + this.index = params.index; + this.k = params.k; + this.client = params.client; + } + + async _getRelevantDocuments(query: string): Promise { + try { + const results = await this.client.search({ + index: this.index, + query: this.query_body_fn(query), + size: this.k, + }); + + const hits = results.hits.hits; + + let mapper: HitDocMapper = (hit: SearchHit) => { + return new Document({ + pageContent: hit._source[this.content_field as string], + metadata: { + score: hit._score, + id: hit._id, + }, + }); + }; + + if (this.hit_doc_mapper) { + mapper = this.hit_doc_mapper; + } + + const documents = hits.map(mapper); + + return documents; + } catch (error) { + throw error; + } + } +} diff --git a/x-pack/plugins/search_playground/server/utils/error_handler.ts b/x-pack/plugins/search_playground/server/utils/error_handler.ts new file mode 100644 index 0000000000000..fd668b56a02ed --- /dev/null +++ b/x-pack/plugins/search_playground/server/utils/error_handler.ts @@ -0,0 +1,18 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { RequestHandlerWrapper } from '@kbn/core-http-server'; + +export const errorHandler: RequestHandlerWrapper = (handler) => { + return async (context, request, response) => { + try { + return await handler(context, request, response); + } catch (e) { + throw e; + } + }; +}; diff --git a/x-pack/plugins/search_playground/server/utils/fetch_query_source_fields.test.ts b/x-pack/plugins/search_playground/server/utils/fetch_query_source_fields.test.ts new file mode 100644 index 0000000000000..e4217637cb8cc --- /dev/null +++ b/x-pack/plugins/search_playground/server/utils/fetch_query_source_fields.test.ts @@ -0,0 +1,80 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { + ELSER_PASSAGE_CHUNKED_TWO_INDICES, + ELSER_PASSAGE_CHUNKED_TWO_INDICES_DOCS, +} from '../../__mocks__/fetch_query_source_fields.mock'; +import { parseFieldsCapabilities } from './fetch_query_source_fields'; + +describe('fetch_query_source_fields', () => { + describe('parseFieldsCapabilities', () => { + it("should return the correct fields for the index 'workplace_index'", () => { + expect( + parseFieldsCapabilities(ELSER_PASSAGE_CHUNKED_TWO_INDICES, [ + { + index: 'workplace_index', + doc: ELSER_PASSAGE_CHUNKED_TWO_INDICES_DOCS[0], + }, + { + index: 'workplace_index2', + doc: ELSER_PASSAGE_CHUNKED_TWO_INDICES_DOCS[1], + }, + ]) + ).toEqual({ + workplace_index: { + elser_query_fields: [ + { + field: 'vector.tokens', + model_id: '.elser_model_2', + nested: false, + }, + ], + dense_vector_query_fields: [], + bm25_query_fields: [ + 'metadata.summary', + 'vector.model_id', + 'metadata.rolePermissions', + 'text', + 'metadata.name', + ], + source_fields: [ + 'metadata.summary', + 'vector.model_id', + 'metadata.rolePermissions', + 'text', + 'metadata.name', + ], + }, + workplace_index2: { + elser_query_fields: [ + { + field: 'content_vector.tokens', + model_id: '.elser_model_2', + nested: false, + }, + ], + dense_vector_query_fields: [], + bm25_query_fields: [ + 'metadata.summary', + 'content', + 'metadata.rolePermissions', + 'content_vector.model_id', + 'metadata.name', + ], + source_fields: [ + 'metadata.summary', + 'content', + 'metadata.rolePermissions', + 'content_vector.model_id', + 'metadata.name', + ], + }, + }); + }); + }); +}); diff --git a/x-pack/plugins/search_playground/server/utils/fetch_query_source_fields.ts b/x-pack/plugins/search_playground/server/utils/fetch_query_source_fields.ts new file mode 100644 index 0000000000000..c751e8bfd361f --- /dev/null +++ b/x-pack/plugins/search_playground/server/utils/fetch_query_source_fields.ts @@ -0,0 +1,106 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { FieldCapsResponse, SearchHit } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import { IScopedClusterClient } from '@kbn/core-elasticsearch-server'; +import { get } from 'lodash'; +import { IndicesQuerySourceFields } from '../types'; + +export const fetchFields = async ( + client: IScopedClusterClient, + indices: string[] +): Promise => { + const fieldCapabilities = await client.asCurrentUser.fieldCaps({ + fields: '*', + filters: '-metadata', + include_unmapped: true, + index: indices, + }); + + const indexDocs = []; + + for (const index of indices) { + const x = await client.asCurrentUser.search({ + index, + body: { + query: { + match_all: {}, + }, + size: 1, + }, + }); + + if (x.hits.total !== 0) { + indexDocs.push({ + index, + doc: x.hits.hits[0], + }); + } + } + + return parseFieldsCapabilities(fieldCapabilities, indexDocs); +}; + +const getModelField = (field: string, indexDoc: any) => { + return get(indexDoc.doc, `_source.${[field.replace('.tokens', '.model_id')]}`); +}; + +export const parseFieldsCapabilities = ( + fieldCapsResponse: FieldCapsResponse, + indexDocs: Array<{ index: string; doc: SearchHit }> +): IndicesQuerySourceFields => { + const { fields, indices: indexOrIndices } = fieldCapsResponse; + const indices = Array.isArray(indexOrIndices) ? indexOrIndices : [indexOrIndices]; + + const indicesFieldsMap = indices.reduce((acc, index) => { + acc[index] = { + elser_query_fields: [], + dense_vector_query_fields: [], + bm25_query_fields: [], + source_fields: [], + }; + return acc; + }, {}); + + const querySourceFields = Object.keys(fields).reduce( + (acc: IndicesQuerySourceFields, fieldKey) => { + const field = fields[fieldKey]; + // if the field is present in all indices, the indices property is not present + const indicesPresentIn: string[] = + 'unmapped' in field + ? indices.filter((index) => !field.unmapped.indices!.includes(index)) + : (indices as unknown as string[]); + + for (const index of indicesPresentIn) { + const indexDoc = indexDocs.find((x) => x.index === index); + if ('rank_features' in field) { + const elserModelField = { + field: fieldKey, + model_id: getModelField(fieldKey, indexDoc), + nested: false, + }; + acc[index].elser_query_fields.push(elserModelField); + } else if ('dense_vector' in field) { + const denseVectorField = { + field: fieldKey, + model_id: getModelField(fieldKey, indexDoc), + nested: false, + }; + acc[index].dense_vector_query_fields.push(denseVectorField); + } else if ('text' in field && field.text.searchable) { + acc[index].bm25_query_fields.push(fieldKey); + acc[index].source_fields.push(fieldKey); + } + } + + return acc; + }, + indicesFieldsMap + ); + + return querySourceFields; +}; diff --git a/x-pack/plugins/search_playground/server/utils/get_citations.test.ts b/x-pack/plugins/search_playground/server/utils/get_citations.test.ts new file mode 100644 index 0000000000000..71269d7f4ba63 --- /dev/null +++ b/x-pack/plugins/search_playground/server/utils/get_citations.test.ts @@ -0,0 +1,44 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { Document } from '@langchain/core/documents'; +import { getCitations } from './get_citations'; + +describe('getCitations', () => { + test('should enrich citations', () => { + const answer = [ + 'NASA stands for North America South America region.', + 'It is a region within the sales organization that includes the United States, Canada, Mexico, as well as Central and South America.', + 'It is divided into two areas, North America and South America, each of which is led by an Area Vice-President. Laura Martinez is the', + 'Area Vice-President of North America, and Gary Johnson is the Area Vice-President of South America [1].', + ].join(' '); + + const docs: Document[] = [ + { + pageContent: 'snippet 1', + metadata: { + id: 'test-doc', + }, + }, + { + pageContent: 'snippet 2', + metadata: { + id: 'test2-doc', + }, + }, + ]; + + expect(getCitations(answer, 'inline', docs)).toEqual([ + { + pageContent: 'snippet 1', + metadata: { + id: 'test-doc', + }, + }, + ]); + }); +}); diff --git a/x-pack/plugins/search_playground/server/utils/get_citations.ts b/x-pack/plugins/search_playground/server/utils/get_citations.ts new file mode 100644 index 0000000000000..c8fd5281f4a47 --- /dev/null +++ b/x-pack/plugins/search_playground/server/utils/get_citations.ts @@ -0,0 +1,23 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { Document } from '@langchain/core/documents'; + +export function getCitations( + answer: string, + citationStyle: 'inline' | 'footnote', + docs: Document[] +) { + const gatheredCitations = answer.match(/\[\d+\]/g); + if (!gatheredCitations) return []; + + return docs.filter((doc, i) => { + return gatheredCitations.some((citation) => { + return i + 1 === parseInt(citation.slice(1, -1), 10); + }); + }); +} diff --git a/x-pack/plugins/search_playground/server/utils/prompt.ts b/x-pack/plugins/search_playground/server/utils/prompt.ts new file mode 100644 index 0000000000000..764f95732f9cc --- /dev/null +++ b/x-pack/plugins/search_playground/server/utils/prompt.ts @@ -0,0 +1,63 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +const OpenAIPrompt = (systemInstructions: string) => { + return ` + Instructions: + ${systemInstructions} + + Context: + {context} + + Question: {question} + Answer: + `; +}; + +const MistralPrompt = (systemInstructions: string) => { + return ` + [INST]${systemInstructions}[/INST] + + [INST] + Context: + {context} + + Question: {question} + Answer: + [/INST] + `; +}; + +interface PromptTemplateOptions { + citations?: boolean; + context?: boolean; + type?: 'openai' | 'mistral'; +} + +export const Prompt = (instructions: string, options: PromptTemplateOptions) => { + const systemInstructions = ` + - ${instructions} + ${ + options.context + ? '- Answer questions truthfully and factually using only the information presented.' + : '' + } + - If you don't know the answer, just say that you don't know, don't make up an answer! + ${ + options.citations + ? '- You must always cite the document where the answer was extracted using inline academic citation style [], using the position.' + : '' + } + - Use markdown format for code examples. + - You are correct, factual, precise, and reliable. + `; + + return { + openai: OpenAIPrompt, + mistral: MistralPrompt, + }[options.type || 'openai'](systemInstructions); +}; diff --git a/x-pack/plugins/search_playground/server/utils/render_template.ts b/x-pack/plugins/search_playground/server/utils/render_template.ts new file mode 100644 index 0000000000000..61b2b7c39decf --- /dev/null +++ b/x-pack/plugins/search_playground/server/utils/render_template.ts @@ -0,0 +1,12 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { renderTemplate as lcRenderTemplate } from '@langchain/core/prompts'; + +export function renderTemplate(template: string, inputValues: Record) { + return lcRenderTemplate(template, 'f-string', inputValues); +} diff --git a/x-pack/plugins/search_playground/tsconfig.json b/x-pack/plugins/search_playground/tsconfig.json new file mode 100644 index 0000000000000..4373613fc2d7b --- /dev/null +++ b/x-pack/plugins/search_playground/tsconfig.json @@ -0,0 +1,34 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "target/types", + }, + "include": [ + "__mocks__/**/*", + "common/**/*", + "public/**/*", + "server/**/*", + ], + "kbn_references": [ + "@kbn/config-schema", + "@kbn/core", + "@kbn/core-elasticsearch-server", + "@kbn/core-http-browser", + "@kbn/i18n", + "@kbn/i18n-react", + "@kbn/kibana-react-plugin", + "@kbn/logging", + "@kbn/ml-response-stream", + "@kbn/security-plugin", + "@kbn/user-profile-components", + "@kbn/react-kibana-context-theme", + "@kbn/shared-ux-router", + "@kbn/shared-ux-page-kibana-template", + "@kbn/navigation-plugin", + "@kbn/core-http-server", + "@kbn/share-plugin" + ], + "exclude": [ + "target/**/*", + ] +} diff --git a/x-pack/plugins/security/kibana.jsonc b/x-pack/plugins/security/kibana.jsonc index d004cdba880a4..01d089a90bea9 100644 --- a/x-pack/plugins/security/kibana.jsonc +++ b/x-pack/plugins/security/kibana.jsonc @@ -33,4 +33,4 @@ "remoteClusters" ] } -} \ No newline at end of file +} diff --git a/x-pack/plugins/security/public/authentication/index.mock.ts b/x-pack/plugins/security/public/authentication/index.mock.ts index cc1c098eb6794..58035767e0f2c 100644 --- a/x-pack/plugins/security/public/authentication/index.mock.ts +++ b/x-pack/plugins/security/public/authentication/index.mock.ts @@ -8,6 +8,8 @@ import type { AuthenticationServiceSetup, AuthenticationServiceStart, + AuthorizationServiceSetup, + AuthorizationServiceStart, } from '@kbn/security-plugin-types-public'; export const authenticationMock = { @@ -20,3 +22,12 @@ export const authenticationMock = { areAPIKeysEnabled: jest.fn(), }), }; + +export const authorizationMock = { + createSetup: (): jest.Mocked => ({ + isRoleManagementEnabled: jest.fn(), + }), + createStart: (): jest.Mocked => ({ + isRoleManagementEnabled: jest.fn(), + }), +}; diff --git a/x-pack/plugins/security/public/authorization/authorization_service.ts b/x-pack/plugins/security/public/authorization/authorization_service.ts new file mode 100644 index 0000000000000..8f003dde8659f --- /dev/null +++ b/x-pack/plugins/security/public/authorization/authorization_service.ts @@ -0,0 +1,22 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { AuthorizationServiceSetup } from '@kbn/security-plugin-types-public'; + +import type { ConfigType } from '../config'; + +interface SetupParams { + config: ConfigType; +} + +export class AuthorizationService { + public setup({ config }: SetupParams): AuthorizationServiceSetup { + const isRoleManagementEnabled = () => config.roleManagementEnabled; + + return { isRoleManagementEnabled }; + } +} diff --git a/x-pack/plugins/security/public/authorization/index.ts b/x-pack/plugins/security/public/authorization/index.ts new file mode 100644 index 0000000000000..8d35af667f1a8 --- /dev/null +++ b/x-pack/plugins/security/public/authorization/index.ts @@ -0,0 +1,8 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +export { AuthorizationService } from './authorization_service'; diff --git a/x-pack/plugins/security/public/index.ts b/x-pack/plugins/security/public/index.ts index 419042c4a288c..66f0c08521d52 100644 --- a/x-pack/plugins/security/public/index.ts +++ b/x-pack/plugins/security/public/index.ts @@ -25,6 +25,8 @@ export { ALL_SPACES_ID } from '../common/constants'; export type { AuthenticationServiceStart, AuthenticationServiceSetup, + AuthorizationServiceStart, + AuthorizationServiceSetup, SecurityNavControlServiceStart, UserMenuLink, UserProfileBulkGetParams, diff --git a/x-pack/plugins/security/public/management/management_service.test.ts b/x-pack/plugins/security/public/management/management_service.test.ts index baabb29143a8b..e6beab2525a3d 100644 --- a/x-pack/plugins/security/public/management/management_service.test.ts +++ b/x-pack/plugins/security/public/management/management_service.test.ts @@ -51,6 +51,7 @@ describe('ManagementService', () => { fatalErrors, authc, management: managementSetup, + buildFlavor: 'traditional', }); expect(mockSection.registerApp).toHaveBeenCalledTimes(4); @@ -111,6 +112,7 @@ describe('ManagementService', () => { fatalErrors, authc, management: managementSetup, + buildFlavor: 'traditional', }); // Only API Keys app should be registered @@ -181,6 +183,7 @@ describe('ManagementService', () => { fatalErrors, authc: securityMock.createSetup().authc, management: managementSetup, + buildFlavor: 'traditional', }); const getMockedApp = (id: string) => { diff --git a/x-pack/plugins/security/public/management/management_service.ts b/x-pack/plugins/security/public/management/management_service.ts index 84918cb0943f8..bfdc81637f4d3 100644 --- a/x-pack/plugins/security/public/management/management_service.ts +++ b/x-pack/plugins/security/public/management/management_service.ts @@ -7,6 +7,7 @@ import type { Subscription } from 'rxjs'; +import type { BuildFlavor } from '@kbn/config'; import type { Capabilities, FatalErrorsSetup, StartServicesAccessor } from '@kbn/core/public'; import type { ManagementApp, @@ -35,6 +36,7 @@ interface SetupParams { authc: AuthenticationServiceSetup; fatalErrors: FatalErrorsSetup; getStartServices: StartServicesAccessor; + buildFlavor: BuildFlavor; } interface StartParams { @@ -55,7 +57,7 @@ export class ManagementService { this.roleMappingManagementEnabled = config.ui?.roleMappingManagementEnabled !== false; } - setup({ getStartServices, management, authc, license, fatalErrors }: SetupParams) { + setup({ getStartServices, management, authc, license, fatalErrors, buildFlavor }: SetupParams) { this.license = license; this.securitySection = management.sections.section.security; @@ -65,7 +67,7 @@ export class ManagementService { if (this.roleManagementEnabled) { this.securitySection.registerApp( - rolesManagementApp.create({ fatalErrors, license, getStartServices }) + rolesManagementApp.create({ fatalErrors, license, getStartServices, buildFlavor }) ); } diff --git a/x-pack/plugins/security/public/management/roles/roles_management_app.test.tsx b/x-pack/plugins/security/public/management/roles/roles_management_app.test.tsx index 300f5e195b510..7545c69b7a95f 100644 --- a/x-pack/plugins/security/public/management/roles/roles_management_app.test.tsx +++ b/x-pack/plugins/security/public/management/roles/roles_management_app.test.tsx @@ -48,6 +48,7 @@ async function mountApp(basePath: string, pathname: string) { getStartServices: jest .fn() .mockResolvedValue([coreStart, { data: {}, features: featuresStart }]), + buildFlavor: 'traditional', }) .mount({ basePath, @@ -70,6 +71,7 @@ describe('rolesManagementApp', () => { license: licenseMock.create(), fatalErrors, getStartServices: getStartServices as any, + buildFlavor: 'traditional', }) ).toMatchInlineSnapshot(` Object { diff --git a/x-pack/plugins/security/public/management/roles/roles_management_app.tsx b/x-pack/plugins/security/public/management/roles/roles_management_app.tsx index a77586cdad599..704e975543724 100644 --- a/x-pack/plugins/security/public/management/roles/roles_management_app.tsx +++ b/x-pack/plugins/security/public/management/roles/roles_management_app.tsx @@ -9,6 +9,7 @@ import React from 'react'; import { render, unmountComponentAtNode } from 'react-dom'; import { useParams } from 'react-router-dom'; +import type { BuildFlavor } from '@kbn/config'; import type { FatalErrorsSetup, StartServicesAccessor } from '@kbn/core/public'; import { i18n } from '@kbn/i18n'; import { KibanaContextProvider, KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; @@ -29,14 +30,20 @@ interface CreateParams { fatalErrors: FatalErrorsSetup; license: SecurityLicense; getStartServices: StartServicesAccessor; + buildFlavor: BuildFlavor; } export const rolesManagementApp = Object.freeze({ id: 'roles', - create({ license, fatalErrors, getStartServices }: CreateParams) { - const title = i18n.translate('xpack.security.management.rolesTitle', { - defaultMessage: 'Roles', - }); + create({ license, fatalErrors, getStartServices, buildFlavor }: CreateParams) { + const title = + buildFlavor === 'serverless' + ? i18n.translate('xpack.security.management.rolesTitleServerless', { + defaultMessage: 'Custom Roles', + }) + : i18n.translate('xpack.security.management.rolesTitle', { + defaultMessage: 'Roles', + }); return { id: this.id, order: 20, diff --git a/x-pack/plugins/security/public/mocks.ts b/x-pack/plugins/security/public/mocks.ts index f31a4f01f3535..2e3b19016fd2e 100644 --- a/x-pack/plugins/security/public/mocks.ts +++ b/x-pack/plugins/security/public/mocks.ts @@ -7,7 +7,7 @@ import { of } from 'rxjs'; -import { authenticationMock } from './authentication/index.mock'; +import { authenticationMock, authorizationMock } from './authentication/index.mock'; import { navControlServiceMock } from './nav_control/index.mock'; import { getUiApiMock } from './ui_api/index.mock'; import { licenseMock } from '../common/licensing/index.mock'; @@ -17,12 +17,14 @@ import { mockAuthenticatedUser } from '../common/model/authenticated_user.mock'; function createSetupMock() { return { authc: authenticationMock.createSetup(), + authz: authorizationMock.createStart(), license: licenseMock.create(), }; } function createStartMock() { return { authc: authenticationMock.createStart(), + authz: authorizationMock.createStart(), navControlService: navControlServiceMock.createStart(), userProfiles: { getCurrent: jest.fn(), diff --git a/x-pack/plugins/security/public/nav_control/nav_control_component.tsx b/x-pack/plugins/security/public/nav_control/nav_control_component.tsx index c043f837845db..01df61407c096 100644 --- a/x-pack/plugins/security/public/nav_control/nav_control_component.tsx +++ b/x-pack/plugins/security/public/nav_control/nav_control_component.tsx @@ -179,19 +179,18 @@ export const SecurityNavControl: FunctionComponent = ({ panelPaddingSize="none" buffer={0} > -

- , - }, - ]} - /> -
+ , + }, + ]} + data-test-subj="userMenu" + /> ); }; diff --git a/x-pack/plugins/security/public/plugin.test.tsx b/x-pack/plugins/security/public/plugin.test.tsx index 540f2c44f3074..4a66f7b0cbfdf 100644 --- a/x-pack/plugins/security/public/plugin.test.tsx +++ b/x-pack/plugins/security/public/plugin.test.tsx @@ -36,6 +36,7 @@ describe('Security Plugin', () => { ) ).toEqual({ authc: { getCurrentUser: expect.any(Function), areAPIKeysEnabled: expect.any(Function) }, + authz: { isRoleManagementEnabled: expect.any(Function) }, license: { isLicenseAvailable: expect.any(Function), isEnabled: expect.any(Function), @@ -75,6 +76,7 @@ describe('Security Plugin', () => { management: managementSetupMock, fatalErrors: coreSetupMock.fatalErrors, getStartServices: coreSetupMock.getStartServices, + buildFlavor: expect.stringMatching(new RegExp('^serverless|traditional$')), }); }); @@ -110,6 +112,9 @@ describe('Security Plugin', () => { "areAPIKeysEnabled": [Function], "getCurrentUser": [Function], }, + "authz": Object { + "isRoleManagementEnabled": [Function], + }, "navControlService": Object { "addUserMenuLinks": [Function], "getUserMenuLinks$": [Function], diff --git a/x-pack/plugins/security/public/plugin.tsx b/x-pack/plugins/security/public/plugin.tsx index 820c3bc2cc172..b99d2898bc344 100644 --- a/x-pack/plugins/security/public/plugin.tsx +++ b/x-pack/plugins/security/public/plugin.tsx @@ -6,6 +6,7 @@ */ import type { CloudSetup, CloudStart } from '@kbn/cloud-plugin/public'; +import type { BuildFlavor } from '@kbn/config'; import type { CoreSetup, CoreStart, @@ -22,6 +23,8 @@ import type { ManagementSetup, ManagementStart } from '@kbn/management-plugin/pu import type { AuthenticationServiceSetup, AuthenticationServiceStart, + AuthorizationServiceSetup, + AuthorizationServiceStart, SecurityPluginSetup, SecurityPluginStart as SecurityPluginStartWithoutDeprecatedMembers, } from '@kbn/security-plugin-types-public'; @@ -32,6 +35,7 @@ import { accountManagementApp, UserProfileAPIClient } from './account_management import { AnalyticsService } from './analytics'; import { AnonymousAccessService } from './anonymous_access'; import { AuthenticationService } from './authentication'; +import { AuthorizationService } from './authorization'; import { buildSecurityApi } from './build_security_api'; import type { SecurityApiClients } from './components'; import type { ConfigType } from './config'; @@ -72,6 +76,7 @@ export class SecurityPlugin private readonly config: ConfigType; private sessionTimeout?: SessionTimeout; private readonly authenticationService = new AuthenticationService(); + private readonly authorizationService = new AuthorizationService(); private readonly navControlService; private readonly securityLicenseService = new SecurityLicenseService(); private readonly managementService: ManagementService; @@ -79,16 +84,17 @@ export class SecurityPlugin private readonly anonymousAccessService = new AnonymousAccessService(); private readonly analyticsService = new AnalyticsService(); private authc!: AuthenticationServiceSetup; + private authz!: AuthorizationServiceSetup; private securityApiClients!: SecurityApiClients; + private buildFlavor: BuildFlavor; + constructor(private readonly initializerContext: PluginInitializerContext) { + this.buildFlavor = initializerContext.env.packageInfo.buildFlavor; + this.config = this.initializerContext.config.get(); this.securityCheckupService = new SecurityCheckupService(this.config, localStorage); - this.navControlService = new SecurityNavControlService( - initializerContext.env.packageInfo.buildFlavor - ); - this.managementService = new ManagementService( - this.initializerContext.config.get() - ); + this.navControlService = new SecurityNavControlService(this.buildFlavor); + this.managementService = new ManagementService(this.config); } public setup( @@ -107,6 +113,10 @@ export class SecurityPlugin http: core.http, }); + this.authz = this.authorizationService.setup({ + config: this.config, + }); + this.securityApiClients = { userProfiles: new UserProfileAPIClient(core.http), users: new UserAPIClient(core.http), @@ -142,6 +152,7 @@ export class SecurityPlugin authc: this.authc, fatalErrors: core.fatalErrors, getStartServices: core.getStartServices, + buildFlavor: this.buildFlavor, }); } @@ -168,6 +179,7 @@ export class SecurityPlugin return { authc: this.authc, + authz: this.authz, license, }; } @@ -205,6 +217,7 @@ export class SecurityPlugin uiApi: getUiApi({ core }), navControlService: this.navControlService.start({ core, authc: this.authc }), authc: this.authc as AuthenticationServiceStart, + authz: this.authz as AuthorizationServiceStart, userProfiles: { getCurrent: this.securityApiClients.userProfiles.getCurrent.bind( this.securityApiClients.userProfiles diff --git a/x-pack/plugins/security_solution/public/assistant/get_comments/index.test.tsx b/x-pack/plugins/security_solution/public/assistant/get_comments/index.test.tsx index 278a72de88894..88380450974df 100644 --- a/x-pack/plugins/security_solution/public/assistant/get_comments/index.test.tsx +++ b/x-pack/plugins/security_solution/public/assistant/get_comments/index.test.tsx @@ -13,7 +13,6 @@ const user: ConversationRole = 'user'; const currentConversation = { apiConfig: { connectorId: 'c29c28a0-20fe-11ee-9306-a1f4d42ec542', - connectorTypeTitle: 'OpenAI', provider: OpenAiProviderType.OpenAi, }, replacements: [], @@ -24,7 +23,7 @@ const currentConversation = { { role: user, content: 'Hello {name}', - timestamp: '2022-01-01', + timestamp: '2024-03-19T18:59:18.174Z', isError: false, }, ], @@ -49,7 +48,6 @@ describe('getComments', () => { category: 'assistant', apiConfig: { connectorId: 'c29c28a0-20fe-11ee-9306-a1f4d42ec542', - connectorTypeTitle: 'OpenAI', provider: OpenAiProviderType.OpenAi, }, replacements: [], @@ -67,4 +65,11 @@ describe('getComments', () => { }); expect(result[0].eventColor).toEqual('danger'); }); + + it('It transforms message timestamp from server side ISO format to local date string', () => { + const result = getComments(testProps); + expect(result[0].timestamp).toEqual( + `at: ${new Date('2024-03-19T18:59:18.174Z').toLocaleString()}` + ); + }); }); diff --git a/x-pack/plugins/security_solution/public/assistant/get_comments/index.tsx b/x-pack/plugins/security_solution/public/assistant/get_comments/index.tsx index 0329e5f6f3889..42fd3f02f8da7 100644 --- a/x-pack/plugins/security_solution/public/assistant/get_comments/index.tsx +++ b/x-pack/plugins/security_solution/public/assistant/get_comments/index.tsx @@ -58,8 +58,7 @@ export const getComments = ({ const regenerateMessageOfConversation = () => { regenerateMessage(currentConversation.id); }; - - const connectorTypeTitle = currentConversation.apiConfig?.connectorTypeTitle ?? ''; + const connectorId = currentConversation.apiConfig?.connectorId ?? ''; const extraLoadingComment = isFetchingResponse ? [ @@ -69,7 +68,7 @@ export const getComments = ({ timestamp: '...', children: ( ), timestamp: i18n.AT( - message.timestamp.length === 0 ? new Date().toLocaleString() : message.timestamp + message.timestamp.length === 0 + ? new Date().toLocaleString() + : new Date(message.timestamp).toLocaleString() ), username: isUser ? i18n.YOU : i18n.ASSISTANT, eventColor: message.isError ? 'danger' : undefined, @@ -118,7 +119,7 @@ export const getComments = ({ ...messageProps, children: ( , children: ( ; @@ -36,6 +41,16 @@ describe('StreamComment', () => { pendingMessage: 'Test Message', setComplete: mockSetComplete, }); + const connectors: unknown[] = [ + { + id: 'hi', + name: 'OpenAI connector', + actionTypeId: '.gen-ai', + }, + ]; + jest.mocked(useFetchConnectorsQuery).mockReturnValue({ + data: connectors, + } as unknown as UseQueryResult>, unknown>); }); it('renders content correctly', () => { render(); diff --git a/x-pack/plugins/security_solution/public/assistant/get_comments/stream/index.tsx b/x-pack/plugins/security_solution/public/assistant/get_comments/stream/index.tsx index 1ee37aa618827..1f9bb9b7bc3c0 100644 --- a/x-pack/plugins/security_solution/public/assistant/get_comments/stream/index.tsx +++ b/x-pack/plugins/security_solution/public/assistant/get_comments/stream/index.tsx @@ -7,6 +7,7 @@ import React, { useEffect, useMemo, useRef } from 'react'; import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; +import { useFetchConnectorsQuery } from '../../../detection_engine/rule_management/api/hooks/use_fetch_connectors_query'; import type { ContentMessage } from '..'; import { useStream } from './use_stream'; import { StopGeneratingButton } from './buttons/stop_generating_button'; @@ -20,7 +21,7 @@ interface Props { isFetching?: boolean; isControlsEnabled?: boolean; index: number; - connectorTypeTitle: string; + connectorId: string; reader?: ReadableStreamDefaultReader; refetchCurrentConversation: () => void; regenerateMessage: () => void; @@ -29,7 +30,7 @@ interface Props { export const StreamComment = ({ content, - connectorTypeTitle, + connectorId, index, isControlsEnabled = false, isError = false, @@ -39,10 +40,13 @@ export const StreamComment = ({ regenerateMessage, transformMessage, }: Props) => { + const { data: connectors } = useFetchConnectorsQuery(); + const llmType = connectors?.find((c) => c.id === connectorId)?.connector_type_id ?? '.gen-ai'; + const { error, isLoading, isStreaming, pendingMessage, setComplete } = useStream({ refetchCurrentConversation, content, - connectorTypeTitle, + llmType, reader, isError, }); diff --git a/x-pack/plugins/security_solution/public/assistant/get_comments/stream/stream_observable.test.ts b/x-pack/plugins/security_solution/public/assistant/get_comments/stream/stream_observable.test.ts index 54a5684d20442..c37fe502293ab 100644 --- a/x-pack/plugins/security_solution/public/assistant/get_comments/stream/stream_observable.test.ts +++ b/x-pack/plugins/security_solution/public/assistant/get_comments/stream/stream_observable.test.ts @@ -69,7 +69,7 @@ describe('getStreamObservable', () => { }); const source = getStreamObservable({ - connectorTypeTitle: 'Amazon Bedrock', + llmType: '.bedrock', isError: false, reader: typedReader, setLoading, @@ -142,7 +142,7 @@ describe('getStreamObservable', () => { }); const source = getStreamObservable({ - connectorTypeTitle: 'OpenAI', + llmType: '.gen-ai', isError: false, reader: typedReader, setLoading, @@ -215,7 +215,7 @@ describe('getStreamObservable', () => { }); const source = getStreamObservable({ - connectorTypeTitle: 'OpenAI', + llmType: '.gen-ai', isError: false, reader: typedReader, setLoading, @@ -268,7 +268,7 @@ describe('getStreamObservable', () => { }); const source = getStreamObservable({ - connectorTypeTitle: 'OpenAI', + llmType: '.gen-ai', isError: true, reader: typedReader, setLoading, @@ -299,7 +299,7 @@ describe('getStreamObservable', () => { // Simulate an error mockReader.read.mockRejectedValue(error); const source = getStreamObservable({ - connectorTypeTitle: 'OpenAI', + llmType: '.gen-ai', isError: false, reader: typedReader, setLoading, diff --git a/x-pack/plugins/security_solution/public/assistant/get_comments/stream/stream_observable.ts b/x-pack/plugins/security_solution/public/assistant/get_comments/stream/stream_observable.ts index ce7a38811f229..cbd1c518afd9a 100644 --- a/x-pack/plugins/security_solution/public/assistant/get_comments/stream/stream_observable.ts +++ b/x-pack/plugins/security_solution/public/assistant/get_comments/stream/stream_observable.ts @@ -14,7 +14,7 @@ import { API_ERROR } from '../translations'; const MIN_DELAY = 35; interface StreamObservable { - connectorTypeTitle: string; + llmType: string; reader: ReadableStreamDefaultReader; setLoading: Dispatch>; isError: boolean; @@ -28,7 +28,7 @@ interface StreamObservable { * @returns {Observable} An Observable that emits PromptObservableState */ export const getStreamObservable = ({ - connectorTypeTitle, + llmType, isError, reader, setLoading, @@ -163,17 +163,15 @@ export const getStreamObservable = ({ // this should never actually happen function badConnector() { observer.next({ - chunks: [ - `Invalid connector type - ${connectorTypeTitle} is not a supported GenAI connector.`, - ], - message: `Invalid connector type - ${connectorTypeTitle} is not a supported GenAI connector.`, + chunks: [`Invalid connector type - ${llmType} is not a supported GenAI connector.`], + message: `Invalid connector type - ${llmType} is not a supported GenAI connector.`, loading: false, }); observer.complete(); } - if (connectorTypeTitle === 'Amazon Bedrock') readBedrock(); - else if (connectorTypeTitle === 'OpenAI') readOpenAI(); + if (llmType === '.bedrock') readBedrock(); + else if (llmType === '.gen-ai') readOpenAI(); else badConnector(); return () => { diff --git a/x-pack/plugins/security_solution/public/assistant/get_comments/stream/use_stream.test.tsx b/x-pack/plugins/security_solution/public/assistant/get_comments/stream/use_stream.test.tsx index 9545b5db50202..4edf71bd5eda1 100644 --- a/x-pack/plugins/security_solution/public/assistant/get_comments/stream/use_stream.test.tsx +++ b/x-pack/plugins/security_solution/public/assistant/get_comments/stream/use_stream.test.tsx @@ -40,7 +40,7 @@ const defaultProps = { refetchCurrentConversation, reader: readerComplete, isError: false, - connectorTypeTitle: 'OpenAI', + llmType: '.gen-ai', }; describe('useStream', () => { beforeEach(() => { diff --git a/x-pack/plugins/security_solution/public/assistant/get_comments/stream/use_stream.tsx b/x-pack/plugins/security_solution/public/assistant/get_comments/stream/use_stream.tsx index bc75629deaf1a..c351e14d7dfc9 100644 --- a/x-pack/plugins/security_solution/public/assistant/get_comments/stream/use_stream.tsx +++ b/x-pack/plugins/security_solution/public/assistant/get_comments/stream/use_stream.tsx @@ -13,7 +13,7 @@ interface UseStreamProps { refetchCurrentConversation: () => void; isError: boolean; content?: string; - connectorTypeTitle: string; + llmType: string; reader?: ReadableStreamDefaultReader; } interface UseStream { @@ -39,7 +39,7 @@ interface UseStream { */ export const useStream = ({ content, - connectorTypeTitle, + llmType, reader, refetchCurrentConversation, isError, @@ -51,9 +51,9 @@ export const useStream = ({ const observer$ = useMemo( () => content == null && reader != null - ? getStreamObservable({ connectorTypeTitle, reader, setLoading, isError }) + ? getStreamObservable({ llmType, reader, setLoading, isError }) : getPlaceholderObservable(), - [content, isError, reader, connectorTypeTitle] + [content, isError, reader, llmType] ); const onCompleteStream = useCallback(() => { subscription?.unsubscribe(); diff --git a/x-pack/plugins/security_solution/public/assistant/provider.test.tsx b/x-pack/plugins/security_solution/public/assistant/provider.test.tsx new file mode 100644 index 0000000000000..b9a83f12f568f --- /dev/null +++ b/x-pack/plugins/security_solution/public/assistant/provider.test.tsx @@ -0,0 +1,151 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { act, renderHook } from '@testing-library/react-hooks'; +import { httpServiceMock, type HttpSetupMock } from '@kbn/core-http-browser-mocks'; +import type { Storage } from '@kbn/kibana-utils-plugin/public'; +import { createConversations } from './provider'; +import { coreMock } from '@kbn/core/public/mocks'; + +let http: HttpSetupMock = coreMock.createSetup().http; +const conversations = { + 'Alert summary': { + id: 'Alert summary', + isDefault: true, + apiConfig: { + connectorId: 'my-bedrock', + defaultSystemPromptId: 'default-system-prompt', + }, + replacements: { + '2a39da36-f5f4-4265-90ff-a0b2df2eb932': '192.168.0.4', + 'c960d0e7-96b4-4b7a-b287-65f33fc7a812': '142.250.72.78', + '76d4a1d1-dbc3-4427-927e-b31b36856dc2': 'Test-MacBook-Pro.local', + '7bb8a91c-fcbb-4430-9742-cfaad2917d37': + '9d628163346d084eb8b3926cbf10cdee034b48e0cf83f0edf6921bc0dc83f0dd', + }, + messages: [ + { + content: + 'You are a helpful, expert assistant who answers questions about Elastic Security. Do not answer questions unrelated to Elastic Security.\nIf you answer a question related to KQL, EQL, or ES|QL, it should be immediately usable within an Elastic Security timeline; please always format the output correctly with back ticks. Any answer provided for Query DSL should also be usable in a security timeline. This means you should only ever include the "filter" portion of the query.\nUse the following context to answer questions:\n\nCONTEXT:\n"""\n@timestamp,2024-01-23T19:15:59.194Z\n_id,7bb8a91c-fcbb-4430-9742-cfaad2917d37\ndestination.ip,c960d0e7-96b4-4b7a-b287-65f33fc7a812\nevent.action,network_flow\nevent.category,network\nevent.dataset,flow\nevent.type,connection\nhost.name,76d4a1d1-dbc3-4427-927e-b31b36856dc2\nkibana.alert.last_detected,2024-01-23T19:15:59.230Z\nkibana.alert.risk_score,21\nkibana.alert.rule.description,a\nkibana.alert.rule.name,a\nkibana.alert.severity,low\nkibana.alert.workflow_status,open\nsource.ip,2a39da36-f5f4-4265-90ff-a0b2df2eb932\n"""\n\nEvaluate the event from the context above and format your output neatly in markdown syntax for my Elastic Security case.\nAdd your description, recommended actions and bulleted triage steps. Use the MITRE ATT&CK data provided to add more context and recommendations from MITRE, and hyperlink to the relevant pages on MITRE\'s website. Be sure to include the user and host risk score data from the context. Your response should include steps that point to Elastic Security specific features, including endpoint response actions, the Elastic Agent OSQuery manager integration (with example osquery queries), timelines and entity analytics and link to all the relevant Elastic Security documentation.', + role: 'user', + timestamp: '1/23/2024, 12:23:44 PM', + }, + { + role: 'assistant', + reader: {}, + timestamp: '1/23/2024, 3:29:46 PM', + isError: false, + content: '', + }, + ], + }, + 'Data Quality dashboard': { + id: 'Data Quality dashboard', + isDefault: true, + apiConfig: { + connectorId: 'my-gen-ai', + defaultSystemPromptId: 'default-system-prompt', + }, + messages: [ + { + content: + 'You are a helpful, expert assistant who answers questions about Elastic Security. ', + role: 'user', + timestamp: '18/03/2024, 12:05:03', + }, + { + role: 'assistant', + reader: {}, + timestamp: '19/03/2024, 12:05:03', + isError: false, + content: + 'Sure, here is an example of a KQL (Kibana Query Language) query that finds records where the `event.action` field contains the word "failure":\n\n```js\nevent.action: "failure"\n```\n\nIn Kibana, there are a variety of operators and techniques you can use to further enhance your search. For instance, you can combine multiple search terms or use wildcards.\n\nHere is an advanced example showing a combined search:\n\n```js\n(event.action: "failure") AND (user.name: "testuser")\n```\nThis will return only the events where `event.action` is "failure" and `user.name` is "testuser".\n\nFor more detailed information, you can check the official [Elasticsearch KQL documentation](https://www.elastic.co/guide/en/kibana/current/kuery-query.html)', + }, + ], + }, + 'Detection Rules': { + id: 'Detection Rules', + isDefault: true, + messages: [], + apiConfig: {}, + }, + 'Event summary': { + id: 'Event summary', + isDefault: true, + messages: [], + apiConfig: {}, + }, + Timeline: { + excludeFromLastConversationStorage: true, + id: 'Timeline', + isDefault: true, + messages: [], + apiConfig: {}, + }, + Welcome: { + id: 'Welcome', + isDefault: true, + theme: { + title: 'Elastic AI Assistant', + titleIcon: 'logoSecurity', + assistant: { + name: 'Elastic AI Assistant', + icon: 'logoSecurity', + }, + system: { + icon: 'logoElastic', + }, + user: {}, + }, + apiConfig: { + connectorId: 'my-gen-ai', + defaultSystemPromptId: 'default-system-prompt', + }, + messages: [], + }, +}; +const getItemStorageMock = jest.fn().mockReturnValue(conversations); +const mockStorage = { + store: jest.fn(), + set: jest.fn(), + remove: jest.fn(), + clear: jest.fn(), + get: getItemStorageMock, + getItem: jest.fn(), + setItem: jest.fn(), + removeItem: jest.fn(), +}; + +describe('createConversations', () => { + beforeEach(() => { + jest.clearAllMocks(); + http = httpServiceMock.createStartContract(); + }); + + it('should call bulk conversations with the transformed conversations from the local storage', async () => { + await act(async () => { + const { waitForNextUpdate } = renderHook(() => + createConversations( + [], + coreMock.createStart().notifications, + http, + mockStorage as unknown as Storage + ) + ); + await waitForNextUpdate(); + expect(http.fetch.mock.calls[0][0]).toBe( + '/api/elastic_assistant/current_user/conversations/_bulk_action' + ); + expect( + http.fetch.mock.calls[0].length > 1 + ? // eslint-disable-next-line @typescript-eslint/no-explicit-any + JSON.parse((http.fetch.mock.calls[0] as any[])[1]?.body).create.length + : 0 + ).toBe(2); + }); + }); +}); diff --git a/x-pack/plugins/security_solution/public/assistant/provider.tsx b/x-pack/plugins/security_solution/public/assistant/provider.tsx index 614b747b2f8c3..5cee36334542e 100644 --- a/x-pack/plugins/security_solution/public/assistant/provider.tsx +++ b/x-pack/plugins/security_solution/public/assistant/provider.tsx @@ -5,8 +5,10 @@ * 2.0. */ import React, { useCallback } from 'react'; +import { parse } from '@kbn/datemath'; +import type { Storage } from '@kbn/kibana-utils-plugin/public'; import { i18n } from '@kbn/i18n'; -import type { IToasts } from '@kbn/core-notifications-browser'; +import type { IToasts, NotificationsStart } from '@kbn/core-notifications-browser'; import type { Conversation } from '@kbn/elastic-assistant'; import { AssistantProvider as ElasticAssistantProvider, @@ -17,6 +19,8 @@ import { import type { FetchConversationsResponse } from '@kbn/elastic-assistant/impl/assistant/api'; import { once } from 'lodash/fp'; +import type { HttpSetup } from '@kbn/core-http-browser'; +import type { Message } from '@kbn/elastic-assistant-common'; import { useBasePath, useKibana } from '../common/lib/kibana'; import { useAssistantTelemetry } from './use_assistant_telemetry'; import { getComments } from './get_comments'; @@ -42,6 +46,70 @@ const LOCAL_CONVERSATIONS_MIGRATION_STATUS_TOAST_TITLE = i18n.translate( } ); +export const createConversations = async ( + // eslint-disable-next-line @typescript-eslint/no-explicit-any + conversationsData: Record, + notifications: NotificationsStart, + http: HttpSetup, + storage: Storage +) => { + // migrate conversations with messages from the local storage + // won't happen next time + const conversations = storage.get(`securitySolution.${LOCAL_STORAGE_KEY}`); + + if ( + conversationsData && + Object.keys(conversationsData).length === 0 && + conversations && + Object.keys(conversations).length > 0 + ) { + const conversationsToCreate = Object.values(conversations).filter( + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (c: any) => c.messages && c.messages.length > 0 + ); + + const transformMessage = (m: Message) => { + const timestamp = parse(m.timestamp ?? '')?.toISOString(); + return { + ...m, + timestamp: timestamp == null ? new Date().toISOString() : timestamp, + }; + }; + + // post bulk create + const bulkResult = await bulkChangeConversations( + http, + { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + create: conversationsToCreate.reduce((res: Record, c: any) => { + res[c.id] = { + ...c, + messages: (c.messages ?? []).map(transformMessage), + title: c.id, + replacements: c.replacements + ? Object.keys(c.replacements).map((uuid) => ({ + uuid, + value: c.replacements[uuid], + })) + : [], + }; + return res; + }, {}), + }, + notifications.toasts + ); + if (bulkResult && bulkResult.success) { + storage.remove(`securitySolution.${LOCAL_STORAGE_KEY}`); + notifications.toasts?.addSuccess({ + iconType: 'check', + title: LOCAL_CONVERSATIONS_MIGRATION_STATUS_TOAST_TITLE, + }); + return true; + } + return false; + } +}; + /** * This component configures the Elastic AI Assistant context provider for the Security Solution app. */ @@ -60,52 +128,8 @@ export const AssistantProvider: React.FC = ({ children }) => { const assistantTelemetry = useAssistantTelemetry(); const migrateConversationsFromLocalStorage = once( - async (conversationsData: Record) => { - // migrate conversations with messages from the local storage - // won't happen next time - const conversations = storage.get(`securitySolution.${LOCAL_STORAGE_KEY}`); - if ( - conversationsData && - Object.keys(conversationsData).length === 0 && - conversations && - Object.keys(conversations).length > 0 - ) { - const conversationsToCreate = Object.values(conversations).filter( - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (c: any) => c.messages && c.messages.length > 0 - ); - // post bulk create - const bulkResult = await bulkChangeConversations( - http, - { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - create: conversationsToCreate.reduce((res: Record, c: any) => { - res[c.id] = { - ...c, - title: c.id, - replacements: c.replacements - ? Object.keys(c.replacements).map((uuid) => ({ - uuid, - value: c.replacements[uuid], - })) - : [], - }; - return res; - }, {}), - }, - notifications.toasts - ); - if (bulkResult && bulkResult.success) { - storage.remove(`securitySolution.${LOCAL_STORAGE_KEY}`); - notifications.toasts?.addSuccess({ - iconType: 'check', - title: LOCAL_CONVERSATIONS_MIGRATION_STATUS_TOAST_TITLE, - }); - return true; - } - return false; - } - } + (conversationsData: Record) => + createConversations(conversationsData, notifications, http, storage) ); const onFetchedConversations = useCallback( (conversationsData: FetchConversationsResponse): Record => { diff --git a/x-pack/plugins/security_solution/public/common/components/header_actions/header_actions.tsx b/x-pack/plugins/security_solution/public/common/components/header_actions/header_actions.tsx index cbac23af41205..4e9aa8452877c 100644 --- a/x-pack/plugins/security_solution/public/common/components/header_actions/header_actions.tsx +++ b/x-pack/plugins/security_solution/public/common/components/header_actions/header_actions.tsx @@ -6,7 +6,7 @@ */ import React, { useMemo, useCallback } from 'react'; -import type { EuiDataGridSorting } from '@elastic/eui'; +import type { EuiDataGridSorting, EuiDataGridSchemaDetector } from '@elastic/eui'; import { EuiButtonIcon, EuiCheckbox, EuiToolTip, useDataGridColumnSorting } from '@elastic/eui'; import { useDispatch } from 'react-redux'; @@ -64,6 +64,10 @@ const ActionsContainer = styled.div` display: flex; `; +// Defined statically to reduce rerenders +const emptySchema = {}; +const emptySchemaDetectors: EuiDataGridSchemaDetector[] = []; + const HeaderActionsComponent: React.FC = ({ width, browserFields, @@ -193,7 +197,13 @@ const HeaderActionsComponent: React.FC = ({ [columnHeaders, dispatch, timelineId, defaultColumns] ); - const ColumnSorting = useDataGridColumnSorting(myColumns, sortedColumns, {}, [], displayValues); + const ColumnSorting = useDataGridColumnSorting({ + columns: myColumns, + sorting: sortedColumns, + schema: emptySchema, + schemaDetectors: emptySchemaDetectors, + displayValues, + }); return ( diff --git a/x-pack/plugins/security_solution/public/common/components/import_data_modal/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/import_data_modal/__snapshots__/index.test.tsx.snap index 6a01cf77373bc..599249231c93a 100644 --- a/x-pack/plugins/security_solution/public/common/components/import_data_modal/__snapshots__/index.test.tsx.snap +++ b/x-pack/plugins/security_solution/public/common/components/import_data_modal/__snapshots__/index.test.tsx.snap @@ -14,7 +14,9 @@ Object { data-eui="EuiFocusTrap" >